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,
40 # wgEnableMagicLinks, wgMediaInTargetLanguage
42 # For testing purposes, temporary articles can created:
43 # !!article / NAMESPACE:TITLE / !!text / ARTICLE TEXT / !!endarticle
44 # where '/' denotes a newline.
46 # This is the standard article assumed to exist.
66 Template:redirect to foo
68 #REDIRECT [[Template:Foo]]
89 MediaWiki:bad image list
91 * [[File:Bad.jpg]] except [[Nasty page]]
126 // For Serbian; localize Template namespace
134 Template:echo_with_span
140 Template:echo_with_div
146 Template:echo with depth
159 Template:table_attribs
162 |</noinclude>style="color:red;"|Foo
166 Template:table_attribs_2
169 |</noinclude>style="color:red;"|Foo
174 Template:table_attribs_3
177 |</noinclude>style{{=}}"background:#f9f9f9;"|Foo
181 Template:table_attribs_4
183 | style="background-color:#DC241f;" width="10px" |
187 Template:table_attribs_5
190 |</noinclude>style="color:red;"||Bar
194 Template:table_attribs_6
196 style="background: <nowiki>
203 Template:table_attribs_7
206 |</noinclude>style{{=}}"background:#f9f9f9;"|Foo<ref>foo</ref>
210 Template:table_header_cells
212 {{table_attribs}}!!style='color:red;'|''Bar''||style='color:brown;'|''Foo'' and Baz
218 {{table_attribs}}||style='color:red;'|''Bar''||style='color:brown;'|''Foo'' and Baz
222 Template:PartialTable
229 Template:image_attribs
232 [[File:foobar.jpg|</noinclude>right|Caption text<noinclude>]]</noinclude>
235 ## See T48811 for details
237 Template:mixed_attr_content_template
239 style="color:red;" title="T48811"
245 Template:definition_list
292 Template:EmptyTRWithHTMLAttrTest
295 <tr align="center"></tr>
296 <tr><td>foo</td></tr>
297 <tr align="center"></tr>
298 <tr><td>bar</td></tr>
321 This is a simple paragraph.
323 <p>This is a simple paragraph.
328 Paragraphs with extra newline spacing
359 Paragraphs with newline spacing with comment lines in between
367 <!--foo--><!--More than 1 comment, still stripped-->
371 <!--foo--> <!----> <!-- bar -->
432 Paragraphs with newline spacing with non-empty white-space lines in between
459 Paragraphs with newline spacing with non-empty mixed comment and white-space lines in between
467 <!--foo--><!--More than 1 comment doesn't disable stripping of this line!-->
506 Extra newlines: More paragraphs with indented comment
521 Extra newlines followed by heading
535 <h1><span class="mw-headline" id="b">b</span><span class="mw-editsection"><span class="mw-editsection-bracket">[</span><a href="/index.php?title=Parser_test&action=edit&section=1" title="Edit section: b">edit</a><span class="mw-editsection-bracket">]</span></span></h1>
536 <p><a href="/index.php?title=A&action=edit&redlink=1" class="new" title="A (page does not exist)">a</a>
539 <h1><span class="mw-headline" id="b_2">b</span><span class="mw-editsection"><span class="mw-editsection-bracket">[</span><a href="/index.php?title=Parser_test&action=edit&section=2" title="Edit section: b">edit</a><span class="mw-editsection-bracket">]</span></span></h1>
544 Extra newlines between heading and content are swallowed (Parsoid does not)
552 <h1><span class="mw-headline" id="b">b</span><span class="mw-editsection"><span class="mw-editsection-bracket">[</span><a href="/index.php?title=Parser_test&action=edit&section=1" title="Edit section: b">edit</a><span class="mw-editsection-bracket">]</span></span></h1>
553 <p><a href="/index.php?title=A&action=edit&redlink=1" class="new" title="A (page does not exist)">a</a>
560 <p><a rel="mw:WikiLink" href="./A" title="A">a</a></p>
564 Extra new lines before and after lists are preserved
591 # Parsoid regression test
593 Multiple newlines after tables are converted to p-br-p tags
595 parsoid=wt2html,wt2wt
609 </td></tr></tbody></table>
613 <h1><span class="mw-headline" id="b">b</span><span class="mw-editsection"><span class="mw-editsection-bracket">[</span><a href="/index.php?title=Parser_test&action=edit&section=1" title="Edit section: b">edit</a><span class="mw-editsection-bracket">]</span></span></h1>
628 Heading with line break in nowiki
632 wgFragmentMode=[ 'html5', 'legacy' ]
637 <h2><span id="A_B.0AC"></span><span class="mw-headline" id="A_B
639 C</span><span class="mw-editsection"><span class="mw-editsection-bracket">[</span><a href="/index.php?title=Parser_test&action=edit&section=1" title="Edit section: A B C">edit</a><span class="mw-editsection-bracket">]</span></span></h2>
643 C"><span id="A_B.0AC" typeof="mw:FallbackId"></span>A <span typeof="mw:Nowiki">B
650 http://fr.wikipedia.org/wiki/🍺
651 <!-- EasterEgg we love beer, better be able be able to link to it -->
653 <p><a rel="nofollow" class="external free" href="http://fr.wikipedia.org/wiki/🍺">http://fr.wikipedia.org/wiki/🍺</a>
672 *plain''italic''plain
673 *plain''italic''plain''italic''plain
674 *plain'''bold'''plain
675 *plain'''bold'''plain'''bold'''plain
676 *plain''italic''plain'''bold'''plain
677 *plain'''bold'''plain''italic''plain
678 *plain''italic'''bold-italic'''italic''plain
679 *plain'''bold''bold-italic''bold'''plain
680 *plain'''''bold-italic'''italic''plain
681 *plain'''''bold-italic''bold'''plain
682 *plain''italic'''bold-italic'''''plain
683 *plain'''bold''bold-italic'''''plain
684 *plain l'''italic''plain
685 *plain l''''bold''' plain
688 <li>plain<i>italic</i>plain</li>
689 <li>plain<i>italic</i>plain<i>italic</i>plain</li>
690 <li>plain<b>bold</b>plain</li>
691 <li>plain<b>bold</b>plain<b>bold</b>plain</li>
692 <li>plain<i>italic</i>plain<b>bold</b>plain</li>
693 <li>plain<b>bold</b>plain<i>italic</i>plain</li>
694 <li>plain<i>italic<b>bold-italic</b>italic</i>plain</li>
695 <li>plain<b>bold<i>bold-italic</i>bold</b>plain</li>
696 <li>plain<i><b>bold-italic</b>italic</i>plain</li>
697 <li>plain<b><i>bold-italic</i>bold</b>plain</li>
698 <li>plain<i>italic<b>bold-italic</b></i>plain</li>
699 <li>plain<b>bold<i>bold-italic</i></b>plain</li>
700 <li>plain l'<i>italic</i>plain</li>
701 <li>plain l'<b>bold</b> plain</li></ul>
705 # this example taken from the [[simple:Moon]] article (T49326)
707 Italics and possessives (1)
709 obtained by ''[[Lunar Prospector]]'''s gamma-ray spectrometer
711 <p>obtained by <i><a href="/index.php?title=Lunar_Prospector&action=edit&redlink=1" class="new" title="Lunar Prospector (page does not exist)">Lunar Prospector</a>'</i>s gamma-ray spectrometer
715 # this example taken from [[en:Flaming Pie]] (T51926)
717 Italics and possessives (2)
719 '''''Flaming Pie''''' is ... released in 1997. In ''Flaming Pie'''s liner notes
721 <p><i><b>Flaming Pie</b></i> is ... released in 1997. In <i>Flaming Pie'</i>s liner notes
725 # this example taken from [[en:Dictionary]] (T51926)
727 Italics and possessives (3)
729 The first monolingual dictionary written in a Romance language was ''Sebastián Covarrubias''' ''Tesoro de la lengua castellana o española'', published in 1611 in Madrid. In 1612 the first edition of the ''Vocabolario dell'[[Accademia della Crusca]]'', for Italian, was published. In 1690 in Rotterdam was published, posthumously, the ''Dictionnaire Universel''.
731 <p>The first monolingual dictionary written in a Romance language was <i>Sebastián Covarrubias'</i> <i>Tesoro de la lengua castellana o española</i>, published in 1611 in Madrid. In 1612 the first edition of the <i>Vocabolario dell'<a href="/index.php?title=Accademia_della_Crusca&action=edit&redlink=1" class="new" title="Accademia della Crusca (page does not exist)">Accademia della Crusca</a></i>, for Italian, was published. In 1690 in Rotterdam was published, posthumously, the <i>Dictionnaire Universel</i>.
737 ### 2-quote opening sequence tests
740 Italics and bold: 2-quote opening sequence: (2,2)
749 Italics and bold: 2-quote opening sequence: (2,3)
758 Italics and bold: 2-quote opening sequence: (2,4)
768 # same html as previous, but wikitext adjusted to match parsoid html2wt
770 Italics and bold: 2-quote opening sequence: (2,4) w/ nowiki
772 ''foo<nowiki>''</nowiki>''
778 # The PHP parser strips the empty tags out for giggles; parsoid doesn't.
780 Italics and bold: 2-quote opening sequence: (2,5)
793 # same html as previous, but wikitext adjusted to match parsoid html2wt
795 Italics and bold: 2-quote opening sequence: (2,5+3) w/ nowiki
797 ''foo'''''<nowiki/>'''
808 ### 3-quote opening sequence tests
812 Italics and bold: 3-quote opening sequence: (3,2)
821 Italics and bold: 3-quote opening sequence: (3,3)
830 Italics and bold: 3-quote opening sequence: (3,4)
838 # The PHP parser strips the empty tags out for giggles; parsoid doesn't.
840 Italics and bold: 3-quote opening sequence: (3,5)
853 # same html as previous, but wikitext adjusted to match parsoid html2wt
855 Italics and bold: 3-quote opening sequence: (3,5+2) w/ nowiki
857 '''foo'''''<nowiki/>''
868 ### 4-quote opening sequence tests
872 Italics and bold: 4-quote opening sequence: (4,2)
882 # same html as previous, but wikitext adjusted to match parsoid html2wt
884 Italics and bold: 4-quote opening sequence: (4,2) w/ nowiki
886 <nowiki>''</nowiki>''foo''
893 Italics and bold: 4-quote opening sequence: (4,3)
902 Italics and bold: 4-quote opening sequence: (4,4)
912 # same html as previous, but wikitext adjusted to match parsoid html2wt
914 Italics and bold: 4-quote opening sequence: (4,4) w/ nowiki
922 # The PHP parser strips the empty tags out for giggles; parsoid doesn't.
924 Italics and bold: 4-quote opening sequence: (4,5)
933 <p>'<b>foo</b><i></i>
937 # same html as previous, but wikitext adjusted to match parsoid html2wt
939 Italics and bold: 4-quote opening sequence: (4,5+2) w/ nowiki
941 '<nowiki/>'''foo'''''<nowiki/>''
946 <p>'<b>foo</b><i></i>
952 ### 5-quote opening sequence tests
956 Italics and bold: 5-quote opening sequence: (5,2)
966 # same html as previous, but wikitext adjusted to match parsoid html2wt
968 Italics and bold: 5-quote opening sequence: (5,2+3)
977 Italics and bold: 5-quote opening sequence: (5,3)
987 # same html as previous, but wikitext adjusted to match parsoid html2wt
989 Italics and bold: 5-quote opening sequence: (5,3+2)
998 Italics and bold: 5-quote opening sequence: (5,4)
1004 <p><i><b>foo'</b></i>
1009 Italics and bold: 5-quote opening sequence: (5,5)
1013 <p><i><b>foo</b></i>
1018 Italics and bold: 5-quote opening sequence: (5,6)
1022 <p><i><b>foo'</b></i>
1027 ### multiple quote sequences in a line
1031 Italics and bold: multiple quote sequences: (2,4,2)
1037 <p><i>foo'<b>bar</b></i>
1041 # same html as previous, but wikitext adjusted to match parsoid html2wt
1043 Italics and bold: multiple quote sequences: (2,4,2+3) w/ nowiki
1045 ''foo'<nowiki/>'''bar'''''
1047 <p><i>foo'<b>bar</b></i>
1052 Italics and bold: multiple quote sequences: (2,4,3)
1058 <p><i>foo'<b>bar</b></i>
1062 # same html as previous, but wikitext adjusted to match parsoid html2wt
1064 Italics and bold: multiple quote sequences: (2,4,3+2) w/ nowiki
1066 ''foo'<nowiki/>'''bar'''''
1068 <p><i>foo'<b>bar</b></i>
1073 Italics and bold: multiple quote sequences: (2,4,4)
1079 <p><i>foo'<b>bar'</b></i>
1083 # same html as previous, but wikitext adjusted to match parsoid html2wt
1085 Italics and bold: multiple quote sequences: (2,4,4+2) w/ nowiki
1087 ''foo'<nowiki/>'''bar'<nowiki/>'''''
1089 <p><i>foo'<b>bar'</b></i>
1093 # The PHP parser strips the empty tags out for giggles; parsoid doesn't.
1095 Italics and bold: multiple quote sequences: (3,4,2)
1104 <p><b>foo'</b>bar<i></i>
1108 # same html as previous, but wikitext adjusted to match parsoid html2wt
1110 Italics and bold: multiple quote sequences: (3,4,2+2) w/ nowiki
1112 '''foo''''bar''<nowiki/>''
1117 <p><b>foo'</b>bar<i></i>
1121 # The PHP parser strips the empty tags out for giggles; parsoid doesn't.
1123 Italics and bold: multiple quote sequences: (3,4,3)
1132 <p><b>foo'</b>bar<b></b>
1136 # same html as previous, but wikitext adjusted to match parsoid html2wt
1138 Italics and bold: multiple quote sequences: (3,4,3+3) w/ nowiki
1140 '''foo''''bar'''<nowiki/>'''
1145 <p><b>foo'</b>bar<b></b>
1150 ### other quote tests
1153 Italics and bold: other quote tests: (2,3,5)
1155 ''this is about '''foo's family'''''
1157 <p><i>this is about <b>foo's family</b></i>
1163 Italics and bold: other quote tests: (2,(3,3),2)
1165 ''this is about '''foo's''' family''
1167 <p><i>this is about <b>foo's</b> family</i>
1173 Italics and bold: other quote tests: (3,2,3,2)
1177 '''this is about ''foo'''s family''
1179 <p><b>this is about <i>foo</i></b><i>s family</i>
1184 # same html as previous, but wikitext adjusted to match parsoid html2wt
1186 Italics and bold: other quote tests: (3,2,3+2+2,2)
1188 '''this is about ''foo'''''<nowiki/>''s family''
1190 <p><b>this is about <i>foo</i></b><i>s family</i>
1196 Italics and bold: other quote tests: (3,2,3,3)
1198 '''this is about ''foo'''s family'''
1200 <p>'<i>this is about </i>foo<b>s family</b>
1206 Italics and bold: other quote tests: (3,(2,2),3)
1208 '''this is about ''foo's'' family'''
1210 <p><b>this is about <i>foo's</i> family</b>
1216 Italicized possessive
1218 The ''[[Main Page]]'''s talk page.
1220 <p>The <i><a href="/wiki/Main_Page" title="Main Page">Main Page</a>'</i>s talk page.
1223 <p>The <i><a rel="mw:WikiLink" href="./Main_Page" title="Main Page">Main Page</a>'</i>s talk page.</p>
1227 Quote balancing context should be restricted to td/th cells on the same wikitext line
1229 parsoid=wt2html,wt2wt
1243 </td></tr></tbody></table>
1251 Non-html5 tags should be accepted
1253 <center>''foo''</center>
1255 <font>''foo''</font>
1256 <strike>''foo''</strike>
1259 <center><i>foo</i></center>
1260 <p><big><i>foo</i></big>
1261 <font><i>foo</i></font>
1262 <strike><i>foo</i></strike>
1268 <wbr> is valid wikitext (T54468)
1276 # <strike> is HTML4, <s> is HTML4/5.
1278 <s> or <strike> for strikethrough
1280 <strike>strike</strike>
1284 <p><strike>strike</strike>
1292 Text-level semantic html elements in wikitext
1295 <strong>text</strong>
1311 <ruby><rb>明日</rb><rp>(</rp><rt>Ashita</rt><rp> </rp><rtc>あした</rtc><rp>)</rp></ruby>
1318 <strong>text</strong>
1334 <ruby><rb>明日</rb><rp>(</rp><rt>Ashita</rt><rp> </rp><rtc>あした</rtc><rp>)</rp></ruby>
1342 # test cases taken from
1343 # https://www.w3.org/TR/html5/text-level-semantics.html#the-ruby-element
1345 Ruby markup (W3C-style)
1347 ;Mono-ruby for individual base characters
1348 :<ruby>日<rt>に</rt>本<rt>ほん</rt>語<rt>ご</rt></ruby>
1350 :<ruby>今日<rt>きょう</rt></ruby>
1352 :<ruby>法<rb>華</rb><rb>経</rb><rt>ほ</rt><rt>け</rt><rt>きょう</rt></ruby>
1354 :<ruby>東<rb>京</rb><rp>(</rp><rt>とう</rt><rt>きょう</rt><rp>)</rp></ruby>
1356 :<ruby><rb>旧</rb><rb>金</rb><rb>山</rb><rt>jiù</rt><rt>jīn</rt><rt>shān</rt><rtc>San Francisco</rtc></ruby>
1359 <rb>♥</rb><rtc><rt>Heart</rt></rtc><rtc lang="fr"><rt>Cœur</rt></rtc>
1360 <rb>☘</rb><rtc><rt>Shamrock</rt></rtc><rtc lang="fr"><rt>Trèfle</rt></rtc>
1361 <rb>✶</rb><rtc><rt>Star</rt></rtc><rtc lang="fr"><rt>Étoile</rt></rtc>
1364 <dl><dt>Mono-ruby for individual base characters</dt>
1365 <dd><ruby>日<rt>に</rt>本<rt>ほん</rt>語<rt>ご</rt></ruby></dd>
1367 <dd><ruby>今日<rt>きょう</rt></ruby></dd>
1368 <dt>Jukugo ruby</dt>
1369 <dd><ruby>法<rb>華</rb><rb>経</rb><rt>ほ</rt><rt>け</rt><rt>きょう</rt></ruby></dd>
1370 <dt>Inline ruby</dt>
1371 <dd><ruby>東<rb>京</rb><rp>(</rp><rt>とう</rt><rt>きょう</rt><rp>)</rp></ruby></dd>
1372 <dt>Double-sided ruby</dt>
1373 <dd><ruby><rb>旧</rb><rb>金</rb><rb>山</rb><rt>jiù</rt><rt>jīn</rt><rt>shān</rt><rtc>San Francisco</rtc></ruby></dd></dl>
1375 <rb>♥</rb><rtc><rt>Heart</rt></rtc><rtc lang="fr"><rt>Cœur</rt></rtc>
1376 <rb>☘</rb><rtc><rt>Shamrock</rt></rtc><rtc lang="fr"><rt>Trèfle</rt></rtc>
1377 <rb>✶</rb><rtc><rt>Star</rt></rtc><rtc lang="fr"><rt>Étoile</rt></rtc>
1382 # The next two test different paths in the sanitizer.
1384 Non-word characters don't terminate tag names (T19663, T42670, T54022)
1386 <blockquote|>a</blockquote>
1388 <b→> doesn't terminate </b→>
1390 <bä> doesn't terminate </bä>
1392 <boo> doesn't terminate </boo>
1394 <s.foo> doesn't terminate </s.foo>
1398 <p><blockquote|>a</blockquote>
1399 </p><p><b→> doesn't terminate </b→>
1400 </p><p><bä> doesn't terminate </bä>
1401 </p><p><boo> doesn't terminate </boo>
1402 </p><p><s.foo> doesn't terminate </s.foo>
1403 </p><p><sub-ID#1>
1408 Non-word characters don't terminate tag names
1410 <blockquote|>a</blockquote>
1412 <b→> doesn't terminate </b→>
1414 <bä> doesn't terminate </bä>
1416 <boo> doesn't terminate </boo>
1418 <s.foo> doesn't terminate </s.foo>
1422 <p><blockquote|>a
1423 </p><p><b→> doesn't terminate </b→>
1424 </p><p><bä> doesn't terminate </bä>
1425 </p><p><boo> doesn't terminate </boo>
1426 </p><p><s.foo> doesn't terminate </s.foo>
1427 </p><p><sub-ID#1>
1432 ### See tests/parser/parserTestsParserHook.php for the <tåg> extension)
1433 ### This checks that HTML5 tags (with non-word characters in the tag
1434 ### name) make it safely through the parser -- the Sanitizer will
1435 ### munge them later, as it should.
1438 Non-word characters are valid in extension tags (T19663)
1449 <pre typeof="mw:Extension/tåg" data-mw='{"name":"tåg","attrs":{},"body":{"extsrc":"tåg"}}' data-parsoid='{}' about="#mwt2"></pre>
1453 Isolated close tags should be treated as literal text (T54760)
1461 <p class="mw-empty-elt">
1462 </p><p><s.foo>s
1467 ### Special characters
1471 Bare pipe character (T54363)
1480 Bare pipe character from a template (T54363)
1489 ### <nowiki> test cases
1493 <nowiki> unordered list
1495 <nowiki>* This is not an unordered list item.</nowiki>
1497 <p>* This is not an unordered list item.
1500 <p><span typeof="mw:Nowiki">* This is not an unordered list item.</span></p>
1506 <nowiki>Lorem ipsum dolor
1514 <p>Lorem ipsum dolor
1523 <p><span typeof="mw:Nowiki">Lorem ipsum dolor
1533 Don't parse <nowiki><span class="error"></nowiki> (T149622)
1535 <nowiki><span class="error"></nowiki>
1537 <p><span class="error">
1540 <p><span typeof="mw:Nowiki"><span class="error"></span></p>
1546 :There is not nowiki.
1547 :There is <nowiki>nowiki</nowiki>.
1549 #There is not nowiki.
1550 #There is <nowiki>nowiki</nowiki>.
1552 *There is not nowiki.
1553 *There is <nowiki>nowiki</nowiki>.
1555 <dl><dd>There is not nowiki.</dd>
1556 <dd>There is nowiki.</dd></dl>
1557 <ol><li>There is not nowiki.</li>
1558 <li>There is nowiki.</li></ol>
1559 <ul><li>There is not nowiki.</li>
1560 <li>There is nowiki.</li></ul>
1563 <dl><dd data-parsoid='{}'>There is not nowiki.</dd>
1564 <dd data-parsoid='{}'>There is <span typeof="mw:Nowiki">nowiki</span>.</dd></dl>
1566 <ol><li data-parsoid='{}'>There is not nowiki.</li>
1567 <li data-parsoid='{}'>There is <span typeof="mw:Nowiki">nowiki</span>.</li></ol>
1569 <ul><li data-parsoid='{}'>There is not nowiki.</li>
1570 <li data-parsoid='{}'>There is <span typeof="mw:Nowiki">nowiki</span>.</li></ul>
1574 Entities inside <nowiki>
1576 <nowiki><</nowiki>
1581 <p><span typeof="mw:Nowiki"><span typeof="mw:Entity" data-parsoid='{"src":"&lt;","srcContent":"<"}'><</span></span></p>
1585 Entities inside template parameters
1592 <p><span typeof="mw:Transclusion mw:Entity" data-mw='{"parts":[{"template":{"target":{"wt":"echo","href":"./Template:Echo"},"params":{"1":{"wt":"&ndash;"}},"i":0}}]}'>–</span></p>
1596 Properly escape nowiki when combined with other wiki markup
1600 <p>* </nowiki> tag</p>
1602 <nowiki>*</nowiki> <nowiki></nowiki></nowiki> tag
1606 T93824: Put escaped HTML tags inside nowiki
1610 <p><h2>foo</h2></p>
1612 <nowiki><h2>foo</h2></nowiki>
1616 T71950: 1. Put nowiki as close to cause as possible, even with non-quote escapable chars
1620 <p>This text: L'<a rel="mw:WikiLink" href="./Foo">Foo</a>
1621 This text: L''<a rel="mw:WikiLink" href="./Foo">Foo</a>
1622 This text: L'''<a rel="mw:WikiLink" href="./Foo">Foo</a>''</p>
1624 This text: L'[[Foo]]
1625 This text: L<nowiki>''</nowiki>[[Foo]]
1626 This text: L<nowiki>'''</nowiki>[[Foo]]<nowiki>''</nowiki>
1629 # This test fails because wikitext whitespace is not normalized before comparing.
1631 T71950: 2. Put nowiki as close to cause as possible, after ' :'
1635 <p>This text : L''<a rel="mw:WikiLink" href="./Foo">Foo</a>
1638 This text : L<nowiki>''</nowiki>[[Foo]]
1641 # This test and the next one are html2wt only as they test that incorrect wikitext
1642 # passed in template arguments gets escaped or wrapped in nowikis where required.
1644 T71482: Use {{!}} instead of nowiki for single pipe in template argument
1648 <p><span typeof="mw:Transclusion" data-mw="{"parts":[{"template":{"target":{"wt":"echo","href":"./Template:Echo"},"params":{"1":{"wt":"foo|bar"}},"i":0}}]}" about="#mwt1"></span>
1649 <span typeof="mw:Transclusion" data-mw="{"parts":[{"template":{"target":{"wt":"echo","href":"./Template:Echo"},"params":{"1":{"wt":"foo|bar |[["}},"i":0}}]}" about="#mwt2"></p>
1651 {{echo|foo{{!}}bar}}
1652 {{echo|<nowiki>foo|bar |[[</nowiki>}}
1656 T53961: Output correct nowikis in template arguments
1660 <p><span typeof="mw:Transclusion" data-mw="{"parts":[{"template":{"target":{"wt":"echo","href":"./Template:Echo"},"params":{"1":{"wt":"a [ b"}},"i":0}}]}" about="#mwt1"></span>
1661 <span typeof="mw:Transclusion" data-mw="{"parts":[{"template":{"target":{"wt":"echo","href":"./Template:Echo"},"params":{"1":{"wt":"a }} b"}},"i":0}}]}" about="#mwt2"></span>
1662 <span typeof="mw:Transclusion" data-mw="{"parts":[{"template":{"target":{"wt":"echo","href":"./Template:Echo"},"params":{"1":{"wt":"a [[ b"}},"i":0}}]}" about="#mwt3"></span>
1663 <span typeof="mw:Transclusion" data-mw="{"parts":[{"template":{"target":{"wt":"echo","href":"./Template:Echo"},"params":{"1":{"wt":"a | {{ ]]"}},"i":0}}]}" about="#mwt4"></span>
1664 <span typeof="mw:Transclusion" data-mw="{"parts":[{"template":{"target":{"wt":"echo","href":"./Template:Echo"},"params":{"1":{"wt":"a }"}},"i":0}}]}" about="#mwt5"></span></p>
1667 {{echo|<nowiki>a }} b</nowiki>}}
1668 {{echo|<nowiki>a [[ b</nowiki>}}
1669 {{echo|<nowiki>a | {{ ]]</nowiki>}}
1670 {{echo|a <nowiki>}</nowiki>}}
1674 Cases where "!!" needs nowiki protection
1679 <tr><th>this needs protection !! here</th></tr>
1683 <tr><th>this does not need
1684 protection !! here</th></tr>
1688 !<nowiki>this needs protection !! here</nowiki>
1701 Comments and Indent-Pre
1703 <!-- comment 1 --> asdf
1705 <!-- comment 1 --> asdf
1708 <!-- comment 1 --> asdf
1709 <!-- comment 2 -->xyz
1711 <!-- comment 1 --> asdf
1712 <!-- comment 2 --> xyz
1768 asdf<!-- comment 1 -->jkl
1778 <!-- foo --> b <!-- bar -->
1792 <!-- returns a single newline, not nothing, since the newline after > is not stripped -->
1798 Comment semantics and delimiters
1800 <!-- --><!----><!-----><!------>
1804 <!-- --><!----><!-----><!------>
1808 Comment semantics and delimiters, redux
1810 <!-- In SGML every "foo" here would actually show up in the text -- foo -- bar
1811 -- foo -- funky huh? ... -->
1815 <!-- In SGML every "foo" here would actually show up in the text -- foo -- bar
1816 -- foo -- funky huh? ... -->
1820 Comment semantics and delimiters: directors cut
1822 <!-- ... However we like to keep things simple and somewhat XML-ish so we eat
1823 everything starting with < followed by !-- until the first -- and > we see,
1824 that wouldn't be valid XML however, since in XML -- has to terminate a comment
1830 <!-- ... However we like to keep things simple and somewhat XML-ish so we eat
1831 everything starting with < followed by !-- until the first -- and > we see,
1832 that wouldn't be valid XML however, since in XML -- has to terminate a comment
1837 Comment semantics: nesting
1839 <!--<!-- no, we're not going to do anything fancy here -->-->
1844 <!--<!-- no, we're not going to do anything fancy here --><p>--></p>
1847 # Parsoid closes the unclosed comment, even if it means a slight
1850 Comment semantics: unclosed comment at end
1852 parsoid=wt2html,html2html
1854 <!--This comment will run out to the end of the document
1858 <!--This comment will run out to the end of the document-->
1862 Comment semantics: normalize comments to play nice with XML and browsers
1864 <!-- Browsers --!> think this is closed -->
1865 <!--> This would normally be text -->
1866 <!---> As would this -->
1867 <!-- XML doesn't like trailing dashes -------->
1868 <!-- Nor doubled hyphens -- anywhere in the data -->
1869 But this is not a comment.
1871 <p>But this is not a comment.
1874 <!-- Browsers --!> think this is closed -->
1875 <!--> This would normally be text -->
1876 <!---> As would this -->
1877 <!-- XML doesn't like trailing dashes -------->
1878 <!-- Nor doubled hyphens -- anywhere in the data -->
1879 <p>But this is not a comment.</p>
1883 Comment semantics: round-trip even text which contains encoded -->
1885 <!-- hello & goodbye - > --> --&gt; --&xx -->
1887 <!-- hello & goodbye - > --> --&gt; --&xx -->
1891 Comment in template title
1900 Comment on its own line post-expand
1912 Comment on its own line post-expand with non-significant whitespace
1924 post-expand include size being exceeded
1928 {{echo3|1234567890}}
1930 <p><a href="/wiki/Template:Echo3" title="Template:Echo3">Template:Echo3</a><!-- WARNING: template omitted, post-expand include size too large -->
1935 max template depth being reached
1939 {{echo with depth|too deep!}}
1941 <p><span class="error">Template recursion depth limit exceeded (1)</span>
1946 multiple templates that are redirects
1957 Multiple comments should still parse as SOL-transparent
1959 parsoid=wt2html,wt2wt
1962 <!--c2--><!--c3--><!--c4-->*b
1971 <!--c2--><!--c3--><!--c4-->
1977 ## Make sure ">" gets escaped in comments to avoid XSS
1979 IE conditional comments
1982 <script>alert('hi');</script>
1985 <!--[if lt IE 9]>
1986 <script>alert('hi');</script>
1991 ### paragraph wrapping tests
2007 Block tag on one line (<div>)
2017 <p>a </p><div>foo</div>
2023 No p-wrappable content
2025 parsoid=wt2html,html2html
2027 <span><div>x</div></span>
2028 <span><s><div>x</div></s></span>
2029 <small><em></em></small><span><s><div>x</div></s></span>
2031 <span><div>x</div></span>
2032 <span><s><div>x</div></s></span>
2033 <p><small><em></em></small></p><span><s><div>x</div></s></span>
2036 # T177612: Parsoid-only test
2038 Transclusion meta tags shouldn't trip Parsoid's useless p-wrapper stripping code
2040 {{echo|<span><div>x</div></span>}}
2043 <span about="#mwt1" typeof="mw:Transclusion" data-parsoid='{"stx":"html","pi":[[{"k":"1"}]]}' data-mw='{"parts":[{"template":{"target":{"wt":"echo","href":"./Template:Echo"},"params":{"1":{"wt":"<span><div>x</div></span>"}},"i":0}}]}'><div>x</div></span>
2048 Block tag on one line (<blockquote>)
2050 a <blockquote>foo</blockquote>
2054 a <blockquote>foo</blockquote>
2058 <p>a </p><blockquote><p>foo</p></blockquote>
2064 Block tag on both lines (<div>)
2074 <p>a </p><div>foo</div><p>
2075 b </p><div>foo</div>
2079 Block tag on both lines (<blockquote>)
2081 a <blockquote>foo</blockquote>
2083 b <blockquote>foo</blockquote>
2085 a <blockquote>foo</blockquote>
2086 b <blockquote>foo</blockquote>
2089 <p>a </p><blockquote><p>foo</p></blockquote><p>
2090 b </p><blockquote><p>foo</p></blockquote>
2094 Multiple lines without block tags
2115 x </p><div>foo</div><p> z
2120 Empty lines between lines with block tags
2155 </p><div>b</div><p>d
2160 <div data-parsoid='{"stx":"html"}'></div>
2163 <div data-parsoid='{"stx":"html"}'></div><p>a</p>
2166 <div data-parsoid='{"stx":"html"}'>a</div><p>b</p>
2168 <div data-parsoid='{"stx":"html"}'>b</div><p>d</p>
2171 <div data-parsoid='{"stx":"html"}'>e</div>
2175 Unclosed HTML p-tags should be handled properly
2182 <div><p>foo</p></div>
2187 <div data-parsoid='{"stx":"html"}'><p data-parsoid='{"stx":"html", "autoInsertedEnd":true}'>foo</p></div>
2192 ## SSS FIXME: I can come up with other scenarios where this doesn't work because
2193 ## of eager output of buffered tokens in the p-wrapper. But, I'm going to ignore
2196 1. P-wrapping should leave sol-transparent tags outside p-tags where possible
2200 a [[Category:A1]] [[Category:A2]]
2205 <link rel="mw:PageProp/Category" href="./Category:A1"/> <link rel="mw:PageProp/Category" href="./Category:A2"/> <link rel="mw:PageProp/Category" href="./Category:A3"/> <link rel="mw:PageProp/Category" href="./Category:A4"/>
2209 2. P-wrapping should leave sol-transparent tags outside p-tags where possible
2215 <link rel="mw:PageProp/Category" href="./Category:A1"/><p>a</p>
2219 No paragraph necessary for SOL transparent template
2221 <span><div>foo</div></span>
2224 <span><div>foo</div></span>
2225 {{echo|[[Category:Foo]]}}
2227 <span><div>foo</div></span>
2228 <span><div>foo</div></span>
2231 <span data-parsoid='{"stx":"html"}'><div data-parsoid='{"stx":"html"}'>foo</div></span>
2232 <link rel="mw:PageProp/Category" href="./Category:Foo"/>
2234 <span data-parsoid='{"stx":"html"}'><div data-parsoid='{"stx":"html"}'>foo</div></span>
2235 <link rel="mw:PageProp/Category" href="./Category:Foo" about="#mwt1" typeof="mw:Transclusion" data-mw='{"parts":[{"template":{"target":{"wt":"echo","href":"./Template:Echo"},"params":{"1":{"wt":"[[Category:Foo]]"}},"i":0}}]}'/>
2239 Avoid expanding multiline sol transparent template ranges unnecessarily
2257 <br about="#mwt1" typeof="mw:Transclusion" data-parsoid='{}' data-mw='{"parts":[{"template":{"target":{"wt":"echo","href":"./Template:Echo"},"params":{"1":{"wt":"<br/>\n"}},"i":0}}]}'/><span about="#mwt1">
2260 <link rel="mw:PageProp/Category" href="./Category:Ho" />
2264 Paragraph wrapping following unclosed table
2266 parsoid=wt2html,html2html
2287 </td></tr></tbody></table>
2293 <table data-parsoid='{"autoInsertedEnd":true}'>
2294 <tbody><tr class="mw-empty-elt" data-parsoid='{"startTagSrc":"|-"}'></tr>
2296 </tbody></table><table>
2297 <tbody><tr data-parsoid='{"autoInsertedStart":true}'><td>x</td></tr>
2308 Paragraph wrapping suppressed in html p
2310 parsoid=wt2html,html2html
2330 <p data-parsoid='{"stx":"html"}'>
2341 Dangling table row doesn't prevent p-wrapping
2343 parsoid=wt2html,html2html
2351 <tbody><tr><td>hi</td></tr>
2352 <tr class="mw-empty-elt"></tr>
2353 </tbody></table><p> ho</p>
2357 ### Preformatted text
2367 And a [[Main Page|link]]
2373 And a <a href="/wiki/Main_Page" title="Main Page">link</a>
2378 Tabs don't trigger preformatted text
2382 This is preformatted text.
2388 <pre>This is preformatted text.
2393 preformatted text.</p>
2394 <pre>This is preformatted text.
2399 Space before tab needs nowiki pre protection
2405 <nowiki> </nowiki> a
2409 Ident preformatting with inline content
2420 <pre> with <nowiki> inside (compatibility with 1.6 and earlier)
2437 Regression with preformatted in <center>
2451 T54763: Preformatted in <blockquote>
2457 indented cell (no pre-wrapping!)
2467 <p> indented cell (no pre-wrapping!)
2475 T53086: Double newlines in blockquotes should be turned into paragraphs
2492 T17491: <ins>/<del> in blockquote
2495 Foo <del>bar</del> <ins>baz</ins> quux
2499 <p>Foo <del>bar</del> <ins>baz</ins> quux
2505 <p>Foo <del>bar</del> <ins>baz</ins> quux
2511 T17491: <ins>/<del> in blockquote (2)
2513 <blockquote>Foo <del>bar</del> <ins>baz</ins> quux
2516 <blockquote>Foo <del>bar</del> <ins>baz</ins> quux
2520 <blockquote><p>Foo <del>bar</del> <ins>baz</ins> quux
2525 <pre> with attributes (T5202)
2527 <pre style="background: blue; color:white">Bluescreen of WikiDeath</pre>
2529 <pre style="background: blue; color:white">Bluescreen of WikiDeath</pre>
2534 <pre> with width attribute (T5202)
2536 <pre width="8">Narrow screen goodies</pre>
2538 <pre width="8">Narrow screen goodies</pre>
2543 <pre> with forbidden attribute (T5202)
2545 <pre width="8" onmouseover="alert(document.cookie)">Narrow screen goodies</pre>
2547 <pre width="8">Narrow screen goodies</pre>
2552 Entities inside <pre>
2561 <pre> with forbidden attribute values (T5202)
2563 <pre width="8" style="border-width: expression(alert(document.cookie))">Narrow screen goodies</pre>
2565 <pre width="8" style="/* insecure input */">Narrow screen goodies</pre>
2570 <nowiki> inside <pre> (T15238)
2578 <pre><nowiki><nowiki></nowiki>Foo<nowiki></nowiki></nowiki></pre>
2586 <pre><nowiki>Foo</nowiki></pre>
2591 <nowiki> inside of #tag:pre
2593 {{#tag:pre|Foo <nowiki>→bar</nowiki>}}
2595 <pre>Foo →bar</pre>
2598 <pre about="#mwt1" typeof="mw:Transclusion" data-parsoid='{"pi":[[{"k":"1"}]]}' data-mw='{"parts":[{"template":{"target":{"wt":"#tag:pre","function":"tag"},"params":{"1":{"wt":"Foo <nowiki>&rarr;bar</nowiki>"}},"i":0}}]}'>Foo <span typeof="mw:Entity">→</span>bar</pre>
2601 ## Don't expect this to rt, Parsoid drops the unmatched closing pre tags that
2602 ## aren't enclosed in nowikis.
2604 <nowiki> and <pre> preference (first one wins)
2635 <pre typeof="mw:Extension/pre" about="#mwt2" data-mw='{"name":"pre","attrs":{},"body":{"extsrc":"\n<nowiki>\n"}}'><nowiki>
2640 <p><span typeof="mw:Nowiki">
2648 </pre> inside nowiki
2650 <nowiki></pre></nowiki>
2657 Empty pre; pre inside other HTML tags (T56946)
2674 <div data-parsoid='{"stx":"html"}'><pre typeof="mw:Extension/pre" about="#mwt2" data-parsoid='{"stx":"html"}' data-mw='{"name":"pre","attrs":{},"body":{"extsrc":"\nfoo\n"}}'>foo
2676 <pre typeof="mw:Extension/pre" about="#mwt4" data-parsoid='{"stx":"html"}' data-mw='{"name":"pre","attrs":{},"body":{"extsrc":""}}'></pre>
2680 HTML pre followed by indent-pre
2693 <p><pre>foo</pre></p>
2695 <p class="mw-empty-elt"></p><pre>foo</pre><p class="mw-empty-elt"></p>
2697 <p class='mw-empty-elt' data-parsoid='{"stx":"html","autoInsertedEnd":true}'></p><pre typeof="mw:Extension/pre" about="#mwt2" data-parsoid='{"stx":"html"}' data-mw='{"name":"pre","attrs":{},"body":{"extsrc":"foo"}}'>foo</pre><p class='mw-empty-elt' data-parsoid='{"autoInsertedStart":true,"stx":"html"}'></p>
2701 Templates: Indent-Pre: 1a. Templates that break a line should suppress <pre>
2709 Templates: Indent-Pre: 1b. Templates that break a line should suppress <pre>
2719 Templates: Indent-Pre: 1c: Wrapping should be based on expanded content
2731 Templates: Indent-Pre: 1d: Wrapping should be based on expanded content
2752 Templates: Indent-Pre: 1e. Wrapping should be based on expanded content
2756 {{echo| foo}}{{echo| bar}}
2761 {{echo|<!--cmt--> foo}}
2763 <!--cmt-->{{echo| foo}}
2765 {{echo|{{echo| }}bar}}
2783 Templates: Indent-Pre: 1f: Wrapping should be based on expanded content
2819 ## Hmm, should Parsoid rt this?
2821 Pres with newline attributes
2823 parsoid=wt2html,html2html
2828 <pre class="one two">hi</pre>
2831 <pre typeof="mw:Extension/pre" about="#mwt2" class="one two" data-mw='{"name":"pre","attrs":{"class":"one two"},"body":{"extsrc":"hi"}}'>hi</pre>
2835 Things that look like <pre> tags aren't treated as such
2837 Barack Obama <President> of the United States
2838 <President></President>
2840 <p>Barack Obama <President> of the United States
2841 <President></President>
2845 ## Remex doesn't account for fostered content.
2846 ## The difference between Parsoid and the PHP parser can be attributed to core
2847 ## commit 674e8388cba and 710618f89af in Parsoid's repo. Parsoid doesn't
2848 ## tokenize unmatched extension tags that shadow html tags as strings to ease
2849 ## an escaping mechanism. See the comment in `maybeExtensionTag`.
2851 Handle broken pre-like tags (T66025)
2855 {{echo|<pre <pre>x</pre>}}
2857 <table><pre </table>
2860 <table><pre </table>
2864 <pre <table></table>
2866 <pre typeof="mw:Transclusion mw:Extension/pre" about="#mwt2" data-parsoid='{"stx":"html","a":{"<pre":null},"sa":{"<pre":""},"pi":[[{"k":"1"}]]}' data-mw='{"parts":[{"template":{"target":{"wt":"echo","href":"./Template:Echo"},"params":{"1":{"wt":"<pre <pre>x</pre>"}},"i":0}}]}'>x</pre>
2868 <pre data-parsoid='{"stx":"html","src":"<pre </table>","tagWidths":[13,0],"a":{"<":null,"table":null},"sa":{"<":"","table":""},"fostered":true,"autoInsertedEnd":true}'></pre><table data-parsoid='{"stx":"html","autoInsertedEnd":true}'></table>
2871 ## Similar to the above, but shows the difference between extension and html tags
2873 Less than in attribute position
2880 <div </p><div>123</div>
2882 <pre typeof="mw:Extension/pre" about="#mwt2" data-mw='{"name":"pre","attrs":{"<pre":""},"body":{"extsrc":"123"}}'>123</pre><p>
2884 <div </p><div>123</div>
2888 Parsoid: handle pre with space after attribute
2892 <pre style="width:50%;" >{{echo|foo}}</pre>
2894 <pre style="width:50%;">{{echo|foo}}</pre>
2897 <pre typeof="mw:Extension/pre" about="#mwt2" style="width:50%;" data-mw='{"name":"pre","attrs":{"style":"width:50%;"},"body":{"extsrc":"{{echo|foo}}"}}'>{{echo|foo}}</pre>
2908 <pre typeof="mw:Extension/pre" about="#mwt2" data-mw='{"name":"pre","attrs":{}}'></pre>
2912 Parsoid: Don't paragraph-wrap fosterable content even if table syntax is unbalanced
2940 #--------------------------------------------------------------------
2941 # Transclusion parameter whitespace stripping tests
2942 # Behavior is different for positional and named parameters
2943 #--------------------------------------------------------------------
2945 Templates: Strip leading and trailing whitespace from named-param values
2949 {{echo|1= {{echo|b}} }}
2967 Templates: Don't strip whitespace from positional-param values
2971 {{echo|{{echo|b}} }}
3011 Templates: Don't recognize targets split by newlines
3027 Templates: Recognize targets when newlines and comments don't split the target
3032 <!--X--> ech<!--X-->o<!--X-->
3040 <p typeof="mw:Transclusion" data-mw='{"parts":[{"template":{"target":{"wt":"ech<!--X-->o<!--X--> \n <!--X--> <!--X-->\n\n ","href":"./Template:Echo"},"params":{"1":{"wt":"foo"}},"i":0}}]}'>foo</p>
3044 Templates: Handle empty comment-and-ws-only lines correctly
3047 <!--should be ignored-->
3048 <!--should be ignored as well-->
3055 <p typeof="mw:Transclusion" data-mw='{"parts":[{"template":{"target":{"wt":"echo","href":"./Template:Echo"},"params":{"1":{"wt":"foo\n<!--should be ignored-->\n <!--should be ignored as well-->\nbar"}},"i":0}}]}'>foo <!--should be ignored--> <!--should be ignored as well--> bar</p>
3059 Templates: Handle comments in the target
3062 <!-- should be ignored -->
3066 <!-- should be ignored and spaces on next line should not trip us up (T147742) -->
3069 {{echo<!-- should be ignored -->
3072 {{echo<!-- should be ignored -->|foo}}
3074 {{<!-- should be ignored -->echo|foo}}
3083 <p typeof="mw:Transclusion" data-mw='{"parts":[{"template":{"target":{"wt":"echo\n<!-- should be ignored -->\n","href":"./Template:Echo"},"params":{"1":{"wt":"foo"}},"i":0}}]}'>foo</p>
3085 <p typeof="mw:Transclusion" data-mw='{"parts":[{"template":{"target":{"wt":"echo\n<!-- should be ignored and spaces on next line should not trip us up (T147742) -->\n ","href":"./Template:Echo"},"params":{"1":{"wt":"foo"}},"i":0}}]}'>foo</p>
3087 <p typeof="mw:Transclusion" data-mw='{"parts":[{"template":{"target":{"wt":"echo<!-- should be ignored -->\n","href":"./Template:Echo"},"params":{"1":{"wt":"foo"}},"i":0}}]}'>foo</p>
3089 <p typeof="mw:Transclusion" data-mw='{"parts":[{"template":{"target":{"wt":"echo<!-- should be ignored -->","href":"./Template:Echo"},"params":{"1":{"wt":"foo"}},"i":0}}]}'>foo</p>
3091 <p typeof="mw:Transclusion" data-mw='{"parts":[{"template":{"target":{"wt":"echo","href":"./Template:Echo"},"params":{"1":{"wt":"foo"}},"i":0}}]}'>foo</p>
3095 Templates: Handle comments in parameter names (T69657)
3098 <!-- should be ignored -->
3102 <!-- should be ignored -->
3105 {{echo|1<!-- should be ignored -->=foo}}
3107 {{echo|<!-- should be ignored -->1=foo}}
3115 <p typeof="mw:Transclusion" data-mw='{"parts":[{"template":{"target":{"wt":"echo","href":"./Template:Echo"},"params":{"1":{"wt":"foo","key":{"wt":"1\n<!-- should be ignored -->"}}},"i":0}}]}'>foo</p>
3117 <p typeof="mw:Transclusion" data-mw='{"parts":[{"template":{"target":{"wt":"echo","href":"./Template:Echo"},"params":{"1":{"wt":"foo","key":{"wt":"<!-- should be ignored -->\n1"}}},"i":0}}]}'>foo</p>
3119 <p typeof="mw:Transclusion" data-mw='{"parts":[{"template":{"target":{"wt":"echo","href":"./Template:Echo"},"params":{"1":{"wt":"foo","key":{"wt":"1<!-- should be ignored -->"}}},"i":0}}]}'>foo</p>
3121 <p typeof="mw:Transclusion" data-mw='{"parts":[{"template":{"target":{"wt":"echo","href":"./Template:Echo"},"params":{"1":{"wt":"foo","key":{"wt":"<!-- should be ignored -->1"}}},"i":0}}]}'>foo</p>
3125 Templates: Other wikitext in parameter names (T69657)
3132 <p typeof="mw:Transclusion" data-mw='{"parts":[{"template":{"target":{"wt":"echo","href":"./Template:Echo"},"params":{"''1''":{"wt":"foo"}},"i":0}}]}'>{{{1}}}</p>
3136 Templates: With colons
3140 <p>Template with colon
3143 <p about="#mwt1" typeof="mw:Transclusion" data-mw='{"parts":[{"template":{"target":{"wt":"With: Colon","href":"./Template:With:_Colon"},"params":{},"i":0}}]}'>Template with colon</p>
3146 #--------------------------------------------------------------------
3147 # Transclusion parameter escaping tests
3148 #--------------------------------------------------------------------
3151 Templates: Parsoid parameter escaping test 1
3153 {{echo|[foo]|{{echo|[bar]}}}}
3158 <p about="#mwt1" typeof="mw:Transclusion"
3159 data-mw='{"parts":[{"template":{"target":{"wt":"echo","href":"./Template:Echo"},"params":{"1":{"wt":"[foo]"},"2":{"wt":"{{echo|[bar]}}"}},"i":0}}]}'>[foo]</p>
3163 Parsoid: Pipes in external links in template parameter
3165 {{echo|[{{echo|http://example.com}} link]}}
3167 <p><a rel="nofollow" class="external text" href="http://example.com">link</a>
3170 <p><a rel="mw:ExtLink" class="external text" href="http://example.com" about="#mwt31" typeof="mw:Transclusion" data-mw='{"parts":[{"template":{"target":{"wt":"echo","href":"./Template:Echo"},"params":{"1":{"wt":"[{{echo|http://example.com}} link]"}},"i":0}}]}'>link</a></p>
3174 Parsoid: pipe in transclusion parameter
3176 {{echo|http://foo.com/a|b}}
3178 <p><a rel="nofollow" class="external free" href="http://foo.com/a%7Cb">http://foo.com/a%7Cb</a>
3181 <p><a rel="mw:ExtLink" class="external free" href="http://foo.com/a%7Cb" about="#mwt1" typeof="mw:Transclusion" data-mw='{"parts":[{"template":{"target":{"wt":"echo","href":"./Template:Echo"},"params":{"1":{"wt":"http://foo.com/a&#124;b"}},"i":0}}]}'>http://foo.com/a%7Cb</a></p>
3185 Parsoid: Pipe in external link target and content in template parameter
3187 parsoid=html2wt,wt2wt
3189 {{echo|[http://foo.com/a|b a|b]}}
3191 <p><a rel="nofollow" class="external text" href="http://foo.com/a%7Cb">a|b</a>
3194 <p><a rel="mw:ExtLink" href="http://foo.com/a|b" about="#mwt1"
3195 typeof="mw:Transclusion"
3196 data-mw='{"parts":[{"template":{"target":{"wt":"echo","href":"./Template:Echo"},
3197 "params":{"1":{"wt":"[http://foo.com/a|b a|b]"}},"i":0}}]}'>a|b</a></p>
3201 Parsoid: Pipe in template with nested template in external link target in template parameter (seriously)
3205 {{echo|[{{fullurl:{{FULLPAGENAME}}|action=edit}} bar]}}
3207 <p typeof="mw:Transclusion" data-mw='{"parts":[{"template":{"target":{"wt":"echo","href":"./Template:Echo"},"params":{"1":{"wt":"[{{fullurl:{{FULLPAGENAME}}|action=edit}} bar]"}},"i":0}}]}'>[Main Page bar]</p>
3211 Templates: Don't escape already nowiki-escaped text in template parameters
3213 parsoid=html2wt,wt2wt
3215 {{echo|foo<nowiki>|</nowiki>bar}}
3216 {{echo|<nowiki><div></nowiki>}}
3217 {{echo|<nowiki></nowiki>}}
3224 <p><span about="#mwt1" typeof="mw:Transclusion" data-mw='{"parts":[{"template":{"target":{"wt":"echo","href":"./Template:Echo"},"params":{"1":{"wt":"foo<nowiki>|</nowiki>bar"}},"i":0}}]}'}'>foo</span><span typeof="mw:Nowiki" about="#mwt1">|</span><span about="#mwt1">bar</span>
3225 <span typeof="mw:Transclusion mw:Nowiki" about="#mwt2" data-mw='{"parts":[{"template":{"target":{"wt":"echo","href":"./Template:Echo"},"params":{"1":{"wt":"<nowiki>&lt;div&gt;</nowiki>"}},"i":0}}]}'><span typeof="mw:Entity"><</span>div<span typeof="mw:Entity">></span></span>
3226 <span typeof="mw:Transclusion mw:Nowiki" about="#mwt3" data-mw='{"parts":[{"template":{"target":{"wt":"echo","href":"./Template:Echo"},"params":{"1":{"wt":"<nowiki></nowiki>"}},"i":0}}]}'></span>
3232 Templates: '=' char in nested transclusions should not trigger nowiki escapes or conversion to named param
3234 parsoid=html2wt,wt2wt
3236 {{echo|{{echo|1=bar}}}}
3241 <p about="#mwt1" typeof="mw:Transclusion" data-mw='{"parts":[{"template":{"target":{"wt":"echo","href":"./Template:Echo"},"params":{"1":{"wt":"{{echo|1=bar}}"}},"i":0}}]}'>bar</p>
3246 Templates parameters with special tokenizing behavior dont get modified because of arg escaping
3253 <p about="#mwt1" typeof="mw:Transclusion" data-mw='{"parts":[{"template":{"target":{"wt":"echo","href":"./Template:Echo"},"params":{"1":{"wt":"a : b"}},"i":0}}]}'>a<span typeof="mw:DisplaySpace mw:Placeholder" data-parsoid='{"isDisplayHack":true}'> </span>: b</p>
3258 Templates: Preserve blank parameter names
3265 <p about="#mwt1" typeof="mw:Transclusion" data-mw='{"parts":[{"template":{"target":{"wt":"echo","href":"./Template:Echo"},"params":{"":{"wt":"foo"}},"i":0}}]}'>{{{1}}}</p>
3269 Templates: Preserve blank parameter names in other positions
3271 {{blank_param|bar|=foo}}
3277 <p about="#mwt1" typeof="mw:Transclusion" data-parsoid='{"pi":[[{"k":"1"},{"k":"","named":true}]]}' data-mw='{"parts":[{"template":{"target":{"wt":"blank_param","href":"./Template:Blank_param"},"params":{"1":{"wt":"bar"},"":{"wt":"foo"}},"i":0}}]}'>bar
3282 ### Parsoid-centric tests for testing RT edge cases for pre
3286 1a. Indent-Pre and Comments
3299 1b. Indent-Pre and Comments
3312 1c. Indent-Pre and Comments
3325 1d. Indent-Pre and Comments
3326 (Pre-handler currently cannot distinguish between comment/ws order and normalizes them to [comment,ws] order)
3339 2a. Indent-Pre and tables
3360 2b. Indent-Pre and tables
3376 2c. Indent-Pre and tables (T44252)
3393 2d. Indent-Pre and tables
3410 <tbody><tr><td> b</td></tr>
3415 2e. Indent-Pre and table-line syntax
3428 2f. Indent-pre started by table-line syntax
3447 2g. Indented table markup mixed with indented pre content (proposed in T8200)
3452 Text that should be rendered preformatted
3460 <pre>Text that should be rendered preformatted
3469 2h. Indent pre in tables
3471 parsoid=wt2html,html2html
3514 </td><td data-parsoid='{"startTagSrc":"{{!}}"}'>
3516 </td></tr></tbody></table>
3520 3a. Indent-Pre and block tags (single-line html)
3524 c <blockquote> foo </blockquote>
3529 c <blockquote> foo </blockquote>
3530 <pre><span> foo </span>
3533 <p> a </p><p> foo </p><p>
3534 b </p><div> foo </div><p>
3535 c </p><blockquote><p> foo </p></blockquote>
3536 <pre><span> foo </span>
3539 <p> a </p><p data-parsoid='{"stx":"html"}'> foo </p><p>
3540 b </p><div data-parsoid='{"stx":"html"}'> foo </div><p>
3541 c </p><blockquote data-parsoid='{"stx":"html"}'><p> foo </p></blockquote>
3542 <pre><span data-parsoid='{"stx":"html"}'> foo </span></pre>
3546 3b. Indent-Pre and block tags (multi-line html)
3549 <!-- comment --> b <div> foo </div>
3551 <pre>a <span>foo</span>
3556 <pre>a <span data-parsoid='{"stx":"html"}'>foo</span></pre>
3557 <!-- comment --> <p>b </p><div data-parsoid='{"stx":"html"}'> foo </div>
3559 <pre>a <span>foo</span>
3561 b </p><div> foo </div>
3565 3c. Indent-Pre and block tags (pre-content on separate line)
3629 4. Indent-Pre and extension tags
3631 parsoid=wt2html,html2html
3640 <p> a </p><pre typeof="mw:Extension/tag" about="#mwt2" data-mw='{"name":"tag","attrs":{}}'></pre>
3644 5. Indent-Pre and html pre
3646 <pre class="123">hi</pre>
3648 <pre class="123">hi</pre>
3651 <pre typeof="mw:Extension/pre" about="#mwt2" class="123" data-mw='{"name":"pre","attrs":{"class":"123"},"body":{"extsrc":"hi"}}'>hi</pre>
3655 Render paragraphs when indent-pre is suppressed in blocklevels
3672 4. Multiple spaces at start-of-line
3690 ## NOTE: the leading white-space chars on empty line are significant
3692 5a. White-space in indent-pre
3704 ## NOTE: the leading white-space chars on empty line are significant
3706 5b. White-space in indent-pre
3725 5c. White-space in indent-pre
3738 6. Pre-blocks should extend across lines with leading WS even when there is no wrappable content
3761 7a. Indent-pre and category links
3763 parsoid=wt2html,wt2wt
3765 [[Category:foo]] <!-- No pre-wrapping -->
3766 {{echo| [[Category:foo]]}} <!-- No pre-wrapping -->
3769 <link rel="mw:PageProp/Category" href="./Category:Foo"> <!-- No pre-wrapping -->
3770 <span about="#mwt1" typeof="mw:Transclusion" data-mw='{"parts":[{"template":{"target":{"wt":"echo","href":"./Template:Echo"},"params":{"1":{"wt":" [[Category:foo]]"}},"i":0}}]}'> </span><link rel="mw:PageProp/Category" href="./Category:Foo" about="#mwt1"> <!-- No pre-wrapping -->
3773 ## We used to, but no longer wt2wt this test since the default serializer
3774 ## will normalize all categories to serialize on their own line.
3775 ## This wikitext usage is going to be fairly uncommon in production and
3776 ## selser will take care of preserving formatting in those scenarios.
3778 7b. Indent-pre and category links
3783 [[Category:foo]] {{echo|b}}
3785 <pre><link rel="mw:PageProp/Category" href="./Category:Foo"> a
3786 <link rel="mw:PageProp/Category" href="./Category:Foo"> <span about="#mwt1" typeof="mw:Transclusion" data-mw='{"parts":[{"template":{"target":{"wt":"echo","href":"./Template:Echo"},"params":{"1":{"wt":"b"}},"i":0}}]}'>b</span></pre>
3790 Indent-Pre: Newlines in comments shouldn't affect sol state
3805 ### HTML-pre (some to spec PHP parser behavior and some Parsoid-RT-centric)
3809 HTML-pre: 1. embedded newlines
3841 <pre typeof="mw:Extension/pre" about="#mwt2" data-mw='{"name":"pre","attrs":{},"body":{"extsrc":"foo"}}'>foo</pre>
3843 <pre typeof="mw:Extension/pre" about="#mwt4" data-mw='{"name":"pre","attrs":{},"body":{"extsrc":"\nfoo\n"}}'>foo
3846 <pre typeof="mw:Extension/pre" about="#mwt6" data-mw='{"name":"pre","attrs":{},"body":{"extsrc":"\n\nfoo\n"}}'>
3851 <pre typeof="mw:Extension/pre" about="#mwt8" data-mw='{"name":"pre","attrs":{},"body":{"extsrc":"\n\n\nfoo\n"}}'>
3859 HTML-pre: big spaces
3895 <pre typeof="mw:Extension/pre" about="#mwt2" data-parsoid='{"stx":"html"}' data-mw='{"name":"pre","attrs":{},"body":{"extsrc":"\n\n\n\n\nhaha\n\n\n\n\nhaha\n\n\n\n\n"}}'>
3914 HTML-pre: 2: indented text
3927 HTML-pre: 3: other wikitext
3946 <pre typeof="mw:Extension/pre" about="#mwt2" data-mw='{"name":"pre","attrs":{},"body":{"extsrc":"\n* foo\n# bar\n= no-h =\n'' no-italic ''\n[[ NoLink ]]\n"}}'>* foo
3955 ### Definition lists
3963 <dd>Definition</dd></dl>
3968 Definition list for indentation only
3972 <dl><dd>Indented text</dd></dl>
3977 Definition list with no space
3982 <dd>Definition</dd></dl>
3987 Definition list with URL link
3989 ;http://example.com/ :definition
3991 <dl><dt><a rel="nofollow" class="external free" href="http://example.com/">http://example.com/</a></dt>
3992 <dd>definition</dd></dl>
3997 Definition list with bracketed URL link
3999 ;[http://www.example.com/ Example]:Something about it
4001 <dl><dt><a rel="nofollow" class="external text" href="http://www.example.com/">Example</a></dt>
4002 <dd>Something about it</dd></dl>
4007 Definition list with wikilink containing colon
4009 ;[[Help:FAQ]]:The least-read page on Wikipedia
4011 <dl><dt><a href="/index.php?title=Help:FAQ&action=edit&redlink=1" class="new" title="Help:FAQ (page does not exist)">Help:FAQ</a></dt>
4012 <dd>The least-read page on Wikipedia</dd></dl>
4016 # At Brion's and JeLuF's insistence... :)
4018 Definition list with news link containing colon
4020 ;news:alt.wikipedia.rox :This isn't even a real newsgroup!
4022 <dl><dt><a rel="nofollow" class="external free" href="news:alt.wikipedia.rox">news:alt.wikipedia.rox</a></dt>
4023 <dd>This isn't even a real newsgroup!</dd></dl>
4026 <dl><dt><a rel="mw:ExtLink" class="external free" href="news:alt.wikipedia.rox" data-parsoid='{"stx":"url"}'>news:alt.wikipedia.rox</a></dt><dd data-parsoid='{"stx":"row"}'>This isn't even a real newsgroup!</dd></dl>
4030 Malformed definition list with colon
4032 ;news:alt.wikipedia.rox -- don't crash or enter an infinite loop
4034 <dl><dt><a rel="nofollow" class="external free" href="news:alt.wikipedia.rox">news:alt.wikipedia.rox</a> -- don't crash or enter an infinite loop</dt></dl>
4039 Definition lists: colon in external link text
4041 ;[http://www.wikipedia2.org/ Wikipedia :The Next Generation] :OK, I made that up
4043 <dl><dt><a rel="nofollow" class="external text" href="http://www.wikipedia2.org/">Wikipedia :The Next Generation</a></dt>
4044 <dd>OK, I made that up</dd></dl>
4049 Definition lists: colon in HTML attribute
4051 ;<b style="display: inline">bold</b>
4053 <dl><dt><b style="display: inline">bold</b></dt></dl>
4058 Definition lists: self-closed tag
4060 ;one<br/>two :two-line fun
4062 <dl><dt>one<br />two</dt>
4063 <dd>two-line fun</dd></dl>
4068 Definition lists: ignore colons inside tags
4070 ;one <b>two : tag <i>fun:</i>:</b>:def
4072 <dl><dt>one <b>two : tag <i>fun:</i>:</b></dt>
4078 Definition lists: excess closed tags
4080 ;one</b>two :bad tag fun
4083 <dd>bad tag fun</dd></dl>
4087 <dd>bad tag fun</dd>
4092 T13748: Literal closing tags
4096 <dd>test test test test test</dd>
4098 <dd>test test test test test</dd>
4103 <dd>test test test test test</dd>
4105 <dd>test test test test test</dd>
4111 Definition and unordered list using wiki syntax nested in unordered list using html tags.
4120 <dd>description</dd></dl>
4121 <ul><li>unordered</li></ul>
4127 Definition list with empty definition and following paragraph
4140 Nested definition lists using html syntax
4153 Definition Lists: No nesting: Multiple dd's
4166 Definition Lists: Indentation: Regular
4174 <dl><dd>i3</dd></dl></dd></dl></dd></dl>
4179 Definition Lists: Indentation: Missing 1st level
4185 <dl><dd>i3</dd></dl></dd></dl></dd></dl>
4190 Definition Lists: Indentation: Multi-level indent
4194 <dl><dd><dl><dd><dl><dd>i3</dd></dl></dd></dl></dd></dl>
4199 Definition Lists: Hacky use to indent tables
4206 should be left alone
4208 <dl><dd><dl><dd><table>
4213 </td></tr></table></dd></dl></dd></dl>
4215 should be left alone
4220 Definition Lists: Hacky use to indent tables (with content following table)
4225 |} <!--c1--> this text should be part of the dl
4232 </td></tr></tbody></table> this text should be part of the dl</dd></dl>
4239 </td></tr></tbody></table> <!--c1--> this text should be part of the dl</dd></dl>
4243 Definition Lists: Hacky use to indent tables, with comments (T65979)
4251 should be left alone
4254 <dl><dd><dl><dd><table><tr>
4257 </tr></table><!-- bar --></dd></dl></dd></dl>
4259 should be left alone</p>
4263 Definition Lists: Hacky use to indent tables, with comment before table
4271 <dl><dd><dl><dd><!-- foo --><table><tr>
4273 </tr></table></dd></dl></dd></dl>
4276 # The trailing whitespace in this test is to catch a regression in
4277 # Parsoid after T54473.
4279 Definition Lists: Hacky use to indent tables (WS-insensitive)
4288 </td></tr></table></dd></dl>
4292 <tbody><tr><td>a</td></tr>
4293 </tbody></table></dd></dl>
4296 ## The PHP parser treats : items (dd) without a corresponding ; item (dt)
4297 ## as an empty dt item. It also ignores all but the last ";" when followed
4298 ## by ":" later on. So, ";" are not ignored in ";;;t3" but are ignored in
4299 ## ";;;t3 :d1". So, PHP parser behavior is a little inconsistent wrt multiple
4302 ## Ex: ";;t2 ::d2" is transformed into:
4314 ## But, Parsoid treats "; :" as a tight atomic unit and excess ":" as plain text
4315 ## So, the same wikitext above (;;t2 ::d2) is transformed into:
4326 ## All Parsoid only definition list tests have this difference.
4328 ## See also: https://phabricator.wikimedia.org/T8569
4329 ## and https://lists.wikimedia.org/pipermail/wikitext-l/2011-November/000483.html
4332 Table / list interaction: indented table with lists in table contents
4354 </td></tr></table></dd></dl>
4359 Table / list interaction: lists nested in tables nested in indented lists
4382 </td></tr></table></dd></dl>
4389 Definition Lists: Nesting: Multi-level (Parsoid only)
4417 Definition Lists: Nesting: Test 2
4424 <dl><dd>d2</dd></dl></dd></dl>
4429 Definition Lists: Nesting: Test 3
4434 <dl><dd><dl><dt>t1</dt>
4436 <dl><dd><dl><dd>d2</dd></dl></dd></dl></dd></dl></dd></dl>
4441 Definition Lists: Nesting: Test 4
4446 <dl><dd><dl><dd><dl><dt>t3</dt>
4447 <dd>d3</dd></dl></dd></dl></dd></dl>
4452 ## The Parsoid team believes the following three test exposes a
4453 ## bug in the PHP parser. (Parsoid team thinks the PHP parser is
4454 ## wrong to close the <dl> after the <dt> containing the <ul>.)
4455 ## It also exposes a "misfeature" in tidy, which doesn't like
4456 ## <dl> tags with a single <dt> child; it converts the <dt> into
4457 ## a <dd> in that case. (Parsoid leaves the <dt> alone!)
4459 Definition Lists: Mixed Lists: Test 1
4465 <dl><dd><dl><dt><ul><li>foo</li>
4466 <li>bar</li></ul></dt></dl>
4467 <dl><dt>baz</dt></dl></dd></dl>
4470 <dl><dd><dl><dt><ul><li>foo</li>
4471 <li>bar</li></ul></dt></dl>
4472 <dl><dt>baz</dt></dl></dd></dl>
4490 Definition Lists: Mixed Lists: Test 2
4495 <ul><li><dl><dd>d1</dd>
4496 <dd>d2</dd></dl></li></ul>
4502 Definition Lists: Mixed Lists: Test 3
4507 <ul><li><dl><dd><dl><dd><dl><dd>d1</dd>
4508 <dd>d2</dd></dl></dd></dl></dd></dl></li></ul>
4514 Definition Lists: Mixed Lists: Test 4
4519 <ul><li><dl><dt>d1</dt>
4522 <dd>d4</dd></dl></li></ul>
4528 Definition Lists: Mixed Lists: Test 5
4534 <dl><dd>d2</dd></dl></dd></dl></li></ul>
4540 Definition Lists: Mixed Lists: Test 6
4545 <ol><li><ul><li><dl><dd>d1
4546 <dl><dd><dl><dd>d3</dd></dl></dd></dl></dd></dl></li></ul></li></ol>
4552 Definition Lists: Mixed Lists: Test 7
4557 <dl><dd><ul><li>d1</li>
4558 <li>d2</li></ul></dd></dl>
4564 Definition Lists: Mixed Lists: Test 8
4569 <dl><dd><ul><li>d1</li></ul>
4570 <dl><dd><ul><li>d2</li></ul></dd></dl></dd></dl>
4576 Definition Lists: Mixed Lists: Test 9
4580 <ul><li><dl><dt>foo</dt>
4581 <dd>bar</dd></dl></li></ul>
4587 Definition Lists: Mixed Lists: Test 10
4591 <ul><li><ol><li><dl><dt>foo</dt>
4592 <dd>bar</dd></dl></li></ol></li></ul>
4596 # The Parsoid team disagrees with the PHP parser's seemingly-random
4597 # rules regarding dd/dt on the next few tests. Parsoid is more
4598 # consistent, and recognizes the shared nesting and keeps the
4599 # still-open tags around until the nesting is complete.
4601 # This is a regression test for T175099
4603 Definition Lists: Mixed Lists: Test 11
4610 <ul><li>b</li></ul></dd></dl>
4614 <dd><ul><li>b</li></ul></dd></dl>
4617 # FIXME: Maybe get rid of this test?
4619 Definition Lists: Mixed Lists: Test 12
4624 <ul><li><ol><li><ul><li><ol><li><dl><dt>foo</dt>
4625 <dd><ul><li><dl><dt><dl><dt>bar</dt></dl></dd></dl></li></ul></dd></dl>
4627 <dd>baz</dd></dl></li></ol></li></ul></li></ol></li></ul>
4630 <ul><li><ol><li><ul><li><ol><li><dl><dt>foo</dt>
4631 <dd><ul><li><dl><dt><dl><dt>bar</dt></dl></dt></dl></li></ul></dd></dl></li></ol></li></ul>
4633 <dd>baz</dd></dl></li></ol></li></ul>
4651 <dd data-parsoid='{"stx":"row"}'>bar</dd>
4656 <dd data-parsoid='{"stx":"row"}'>baz</dd>
4665 Definition Lists: Mixed Lists: Test 13
4670 <ul><li><ol><li><ul><li><ol><li><dl><dt>foo </dt>
4671 <dd><ul><li><dl><dt><dl><dt>bar</dt></dl></dt></dl></li></ul></dd></dl></li></ol></li></ul>
4672 <dl><dt>boo </dt>
4673 <dd>baz</dd></dl></li></ol></li></ul>
4676 # FIXME: Maybe get rid of this test?
4678 # * The test is wrong, there are two colons where there should be :;
4679 # * The PHP parser is wrong to close the <dl> after the <dt> containing the <ul>.
4681 Definition Lists: Weird Ones: Test 1
4683 *#;*::;;foo :bar (who uses this?)
4685 <ul><li><ol><li><dl><dt>foo</dt>
4686 <dd><ul><li><dl><dd><dl><dd><dl><dt><dl><dt>bar (who uses this?)</dt></dl></dt></dl></dd></dl></dd></dl></li></ul></dd></dl></li></ol></li></ul>
4704 <dd data-parsoid='{"stx":"row"}'>bar (who uses this?)</dd>
4716 Definition Lists: colons occurring in tags
4733 <dt><span>a:b</span></dt>
4734 <dt><div>a:b</div></dt>
4735 <dt><div>a</div></dt>
4739 <dt><i>a:b</i></dt></dl>
4740 <dl><dt><dl><dt><dl><dt><i>a:b</i></dt></dl></dt></dl></dt></dl>
4742 <dl><dt>a</dt><dd data-parsoid='{"stx":"row"}'>b</dd>
4744 <dt><i data-parsoid='{"stx":"html"}'>a:b</i></dt>
4745 <dt><span data-parsoid='{"stx":"html"}'>a:b</span></dt>
4746 <dt><div data-parsoid='{"stx":"html"}'>a:b</div></dt>
4747 <dt><div data-parsoid='{"stx":"html","autoInsertedEnd":true}'>a</div></dt>
4749 <dt><span about="#mwt1" typeof="mw:Transclusion" data-parsoid='{"pi":[[{"k":"1"}]]}' data-mw='{"parts":[{"template":{"target":{"wt":"echo","href":"./Template:Echo"},"params":{"1":{"wt":"a:b"}},"i":0}}]}'>a:b</span></dt>
4750 <dt><i about="#mwt2" typeof="mw:Transclusion" data-parsoid='{"pi":[[{"k":"1"}]]}' data-mw='{"parts":[{"template":{"target":{"wt":"echo","href":"./Template:Echo"},"params":{"1":{"wt":"''a:b''"}},"i":0}}]}'>a:b</i>
4751 <dl><dt><dl><dt><i>a:b</i></dt></dl></dt></dl></dt></dl>
4754 # Parsoid's output differs here again because it shares
4755 # nesting between the two lists unlike the PHP parser.
4756 # Unsure which is more desirable.
4758 Definition Lists: colons and tables 1
4770 </td></tr></table></dd></dl>
4774 </td></tr></table></dd></dl>
4780 </td></tr></table></dd>
4784 </td></tr></table></dd></dl>
4787 # FIXME: Does this need a html/php section?
4789 Definition Lists: template interaction
4791 ::{{definition_list}}
4794 ::{{definition_list}}
4799 <dl><dd><dl data-parsoid='{}'><dd about="#mwt1" typeof="mw:Transclusion" data-parsoid='{"pi":[[]]}' data-mw='{"parts":[":",{"template":{"target":{"wt":"definition_list","href":"./Template:Definition_list"},"params":{},"i":0}}]}'>one</dd><span about="#mwt1">
4800 </span><dd about="#mwt1">two</dd></dl></dd></dl>
4802 <dl><dd data-parsoid='{}'>one
4803 <dl><dd about="#mwt2" typeof="mw:Transclusion" data-parsoid='{"pi":[[]]}' data-mw='{"parts":["::",{"template":{"target":{"wt":"definition_list","href":"./Template:Definition_list"},"params":{},"i":0}},"\n:::two\n:::three"]}'>one</dd><span about="#mwt2">
4804 </span><dd about="#mwt2">two
4806 <dd>three</dd></dl></dd>
4807 <dd data-parsoid='{}'>four</dd></dl></dd></dl>
4815 External links: non-bracketed
4817 Non-bracketed: http://example.com
4819 <p>Non-bracketed: <a rel="nofollow" class="external free" href="http://example.com">http://example.com</a>
4823 # parsoid doesn't explicitly mark autonumbered links, see T55505
4825 External links: numbered
4827 Numbered: [http://example.com]
4828 Numbered: [http://example.net]
4829 Numbered: [http://example.com]
4831 <p>Numbered: <a rel="nofollow" class="external autonumber" href="http://example.com">[1]</a>
4832 Numbered: <a rel="nofollow" class="external autonumber" href="http://example.net">[2]</a>
4833 Numbered: <a rel="nofollow" class="external autonumber" href="http://example.com">[3]</a>
4836 <p>Numbered: <a rel="mw:ExtLink" class="external autonumber" href="http://example.com"></a>
4837 Numbered: <a rel="mw:ExtLink" class="external autonumber" href="http://example.net"></a>
4838 Numbered: <a rel="mw:ExtLink" class="external autonumber" href="http://example.com"></a></p>
4842 External links: specified text
4844 Specified text: [http://example.com link]
4846 <p>Specified text: <a rel="nofollow" class="external text" href="http://example.com">link</a>
4851 External links: trail
4853 Linktrails should not work for external links: [http://example.com link]s
4855 <p>Linktrails should not work for external links: <a rel="nofollow" class="external text" href="http://example.com">link</a>s
4860 External links: dollar sign in URL
4862 http://example.com/1$2345
4864 <p><a rel="nofollow" class="external free" href="http://example.com/1$2345">http://example.com/1$2345</a>
4868 # parsoid doesn't explicitly mark autonumbered links, see T55505
4870 External links: dollar sign in URL (autonumber)
4872 [http://example.com/1$2345]
4874 <p><a rel="nofollow" class="external autonumber" href="http://example.com/1$2345">[1]</a>
4877 <p><a rel="mw:ExtLink" class="external autonumber" href="http://example.com/1$2345"></a></p>
4881 External links: open square bracket forbidden in URL (T6377)
4883 parsoid=wt2html,wt2wt,html2html
4885 http://example.com/1[2345
4887 <p><a rel="nofollow" class="external free" href="http://example.com/1">http://example.com/1</a>[2345
4890 <p><a rel="mw:ExtLink" class="external free" href="http://example.com/1">http://example.com/1</a>[2345</p>
4894 External links: open square bracket forbidden in URL (named) (T6377)
4896 parsoid=wt2html,html2html
4898 [http://example.com/1[2345]
4900 <p><a rel="nofollow" class="external text" href="http://example.com/1">[2345</a>
4903 <p><a rel="mw:ExtLink" class="external text" href="http://example.com/1">[2345</a></p>
4906 # parsoid adds a space before the link name
4908 External links: open square bracket forbidden in URL (named) (T6377)
4911 [http://example.com/1 [2345]
4913 <p><a rel="nofollow" class="external text" href="http://example.com/1">[2345</a>
4918 External links: nowiki in URL link text (T8230)
4920 [http://example.com/ <nowiki>''example site''</nowiki>]
4922 <p><a rel="nofollow" class="external text" href="http://example.com/">''example site''</a>
4927 External links: newline forbidden in text (T8230 regression check)
4929 [http://example.com/ first
4932 <p>[<a rel="nofollow" class="external free" href="http://example.com/">http://example.com/</a> first
4938 External links: Pipe char between url and text
4940 [http://example.com | link]
4942 <p><a rel="nofollow" class="external text" href="http://example.com">| link</a>
4947 External links: protocol-relative URL in brackets
4949 [//example.com/ Test]
4951 <p><a rel="nofollow" class="external text" href="//example.com/">Test</a>
4955 # parsoid doesn't explicitly mark autonumbered links, see T55505
4957 External links: protocol-relative URL in brackets without text
4961 <p><a rel="nofollow" class="external autonumber" href="//example.com">[1]</a>
4964 <p><a rel="mw:ExtLink" class="external autonumber" href="//example.com"></a></p>
4968 External links: protocol-relative URL in free text is left alone
4972 <p>//example.com/Foo
4977 External links: protocol-relative URL in the middle of a word is left alone (T32269)
4979 foo//example.com/Foo
4981 <p>foo//example.com/Foo
4985 ## html2wt and html2html will fail because we will prefer the :en: interwiki prefix over wikipedia:
4987 External links: with no contents
4989 parsoid=wt2html,wt2wt
4991 [http://en.wikipedia.org/wiki/Foo]
4993 [[wikipedia:Foo|Bar]]
4995 [[wikipedia:Foo|<span>Bar</span>]]
4997 <p><a rel="nofollow" class="external autonumber" href="http://en.wikipedia.org/wiki/Foo">[1]</a>
4998 </p><p><a href="http://en.wikipedia.org/wiki/Foo" class="extiw" title="wikipedia:Foo">Bar</a>
4999 </p><p><a href="http://en.wikipedia.org/wiki/Foo" class="extiw" title="wikipedia:Foo"><span>Bar</span></a>
5002 <p><a rel="mw:ExtLink" class="external autonumber" href="http://en.wikipedia.org/wiki/Foo"></a></p>
5003 <p><a rel="mw:WikiLink/Interwiki" href="http://en.wikipedia.org/wiki/Foo" title="wikipedia:Foo">Bar</a></p>
5004 <p><a rel="mw:WikiLink/Interwiki" href="http://en.wikipedia.org/wiki/Foo" title="wikipedia:Foo"><span>Bar</span></a></p>
5008 External links: Free with trailing punctuation
5018 http://example.com/url_with_(brackets)
5019 (http://example.com/url_without_brackets)
5020 http://example.com/url_with_entity&
5021 http://example.com/url_with_entity&
5022 http://example.com/url_with_entity&
5023 http://example.com/url_with_entity
5024 http://example.com/url_with_entity 
5025 http://example.com/url_with_entity 
5026 http://example.com/url_with_entity<
5027 http://example.com/url_with_entity<
5028 http://example.com/url_with_entity<
5030 <p><a rel="nofollow" class="external free" href="http://example.com">http://example.com</a>,
5031 <a rel="nofollow" class="external free" href="http://example.com">http://example.com</a>;
5032 <a rel="nofollow" class="external free" href="http://example.com">http://example.com</a>\
5033 <a rel="nofollow" class="external free" href="http://example.com">http://example.com</a>.
5034 <a rel="nofollow" class="external free" href="http://example.com">http://example.com</a>:
5035 <a rel="nofollow" class="external free" href="http://example.com">http://example.com</a>!
5036 <a rel="nofollow" class="external free" href="http://example.com">http://example.com</a>?
5037 <a rel="nofollow" class="external free" href="http://example.com">http://example.com</a>)
5038 <a rel="nofollow" class="external free" href="http://example.com/url_with_(brackets)">http://example.com/url_with_(brackets)</a>
5039 (<a rel="nofollow" class="external free" href="http://example.com/url_without_brackets">http://example.com/url_without_brackets</a>)
5040 <a rel="nofollow" class="external free" href="http://example.com/url_with_entity&">http://example.com/url_with_entity&</a>
5041 <a rel="nofollow" class="external free" href="http://example.com/url_with_entity&">http://example.com/url_with_entity&</a>
5042 <a rel="nofollow" class="external free" href="http://example.com/url_with_entity&">http://example.com/url_with_entity&</a>
5043 <a rel="nofollow" class="external free" href="http://example.com/url_with_entity">http://example.com/url_with_entity</a> 
5044 <a rel="nofollow" class="external free" href="http://example.com/url_with_entity">http://example.com/url_with_entity</a> 
5045 <a rel="nofollow" class="external free" href="http://example.com/url_with_entity">http://example.com/url_with_entity</a> 
5046 <a rel="nofollow" class="external free" href="http://example.com/url_with_entity">http://example.com/url_with_entity</a><
5047 <a rel="nofollow" class="external free" href="http://example.com/url_with_entity">http://example.com/url_with_entity</a><
5048 <a rel="nofollow" class="external free" href="http://example.com/url_with_entity">http://example.com/url_with_entity</a><
5051 <p><a rel="mw:ExtLink" class="external free" href="http://example.com">http://example.com</a>,
5052 <a rel="mw:ExtLink" class="external free" href="http://example.com">http://example.com</a>;
5053 <a rel="mw:ExtLink" class="external free" href="http://example.com">http://example.com</a>\
5054 <a rel="mw:ExtLink" class="external free" href="http://example.com">http://example.com</a>.
5055 <a rel="mw:ExtLink" class="external free" href="http://example.com">http://example.com</a>:
5056 <a rel="mw:ExtLink" class="external free" href="http://example.com">http://example.com</a>!
5057 <a rel="mw:ExtLink" class="external free" href="http://example.com">http://example.com</a>?
5058 <a rel="mw:ExtLink" class="external free" href="http://example.com">http://example.com</a>)
5059 <a rel="mw:ExtLink" class="external free" href="http://example.com/url_with_(brackets)">http://example.com/url_with_(brackets)</a>
5060 (<a rel="mw:ExtLink" class="external free" href="http://example.com/url_without_brackets">http://example.com/url_without_brackets</a>)
5061 <a rel="mw:ExtLink" class="external free" href="http://example.com/url_with_entity&">http://example.com/url_with_entity&</a>
5062 <a rel="mw:ExtLink" class="external free" href="http://example.com/url_with_entity&">http://example.com/url_with_entity&</a>
5063 <a rel="mw:ExtLink" class="external free" href="http://example.com/url_with_entity&">http://example.com/url_with_entity&</a>
5064 <a rel="mw:ExtLink" class="external free" href="http://example.com/url_with_entity">http://example.com/url_with_entity</a><span typeof="mw:Entity" data-parsoid='{"src":"&nbsp;","srcContent":" "}'> </span>
5065 <a rel="mw:ExtLink" class="external free" href="http://example.com/url_with_entity">http://example.com/url_with_entity</a><span typeof="mw:Entity" data-parsoid='{"src":"&#xA0;","srcContent":" "}'> </span>
5066 <a rel="mw:ExtLink" class="external free" href="http://example.com/url_with_entity">http://example.com/url_with_entity</a><span typeof="mw:Entity" data-parsoid='{"src":"&#160;","srcContent":" "}'> </span>
5067 <a rel="mw:ExtLink" class="external free" href="http://example.com/url_with_entity">http://example.com/url_with_entity</a><span typeof="mw:Entity" data-parsoid='{"src":"&lt;","srcContent":"<"}'><</span>
5068 <a rel="mw:ExtLink" class="external free" href="http://example.com/url_with_entity">http://example.com/url_with_entity</a><span typeof="mw:Entity" data-parsoid='{"src":"&#x3C;","srcContent":"<"}'><</span>
5069 <a rel="mw:ExtLink" class="external free" href="http://example.com/url_with_entity">http://example.com/url_with_entity</a><span typeof="mw:Entity" data-parsoid='{"src":"&#60;","srcContent":"<"}'><</span></p>
5073 External links: tricky Parsoid html2html case
5075 parsoid=wt2html,wt2wt,html2html
5077 http://example.com/url_with_entity&amp;
5079 <p><a rel="nofollow" class="external free" href="http://example.com/url_with_entity&amp">http://example.com/url_with_entity&amp</a>;
5082 <p><a rel="mw:ExtLink" class="external free" href="http://example.com/url_with_entity&amp">http://example.com/url_with_entity&amp</a>;</p>
5086 External links: Free with trailing quotes (T113666)
5088 '''News:''' Stuff here
5092 <p><b>News:</b> Stuff here
5093 </p><p><a rel="nofollow" class="external free" href="news:'a'b">news:'a'b</a><i>c</i>d e
5096 <p><b>News:</b> Stuff here</p>
5097 <p><a rel="mw:ExtLink" class="external free" href="news:'a'b">news:'a'b</a><i>c</i>d e</p>
5101 External links: with entity
5103 [http:// www.librarieswithoutborders.org Libraries without borders]
5105 <p><a rel="nofollow" class="external text" href="http://+www.librarieswithoutborders.org">Libraries without borders</a>
5108 <p><a rel="mw:ExtLink" class="external text" href="http://+www.librarieswithoutborders.org" data-parsoid='{"a":{"href":"http://+www.librarieswithoutborders.org"},"sa":{"href":"http://&#x20;www.librarieswithoutborders.org"}}'>Libraries without borders</a></p>
5112 External links: Lone protocols are never linked (T105697)
5131 External links: No preceding word characters allowed (T67278)
5133 NOPEhttp://example.com
5134 N0http://example.com
5135 ok:http://example.com
5136 ok-http://example.com
5138 <p>NOPEhttp://example.com
5139 N0http://example.com
5140 ok:<a rel="nofollow" class="external free" href="http://example.com">http://example.com</a>
5141 ok-<a rel="nofollow" class="external free" href="http://example.com">http://example.com</a>
5146 External links: nofollow domain exception
5148 A [https://no-nofollow.org/foobar link], and another [https://example.org link].
5150 <p>A <a class="external text" href="https://no-nofollow.org/foobar">link</a>, and another <a rel="nofollow" class="external text" href="https://example.org">link</a>.
5157 External image: http://meta.wikimedia.org/upload/f/f1/Ncwikicol.png
5159 <p>External image: <img src="http://meta.wikimedia.org/upload/f/f1/Ncwikicol.png" alt="Ncwikicol.png"/>
5164 External image from https
5166 External image from https: https://meta.wikimedia.org/upload/f/f1/Ncwikicol.png
5168 <p>External image from https: <img src="https://meta.wikimedia.org/upload/f/f1/Ncwikicol.png" alt="Ncwikicol.png"/>
5173 External image (when not allowed)
5175 wgAllowExternalImages=0
5177 External image: http://meta.wikimedia.org/upload/f/f1/Ncwikicol.png
5179 <p>External image: <a rel="nofollow" class="external free" href="http://meta.wikimedia.org/upload/f/f1/Ncwikicol.png">http://meta.wikimedia.org/upload/f/f1/Ncwikicol.png</a>
5184 Link to non-http image, no img tag
5186 Link to non-http image, no img tag: ftp://example.com/test.jpg
5188 <p>Link to non-http image, no img tag: <a rel="nofollow" class="external free" href="ftp://example.com/test.jpg">ftp://example.com/test.jpg</a>
5193 External links: terminating separator
5195 Terminating separator: http://example.com/thing,
5197 <p>Terminating separator: <a rel="nofollow" class="external free" href="http://example.com/thing">http://example.com/thing</a>,
5202 External links: intervening separator
5204 Intervening separator: http://example.com/1,2,3
5206 <p>Intervening separator: <a rel="nofollow" class="external free" href="http://example.com/1,2,3">http://example.com/1,2,3</a>
5211 External links: old bug with URL in query
5213 Old bug with URL in query: [http://example.com/thing?url=http://example.com link]
5215 <p>Old bug with URL in query: <a rel="nofollow" class="external text" href="http://example.com/thing?url=http://example.com">link</a>
5220 External links: old URL-in-URL bug, mixed protocols
5222 And again with mixed protocols: [ftp://example.com?url=http://example.com link]
5224 <p>And again with mixed protocols: <a rel="nofollow" class="external text" href="ftp://example.com?url=http://example.com">link</a>
5228 # Since Parsoid is starting to emit canonical wikitext for links,
5229 # [http://example.com http://example.com] will not RT back to that
5232 External links: URL in text
5236 URL in text: [http://example.com http://example.com]
5238 <p>URL in text: <a rel="nofollow" class="external text" href="http://example.com">http://example.com</a>
5241 <p>URL in text: <a rel="mw:ExtLink" class="external text" href="http://example.com">http://example.com</a></p>
5245 External links: Clickable images
5247 ja-style clickable images: [http://example.com http://meta.wikimedia.org/upload/f/f1/Ncwikicol.png]
5249 <p>ja-style clickable images: <a rel="nofollow" class="external text" href="http://example.com"><img src="http://meta.wikimedia.org/upload/f/f1/Ncwikicol.png" alt="Ncwikicol.png"/></a>
5252 <p>ja-style clickable images: <a rel="mw:ExtLink" class="external text" href="http://example.com"><img src="http://meta.wikimedia.org/upload/f/f1/Ncwikicol.png" alt="Ncwikicol.png" data-parsoid='{"type":"extlink"}'/></a></p>
5256 External links: raw ampersand
5258 Old & use: http://x&y
5260 <p>Old & use: <a rel="nofollow" class="external free" href="http://x&y">http://x&y</a>
5265 External links: encoded ampersand
5267 Old & use: http://x&y
5269 <p>Old & use: <a rel="nofollow" class="external free" href="http://x&y">http://x&y</a>
5272 <p>Old <span typeof="mw:Entity">&</span> use: <a rel="mw:ExtLink" class="external free" href="http://x&y">http://x&y</a></p>
5276 External links: encoded equals (T8102)
5278 http://example.com/?foo=bar
5280 <p><a rel="nofollow" class="external free" href="http://example.com/?foo=bar">http://example.com/?foo=bar</a>
5283 <p><a rel="mw:ExtLink" class="external free" href="http://example.com/?foo=bar">http://example.com/?foo=bar</a></p>
5287 ## Note that parsoid doesn't explicit mark autonumbered links, nor
5288 ## does it number them. As discussed in T55505, we can identify
5289 ## autonumbered links via CSS.
5293 External links: [raw ampersand]
5295 Old & use: [http://x&y]
5297 <p>Old & use: <a rel="nofollow" class="external autonumber" href="http://x&y">[1]</a>
5300 <p>Old <span typeof="mw:Entity">&</span> use: <a rel="mw:ExtLink" class="external autonumber" href="http://x&y"></a></p>
5303 # note that parsoid html is identical to [raw ampersand] case; so html2wt
5304 # mode will return the [raw ampersand] wikitext
5306 External links: [encoded ampersand]
5308 parsoid=wt2html,wt2wt,html2html
5310 Old & use: [http://x&y]
5312 <p>Old & use: <a rel="nofollow" class="external autonumber" href="http://x&y">[1]</a>
5315 <p>Old <span typeof="mw:Entity">&</span> use: <a rel="mw:ExtLink" class="external autonumber" href="http://x&y"></a></p>
5319 External links: [raw equals]
5321 [http://example.com/?foo=bar]
5323 <p><a rel="nofollow" class="external autonumber" href="http://example.com/?foo=bar">[1]</a>
5326 <p><a rel="mw:ExtLink" class="external autonumber" href="http://example.com/?foo=bar"></a></p>
5329 # note that parsoid html is identical to [raw equals] case; so html2wt
5330 # mode will return the [raw equals] wikitext
5332 External links: [encoded equals] (T8102)
5334 parsoid=wt2html,wt2wt,html2html
5336 [http://example.com/?foo=bar]
5338 <p><a rel="nofollow" class="external autonumber" href="http://example.com/?foo=bar">[1]</a>
5341 <p><a rel="mw:ExtLink" class="external autonumber" href="http://example.com/?foo=bar"></a></p>
5344 # xxx parsoid strips the IDN character, so the round-trip tests will
5345 # obviously fail and are disabled. --cscott
5347 External links: [IDN ignored character reference in hostname; strip it right off]
5349 parsoid=wt2html,wt2wt,html2html
5351 [http://e‌xample.com/]
5353 <p><a rel="nofollow" class="external autonumber" href="http://example.com/">[1]</a>
5356 <p><a rel="mw:ExtLink" class="external autonumber" href="http://example.com/"></a></p>
5359 # FIXME: This test (the IDN characters in the text of a link) is an inconsistency.
5360 # Where an external link could easily circumvent the sanitization of the text of
5361 # a link like this (where an IDN-ignore character is in the URL somewhere), this
5362 # test demands a higher standard. That's a bit strange.
5366 # http://example.com -> [http://example.com|http://example.com]
5367 # [http://example.com|http://example.com] -> [http://example.com|http://example.com]
5369 # The first example is sanitized, but the second is not. Any security benefits
5370 # from this production are trivial to circumvent. Either remove this test and
5371 # let the parser(s) do their thing unaccosted, or fix the inconsistency and change
5372 # the test accordingly.
5376 # xxx parsoid strips the IDN character, so the round-trip tests will
5377 # obviously fail and are disabled. --cscott
5379 External links: IDN ignored character reference in hostname; strip it right off
5381 parsoid=wt2html,html2html
5383 http://e‌xample.com/
5385 <p><a rel="nofollow" class="external free" href="http://example.com/">http://example.com/</a>
5388 <p><a rel="mw:ExtLink" class="external free" href="http://example.com/">http://example.com/</a></p>
5392 External links: www.jpeg.org (T2554)
5396 <p><a rel="nofollow" class="external free" href="http://www.jpeg.org">http://www.jpeg.org</a>
5400 # parsoid doesn't explicitly mark autonumbered links, see T55505
5402 External links: URL within URL (T2002)
5404 [http://www.unausa.org/newindex.asp?place=http://www.unausa.org/programs/mun.asp]
5406 <p><a rel="nofollow" class="external autonumber" href="http://www.unausa.org/newindex.asp?place=http://www.unausa.org/programs/mun.asp">[1]</a>
5409 <p><a rel="mw:ExtLink" class="external autonumber" href="http://www.unausa.org/newindex.asp?place=http://www.unausa.org/programs/mun.asp"></a></p>
5413 T2361: URL inside bracketed URL
5415 [http://www.example.com/foo http://www.example.com/bar]
5417 <p><a rel="nofollow" class="external text" href="http://www.example.com/foo">http://www.example.com/bar</a>
5422 T2361: URL within URL, not bracketed
5424 http://www.example.com/foo?=http://www.example.com/bar
5426 <p><a rel="nofollow" class="external free" href="http://www.example.com/foo?=http://www.example.com/bar">http://www.example.com/foo?=http://www.example.com/bar</a>
5431 T2289: ">"-token in URL-tail
5433 http://www.example.com/<hello>
5435 <p><a rel="nofollow" class="external free" href="http://www.example.com/">http://www.example.com/</a><hello>
5440 T2289: literal ">"-token in URL-tail
5442 http://www.example.com/<b>html</b>
5444 <p><a rel="nofollow" class="external free" href="http://www.example.com/">http://www.example.com/</a><b>html</b>
5447 <p><a rel="mw:ExtLink" class="external free" href="http://www.example.com/" data-parsoid='{"stx":"url"}'>http://www.example.com/</a><b data-parsoid='{"stx":"html"}'>html</b></p>
5451 T2289: ">"-token in bracketed URL
5453 [http://www.example.com/<hello> stuff]
5455 <p><a rel="nofollow" class="external text" href="http://www.example.com/"><hello> stuff</a>
5460 T2289: literal ">"-token in bracketed URL
5462 [http://www.example.com/<b>html</b> stuff]
5464 <p><a rel="nofollow" class="external text" href="http://www.example.com/"><b>html</b> stuff</a>
5469 T2289: literal double quote at end of URL
5471 http://www.example.com/"hello"
5473 <p><a rel="nofollow" class="external free" href="http://www.example.com/">http://www.example.com/</a>"hello"
5478 T2289: literal double quote in bracketed URL
5480 [http://www.example.com/"hello" stuff]
5482 <p><a rel="nofollow" class="external text" href="http://www.example.com/">"hello" stuff</a>
5487 External links: multiple legal whitespace is fine, Magnus. Don't break it please. (T7081)
5489 [http://www.example.com test]
5491 <p><a rel="nofollow" class="external text" href="http://www.example.com">test</a>
5496 External links: link text with spaces
5498 [http://www.example.com a b c]
5499 [http://www.example.com ''a'' ''b'']
5501 <p><a rel="nofollow" class="external text" href="http://www.example.com">a b c</a>
5502 <a rel="nofollow" class="external text" href="http://www.example.com"><i>a</i> <i>b</i></a>
5506 # Note edge case difference between PHP and Parsoid here.
5508 External links: wiki links within external link (T5695)
5510 parsoid=wt2html,html2html
5512 [http://example.com [[wikilink]] embedded in ext link]
5514 [http://example.com test [[wikilink]] embedded in ext link]
5516 <p><a rel="nofollow" class="external text" href="http://example.com"></a><a href="/index.php?title=Wikilink&action=edit&redlink=1" class="new" title="Wikilink (page does not exist)">wikilink</a><a rel="nofollow" class="external text" href="http://example.com"> embedded in ext link</a>
5517 </p><p><a rel="nofollow" class="external text" href="http://example.com">test </a><a href="/index.php?title=Wikilink&action=edit&redlink=1" class="new" title="Wikilink (page does not exist)">wikilink</a><a rel="nofollow" class="external text" href="http://example.com"> embedded in ext link</a>
5520 <p><a rel="mw:ExtLink" class="external autonumber" href="http://example.com"></a><a rel="mw:WikiLink" href="./Wikilink" title="Wikilink">wikilink</a><span> embedded in ext link</span></p>
5521 <p><a rel="mw:ExtLink" class="external text" href="http://example.com">test </a><a rel="mw:WikiLink" href="./Wikilink" title="Wikilink">wikilink</a><span> embedded in ext link</span></p>
5525 T2787: Links with one slash after the url protocol are invalid
5529 [http:/example.com title]
5531 <p>http:/example.com
5532 </p><p>[http:/example.com title]
5537 Bracketed external links with template-generated invalid target
5539 [{{echo|http:/example.com}} title]
5541 <p>[http:/example.com title]
5545 # wt2html only because Parsoid would want to add <nowiki>s coming from html
5547 Broken wikilinks (but not external links) prevent templates from closing
5551 [http://example.com x
5553 {{echo|[http://example.com x}}
5559 <p>[<a rel="nofollow" class="external free" href="http://example.com">http://example.com</a> x
5560 </p><p>[<a rel="nofollow" class="external free" href="http://example.com">http://example.com</a> x
5562 </p><p>{{echo|[[Foo}}
5565 <p>[<a rel="mw:ExtLink" class="external free" href="http://example.com">http://example.com</a> x</p>
5566 <p typeof="mw:Transclusion" data-mw='{"parts":[{"template":{"target":{"wt":"echo","href":"./Template:Echo"},"params":{"1":{"wt":"[http://example.com x"}},"i":0}}]}'>[<a rel="mw:ExtLink" class="external free" href="http://example.com">http://example.com</a> x</p>
5568 <p>{{echo|[[Foo}}</p>
5572 Wikilinks with embedded newlines are not broken
5583 <p typeof="mw:Transclusion" data-mw='{"parts":[{"template":{"target":{"wt":"echo","href":"./Template:Echo"},"params":{"1":{"wt":"[[ Foo\nB\nC]]"}},"i":0}}]}'>[[ Foo B C]]</p>
5595 <p>{{echo|<a href="/wiki/Foo" title="Foo">}}</a>
5599 <p>{{echo|<a rel="mw:WikiLink" href="./Foo" title="Foo">}}</a></p>
5600 <p>[[Foo|<span typeof="mw:Transclusion" data-mw='{"parts":[{"template":{"target":{"wt":"echo","href":"./Template:Echo"},"params":{"1":{"wt":"]]"}},"i":0}}]}'>]]</span></p>
5604 T4702: Mismatched <i>, <b> and <a> tags are invalid
5606 ''[http://example.com text'']
5607 [http://example.com '''text]'''
5608 ''Something [http://example.com in italic'']
5609 ''Something [http://example.com mixed''''', even bold]'''
5610 '''''Now [http://example.com both''''']
5612 <p><a rel="nofollow" class="external text" href="http://example.com"><i>text</i></a>
5613 <a rel="nofollow" class="external text" href="http://example.com"><b>text</b></a>
5614 <i>Something </i><a rel="nofollow" class="external text" href="http://example.com"><i>in italic</i></a>
5615 <i>Something </i><a rel="nofollow" class="external text" href="http://example.com"><i>mixed</i><b>, even bold</b></a>
5616 <i><b>Now </b></i><a rel="nofollow" class="external text" href="http://example.com"><i><b>both</b></i></a>
5624 http://www.example.com/?title=AT%26T
5626 <p><a rel="nofollow" class="external free" href="http://www.example.com/?title=AT%26T">http://www.example.com/?title=AT%26T</a>
5629 <p><a rel="mw:ExtLink" class="external free" href="http://www.example.com/?title=AT%26T">http://www.example.com/?title=AT%26T</a></p>
5632 # According to https://www.w3.org/TR/2011/WD-html5-20110525/Overview.html#parsing-urls a plain
5633 # % is actually legal in HTML5. Any change in output would need testing though.
5635 T6781, T7267: %25 in URL
5637 http://www.example.com/?title=100%25_Bran
5639 <p><a rel="nofollow" class="external free" href="http://www.example.com/?title=100%25_Bran">http://www.example.com/?title=100%25_Bran</a>
5642 <p><a rel="mw:ExtLink" class="external free" href="http://www.example.com/?title=100%25_Bran">http://www.example.com/?title=100%25_Bran</a></p>
5646 T6781, T7267: %28, %29 in URL
5648 http://www.example.com/?title=Ben-Hur_%281959_film%29
5650 <p><a rel="nofollow" class="external free" href="http://www.example.com/?title=Ben-Hur_%281959_film%29">http://www.example.com/?title=Ben-Hur_%281959_film%29</a>
5653 <p><a rel="mw:ExtLink" class="external free" href="http://www.example.com/?title=Ben-Hur_%281959_film%29">http://www.example.com/?title=Ben-Hur_%281959_film%29</a></p>
5658 T6781: %26 in autonumber URL
5660 [http://www.example.com/?title=AT%26T]
5662 <p><a rel="nofollow" class="external autonumber" href="http://www.example.com/?title=AT%26T">[1]</a>
5665 <p><a rel="mw:ExtLink" class="external autonumber" href="http://www.example.com/?title=AT%26T"></a></p>
5669 T6781, T7267: %26 in autonumber URL
5671 [http://www.example.com/?title=100%25_Bran]
5673 <p><a rel="nofollow" class="external autonumber" href="http://www.example.com/?title=100%25_Bran">[1]</a>
5676 <p><a rel="mw:ExtLink" class="external autonumber" href="http://www.example.com/?title=100%25_Bran"></a></p>
5680 T6781, T7267: %28, %29 in autonumber URL
5682 [http://www.example.com/?title=Ben-Hur_%281959_film%29]
5684 <p><a rel="nofollow" class="external autonumber" href="http://www.example.com/?title=Ben-Hur_%281959_film%29">[1]</a>
5687 <p><a rel="mw:ExtLink" class="external autonumber" href="http://www.example.com/?title=Ben-Hur_%281959_film%29"></a></p>
5692 T6781: %26 in bracketed URL
5694 [http://www.example.com/?title=AT%26T link]
5696 <p><a rel="nofollow" class="external text" href="http://www.example.com/?title=AT%26T">link</a>
5699 <p><a rel="mw:ExtLink" class="external text" href="http://www.example.com/?title=AT%26T">link</a></p>
5703 T6781, T7267: %25 in bracketed URL
5705 [http://www.example.com/?title=100%25_Bran link]
5707 <p><a rel="nofollow" class="external text" href="http://www.example.com/?title=100%25_Bran">link</a>
5712 T6781, T7267: %28, %29 in bracketed URL
5714 [http://www.example.com/?title=Ben-Hur_%281959_film%29 link]
5716 <p><a rel="nofollow" class="external text" href="http://www.example.com/?title=Ben-Hur_%281959_film%29">link</a>
5719 <p><a rel="mw:ExtLink" class="external text" href="http://www.example.com/?title=Ben-Hur_%281959_film%29">link</a></p>
5723 External link containing a period in the anchor. (T65947)
5725 [//foo.org/bar#baz. bang]
5727 [//foo.org/bar. bang]
5729 <p><a rel="nofollow" class="external text" href="//foo.org/bar#baz.">bang</a>
5730 </p><p><a rel="nofollow" class="external text" href="//foo.org/bar.">bang</a>
5733 <p><a rel="mw:ExtLink" class="external text" href="//foo.org/bar#baz.">bang</a></p>
5734 <p><a rel="mw:ExtLink" class="external text" href="//foo.org/bar.">bang</a></p>
5738 External link containing a single quote. (T65947)
5742 [//foo.org/bar'baz bang]
5744 <p><a rel="nofollow" class="external autonumber" href="//foo.org/bar'baz">[1]</a>
5745 </p><p><a rel="nofollow" class="external text" href="//foo.org/bar'baz">bang</a>
5748 <p><a rel="mw:ExtLink" class="external autonumber" href="//foo.org/bar'baz"></a></p>
5749 <p><a rel="mw:ExtLink" class="external text" href="//foo.org/bar'baz">bang</a></p>
5753 External link containing double-single-quotes in text '' (T6598 sanity check)
5755 Some [http://example.com/ pretty ''italics'' and stuff]!
5757 <p>Some <a rel="nofollow" class="external text" href="http://example.com/">pretty <i>italics</i> and stuff</a>!
5762 External link containing double-single-quotes in text embedded in italics (T6598 sanity check)
5764 ''Some [http://example.com/ pretty ''italics'' and stuff]!''
5766 <p><i>Some </i><a rel="nofollow" class="external text" href="http://example.com/"><i>pretty </i>italics<i> and stuff</i></a><i>!</i>
5770 # Don't add the html/php section since the output is broken and there isn't any reason to spec it
5772 External link containing double-single-quotes with no space separating the url from text in italics
5774 [http://www.musee-picasso.fr/pages/page_id18528_u1l2.htm''La muerte de Casagemas'' (1901) en el sitio de [[Museo Picasso (París)|Museo Picasso]].]
5776 <p><a rel="nofollow" class="external text" href="http://www.musee-picasso.fr/pages/page_id18528_u1l2.htm"><i>La muerte de Casagemas</i> (1901) en el sitio de </a><a href="/index.php?title=Museo_Picasso_(Par%C3%ADs)&action=edit&redlink=1" class="new" title="Museo Picasso (París) (page does not exist)">Museo Picasso</a>.
5779 <p><a rel="mw:ExtLink" class="external text" href="http://www.musee-picasso.fr/pages/page_id18528_u1l2.htm"><i>La muerte de Casagemas</i> (1901) en el sitio de </a><a rel="mw:WikiLink" href="./Museo_Picasso_(París)" title="Museo Picasso (París)">Museo Picasso</a><span>.</span></p>
5783 External link with comments in link text
5785 [http://www.google.com Google <!-- comment -->]
5787 <p><a rel="nofollow" class="external text" href="http://www.google.com">Google </a>
5790 <p><a rel="mw:ExtLink" class="external text" href="http://www.google.com">Google <!-- comment --></a></p>
5794 External link to bare IPv4 address
5796 [http://192.168.0.1 Link]
5798 <p><a rel="nofollow" class="external text" href="http://192.168.0.1">Link</a>
5801 <p><a rel="mw:ExtLink" class="external text" href="http://192.168.0.1">Link</a></p>
5805 URL-encoding in URL functions (single parameter)
5807 {{localurl:Some page|amp=&}}
5809 <p>/index.php?title=Some_page&amp=&
5814 URL-encoding in URL functions (multiple parameters)
5816 {{localurl:Some page|q=?&=&}}
5818 <p>/index.php?title=Some_page&q=?&amp=&
5825 http://example.com/index.php?foozoid%5B%5D=bar
5827 http://example.com/index.php?foozoid[]=bar
5829 <p><a rel="nofollow" class="external free" href="http://example.com/index.php?foozoid%5B%5D=bar">http://example.com/index.php?foozoid%5B%5D=bar</a>
5830 </p><p><a rel="nofollow" class="external free" href="http://example.com/index.php?foozoid%5B%5D=bar">http://example.com/index.php?foozoid%5B%5D=bar</a>
5833 <p><a rel="mw:ExtLink" class="external free" href="http://example.com/index.php?foozoid%5B%5D=bar">http://example.com/index.php?foozoid%5B%5D=bar</a></p>
5835 <p><a rel="mw:ExtLink" class="external free" href="http://example.com/index.php?foozoid%5B%5D=bar" data-parsoid='{"stx":"url","a":{"href":"http://example.com/index.php?foozoid%5B%5D=bar"},"sa":{"href":"http://example.com/index.php?foozoid&#x5B;&#x5D;=bar"}}'>http://example.com/index.php?foozoid%5B%5D=bar</a></p>
5839 IPv6 urls, autolink format (T23261)
5841 http://[2404:130:0:1000::187:2]/index.php
5843 Examples from RFC 2373, section 2.2:
5845 *http://[1080::8:800:200C:417A]/unicast
5846 *http://[FF01::101]/multicast
5847 *http://[::1]/loopback
5848 *http://[::]/unspecified
5849 *http://[::13.1.68.3]/ipv4compat
5850 *http://[::FFFF:129.144.52.38]/ipv4compat
5852 Examples from RFC 2732, section 2:
5854 *http://[FEDC:BA98:7654:3210:FEDC:BA98:7654:3210]:80/index.html
5855 *http://[1080:0:0:0:8:800:200C:417A]/index.html
5856 *http://[3ffe:2a00:100:7031::1]
5857 *http://[1080::8:800:200C:417A]/foo
5858 *http://[::192.9.5.5]/ipng
5859 *http://[::FFFF:129.144.52.38]:80/index.html
5860 *http://[2010:836B:4179::836B:4179]
5862 <p><a rel="nofollow" class="external free" href="http://[2404:130:0:1000::187:2]/index.php">http://[2404:130:0:1000::187:2]/index.php</a>
5863 </p><p>Examples from <a class="external mw-magiclink-rfc" rel="nofollow" href="https://tools.ietf.org/html/rfc2373">RFC 2373</a>, section 2.2:
5865 <ul><li><a rel="nofollow" class="external free" href="http://[1080::8:800:200C:417A]/unicast">http://[1080::8:800:200C:417A]/unicast</a></li>
5866 <li><a rel="nofollow" class="external free" href="http://[FF01::101]/multicast">http://[FF01::101]/multicast</a></li>
5867 <li><a rel="nofollow" class="external free" href="http://[::1]/loopback">http://[::1]/loopback</a></li>
5868 <li><a rel="nofollow" class="external free" href="http://[::]/unspecified">http://[::]/unspecified</a></li>
5869 <li><a rel="nofollow" class="external free" href="http://[::13.1.68.3]/ipv4compat">http://[::13.1.68.3]/ipv4compat</a></li>
5870 <li><a rel="nofollow" class="external free" href="http://[::FFFF:129.144.52.38]/ipv4compat">http://[::FFFF:129.144.52.38]/ipv4compat</a></li></ul>
5871 <p>Examples from <a class="external mw-magiclink-rfc" rel="nofollow" href="https://tools.ietf.org/html/rfc2732">RFC 2732</a>, section 2:
5873 <ul><li><a rel="nofollow" class="external free" href="http://[FEDC:BA98:7654:3210:FEDC:BA98:7654:3210]:80/index.html">http://[FEDC:BA98:7654:3210:FEDC:BA98:7654:3210]:80/index.html</a></li>
5874 <li><a rel="nofollow" class="external free" href="http://[1080:0:0:0:8:800:200C:417A]/index.html">http://[1080:0:0:0:8:800:200C:417A]/index.html</a></li>
5875 <li><a rel="nofollow" class="external free" href="http://[3ffe:2a00:100:7031::1]">http://[3ffe:2a00:100:7031::1]</a></li>
5876 <li><a rel="nofollow" class="external free" href="http://[1080::8:800:200C:417A]/foo">http://[1080::8:800:200C:417A]/foo</a></li>
5877 <li><a rel="nofollow" class="external free" href="http://[::192.9.5.5]/ipng">http://[::192.9.5.5]/ipng</a></li>
5878 <li><a rel="nofollow" class="external free" href="http://[::FFFF:129.144.52.38]:80/index.html">http://[::FFFF:129.144.52.38]:80/index.html</a></li>
5879 <li><a rel="nofollow" class="external free" href="http://[2010:836B:4179::836B:4179]">http://[2010:836B:4179::836B:4179]</a></li></ul>
5882 <p><a rel="mw:ExtLink" class="external free" href="http://[2404:130:0:1000::187:2]/index.php">http://[2404:130:0:1000::187:2]/index.php</a></p>
5884 <p>Examples from <a href="https://tools.ietf.org/html/rfc2373" rel="mw:ExtLink" class="external mw-magiclink">RFC 2373</a>, section 2.2:</p>
5885 <ul><li><a rel="mw:ExtLink" class="external free" href="http://[1080::8:800:200C:417A]/unicast">http://[1080::8:800:200C:417A]/unicast</a></li>
5886 <li><a rel="mw:ExtLink" class="external free" href="http://[FF01::101]/multicast">http://[FF01::101]/multicast</a></li>
5887 <li><a rel="mw:ExtLink" class="external free" href="http://[::1]/loopback">http://[::1]/loopback</a></li>
5888 <li><a rel="mw:ExtLink" class="external free" href="http://[::]/unspecified">http://[::]/unspecified</a></li>
5889 <li><a rel="mw:ExtLink" class="external free" href="http://[::13.1.68.3]/ipv4compat">http://[::13.1.68.3]/ipv4compat</a></li>
5890 <li><a rel="mw:ExtLink" class="external free" href="http://[::FFFF:129.144.52.38]/ipv4compat">http://[::FFFF:129.144.52.38]/ipv4compat</a></li></ul>
5892 <p>Examples from <a href="https://tools.ietf.org/html/rfc2732" rel="mw:ExtLink" class="external mw-magiclink">RFC 2732</a>, section 2:</p>
5893 <ul><li><a rel="mw:ExtLink" class="external free" href="http://[FEDC:BA98:7654:3210:FEDC:BA98:7654:3210]:80/index.html">http://[FEDC:BA98:7654:3210:FEDC:BA98:7654:3210]:80/index.html</a></li>
5894 <li><a rel="mw:ExtLink" class="external free" href="http://[1080:0:0:0:8:800:200C:417A]/index.html">http://[1080:0:0:0:8:800:200C:417A]/index.html</a></li>
5895 <li><a rel="mw:ExtLink" class="external free" href="http://[3ffe:2a00:100:7031::1]">http://[3ffe:2a00:100:7031::1]</a></li>
5896 <li><a rel="mw:ExtLink" class="external free" href="http://[1080::8:800:200C:417A]/foo">http://[1080::8:800:200C:417A]/foo</a></li>
5897 <li><a rel="mw:ExtLink" class="external free" href="http://[::192.9.5.5]/ipng">http://[::192.9.5.5]/ipng</a></li>
5898 <li><a rel="mw:ExtLink" class="external free" href="http://[::FFFF:129.144.52.38]:80/index.html">http://[::FFFF:129.144.52.38]:80/index.html</a></li>
5899 <li><a rel="mw:ExtLink" class="external free" href="http://[2010:836B:4179::836B:4179]">http://[2010:836B:4179::836B:4179]</a></li></ul>
5903 IPv6 urls, bracketed format (T23261)
5905 [http://[2404:130:0:1000::187:2]/index.php test]
5907 Examples from RFC 2373, section 2.2:
5909 *[http://[1080::8:800:200C:417A] unicast]
5910 *[http://[FF01::101] multicast]
5911 *[http://[::1]/ loopback]
5912 *[http://[::] unspecified]
5913 *[http://[::13.1.68.3] ipv4compat]
5914 *[http://[::FFFF:129.144.52.38] ipv4compat]
5916 Examples from RFC 2732, section 2:
5918 *[http://[FEDC:BA98:7654:3210:FEDC:BA98:7654:3210]:80/index.html 1]
5919 *[http://[1080:0:0:0:8:800:200C:417A]/index.html 2]
5920 *[http://[3ffe:2a00:100:7031::1] 3]
5921 *[http://[1080::8:800:200C:417A]/foo 4]
5922 *[http://[::192.9.5.5]/ipng 5]
5923 *[http://[::FFFF:129.144.52.38]:80/index.html 6]
5924 *[http://[2010:836B:4179::836B:4179] 7]
5926 <p><a rel="nofollow" class="external text" href="http://[2404:130:0:1000::187:2]/index.php">test</a>
5927 </p><p>Examples from <a class="external mw-magiclink-rfc" rel="nofollow" href="https://tools.ietf.org/html/rfc2373">RFC 2373</a>, section 2.2:
5929 <ul><li><a rel="nofollow" class="external text" href="http://[1080::8:800:200C:417A]">unicast</a></li>
5930 <li><a rel="nofollow" class="external text" href="http://[FF01::101]">multicast</a></li>
5931 <li><a rel="nofollow" class="external text" href="http://[::1]/">loopback</a></li>
5932 <li><a rel="nofollow" class="external text" href="http://[::]">unspecified</a></li>
5933 <li><a rel="nofollow" class="external text" href="http://[::13.1.68.3]">ipv4compat</a></li>
5934 <li><a rel="nofollow" class="external text" href="http://[::FFFF:129.144.52.38]">ipv4compat</a></li></ul>
5935 <p>Examples from <a class="external mw-magiclink-rfc" rel="nofollow" href="https://tools.ietf.org/html/rfc2732">RFC 2732</a>, section 2:
5937 <ul><li><a rel="nofollow" class="external text" href="http://[FEDC:BA98:7654:3210:FEDC:BA98:7654:3210]:80/index.html">1</a></li>
5938 <li><a rel="nofollow" class="external text" href="http://[1080:0:0:0:8:800:200C:417A]/index.html">2</a></li>
5939 <li><a rel="nofollow" class="external text" href="http://[3ffe:2a00:100:7031::1]">3</a></li>
5940 <li><a rel="nofollow" class="external text" href="http://[1080::8:800:200C:417A]/foo">4</a></li>
5941 <li><a rel="nofollow" class="external text" href="http://[::192.9.5.5]/ipng">5</a></li>
5942 <li><a rel="nofollow" class="external text" href="http://[::FFFF:129.144.52.38]:80/index.html">6</a></li>
5943 <li><a rel="nofollow" class="external text" href="http://[2010:836B:4179::836B:4179]">7</a></li></ul>
5946 <p><a rel="mw:ExtLink" class="external text" href="http://[2404:130:0:1000::187:2]/index.php">test</a></p>
5948 <p>Examples from <a href="https://tools.ietf.org/html/rfc2373" rel="mw:ExtLink" class="external mw-magiclink">RFC 2373</a>, section 2.2:</p>
5949 <ul><li><a rel="mw:ExtLink" class="external text" href="http://[1080::8:800:200C:417A]">unicast</a></li>
5950 <li><a rel="mw:ExtLink" class="external text" href="http://[FF01::101]">multicast</a></li>
5951 <li><a rel="mw:ExtLink" class="external text" href="http://[::1]/">loopback</a></li>
5952 <li><a rel="mw:ExtLink" class="external text" href="http://[::]">unspecified</a></li>
5953 <li><a rel="mw:ExtLink" class="external text" href="http://[::13.1.68.3]">ipv4compat</a></li>
5954 <li><a rel="mw:ExtLink" class="external text" href="http://[::FFFF:129.144.52.38]">ipv4compat</a></li></ul>
5956 <p>Examples from <a href="https://tools.ietf.org/html/rfc2732" rel="mw:ExtLink" class="external mw-magiclink">RFC 2732</a>, section 2:</p>
5957 <ul><li><a rel="mw:ExtLink" class="external text" href="http://[FEDC:BA98:7654:3210:FEDC:BA98:7654:3210]:80/index.html">1</a></li>
5958 <li><a rel="mw:ExtLink" class="external text" href="http://[1080:0:0:0:8:800:200C:417A]/index.html">2</a></li>
5959 <li><a rel="mw:ExtLink" class="external text" href="http://[3ffe:2a00:100:7031::1]">3</a></li>
5960 <li><a rel="mw:ExtLink" class="external text" href="http://[1080::8:800:200C:417A]/foo">4</a></li>
5961 <li><a rel="mw:ExtLink" class="external text" href="http://[::192.9.5.5]/ipng">5</a></li>
5962 <li><a rel="mw:ExtLink" class="external text" href="http://[::FFFF:129.144.52.38]:80/index.html">6</a></li>
5963 <li><a rel="mw:ExtLink" class="external text" href="http://[2010:836B:4179::836B:4179]">7</a></li></ul>
5967 Non-extlinks in brackets
5976 [{{echo|foo}} ''bar'']
5977 [{{echo|foo}}l's] errand
5978 [{{echo|foo}}l's errand]
5980 [url=http://example.com]
5981 [http:// bare protocols don't count]
5994 [url=<a rel="nofollow" class="external free" href="http://example.com">http://example.com</a>]
5995 [http:// bare protocols don't count]
6003 [<span about="#mwt19" typeof="mw:Transclusion" data-mw='{"parts":[{"template":{"target":{"wt":"echo","href":"./Template:Echo"},"params":{"1":{"wt":"foo"}},"i":0}}]}'>foo</span>]
6004 [<span about="#mwt20" typeof="mw:Transclusion" data-mw='{"parts":[{"template":{"target":{"wt":"echo","href":"./Template:Echo"},"params":{"1":{"wt":"foo"}},"i":0}}]}'>foo</span> bar]
6005 [<span about="#mwt21" typeof="mw:Transclusion" data-mw='{"parts":[{"template":{"target":{"wt":"echo","href":"./Template:Echo"},"params":{"1":{"wt":"foo"}},"i":0}}]}'>foo</span> <i>bar</i>]
6006 [<span about="#mwt22" typeof="mw:Transclusion" data-mw='{"parts":[{"template":{"target":{"wt":"echo","href":"./Template:Echo"},"params":{"1":{"wt":"foo"}},"i":0}}]}'>foo</span>l's] errand
6007 [<span about="#mwt23" typeof="mw:Transclusion" data-mw='{"parts":[{"template":{"target":{"wt":"echo","href":"./Template:Echo"},"params":{"1":{"wt":"foo"}},"i":0}}]}'>foo</span>l's errand]
6008 [url=<span about="#mwt24" typeof="mw:Transclusion" data-mw='{"parts":[{"template":{"target":{"wt":"echo","href":"./Template:Echo"},"params":{"1":{"wt":"foo"}},"i":0}}]}'>foo</span>]
6009 [url=<a rel="mw:ExtLink" class="external free" href="http://example.com">http://example.com</a>]
6010 [http:// bare protocols don't count]</p>
6014 Percent encoding in external links
6016 [https://github.com/search?l=&q=ResourceLoader+%40wikimedia Search]
6018 <p><a rel="nofollow" class="external text" href="https://github.com/search?l=&q=ResourceLoader+%40wikimedia">Search</a>
6021 <p><a rel="mw:ExtLink" class="external text" href="https://github.com/search?l=&q=ResourceLoader+%40wikimedia">Search</a></p>
6025 Use url link syntax for links where the content is equal the link target
6029 <p><a rel="nofollow" class="external free" href="http://example.com">http://example.com</a>
6032 <p><a rel="mw:ExtLink" class="external free" href="http://example.com">http://example.com</a></p>
6036 Parenthesis in external links, especially URL links
6040 http://example.com/test)
6042 http://example.com/(test)
6044 http://example.com/((test)
6046 (http://example.com/(test))
6048 (http://example.com/(test)))))
6050 http://example.com/a)b
6052 [http://example.com) foo]
6054 <p><a rel="nofollow" class="external free" href="http://example.com">http://example.com</a>)
6055 </p><p><a rel="nofollow" class="external free" href="http://example.com/test">http://example.com/test</a>)
6056 </p><p><a rel="nofollow" class="external free" href="http://example.com/(test)">http://example.com/(test)</a>
6057 </p><p><a rel="nofollow" class="external free" href="http://example.com/((test)">http://example.com/((test)</a>
6058 </p><p>(<a rel="nofollow" class="external free" href="http://example.com/(test))">http://example.com/(test))</a>
6059 </p><p>(<a rel="nofollow" class="external free" href="http://example.com/(test)))))">http://example.com/(test)))))</a>
6060 </p><p><a rel="nofollow" class="external free" href="http://example.com/a)b">http://example.com/a)b</a>
6061 </p><p><a rel="nofollow" class="external text" href="http://example.com)">foo</a>
6064 <p><a rel="mw:ExtLink" class="external free" href="http://example.com">http://example.com</a>)</p>
6065 <p><a rel="mw:ExtLink" class="external free" href="http://example.com/test">http://example.com/test</a>)</p>
6066 <p><a rel="mw:ExtLink" class="external free" href="http://example.com/(test)">http://example.com/(test)</a></p>
6067 <p><a rel="mw:ExtLink" class="external free" href="http://example.com/((test)">http://example.com/((test)</a></p>
6068 <p>(<a rel="mw:ExtLink" class="external free" href="http://example.com/(test))">http://example.com/(test))</a></p>
6069 <p>(<a rel="mw:ExtLink" class="external free" href="http://example.com/(test)))))">http://example.com/(test)))))</a></p>
6070 <p><a rel="mw:ExtLink" class="external free" href="http://example.com/a)b">http://example.com/a)b</a></p>
6071 <p><a rel="mw:ExtLink" class="external text" href="http://example.com)">foo</a></p>
6075 Parenthesis in external links, w/ transclusion or comment
6077 (http://example.com/{{echo|hi}})
6079 (http://example.com<!-- hi -->)
6081 <p>(<a rel="nofollow" class="external free" href="http://example.com/hi">http://example.com/hi</a>)
6082 </p><p>(<a rel="nofollow" class="external free" href="http://example.com">http://example.com</a>)
6085 <p>(<a typeof="mw:ExpandedAttrs" about="#mwt2" rel="mw:ExtLink" class="external free" href="http://example.com/hi" data-parsoid='{"stx":"url","a":{"href":"http://example.com/hi"},"sa":{"href":"http://example.com/{{echo|hi}}"}}' data-mw='{"attribs":[[{"txt":"href"},{"html":"http://example.com/<span about=\"#mwt1\" typeof=\"mw:Transclusion\" data-parsoid='{\"pi\":[[{\"k\":\"1\"}]],\"dsr\":[20,31,null,null]}' data-mw='{\"parts\":[{\"template\":{\"target\":{\"wt\":\"echo\",\"href\":\"./Template:Echo\"},\"params\":{\"1\":{\"wt\":\"hi\"}},\"i\":0}}]}'>hi</span>"}]]}'>http://example.com/hi</a>)</p>
6087 <p>(<a rel="mw:ExtLink" class="external free" href="http://example.com" data-parsoid='{"stx":"url","a":{"href":"http://example.com"},"sa":{"href":"http://example.com<!-- hi -->"}}'>http://example.com</a>)</p>
6091 Serialize <a> tags with invalid link targets as plain text
6093 parsoid={ "modes": ["html2wt"], "suppressErrors": true }
6095 <a rel="mw:WikiLink" href="[[foo]]">text</a>
6096 <a rel="mw:WikiLink" href="[[foo]]">*text</a>
6097 <a rel="mw:WikiLink" href="[[foo]]">[[foo]]</a>
6098 <a rel="mw:WikiLink" href="[[foo]]">*a [[foo]]</a>
6101 <nowiki>*</nowiki>text
6102 <nowiki>[[foo]]</nowiki>
6103 <nowiki>*</nowiki>a <nowiki>[[foo]]</nowiki>
6107 mw:ExtLink -vs- mw:WikiLink (T94723)
6111 <a rel="mw:WikiLink" href="./Foo" title="Foo" data-parsoid='{"stx":"piped","a":{"href":"./Foo"},"sa":{"href":"Foo"}}'>Bar</a>
6112 <a rel="mw:WikiLink" href="./Foo" title="Foo">Bar</a>
6113 <a rel="mw:WikiLink" href="http://en.wikipedia.org/wiki/Foo" title="Foo">Bar</a>
6114 <a rel="mw:ExtLink" href="http://en.wikipedia.org/wiki/Foo" title="Foo">Bar</a>
6116 <a rel="mw:ExtLink" href="http://en.wikipedia.org/wiki/European_Robin">European Robin</a>
6117 <a rel="mw:WikiLink" href="http://en.wikipedia.org/wiki/European_Robin">European Robin</a>
6125 [[:en:European_Robin|European Robin]]
6126 [[:en:European_Robin|European Robin]]
6130 mw:ExtLink linking to a interwiki URL can be round-tripped losslessly (T94723)
6134 [http://en.wikipedia.org/wiki/European_Robin European Robin]
6136 THIS SECTION IS NOT USED (but Parsoid won't run the test without it)
6147 Normal text. '''Bold text.''' Normal text. ''Italic text.''
6149 Normal text. '''''Bold italic text.''''' Normal text.
6151 <p>Normal text. <b>Bold text.</b> Normal text. <i>Italic text.</i>
6152 </p><p>Normal text. <i><b>Bold italic text.</b></i> Normal text.
6157 Quotes wrapping HTML table
6159 '''<table><tr><td>hi</td></tr></table>'''
6161 <b><table><tbody><tr><td>hi</td></tr></tbody></table></b>
6163 <b><table data-parsoid='{"stx":"html"}'><tbody><tr data-parsoid='{"stx":"html"}'><td data-parsoid='{"stx":"html"}'>hi</td></tr></tbody></table></b>
6166 # Parsoid inserts an empty bold tag pair at the end of the line, that the PHP
6167 # parser strips. The wikitext contains just the first half of the bold
6170 Unclosed and unmatched quotes
6172 '''''Bold italic text '''with bold deactivated''' in between.'''''
6174 '''''Bold italic text ''with italic deactivated'' in between.'''''
6178 ..spanning two paragraphs (should not work).'''
6180 '''Bold tag left open
6182 ''Italic tag left open
6186 <!-- Unmatching number of opening, closing tags: -->
6187 '''This year''''s election ''should'' beat '''last year''''s.
6189 ''Tom'''s car is bigger than ''Susan'''s.
6191 Plain ''italic'''s plain
6193 <p><i><b>Bold italic text </b>with bold deactivated<b> in between.</b></i>
6194 </p><p><b><i>Bold italic text </i>with italic deactivated<i> in between.</i></b>
6195 </p><p><b>Bold text..</b>
6196 </p><p>..spanning two paragraphs (should not work).
6197 </p><p><b>Bold tag left open</b>
6198 </p><p><i>Italic tag left open</i>
6200 </p><p><b>This year'</b>s election <i>should</i> beat <b>last year'</b>s.
6201 </p><p><i>Tom<b>s car is bigger than </b></i><b>Susan</b>s.
6202 </p><p>Plain <i>italic'</i>s plain
6205 <p><i><b>Bold italic text </b>with bold deactivated<b> in between.</b></i>
6206 </p><p><b><i>Bold italic text </i>with italic deactivated<i> in between.</i></b>
6207 </p><p><b>Bold text..</b>
6208 </p><p>..spanning two paragraphs (should not work).<b></b>
6209 </p><p><b>Bold tag left open</b>
6210 </p><p><i>Italic tag left open</i>
6213 <!-- Unmatching number of opening, closing tags: -->
6214 <p><b>This year'</b>s election <i>should</i> beat <b>last year'</b>s.
6215 </p><p><i>Tom<b>s car is bigger than </b></i><b>Susan</b>s.
6216 </p><p>Plain <i>italic'</i>s plain
6223 ### some content taken from http://meta.wikimedia.org/wiki/MediaWiki_User%27s_Guide:_Using_tables
6226 # This should not produce <table></table> as <table><tr><td></td></tr></table>
6227 # is the bare minimum required by the spec, see:
6228 # https://www.w3.org/TR/xhtml-modularization/dtd_module_defs.html#a_module_Basic_Tables
6229 # Parsoid team replies: empty table tags are legal in HTML5
6231 A table with no data.
6244 A table with stray table end tags on start tag line (wt2html)
6248 {|style="color: red;"|}
6250 {|style="color: red;" |}
6254 {|style="color: red;"|} id="foo"
6258 {|style="color: red;" |} id="foo"
6262 <table style="color: red;"></table>
6264 <table style="color: red;">
6270 <table style="color: red;" id="foo">
6276 <table style="color: red;" id="foo">
6285 A table with no data (take 2)
6293 # A table with nothing but a caption is invalid XHTML, we might want to render
6294 # this as <p>caption</p>
6295 # Parsoid team replies: table with only a caption is legal in HTML5
6297 A table with nothing but a caption
6305 </caption><tr><td></td></tr></table>
6308 <table><caption>caption</caption></table>
6312 A table with caption with default-spaced attributes and a table row
6315 |+ style="color: red;" |caption1
6321 <caption style="color: red;">caption1
6330 A table with captions with non-default spaced attributes and a table row
6333 |+style="color: red;"|caption2
6334 |+ style="color: red;"|caption3
6340 <caption style="color: red;">caption2
6342 <caption style="color: red;">caption3
6351 Table td-cell syntax variations
6356 |style='color:red;'|baz
6357 |style='color:red;'||baz
6364 <td>foo bar foo</td>
6367 <td style="color:red;">baz
6369 <td>style='color:red;'</td>
6397 Simple table but with multiple dashes for row wikitext
6416 Multiplication table
6418 {| border="1" cellpadding="2"
6419 |+Multiplication table
6439 <table border="1" cellpadding="2">
6440 <caption>Multiplication table
6487 Accept "||" in table headings
6502 Accept "!!" in table data
6516 <tbody><tr data-parsoid='{"autoInsertedEnd":true,"autoInsertedStart":true}'><td data-parsoid='{"autoInsertedEnd":true}'> Foo!! </td><td data-parsoid='{"stx":"row","autoInsertedEnd":true}'></td></tr>
6521 Accept "||" in indented table headings
6531 </th></tr></table></dd></dl>
6536 Accept "!!" in templates
6550 <tbody><tr><th typeof="mw:Transclusion" about="#mwt1" data-parsoid='{"autoInsertedEnd":true,"pi":[[{"k":"1"}]]}' data-mw='{"parts":["!a ",{"template":{"target":{"wt":"echo","href":"./Template:Echo"},"params":{"1":{"wt":"b!!c"}},"i":0}}]}'>a b</th><th about="#mwt1">c</th></tr>
6554 Accept "!!" in table headings after newline
6571 <p>b!!c</p></th></tr>
6576 Accept "!!" in table data of mixed wikitext / html syntax
6580 <tr><td>b!!c</td></tr>
6586 </th></tr><tr><td>b!!c</td></tr>
6590 <tbody><tr><th>a</th></tr>
6591 <tr data-parsoid='{"stx":"html"}'><td data-parsoid='{"stx":"html"}'>b!!c</td></tr>
6596 Accept empty attributes in td/th cells (td/th cells starting with leading ||)
6613 Accept "| !" at start of line in tables (ignore !-attribute)
6617 |!style="color:red"|bar
6629 Allow +/- in 2nd and later cells in a row, in 1st cell when td-attrs are present, or in 1st cell when there is a space between "|" and +/-
6633 |style='color:red;'|+1
6634 |style='color:blue;'|-1
6646 <td style="color:red;">+1
6648 <td style="color:blue;">-1
6672 |rowspan=2|Cell 2, row 1 (and 2)
6683 <td rowspan="2">Cell 2, row 1 (and 2)
6701 {| bgcolor=#ABCDEF border=2
6706 |the original table again
6714 <table bgcolor="#ABCDEF" border="2">
6722 <td>the original table again
6728 Invalid attributes in table cell (T3830)
6742 Table cell attributes: Pipes protected by nowikis should be treated as a plain character
6746 |title="foo<nowiki>|</nowiki>" |bar
6747 |title="foo<nowiki>|</nowiki>" bar
6754 <td title="foo|">bar
6756 <td>title="foo|" bar
6761 <tbody><tr><td title="foo">bar</td>
6762 <td title="foo|" data-parsoid='{"a":{"title":"foo|"},"sa":{"title":"foo<nowiki>|</nowiki>"},"autoInsertedEnd":true}'>bar</td>
6763 <td> title="foo<span typeof="mw:Nowiki">|</span>" bar</td></tr>
6767 # See: http://lists.wikimedia.org/mailman/htdig/wikitech-l/2006-April/022293.html
6768 # N.B. The "|}" to close the table is missing from the input, so parsoid's
6769 # *2wt modes will fail.
6771 Table security: embedded pipes
6773 parsoid=wt2html,html2html
6776 | |[ftp://|x||]" onmouseover="alert(document.cookie)">test
6780 <td>[<a rel="nofollow" class="external free" href="ftp://%7Cx">ftp://%7Cx</a></td>
6781 <td>]" onmouseover="alert(document.cookie)">test
6789 <td data-parsoid='{"startTagSrc":"| ","attrSepSrc":"|","autoInsertedEnd":true}'>[<a rel="mw:ExtLink" class="external free" href="ftp://%7Cx" data-parsoid='{"stx":"url","a":{"href":"ftp://%7Cx"},"sa":{"href":"ftp://|x"}}'>ftp://%7Cx</a></td><td data-parsoid='{"stx":"row","autoInsertedEnd":true}'>]" onmouseover="alert(document.cookie)">test</td></tr></tbody></table>
6793 Element attributes with double ! should not be broken up by <th>
6796 !hi <div class="!!">ha</div> ho
6801 <th>hi <div class="!!">ha</div> ho
6806 <tbody><tr><th>hi <div class="!!" data-parsoid='{"stx":"html"}'>ha</div> ho</th></tr>
6811 ! and || in element attributes should not be parsed as <th>/<td>
6814 |<div style="color: red !important;" data-contrived="put this here ||">hi</div>
6819 <td><div style="color: red !important;" data-contrived="put this here ||">hi</div>
6824 <tbody><tr><td><div style="color: red !important;" data-contrived="put this here ||" data-parsoid='{"stx":"html"}'>hi</div></td></tr>
6828 # FIXME: The output seems broken. Filed as T110268.
6830 ! and || in td attributes should not be parsed as <th>/<td>
6835 |style="color: red !important;" data-contrived="put this here ||"|foo
6840 <td>style="color: red !important;" data-contrived="put this here</td>
6846 <tbody><tr><td>style="color: red !important;" data-contrived="put this here</td><td data-parsoid='{"stx":"row","a":{"\"":null},"sa":{"\"":""},"autoInsertedEnd":true}'>foo</td></tr>
6851 Break on | in element attribute in template
6853 parsoid=wt2html,html2html
6855 {{echo|1=<div class="hi|ho">ha</div>}}
6857 <p>ho">ha</div>
6860 <p about="#mwt1" typeof="mw:Transclusion" data-mw='{"parts":[{"template":{"target":{"wt":"echo","href":"./Template:Echo"},"params":{"1":{"wt":"ho\">ha</div>"}},"i":0}}]}'>ho">ha</p>
6864 Break on | in element attribute name in template
6866 {{echo|<div cla|ss="hiho">ha</div>}}
6868 <p about="#mwt1" typeof="mw:Transclusion" data-parsoid='{"pi":[[{"k":"1"},{"k":"ss","named":true}]]}' data-mw='{"parts":[{"template":{"target":{"wt":"echo","href":"./Template:Echo"},"params":{"1":{"wt":"<div cla"},"ss":{"wt":"\"hiho\">ha</div>"}},"i":0}}]}'><div cla</p>
6872 Don't break on | in extension attribute in template
6874 {{echo|<ref name="hi|ho">ha</ref>}}
6878 <p><sup about="#mwt2" class="mw-ref" id="cite_ref-hi|ho_1-0" rel="dc:references" typeof="mw:Transclusion mw:Extension/ref" data-mw='{"parts":[{"template":{"target":{"wt":"echo","href":"./Template:Echo"},"params":{"1":{"wt":"<ref name=\"hi|ho\">ha</ref>"}},"i":0}}]}'><a href="./Main_Page#cite_note-hi|ho-1" style="counter-reset: mw-Ref 1;"><span class="mw-reflink-text">[1]</span></a></sup></p>
6880 <ol class="mw-references references" typeof="mw:Extension/references" about="#mwt5" data-mw='{"name":"references","attrs":{}}'><li about="#cite_note-hi|ho-1" id="cite_note-hi|ho-1"><a href="./Main_Page#cite_ref-hi|ho_1-0" rel="mw:referencedBy"><span class="mw-linkback-text">↑ </span></a> <span id="mw-reference-text-cite_note-hi|ho-1" class="mw-reference-text">ha</span></li></ol>
6883 ## We don't support roundtripping of these attributes in Parsoid.
6884 ## Selective serialization takes care of preventing dirty diffs.
6885 ## But, on edits, we dirty-diff the invalid attribute text.
6887 Invalid text in table attributes should be discarded
6891 {| <span>boo</span> style='border:1px solid black'
6892 | <span>boo</span> style='color:blue' |1
6893 |<span>boo</span> style='color:blue'|2
6896 <table style="border:1px solid black">
6898 <td style="color:blue">1
6900 <td style="color:blue">2
6904 <table style="border:1px solid black">
6906 <td style="color:blue">1</td>
6907 <td style="color:blue">2</td>
6913 Invalid text in table attributes should be preserved by selective serializer
6916 "modes": ["selser"],
6918 ["td:first-child", "text", "abc"],
6919 ["td + td", "text", "xyz"]
6923 {| <span>boo</span> style='border:1px solid black'
6924 | <span>boo</span> style='color:blue' | 1
6925 |<span>boo</span> style='color:blue'| 2
6928 {| <span>boo</span> style='border:1px solid black'
6929 | <span>boo</span> style='color:blue' | abc
6930 |<span>boo</span> style='color:blue'| xyz
6935 1. Template-generated table cell attributes and cell content
6940 || {{table_attribs_5}}
6941 | <!--foo--> <!--bar--> <!--baz--> {{table_attribs}}
6942 |align=center {{table_attribs}}
6943 | <!--foo--> align=center <!--bar--> {{table_attribs}}
6948 <td style="color:red;">Foo
6950 <td style="color:red;">Foo
6952 <td>style="color:red;"</td>
6955 <td style="color:red;">Foo
6957 <td align="center" style="color:red;">Foo
6959 <td align="center" style="color:red;">Foo
6965 2. Template-generated table cell attributes and cell content
6968 |{{table_attribs_2}}
6973 <td style="color:red;">Foo
6981 <tbody><tr><td about="#mwt1" typeof="mw:Transclusion" style="color:red;" data-mw='{"parts":["|",{"template":{"target":{"wt":"table_attribs_2","href":"./Template:Table_attribs_2"},"params":{},"i":0}}]}'>Foo</td>
6982 <td about="#mwt1">Bar</td><td about="#mwt1">Baz</td></tr>
6987 3. Template-generated table cell attributes and cell content
6990 !align=center {{table_header_cells}}
6992 |align=center {{table_cells}}
6997 <th align="center" style="color:red;">Foo</th>
6998 <th style="color:red;"><i>Bar</i></th>
6999 <th style="color:brown;"><i>Foo</i> and Baz
7002 <td align="center" style="color:red;">Foo</td>
7003 <td style="color:red;"><i>Bar</i></td>
7004 <td style="color:brown;"><i>Foo</i> and Baz
7009 <tbody><tr><th align="center" style="color:red;" typeof="mw:Transclusion" about="#mwt1" data-mw='{"parts":["!align=center ",{"template":{"target":{"wt":"table_header_cells","href":"./Template:Table_header_cells"},"params":{},"i":0}}]}'>Foo</th><th about="#mwt1" style="color:red;"><i about="#mwt1">Bar</i></th><th about="#mwt1" style="color:brown;"><i about="#mwt1">Foo</i> and Baz</th></tr><tr>
7010 <td align="center" style="color:red;" typeof="mw:Transclusion" about="#mwt1" data-mw='{"parts":["|align=center ",{"template":{"target":{"wt":"table_cells","href":"./Template:Table_cells"},"params":{},"i":0}}]}'>Foo</td><td about="#mwt1" style="color:red;"><i about="#mwt1">Bar</i></td><td about="#mwt1" style="color:brown;"><i about="#mwt1">Foo</i> and Baz</td></tr>
7015 4. Template-generated table cell attributes and cell content inside a templated table
7018 !align=center {{table_header_cells}}
7020 |align=center {{table_cells}}
7025 <th align="center" style="color:red;">Foo</th>
7026 <th style="color:red;"><i>Bar</i></th>
7027 <th style="color:brown;"><i>Foo</i> and Baz
7030 <td align="center" style="color:red;">Foo</td>
7031 <td style="color:red;"><i>Bar</i></td>
7032 <td style="color:brown;"><i>Foo</i> and Baz
7036 <table about="#mwt1" typeof="mw:Transclusion" data-parsoid='{"pi":[[],[],[],[]]}' data-mw='{"parts":[{"template":{"target":{"wt":"tbl-start","href":"./Template:Tbl-start"},"params":{},"i":0}},"\n!align=center ",{"template":{"target":{"wt":"table_header_cells","href":"./Template:Table_header_cells"},"params":{},"i":1}},"\n|-\n|align=center ",{"template":{"target":{"wt":"table_cells","href":"./Template:Table_cells"},"params":{},"i":2}},"\n",{"template":{"target":{"wt":"tbl-end","href":"./Template:Tbl-end"},"params":{},"i":3}}]}'>
7037 <tbody><tr><th align="center" style="color:red;">Foo</th><th style="color:red;"><i>Bar</i></th><th style="color:brown;"><i>Foo</i> and Baz</th></tr>
7039 <td align="center" style="color:red;">Foo</td><td style="color:red;"><i>Bar</i></td><td style="color:brown;"><i>Foo</i> and Baz</td></tr>
7043 ## Edge case fix to prevent future regressions
7045 T107652: <ref>s in templates that also generate table cell attributes should be rendered properly
7048 |{{table_attribs_7}}
7053 <tbody><tr><td style="background:#f9f9f9;" typeof="mw:Transclusion" about="#mwt1" data-mw='{"parts":["|",{"template":{"target":{"wt":"table_attribs_7","href":"./Template:Table_attribs_7"},"params":{},"i":0}}]}'>Foo<sup class="mw-ref" id="cite_ref-1" rel="dc:references" typeof="mw:Extension/ref" data-mw='{"name":"ref","attrs":{},"body":{"id":"mw-reference-text-cite_note-1"}}'><a href="./Main_Page#cite_note-1" style="counter-reset: mw-Ref 1;"><span class="mw-reflink-text">[1]</span></a></s></td></tr>
7055 <ol class="mw-references references" typeof="mw:Extension/references" about="#mwt5" data-mw='{"name":"references","attrs":{}}'><li about="#cite_note-1" id="cite_note-1"><a href="./Main_Page#cite_ref-1" rel="mw:referencedBy"><span class="mw-linkback-text">↑ </span></a> <span id="mw-reference-text-cite_note-1" class="mw-reference-text" data-parsoid="{}">foo</span></li></ol>
7059 Table with row followed by newlines and table heading
7061 parsoid=wt2html,html2html
7079 Table with empty line following the start tag
7081 parsoid=wt2html,html2html
7099 Table attributes with empty value
7101 parsoid=wt2html,html2html
7114 <tbody><tr><td style="">hello</td></tr>
7119 Wikitext table with a lot of comments
7142 Wikitext table comments represented in parsoid dom
7144 {|<!--c1--><!--c2-->
7153 </td></tr></tbody></table>
7155 <table><!--c1--><!--c2-->
7156 <tbody><tr data-parsoid='{"startTagSrc":"|-","autoInsertedEnd":true}'><!--c3-->
7157 <td data-parsoid='{"autoInsertedEnd":true}'>x</td></tr>
7162 Wikitext table with double-line table cell
7179 Table cell with a single comment
7196 Table-cell after a comment-only-empty-line
7213 <tbody><tr data-parsoid='{"autoInsertedEnd":true,"autoInsertedStart":true}'><td data-parsoid='{"autoInsertedEnd":true}'>a</td>
7215 <!--c2--><td data-parsoid='{"autoInsertedEnd":true}'>b</td></tr>
7221 Build table with {{!}}
7223 {{{!}} class="wikitable"
7226 {{!}}- style="color:red;"
7227 {{!}}data{{!}}{{!}} style="color:red;" {{!}}second data
7230 <table class="wikitable">
7236 <tr style="color:red;">
7238 <td style="color:red;">second data
7244 Build table with pipe as data
7246 {| class="wikitable"
7249 |- style="color:red;"
7250 |data|| style="color:red;" |second data
7252 | style="color:red;" |data with | || style="color:red;" | second data with |
7254 ||data with | |||second data with |
7257 <table class="wikitable">
7263 <tr style="color:red;">
7265 <td style="color:red;">second data
7268 <td style="color:red;">data with |</td>
7269 <td style="color:red;">second data with |
7272 <td>data with |</td>
7273 <td>second data with |
7279 Build table with wikilink
7281 {| class="wikitable"
7282 !header||second header
7283 |- style="color:red;"
7284 |data [[Main Page|linktext]]||second data [[Main Page|linktext]]
7286 |data||second data [[Main Page|link|text with pipe]]
7289 <table class="wikitable">
7294 <tr style="color:red;">
7295 <td>data <a href="/wiki/Main_Page" title="Main Page">linktext</a></td>
7296 <td>second data <a href="/wiki/Main_Page" title="Main Page">linktext</a>
7300 <td>second data <a href="/wiki/Main_Page" title="Main Page">link|text with pipe</a>
7305 # The expected HTML structure in this test is debatable. The PHP parser does
7306 # not parse this kind of table at all. The main focus for Parsoid is on
7307 # round-tripping, so this output is ok for now. TODO: revisit!
7309 Wikitext table with html-syntax row
7319 <td>foo</td></tr></tbody></table>
7322 ## Remex doesn't account for fostered content.
7324 Fostered content in tables: Plain text
7344 <p data-parsoid='{"fostered":true,"autoInsertedEnd":true,"autoInsertedStart":true}'>
7347 <tbody><tr class="mw-empty-elt" data-parsoid='{"startTagSrc":"|-"}'></tr></tbody></table>
7351 Fostered content in tables: Lists
7353 parsoid=wt2html,html2html
7366 <ul><li>a</li></ul><table>
7371 <ul data-parsoid='{"fostered":true,"autoInsertedEnd":true}'><li>a</li></ul><table>
7372 <tbody><tr data-parsoid='{"startTagSrc":"|-","autoInsertedEnd":true}'>
7374 </tr></tbody></table>
7378 Template generated table cell with attributes
7382 {{table_attribs_4}} ||a||b
7388 <td style="background-color:#DC241f;" width="10px"></td>
7391 </td></tr></tbody></table>
7394 <tbody><tr data-parsoid='{"startTagSrc":"|-","autoInsertedEnd":true}'>
7395 <td style="background-color:#DC241f;" width="10px" about="#mwt1" typeof="mw:Transclusion" data-parsoid='{"autoInsertedEnd":true,"pi":[[]]}' data-mw='{"parts":[{"template":{"target":{"wt":"table_attribs_4","href":"./Template:Table_attribs_4"},"params":{},"i":0}}," ||a||b"]}'></td><td about="#mwt1">a</td><td about="#mwt1">b</td></tr>
7399 Parsoid: Round-trip tables directly followed by content (T53219)
7401 parsoid=wt2html,wt2wt
7414 </td></tr></tbody></table><p> bar
7418 </td></tr></tbody></table><p><b>quux</b>
7423 Parsoid: Default to a newline after tables in new content (T53219)
7428 <tr><td>foo</td></tr></tbody></table> bar
7430 <tr><td>baz</td></tr></tbody></table><b>quux</b>
7435 <nowiki> </nowiki>bar
7443 Parsoid: Row-syntax table headings followed by comment & table cells
7445 parsoid=wt2html,wt2wt
7449 <!-- foo --> ||baz||quux
7463 <tbody><tr><th>foo</th><th>bar
7464 <!-- foo --></th><td> baz </td><td>quux</td></tr>
7469 Parsoid: Recover better from broken table attributes
7483 </td></tr></tbody></table>
7488 <p>foo</p></td></tr>
7493 Tables: Digest broken attributes on table and tr tag
7504 <tr class='mw-empty-elt'></tr>
7505 <tr class='mw-empty-elt'></tr>
7510 Table with missing opening <tr> tag
7512 parsoid=wt2html,wt2wt
7520 <tbody><tr><td>foo</td>
7525 # T137406: Whitespace in the HTML
7527 1. Generate correct wikitext for tables with thead/tbody/tfoot
7532 <caption>Test</caption>
7594 </td></tr></tbody></table>
7597 # T137406: No whitespace in the HTML
7599 2. Generate correct wikitext for tables with thead/tbody/tfoot
7603 <table><thead><tr><th>heading</th></tr></thead><tbody><tr><td>foo</td></tr></tbody></table>
7613 Wikitext tables can be nested inside HTML tables
7617 <table data-parsoid='{"stx":"html"}'>
7620 <tr><td>foo</td></tr>
7638 Plain link, capitalized
7642 <p><a href="/wiki/Main_Page" title="Main Page">Main Page</a>
7647 Plain link, uncapitalized
7651 <p><a href="/wiki/Main_Page" title="Main Page">main Page</a>
7658 [[Main Page|The Main Page]]
7660 <p><a href="/wiki/Main_Page" title="Main Page">The Main Page</a>
7665 Piped link with comment in link text
7667 [[Main Page|The Main<!--front--> Page]]
7669 <p><a href="/wiki/Main_Page" title="Main Page">The Main Page</a>
7674 Piped link with multiple pipe characters in link text
7676 [[Main Page||The|Main|Page|]]
7678 <p><a href="/wiki/Main_Page" title="Main Page">|The|Main|Page|</a>
7681 <p><a rel="mw:WikiLink" href="./Main_Page" title="Main Page">|The|Main|Page|</a></p>
7685 Piped link with no link text
7687 [[Thomas Bek (bishop of St David's)|]]
7689 <p>[[Thomas Bek (bishop of St David's)|]]
7692 <p>[[Thomas Bek (bishop of St David's)|]]</p>
7696 Piped link with empty link text
7698 [[Main Page|<nowiki/>]] - empty nowiki
7699 [[Main Page| ]] - empty space
7700 [[Main Page| ]] - empty non breaking space
7702 <p><a href="/wiki/Main_Page" title="Main Page"></a> - empty nowiki
7703 <a href="/wiki/Main_Page" title="Main Page"> </a> - empty space
7704 <a href="/wiki/Main_Page" title="Main Page"> </a> - empty non breaking space
7707 <p><a rel="mw:WikiLink" href="./Main_Page" title="Main Page"><span typeof="mw:Nowiki"></span></a> - empty nowiki
7708 <a rel="mw:WikiLink" href="./Main_Page" title="Main Page"> </a> - empty space
7709 <a rel="mw:WikiLink" href="./Main_Page" title="Main Page"><span typeof="mw:Entity" data-parsoid='{"src":"&nbsp;","srcContent":" "}'> </span></a> - empty non breaking space</p>
7717 <p><a href="/index.php?title=Zigzagzogzagzig&action=edit&redlink=1" class="new" title="Zigzagzogzagzig (page does not exist)">Zigzagzogzagzig</a>
7722 Broken link with fragment
7724 [[Zigzagzogzagzig#zug]]
7726 <p><a href="/index.php?title=Zigzagzogzagzig&action=edit&redlink=1" class="new" title="Zigzagzogzagzig (page does not exist)">Zigzagzogzagzig#zug</a>
7731 Special page link with fragment
7733 [[Special:Version#anchor]]
7735 <p><a href="/wiki/Special:Version#anchor" title="Special:Version">Special:Version#anchor</a>
7740 Nonexistent special page link with fragment
7742 [[Special:ThisNameWillHopefullyNeverBeUsed#anchor]]
7744 <p><a href="/wiki/Special:ThisNameWillHopefullyNeverBeUsed" class="new" title="Special:ThisNameWillHopefullyNeverBeUsed (page does not exist)">Special:ThisNameWillHopefullyNeverBeUsed#anchor</a>
7751 xxx[[main Page]], xxx[[Main Page]], Xxx[[main Page]] XXX[[main Page]], XXX[[Main Page]]
7753 <p>xxx<a href="/wiki/Main_Page" title="Main Page">main Page</a>, xxx<a href="/wiki/Main_Page" title="Main Page">Main Page</a>, Xxx<a href="/wiki/Main_Page" title="Main Page">main Page</a> XXX<a href="/wiki/Main_Page" title="Main Page">main Page</a>, XXX<a href="/wiki/Main_Page" title="Main Page">Main Page</a>
7760 [[Main Page]]xxx, [[Main Page]]XXX, [[Main Page]]!!!
7762 <p><a href="/wiki/Main_Page" title="Main Page">Main Pagexxx</a>, <a href="/wiki/Main_Page" title="Main Page">Main Page</a>XXX, <a href="/wiki/Main_Page" title="Main Page">Main Page</a>!!!
7773 T45661: Piped links with identical prefixes
7775 [[prefixed article|prefixed articles with spaces]]
7777 [[prefixed article|prefixed articlesaoeu]]
7779 [[Main Page|Main Page test]]
7781 <p><a href="/wiki/Prefixed_article" title="Prefixed article">prefixed articles with spaces</a>
7782 </p><p><a href="/wiki/Prefixed_article" title="Prefixed article">prefixed articlesaoeu</a>
7783 </p><p><a href="/wiki/Main_Page" title="Main Page">Main Page test</a>
7789 Link with HTML entity in suffix / tail
7791 [[Main Page]]", [[Main Page]]a
7793 <p><a href="/wiki/Main_Page" title="Main Page">Main Page</a>", <a href="/wiki/Main_Page" title="Main Page">Main Page</a>a
7796 <p><a rel="mw:WikiLink" href="./Main_Page" title="Main Page">Main Page</a><span typeof="mw:Entity" data-parsoid='{"src":"&quot;","srcContent":"\""}'>"</span>, <a rel="mw:WikiLink" href="./Main_Page" title="Main Page">Main Page</a><span typeof="mw:Entity" data-parsoid='{"src":"&#97;","srcContent":"a"}'>a</span></p>
7800 Link with 3 brackets
7811 Link with 4 brackets
7815 <p>[[<a href="/wiki/Main_Page" title="Main Page">Main Page</a>]]
7820 Piped link with 3 brackets
7822 [[[main page|the main page]]]
7824 <p>[[[main page|the main page]]]
7829 Piped link with extlink-like text
7832 [[Main Page|This is a [bar]]]
7835 <p><a href="/wiki/Main_Page" title="Main Page">[bar]</a>
7836 <a href="/wiki/Main_Page" title="Main Page">This is a [bar]</a>
7837 <a href="/wiki/Main_Page" title="Main Page">[bar</a>
7840 <p><a rel="mw:WikiLink" href="./Main_Page" title="Main Page" data-parsoid='{"stx":"piped"}'>[bar]</a>
7841 <a rel="mw:WikiLink" href="./Main_Page" title="Main Page" data-parsoid='{"stx":"piped"}'>This is a [bar]</a>
7842 <a rel="mw:WikiLink" href="./Main_Page" title="Main Page" data-parsoid='{"stx":"piped"}'>[bar</a></p>
7846 Link with multiple pipes
7848 [[Main Page|The|Main|Page]]
7850 <p><a href="/wiki/Main_Page" title="Main Page">The|Main|Page</a>
7855 Anchor containing a #. (T65430)
7857 wgFragmentMode=[ 'html5', 'legacy' ]
7859 [[Main Page#And#Link]]
7861 <p><a href="/wiki/Main_Page#And#Link" title="Main Page">Main Page#And#Link</a>
7864 <p><a rel="mw:WikiLink" href="./Main_Page#And#Link" title="Main Page" data-parsoid='{"stx":"simple","a":{"href":"./Main_Page#And#Link"},"sa":{"href":"Main Page#And#Link"}}'>Main Page#And#Link</a></p>
7870 [[Talk:Parser testing]], [[Meta:Disclaimers]]
7872 <p><a href="/index.php?title=Talk:Parser_testing&action=edit&redlink=1" class="new" title="Talk:Parser testing (page does not exist)">Talk:Parser testing</a>, <a href="/index.php?title=Meta:Disclaimers&action=edit&redlink=1" class="new" title="Meta:Disclaimers (page does not exist)">Meta:Disclaimers</a>
7877 Link with space in namespace
7879 [[User talk:Foo bar]]
7881 <p><a href="/index.php?title=User_talk:Foo_bar&action=edit&redlink=1" class="new" title="User talk:Foo bar (page does not exist)">User talk:Foo bar</a>
7886 MemoryAlpha:AlphaTest
7888 This is an article in the MemoryAlpha namespace
7889 (which shadows the memoryalpha interwiki link).
7893 Namespace takes precedence over interwiki link (T53680)
7895 [[MemoryAlpha:AlphaTest]]
7897 <p><a href="/wiki/MemoryAlpha:AlphaTest" title="MemoryAlpha:AlphaTest">MemoryAlpha:AlphaTest</a>
7901 # The previous test doesn't work correctly in html2*, due to not recognizing the
7902 # link as an internal one. This one checks for the correct behavior.
7904 Link to namespace preferred over interwiki with correct rel attribute
7906 parsoid=html2wt,html2html
7908 <p><a rel="mw:WikiLink" href="./MemoryAlpha:AlphaTest" title="MemoryAlpha:AlphaTest">MemoryAlpha:AlphaTest</a></p>
7910 [[MemoryAlpha:AlphaTest]]
7914 Piped link to namespace
7916 [[Meta:Disclaimers|The disclaimers]]
7918 <p><a href="/index.php?title=Meta:Disclaimers&action=edit&redlink=1" class="new" title="Meta:Disclaimers (page does not exist)">The disclaimers</a>
7925 [[Usually caused by a typo (oops}]]
7927 <p>[[Usually caused by a typo (oops}]]
7934 Just a test of an article title containing a percent.
7938 Link containing % (not as a hex sequence)
7941 [[7% Solution|7%25 Solution]]
7943 <p><a href="/wiki/7%25_Solution" title="7% Solution">7% Solution</a>
7944 <a href="/wiki/7%25_Solution" title="7% Solution">7%25 Solution</a>
7947 <p><a rel="mw:WikiLink" href="./7%25_Solution" title="7% Solution">7% Solution</a>
7948 <a rel="mw:WikiLink" href="./7%25_Solution" title="7% Solution">7%25 Solution</a></p>
7951 # note that the parsoid HTML is identical to the previous test output,
7952 # so the previous test ensures that the html2wt mode will generate the
7953 # "not as a hex sequence" wikitext.
7955 Link containing % as a single hex sequence interpreted to char
7957 parsoid=wt2wt,wt2html,html2html
7960 [[7%25 Solution|7%25 Solution]]
7962 <p><a href="/wiki/7%25_Solution" title="7% Solution">7% Solution</a>
7963 <a href="/wiki/7%25_Solution" title="7% Solution">7%25 Solution</a>
7966 <p><a rel="mw:WikiLink" href="./7%25_Solution" title="7% Solution">7% Solution</a>
7967 <a rel="mw:WikiLink" href="./7%25_Solution" title="7% Solution">7%25 Solution</a></p>
7971 Link containing % as a double hex sequence interpreted to hex sequence
7975 <p>[[7%2525 Solution]]
7979 ## Example for such a section: == < ==
7981 Link containing "#<" and "#>" % as a hex sequences- these are valid section anchors
7983 wgFragmentMode=[ 'html5', 'legacy' ]
7985 [[%23%3c]][[%23%3e]]
7987 <p><a href="#<">#<</a><a href="#>">#></a>
7990 <p><a rel="mw:WikiLink" href="./Main_Page#<" title="Main Page" data-parsoid='{"stx":"simple","a":{"href":"./Main_Page#<"},"sa":{"href":"%23%3c"}}'>#<</a><a rel="mw:WikiLink" href="./Main_Page#>" title="Main Page" data-parsoid='{"stx":"simple","a":{"href":"./Main_Page#>"},"sa":{"href":"%23%3e"}}'>#></a></p>
7993 ## Example for such a section: == < ==
7995 Link containing "#<" and "#>" % as a hex sequences- these are valid section anchors (legacy)
7997 wgFragmentMode=[ 'legacy' ]
7999 [[%23%3c]][[%23%3e]]
8001 <p><a href="#.3C">#<</a><a href="#.3E">#></a>
8006 Link containing "<#" and ">#" as a hex sequences
8008 [[%3c%23]][[%3e%23]]
8010 <p>[[%3c%23]][[%3e%23]]
8015 Link containing an equals sign
8017 [[Special:BookSources/isbn=4-00-026157-6]]
8019 <p><a href="/wiki/Special:BookSources/isbn%3D4-00-026157-6" title="Special:BookSources/isbn=4-00-026157-6">Special:BookSources/isbn=4-00-026157-6</a>
8022 <p><a rel="mw:WikiLink" href="./Special:BookSources/isbn=4-00-026157-6" title="Special:BookSources/isbn=4-00-026157-6">Special:BookSources/isbn=4-00-026157-6</a></p>
8028 Just a test of an article title containing a tilde.
8031 # note that links containing signatures, like [[Foo~~~~]], are
8032 # massaged by the pre-save transform (PST) and so the tildes are never
8033 # seen by the parser.
8035 Link containing a tilde
8039 <p><a href="/wiki/Foo~bar" title="Foo~bar">Foo~bar</a>
8042 <p><a rel="mw:WikiLink" href="./Foo~bar" title="Foo~bar">Foo~bar</a></p>
8046 Link containing double-single-quotes '' (T6598)
8048 [[Lista d''e paise d''o munno]]
8050 <p><a href="/index.php?title=Lista_d%27%27e_paise_d%27%27o_munno&action=edit&redlink=1" class="new" title="Lista d''e paise d''o munno (page does not exist)">Lista d''e paise d''o munno</a>
8053 <p><a rel="mw:WikiLink" href="./Lista_d''e_paise_d''o_munno" title="Lista d''e paise d''o munno">Lista d''e paise d''o munno</a></p>
8057 Link containing double quotes and spaces
8061 <p><a href="/index.php?title=Cool_%22Gator%22&action=edit&redlink=1" class="new" title="Cool "Gator" (page does not exist)">Cool "Gator"</a>
8064 <p><a rel="mw:WikiLink" href='./Cool_"Gator"' title='Cool "Gator"'>Cool "Gator"</a></p>
8068 File containing double quotes and spaces
8070 [[File:Cool "Gator".png]]
8072 <p><figure-inline class="mw-default-size" typeof="mw:Error mw:Image" data-parsoid='{"optList":[]}' data-mw='{"errors":[{"key":"apierror-filedoesnotexist","message":"This image does not exist."}]}'><a href="./File:Cool_%22Gator%22.png" data-parsoid='{"a":{"href":"./File:Cool_%22Gator%22.png"},"sa":{"href":"File:Cool \"Gator\".png"}}'><img resource='./File:Cool_"Gator".png' src="./Special:FilePath/Cool_%22Gator%22.png" height="220" width="220" data-parsoid='{"a":{"resource":"./File:Cool_\"Gator\".png","height":"220","width":"220","src":"./Special:FilePath/Cool_%22Gator%22.png"},"sa":{"resource":"File:Cool \"Gator\".png","src":"./Special:FilePath/Cool_\"Gator\".png"}}'/></a></figure-inline></p>
8076 Redirect containing double quotes and spaces
8078 #REDIRECT [[Cool "Gator"]]
8080 <link rel="mw:PageProp/redirect" href="./Cool_%22Gator%22" data-parsoid='{"src":"#REDIRECT ","a":{"href":"./Cool_%22Gator%22"},"sa":{"href":"Cool \"Gator\""}}'/>
8084 Link containing double-single-quotes '' in text (T6598 sanity check)
8086 Some [[Link|pretty ''italics'' and stuff]]!
8088 <p>Some <a href="/index.php?title=Link&action=edit&redlink=1" class="new" title="Link (page does not exist)">pretty <i>italics</i> and stuff</a>!
8091 <p>Some <a rel="mw:WikiLink" href="./Link" title="Link">pretty <i>italics</i> and stuff</a>!</p>
8095 Link containing double-single-quotes '' in text embedded in italics (T6598 sanity check)
8097 ''Some [[Link|pretty ''italics'' and stuff]]!''
8099 <p><i>Some <a href="/index.php?title=Link&action=edit&redlink=1" class="new" title="Link (page does not exist)">pretty <i>italics</i> and stuff</a>!</i>
8104 Link with double quotes in title part (literal) and alternate part (interpreted)
8106 [[File:Denys_Savchenko_''Pentecoste''.jpg]]
8110 [[''Pentecoste''|Pentecoste]]
8112 [[''Pentecoste''|''Pentecoste'']]
8114 <p><a href="/index.php?title=Special:Upload&wpDestFile=Denys_Savchenko_%27%27Pentecoste%27%27.jpg" class="new" title="File:Denys Savchenko ''Pentecoste''.jpg">File:Denys Savchenko <i>Pentecoste</i>.jpg</a>
8115 </p><p><a href="/index.php?title=%27%27Pentecoste%27%27&action=edit&redlink=1" class="new" title="''Pentecoste'' (page does not exist)">''Pentecoste''</a>
8116 </p><p><a href="/index.php?title=%27%27Pentecoste%27%27&action=edit&redlink=1" class="new" title="''Pentecoste'' (page does not exist)">Pentecoste</a>
8117 </p><p><a href="/index.php?title=%27%27Pentecoste%27%27&action=edit&redlink=1" class="new" title="''Pentecoste'' (page does not exist)"><i>Pentecoste</i></a>
8120 <p><figure-inline class="mw-default-size" typeof="mw:Error mw:Image" data-mw='{"errors":[{"key":"apierror-filedoesnotexist","message":"This image does not exist."}]}'><a href="./File:Denys_Savchenko_''Pentecoste''.jpg"><img resource="./File:Denys_Savchenko_''Pentecoste''.jpg" src="./Special:FilePath/Denys_Savchenko_''Pentecoste''.jpg" height="220" width="220"/></a></figure-inline></p>
8121 <p><a rel="mw:WikiLink" href="./''Pentecoste''" title="''Pentecoste''">''Pentecoste''</a></p>
8122 <p><a rel="mw:WikiLink" href="./''Pentecoste''" title="''Pentecoste''">Pentecoste</a></p>
8123 <p><a rel="mw:WikiLink" href="./''Pentecoste''" title="''Pentecoste''"><i>Pentecoste</i></a></p>
8127 Broken image links with HTML captions (T41700)
8129 [[File:Nonexistent|<script></script>]]
8130 [[File:Nonexistent|100x100px|<script></script>]]
8131 [[File:Nonexistent|<]]
8132 [[File:Nonexistent|a<i>b</i>c]]
8134 <p><a href="/index.php?title=Special:Upload&wpDestFile=Nonexistent" class="new" title="File:Nonexistent"><script></script></a>
8135 <a href="/index.php?title=Special:Upload&wpDestFile=Nonexistent" class="new" title="File:Nonexistent"><script></script></a>
8136 <a href="/index.php?title=Special:Upload&wpDestFile=Nonexistent" class="new" title="File:Nonexistent"><</a>
8137 <a href="/index.php?title=Special:Upload&wpDestFile=Nonexistent" class="new" title="File:Nonexistent">abc</a>
8140 <p><figure-inline class="mw-default-size" typeof="mw:Error mw:Image" data-parsoid='{"optList":[{"ck":"caption","ak":"<script></script>"}]}' data-mw='{"errors":[{"key":"apierror-filedoesnotexist","message":"This image does not exist."}],"caption":"&lt;script>&lt;/script>"}'><a href="./File:Nonexistent" data-parsoid='{"a":{"href":"./File:Nonexistent"},"sa":{}}'><img resource="./File:Nonexistent" src="./Special:FilePath/Nonexistent" height="220" width="220" data-parsoid='{"a":{"resource":"./File:Nonexistent","height":"220","width":"220"},"sa":{"resource":"File:Nonexistent"}}'/></a></figure-inline>
8141 <figure-inline typeof="mw:Error mw:Image" data-parsoid='{"optList":[{"ck":"width","ak":"100x100px"},{"ck":"caption","ak":"<script></script>"}]}' data-mw='{"errors":[{"key":"apierror-filedoesnotexist","message":"This image does not exist."}],"caption":"&lt;script>&lt;/script>"}'><a href="./File:Nonexistent" data-parsoid='{"a":{"href":"./File:Nonexistent"},"sa":{}}'><img resource="./File:Nonexistent" src="./Special:FilePath/Nonexistent" height="100" width="100" data-parsoid='{"a":{"resource":"./File:Nonexistent","height":"100","width":"100"},"sa":{"resource":"File:Nonexistent"}}'/></a></figure-inline>
8142 <figure-inline class="mw-default-size" typeof="mw:Error mw:Image" data-parsoid='{"optList":[{"ck":"caption","ak":"&lt;"}]}' data-mw='{"errors":[{"key":"apierror-filedoesnotexist","message":"This image does not exist."}],"caption":"<span typeof=\"mw:Entity\" data-parsoid='{\"src\":\"&amp;lt;\",\"srcContent\":\"&lt;\",\"dsr\":[107,111,null,null]}'>&lt;</span>"}'><a href="./File:Nonexistent" data-parsoid='{"a":{"href":"./File:Nonexistent"},"sa":{}}'><img resource="./File:Nonexistent" src="./Special:FilePath/Nonexistent" height="220" width="220" data-parsoid='{"a":{"resource":"./File:Nonexistent","height":"220","width":"220"},"sa":{"resource":"File:Nonexistent"}}'/></a></figure-inline>
8143 <figure-inline class="mw-default-size" typeof="mw:Error mw:Image" data-parsoid='{"optList":[{"ck":"caption","ak":"a<i>b</i>c"}]}' data-mw='{"errors":[{"key":"apierror-filedoesnotexist","message":"This image does not exist."}],"caption":"a<i data-parsoid='{\"stx\":\"html\",\"dsr\":[134,142,3,4]}'>b</i>c"}'><a href="./File:Nonexistent" data-parsoid='{"a":{"href":"./File:Nonexistent"},"sa":{}}'><img resource="./File:Nonexistent" src="./Special:FilePath/Nonexistent" height="220" width="220" data-parsoid='{"a":{"resource":"./File:Nonexistent","height":"220","width":"220"},"sa":{"resource":"File:Nonexistent"}}'/></a></figure-inline></p>
8149 [[http://www.example.com]]
8151 <p>[<a rel="nofollow" class="external autonumber" href="http://www.example.com">[1]</a>]
8154 <p>[<a rel="mw:ExtLink" class="external autonumber" href="http://www.example.com"></a>]</p>
8158 Plain link to URL with link text
8160 [[http://www.example.com Link text]]
8162 <p>[<a rel="nofollow" class="external text" href="http://www.example.com">Link text</a>]
8167 Plain link to protocol-relative URL
8169 [[//www.example.com]]
8171 <p>[<a rel="nofollow" class="external autonumber" href="//www.example.com">[1]</a>]
8174 <p>[<a rel="mw:ExtLink" class="external autonumber" href="//www.example.com"></a>]</p>
8178 Plain link to protocol-relative URL with link text
8180 [[//www.example.com Link text]]
8182 <p>[<a rel="nofollow" class="external text" href="//www.example.com">Link text</a>]
8187 Plain link to page with question mark in title
8193 <p><a href="/wiki/A%3Fb" title="A?b">A?b</a>
8194 </p><p><a href="/wiki/A%3Fb" title="A?b">Baz</a>
8198 # I'm fairly sure the expected result here is wrong.
8199 # We want these to be URL links, not pseudo-pages with URLs for titles....
8200 # However the current output is also pretty screwy.
8203 # I'm changing it to match the current output--it arguably makes more
8204 # sense in the light of the test above. Old expected result was:
8205 #<p>Piped link to URL: <a href="/index.php?title=Http://www.example.com&action=edit" class="new">an example URL</a>
8207 # But I think this test is bordering on "garbage in, garbage out" anyway.
8212 Piped link to URL: [[http://www.example.com|an example URL]]
8214 <p>Piped link to URL: [<a rel="nofollow" class="external text" href="http://www.example.com%7Can">example URL</a>]
8217 <p>Piped link to URL: [<a rel="mw:ExtLink" class="external text" href="http://www.example.com%7Can" data-parsoid='{"a":{"href":"http://www.example.com%7Can"},"sa":{"href":"http://www.example.com|an"}}'>example URL</a>]</p>
8221 Plain link in template argument
8225 {{echo|[http://www.example.com |123]}}
8227 {{echo|[[http://www.example.com |123]]}}
8229 {{echo|[[http://www.example.com |123]}}
8231 {{echo|[http://www.example.com |123]]}}
8233 <p>[<a rel="nofollow" class="external free" href="http://www.example.com">http://www.example.com</a>
8234 </p><p>[<a rel="nofollow" class="external text" href="http://www.example.com">|123</a>]
8235 </p><p>{{echo|[<a rel="nofollow" class="external text" href="http://www.example.com">|123</a>}}
8236 </p><p>[<a rel="nofollow" class="external free" href="http://www.example.com">http://www.example.com</a>
8239 <p about="#mwt1" typeof="mw:Transclusion" data-mw='{"parts":[{"template":{"target":{"wt":"echo","href":"./Template:Echo"},"params":{"1":{"wt":"[http://www.example.com "},"2":{"wt":"123]"}},"i":0}}]}'>[<a rel="mw:ExtLink" class="external free" href="http://www.example.com">http://www.example.com</a> </p>
8241 <p about="#mwt2" typeof="mw:Transclusion" data-mw='{"parts":[{"template":{"target":{"wt":"echo","href":"./Template:Echo"},"params":{"1":{"wt":"[[http://www.example.com |123]]"}},"i":0}}]}'>[<a rel="mw:ExtLink" class="external text" href="http://www.example.com">|123</a>]</p>
8243 <p>{{echo|[<a rel="mw:ExtLink" class="external text" href="http://www.example.com" data-parsoid='{"targetOff":114,"contentOffsets":[114,118],"dsr":[90,119,24,1]}'>|123</a>}}</p>
8245 <p about="#mwt3" typeof="mw:Transclusion" data-mw='{"parts":[{"template":{"target":{"wt":"echo","href":"./Template:Echo"},"params":{"1":{"wt":"[http://www.example.com "},"2":{"wt":"123]]"}},"i":0}}]}'>[<a rel="mw:ExtLink" class="external free" href="http://www.example.com">http://www.example.com</a> </p>
8249 T2002: [[page|http://url/]] should link to page, not http://url/
8251 [[Main Page|http://url/]]
8253 <p><a href="/wiki/Main_Page" title="Main Page">http://url/</a>
8256 <p><a rel="mw:WikiLink" href="./Main_Page" title="Main Page">http://url/</a></p>
8259 # Parsoid does not mark self-links, by design.
8261 T2337: Escaped self-links should be bold
8265 [[Bug462]] [[Bug462]]
8267 <p><a class="mw-selflink selflink">Bug462</a> <a class="mw-selflink selflink">Bug462</a>
8270 <p><a rel="mw:WikiLink" href="./Bug462" title="Bug462">Bug462</a> <a rel="mw:WikiLink" href="./Bug462" title="Bug462">Bug462</a></p>
8274 Self-link to section should not be bold
8278 [[Main Page#section]]
8280 <p><a href="/wiki/Main_Page#section" title="Main Page">Main Page#section</a>
8291 Self-link to numeric title
8297 <p><a class="mw-selflink selflink">0</a>
8302 Link to numeric-equivalent title
8308 <p><a href="/wiki/00" title="00">00</a>
8313 <nowiki> inside a link
8315 [[Main<nowiki> Page</nowiki>]] [[Main Page|the main page <nowiki>[it's not very good]</nowiki>]]
8317 <p>[[Main Page]] <a href="/wiki/Main_Page" title="Main Page">the main page [it's not very good]</a>
8322 Non-breaking spaces in title
8324 [[ Main Page ]]
8326 <p><a href="/wiki/Main_Page" title="Main Page">  Main   Page  </a>
8330 # Add new article for the test below so that it doesn't red-link
8338 Multiple spaces in titles should normalize to a single underscore
8340 parsoid=wt2html,wt2wt
8346 <p><a href="/wiki/Foo_bar_baz" title="Foo bar baz">x</a>
8347 <a href="/wiki/Foo_bar_baz" title="Foo bar baz">x</a>
8348 <a href="/wiki/Foo_bar_baz" title="Foo bar baz">x</a>
8351 <p><a rel="mw:WikiLink" href="./Foo_bar_baz" title="Foo bar baz">x</a>
8352 <a rel="mw:WikiLink" href="./Foo_bar_baz" title="Foo bar baz">x</a>
8353 <a rel="mw:WikiLink" href="./Foo_bar_baz" title="Foo bar baz">x</a>
8358 Internal link with ca linktrail, surrounded by bold apostrophes (T29473 primary issue)
8364 <p><b><a href="/wiki/Main_Page" title="Main Page">Main Page</a></b>
8369 Internal link with ca linktrail, surrounded by italic apostrophes (T29473 primary issue)
8375 <p><i><a href="/wiki/Main_Page" title="Main Page">Main Page</a></i>
8380 Internal link with en linktrail: no apostrophes (T29473)
8386 <p><a href="/index.php?title=Something&action=edit&redlink=1" class="new" title="Something (page does not exist)">Something</a>'nice
8391 Internal link with ca linktrail with apostrophes (T29473)
8397 <p><a href="/index.php?title=Something&action=edit&redlink=1" class="new" title="Something (encara no existeix)">Something'nice</a>
8402 Internal link with kaa linktrail with apostrophes (T29473)
8408 <p><a href="/index.php?title=Something&action=edit&redlink=1" class="new" title="Something (bet ele jaratılmag'an)">Something'nice</a>
8413 Link with multiple ":" in a subpage-supporting namespace (T65636)
8415 [[User:Foo/Test/63636:Bar|Test]]
8417 <p><a href="/index.php?title=User:Foo/Test/63636:Bar&action=edit&redlink=1" class="new" title="User:Foo/Test/63636:Bar (page does not exist)">Test</a>
8420 <p><a rel="mw:WikiLink" href="./User:Foo/Test/63636:Bar" title="User:Foo/Test/63636:Bar">Test</a></p>
8423 ## Mainly a sanity check for Parsoid
8425 Handle title parsing for subpages
8445 Link to a subpage from a namespace other than main
8452 <p><a href="/wiki/User:Test/123" title="User:Test/123">/123</a>
8455 <p><a rel="mw:WikiLink" href="./User:Test/123" title="User:Test/123" data-parsoid='{"stx":"simple","a":{"href":"./User:Test/123"},"sa":{"href":"/123"}}'>/123</a></p>
8459 Ensure that transclusion titles are not url-decoded
8461 subpage title=[[Test]]
8464 {{Bar%C3%A9}} {{/Bar%C3%A9}}
8466 <p>{{Bar%C3%A9}} {{/Bar%C3%A9}}
8469 <p>{{Bar%C3%A9}} {{/Bar%C3%A9}}</p>
8473 Purely hash wikilink
8475 title=[[User:Test/123]]
8480 <p><a href="#a">b</a>
8483 <p><a rel="mw:WikiLink" href="./User:Test/123#a" data-parsoid='{"stx":"piped","a":{"href":"./User:Test/123#a"},"sa":{"href":"#a"}}'>b</a></p>
8487 Serialization of purely hash wikilink
8489 title=[[User:Test/123]]
8493 <p><a href="#a">[[</a></p>
8495 [[#a|<nowiki>[[</nowiki>]]
8497 <p><a href="#a">[[</a>
8502 1. Interaction of linktrail and template encapsulation
8506 <p><a rel="mw:WikiLink" href="./Foo" title="Foo" typeof="mw:Transclusion" data-mw='{"parts":[{"template":{"target":{"wt":"echo","href":"./Template:Echo"},"params":{"1":{"wt":"[[Foo]]"}},"i":0}},"l"]}'>Fool</a></p>
8510 2. Interaction of linktrail and template encapsulation
8514 {{echo|Some [[Fool]]}}s
8516 <p><span about="#mwt1" typeof="mw:Transclusion" data-mw='{"parts":[{"template":{"target":{"wt":"echo","href":"./Template:Echo"},"params":{"1":{"wt":"Some [[Fool]]"}},"i":0}},"s"]}' data-parsoid='{"pi":[[{"k":"1"}]]}'>Some </span><a rel="mw:WikiLink" href="./Fool" title="Fool" about="#mwt1" data-parsoid='{"stx":"simple","a":{"href":"./Fool"},"sa":{"href":"Fool"},"tail":"s"}'>Fools</a></p>
8520 3. Interaction of linktrail and template encapsulation
8524 {{echo|Some [[Fool]]s are '''bold and foolish'''}}
8526 <p about="#mwt1" typeof="mw:Transclusion" data-mw='{"parts":[{"template":{"target":{"wt":"echo","href":"./Template:Echo"},"params":{"1":{"wt":"Some [[Fool]]s are '''bold and foolish'''"}},"i":0}}]}' data-parsoid='{"pi":[[{"k":"1"}]]}'>Some <a rel="mw:WikiLink" href="./Fool" title="Fool" data-parsoid='{"stx":"simple","a":{"href":"./Fool"},"sa":{"href":"Fool"},"tail":"s"}'>Fools</a> are <b>bold and foolish</b></p>
8536 Internal link with is link prefix
8540 Aðrir mótmælenda[[söfnuður|söfnuðir]] og
8542 <p>Aðrir <a href="/wiki/S%C3%B6fnu%C3%B0ur" title="Söfnuður">mótmælendasöfnuðir</a> og
8553 Internal link with is link trail and link prefix
8557 [[mótmælendatrú|xxx]]ar
8559 mótmælenda[[söfnuður]]
8560 mótmælenda[[söfnuður|söfnuðir]]
8561 mótmælenda[[söfnuður|söfnuðir]]xxx
8563 <p><a href="/wiki/M%C3%B3tm%C3%A6lendatr%C3%BA" title="Mótmælendatrú">xxxar</a>
8564 <a href="/wiki/M%C3%B3tm%C3%A6lendatr%C3%BA" title="Mótmælendatrú">mótmælendatrúar</a>
8565 <a href="/wiki/S%C3%B6fnu%C3%B0ur" title="Söfnuður">mótmælendasöfnuður</a>
8566 <a href="/wiki/S%C3%B6fnu%C3%B0ur" title="Söfnuður">mótmælendasöfnuðir</a>
8567 <a href="/wiki/S%C3%B6fnu%C3%B0ur" title="Söfnuður">mótmælendasöfnuðirxxx</a>
8572 Parsoid link trail escaping
8574 parsoid=html2wt,html2html
8576 <p><a rel="mw:WikiLink" href="./Apple" title="Apple">apple</a>s</p>
8582 Parsoid link prefix escaping
8585 parsoid=html2wt,html2html
8587 <p>Aðrir mótmælenda<a rel="mw:WikiLink" href="./Söfnuður" title="Söfnuður">söfnuður</a></p>
8589 Aðrir mótmælenda<nowiki/>[[söfnuður]]
8593 Parsoid link bracket escaping
8595 parsoid=html2wt,html2html
8597 <p><a rel="mw:WikiLink" href="./Test" title="Test">Test</a></p>
8598 <p>[<a rel="mw:WikiLink" href="./Test" title="Test">Test</a>]</p>
8599 <p>[[<a rel="mw:WikiLink" href="./Test" title="Test">Test</a>]]</p>
8600 <p>[[[<a rel="mw:WikiLink" href="./Test" title="Test">Test</a>]]]</p>
8601 <p>[[[[<a rel="mw:WikiLink" href="./Test" title="Test">Test</a>]]]]</p>
8602 <p>[[[[[<a rel="mw:WikiLink" href="./Test" title="Test">Test</a>]]]]]</p>
8610 [[[<nowiki/>[[Test]]]]]
8614 [[[[[<nowiki/>[[Test]]]]]]]
8618 Parsoid-centric test: Whitespace in ext- and wiki-links should be preserved
8626 [http://wp.org ''foo'']
8628 <p><a href="/wiki/Foo" title="Foo"> bar</a>
8629 </p><p><a href="/wiki/Foo" title="Foo"> <i>bar</i></a>
8630 </p><p><a rel="nofollow" class="external text" href="http://wp.org">foo</a>
8631 </p><p><a rel="nofollow" class="external text" href="http://wp.org"><i>foo</i></a>
8636 Parsoid: Scoped parsing should handle mixed transclusions and plain text
8638 [[Foo|{{echo|a}} b {{echo|c}}]]
8640 <p><a rel="mw:WikiLink" href="./Foo" title="Foo"><span about="#mwt2" typeof="mw:Transclusion" data-mw='{"parts":[{"template":{"target":{"wt":"echo","href":"./Template:Echo"},"params":{"1":{"wt":"a"}},"i":0}}]}'>a</span> b <span about="#mwt3" typeof="mw:Transclusion" data-mw='{"parts":[{"template":{"target":{"wt":"echo","href":"./Template:Echo"},"params":{"1":{"wt":"c"}},"i":0}}]}'>c</span></a></p>
8644 Link with angle bracket after anchor
8646 wgFragmentMode=[ 'html5', 'legacy' ]
8650 <p><a href="/wiki/Foo#<bar>" title="Foo">Foo#<bar></a>
8653 <p><a rel="mw:WikiLink" href="./Foo#<bar>" title="Foo" data-parsoid='{"stx":"simple","a":{"href":"./Foo#<bar>"},"sa":{"href":"Foo#<bar>"}}'>Foo#<bar></a></p>
8657 Link with angle bracket after anchor (legacy)
8659 wgFragmentMode=[ 'legacy' ]
8663 <p><a href="/wiki/Foo#.3Cbar.3E" title="Foo">Foo#<bar></a>
8668 ### Interwiki links (see maintenance/interwiki.sql)
8672 Inline interwiki link
8674 parsoid=wt2html,wt2wt,html2html
8676 [[MeatBall:SoftSecurity]]
8678 <p><a href="http://www.usemod.com/cgi-bin/mb.pl?SoftSecurity" class="extiw" title="meatball:SoftSecurity">MeatBall:SoftSecurity</a>
8681 <p><a rel="mw:WikiLink/Interwiki" href="http://www.usemod.com/cgi-bin/mb.pl?SoftSecurity" title="meatball:SoftSecurity">MeatBall:SoftSecurity</a></p>
8685 Inline interwiki link with empty title (T4372)
8687 parsoid=wt2html,wt2wt,html2html
8691 <p><a href="http://www.usemod.com/cgi-bin/mb.pl" class="extiw" title="meatball:">MeatBall:</a>
8694 <p><a rel="mw:WikiLink/Interwiki" href="http://www.usemod.com/cgi-bin/mb.pl?" title="meatball:">MeatBall:</a></p>
8697 ## html2wt and html2html will fail because we will prefer the :en: interwiki prefix over wikipedia:
8699 Interwiki link encoding conversion (T3636)
8701 parsoid=wt2html,wt2wt
8703 *[[Wikipedia:ro:Olteniţa]]
8704 *[[Wikipedia:ro:Olteniţa]]
8706 <ul><li><a href="http://en.wikipedia.org/wiki/ro:Olteni%C5%A3a" class="extiw" title="wikipedia:ro:Olteniţa">Wikipedia:ro:Olteniţa</a></li>
8707 <li><a href="http://en.wikipedia.org/wiki/ro:Olteni%C5%A3a" class="extiw" title="wikipedia:ro:Olteniţa">Wikipedia:ro:Olteniţa</a></li></ul>
8711 <li><a href="http://en.wikipedia.org/wiki/ro:Olteni%C5%A3a" class="extiw" title="wikipedia:ro:Olteniţa">Wikipedia:ro:Olteniţa</a></li>
8712 <li><a href="http://en.wikipedia.org/wiki/ro:Olteni%C5%A3a" class="extiw" title="wikipedia:ro:Olteniţa">Wikipedia:ro:Olteniţa</a></li>
8716 <li><a rel="mw:WikiLink/Interwiki" href="http://en.wikipedia.org/wiki/ro:Olteniţa" title="wikipedia:ro:Olteniţa">Wikipedia:ro:Olteniţa</a></li>
8717 <li><a rel="mw:WikiLink/Interwiki" href="http://en.wikipedia.org/wiki/ro:Olteniţa" title="wikipedia:ro:Olteniţa">Wikipedia:ro:Olteniţa</a></li>
8722 Interwiki link with fragment (T4130)
8724 [[MeatBall:SoftSecurity#foo]]
8726 <p><a href="http://www.usemod.com/cgi-bin/mb.pl?SoftSecurity#foo" class="extiw" title="meatball:SoftSecurity">MeatBall:SoftSecurity#foo</a>
8731 Link scenarios with escaped fragments
8733 wgFragmentMode=[ 'html5', 'legacy' ]
8736 [[Foo#Is this great?]]
8737 [[meatball:Foo#Is this great?]]
8739 <p><a href="#Is_this_great?">#Is this great?</a>
8740 <a href="/wiki/Foo#Is_this_great?" title="Foo">Foo#Is this great?</a>
8741 <a href="http://www.usemod.com/cgi-bin/mb.pl?Foo#Is_this_great.3F" class="extiw" title="meatball:Foo">meatball:Foo#Is this great?</a>
8744 <p><a rel="mw:WikiLink" href="./Main_Page#Is_this_great?" data-parsoid='{"stx":"simple","a":{"href":"./Main_Page#Is_this_great?"},"sa":{"href":"#Is this great?"}}'>#Is this great?</a>
8745 <a rel="mw:WikiLink" href="./Foo#Is_this_great?" title="Foo" data-parsoid='{"stx":"simple","a":{"href":"./Foo#Is_this_great?"},"sa":{"href":"Foo#Is this great?"}}'>Foo#Is this great?</a>
8746 <a rel="mw:WikiLink/Interwiki" href="http://www.usemod.com/cgi-bin/mb.pl?Foo#Is_this_great?" title="meatball:Foo" data-parsoid='{"stx":"simple","a":{"href":"http://www.usemod.com/cgi-bin/mb.pl?Foo#Is_this_great?"},"sa":{"href":"meatball:Foo#Is this great?"},"isIW":true}'>meatball:Foo#Is this great?</a></p>
8750 Link scenarios with escaped fragments (legacy)
8752 wgFragmentMode=[ 'legacy' ]
8755 [[Foo#Is this great?]]
8756 [[meatball:Foo#Is this great?]]
8758 <p><a href="#Is_this_great.3F">#Is this great?</a>
8759 <a href="/wiki/Foo#Is_this_great.3F" title="Foo">Foo#Is this great?</a>
8760 <a href="http://www.usemod.com/cgi-bin/mb.pl?Foo#Is_this_great.3F" class="extiw" title="meatball:Foo">meatball:Foo#Is this great?</a>
8764 # Ideally the wikipedia: prefix here should be proto-relative too
8765 # [CSA]: this is kind of a bogus test, as the PHP parser test doesn't
8766 # define the 'en' prefix, and originally the test used 'wikipedia',
8767 # which isn't a localinterwiki prefix hence the links to the 'en:Foo'
8770 Different interwiki prefixes mapping to the same URL
8778 [[:wikipedia:Foo|Foo]]
8780 [[wikipedia:en:Foo]]
8782 [[:wikipedia:en:Foo]]
8786 <p><a rel="mw:WikiLink/Interwiki" href="//en.wikipedia.org/wiki/Foo" data-parsoid='{"stx":"simple","a":{"href":"//en.wikipedia.org/wiki/Foo"},"sa":{"href":":en:Foo"},"isIW":true}' title="en:Foo">en:Foo</a></p>
8788 <p><a rel="mw:WikiLink/Interwiki" href="//en.wikipedia.org/wiki/Foo" data-parsoid='{"stx":"piped","a":{"href":"//en.wikipedia.org/wiki/Foo"},"sa":{"href":":en:Foo"},"isIW":true}' title="en:Foo">Foo</a></p>
8790 <p><a rel="mw:WikiLink/Interwiki" href="http://en.wikipedia.org/wiki/Foo" data-parsoid='{"stx":"simple","a":{"href":"http://en.wikipedia.org/wiki/Foo"},"sa":{"href":"wikipedia:Foo"},"isIW":true}' title="wikipedia:Foo">wikipedia:Foo</a></p>
8792 <p><a rel="mw:WikiLink/Interwiki" href="http://en.wikipedia.org/wiki/Foo" data-parsoid='{"stx":"piped","a":{"href":"http://en.wikipedia.org/wiki/Foo"},"sa":{"href":":wikipedia:Foo"},"isIW":true}' title="wikipedia:Foo">Foo</a></p>
8794 <p><a rel="mw:WikiLink/Interwiki" href="http://en.wikipedia.org/wiki/en:Foo" data-parsoid='{"stx":"simple","a":{"href":"http://en.wikipedia.org/wiki/en:Foo"},"sa":{"href":"wikipedia:en:Foo"},"isIW":true}' title="wikipedia:en:Foo">wikipedia:en:Foo</a></p>
8796 <p><a rel="mw:WikiLink/Interwiki" href="http://en.wikipedia.org/wiki/en:Foo" data-parsoid='{"stx":"simple","a":{"href":"http://en.wikipedia.org/wiki/en:Foo"},"sa":{"href":":wikipedia:en:Foo"},"isIW":true}' title="wikipedia:en:Foo">wikipedia:en:Foo</a></p>
8798 <p><a rel="mw:WikiLink/Interwiki" href="http://en.wikipedia.org/wiki/Foo" data-parsoid='{"stx":"simple","a":{"href":"http://en.wikipedia.org/wiki/Foo"},"sa":{"href":" wikiPEdia :Foo"},"isIW":true}' title="wikipedia:Foo"> wikiPEdia :Foo</a></p>
8802 Interwiki links that cannot be represented in wiki syntax
8805 [[meatball:ok#foo|ok with fragment]]
8806 [[meatball:ok_as_well?|ok ending with ? mark]]
8807 [http://de.wikipedia.org/wiki/Foo?action=history has query]
8808 [http://de.wikipedia.org/wiki/#foo is just fragment]
8811 <p><a href="http://www.usemod.com/cgi-bin/mb.pl?ok" class="extiw" title="meatball:ok">meatball:ok</a>
8812 <a href="http://www.usemod.com/cgi-bin/mb.pl?ok#foo" class="extiw" title="meatball:ok">ok with fragment</a>
8813 <a href="http://www.usemod.com/cgi-bin/mb.pl?ok_as_well%3F" class="extiw" title="meatball:ok as well?">ok ending with ? mark</a>
8814 <a rel="nofollow" class="external text" href="http://de.wikipedia.org/wiki/Foo?action=history">has query</a>
8815 <a rel="nofollow" class="external text" href="http://de.wikipedia.org/wiki/#foo">is just fragment</a>
8818 <p><a rel="mw:WikiLink/Interwiki" href="http://www.usemod.com/cgi-bin/mb.pl?ok" title="meatball:ok">meatball:ok</a>
8819 <a rel="mw:WikiLink/Interwiki" href="http://www.usemod.com/cgi-bin/mb.pl?ok#foo" title="meatball:ok">ok with fragment</a>
8820 <a rel="mw:WikiLink/Interwiki" href="http://www.usemod.com/cgi-bin/mb.pl?ok_as_well%3F" title="meatball:ok as well?">ok ending with ? mark</a>
8821 <a rel="mw:ExtLink" class="external text" href="http://de.wikipedia.org/wiki/Foo?action=history">has query</a>
8822 <a rel="mw:ExtLink" class="external text" href="http://de.wikipedia.org/wiki/#foo">is just fragment</a></p>
8826 Interwiki links: trail
8828 [[wikipedia:Foo|Ba]]r
8830 <p><a href="http://en.wikipedia.org/wiki/Foo" class="extiw" title="wikipedia:Foo">Bar</a>
8833 <p><a rel="mw:WikiLink/Interwiki" href="http://en.wikipedia.org/wiki/Foo" data-parsoid='{"stx":"piped","a":{"href":"http://en.wikipedia.org/wiki/Foo"},"sa":{"href":"wikipedia:Foo"},"isIW":true,"tail":"r"}' title="wikipedia:Foo">Bar</a></p>
8837 Local interwiki link
8839 parsoid=wt2html,wt2wt,html2html
8841 [[local:Template:Foo]]
8843 <p><a href="/wiki/Template:Foo" title="Template:Foo">local:Template:Foo</a>
8846 <p><a rel="mw:WikiLink" href="./Template:Foo" title="Template:Foo">local:Template:Foo</a></p>
8849 # Parsoid does not mark self-links, by design.
8851 Local interwiki link: self-link to current page
8854 parsoid=wt2html,wt2wt,html2html
8858 <p><a class="mw-selflink selflink">local:Main Page</a>
8861 <p><a rel="mw:WikiLink" href="./Main_Page" title="Main Page">local:Main Page</a></p>
8865 Local interwiki link: prefix only (T66167)
8867 parsoid=wt2html,wt2wt,html2html
8871 <p><a href="/wiki/Main_Page" title="Main Page">local:</a>
8874 <p><a rel="mw:WikiLink" href="./Main_Page" title="Main Page">local:</a></p>
8878 Local interwiki link: with additional interwiki prefix (T63357)
8880 parsoid=wt2html,wt2wt,html2html
8882 [[local:meatball:Hello]]
8884 <p><a href="http://www.usemod.com/cgi-bin/mb.pl?Hello" class="extiw" title="meatball:Hello">local:meatball:Hello</a>
8887 <p><a rel="mw:WikiLink/Interwiki" href="http://www.usemod.com/cgi-bin/mb.pl?Hello" title="meatball:Hello">local:meatball:Hello</a></p>
8891 Multiple local interwiki link prefixes
8893 [[local:local:local:local:mi:local:Foo]]
8895 parsoid=wt2html,wt2wt,html2html
8897 <p><a href="/wiki/Foo" title="Foo">local:local:local:local:mi:local:Foo</a>
8900 <p><a rel="mw:WikiLink" href="./Foo" title="Foo">local:local:local:local:mi:local:Foo</a></p>
8904 Interwiki link with percent encoded target
8906 [[:es:Nueva Guip%C3%BAzcoa|Nueva Guipúzcoa]]
8908 <p><a href="http://es.wikipedia.org/wiki/Nueva_Guip%C3%BAzcoa" class="extiw" title="es:Nueva Guipúzcoa">Nueva Guipúzcoa</a>
8911 <p><a rel="mw:WikiLink/Interwiki" href="http://es.wikipedia.org/wiki/Nueva%20Guipúzcoa" title="es:Nueva Guipúzcoa" data-parsoid='{"stx":"piped","a":{"href":"http://es.wikipedia.org/wiki/Nueva%20Guipúzcoa"},"sa":{"href":":es:Nueva Guip%C3%BAzcoa"},"isIW":true}'>Nueva Guipúzcoa</a></p>
8915 ### Interlanguage links
8916 ### Language links (so that searching for '### language' matches..)
8928 <p>Blah blah blah</p>
8929 <link rel="mw:PageProp/Language" href="http://zh.wikipedia.org/wiki/Chinese"/>
8932 ## parsoid html2wt will lose the space variations
8934 Interlanguage link with spacing
8936 parsoid=wt2html,wt2wt,html2html
8944 <p>Blah blah blah</p>
8945 <link rel="mw:PageProp/Language" href="http://zh.wikipedia.org/wiki/Chinese"/>
8949 Double interlanguage link
8958 <p>Blah blah blah</p>
8959 <link rel="mw:PageProp/Language" href="http://es.wikipedia.org/wiki/Spanish"/>
8960 <link rel="mw:PageProp/Language" href="http://zh.wikipedia.org/wiki/Chinese"/>
8963 ## parsoid html2wt will lose the space variations
8965 Interlanguage link variations
8967 parsoid=wt2html,wt2wt,html2html
8977 <p>Blah blah blah</p>
8978 <link rel="mw:PageProp/Language" href="http://es.wikipedia.org/wiki/Spanish" />
8979 <link rel="mw:PageProp/Language" href="http://zh.wikipedia.org/wiki/Chinese" />
8980 <link rel="mw:PageProp/Language" href="http://es.wikipedia.org/wiki/Foo_bar" />
8984 Escaping of interlanguage links (T129218, T156308)
8988 [[ : zh : Chinese ]]
8991 <a href="http://es.wikipedia.org/wiki/Spanish" class="extiw" title="es:Spanish">es:Spanish</a>
8992 <a href="http://zh.wikipedia.org/wiki/Chinese" class="extiw" title="zh:Chinese"> zh : Chinese </a>
8996 <a rel="mw:WikiLink/Interwiki" href="http://es.wikipedia.org/wiki/Spanish" title="es:Spanish">es:Spanish</a>
8997 <a rel="mw:WikiLink/Interwiki" href="http://zh.wikipedia.org/wiki/Chinese" title="zh:Chinese"> zh : Chinese </a></p>
9001 Multiple colons escaping interlanguage links
9009 <p><a href="http://es.wikipedia.org/wiki/Spanish" class="extiw" title="es:Spanish">es:Spanish</a>
9014 <p><a rel="mw:WikiLink/Interwiki" href="http://es.wikipedia.org/wiki/Spanish" title="es:Spanish">es:Spanish</a>
9016 [[:::es:Spanish]]</p>
9019 ## parsoid html2wt will normalize the space to _
9021 Space and question mark encoding in interlanguage links (T95473)
9023 parsoid=wt2html,wt2wt,html2html
9031 <p>Blah blah blah</p>
9032 <link rel="mw:PageProp/Language" href="http://es.wikipedia.org/wiki/Foo_bar%3F" />
9036 Interlanguage link, with prefix links
9046 <p>Blah blah blah</p>
9047 <link rel="mw:PageProp/Language" href="http://zh.wikipedia.org/wiki/Chinese"/>
9051 Double interlanguage link, with prefix links (T10897)
9062 <p>Blah blah blah</p>
9063 <link rel="mw:PageProp/Language" href="http://es.wikipedia.org/wiki/Spanish"/>
9064 <link rel="mw:PageProp/Language" href="http://zh.wikipedia.org/wiki/Chinese"/>
9068 "Extra" interlanguage links (T34189 / gerrit 111390)
9076 <p>Blah blah blah</p>
9077 <link rel="mw:PageProp/Language" title="Multilingual" href="http://wikisource.org/wiki/Article"/>
9080 ## PHP parser tests script needs an update
9081 ## Parsoid html2wt will normalize output to [[:zh:Chinese]]
9083 Language links render as inline links if $wgInterwikiMagic=false
9085 wgInterwikiMagic=false
9086 parsoid=wt2html,wt2wt,html2html
9091 <p>Blah blah blah <a rel="mw:WikiLink/Interwiki" href="http://zh.wikipedia.org/wiki/Chinese" title="zh:Chinese">zh:Chinese</a></p>
9094 ## PHP parser tests script needs an update
9095 ## Parsoid html2wt will normalize output to [[:zh:Chinese]]
9097 Language links render as inline links in the Talk namespace
9100 parsoid=wt2html,wt2wt,html2html
9105 <p>Blah blah blah <a rel="mw:WikiLink/Interwiki" href="http://zh.wikipedia.org/wiki/Chinese" title="zh:Chinese">zh:Chinese</a></p>
9109 Parsoid-specific test: Wikilinks with should RT properly
9115 <p><a href="/index.php?title=WW_II&action=edit&redlink=1" class="new" title="WW II (lonkásá ezalí tɛ̂)">WW II</a>
9120 Parsoid T55221: Wikilinks should be properly entity-escaped
9122 parsoid={ "modes": ["html2wt"], "suppressErrors": true }
9124 <p>He&nbsp;llo <a href="./Foo" rel="mw:WikiLink">He&nbsp;llo</a></p>
9125 <p>He&nbsp;llo <a href="./He&nbsp;llo" rel="mw:WikiLink">He&nbsp;llo</a></p>
9127 He&nbsp;llo [[Foo|He&nbsp;llo]]
9129 He&nbsp;llo He&nbsp;llo
9131 <p>He&nbsp;llo <a href="/wiki/Foo" title="Foo">He&nbsp;llo</a>
9132 </p><p>He&nbsp;llo He&nbsp;llo
9136 # html2wt will fail because of title normalization without data-parsoid
9138 Parsoid: handle constructor well
9140 parsoid=wt2html,wt2wt
9146 <p><a href="/index.php?title=Constructor&action=edit&redlink=1" class="new" title="Constructor (page does not exist)">constructor</a>
9147 </p><p><a href="/index.php?title=Constructor:foo&action=edit&redlink=1" class="new" title="Constructor:foo (page does not exist)">constructor:foo</a>
9150 <p><a rel="mw:WikiLink" href="./Constructor" title="Constructor" data-parsoid='{"stx":"simple","a":{"href":"./Constructor"},"sa":{"href":"constructor"}}'>constructor</a></p>
9152 <p><a rel="mw:WikiLink" href="./Constructor:foo" title="Constructor:foo" data-parsoid='{"stx":"simple","a":{"href":"./Constructor:foo"},"sa":{"href":"constructor:foo"}}'>constructor:foo</a></p>
9156 Template parameter named "constructor"
9158 {{echo| constructor = |hi}}
9160 <p about="#mwt1" typeof="mw:Transclusion" data-parsoid='{"pi":[[{"k":"constructor","named":true,"spc":[" "," ",""," "]},{"k":"1"}]]}' data-mw='{"parts":[{"template":{"target":{"wt":"echo","href":"./Template:Echo"},"params":{"1":{"wt":"hi"},"constructor":{"wt":""}},"i":0}}]}'>hi</p>
9169 # Note that `ko` isn't a known interlanguage prefix
9171 Parsoid: recognize interlanguage links without a target page
9181 <link rel="mw:PageProp/Language" href="http://es.wikipedia.org/wiki/"/>
9183 <p><a rel="mw:WikiLink" href="./Ko:" title="Ko:">ko:</a></p>
9186 # Note that `ko` isn't a known interwiki prefix
9188 Parsoid: recognize interwiki links without a target page
9190 parsoid=wt2html,wt2wt,html2html
9196 <p><a href="http://es.wikipedia.org/wiki/" class="extiw" title="es:">es:</a>
9197 </p><p><a href="/wiki/Ko:" title="Ko:">ko:</a>
9200 <p><a rel="mw:WikiLink/Interwiki" href="http://es.wikipedia.org/wiki/" title="es:">es:</a></p>
9201 <p><a rel="mw:WikiLink" href="./Ko:" title="Ko:">ko:</a></p>
9205 Handle interwiki links pointing to the current wiki as plain wiki links (T47209)
9209 <p><a href="/wiki/Foo" title="Foo">mi:Foo</a>
9212 <p><a rel="mw:WikiLink" href="./Foo" title="Foo" data-parsoid='{"stx":"simple","a":{"href":"./Foo"},"sa":{"href":"mi:Foo"}}'>mi:Foo</a></p>
9216 Interlanguage link with preceding local interwiki link (T70085)
9218 parsoid=wt2html,wt2wt,html2html
9221 [[local:es:Spanish]]
9224 <a href="http://es.wikipedia.org/wiki/Spanish" class="extiw" title="es:Spanish">local:es:Spanish</a>
9228 <a rel="mw:WikiLink/Interwiki" href="http://es.wikipedia.org/wiki/Spanish" title="es:Spanish">local:es:Spanish</a></p>
9232 Looks like an interlanguage link, but is actually a local interwiki
9234 parsoid=wt2html,wt2wt,html2html
9240 <a href="/wiki/Template:Foo" title="Template:Foo">mi:Template:Foo</a>
9244 <a rel="mw:WikiLink" href="./Template:Foo" title="Template:Foo">mi:Template:Foo</a></p>
9248 ### Redirects, Parsoid-only
9252 1. Simple redirect to page
9254 #REDIRECT [[Main Page]]
9256 <link rel="mw:PageProp/redirect" href="./Main_Page"/>
9260 2. Other redirect variants
9262 #REDIRECT [[Main_Page]]
9264 <link rel="mw:PageProp/redirect" href="./Main_Page" data-parsoid='{"src":"#REDIRECT ","a":{"href":"./Main_Page"},"sa":{"href":"Main_Page"}}'/>
9267 # Not a valid redirect in PHP (although perhaps it was, once upon a time)
9268 # This tests the Parsoid bail-out code.
9270 3. Other redirect variants
9274 #REDIRECT [[<nowiki>[[Bar]]</nowiki>]]
9276 <ol><li>REDIRECT [[<span typeof="mw:Nowiki">[[Bar]]</span>]]</li></ol>
9280 4. Redirect to a templated destination
9282 #REDIRECT [[{{echo|Foo}}bar]]
9284 <link about="#mwt2" typeof="mw:ExpandedAttrs" rel="mw:PageProp/redirect" href="./Foobar" data-parsoid='{"a":{"href":"./Foobar"},"sa":{"href":"{{echo|Foo}}bar"}}' data-mw='{"attribs":[[{"txt":"href"},{"html":"<span about=\"#mwt1\" typeof=\"mw:Transclusion\" data-parsoid='{\"pi\":[[{\"k\":\"1\"}]],\"dsr\":[12,24,null,null]}' data-mw='{\"parts\":[{\"template\":{\"target\":{\"wt\":\"echo\",\"href\":\"./Template:Echo\"},\"params\":{\"1\":{\"wt\":\"Foo\"}},\"i\":0}}]}'>Foo</span>bar"}]]}'/>
9290 parsoid=wt2html,wt2wt
9295 <li>REDIRECT [[]]</li></ol>
9299 Optional colon in #REDIRECT
9301 # the colon is archaic syntax. we support it for wt2html, but we
9302 # don't care that it roundtrips back to the modern syntax.
9303 parsoid=wt2html,html2html
9305 #REDIRECT:[[Main Page]]
9307 <link rel="mw:PageProp/redirect" href="./Main_Page"/>
9311 Whitespace in #REDIRECT with optional colon
9313 # the colon and gratuitous whitespace is archaic syntax. we support
9314 # it for wt2html, but we don't care that it roundtrips back to the
9315 # modern syntax (without extra whitespace)
9316 parsoid=wt2html,html2html
9323 <link rel="mw:PageProp/redirect" href="./Main_Page"/>
9327 Piped link in #REDIRECT
9329 # content after piped link is ignored. we support this syntax,
9330 # but don't care that the piped link is lost when we roundtrip this.
9333 #REDIRECT [[Main Page|bar]]
9335 <link rel="mw:PageProp/redirect" href="./Main_Page"/>
9339 Redirect to category (T104502)
9341 parsoid=wt2html,wt2wt
9343 #REDIRECT [[Category:Foo]]
9345 <link rel="mw:PageProp/redirect" href="./Category:Foo"/>
9349 Redirect to category with URL encoding (T104502)
9353 #REDIRECT [[Category%3AFoo]]
9355 <link rel="mw:PageProp/redirect" href="./Category:Foo"/>
9359 Redirect to category page
9361 #REDIRECT [[:Category:Foo]]
9363 <link rel="mw:PageProp/redirect" href="./Category:Foo"/>
9367 Redirect to image page (1)
9369 #REDIRECT [[File:Wiki.png]]
9371 <link rel="mw:PageProp/redirect" href="./File:Wiki.png"/>
9375 Redirect to image page (2)
9377 #REDIRECT [[Image:Wiki.png]]
9379 <link rel="mw:PageProp/redirect" href="./File:Wiki.png" data-parsoid='{"src":"#REDIRECT ","a":{"href":"./File:Wiki.png"},"sa":{"href":"Image:Wiki.png"}}'/>
9382 # html2wt disabled because wts serializes as "#REDIRECT [[:en:File:Wiki.png]]"
9383 # Next test confirms this.
9385 Redirect to language (1) (T104918)
9387 parsoid=wt2html,wt2wt,html2html
9389 #REDIRECT [[en:File:Wiki.png]]
9391 <link rel="mw:PageProp/redirect" href="//en.wikipedia.org/wiki/File:Wiki.png"/>
9395 Redirect to language (2) (T104918)
9397 #REDIRECT [[:en:File:Wiki.png]]
9399 <link rel="mw:PageProp/redirect" href="//en.wikipedia.org/wiki/File:Wiki.png"/>
9403 Redirect to interwiki (T104918)
9405 #REDIRECT [[meatball:File:Wiki.png]]
9407 <link rel="mw:PageProp/redirect" href="http://www.usemod.com/cgi-bin/mb.pl?File:Wiki.png"/>
9411 Non-English #REDIRECT
9415 #TILVÍSUN [[Main Page]]
9417 <link rel="mw:PageProp/redirect" href="./Main_Page" data-parsoid='{"src":"#TILVÍSUN ","a":{"href":"./Main_Page"},"sa":{"href":"Main Page"}}'/>
9421 Redirect syntax under text isn't considered a redirect
9425 #redirect [[Main Page]]
9428 <ol data-parsoid='{}'><li data-parsoid='{}'>redirect <a rel="mw:WikiLink" href="./Main_Page" title="Main Page" data-parsoid='{"stx":"simple","a":{"href":"./Main_Page"},"sa":{"href":"Main Page"}}'>Main Page</a></li></ol>
9436 <p>Foo<link rel="mw:PageProp/redirect" href="./Foo"/></p>
9443 Redirect followed by block on the same line
9447 #REDIRECT [[Main Page]]<!-- haha -->==hi==
9449 <link rel="mw:PageProp/redirect" href="./Main_Page"/><!-- haha --><h2 id="hi">hi</h2>
9453 Redirect followed by a newline
9455 #REDIRECT [[Main Page]]
9458 <link rel="mw:PageProp/redirect" href="./Main_Page"/>
9463 Redirect followed by multiple newlines
9465 #REDIRECT [[Main Page]]
9470 <link rel="mw:PageProp/redirect" href="./Main_Page"/>
9477 Drop duplicate redirects
9481 <link rel="mw:PageProp/redirect" href="./Foo"/>
9482 <link rel="mw:PageProp/redirect" href="./Bar"/>
9483 <link rel="mw:PageProp/redirect" href="./Baz"/>
9502 Broken br tag sanitization
9510 # TODO: Fix html2html mode (T53055)!
9512 Parsoid: Broken br tag recognition
9526 Incorrecly removing closing slashes from correctly formed XHTML
9528 <br style="clear:both;" />
9530 <p><br style="clear:both;" />
9535 Failing to transform badly formed HTML into correct XHTML
9537 <br style="clear: left;">
9538 <br style="clear: right;">
9539 <br style="clear: both;">
9541 <p><br style="clear: left;" />
9542 <br style="clear: right;" />
9543 <br style="clear: both;" />
9547 ## FIXME: Is Parsoid's acceptance of self-closing html-tags
9548 ## a feature or a bug? See https://phabricator.wikimedia.org/T76962
9550 Handling html with a div self-closing tag
9559 <p><div title />
9563 <p><div title=bar />
9564 <div title=bar/>
9566 <div title="bar/"></div>
9570 <div title="" data-parsoid='{"stx":"html","selfClose":true}'></div>
9571 <div title="" data-parsoid='{"stx":"html","selfClose":true}'></div>
9572 <div title="" data-parsoid='{"stx":"html","autoInsertedEnd":true}'>
9573 <div title="bar" data-parsoid='{"stx":"html","selfClose":true}'></div>
9574 <div title="bar" data-parsoid='{"stx":"html","selfClose":true}'></div>
9575 <div title="bar/" data-parsoid='{"stx":"html","autoInsertedEnd":true}'></div></div>
9579 Elements with solidus in various attribute positions
9581 parsoid=wt2html,html2html
9583 <div cla/ss="123">ha</div>
9585 <div / class="123">ha</div>
9587 <div class= / "123">ha</div>
9590 <div class="123">ha</div>
9591 <div class="/">ha</div>
9593 <div data-parsoid='{"stx":"html","a":{"cla":null,"ss":null},"sa":{"cla":"","ss":"123"}}'>ha</div>
9595 <div class="123" data-parsoid='{"stx":"html"}'>ha</div>
9597 <div class="/" data-parsoid='{"stx":"html","a":{"\"123\"":null},"sa":{"\"123\"":""}}'>ha</div>
9601 Handling html with a br self-closing tag
9628 Horizontal ruler (should it add that extra space?)
9637 foo </p><hr /><p> bar
9642 Horizontal ruler -- 4+ dashes render hr
9651 Horizontal ruler -- eats additional dashes on the same line
9660 Horizontal ruler -- does not collapse dashes on consecutive lines
9671 Horizontal ruler -- <4 dashes render as plain text
9680 Horizontal ruler -- Supports content following dashes on same line
9692 ### Block-level elements
9701 <ul><li>Common list</li>
9703 <li>item 3</li></ul>
9714 <ol><li>Numbered list</li>
9716 <li>item 3</li></ol>
9720 # the switch from level 3 to ordered should not introduce a newline between
9731 ***#Number on level 4
9733 **#Number on level 3
9734 **#Number on level 3
9738 #**Level 3, but ordered
9741 <ol><li>with numbers</li></ol>
9742 <ul><li>and bullets</li></ul>
9743 <ol><li>and numbers</li></ol></li>
9745 <ul><li>bullet level 2
9746 <ul><li>bullet level 3
9747 <ol><li>Number on level 4</li></ol></li></ul></li>
9749 <ol><li>Number on level 3</li>
9750 <li>Number on level 3</li></ol></li></ul>
9751 <ol><li>number level 2</li></ol></li>
9753 <ul><li><ul><li>Level 3</li></ul></li></ul></li></ul>
9754 <ol><li><ul><li><ul><li>Level 3, but ordered</li></ul></li></ul></li></ol>
9759 1. Nested mixed wikitext and html list
9762 *<ul><li>ho</li></ul>
9767 <li><ul><li>ho</li></ul></li>
9769 <ul><li>ho</li></ul></li></ul>
9773 <li><ul data-parsoid='{"stx":"html"}'><li data-parsoid='{"stx":"html"}'>ho</li></ul></li>
9775 <ul><li>ho</li></ul></li></ul>
9779 2. Nested mixed wikitext and html list (incompatible)
9782 :{{echo|<li>ho</li>}}
9785 <dd><li>ho</li></dd></dl>
9789 <dd><li about="#mwt1" typeof="mw:Transclusion" data-parsoid='{"stx":"html","pi":[[{"k":"1"}]]}' data-mw='{"parts":[{"template":{"target":{"wt":"echo","href":"./Template:Echo"},"params":{"1":{"wt":"<li>ho</li>"}},"i":0}}]}'>ho</li></dd></dl>
9799 <ul><li>bar</li></ul></li></ul>
9809 <ul><li><ul><li>foo</li></ul></li>
9815 Nested lists 3 (first element empty)
9821 <ul><li>bar</li></ul></li></ul>
9826 Nested lists 4 (first element empty)
9831 <ul><li><ul><li></li></ul></li>
9837 Nested lists 5 (both elements empty)
9842 <ul><li><ul><li></li></ul></li>
9848 Nested lists 6 (both elements empty)
9854 <ul><li></li></ul></li></ul>
9859 Nested lists 7 (skip initial nesting levels)
9863 <ul><li><ul><li><ul><li>foo</li></ul></li></ul></li></ul>
9868 Nested lists 8 (multiple nesting transitions)
9876 <ul><li><ul><li>bar</li></ul></li>
9877 <li>baz</li></ul></li>
9883 Nested lists 9 (extension interaction)
9889 <ul><li data-parsoid='{}'><ol class="mw-references references" typeof="mw:Extension/references" about="#mwt2" data-parsoid='{}' data-mw='{"name":"references","attrs":{}}'></ol></li></ul>
9893 1. Lists with start-of-line-transparent tokens before bullets: Comments
9906 Nested lists 10 (list and span siblings: wt2wt regression)
9911 <ul><li>a <span>x</span>
9912 <ul><li>b <span>y</span></li></ul></li></ul>
9916 2. Lists with start-of-line-transparent tokens before bullets: Template close
9921 <ul><li>foo bar</li>
9927 List items are not parsed correctly following a <pre> block (T2785)
9933 <ul><li><pre>foo</pre></li>
9934 <li><pre>bar</pre></li>
9938 <ul><li><pre typeof="mw:Extension/pre" about="#mwt2" data-mw='{"name":"pre","attrs":{},"body":{"extsrc":"foo"}}'>foo</pre></li>
9939 <li><pre typeof="mw:Extension/pre" about="#mwt4" data-mw='{"name":"pre","attrs":{},"body":{"extsrc":"bar"}}'>bar</pre></li>
9943 # FIXME: Might benefit from a html/parsoid since this has a template
9945 List items from template
9956 *notSOL{{inner list}}
9960 <li>item 2</li></ul>
9963 <li>item 2</li></ul>
9967 <li>item 2</li></ul>
9972 List interrupted by empty line or heading
9980 <ul><li>foo</li></ul>
9981 <ul><li><ul><li>bar</li></ul></li></ul>
9982 <h2><span class="mw-headline" id="A_heading">A heading</span><span class="mw-editsection"><span class="mw-editsection-bracket">[</span><a href="/index.php?title=Parser_test&action=edit&section=1" title="Edit section: A heading">edit</a><span class="mw-editsection-bracket">]</span></span></h2>
9983 <ul><li>Another list item</li></ul>
9988 Multiple list tags generated by templates
10007 <li about="#mwt1" typeof="mw:Transclusion" data-parsoid='{"stx":"html","autoInsertedEnd":true,"pi":[[{"k":"1"}]]}' data-mw='{"parts":[{"template":{"target":{"wt":"echo","href":"./Template:Echo"},"params":{"1":{"wt":"<li>"}},"i":0}},"a"]}'>a</li>
10008 <li about="#mwt2" typeof="mw:Transclusion" data-parsoid='{"stx":"html","autoInsertedEnd":true,"pi":[[{"k":"1"}]]}' data-mw='{"parts":[{"template":{"target":{"wt":"echo","href":"./Template:Echo"},"params":{"1":{"wt":"<li>"}},"i":0}},"b"]}'>b</li>
10009 <li about="#mwt3" typeof="mw:Transclusion" data-parsoid='{"stx":"html","autoInsertedEnd":true,"pi":[[{"k":"1"}]]}' data-mw='{"parts":[{"template":{"target":{"wt":"echo","href":"./Template:Echo"},"params":{"1":{"wt":"<li>"}},"i":0}},"c"]}'>c</li>
10013 Multiple newlines in between HTML list items don't induce paragraph wrapping
10026 <dd>ho<div>123</div>
10042 <dd>ho<div>123</div>
10050 Single-comment whitespace lines dont break lists, and neither do multi-comment whitespace lines
10053 <!--This line will NOT split the list-->
10055 <!--This line will NOT split the list either-->
10057 <!--foo--> <!----> <!--This line NOT split the list either-->
10068 Replacing whitespace with tabs still doesn't break the list (gerrit 78327)
10071 <!--This line will NOT split the list-->
10073 <!--This line will NOT split the list either-->
10075 <!--foo--> <!----> <!--This line NOT split the list
10086 # FIXME: Parsoid has a dedicated DOM pass to mimic this Tidy-specific li-hack
10087 # That pass could possibly be removed.
10089 Test the li-hack (a hack from Tidy days, but doesn't work as advertised with Remex)
10091 parsoid=wt2html,wt2wt
10095 *{{echo|<li>templated li-hack}}
10096 *<!--foo--><li> unsupported li-hack with preceding comments
10099 <li><li>not a li-hack
10104 <li class="mw-empty-elt"></li><li>li-hack</li>
10105 <li class="mw-empty-elt"></li><li>templated li-hack</li>
10106 <li class="mw-empty-elt"></li><li> unsupported li-hack with preceding comments</li></ul>
10108 <li class="mw-empty-elt"></li><li>not a li-hack
10113 <li data-parsoid='{"stx":"html","autoInsertedEnd":true,"liHackSrc":"*"}'>li-hack</li>
10114 <li about="#mwt1" typeof="mw:Transclusion" data-parsoid='{"stx":"html","autoInsertedEnd":true,,"pi":[[{"k":"1"}]]}' data-mw='{"parts":["*",{"template":{"target":{"wt":"echo","href":"./Template:Echo"},"params":{"1":{"wt":"<li>templated li-hack"}},"i":0}}]}'>templated li-hack</li>
10115 <li data-parsoid='{"autoInsertedEnd":true}'><!--foo--></li><li data-parsoid='{"stx":"html","autoInsertedEnd":true}'>unsupported li-hack with preceding comments</li></ul>
10117 <ul data-parsoid='{"stx":"html"}'>
10118 <li class="mw-empty-elt" data-parsoid='{"stx":"html","autoInsertedEnd":true}'></li><li data-parsoid='{"stx":"html"}'>not a li-hack
10125 Parsoid: Make sure nested lists are serialized on their own line even if HTML contains no newlines
10154 Parsoid: Test of whitespace serialization with Templated bullets
10161 <li class="mw-empty-elt"> </li><li about="#mwt1" typeof="mw:Transclusion" data-mw='{"parts":[{"template":{"target":{"wt":"bullet","href":"./Template:Bullet"},"params":{},"i":0}}]}'> Bar</li>
10165 # ------------------------------------------------------------------------
10166 # The next set of tests are about Parsoid's ability to handle badly nested
10167 # tags (parse, minimize scope of fixup, and roundtrip back)
10168 # ------------------------------------------------------------------------
10170 # Remex and Parsoid output stems from list handling diffs because Parsoid & PHP parser.
10171 # Parsoid's list handling is more aware of block structure.
10173 Unbalanced closing block tags break a list
10180 <ul><li>a</li></ul></div><div>
10192 Unbalanced closing non-block tags don't break a list
10194 parsoid=wt2html,html2html
10202 <ul><li>a<span></span></li>
10205 <p><span data-parsoid='{"stx":"html","autoInsertedEnd":true}'></span></p>
10206 <ul><li>a<span data-parsoid='{"stx":"html","autoInsertedEnd":true}'></span></li>
10210 # Parsoid does some post-dom-building cleanup
10211 # which is why its output differs from Remex.
10213 Unclosed formatting tags that straddle lists are closed and reopened
10215 parsoid=wt2html,wt2wt,html2html
10220 <ol><li><s> a</s></li><s>
10221 </s><li><s>b </s></li></ol>
10223 <ol><li><s> a</s></li>
10224 <li><s>b </s></li></ol>
10227 # Output is ugly because of all the misnested tag fixups.
10229 1. List embedded in a formatting tag
10236 </small></p><small><ul><li>foo</li></ul></small><small></small><p><small></small>
10239 <p><small data-parsoid='{"stx":"html","autoInsertedEnd":true}'></small></p><small data-parsoid='{"stx":"html","autoInsertedEnd":true,"autoInsertedStart":true}'>
10240 <ul><li data-parsoid='{}'>foo</li></ul></small>
10241 <p><small data-parsoid='{"stx":"html","autoInsertedStart":true}'></small></p>
10244 # Output is ugly because of all the misnested tag fixups.
10246 2. List embedded in a formatting tag in a misnested way
10253 </small></p><small></small><ul><small><li>a</li>
10254 </small><li><small>b</small></li></ul>
10256 <p><small data-parsoid='{"stx":"html","autoInsertedEnd":true}'></small></p>
10257 <ul><small data-parsoid='{"stx":"html","autoInsertedEnd":true,"autoInsertedStart":true}'><li>a</li></small>
10258 <li><small data-parsoid='{"stx":"html","autoInsertedStart":true}'>b</small></li></ul>
10261 # Output is ugly because of all the misnested tag fixups.
10263 3. List embedded in a formatting tag in a misnested way
10270 </small></p><small></small><ul><small></small><li><small></small><ul><small></small><li><small>123</small></li></ul></li></ul>
10272 <p><small data-parsoid='{"stx":"html","autoInsertedEnd":true}'></small></p>
10274 <ul><li><ul><li data-parsoid='{}'><small data-parsoid='{"stx":"html","autoInsertedStart":true}'> 123</small></li></ul></li></ul>
10281 # Note that the current date is hard-coded as
10282 # 1970-01-01T00:02:03Z (a Thursday)
10283 # when running parser tests. The timezone is also fixed to GMT, so
10284 # local date will be identical to current date.
10287 Magic Word: {{CURRENTDAY}}
10296 Magic Word: {{CURRENTDAY2}}
10305 Magic Word: {{CURRENTDAYNAME}}
10314 Magic Word: {{CURRENTDOW}}
10323 Magic Word: {{CURRENTMONTH}}
10332 Magic Word: {{CURRENTMONTH1}}
10341 Magic Word: {{CURRENTMONTHABBREV}}
10343 {{CURRENTMONTHABBREV}}
10350 Magic Word: {{CURRENTMONTHNAME}}
10352 {{CURRENTMONTHNAME}}
10359 Magic Word: {{CURRENTMONTHNAMEGEN}}
10361 {{CURRENTMONTHNAMEGEN}}
10368 Magic Word: {{CURRENTTIME}}
10377 Magic Word: {{CURRENTHOUR}}
10386 Magic Word: {{CURRENTWEEK}} (T6594)
10395 Magic Word: {{CURRENTYEAR}}
10404 Magic Word: {{CURRENTTIMESTAMP}}
10406 {{CURRENTTIMESTAMP}}
10413 Magic Words LOCAL (UTC)
10417 *{{LOCALMONTHNAME}}
10418 *{{LOCALMONTHNAMEGEN}}
10419 *{{LOCALMONTHABBREV}}
10428 *{{LOCALTIMESTAMP}}
10443 <li>19700101000203</li></ul>
10448 Magic Word: {{FULLPAGENAME}}
10450 title=[[User:Ævar Arnfjörð Bjarmason]]
10451 parsoid={ "modes": ["wt2html","wt2wt"], "normalizePhp": true }
10455 <p>User:Ævar Arnfjörð Bjarmason
10460 Magic Word: {{FULLPAGENAMEE}}
10462 title=[[User:Ævar Arnfjörð Bjarmason]]
10463 parsoid={ "modes": ["wt2html","wt2wt"], "normalizePhp": true }
10467 <p>User:%C3%86var_Arnfj%C3%B6r%C3%B0_Bjarmason
10472 Magic Word: {{TALKSPACE}}
10474 title=[[User:Ævar Arnfjörð Bjarmason]]
10475 parsoid={ "modes": ["wt2html","wt2wt"], "normalizePhp": true }
10484 Magic Word: {{TALKSPACE}}, same namespace
10486 title=[[User talk:Ævar Arnfjörð Bjarmason]]
10487 parsoid={ "modes": ["wt2html","wt2wt"], "normalizePhp": true }
10496 Magic Word: {{TALKSPACE}}, main namespace
10498 title=[[Parser Test]]
10499 parsoid={ "modes": ["wt2html","wt2wt"], "normalizePhp": true }
10508 Magic Word: {{TALKSPACEE}}
10510 title=[[User:Ævar Arnfjörð Bjarmason]]
10511 parsoid={ "modes": ["wt2html","wt2wt"], "normalizePhp": true }
10520 Magic Word: {{SUBJECTSPACE}}
10522 title=[[User talk:Ævar Arnfjörð Bjarmason]]
10523 parsoid={ "modes": ["wt2html","wt2wt"], "normalizePhp": true }
10532 Magic Word: {{SUBJECTSPACE}}, same namespace
10534 title=[[User:Ævar Arnfjörð Bjarmason]]
10535 parsoid={ "modes": ["wt2html","wt2wt"], "normalizePhp": true }
10544 Magic Word: {{SUBJECTSPACE}}, main namespace
10546 title=[[Parser Test]]
10547 parsoid={ "modes": ["wt2html","wt2wt"], "normalizePhp": true }
10555 Magic Word: {{SUBJECTSPACEE}}
10557 title=[[User talk:Ævar Arnfjörð Bjarmason]]
10558 parsoid={ "modes": ["wt2html","wt2wt"], "normalizePhp": true }
10567 Magic Word: {{NAMESPACE}}
10569 title=[[User:Ævar Arnfjörð Bjarmason]]
10570 parsoid={ "modes": ["wt2html","wt2wt"], "normalizePhp": true }
10579 Magic Word: {{NAMESPACEE}}
10581 title=[[User:Ævar Arnfjörð Bjarmason]]
10582 parsoid={ "modes": ["wt2html","wt2wt"], "normalizePhp": true }
10591 Magic Word: {{NAMESPACENUMBER}}
10593 title=[[User:Ævar Arnfjörð Bjarmason]]
10594 parsoid={ "modes": ["wt2html","wt2wt"], "normalizePhp": true }
10596 {{NAMESPACENUMBER}}
10603 Magic Word: {{SUBPAGENAME}}
10605 title=[[Ævar Arnfjörð Bjarmason/sub ö]] subpage
10606 parsoid={ "modes": ["wt2html","wt2wt"], "normalizePhp": true }
10615 Magic Word: {{SUBPAGENAMEE}}
10617 title=[[Ævar Arnfjörð Bjarmason/sub ö]] subpage
10618 parsoid={ "modes": ["wt2html","wt2wt"], "normalizePhp": true }
10627 Magic Word: {{ROOTPAGENAME}}
10629 title=[[Ævar Arnfjörð Bjarmason/sub/sub2]] subpage
10630 parsoid={ "modes": ["wt2html","wt2wt"], "normalizePhp": true }
10634 <p>Ævar Arnfjörð Bjarmason
10639 Magic Word: {{ROOTPAGENAMEE}}
10641 title=[[Ævar Arnfjörð Bjarmason/sub/sub2]] subpage
10642 parsoid={ "modes": ["wt2html","wt2wt"], "normalizePhp": true }
10646 <p>%C3%86var_Arnfj%C3%B6r%C3%B0_Bjarmason
10651 Magic Word: {{BASEPAGENAME}}
10653 title=[[Ævar Arnfjörð Bjarmason/sub]] subpage
10654 parsoid={ "modes": ["wt2html","wt2wt"], "normalizePhp": true }
10658 <p>Ævar Arnfjörð Bjarmason
10663 Magic Word: {{BASEPAGENAMEE}}
10665 title=[[Ævar Arnfjörð Bjarmason/sub]] subpage
10666 parsoid={ "modes": ["wt2html","wt2wt"], "normalizePhp": true }
10670 <p>%C3%86var_Arnfj%C3%B6r%C3%B0_Bjarmason
10675 Magic Word: {{TALKPAGENAME}}
10677 title=[[User:Ævar Arnfjörð Bjarmason]]
10678 parsoid={ "modes": ["wt2html","wt2wt"], "normalizePhp": true }
10682 <p>User talk:Ævar Arnfjörð Bjarmason
10687 Magic Word: {{TALKPAGENAMEE}}
10689 title=[[User:Ævar Arnfjörð Bjarmason]]
10690 parsoid={ "modes": ["wt2html","wt2wt"], "normalizePhp": true }
10694 <p>User_talk:%C3%86var_Arnfj%C3%B6r%C3%B0_Bjarmason
10699 Magic Word: {{SUBJECTPAGENAME}}
10701 title=[[User talk:Ævar Arnfjörð Bjarmason]]
10702 parsoid={ "modes": ["wt2html","wt2wt"], "normalizePhp": true }
10704 {{SUBJECTPAGENAME}}
10706 <p>User:Ævar Arnfjörð Bjarmason
10711 Magic Word: {{SUBJECTPAGENAMEE}}
10713 title=[[User talk:Ævar Arnfjörð Bjarmason]]
10714 parsoid={ "modes": ["wt2html","wt2wt"], "normalizePhp": true }
10716 {{SUBJECTPAGENAMEE}}
10718 <p>User:%C3%86var_Arnfj%C3%B6r%C3%B0_Bjarmason
10723 Magic Word: {{NUMBEROFFILES}}
10725 parsoid={ "modes": ["wt2html","wt2wt"], "normalizePhp": true }
10734 Magic Word: {{PAGENAME}}
10736 title=[[User:Ævar Arnfjörð Bjarmason]]
10737 parsoid={ "modes": ["wt2html","wt2wt"], "normalizePhp": true }
10741 <p>Ævar Arnfjörð Bjarmason
10746 Magic Word: {{PAGENAME}} with metacharacters
10748 title=[['foo & bar = baz']]
10749 parsoid={ "modes": ["wt2html","wt2wt"], "normalizePhp": true }
10753 <p><i>'foo & bar = baz'</i>
10758 Magic Word: {{PAGENAME}} with metacharacters (T28781)
10760 title=[[*RFC 1234 http://example.com/]]
10761 parsoid={ "modes": ["wt2html","wt2wt"], "normalizePhp": true }
10765 <p>*RFC 1234 http://example.com/
10770 Magic Word: {{PAGENAMEE}}
10772 title=[[User:Ævar Arnfjörð Bjarmason]]
10773 parsoid={ "modes": ["wt2html","wt2wt"], "normalizePhp": true }
10777 <p>%C3%86var_Arnfj%C3%B6r%C3%B0_Bjarmason
10782 Magic Word: {{PAGENAMEE}} with metacharacters (T28781)
10784 title=[[*RFC 1234 http://example.com/]]
10785 parsoid={ "modes": ["wt2html","wt2wt"], "normalizePhp": true }
10789 <p>*RFC_1234_http://example.com/
10794 Magic Word: {{REVISIONID}}
10796 parsoid={ "modes": ["wt2html","wt2wt"], "normalizePhp": true }
10803 flags=vary-revision-id
10807 Magic Word: {{SCRIPTPATH}}
10809 parsoid={ "modes": ["wt2html","wt2wt"], "normalizePhp": true }
10817 Magic Word: {{STYLEPATH}}
10819 parsoid={ "modes": ["wt2html","wt2wt"], "normalizePhp": true }
10828 Magic Word: {{SERVER}}
10830 parsoid={ "modes": ["wt2html","wt2wt"], "normalizePhp": true }
10834 <p><a rel="nofollow" class="external free" href="http://example.org">http://example.org</a>
10839 Magic Word: {{SERVERNAME}}
10841 parsoid={ "modes": ["wt2html","wt2wt"], "normalizePhp": true }
10850 Magic Word: {{SITENAME}}
10852 parsoid={ "modes": ["wt2html","wt2wt"], "normalizePhp": true }
10861 Magic Word: {{PAGELANGUAGE}}
10864 parsoid={ "modes": ["wt2html","wt2wt"], "normalizePhp": true }
10873 Magic Word: {{PAGELANGUAGE}} on a page with no explicitly set language
10875 parsoid={ "modes": ["wt2html","wt2wt"], "normalizePhp": true }
10884 Case-sensitive magic words, when cased differently, should just be template transclusions
10891 <p><a href="/index.php?title=Template:CurrentMonth&action=edit&redlink=1" class="new" title="Template:CurrentMonth (page does not exist)">Template:CurrentMonth</a>
10892 <a href="/index.php?title=Template:Currentday&action=edit&redlink=1" class="new" title="Template:Currentday (page does not exist)">Template:Currentday</a>
10893 <a href="/index.php?title=Template:CURreNTweEK&action=edit&redlink=1" class="new" title="Template:CURreNTweEK (page does not exist)">Template:CURreNTweEK</a>
10894 <a href="/index.php?title=Template:CurrentHour&action=edit&redlink=1" class="new" title="Template:CurrentHour (page does not exist)">Template:CurrentHour</a>
10899 Case-insensitive magic words should still work with weird casing.
10909 <a rel="nofollow" class="external free" href="http://example.org">http://example.org</a>
10913 # From plwiki:PLOS_ONE
10915 Parsoid: Page property magic word with magic word contents
10917 {{DISPLAYTITLE:''{{PAGENAME}}''}}
10919 <meta property="mw:PageProp/displaytitle" content="Main Page" about="#mwt3" typeof="mw:ExpandedAttrs" data-parsoid='{"src":"{{DISPLAYTITLE:''{{PAGENAME}}''}}"}' data-mw='{"attribs":[[{"txt":"content"},{"html":"DISPLAYTITLE:<i data-parsoid='{\"dsr\":[15,31,2,2]}'><span about=\"#mwt1\" typeof=\"mw:Transclusion\" data-parsoid='{\"pi\":[[]],\"dsr\":[17,29,null,null]}' data-mw='{\"parts\":[{\"template\":{\"target\":{\"wt\":\"PAGENAME\",\"function\":\"pagename\"},\"params\":{},\"i\":0}}]}'>Main Page</span></i>"}]]}'/>
10922 # NOTE: mw:ExpandedAttrs is not the best typeof here. mw:Transclusion is better.
10923 # But, this is a limitation of our representation and is documented in
10924 # TemplateHandler.js in processSpecialMagicWord
10926 Parsoid: Template-generated DISPLAYTITLE
10928 {{{{echo|DISPLAYTITLE}}:Foo}}
10932 wgAllowDisplayTitle=true
10933 wgRestrictDisplayTitle=false
10938 <meta property="mw:PageProp/displaytitle" content="Foo" about="#mwt1" typeof="mw:ExpandedAttrs" data-parsoid='{"pi":[[]]}' data-mw='{"attribs":[[{"txt":"content"},{"html":"<span about=\"#mwt1\" typeof=\"mw:Transclusion\" data-parsoid='{\"pi\":[[{\"k\":\"1\"}]],\"dsr\":[2,23,null,null]}' data-mw='{\"parts\":[{\"template\":{\"target\":{\"wt\":\"echo\",\"href\":\"./Template:Echo\"},\"params\":{\"1\":{\"wt\":\"DISPLAYTITLE\"}},\"i\":0}}]}'>DISPLAYTITLE</span>:Foo"}]]}'/>
10942 Namespace 1 {{ns:1}}
10951 Namespace 1 {{ns:01}}
10960 Namespace 0 {{ns:0}} (T6783)
10968 Namespace 0 {{ns:00}} (T6783)
10976 Namespace -1 {{ns:-1}}
10985 Namespace User {{ns:User}}
10994 Namespace User talk {{ns:User_talk}}
11003 Namespace User talk {{ns:uSeR tAlK}}
11012 Namespace File {{ns:File}}
11021 Namespace File {{ns:Image}}
11030 Namespace (lang=de) Benutzer {{ns:User}}
11041 Namespace (lang=de) Benutzer Diskussion {{ns:3}}
11047 <p>Benutzer Diskussion
11054 {{urlencode:hi world?!}}
11055 {{urlencode:hi world?!|WIKI}}
11056 {{urlencode:hi world?!|PATH}}
11057 {{urlencode:hi world?!|QUERY}}
11067 Magic Word: prioritize type info over data-parsoid
11071 <meta property="mw:PageProp/forcetoc" data-parsoid='{"magicSrc":"__NOTOC__"}'/>
11077 Magic Word: serialize on separate line (parsoid)
11079 parsoid=wt2wt,html2wt
11085 foo<meta property="mw:PageProp/notoc"/>bar
11089 Magic Word: rt non-english wikis
11096 <meta property="mw:PageProp/noeditsection" data-parsoid='{"magicSrc":"__NOEDITSECTION__"}'/>
11100 __proto__ is treated as normal wikitext (T105997)
11112 Magic links: internal link to RFC (T2479)
11116 <p><a href="/index.php?title=RFC_123&action=edit&redlink=1" class="new" title="RFC 123 (page does not exist)">RFC 123</a>
11119 <p><a rel="mw:WikiLink" href="./RFC_123" title="RFC 123">RFC 123</a></p>
11123 Magic links: RFC (T2479)
11127 <p><a class="external mw-magiclink-rfc" rel="nofollow" href="https://tools.ietf.org/html/rfc822">RFC 822</a>
11130 <p><a href="https://tools.ietf.org/html/rfc822" rel="mw:ExtLink" class="external mw-magiclink">RFC 822</a></p>
11134 Magic links: RFC (T67278)
11136 This is RFC 822 but thisRFC 822 is not RFC 822linked.
11138 <p>This is <a class="external mw-magiclink-rfc" rel="nofollow" href="https://tools.ietf.org/html/rfc822">RFC 822</a> but thisRFC 822 is not RFC 822linked.
11141 <p>This is <a href="https://tools.ietf.org/html/rfc822" rel="mw:ExtLink" class="external mw-magiclink">RFC 822</a> but thisRFC 822 is not RFC 822linked.</p>
11145 Magic links: RFC (w/ non-newline whitespace, T30950/T31025)
11147 RFC      822
11151 <p><a class="external mw-magiclink-rfc" rel="nofollow" href="https://tools.ietf.org/html/rfc822">RFC 822</a>
11156 <p><a href="https://tools.ietf.org/html/rfc822" rel="mw:ExtLink" class="external mw-magiclink">RFC <span typeof="mw:Entity" data-parsoid='{"src":"&nbsp;","srcContent":" "}'> </span><span typeof="mw:Entity" data-parsoid='{"src":"&#160;","srcContent":" "}'> </span><span typeof="mw:Entity" data-parsoid='{"src":"&#0160;","srcContent":" "}'> </span><span typeof="mw:Entity" data-parsoid='{"src":"&#xA0;","srcContent":" "}'> </span><span typeof="mw:Entity" data-parsoid='{"src":"&#Xa0;","srcContent":" "}'> </span> 822</a>
11162 Magic links: ISBN (T3937)
11166 <p><a href="/wiki/Special:BookSources/0306406152" class="internal mw-magiclink-isbn">ISBN 0-306-40615-2</a>
11169 <p><a href="./Special:BookSources/0306406152" rel="mw:WikiLink">ISBN 0-306-40615-2</a></p>
11173 Magic links: ISBN (T67278)
11175 This is ISBN 978-0-316-09811-3 but thisISBN 978-0-316-09811-3 is not ISBN 978-0-316-09811-3linked.
11177 <p>This is <a href="/wiki/Special:BookSources/9780316098113" class="internal mw-magiclink-isbn">ISBN 978-0-316-09811-3</a> but thisISBN 978-0-316-09811-3 is not ISBN 978-0-316-09811-3linked.
11180 <p>This is <a href="./Special:BookSources/9780316098113" rel="mw:WikiLink">ISBN 978-0-316-09811-3</a> but thisISBN 978-0-316-09811-3 is not ISBN 978-0-316-09811-3linked.</p>
11184 Magic links: ISBN (w/ non-newline whitespace, T30950/T31025)
11186 ISBN      978 0 316 09811 3
11192 <p><a href="/wiki/Special:BookSources/9780316098113" class="internal mw-magiclink-isbn">ISBN 978 0 316 09811 3</a>
11199 <p><a href="./Special:BookSources/9780316098113" rel="mw:WikiLink">ISBN <span typeof="mw:Entity" data-parsoid='{"src":"&nbsp;","srcContent":" "}'> </span><span typeof="mw:Entity" data-parsoid='{"src":"&#160;","srcContent":" "}'> </span><span typeof="mw:Entity" data-parsoid='{"src":"&#0160;","srcContent":" "}'> </span><span typeof="mw:Entity" data-parsoid='{"src":"&#xA0;","srcContent":" "}'> </span><span typeof="mw:Entity" data-parsoid='{"src":"&#Xa0;","srcContent":" "}'> </span> 978<span typeof="mw:Entity" data-parsoid='{"src":"&nbsp;","srcContent":" "}'> </span>0<span typeof="mw:Entity" data-parsoid='{"src":"&#160;","srcContent":" "}'> </span>316<span typeof="mw:Entity" data-parsoid='{"src":"&#0160;","srcContent":" "}'> </span>09811<span typeof="mw:Entity" data-parsoid='{"src":"&#xA0;","srcContent":" "}'> </span>3</a>
11207 Magic links: PMID incorrectly converts space to underscore
11211 <p><a class="external mw-magiclink-pmid" rel="nofollow" href="//www.ncbi.nlm.nih.gov/pubmed/1234?dopt=Abstract">PMID 1234</a>
11214 <p><a href="//www.ncbi.nlm.nih.gov/pubmed/1234?dopt=Abstract" rel="mw:ExtLink" class="external mw-magiclink">PMID 1234</a></p>
11218 Magic links: PMID (T67278)
11220 This is PMID 1234 but thisPMID 1234 is not PMID 1234linked.
11222 <p>This is <a class="external mw-magiclink-pmid" rel="nofollow" href="//www.ncbi.nlm.nih.gov/pubmed/1234?dopt=Abstract">PMID 1234</a> but thisPMID 1234 is not PMID 1234linked.
11225 <p>This is <a href="//www.ncbi.nlm.nih.gov/pubmed/1234?dopt=Abstract" rel="mw:ExtLink" class="external mw-magiclink">PMID 1234</a> but thisPMID 1234 is not PMID 1234linked.</p>
11229 Magic links: PMID (w/ non-newline whitespace, T30950/T31025)
11231 PMID      1234
11235 <p><a class="external mw-magiclink-pmid" rel="nofollow" href="//www.ncbi.nlm.nih.gov/pubmed/1234?dopt=Abstract">PMID 1234</a>
11240 <p><a href="//www.ncbi.nlm.nih.gov/pubmed/1234?dopt=Abstract" rel="mw:ExtLink" class="external mw-magiclink">PMID <span typeof="mw:Entity" data-parsoid='{"src":"&nbsp;","srcContent":" "}'> </span><span typeof="mw:Entity" data-parsoid='{"src":"&#160;","srcContent":" "}'> </span><span typeof="mw:Entity" data-parsoid='{"src":"&#0160;","srcContent":" "}'> </span><span typeof="mw:Entity" data-parsoid='{"src":"&#xA0;","srcContent":" "}'> </span><span typeof="mw:Entity" data-parsoid='{"src":"&#Xa0;","srcContent":" "}'> </span> 1234</a>
11245 # <nowiki> nodes shouldn't be inserted during html2wt by Parsoid,
11246 # since these are ExtLinkText, not MagicLinkText
11248 Magic links: use appropriate serialization for "almost" magic links.
11250 X[[Special:BookSources/0978739256|foo]]
11252 X[https://tools.ietf.org/html/rfc1234 foo]
11254 <p>X<a href="/wiki/Special:BookSources/0978739256" title="Special:BookSources/0978739256">foo</a>
11255 </p><p>X<a rel="nofollow" class="external text" href="https://tools.ietf.org/html/rfc1234">foo</a>
11258 <p>X<a rel="mw:WikiLink" href="./Special:BookSources/0978739256" title="Special:BookSources/0978739256">foo</a></p>
11259 <p>X<a rel="mw:ExtLink" class="external text" href="https://tools.ietf.org/html/rfc1234">foo</a></p>
11263 Magic links: All disabled (T47942)
11265 wgEnableMagicLinks={"ISBN":false, "PMID":false, "RFC":false}
11271 <p>ISBN 0-306-40615-2
11282 Nonexistent template
11284 {{thistemplatedoesnotexist}}
11286 <p><a href="/index.php?title=Template:Thistemplatedoesnotexist&action=edit&redlink=1" class="new" title="Template:Thistemplatedoesnotexist (page does not exist)">Template:Thistemplatedoesnotexist</a>
11291 Template with invalid target containing tags
11293 {{a<b>b</b>|{{echo|foo}}|{{echo|a}}={{echo|b}}|a = b}}
11295 <p>{{a<b>b</b>|foo|a=b|a = b}}
11300 Template with invalid target containing unclosed tag
11302 {{a<b>|{{echo|foo}}|{{echo|a}}={{echo|b}}|a = b}}
11304 <p>{{a<b>|foo|a=b|a = b}}</b>
11309 Template with invalid target containing wikilink
11313 <p>{{<a href="/wiki/Main_Page" title="Main Page">Main Page</a>}}
11316 <p><span typeof="mw:Transclusion" about="#mwt1" data-mw='{"parts":[{"template":{"target":{"wt":"[[Main Page]]"},"params":{},"i":0}}]}'>{{</span><a rel="mw:WikiLink" href="./Main_Page" about="#mwt1">Main Page</a><span about="#mwt1">}}</span></p>
11320 Template with just whitespace in it, T70421
11324 <p about="#mwt1" typeof="mw:Transclusion" data-parsoid='{"pi":[[{"k":"1"}]]}' data-mw='{"parts":[{"template":{"target":{"wt":"echo","href":"./Template:Echo"},"params":{"1":{"wt":"{{ }}"}},"i":0}}]}'>{{ }}</p>
11330 This is a test template
11338 <p>This is a test template
11343 Template with explicit namespace
11347 <p>This is a test template
11355 This is a test template with parameter {{{param}}}
11361 {{paramtest|param=foo}}
11363 <p>This is a test template with parameter foo
11368 Template:paramtestnum
11370 [[{{{1}}}|{{{2}}}]]
11374 Template unnamed parameter
11376 {{paramtestnum|Main Page|the main page}}
11378 <p><a href="/wiki/Main_Page" title="Main Page">the main page</a>
11383 Template:templatesimple
11389 Template:templateredirect
11391 #redirect [[Template:templatesimple]]
11395 Template:templateasargtestnum
11401 Template:templateasargtest
11403 {{template{{{templ}}}}}
11407 Template:templateasargtest2
11413 Template with template name as unnamed argument
11415 {{templateasargtestnum|templatesimple}}
11422 Template with template name as argument
11424 {{templateasargtest|templ=simple}}
11431 Template with template name as argument (2)
11433 {{templateasargtest2|templ=templatesimple}}
11440 Template:templateasargtestdefault
11442 {{{{{templ|templatesimple}}}}}
11452 Template with default value
11454 {{templateasargtestdefault}}
11461 Template with default value (value set)
11463 {{templateasargtestdefault|templ=templa}}
11472 {{templateredirect}}
11477 <link rel="mw:PageProp/redirect" href="./Template:Templatesimple" typeof="mw:Transclusion" data-mw='{"parts":[{"template":{"target":{"wt":"templateredirect","href":"./Template:Templateredirect"},"params":{},"i":0}}]}'/>
11481 Template with argument in separate line
11483 {{ templateasargtest |
11491 Template with complex template as argument
11494 param ={{ templateasargtest |
11495 templ = simple }}}}
11497 <p>This is a test template with parameter (test)
11502 Templates with templated name
11504 {{{{echo|echo}}|foo}}
11505 {{{{echo|inner list}} }}
11509 <ul><li>item 1</li></ul>
11512 <p about="#mwt2" typeof="mw:Transclusion" data-mw='{"parts":[{"template":{"target":{"wt":"{{echo|echo}}","href":"./Template:Echo"},"params":{"1":{"wt":"foo"}},"i":0}}]}'>foo</p>
11513 <ul about="#mwt4" typeof="mw:Transclusion" data-mw='{"parts":[{"template":{"target":{"wt":"{{echo|inner list}} ","href":"./Template:Inner_list"},"params":{},"i":0}}]}'><li>item 1</li></ul>
11516 ## Regression test; the output here isn't really that interesting.
11518 Templates with templated name and top level template args
11520 {{1{{2{{{3}}}|4=5}}}}
11522 <p about="#mwt2" typeof="mw:Transclusion" data-mw='{"parts":[{"template":{"target":{"wt":"1{{2{{{3}}}|4=5}}"},"params":{},"i":0}}]}'>{{1{{2{{{3}}}|4=5}}}}</p>
11525 # Parsoid markup is deliberate "broken". This is an edge case.
11526 # See long comment in TemplateHandler.js:convertAttribsToString.
11528 Templates with invalid templated targets
11539 <p typeof="mw:Transclusion" data-mw='{"parts":[{"template":{"target":{"wt":"echo\n{{echo|foo}}\n"},"params":{},"i":0}}]}'>{{echo
11544 Template with thumb image (with link in description)
11546 {{paramtest|param=[[Image:noimage.png|thumb|[[no link|link]] [[no link|caption]]]]}}
11548 This is a test template with parameter <div class="thumb tright"><div class="thumbinner" style="width:182px;"><a href="/index.php?title=Special:Upload&wpDestFile=Noimage.png" class="new" title="File:Noimage.png">File:Noimage.png</a> <div class="thumbcaption"><a href="/index.php?title=No_link&action=edit&redlink=1" class="new" title="No link (page does not exist)">link</a> <a href="/index.php?title=No_link&action=edit&redlink=1" class="new" title="No link (page does not exist)">caption</a></div></div></div>
11551 <p>This is a test template with parameter </p><div class="thumb tright"><div class="thumbinner" style="width:182px;"><a href="/index.php?title=Special:Upload&wpDestFile=Noimage.png" class="new" title="File:Noimage.png">File:Noimage.png</a> <div class="thumbcaption"><a href="/index.php?title=No_link&action=edit&redlink=1" class="new" title="No link (page does not exist)">link</a> <a href="/index.php?title=No_link&action=edit&redlink=1" class="new" title="No link (page does not exist)">caption</a></div></div></div>
11553 <p about="#mwt1" typeof="mw:Transclusion" data-mw='{"parts":[{"template":{"target":{"wt":"paramtest","href":"./Template:Paramtest"},"params":{"param":{"wt":"[[Image:noimage.png|thumb|[[no link|link]] [[no link|caption]]]]"}},"i":0}}]}'>This is a test template with parameter </p><figure class="mw-default-size" typeof="mw:Error mw:Image/Thumb" about="#mwt1" data-mw='{"errors":[{"key":"apierror-filedoesnotexist","message":"This image does not exist."}]}'><a href="./File:Noimage.png" ><img resource="./File:Noimage.png" src="./Special:FilePath/Noimage.png" height="220" width="220"/></a><figcaption><a rel="mw:WikiLink" href="./No_link" title="No link">link</a> <a rel="mw:WikiLink" href="./No_link" title="No link">caption</a></figcaption></figure>
11557 Template:complextemplate
11559 {{{1}}} {{paramtest|
11560 param ={{{param}}}}}
11564 Template with complex arguments
11567 param ={{ templateasargtest |
11568 templ = simple }}|[[Template:complextemplate|link]]}}
11570 <p><a href="/wiki/Template:Complextemplate" title="Template:Complextemplate">link</a> This is a test template with parameter (test)
11575 T2553: link with two variables in a piped link
11578 |[[{{{1}}}|{{{2}}}]]
11583 <td>[[{{{1}}}|{{{2}}}]]
11588 <tbody><tr><td>[[<span about="#mwt5" typeof="mw:Param" data-mw='{"parts":[{"templatearg":{"target":{"wt":"1"},"params":{},"i":0}}]}'>{{{1}}}</span>|<span about="#mwt2" typeof="mw:Param" data-mw='{"parts":[{"templatearg":{"target":{"wt":"2"},"params":{},"i":0}}]}'>{{{2}}}</span>]]</td></tr>
11594 Abort table cell attribute parsing on wikilink
11597 |testing [[one|two]] |three||four
11598 |testing one two |three||four
11599 |testing="[[one|two]]" |three||four
11604 <td>testing <a href="/index.php?title=One&action=edit&redlink=1" class="new" title="One (page does not exist)">two</a> |three</td>
11610 <td>testing="<a href="/index.php?title=One&action=edit&redlink=1" class="new" title="One (page does not exist)">two</a>" |three</td>
11616 <tbody><tr data-parsoid='{"autoInsertedEnd":true,"autoInsertedStart":true}'><td data-parsoid='{"autoInsertedEnd":true}'>testing <a rel="mw:WikiLink" href="./One" title="One" data-parsoid='{"stx":"piped","a":{"href":"./One"},"sa":{"href":"one"}}'>two</a> |three</td><td data-parsoid='{"stx":"row","autoInsertedEnd":true}'>four</td>
11617 <td data-parsoid='{"a":{"testing":null,"one":null,"two":null},"sa":{"testing":"","one":"","two":""},"autoInsertedEnd":true}'>three</td><td data-parsoid='{"stx":"row","autoInsertedEnd":true}'>four</td>
11618 <td>testing="<a rel="mw:WikiLink" href="./One" title="One" data-parsoid='{"stx":"piped","a":{"href":"./One"},"sa":{"href":"one"}}'>two</a>" |three</td><td data-parsoid='{"stx":"row","autoInsertedEnd":true}'>four</td></tr>
11623 Don't abort table cell attribute parsing if wikilink is found in template arg
11626 |Test {{#tag:ref|One two "[[three]]" four}}
11630 <tbody><tr><td>Test <ref about="#mwt1" typeof="mw:Transclusion" data-parsoid='{"pi":[[{"k":"1"}]]}' data-mw='{"parts":[{"template":{"target":{"wt":"#tag:ref","function":"tag"},"params":{"1":{"wt":"One two \"[[three]]\" four"}},"i":0}}]}'>One two "<a rel="mw:WikiLink" href="./Three" title="Three">three</a>" four</ref></td></tr>
11635 Magic variable as template parameter
11637 {{paramtest|param={{SITENAME}}}}
11639 <p>This is a test template with parameter MediaWiki
11646 [[{{{param}}}|link]]
11650 Template parameter as link source
11652 {{linktest|param=Main Page}}
11654 <p><a href="/wiki/Main_Page" title="Main Page">link</a>
11659 Template:paramtest2
11661 including another template, {{paramtest|param={{{arg}}}}}
11665 Template passing argument to another template
11667 {{paramtest2|arg='hmm'}}
11669 <p>including another template, This is a test template with parameter 'hmm'
11680 Template as link source
11684 [[{{linktest2}}|Main Page]]
11686 [[{{linktest2}}]]Page
11688 <p><a href="/wiki/Main_Page" title="Main Page">Main Page</a>
11689 </p><p><a href="/wiki/Main_Page" title="Main Page">Main Page</a>
11690 </p><p><a href="/wiki/Main_Page" title="Main Page">Main Page</a>Page
11708 Template infinite loop
11712 <p><span class="error">Template loop detected: <a href="/wiki/Template:Loop1" title="Template:Loop1">Template:Loop1</a></span>
11717 Template from main namespace
11726 Template from non-includable namespace
11728 wgNonincludableNamespaces=10
11732 <p><a href="/wiki/Template:Echo" title="Template:Echo">Template:Echo</a>
11747 T2529: Template with table, not included at beginning of line
11766 T2523: Template shouldn't eat newline (or add an extra one before table)
11786 T2041: Template parameters shown as broken links
11795 Template with targets containing wikilinks
11801 {{[[{{echo|foo}}]]}}
11803 {{{{echo|[[foo}}]]}}
11805 <p>{{<a href="/wiki/Foo" title="Foo">foo</a>}}
11806 </p><p>{{<a href="/wiki/Foo" title="Foo">foo</a>}}
11810 <p>{{<a rel="mw:WikiLink" href="./Foo" title="Foo">foo</a>}}</p>
11811 <p>{{<a typeof="mw:ExpandedAttrs" rel="mw:WikiLink" href="./Foo" title="Foo" data-mw='{"attribs":[[{"txt":"href"},{"html":"<span about=\"#mwt3\" typeof=\"mw:Transclusion\" data-parsoid='{\"pi\":[[{\"k\":\"1\"}]],\"dsr\":[17,29,null,null]}' data-mw='{\"parts\":[{\"template\":{\"target\":{\"wt\":\"echo\",\"href\":\"./Template:Echo\"},\"params\":{\"1\":{\"wt\":\"foo\"}},\"i\":0}}]}'>foo</span>"}]]}'>foo</a>}}</p>
11812 <p>{{<span typeof="mw:Transclusion" data-mw='{"parts":[{"template":{"target":{"wt":"echo","href":"./Template:Echo"},"params":{"1":{"wt":"[[foo}}]]"}},"i":0}}]}'>[[foo}}]]</span></p>
11822 Templates: Double quotes as template target
11829 <p>foo <span about="#mwt1" typeof="mw:Transclusion" data-mw='{"parts":[{"template":{"target":{"wt":"''","href":"./Template:''"},"params":{},"i":0}}]}'>bar</span> baz
11833 ## This test is about making sure Parsoid's data-mw is well formed in the
11834 ## face of multiple templates with intersecting and overlapping ranges. The
11835 ## wikitext itself is wretched.
11837 Templates with intersecting and overlapping ranges
11848 </table><p>ho</p><table>
11852 </td></tr></tbody></table>
11854 <p about="#mwt1" typeof="mw:Transclusion" data-parsoid='{"stx":"html","autoInsertedEnd":true,"pi":[[{"k":"1"}],[{"k":"1"}],[{"k":"1"}]],"firstWikitextNode":"table"}' data-mw='{"parts":["{|",{"template":{"target":{"wt":"echo","href":"./Template:Echo"},"params":{"1":{"wt":"\n<p>ha</p>"}},"i":0}},"\n","{|",{"template":{"target":{"wt":"echo","href":"./Template:Echo"},"params":{"1":{"wt":"\n<p>ho</p>"}},"i":1}},"\n",{"template":{"target":{"wt":"echo","href":"./Template:Echo"},"params":{"1":{"wt":"{{!}}hi"}},"i":2}},"\n|}"]}'>ha</p><table about="#mwt1" typeof="mw:ExpandedAttrs" data-mw='{"attribs":[[{"txt":"","html":""},{"html":""}]]}'>
11856 </table><p about="#mwt1">ho</p><table about="#mwt1" typeof="mw:ExpandedAttrs" data-mw='{"attribs":[[{"txt":"","html":""},{"html":""}]]}'>
11858 <tbody><tr><td>hi</td></tr>
11863 Template:MSGNW test
11865 ''None'' of '''this''' should be
11867 but rather passed unmodified
11875 # hmm, fix this or just deprecate msgnw and document its behavior?
11879 {{msgnw:MSGNW test}}
11881 <p>''None'' of '''this''' should be
11883  but rather passed unmodified
11884 {{test}}
11888 <!-- comment -->
11895 {{int:youhavenewmessages|lots of money|not!}}
11897 <p>You have lots of money (not!).
11902 int keyword - non-existing message
11913 Foo<noinclude>zar</noinclude><includeonly>bar</includeonly>
11917 <includeonly> and <noinclude> being included
11928 <onlyinclude>Foo</onlyinclude>bar
11932 <onlyinclude> being included
11944 <onlyinclude>Foo</onlyinclude>bar<includeonly>zar</includeonly>
11948 <onlyinclude> and <includeonly> being included
11957 <includeonly> and <noinclude> on a page
11959 Foo<noinclude>zar</noinclude><includeonly>bar</includeonly>
11966 Un-closed <noinclude>
11973 <onlyinclude> on a page
11975 <onlyinclude>Foo</onlyinclude>bar
11982 Un-closed <onlyinclude>
11989 Self-closed noinclude, includeonly, onlyinclude tags
12000 Unbalanced includeonly and noinclude tags
12004 |b</noinclude></noinclude>
12005 |c</noinclude></includeonly>
12006 |d</includeonly></includeonly>
12015 <td>c</includeonly>
12017 <td>d</includeonly></includeonly>
12023 Template:Includeonly section
12026 ==Includeonly section==
12032 T8563: Edit link generation for section shown by <includeonly>
12034 {{includeonly section}}
12036 <h2><span class="mw-headline" id="Includeonly_section">Includeonly section</span><span class="mw-editsection"><span class="mw-editsection-bracket">[</span><a href="/index.php?title=Template:Includeonly_section&action=edit&section=T-1" title="Template:Includeonly section">edit</a><span class="mw-editsection-bracket">]</span></span></h2>
12037 <h2><span class="mw-headline" id="Section_T-1">Section T-1</span><span class="mw-editsection"><span class="mw-editsection-bracket">[</span><a href="/index.php?title=Template:Includeonly_section&action=edit&section=T-2" title="Template:Includeonly section">edit</a><span class="mw-editsection-bracket">]</span></span></h2>
12041 # Uses same input as the contents of [[Template:Includeonly section]]
12043 T8563: Section extraction for section shown by <includeonly>
12048 ==Includeonly section==
12056 T8563: Edit link generation for section suppressed by <includeonly>
12059 ==Includeonly section==
12063 <h2><span class="mw-headline" id="Section_1">Section 1</span><span class="mw-editsection"><span class="mw-editsection-bracket">[</span><a href="/index.php?title=Parser_test&action=edit&section=1" title="Edit section: Section 1">edit</a><span class="mw-editsection-bracket">]</span></span></h2>
12068 T8563: Section extraction for section suppressed by <includeonly>
12073 ==Includeonly section==
12081 Un-closed <includeonly>
12086 <meta typeof="mw:Includes/IncludeOnly" data-parsoid='{"src":"<includeonly>"}' data-mw='{"src":"<includeonly>"}'/>
12089 ## We used to, but no longer wt2wt this test since the default serializer
12090 ## will normalize the include directives to serialize on their own line.
12091 ## Selser will take care of preserving formatting in scenarios where they
12092 ## intermingled with other wikitext.
12094 Includes and comments at SOL
12096 parsoid=wt2html,html2html
12098 <!-- comment --><noinclude><!-- comment --></noinclude><!-- comment -->==hu==
12106 some</noinclude>* stuff
12109 <includeonly>can have stuff</includeonly>===here===
12112 <h2><span class="mw-headline" id="hu">hu</span></h2>
12120 <ul><li>here</li></ul>
12121 <h3><span class="mw-headline" id="here">here</span></h3>
12124 <!-- comment --><meta typeof="mw:Includes/NoInclude" data-parsoid='{"src":"<noinclude>"}'/><!-- comment --><meta typeof="mw:Includes/NoInclude/End" data-parsoid='{"src":"</noinclude>"}'/><!-- comment --><h2 id="hu">hu</h2>
12126 <meta typeof="mw:Includes/NoInclude" data-parsoid='{"src":"<noinclude>"}'/>
12128 <meta typeof="mw:Includes/NoInclude/End" data-parsoid='{"src":"</noinclude>"}'/><ul><li>stuff</li>
12131 <meta typeof="mw:Includes/NoInclude" data-parsoid='{"src":"<noinclude>"}'/>
12132 <p>some<meta typeof="mw:Includes/NoInclude/End" data-parsoid='{"src":"</noinclude>"}'/>* stuff</p>
12133 <ul><li>here</li></ul>
12135 <meta typeof="mw:Includes/IncludeOnly" data-parsoid='{"src":"<includeonly>can have stuff</includeonly>"}' data-mw='{"src":"<includeonly>can have stuff</includeonly>"}'/><meta typeof="mw:Includes/IncludeOnly/End" data-parsoid='{"src":""}'/><h3 id="here">here</h3>
12139 # TODO: test with DOM fragment reuse!
12141 Parsoid: DOM fragment reuse
12143 parsoid=wt2wt,wt2html
12145 a{{echo|b<table></table>c}}d
12157 <p about="#mwt1" typeof="mw:Transclusion" data-mw='{"parts":["a",{"template":{"target":{"wt":"echo","href":"./Template:Echo"},"params":{"1":{"wt":"b<table></table>c"}},"i":0}},"d"]}' data-parsoid='{"pi":[[{"k":"1"}]]}'>ab</p><table about="#mwt1" data-parsoid='{"stx":"html"}'></table><p about="#mwt1">cd</p>
12159 <p about="#mwt2" typeof="mw:Transclusion" data-mw='{"parts":["a",{"template":{"target":{"wt":"echo","href":"./Template:Echo"},"params":{"1":{"wt":"b\n<table></table>\nc"}},"i":0}},"d"]}' data-parsoid='{"pi":[[{"k":"1"}]]}'>ab</p><span about="#mwt2">
12160 </span><table about="#mwt2" data-parsoid='{"stx":"html"}'></table><span about="#mwt2">
12161 </span><p about="#mwt2">cd</p>
12163 <p about="#mwt3" typeof="mw:Transclusion" data-mw='{"parts":[{"template":{"target":{"wt":"echo","href":"./Template:Echo"},"params":{"1":{"wt":"a\n\n<table></table>\n\nb"}},"i":0}}]}' data-parsoid='{"pi":[[{"k":"1"}]]}'>a</p><span about="#mwt3">
12165 </span><table about="#mwt3" data-parsoid='{"stx":"html"}'></table><span about="#mwt3">
12167 </span><p about="#mwt3">b</p>
12171 Parsoid: Merge double tds (T52603)
12176 |{{echo|{{!}} foo}}
12180 <tr><td about="#mwt1" typeof="mw:Transclusion" data-mw='{"parts":["|",{"template":{"target":{"wt":"echo","href":"./Template:Echo"},"params":{"1":{"wt":"{{!}} foo"}},"i":0}}]}'> foo</td></tr>
12185 Parsoid: Merge double tds in nested transclusion content (T52603)
12191 |{{echo|{{!}} foo}}
12195 <div about="#mwt1" typeof="mw:Transclusion" data-mw='{"parts":[{"template":{"target":{"wt":"echo","href":"./Template:Echo"},"params":{"1":{"wt":"<div>"}},"i":0}},"\n{|\n|",{"template":{"target":{"wt":"echo","href":"./Template:Echo"},"params":{"1":{"wt":"{{!}} foo"}},"i":1}},"\n|}\n",{"template":{"target":{"wt":"echo","href":"./Template:Echo"},"params":{"1":{"wt":"</div>"}},"i":2}}]}'>
12197 <tr><td data-mw='{"parts":["|"]}'> foo</td></tr>
12203 ### <includeonly> and <noinclude> in attributes
12206 0. includeonly around the entire attribute
12208 <span <includeonly>id="v1"</includeonly><noinclude>id="v2"</noinclude>>bar</span>
12210 <p><span id="v2">bar</span>
12215 1. includeonly in html attr key
12217 <span <noinclude>id</noinclude><includeonly>about</includeonly>="foo">bar</span>
12219 <p><span id="foo">bar</span>
12224 2. includeonly in html attr value
12226 <span id="<noinclude>v1</noinclude><includeonly>v2</includeonly>">bar</span>
12227 <span id=<noinclude>"v1"</noinclude><includeonly>"v2"</includeonly>>bar</span>
12229 <p><span id="v1">bar</span>
12230 <span id="v1">bar</span>
12235 3. includeonly in part of an attr value
12237 <span style="color:<noinclude>red</noinclude><includeonly>blue</includeonly>;">bar</span>
12239 <p><span style="color:red;">bar</span>
12244 4. includeonly in table attributes
12268 ### Preprocessor precedence tests
12269 ### See: https://www.mediawiki.org/wiki/Preprocessor_ABNF
12271 ##{{[[-{{{{{{[[Foo|bar}}]]}-}}}}}]]
12273 Preprocessor precedence 1: link is rightmost opening
12279 But close-brace is not a valid character in a link title:
12282 However, we can still tell this was handled as a link in the preprocessor:
12283 {{echo|[[Foo}}|bar]]|bat}}
12285 <p>{{<a href="/wiki/Foo" title="Foo">bar}}</a>
12286 </p><p>But close-brace is not a valid character in a link title:
12288 </p><p>However, we can still tell this was handled as a link in the preprocessor:
12292 <p>{{<a rel="mw:WikiLink" href="./Foo" title="Foo">bar}}</a></p>
12293 <p>But close-brace is not a valid character in a link title: {{[[Foo}}|bar]]</p>
12294 <p>However, we can still tell this was handled as a link in the preprocessor: <span typeof="mw:Transclusion" data-mw='{"parts":[{"template":{"target":{"wt":"echo","href":"./Template:Echo"},"params":{"1":{"wt":"[[Foo}}|bar]]"},"2":{"wt":"bat"}},"i":0}}]}'>[[Foo}}|bar]]</span></p>
12298 Preprocessor precedence 2: template is rightmost opening
12307 <p>-<span typeof="mw:Transclusion" data-mw='{"parts":[{"template":{"target":{"wt":"echo","href":"./Template:Echo"},"params":{"1":{"wt":"foo}-"}},"i":0}}]}'>foo}-</span>-</p>
12311 Preprocessor precedence 3: language converter is rightmost opening
12327 <p typeof="mw:Transclusion" data-mw='{"parts":[{"template":{"target":{"wt":"echo","href":"./Template:Echo"},"params":{"1":{"wt":"hi"}},"i":0}}]}'>hi</p>
12328 <p>{{<span typeof="mw:LanguageVariant" data-mw-variant='{"disabled":{"t":"echo|hi}}"}}'></span></p>
12329 <p>[[<span typeof="mw:LanguageVariant" data-mw-variant='{"disabled":{"t":"raw]]"}}'></span></p>
12333 Preprocessor precedence 4: left-most angle bracket
12344 Template:Precedence5
12350 Preprocessor precedence 5: tplarg takes precedence over template
12352 {{Precedence5|Bullet}}
12354 <ul><li>Bar</li></ul>
12357 <ul typeof="mw:Transclusion" data-mw='{"parts":[{"template":{"target":{"wt":"Precedence5","href":"./Template:Precedence5"},"params":{"1":{"wt":"Bullet"}},"i":0}}]}'><li>Bar</li></ul>
12361 Preprocessor precedence 6: broken link is rightmost opening
12367 {{echo|[[Foo|bar|bat=baz}}
12370 </p><p>{{echo|[[Foo|bar|bat=baz}}
12373 <p>{{echo|[[Foo}}</p>
12374 <p>{{echo|[[Foo|bar|bat=baz}}</p>
12377 # This next test exposes a difference between PHP and Parsoid:
12378 # Given [[Foo|{{echo|Bar]]x}}y]]z:
12379 # 1) Both PHP and Parsoid ignore the `]]` inside the `echo` in the
12380 # "preprocessor" stage. The `{{echo` extends until the `x}}`, and the
12381 # outer `[[Foo` extends until the `y]]`
12382 # 2a) But then the PHP preprocessor emits `[[Foo|Bar]]xy]]z` as an
12383 # intermediate result (after template expansion), and link processing
12384 # happens on this intermediate result, which moves the wikilink
12385 # boundary leftward to `[[Foo|Bar]]`
12386 # 2b) Parsoid works in a single step, so it's going to keep the
12387 # wikilink as extending to the `y]]`
12388 # 3a) Then PHP does linktrail processing which slurps up the trailing
12389 # `xy` inside the link.
12390 # 3b) Parsoid will do linktrail processing to slurp up the trailing
12391 # `z` inside the link.
12392 # This is "correct" behavior. Parsoid's basic worldview is that the
12393 # `]]` inside the template shouldn't be allowed to leak out to affect
12394 # the surrounding wikilink. PHP may match Parsoid (in the future)
12395 # if you use {{#balance}} (T114445).
12398 Preprocessor precedence 7: broken template is rightmost opening
12404 [[Foo|{{echo|Bar]]-x}}-y]]-z
12406 Careful: linktrails can move the end of the wikilink:
12407 [[Foo|{{echo|y']]a}}l]]l
12409 <p><a href="/wiki/Foo" title="Foo">{{echo|Bar</a>
12410 </p><p><a href="/wiki/Foo" title="Foo">Bar</a>-x-y]]-z
12411 </p><p>Careful: linktrails can move the end of the wikilink:
12412 <a href="/wiki/Foo" title="Foo">y'al</a>]]l
12415 <p>[[Foo|{{echo|Bar]]</p>
12416 <p><a rel="mw:WikiLink" href="./Foo" title="Foo"><span typeof="mw:Transclusion" data-mw='{"parts":[{"template":{"target":{"wt":"echo","href":"./Template:Echo"},"params":{"1":{"wt":"Bar]]-x"}},"i":0}}]}'>Bar]]-x</span>-y</a>-z</p>
12417 <p>Careful: linktrails can move the end of the wikilink:
12418 <a rel="mw:WikiLink" href="./Foo" title="Foo"><span typeof="mw:Transclusion" data-mw='{"parts":[{"template":{"target":{"wt":"echo","href":"./Template:Echo"},"params":{"1":{"wt":"y']]a"}},"i":0}}]}'>y']]a</span>ll</a></p>
12422 Preprocessor precedence 8: broken language converter is rightmost opening
12433 Template:Preprocessor_precedence_9
12438 ;7: {{{{{{{4}}}}}}}
12442 Preprocessor precedence 9: groups of braces
12444 {{Preprocessor precedence 9|Four|Bullet|1|2}}
12450 <ul><li>Bar</li></ul>
12454 <dd>{Bullet}</dd></dl>
12457 <dl about="#mwt1" typeof="mw:Transclusion" data-mw='{"parts":[{"template":{"target":{"wt":"Preprocessor precedence 9","href":"./Template:Preprocessor_precedence_9"},"params":{"1":{"wt":"Four"},"2":{"wt":"Bullet"},"3":{"wt":"1"},"4":{"wt":"2"}},"i":0}}]}'>
12462 </dl><ul about="#mwt1">
12464 </ul><span about="#mwt1"> </span><dl about="#mwt1">
12473 Template:Preprocessor_precedence_10
12480 ;6: -{{{{{{4}}}}}}-
12481 ;7: -{{{{{{{5}}}}}}}-
12485 Preprocessor precedence 10: groups of braces with leading dash
12489 {{Preprocessor precedence 10|Three|raw2|Bullet|1|2}}
12495 <ul><li>Bar-</li></ul>
12502 <ul><li>Bar-</li></ul>
12509 <dl about="#mwt1" typeof="mw:Transclusion" data-mw='{"parts":[{"template":{"target":{"wt":"Preprocessor precedence 10","href":"./Template:Preprocessor_precedence_10"},"params":{"1":{"wt":"Three"},"2":{"wt":"raw2"},"3":{"wt":"Bullet"},"4":{"wt":"1"},"5":{"wt":"2"}},"i":0}}]}'>
12511 <dd><span typeof="mw:LanguageVariant" data-mw-variant='{"disabled":{"t":"raw"}}'></span></dd>
12514 </dl><ul about="#mwt1">
12516 </ul><span about="#mwt1"> </span><dl about="#mwt1">
12520 <dd><span typeof="mw:LanguageVariant" data-mw-variant='{"disabled":{"t":"raw2"}}'></span></dd>
12523 </dl><ul about="#mwt1">
12525 </ul><span about="#mwt1"> </span><dl about="#mwt1">
12529 <dd><span typeof="mw:LanguageVariant" data-mw-variant='{"disabled":{"t":"raw2"}}'></span></dd>
12534 Preprocessor precedence 11: found during visual diff testing
12536 {{#tag:span|-{{#tag:span|-{{echo|x}}}}}}
12538 {{echo|-{{echo|-{{echo|x}}}}}}
12540 {{echo|-{{echo|x}}}}
12542 <p><span>-<span>-x</span></span>
12547 <p><span about="#mwt1" typeof="mw:Transclusion" data-mw='{"parts":[{"template":{"target":{"wt":"#tag:span","function":"tag"},"params":{"1":{"wt":"-{{#tag:span|-{{echo|x}}}}"}},"i":0}}]}'>-<span>-x</span></span></p>
12549 <p about="#mwt4" typeof="mw:Transclusion" data-mw='{"parts":[{"template":{"target":{"wt":"echo","href":"./Template:Echo"},"params":{"1":{"wt":"-{{echo|-{{echo|x}}}}"}},"i":0}}]}'>--x</p>
12551 <p about="#mwt7" typeof="mw:Transclusion" data-mw='{"parts":[{"template":{"target":{"wt":"echo","href":"./Template:Echo"},"params":{"1":{"wt":"-{{echo|x}}"}},"i":0}}]}'>-x</p>
12555 Preprocessor precedence 12: broken language converter closed by brace.
12559 This form breaks the template, which is unfortunate:
12560 *{{echo|foo-{bar}bat}}
12562 But if the broken language converter markup is inside an extension
12563 tag, nothing bad happens:
12564 *<nowiki>foo-{bar}bat</nowiki>
12565 *{{echo|<nowiki>foo-{bar}bat</nowiki>}}
12566 *<pre>foo-{bar}bat</pre>
12567 *{{echo|<pre>foo-{bar}bat</pre>}}
12569 <tag>foo-{bar}bat</tag>
12570 {{echo|<tag>foo-{bar}bat</tag>}}
12573 <p>This form breaks the template, which is unfortunate:
12575 <ul><li>{{echo|foo-{bar}bat}}</li></ul>
12576 <p>But if the broken language converter markup is inside an extension
12577 tag, nothing bad happens:
12579 <ul><li>foo-{bar}bat</li>
12580 <li>foo-{bar}bat</li>
12581 <li><pre>foo-{bar}bat</pre></li>
12582 <li><pre>foo-{bar}bat</pre></li></ul>
12583 <pre>'foo-{bar}bat'
12587 <pre>'foo-{bar}bat'
12592 <p>This form breaks the template, which is unfortunate:</p>
12594 <li>{{echo|foo-{bar}bat}}</li>
12596 <p>But if the broken language converter markup is inside an extension tag, nothing bad happens:</p>
12598 <li><span typeof="mw:Nowiki">foo-{bar}bat</span></li>
12599 <li><span typeof="mw:Transclusion mw:Nowiki" data-mw='{"parts":[{"template":{"target":{"wt":"echo","href":"./Template:Echo"},"params":{"1":{"wt":"<nowiki>foo-{bar}bat</nowiki>"}},"i":0}}]}'>foo-{bar}bat</span></li>
12600 <li><pre typeof="mw:Extension/pre" data-mw='{"name":"pre","attrs":{},"body":{"extsrc":"foo-{bar}bat"}}'>foo-{bar}bat</pre></li>
12601 <li><pre typeof="mw:Transclusion mw:Extension/pre" data-mw='{"parts":[{"template":{"target":{"wt":"echo","href":"./Template:Echo"},"params":{"1":{"wt":"<pre>foo-{bar}bat</pre>"}},"i":0}}]}'>foo-{bar}bat</pre></li>
12603 <pre typeof="mw:Extension/tag" data-mw='{"name":"tag","attrs":{},"body":{"extsrc":"foo-{bar}bat"}}'></pre> <pre typeof="mw:Extension/tag mw:Transclusion" data-mw='{"parts":[{"template":{"target":{"wt":"echo","href":"./Template:Echo"},"params":{"1":{"wt":"<tag>foo-{bar}bat</tag>"}},"i":0}}]}'></pre>
12607 Preprocessor precedence 13: broken language converter in external link
12611 *[http://example.com/-{foo Example in URL]
12612 *[http://example.com Example in -{link} description]
12613 *{{echo|[http://example.com/-{foo Breaks template, however]}}
12615 <ul><li><a rel="nofollow" class="external text" href="http://example.com/-{foo">Example in URL</a></li>
12616 <li><a rel="nofollow" class="external text" href="http://example.com">Example in -{link} description</a></li>
12617 <li>{{echo|<a rel="nofollow" class="external text" href="http://example.com/-{foo">Breaks template, however</a>}}</li></ul>
12620 <li><a rel="mw:ExtLink" class="external text" href="http://example.com/-{foo">Example in URL</a></li>
12621 <li><a rel="mw:ExtLink" class="external text" href="http://example.com">Example in -{link} description</a></li>
12622 <li>{{echo|<a rel="mw:ExtLink" class="external text" href="http://example.com/-{foo">Breaks template, however</a>}}</li>
12627 Preprocessor precedence 14: broken language converter in comment
12629 *<!--{{foo}}-->...should be ok
12630 *<!---{{foo}}-->...extra dashes
12631 *{{echo|foo<!-- -{bar} -->bat}}...should be ok
12633 <ul><li>...should be ok</li>
12634 <li>...extra dashes</li>
12635 <li>foobat...should be ok</li></ul>
12638 <li><!--{{foo}}-->...should be ok</li>
12639 <li><!---{{foo}}-->...extra dashes</li>
12640 <li><span about="#mwt1" typeof="mw:Transclusion" data-mw='{"parts":[{"template":{"target":{"wt":"echo","href":"./Template:Echo"},"params":{"1":{"wt":"foo<!-- -{bar} -->bat"}},"i":0}}]}'>foo</span><span about="#mwt1"><!-- -{bar} --></span><span about="#mwt1">bat</span>...should be ok</li>
12645 Preprocessor precedence 15: broken brace markup in headings
12647 wgFragmentMode=[ 'html5', 'legacy' ]
12651 __NOTOC__ __NOEDITSECTION__
12660 ===5 foo{{{bar 5===
12665 <h3><span id="1_foo.5Bbar_1"></span><span class="mw-headline" id="1_foo[bar_1">1 foo[bar 1</span></h3>
12668 <h3><span id="2_foo.5B.5Bbar_2"></span><span class="mw-headline" id="2_foo[[bar_2">2 foo[[bar 2</span></h3>
12671 <h3><span id="3_foo.7Bbar_3"></span><span class="mw-headline" id="3_foo{bar_3">3 foo{bar 3</span></h3>
12674 <h3><span id="4_foo.7B.7Bbar_4"></span><span class="mw-headline" id="4_foo{{bar_4">4 foo{{bar 4</span></h3>
12677 <h3><span id="5_foo.7B.7B.7Bbar_5"></span><span class="mw-headline" id="5_foo{{{bar_5">5 foo{{{bar 5</span></h3>
12680 <h3><span id="6_foo-.7Bbar_6"></span><span class="mw-headline" id="6_foo-{bar_6">6 foo-{bar 6</span></h3>
12684 <meta property="mw:PageProp/notoc"/> <meta property="mw:PageProp/noeditsection"/>
12685 <h3 id="1_foo[bar_1"><span id="1_foo.5Bbar_1" typeof="mw:FallbackId"></span>1 foo[bar 1</h3>
12687 <h3 id="2_foo[[bar_2"><span id="2_foo.5B.5Bbar_2" typeof="mw:FallbackId"></span>2 foo[[bar 2</h3>
12689 <h3 id="3_foo{bar_3"><span id="3_foo.7Bbar_3" typeof="mw:FallbackId"></span>3 foo{bar 3</h3>
12691 <h3 id="4_foo{{bar_4"><span id="4_foo.7B.7Bbar_4" typeof="mw:FallbackId"></span>4 foo{{bar 4</h3>
12693 <h3 id="5_foo{{{bar_5"><span id="5_foo.7B.7B.7Bbar_5" typeof="mw:FallbackId"></span>5 foo{{{bar 5</h3>
12695 <h3 id="6_foo-{bar_6"><span id="6_foo-.7Bbar_6" typeof="mw:FallbackId"></span>6 foo-{bar 6</h3>
12700 Preprocessor precedence 16: matching closing braces to opening braces
12705 -{{{echo|foo}}bar}-
12710 <p><span typeof="mw:LanguageVariant" data-mw-variant='{"disabled":{"t":"<span about=\"#mwt1\" typeof=\"mw:Transclusion\" data-parsoid='{\"pi\":[[{\"k\":\"1\"}]],\"dsr\":[2,14,null,null]}' data-mw='{\"parts\":[{\"template\":{\"target\":{\"wt\":\"echo\",\"href\":\"./Template:Echo\"},\"params\":{\"1\":{\"wt\":\"foo\"}},\"i\":0}}]}'>foo</span>bar"}}'></span></p>
12714 Preprocessor precedence 17: template w/o target shouldn't prevent closing
12723 <p about="#mwt1" typeof="mw:Transclusion" data-mw='{"parts":[{"template":{"target":{"wt":"echo","href":"./Template:Echo"},"params":{"1":{"wt":"hi {{}}"}},"i":0}}]}'>hi {{}}</p>
12726 # Ensure we're using a language without variants for this test; even
12727 # if $wgUsePigLatinVariant is true. We've picked `de` arbitrarily.
12729 Preprocessor precedence 18: another rightmost wins scenario
12734 {{ -{{{{1|tplarg}}} }} }-
12736 <p>{{ -{tplarg }} }-
12739 <p>{{ -{<span about="#mwt1" typeof="mw:Param" data-mw='{"parts":[{"templatearg":{"target":{"wt":"1"},"params":{"1":{"wt":"tplarg"}},"i":0}}]}'>tplarg</span> }} }-</p>
12743 Preprocessor precedence 19: break syntax
12756 ### Token Stream Patcher tests
12758 ### These tests won't always pass wt2wt and other modes because
12759 ### on serialization, the table will be output on a new line.
12760 ### For now, we are blacklisting them, and using this to test selser.
12764 1. Table tag in SOL posn. should get reparsed correctly with valid TSR
12766 parsoid=wt2html,wt2wt
12768 {{echo|}}{| width = '100%'
12772 <span typeof="mw:Transclusion" data-mw='{"parts":[{"template":{"target":{"wt":"echo","href":"./Template:Echo"},"params":{"1":{"wt":""}},"i":0}}]}'></span><table width="100%">
12773 <tbody><tr><td>foo</td></tr>
12777 ## We used to, but no longer wt2wt this test since the default serializer
12778 ## will normalize the include directives to serialize on their own line.
12779 ## Selser will take care of preserving formatting in scenarios where they
12780 ## intermingled with other wikitext.
12782 2. Table tag in SOL posn. should get reparsed correctly with valid TSR
12786 <includeonly>a</includeonly>{| {{{b}}}
12790 <meta typeof="mw:Includes/IncludeOnly" data-parsoid='{"src":"<includeonly>a</includeonly>"}' data-mw='{"src":"<includeonly>a</includeonly>"}'/><meta typeof="mw:Includes/IncludeOnly/End" data-parsoid='{"src":""}'/><table about="#mwt2" typeof="mw:ExpandedAttrs" data-parsoid='{"a":{"{{{b}}}":null},"sa":{"{{{b}}}":""}}' data-mw='{"attribs":[[{"txt":"{{{b}}}","html":"<span about=\"#mwt1\" typeof=\"mw:Param\" data-parsoid='{\"pi\":[[]],\"dsr\":[31,38,null,null]}' data-mw='{\"parts\":[{\"templatearg\":{\"target\":{\"wt\":\"b\"},\"params\":{},\"i\":0}}]}'>{{{b}}}</span>"},{"html":""}]]}'>
12791 <tbody><tr><td>c</td></tr>
12796 Table wikitext syntax outside wiki-tables
12800 ! not a table heading
12803 | class="foo bar" | baz
12811 ! not a table heading
12814 | class="foo bar" | baz
12823 ### Testing parsing of templates where a template arg
12824 ### has the same name as the template itself.
12830 {{{quote|{{{1}}}}}}
12834 Templates: Template Name/Arg clash: 1. Use of positional param
12843 Templates: Template Name/Arg clash: 2. Use of named param
12845 {{quote|quote=foo}}
12852 Templates: Template Name/Arg clash: 3. Use of named param with empty input
12861 ### Parsoid-centric tests to stress Parsoid's ability to RT them unchanged
12865 Templates: 1. Simple use
12874 Templates: 2. Inside a block tag
12876 <div>{{echo|Foo}}</div>
12877 <blockquote>{{echo|Foo}}</blockquote>
12880 <blockquote>Foo</blockquote>
12884 <blockquote><p>Foo</p></blockquote>
12888 Templates: P-wrapping: 1a. Templates on consecutive lines
12899 Templates: P-wrapping: 1b. Templates on consecutive lines
12913 Templates: P-wrapping: 1c. Templates on consecutive lines
12916 {{echo|bar}} <div>baz</div>
12925 bar </p><div>baz</div>
12929 Templates: P-wrapping: 1d. Template preceded by comment-only line
12938 <p about="#mwt223" typeof="mw:Transclusion" data-mw='{"parts":[{"template":{"target":{"wt":"echo","href":"./Template:Echo"},"params":{"1":{"wt":"Bar"}},"i":0}}]}'>Bar</p>
12942 Templates: Scopes should not be expanded unnecessarily
12944 parsoid=wt2html,wt2wt
12946 {{echo|<div>a</div>}}b{{echo|
12949 <div about="#mwt1" typeof="mw:Transclusion" data-mw='{"parts":[{"template":{"target":{"wt":"echo","href":"./Template:Echo"},"params":{"1":{"wt":"<div>a</div>"}},"i":0}}]}'>a</div><p>b</p><span about="#mwt2" typeof="mw:Transclusion" data-mw='{"parts":[{"template":{"target":{"wt":"echo","href":"./Template:Echo"},"params":{"1":{"wt":"\n<div>c</div>"}},"i":0}}]}'>
12950 </span><div about="#mwt2">c</div>
12954 Templates: Inline Text: 1. Multiple template uses
12956 {{echo|Foo}}bar{{echo|baz}}
12963 Templates: Inline Text: 2. Back-to-back template uses
12965 {{echo|Foo}}{{echo|bar}}
12972 Templates: Block Tags: 1. Multiple template uses
12974 {{echo|<div>Foo</div>}}<div>bar</div>{{echo|<div>baz</div>}}
12976 <div>Foo</div><div>bar</div><div>baz</div>
12981 Templates: Block Tags: 2. Back-to-back template uses
12983 {{echo|<div>Foo</div>}}{{echo|<div>bar</div>}}
12985 <div>Foo</div><div>bar</div>
12989 ## Parsoid drops empty elements in templates.
12991 Templates: Correctly encapsulate templates producing </p> tag without a corresponding <p> tag
12998 b</p><p class="mw-empty-elt"></p>
13000 <p about="#mwt1" typeof="mw:Transclusion" data-mw='{"parts":[{"template":{"target":{"wt":"echo","href":"./Template:Echo"},"params":{"1":{"wt":"a\nb</p>"}},"i":0}}]}'>a</p><span about="#mwt1">
13001 </span><p about="#mwt1">b</p>
13005 Templates: Links: 1. Simple example
13007 {{echo|[[Foo|bar]]}}
13009 <p><a href="/wiki/Foo" title="Foo">bar</a>
13014 Templates: Links: 2. Generation of link href
13016 [[{{echo|Foo}}|bar]]
13018 <p><a href="/wiki/Foo" title="Foo">bar</a>
13023 Templates: Links: 3. Generation of part of a link href
13025 [[Fo{{echo|o}}|bar]]
13027 [[Foo{{echo|bar}}]]
13029 [[Foo{{echo|bar}}baz]]
13031 [[Foo{{echo|bar}}|bar]]
13033 [[:Foo{{echo|bar}}]]
13035 [[:Foo{{echo|bar}}|bar]]
13037 <p><a href="/wiki/Foo" title="Foo">bar</a>
13038 </p><p><a href="/index.php?title=Foobar&action=edit&redlink=1" class="new" title="Foobar (page does not exist)">Foobar</a>
13039 </p><p><a href="/index.php?title=Foobarbaz&action=edit&redlink=1" class="new" title="Foobarbaz (page does not exist)">Foobarbaz</a>
13040 </p><p><a href="/index.php?title=Foobar&action=edit&redlink=1" class="new" title="Foobar (page does not exist)">bar</a>
13041 </p><p><a href="/index.php?title=Foobar&action=edit&redlink=1" class="new" title="Foobar (page does not exist)">Foobar</a>
13042 </p><p><a href="/index.php?title=Foobar&action=edit&redlink=1" class="new" title="Foobar (page does not exist)">bar</a>
13047 Templates: Links: 4. Multiple templates generating link href
13049 [[{{echo|F}}{{echo|o}}ob{{echo|ar}}]]
13051 <p><a href="/index.php?title=Foobar&action=edit&redlink=1" class="new" title="Foobar (page does not exist)">Foobar</a>
13056 Templates: Links: 5. Generation of link text
13058 [[Foo|{{echo|bar}}]]
13060 <p><a href="/wiki/Foo" title="Foo">bar</a>
13065 Templates: Links: 5. Nested templates (only outermost template should be marked)
13067 {{echo|[[{{echo|Foo}}|bar]]}}
13069 <p><a href="/wiki/Foo" title="Foo">bar</a>
13074 Templates: HTML Tag: 1. Generation of HTML attr. key
13076 <div {{echo|style}}="color:red;">foo</div>
13078 <div style="color:red;">foo</div>
13083 Templates: HTML Tag: 2. Generation of HTML attr. value
13085 <div style={{echo|'color:red;'}}>foo</div>
13087 <div style="color:red;">foo</div>
13092 Templates: HTML Tag: 3. Generation of HTML attr key and value
13094 <div {{echo|style}}={{echo|'color:red;'}}>foo</div>
13096 <div style="color:red;">foo</div>
13101 Templates: HTML Tag: 4. Generation of starting piece of HTML attr value
13103 <div title="{{echo|This is a long title}} with just one piece templated">foo</div>
13105 <div title="This is a long title with just one piece templated">foo</div>
13110 Templates: HTML Tag: 5. Generation of middle piece of HTML attr value
13112 <div title="This is a long title with just {{echo|one piece}} templated">foo</div>
13114 <div title="This is a long title with just one piece templated">foo</div>
13119 Templates: HTML Tag: 6. Generation of end piece of HTML attr value
13121 <div title="This is a long title with just one piece {{echo|templated}}">foo</div>
13123 <div title="This is a long title with just one piece templated">foo</div>
13127 # SSS FIXME: While it is great we added support for all this,
13128 # do we want to make this part of the spec? Maybe we want to
13129 # deprecate this kind of usage in the future?
13131 Templates: HTML Tag: 7. Generation of partial attribute key string
13133 <div st{{echo|yle}}="color:red;">foo</div>
13135 <div style="color:red;">foo</div>
13140 Templates: HTML Tag: 8. Template-generated attribute (k=v)
13142 <div {{echo|1=id="v1"}}>bar</div>
13144 <div id="v1">bar</div>
13149 Templates: HTML Tag: 9. Multiple template-generated attributes
13151 <div {{echo|1=id="v1" title="foo"}}>bar</div>
13153 <div id="v1" title="foo">bar</div>
13158 Templates: Support for templates generating attributes and content
13160 {| {{mixed_attr_content_template}}
13165 <table style="color:red;" title="T48811">
13175 <table style="color:red;" title="T48811" about="#mwt1" typeof="mw:Transclusion mw:ExpandedAttrs" data-mw='{"parts":["{| ",{"template":{"target":{"wt":"mixed_attr_content_template","href":"./Template:Mixed_attr_content_template"},"params":{},"i":0}},"\n|-\n|bar\n|}"]}'>
13184 Template:attribute_from_template
13190 Table cell with attribute before expanded attribute
13193 | align="center" {{attribute_from_template}} |456
13197 <tbody><tr><td align="center" class="123" about="#mwt2" typeof="mw:ExpandedAttrs" data-mw='{"attribs":[[{"txt":"class","html":"<span about=\"#mwt1\" typeof=\"mw:Transclusion\" data-parsoid='{\"pi\":[[]],\"dsr\":[20,47,null,null]}' data-mw='{\"parts\":[{\"template\":{\"target\":{\"wt\":\"attribute_from_template\",\"href\":\"./Template:Attribute_from_template\"},\"params\":{},\"i\":0}}]}'>class=\"123\"</span>"},{"html":""}]]}'>456</td></tr>
13202 1. Entities and nowikis inside templated attributes should be handled correctly
13204 <div {{echo|style{{=}}"background:#f9f9f9;"}}>foo</div>
13206 <div style="background:#f9f9f9;">foo</div>
13209 <div style="background:#f9f9f9;" about="#mwt3" typeof="mw:ExpandedAttrs" data-parsoid='{"stx":"html"}' data-mw='{"attribs":[[{"txt":"style","html":"<span about=\"#mwt1\" typeof=\"mw:Transclusion\" data-parsoid='{\"pi\":[[{\"k\":\"1\"}]],\"dsr\":[5,49,null,null]}' data-mw='{\"parts\":[{\"template\":{\"target\":{\"wt\":\"echo\",\"href\":\"./Template:Echo\"},\"params\":{\"1\":{\"wt\":\"style{{=}}\\\"background:&amp;#35;f9f9f9;\\\"\"}},\"i\":0}}]}'>style</span><span typeof=\"mw:Nowiki\" about=\"#mwt1\" data-parsoid=\"{}\">=</span><span about=\"#mwt1\" data-parsoid=\"{}\">\"background:</span><span typeof=\"mw:Entity\" about=\"#mwt1\" data-parsoid='{\"src\":\"&amp;#35;\",\"srcContent\":\"#\"}'>#</span><span about=\"#mwt1\" data-parsoid=\"{}\">f9f9f9;\"</span>"},{"html":""}]]}'>foo</div>
13213 2. Entities and nowikis inside templated attributes should be handled correctly
13216 |{{table_attribs_3}}
13221 <td style="background:#f9f9f9;">Foo
13226 <tbody><tr data-parsoid='{"autoInsertedEnd":true,"autoInsertedStart":true}'><td style="background:#f9f9f9;" typeof="mw:Transclusion" about="#mwt1" data-parsoid='{"autoInsertedEnd":true,"pi":[[]]}' data-mw='{"parts":["|",{"template":{"target":{"wt":"table_attribs_3","href":"./Template:Table_attribs_3"},"params":{},"i":0}}]}'>Foo</td></tr>
13231 3. Entities and nowikis inside templated attributes should be handled correctly inside templated tables
13234 |{{table_attribs_3}}
13239 <td style="background:#f9f9f9;">Foo
13243 <table about="#mwt1" typeof="mw:Transclusion" data-parsoid='{"pi":[[],[],[]]}' data-mw='{"parts":[{"template":{"target":{"wt":"tbl-start","href":"./Template:Tbl-start"},"params":{},"i":0}},"\n|",{"template":{"target":{"wt":"table_attribs_3","href":"./Template:Table_attribs_3"},"params":{},"i":1}},"\n",{"template":{"target":{"wt":"tbl-end","href":"./Template:Tbl-end"},"params":{},"i":2}}]}'>
13244 <tbody><tr><td style="background:#f9f9f9;">Foo</td></tr>
13250 4. Entities and nowikis inside templated attributes should be handled correctly inside templated tables
13253 |{{table_attribs_6}} hi
13258 <td style="background: red;">hi
13263 <tbody><tr><td style="background: red;" typeof="mw:Transclusion" about="#mwt1" data-parsoid='{"autoInsertedEnd":true,"pi":[[]]}' data-mw='{"parts":["|",{"template":{"target":{"wt":"table_attribs_6","href":"./Template:Table_attribs_6"},"params":{},"i":0}}," hi"]}'> hi</td></tr>
13268 Templates: HTML Tables: 1. Generating start of a HTML table
13270 {{echo|<table><tr><td>foo</td>}}</tr></table>
13272 <table><tr><td>foo</td></tr></table>
13277 Templates: HTML Tables: 2a. Generating middle of a HTML table
13279 <table><tr>{{echo|<td>foo</td>}}</tr></table>
13281 <table><tr><td>foo</td></tr></table>
13286 Templates: HTML Tables: 2b. Generating middle of a HTML table
13288 <table>{{echo|<tr><td>foo</td></tr>}}</table>
13290 <table><tr><td>foo</td></tr></table>
13295 Templates: HTML Tables: 3. Generating end of a HTML table
13297 <table><tr>{{echo|<td>foo</td></tr></table>}}
13299 <table><tr><td>foo</td></tr></table>
13304 Templates: HTML Tables: 4a. Generating a single tag of a HTML table
13306 {{echo|<table>}}<tr><td>foo</td></tr></table>
13308 <table><tr><td>foo</td></tr></table>
13313 Templates: HTML Tables: 4b. Generating a single tag of a HTML table
13315 <table>{{echo|<tr>}}<td>foo</td></tr></table>
13317 <table><tr><td>foo</td></tr></table>
13322 Templates: HTML Tables: 4c. Generating a single tag of a HTML table
13324 <table><tr>{{echo|<td>}}foo</td></tr></table>
13326 <table><tr><td>foo</td></tr></table>
13331 Templates: HTML Tables: 4d. Generating a single tag of a HTML table
13333 <table><tr><td>foo{{echo|</td>}}</tr></table>
13335 <table><tr><td>foo</td></tr></table>
13340 Templates: HTML Tables: 4e. Generating a single tag of a HTML table
13342 <table><tr><td>foo</td>{{echo|</tr>}}</table>
13344 <table><tr><td>foo</td></tr></table>
13349 Templates: HTML Tables: 4f. Generating a single tag of a HTML table
13351 <table><tr><td>foo</td></tr>{{echo|</table>}}
13353 <table><tr><td>foo</td></tr></table>
13358 Templates: HTML Tables: 5. Proper fostering of categories from inside
13360 parsoid=wt2html,wt2wt
13362 <table>[[Category:foo1]]<tr><td>foo</td></tr></table>
13363 <!--Two categories (T52330)-->
13364 <table>[[Category:bar1]][[Category:bar2]]<tr><td>foo</td></tr></table>
13366 <link rel="mw:PageProp/Category" href="./Category:Foo1"><table><tbody><tr><td>foo</td></tr></tbody></table>
13367 <!--Two categories (T52330)-->
13368 <link rel="mw:PageProp/Category" href="./Category:Bar1"><link rel="mw:PageProp/Category" href="./Category:Bar2"><table><tbody><tr><td>foo</td></tr></tbody></table>
13371 ## Remex doesn't account for fostered content.
13373 Templates: Wiki Tables: 1a. Fostering of entire template content
13381 <tr><td></td></tr></table>
13386 <table><tbody><tr><td></td></tr></tbody></table>
13388 <p about="#mwt2" typeof="mw:Transclusion" data-parsoid='{"fostered":true,"autoInsertedEnd":true,"autoInsertedStart":true,"firstWikitextNode":"TABLE","pi":[[{"k":"1"}]]}' data-mw='{"parts":["{|\n",{"template":{"target":{"wt":"echo","href":"./Template:Echo"},"params":{"1":{"wt":"a"}},"i":0}},"\n|}"]}'>a</p><table about="#mwt2">
13394 Templates: Wiki Tables: 1b. Fostering of entire template content
13407 <tr><td></td></tr></table>
13415 <tbody><tr><td></td></tr></tbody></table>
13417 <div about="#mwt3" typeof="mw:Transclusion" data-parsoid='{"stx":"html","fostered":true,"autoInsertedEnd":true,"firstWikitextNode":"TABLE","pi":[[{"k":"1"}],[{"k":"1"}]]}' data-mw='{"parts":["{|\n",{"template":{"target":{"wt":"echo","href":"./Template:Echo"},"params":{"1":{"wt":"<div>"}},"i":0}},"\nfoo\n",{"template":{"target":{"wt":"echo","href":"./Template:Echo"},"params":{"1":{"wt":"</div>"}},"i":1}},"\n|}"]}'>
13419 </div><table about="#mwt3">
13424 ## Remex doesn't account for fostered content.
13426 Templates: Wiki Tables: 2. Fostering of partial template content
13436 <tr><td></td></tr></table>
13441 <div>b</div><table>
13442 <tbody><tr><td></td></tr></tbody></table>
13444 <p about="#mwt2" typeof="mw:Transclusion" data-parsoid='{"fostered":true,"autoInsertedEnd":true,"autoInsertedStart":true,"firstWikitextNode":"TABLE","pi":[[{"k":"1"}]]}' data-mw='{"parts":["{|\n",{"template":{"target":{"wt":"echo","href":"./Template:Echo"},"params":{"1":{"wt":"a\n<div>b</div>"}},"i":0}},"\n|}"]}'>a</p><div about="#mwt2">b</div><table about="#mwt2">
13451 Templates: Wiki Tables: 3. td-content via multiple templates
13454 {{echo|{{pipe}}a}}{{echo|b}}
13465 Templates: Wiki Tables: 4. Templated tags, no content
13471 <tr><td></td></tr></table>
13476 Templates: Wiki Tables: 5. Templated tags, regular td-tags
13490 Templates: Wiki Tables: 6. Templated tags, templated td-tags
13503 ## This test case is very specific to Parsoid's internals
13504 ## and is hence only tested for Parsoid's code. Parsoid uses
13505 ## a <meta> marker tag for <ref> tags and they are expanded
13506 ## much later. We are verifying that this <meta> tag usage
13507 ## doesn't prevent foster parenting.
13509 Templates: Wiki Tables: 7. Fosterable <ref>s should get fostered
13511 {{PartialTable}}<ref>foo</ref>
13516 <p about="#mwt2" typeof="mw:Transclusion" data-mw='{"parts":[{"template":{"target":{"wt":"PartialTable","href":"./Template:PartialTable"},"params":{},"i":0}},"<ref>foo</ref>\n|}"]}'><sup about="#mwt3" class="mw-ref" id="cite_ref-1" rel="dc:references" typeof="mw:Extension/ref" data-mw='{"name":"ref","attrs":{},"body":{"id":"mw-reference-text-cite_note-1"}}'><a href="./Main_Page#cite_note-1" style="counter-reset: mw-Ref 1;"><span class="mw-reflink-text">[1]</span></a></sup></p><table about="#mwt2">
13520 <ol class="mw-references references" typeof="mw:Extension/references" about="#mwt5" data-mw='{"name":"references","attrs":{}}'><li about="#cite_note-1" id="cite_note-1"><a href="./Main_Page#cite_ref-1" rel="mw:referencedBy"><span class="mw-linkback-text">↑ </span></a> <span id="mw-reference-text-cite_note-1" class="mw-reference-text">foo</span></li></ol>
13524 Templates: Wiki Tables: 8. Fosterable meta-tags should get fostered
13534 <span about="#mwt1" typeof="mw:Transclusion" data-mw='{"parts":[{"template":{"target":{"wt":"echo","href":"./Template:Echo"},"params":{"1":{"wt":"\n{{{!}}\n{{!}}-"}},"i":0}},"\n<onlyinclude>\n|foo\n</onlyinclude>\n{{!}}}"]}'>
13535 </span><meta typeof="mw:Includes/OnlyInclude" about="#mwt1"/><table about="#mwt1">
13539 <meta typeof="mw:Includes/OnlyInclude/End"/></td></tr>
13544 Templates: Lists: Multi-line list-items via templates
13546 *{{echo|a {{nonexistent|
13548 *{{echo|b {{nonexistent|
13551 <ul><li>a <a href="/index.php?title=Template:Nonexistent&action=edit&redlink=1" class="new" title="Template:Nonexistent (page does not exist)">Template:Nonexistent</a></li>
13552 <li>b <a href="/index.php?title=Template:Nonexistent&action=edit&redlink=1" class="new" title="Template:Nonexistent (page does not exist)">Template:Nonexistent</a></li></ul>
13557 Templates: Ugly nesting: 1. Quotes opened/closed across templates (echo)
13559 {{echo|''a}}{{echo|b''c''d}}{{echo|''e}}
13561 <p><i>ab</i>c<i>d</i>e
13566 Templates: Ugly nesting: 2. Quotes opened/closed across templates (echo_with_span)
13567 (PHP parser generates misnested html)
13569 {{echo_with_span|''a}}{{echo_with_span|b''c''d}}{{echo_with_span|''e}}
13571 <p><span about="#mwt1" typeof="mw:Transclusion" data-mw="{"parts":[{"template":{"target":{"wt":"echo_with_span","href":"./Template:Echo_with_span"},"params":{"1":{"wt":"''a"}},"i":0}}]}"><i>a</i></span><i about="#mwt2" typeof="mw:Transclusion" data-mw="{"parts":[{"template":{"target":{"wt":"echo_with_span","href":"./Template:Echo_with_span"},"params":{"1":{"wt":"b''c''d"}},"i":0}},{"template":{"target":{"wt":"echo_with_span","href":"./Template:Echo_with_span"},"params":{"1":{"wt":"''e"}},"i":1}}]}"><span>b</span></i><span about="#mwt2">c</span><i about="#mwt2">d<span></span></i><span about="#mwt2">e</span></p>
13575 Templates: Ugly nesting: 3. Quotes opened/closed across templates (echo_with_div)
13576 (PHP parser generates misnested html; Parsoid html2wt mode adds newlines between {{echo}}s)
13578 parsoid=wt2html,wt2wt
13580 {{echo_with_div|''a}}{{echo_with_div|b''c''d}}{{echo_with_div|''e}}
13582 <div about="#mwt1" typeof="mw:Transclusion" data-mw="{"parts":[{"template":{"target":{"wt":"echo_with_div","href":"./Template:Echo_with_div"},"params":{"1":{"wt":"''a"}},"i":0}}]}"><i>a</i></div>
13583 <div about="#mwt2" typeof="mw:Transclusion" data-mw="{"parts":[{"template":{"target":{"wt":"echo_with_div","href":"./Template:Echo_with_div"},"params":{"1":{"wt":"b''c''d"}},"i":0}}]}"><i>b</i>c<i>d</i></div>
13584 <div about="#mwt3" typeof="mw:Transclusion" data-mw="{"parts":[{"template":{"target":{"wt":"echo_with_div","href":"./Template:Echo_with_div"},"params":{"1":{"wt":"''e"}},"i":0}}]}">e</div>
13588 Templates: Ugly nesting: 4. Divs opened/closed across templates
13590 a<div>b{{echo|c</div>d}}e
13595 <p>a</p><div>bc</div><p>de
13600 Templates: Ugly templates: 3. newline-only template parameter
13609 # This looks like a bug: a single newline triggers p/br for some reason.
13611 Templates: Ugly templates: 4. newline-only template parameter inconsistency
13620 # T66017 -- ugly wikitext with fostered content generates two template ranges that
13621 # have a true overlap (T1-start - T2-start - T1-end - T2-end).
13623 Templates: Ugly templates: 5. Template encapsulation test: Non-trivial overlap of template ranges is properly handled
13629 <div about="#mwt1" typeof="mw:Transclusion" data-parsoid='{"stx":"html","autoInsertedEnd":true,"pi":[[{"k":"1"}],[{"k":"1"}],[{"k":"1"}]]}' data-mw='{"parts":[{"template":{"target":{"wt":"echo","href":"./Template:Echo"},"params":{"1":{"wt":"<table>"}},"i":0}},"\n",{"template":{"target":{"wt":"echo","href":"./Template:Echo"},"params":{"1":{"wt":"<div>foo"}},"i":1}},"\n",{"template":{"target":{"wt":"echo","href":"./Template:Echo"},"params":{"1":{"wt":"</table>"}},"i":2}}]}'>foo</div><span about="#mwt1">
13630 </span><table about="#mwt1">
13634 # T66017 -- ugly wikitext with fostered content generates two template ranges
13635 # that are "identical" and generate nesting cycles in the algorithm
13637 Templates: Ugly templates: 6. Template encapsulation test: Cyclical nesting of template ranges is properly handled
13639 {{echo|<table><tr><td><table>}}
13643 <table about="#mwt1" typeof="mw:Transclusion" data-mw='{"parts":[{"template":{"target":{"wt":"echo","href":"./Template:Echo"},"params":{"1":{"wt":"<table><tr><td><table>"}},"i":0}},"\n",{"template":{"target":{"wt":"echo","href":"./Template:Echo"},"params":{"1":{"wt":"<div>"}},"i":1}},"\n",{"template":{"target":{"wt":"echo","href":"./Template:Echo"},"params":{"1":{"wt":"</div>"}},"i":2}}]}' data-parsoid='{"stx":"html","autoInsertedEnd":true,"pi":[[{"k":"1"}],[{"k":"1"}],[{"k":"1"}]]}'><tbody><tr data-parsoid='{"stx":"html"}'><td data-parsoid='{"stx":"html"}'><div data-parsoid='{"stx":"html"}'>
13644 </div><table about="#mwt1" data-parsoid='{"stx":"html"}'>
13645 </table></td></tr></tbody></table>
13649 Templates: Parameters substituted at the top-level
13651 {{{foo|''who'' {{echo|me}}? '''never!'''}}}
13655 <p><i>who</i> me? <b>never!</b>
13659 <p about="#mwt2" typeof="mw:Param" data-mw='{"parts":[{"templatearg":{"target":{"wt":"foo"},"params":{"1":{"wt":"''who'' {{echo|me}}? '''never!'''"}},"i":0}}]}'><i>who</i> me? <b>never!</b></p>
13661 <p about="#mwt3" typeof="mw:Param" data-mw='{"parts":[{"templatearg":{"target":{"wt":"foo"},"params":{"1":{"wt":"bar"},"2":{"wt":"baz"}},"i":0}}]}'>bar</p>
13665 Templates: Param with empty arg in the final position
13669 <span about="#mwt1" typeof="mw:Param" data-mw='{"parts":[{"templatearg":{"target":{"wt":"hi"},"params":{"1":{"wt":""}},"i":0}}]}'></span>
13673 Parser Functions: 1. Simple example
13682 Parser Functions: 2. Nested use (only outermost should be marked up)
13690 ## Note that the templates inside the references are not wrapped
13692 Template nested in extension tag in template
13696 {{echo|hi<ref>[[ho|{{echo|hi}}]]</ref>}}
13697 {{echo|hi<ref>[http://test.com?q={{echo|ho}}]</ref>}}
13698 {{echo|hi<ref>-{ho|{{echo|hi}}}-</ref>}}
13701 <p><span about="#mwt2" typeof="mw:Transclusion" data-mw='{"parts":[{"template":{"target":{"wt":"echo","href":"./Template:Echo"},"params":{"1":{"wt":"hi<ref>[[ho|{{echo|hi}}]]</ref>"}},"i":0}}]}'>hi</span><sup about="#mwt2" class="mw-ref" id="cite_ref-1" rel="dc:references" typeof="mw:Extension/ref" data-mw='{"name":"ref","attrs":{},"body":{"id":"mw-reference-text-cite_note-1"}}'><a href="./Wikipedia:首页#cite_note-1" style="counter-reset: mw-Ref 1;"><span class="mw-reflink-text">[1]</span></a></sup>
13702 <span about="#mwt8" typeof="mw:Transclusion" data-mw='{"parts":[{"template":{"target":{"wt":"echo","href":"./Template:Echo"},"params":{"1":{"wt":"hi<ref>[http://test.com?q={{echo|ho}}]</ref>"}},"i":0}}]}'>hi</span><sup about="#mwt8" class="mw-ref" id="cite_ref-2" rel="dc:references" typeof="mw:Extension/ref" data-mw='{"name":"ref","attrs":{},"body":{"id":"mw-reference-text-cite_note-2"}}'><a href="./Wikipedia:首页#cite_note-2" style="counter-reset: mw-Ref 2;"><span class="mw-reflink-text">[2]</span></a></sup>
13703 <span about="#mwt13" typeof="mw:Transclusion" data-mw='{"parts":[{"template":{"target":{"wt":"echo","href":"./Template:Echo"},"params":{"1":{"wt":"hi<ref>-{ho|{{echo|hi}}}-</ref>"}},"i":0}}]}'>hi</span><sup about="#mwt13" class="mw-ref" id="cite_ref-3" rel="dc:references" typeof="mw:Extension/ref" data-mw='{"name":"ref","attrs":{},"body":{"id":"mw-reference-text-cite_note-3"}}'><a href="./Wikipedia:首页#cite_note-3" style="counter-reset: mw-Ref 3;"><span class="mw-reflink-text">[3]</span></a></sup></p>
13704 <ol class="mw-references references" typeof="mw:Extension/references" about="#mwt17" data-mw='{"name":"references","attrs":{}}'><li about="#cite_note-1" id="cite_note-1"><a href="./Wikipedia:首页#cite_ref-1" rel="mw:referencedBy"><span class="mw-linkback-text">↑ </span></a> <span id="mw-reference-text-cite_note-1" class="mw-reference-text"><a rel="mw:WikiLink" href="./Ho" title="Ho">hi</a></span></li><li about="#cite_note-2" id="cite_note-2"><a href="./Wikipedia:首页#cite_ref-2" rel="mw:referencedBy"><span class="mw-linkback-text">↑ </span></a> <span id="mw-reference-text-cite_note-2" class="mw-reference-text"><a rel="mw:ExtLink" class="external autonumber" href="http://test.com?q=ho"></a></span></li><li about="#cite_note-3" id="cite_note-3"><a href="./Wikipedia:首页#cite_ref-3" rel="mw:referencedBy"><span class="mw-linkback-text">↑ </span></a> <span id="mw-reference-text-cite_note-3" class="mw-reference-text"><span typeof="mw:LanguageVariant" data-mw-variant='{"filter":{"l":["ho"],"t":"hi"}}'></span></span></li></ol>
13708 ### Pre-save transform tests
13712 pre-save transform: subst:
13718 This is a test template
13722 pre-save transform: normal template
13732 pre-save transform: nonexistent template
13736 {{thistemplatedoesnotexist}}
13738 {{thistemplatedoesnotexist}}
13742 pre-save transform: subst magic variables
13751 # This is T2089, which I fixed. -- wtm
13753 pre-save transform: subst: templates with parameters
13757 {{subst:paramtest|param="something else"}}
13759 This is a test template with parameter "something else"
13763 Template:nowikitest
13765 <nowiki>'''not wiki'''</nowiki>
13769 pre-save transform: nowiki in subst (T3188)
13773 {{subst:nowikitest}}
13775 <nowiki>'''not wiki'''</nowiki>
13779 Template:commenttest
13781 This template has <!-- a comment --> in it.
13785 pre-save transform: comment in subst (T3936)
13789 {{subst:commenttest}}
13791 This template has <!-- a comment --> in it.
13795 pre-save transform: unclosed tag
13799 <nowiki>'''not wiki'''
13801 <nowiki>'''not wiki'''
13805 pre-save transform: mixed tag case
13809 <NOwiki>'''not wiki'''</noWIKI>
13811 <NOwiki>'''not wiki'''</noWIKI>
13815 pre-save transform: unclosed comment in <nowiki>
13819 wiki<nowiki>nowiki<!--nowiki</nowiki>wiki
13821 wiki<nowiki>nowiki<!--nowiki</nowiki>wiki
13824 # Leading @ in this template definition works around a limitation
13825 # in parsoid's parserTests which otherwise strips the <span> from the
13826 # result (confusing it for a template wrapper)
13830 @<span onmouseover="alert('crap')">Oh no</span>
13834 (confirming safety of fix for subst T3936)
13836 {{Template:dangerous}}
13838 <p>@<span>Oh no</span>
13843 pre-save transform: comment containing gallery (T7024)
13847 <!-- <gallery>data</gallery> -->
13849 <!-- <gallery>data</gallery> -->
13853 pre-save transform: comment containing extension
13857 <!-- <tag>data</tag> -->
13859 <!-- <tag>data</tag> -->
13863 pre-save transform: comment containing nowiki
13867 <!-- <nowiki>data</nowiki> -->
13869 <!-- <nowiki>data</nowiki> -->
13873 pre-save transform: <noinclude> in subst (T5298)
13883 pre-save transform: <onlyinclude> in subst (T5298)
13887 {{subst:Includes2}}
13895 {{<includeonly>subst:</includeonly>Includes}}
13899 Template:SafeSubstTest
13901 {{<includeonly>safesubst:</includeonly>Includes}}
13905 T24297: safesubst: works during PST
13909 {{subst:SafeSubstTest}}{{safesubst:SubstTest}}
13915 T24297: safesubst: works during normal parse
13924 subst: does not work during normal parse
13928 <p>{{subst:Includes}}
13933 pre-save transform: context links ("pipe trick")
13937 [[Article (context)|]]
13940 [[Bar:Article (context)|]]
13941 [[:Bar:Article (context)|]]
13943 [[|Article (context)]]
13947 [[Article (context)|Article]]
13948 [[Bar:Article|Article]]
13949 [[:Bar:Article|Article]]
13950 [[Bar:Article (context)|Article]]
13951 [[:Bar:Article (context)|Article]]
13953 [[Article (context)]]
13954 [[Bar:X (Y) Z|X (Y) Z]]
13955 [[:Bar:X (Y) Z|X (Y) Z]]
13959 pre-save transform: context links ("pipe trick") with interwiki prefix
13963 [[interwiki:Article|]]
13964 [[:interwiki:Article|]]
13965 [[interwiki:Bar:Article|]]
13966 [[:interwiki:Bar:Article|]]
13968 [[interwiki:Article|Article]]
13969 [[:interwiki:Article|Article]]
13970 [[interwiki:Bar:Article|Bar:Article]]
13971 [[:interwiki:Bar:Article|Bar:Article]]
13975 pre-save transform: context links ("pipe trick") with parens in title
13977 pst title=[[Somearticle (context)]]
13981 [[Article (context)|Article]]
13985 pre-save transform: context links ("pipe trick") with comma in title
13987 pst title=[[Someplace, Somewhere]]
13990 [[Otherplace, Elsewhere|]]
13991 [[Otherplace, Elsewhere, Anywhere|]]
13993 [[Otherplace, Somewhere|Otherplace]]
13994 [[Otherplace, Elsewhere|Otherplace]]
13995 [[Otherplace, Elsewhere, Anywhere|Otherplace]]
13999 pre-save transform: context links ("pipe trick") with parens and comma
14001 pst title=[[Someplace (IGNORED), Somewhere]]
14004 [[Otherplace (place), Elsewhere|]]
14006 [[Otherplace, Somewhere|Otherplace]]
14007 [[Otherplace (place), Elsewhere|Otherplace]]
14011 pre-save transform: context links ("pipe trick") with comma and parens
14013 pst title=[[Who, me? (context)]]
14016 [[Me, Myself, and I (1937 song)|]]
14018 [[Yes, you. (context)|Yes, you.]]
14019 [[Me, Myself, and I (1937 song)|Me, Myself, and I]]
14023 pre-save transform: context links ("pipe trick") with namespace
14025 pst title=[[Ns:Somearticle]]
14029 [[Ns:Article|Article]]
14033 pre-save transform: context links ("pipe trick") with namespace and parens
14035 pst title=[[Ns:Somearticle (context)]]
14039 [[Ns:Article (context)|Article]]
14043 pre-save transform: context links ("pipe trick") with namespace and comma
14045 pst title=[[Ns:Somearticle, Context, Whatever]]
14049 [[Ns:Article, Context, Whatever|Article]]
14053 pre-save transform: context links ("pipe trick") with namespace, comma and parens
14055 pst title=[[Ns:Somearticle, Context (context)]]
14059 [[Ns:Article (context)|Article]]
14063 pre-save transform: context links ("pipe trick") with namespace, parens and comma
14065 pst title=[[Ns:Somearticle (IGNORED), Context]]
14069 [[Ns:Article, Context|Article]]
14073 pre-save transform: context links ("pipe trick") with full-width parens and no space (Japanese and Chinese style, T32149)
14077 [[Article(context)|]]
14078 [[Bar:Article(context)|]]
14079 [[:Bar:Article(context)|]]
14080 [[|Article(context)]]
14084 [[Article(context)|Article]]
14085 [[Bar:Article(context)|Article]]
14086 [[:Bar:Article(context)|Article]]
14087 [[Article(context)]]
14088 [[Bar:X(Y)Z|X(Y)Z]]
14089 [[:Bar:X(Y)Z|X(Y)Z]]
14093 pre-save transform: context links ("pipe trick") with full-width parens and space (Japanese and Chinese style, T32149)
14097 [[Article (context)|]]
14098 [[Bar:Article (context)|]]
14099 [[:Bar:Article (context)|]]
14100 [[|Article (context)]]
14104 [[Article (context)|Article]]
14105 [[Bar:Article (context)|Article]]
14106 [[:Bar:Article (context)|Article]]
14107 [[Article (context)]]
14108 [[Bar:X (Y) Z|X (Y) Z]]
14109 [[:Bar:X (Y) Z|X (Y) Z]]
14113 pre-save transform: context links ("pipe trick") with parens and no space (Korean style, T32149)
14117 [[Article(context)|]]
14118 [[Bar:Article(context)|]]
14119 [[:Bar:Article(context)|]]
14120 [[|Article(context)]]
14124 [[Article(context)|Article]]
14125 [[Bar:Article(context)|Article]]
14126 [[:Bar:Article(context)|Article]]
14127 [[Article(context)]]
14128 [[Bar:X(Y)Z|X(Y)Z]]
14129 [[:Bar:X(Y)Z|X(Y)Z]]
14133 pre-save transform: context links ("pipe trick") with commas (T23660)
14137 [[Article (context), context|]]
14138 [[Article (context),context|]]
14139 [[Bar:Article (context), context|]]
14140 [[Bar:Article (context),context|]]
14141 [[:Bar:Article (context), context|]]
14142 [[:Bar:Article (context),context|]]
14144 [[Article (context), context|Article]]
14145 [[Article (context),context|Article]]
14146 [[Bar:Article (context), context|Article]]
14147 [[Bar:Article (context),context|Article]]
14148 [[:Bar:Article (context), context|Article]]
14149 [[:Bar:Article (context),context|Article]]
14153 Parsoid: backwards pipe trick
14160 <p>[[|<b>bar</b>]]</p>
14164 pre-save transform: trim trailing empty lines
14168 Empty lines are trimmed
14174 Empty lines are trimmed
14178 pre-save transform: Signature expansion
14185 * <noinclude>~~~</noinclude>
14186 * <includeonly>~~~</includeonly>
14187 * <onlyinclude>~~~</onlyinclude>
14189 * [[Special:Contributions/127.0.0.1|127.0.0.1]]
14190 * [[Special:Contributions/127.0.0.1|127.0.0.1]] 00:02, 1 January 1970 (UTC)
14191 * 00:02, 1 January 1970 (UTC)
14192 * <noinclude>[[Special:Contributions/127.0.0.1|127.0.0.1]]</noinclude>
14193 * <includeonly>[[Special:Contributions/127.0.0.1|127.0.0.1]]</includeonly>
14194 * <onlyinclude>[[Special:Contributions/127.0.0.1|127.0.0.1]]</onlyinclude>
14199 ParserOutput flags from signature expansion (T84843)
14206 [[Special:Contributions/127.0.0.1|127.0.0.1]] 00:02, 1 January 1970 (UTC)
14207 flags=user-signature
14212 pre-save transform: Signature expansion in nowiki tags (T2093)
14218 <nowiki>~~~~</nowiki>
14220 <includeonly><nowiki>~~~~</nowiki></includeonly>
14222 <noinclude><nowiki>~~~~</nowiki></noinclude>
14224 <onlyinclude><nowiki>~~~~</nowiki></onlyinclude>
14226 {{subst:Foo}} shall be converted to FOO
14228 As well as inside noinclude/onlyinclude
14229 <noinclude>{{subst:Foo}}</noinclude>
14230 <onlyinclude>{{subst:Foo}}</onlyinclude>
14232 But not inside includeonly
14233 <includeonly>{{subst:Foo}}</includeonly>
14237 <nowiki>~~~~</nowiki>
14239 <includeonly><nowiki>~~~~</nowiki></includeonly>
14241 <noinclude><nowiki>~~~~</nowiki></noinclude>
14243 <onlyinclude><nowiki>~~~~</nowiki></onlyinclude>
14245 FOO shall be converted to FOO
14247 As well as inside noinclude/onlyinclude
14248 <noinclude>FOO</noinclude>
14249 <onlyinclude>FOO</onlyinclude>
14251 But not inside includeonly
14252 <includeonly>{{subst:Foo}}</includeonly>
14256 Parsoid: Recognize nowiki with trailing space in tags
14260 <nowiki ><div>[[foo]]</nowiki >
14268 <p><div>[[foo]]
14269 </p><p>a<nowiki / >b
14271 </p><p>e<nowiki/ >f
14274 <p><span typeof="mw:Nowiki"><div>[[foo]]</span></p>
14276 <p>a<nowiki / >b</p>
14278 <p>c<span typeof="mw:Nowiki"></span>d</p>
14280 <p>e<nowiki/ >f</p>
14284 Parsoid: Recognize nowiki with odd capitalization
14288 <noWikI ><div>[[foo]]</Nowiki >
14290 <p><span typeof="mw:Nowiki"><div>[[foo]]</span></p>
14295 Parsoid: Escape nowiki with trailing space in tags
14299 <p><nowiki > foo </nowiki ></p>
14300 <p>a<nowiki />b</p>
14301 <p>c<nowiki/ >d</p>
14303 <nowiki > foo </nowiki >
14311 Parsoid: Escape weird noWikI capitalizations
14315 <p><noWikI > foo </NoWikI ></p>
14317 <noWikI > foo </NoWikI >
14321 ### Message transform tests
14324 message transform: magic variables
14334 message transform: should not transform wiki markup
14344 message transform: <noinclude> in transcluded template (T6926)
14354 message transform: <onlyinclude> in transcluded template (T6926)
14364 {{#special:}} page name, known
14368 {{#special:Recentchanges}}
14370 Special:RecentChanges
14374 {{#special:}} page name with subpage, known
14378 {{#special:Recentchanges/param}}
14380 Special:RecentChanges/param
14384 {{#special:}} page name, unknown
14388 {{#special:foobar nonexistent}}
14390 Special:Foobar nonexistent
14394 {{#speciale:}} page name, known
14398 {{#speciale:Recentchanges}}
14400 Special:RecentChanges
14404 {{#speciale:}} page name with subpage, known
14408 {{#speciale:Recentchanges/param}}
14410 Special:RecentChanges/param
14414 {{#speciale:}} page name, unknown
14418 {{#speciale:foobar nonexistent}}
14420 Special:Foobar_nonexistent
14426 ### For Parsoid-specific tests, see
14427 #### https://www.mediawiki.org/wiki/Parsoid/MediaWiki_DOM_spec#Images
14432 parsoid=wt2html,wt2wt,html2html
14434 [[Image:foobar.jpg]]
14436 <p><a href="/wiki/File:Foobar.jpg" class="image"><img alt="Foobar.jpg" src="http://example.com/images/3/3a/Foobar.jpg" width="1941" height="220" /></a>
14439 <p><figure-inline class="mw-default-size" typeof="mw:Image"><a href="./File:Foobar.jpg"><img resource="./File:Foobar.jpg" src="//example.com/images/3/3a/Foobar.jpg" data-file-width="1941" data-file-height="220" data-file-type="bitmap" height="220" width="1941"/></a></figure-inline></p>
14443 Serialize simple image with span wrapper
14447 <p><span class="mw-default-size" typeof="mw:Image"><a href="./File:Foobar.jpg"><img resource="./File:Foobar.jpg" src="//example.com/images/3/3a/Foobar.jpg" data-file-width="1941" data-file-height="220" data-file-type="bitmap" height="220" width="1941"/></a></span></p>
14449 [[File:Foobar.jpg]]
14453 Simple image (using File: namespace, now canonical)
14455 [[File:Foobar.jpg]]
14457 <p><a href="/wiki/File:Foobar.jpg" class="image"><img alt="Foobar.jpg" src="http://example.com/images/3/3a/Foobar.jpg" width="1941" height="220" /></a>
14460 <p><figure-inline class="mw-default-size" typeof="mw:Image"><a href="./File:Foobar.jpg"><img resource="./File:Foobar.jpg" src="//example.com/images/3/3a/Foobar.jpg" data-file-width="1941" data-file-height="220" data-file-type="bitmap" height="220" width="1941"/></a></figure-inline></p>
14464 Right-aligned image
14466 [[File:Foobar.jpg|right]]
14468 <div class="floatright"><a href="/wiki/File:Foobar.jpg" class="image"><img alt="Foobar.jpg" src="http://example.com/images/3/3a/Foobar.jpg" width="1941" height="220" /></a></div>
14471 <figure class="mw-default-size mw-halign-right" typeof="mw:Image"><a href="./File:Foobar.jpg"><img resource="./File:Foobar.jpg" src="//example.com/images/3/3a/Foobar.jpg" data-file-width="1941" data-file-height="220" data-file-type="bitmap" height="220" width="1941"/></a></figure>
14477 [[File:Foobar.jpg|right|Caption text]]
14479 <div class="floatright"><a href="/wiki/File:Foobar.jpg" class="image" title="Caption text"><img alt="Caption text" src="http://example.com/images/3/3a/Foobar.jpg" width="1941" height="220" /></a></div>
14482 <figure class="mw-default-size mw-halign-right" typeof="mw:Image"><a href="./File:Foobar.jpg"><img resource="./File:Foobar.jpg" src="//example.com/images/3/3a/Foobar.jpg" data-file-width="1941" data-file-height="220" data-file-type="bitmap" height="220" width="1941"/></a><figcaption>Caption text</figcaption></figure>
14486 Image with caption, T55312 #1
14488 [[File:Foobar.jpg|right|Caption page stuff]]
14490 <div class="floatright"><a href="/wiki/File:Foobar.jpg" class="image" title="Caption page stuff"><img alt="Caption page stuff" src="http://example.com/images/3/3a/Foobar.jpg" width="1941" height="220" /></a></div>
14493 <figure class="mw-default-size mw-halign-right" typeof="mw:Image"><a href="./File:Foobar.jpg"><img resource="./File:Foobar.jpg" src="//example.com/images/3/3a/Foobar.jpg" data-file-width="1941" data-file-height="220" data-file-type="bitmap" height="220" width="1941"/></a><figcaption>Caption page stuff</figcaption></figure>
14497 Image with caption, T55312 #2
14499 [[File:Foobar.jpg|right|Caption page=]]
14501 <div class="floatright"><a href="/wiki/File:Foobar.jpg" class="image" title="Caption page="><img alt="Caption page=" src="http://example.com/images/3/3a/Foobar.jpg" width="1941" height="220" /></a></div>
14504 <figure class="mw-default-size mw-halign-right" typeof="mw:Image"><a href="./File:Foobar.jpg"><img resource="./File:Foobar.jpg" src="//example.com/images/3/3a/Foobar.jpg" data-file-width="1941" data-file-height="220" data-file-type="bitmap" height="220" width="1941"/></a><figcaption>Caption page=</figcaption></figure>
14508 Image with caption, T55312 #3
14510 [[File:Foobar.jpg|right|Caption page=stuff]]
14512 <div class="floatright"><a href="/wiki/File:Foobar.jpg" class="image" title="Caption page=stuff"><img alt="Caption page=stuff" src="http://example.com/images/3/3a/Foobar.jpg" width="1941" height="220" /></a></div>
14515 <figure class="mw-default-size mw-halign-right" typeof="mw:Image"><a href="./File:Foobar.jpg"><img resource="./File:Foobar.jpg" src="//example.com/images/3/3a/Foobar.jpg" data-file-width="1941" data-file-height="220" data-file-type="bitmap" height="220" width="1941"/></a><figcaption>Caption page=stuff</figcaption></figure>
14519 Image caption with pipe entity
14521 [[File:Foobar.jpg|thumb|one | two]]
14522 [[File:Foobar.jpg|thumb|one ''two'' | three]]
14524 <div class="thumb tright"><div class="thumbinner" style="width:182px;"><a href="/wiki/File:Foobar.jpg" class="image"><img alt="" src="http://example.com/images/thumb/3/3a/Foobar.jpg/180px-Foobar.jpg" width="180" height="20" class="thumbimage" srcset="http://example.com/images/thumb/3/3a/Foobar.jpg/270px-Foobar.jpg 1.5x, http://example.com/images/thumb/3/3a/Foobar.jpg/360px-Foobar.jpg 2x" /></a> <div class="thumbcaption"><div class="magnify"><a href="/wiki/File:Foobar.jpg" class="internal" title="Enlarge"></a></div>one | two</div></div></div>
14525 <div class="thumb tright"><div class="thumbinner" style="width:182px;"><a href="/wiki/File:Foobar.jpg" class="image"><img alt="" src="http://example.com/images/thumb/3/3a/Foobar.jpg/180px-Foobar.jpg" width="180" height="20" class="thumbimage" srcset="http://example.com/images/thumb/3/3a/Foobar.jpg/270px-Foobar.jpg 1.5x, http://example.com/images/thumb/3/3a/Foobar.jpg/360px-Foobar.jpg 2x" /></a> <div class="thumbcaption"><div class="magnify"><a href="/wiki/File:Foobar.jpg" class="internal" title="Enlarge"></a></div>one <i>two</i> | three</div></div></div>
14528 <figure class="mw-default-size" typeof="mw:Image/Thumb"><a href="./File:Foobar.jpg"><img resource="./File:Foobar.jpg" src="//example.com/images/thumb/3/3a/Foobar.jpg/220px-Foobar.jpg" data-file-width="1941" data-file-height="220" data-file-type="bitmap" height="25" width="220"/></a><figcaption>one <span typeof="mw:Entity">|</span> two</figcaption></figure>
14529 <figure class="mw-default-size" typeof="mw:Image/Thumb"><a href="./File:Foobar.jpg"><img resource="./File:Foobar.jpg" src="//example.com/images/thumb/3/3a/Foobar.jpg/220px-Foobar.jpg" data-file-width="1941" data-file-height="220" data-file-type="bitmap" height="25" width="220"/></a><figcaption>one <i>two</i> <span typeof="mw:Entity">|</span> three</figcaption></figure>
14533 Allow empty links in image captions (T62753)
14537 [[File:Foobar.jpg|thumb|Caption [[Link1]]
14542 <div class="thumb tright"><div class="thumbinner" style="width:222px;"><a href="/wiki/File:Foobar.jpg" class="image"><img alt="" src="http://example.com/images/thumb/3/3a/Foobar.jpg/220px-Foobar.jpg" width="220" height="25" class="thumbimage" srcset="http://example.com/images/thumb/3/3a/Foobar.jpg/330px-Foobar.jpg 1.5x, http://example.com/images/thumb/3/3a/Foobar.jpg/440px-Foobar.jpg 2x" /></a> <div class="thumbcaption"><div class="magnify"><a href="/wiki/File:Foobar.jpg" class="internal" title="Enlarge"></a></div>Caption <a href="/index.php?title=Link1&action=edit&redlink=1" class="new" title="Link1 (page does not exist)">Link1</a> [[]] <a href="/index.php?title=Link2&action=edit&redlink=1" class="new" title="Link2 (page does not exist)">Link2</a></div></div></div>
14545 <figure class="mw-default-size" typeof="mw:Image/Thumb" data-parsoid='{"optList":[{"ck":"thumbnail","ak":"thumb"},{"ck":"caption","ak":"Caption [[Link1]]\n[[]]\n[[Link2]]\n"}]}'><a href="./File:Foobar.jpg" data-parsoid='{"a":{"href":"./File:Foobar.jpg"}}'><img resource="./File:Foobar.jpg" src="//example.com/images/thumb/3/3a/Foobar.jpg/220px-Foobar.jpg" data-file-width="1941" data-file-height="220" data-file-type="bitmap" height="25" width="220" data-parsoid='{"a":{"resource":"./File:Foobar.jpg","height":"25","width":"220"},"sa":{"resource":"File:Foobar.jpg"}}'/></a><figcaption>Caption <a rel="mw:WikiLink" href="./Link1" title="Link1" data-parsoid='{"stx":"simple","a":{"href":"./Link1"},"sa":{"href":"Link1"}}'>Link1</a>
14547 <a rel="mw:WikiLink" href="./Link2" title="Link2" data-parsoid='{"stx":"simple","a":{"href":"./Link2"},"sa":{"href":"Link2"}}'>Link2</a>
14548 </figcaption></figure>
14552 Titles in unlinked images (T23454)
14554 [[File:Foobar.jpg|link=|stuff]]
14556 <p><img alt="stuff" src="http://example.com/images/3/3a/Foobar.jpg" title="stuff" width="1941" height="220" />
14559 <p><figure-inline class="mw-default-size" typeof="mw:Image" data-mw='{"caption":"stuff"}'><span><img resource="./File:Foobar.jpg" src="//example.com/images/3/3a/Foobar.jpg" data-file-width="1941" data-file-height="220" data-file-type="bitmap" height="220" width="1941"/></span></figure-inline></p>
14563 Link with empty target
14572 Image with link trail
14574 Linktrails should not work for images: [[File:Foobar.jpg]]s
14576 <p>Linktrails should not work for images: <a href="/wiki/File:Foobar.jpg" class="image"><img alt="Foobar.jpg" src="http://example.com/images/3/3a/Foobar.jpg" width="1941" height="220" /></a>s
14579 <p>Linktrails should not work for images: <figure-inline class="mw-default-size" typeof="mw:Image"><a href="./File:Foobar.jpg"><img resource="./File:Foobar.jpg" src="//example.com/images/3/3a/Foobar.jpg" data-file-width="1941" data-file-height="220" data-file-type="bitmap" height="220" width="1941"/></a></figure-inline>s</p>
14583 Image with empty attribute
14585 parsoid=wt2html,wt2wt,html2html
14587 [[File:Foobar.jpg|right||Caption text]]
14589 <div class="floatright"><a href="/wiki/File:Foobar.jpg" class="image" title="Caption text"><img alt="Caption text" src="http://example.com/images/3/3a/Foobar.jpg" width="1941" height="220" /></a></div>
14592 <figure class="mw-default-size mw-halign-right" typeof="mw:Image"><a href="./File:Foobar.jpg"><img resource="./File:Foobar.jpg" src="//example.com/images/3/3a/Foobar.jpg" data-file-width="1941" data-file-height="220" data-file-type="bitmap" height="220" width="1941"/></a><figcaption>Caption text</figcaption></figure>
14596 1. Block image with individual attributes from templates
14598 [[File:Foobar.jpg|thumb|{{echo|137px}}|This is a caption]]
14600 <div class="thumb tright"><div class="thumbinner" style="width:139px;"><a href="/wiki/File:Foobar.jpg" class="image"><img alt="" src="http://example.com/images/thumb/3/3a/Foobar.jpg/137px-Foobar.jpg" width="137" height="16" class="thumbimage" srcset="http://example.com/images/thumb/3/3a/Foobar.jpg/206px-Foobar.jpg 1.5x, http://example.com/images/thumb/3/3a/Foobar.jpg/274px-Foobar.jpg 2x" /></a> <div class="thumbcaption"><div class="magnify"><a href="/wiki/File:Foobar.jpg" class="internal" title="Enlarge"></a></div>This is a caption</div></div></div>
14603 <figure typeof="mw:Image/Thumb mw:ExpandedAttrs" about="#mwt2" data-parsoid='{"optList":[{"ck":"thumbnail","ak":"thumb"},{"ck":"width","ak":"{{echo|137px}}"},{"ck":"caption","ak":"This is a caption"}]}' data-mw='{"attribs":[["thumbnail",{"html":"thumb"}],["width",{"html":"<span about=\"#mwt1\" typeof=\"mw:Transclusion\" data-parsoid='{\"pi\":[[{\"k\":\"1\"}]],\"dsr\":[24,38,null,null]}' data-mw='{\"parts\":[{\"template\":{\"target\":{\"wt\":\"echo\",\"href\":\"./Template:Echo\"},\"params\":{\"1\":{\"wt\":\"137px\"}},\"i\":0}}]}'>137px</span>"}]]}'><a href="./File:Foobar.jpg" data-parsoid='{"a":{"href":"./File:Foobar.jpg"},"sa":{}}'><img resource="./File:Foobar.jpg" src="//example.com/images/thumb/3/3a/Foobar.jpg/137px-Foobar.jpg" data-file-width="1941" data-file-height="220" data-file-type="bitmap" height="16" width="137" data-parsoid='{"a":{"resource":"./File:Foobar.jpg","height":"16","width":"137"},"sa":{"resource":"File:Foobar.jpg"}}'/></a><figcaption>This is a caption</figcaption></figure>
14607 2. Block Image with individual attributes from templates
14609 [[File:Foobar.jpg|{{echo|thumb}}|{{echo|137px}}|This is a caption]]
14611 <div class="thumb tright"><div class="thumbinner" style="width:139px;"><a href="/wiki/File:Foobar.jpg" class="image"><img alt="" src="http://example.com/images/thumb/3/3a/Foobar.jpg/137px-Foobar.jpg" width="137" height="16" class="thumbimage" srcset="http://example.com/images/thumb/3/3a/Foobar.jpg/206px-Foobar.jpg 1.5x, http://example.com/images/thumb/3/3a/Foobar.jpg/274px-Foobar.jpg 2x" /></a> <div class="thumbcaption"><div class="magnify"><a href="/wiki/File:Foobar.jpg" class="internal" title="Enlarge"></a></div>This is a caption</div></div></div>
14614 <figure typeof="mw:Image/Thumb mw:ExpandedAttrs" about="#mwt3" data-parsoid='{"optList":[{"ck":"thumbnail","ak":"{{echo|thumb}}"},{"ck":"width","ak":"{{echo|137px}}"},{"ck":"caption","ak":"This is a caption"}]}' data-mw='{"attribs":[["thumbnail",{"html":"<span about=\"#mwt1\" typeof=\"mw:Transclusion\" data-parsoid='{\"pi\":[[{\"k\":\"1\"}]],\"dsr\":[18,32,null,null]}' data-mw='{\"parts\":[{\"template\":{\"target\":{\"wt\":\"echo\",\"href\":\"./Template:Echo\"},\"params\":{\"1\":{\"wt\":\"thumb\"}},\"i\":0}}]}'>thumb</span>"}],["width",{"html":"<span about=\"#mwt2\" typeof=\"mw:Transclusion\" data-parsoid='{\"pi\":[[{\"k\":\"1\"}]],\"dsr\":[33,47,null,null]}' data-mw='{\"parts\":[{\"template\":{\"target\":{\"wt\":\"echo\",\"href\":\"./Template:Echo\"},\"params\":{\"1\":{\"wt\":\"137px\"}},\"i\":0}}]}'>137px</span>"}]]}'><a href="./File:Foobar.jpg" data-parsoid='{"a":{"href":"./File:Foobar.jpg"},"sa":{}}'><img resource="./File:Foobar.jpg" src="//example.com/images/thumb/3/3a/Foobar.jpg/137px-Foobar.jpg" data-file-width="1941" data-file-height="220" data-file-type="bitmap" height="16" width="137" data-parsoid='{"a":{"resource":"./File:Foobar.jpg","height":"16","width":"137"},"sa":{"resource":"File:Foobar.jpg"}}'/></a><figcaption>This is a caption</figcaption></figure>
14618 3. Inline image with individual attributes from templates
14620 [[File:Foobar.jpg|{{echo|50px}}]]
14622 <p><a href="/wiki/File:Foobar.jpg" class="image"><img alt="Foobar.jpg" src="http://example.com/images/thumb/3/3a/Foobar.jpg/50px-Foobar.jpg" width="50" height="6" srcset="http://example.com/images/thumb/3/3a/Foobar.jpg/75px-Foobar.jpg 1.5x, http://example.com/images/thumb/3/3a/Foobar.jpg/100px-Foobar.jpg 2x" /></a>
14625 <p><figure-inline typeof="mw:Image mw:ExpandedAttrs" about="#mwt2" data-parsoid='{"optList":[{"ck":"width","ak":"{{echo|50px}}"}]}' data-mw='{"attribs":[["width",{"html":"<span about=\"#mwt1\" typeof=\"mw:Transclusion\" data-parsoid='{\"pi\":[[{\"k\":\"1\"}]],\"dsr\":[18,31,null,null]}' data-mw='{\"parts\":[{\"template\":{\"target\":{\"wt\":\"echo\",\"href\":\"./Template:Echo\"},\"params\":{\"1\":{\"wt\":\"50px\"}},\"i\":0}}]}'>50px</span>"}]]}'><a href="./File:Foobar.jpg" data-parsoid='{"a":{"href":"./File:Foobar.jpg"},"sa":{}}'><img resource="./File:Foobar.jpg" src="//example.com/images/thumb/3/3a/Foobar.jpg/50px-Foobar.jpg" data-file-width="1941" data-file-height="220" data-file-type="bitmap" height="6" width="50" data-parsoid='{"a":{"resource":"./File:Foobar.jpg","height":"6","width":"50"},"sa":{"resource":"File:Foobar.jpg"}}'/></a></figure-inline></p>
14628 ## Parsoid does not provide editing support for images where templates produce multiple image attributes.
14629 ## To signal this, we add a 'mw:Placeholder' type to such images. This could change in the future.
14631 Image with multiple attributes from the same template
14633 [[File:Foobar.jpg|{{image_attribs}}]]
14635 <div class="floatright"><a href="/wiki/File:Foobar.jpg" class="image" title="Caption text"><img alt="Caption text" src="http://example.com/images/3/3a/Foobar.jpg" width="1941" height="220" /></a></div>
14638 <figure class="mw-default-size mw-halign-right" typeof="mw:Image mw:Placeholder"><a href="./File:Foobar.jpg"><img resource="./File:Foobar.jpg" src="//example.com/images/3/3a/Foobar.jpg" data-file-width="1941" data-file-height="220" data-file-type="bitmap" height="220" width="1941"/></a><figcaption>Caption text</figcaption></figure>
14642 Image with link tails
14646 123[[File:Foobar.jpg]]456
14647 123[[File:Foobar.jpg|right]]456
14648 123[[File:Foobar.jpg|thumb]]456
14650 <p>123<a href="/wiki/File:Foobar.jpg" class="image"><img alt="Foobar.jpg" src="http://example.com/images/3/3a/Foobar.jpg" width="1941" height="220" /></a>456
14652 123<div class="floatright"><a href="/wiki/File:Foobar.jpg" class="image"><img alt="Foobar.jpg" src="http://example.com/images/3/3a/Foobar.jpg" width="1941" height="220" /></a></div>456
14653 123<div class="thumb tright"><div class="thumbinner" style="width:222px;"><a href="/wiki/File:Foobar.jpg" class="image"><img alt="Foobar.jpg" src="http://example.com/images/thumb/3/3a/Foobar.jpg/220px-Foobar.jpg" width="220" height="25" class="thumbimage" srcset="http://example.com/images/thumb/3/3a/Foobar.jpg/330px-Foobar.jpg 1.5x, http://example.com/images/thumb/3/3a/Foobar.jpg/440px-Foobar.jpg 2x" /></a> <div class="thumbcaption"><div class="magnify"><a href="/wiki/File:Foobar.jpg" class="internal" title="Enlarge"></a></div></div></div></div>456
14656 <p>123<a href="/wiki/File:Foobar.jpg" class="image"><img alt="Foobar.jpg" src="http://example.com/images/3/3a/Foobar.jpg" width="1941" height="220" /></a>456
14658 123</p><div class="floatright"><a href="/wiki/File:Foobar.jpg" class="image"><img alt="Foobar.jpg" src="http://example.com/images/3/3a/Foobar.jpg" width="1941" height="220" /></a></div><p>456
14659 123</p><div class="thumb tright"><div class="thumbinner" style="width:222px;"><a href="/wiki/File:Foobar.jpg" class="image"><img alt="Foobar.jpg" src="http://example.com/images/thumb/3/3a/Foobar.jpg/220px-Foobar.jpg" width="220" height="25" class="thumbimage" srcset="http://example.com/images/thumb/3/3a/Foobar.jpg/330px-Foobar.jpg 1.5x, http://example.com/images/thumb/3/3a/Foobar.jpg/440px-Foobar.jpg 2x" /></a> <div class="thumbcaption"><div class="magnify"><a href="/wiki/File:Foobar.jpg" class="internal" title="Enlarge"></a></div></div></div></div><p>456
14662 <p>123<figure-inline class="mw-default-size" typeof="mw:Image"><a href="./File:Foobar.jpg"><img resource="./File:Foobar.jpg" src="//example.com/images/3/3a/Foobar.jpg" data-file-width="1941" data-file-height="220" data-file-type="bitmap" height="220" width="1941"/></a></figure-inline>456</p>
14663 <p>123</p><figure class="mw-default-size mw-halign-right" typeof="mw:Image"><a href="./File:Foobar.jpg"><img resource="./File:Foobar.jpg" src="//example.com/images/3/3a/Foobar.jpg" data-file-width="1941" data-file-height="220" data-file-type="bitmap" height="220" width="1941"/></a></figure><p>456
14664 123</p><figure class="mw-default-size" typeof="mw:Image/Thumb"><a href="./File:Foobar.jpg"><img resource="./File:Foobar.jpg" src="//example.com/images/thumb/3/3a/Foobar.jpg/220px-Foobar.jpg" data-file-width="1941" data-file-height="220" data-file-type="bitmap" height="25" width="220"/></a></figure><p>456</p>
14668 Image with multiple captions -- only last one is accepted
14670 [[File:Foobar.jpg|right|Caption1 - ignored|[[Caption2]] - ignored|Caption3 - accepted]]
14672 <div class="floatright"><a href="/wiki/File:Foobar.jpg" class="image" title="Caption3 - accepted"><img alt="Caption3 - accepted" src="http://example.com/images/3/3a/Foobar.jpg" width="1941" height="220" /></a></div>
14675 <figure class="mw-default-size mw-halign-right" typeof="mw:Image"><a href="./File:Foobar.jpg"><img resource="./File:Foobar.jpg" src="//example.com/images/3/3a/Foobar.jpg" data-file-width="1941" data-file-height="220" data-file-type="bitmap" height="220" width="1941"/></a><figcaption>Caption3 - accepted</figcaption></figure>
14679 Image with multiple widths -- use last
14681 [[File:Foobar.jpg|200px|300px|caption]]
14683 <p><a href="/wiki/File:Foobar.jpg" class="image" title="caption"><img alt="caption" src="http://example.com/images/thumb/3/3a/Foobar.jpg/300px-Foobar.jpg" width="300" height="34" srcset="http://example.com/images/thumb/3/3a/Foobar.jpg/450px-Foobar.jpg 1.5x, http://example.com/images/thumb/3/3a/Foobar.jpg/600px-Foobar.jpg 2x" /></a>
14686 <p><figure-inline typeof="mw:Image" data-mw='{"caption":"caption"}'><a href="./File:Foobar.jpg"><img resource="./File:Foobar.jpg" src="//example.com/images/thumb/3/3a/Foobar.jpg/300px-Foobar.jpg" data-file-width="1941" data-file-height="220" data-file-type="bitmap" height="34" width="300"/></a></figure-inline></p>
14690 Image with multiple alignments -- use first (T50664)
14694 [[File:Foobar.jpg|thumb|left|right|center|caption]]
14696 [[File:Foobar.jpg|middle|text-top|caption]]
14698 <div class="thumb tleft"><div class="thumbinner" style="width:222px;"><a href="/wiki/File:Foobar.jpg" class="image"><img alt="" src="http://example.com/images/thumb/3/3a/Foobar.jpg/220px-Foobar.jpg" width="220" height="25" class="thumbimage" srcset="http://example.com/images/thumb/3/3a/Foobar.jpg/330px-Foobar.jpg 1.5x, http://example.com/images/thumb/3/3a/Foobar.jpg/440px-Foobar.jpg 2x" /></a> <div class="thumbcaption"><div class="magnify"><a href="/wiki/File:Foobar.jpg" class="internal" title="Enlarge"></a></div>caption</div></div></div>
14699 <p><a href="/wiki/File:Foobar.jpg" class="image" title="caption"><img alt="caption" src="http://example.com/images/3/3a/Foobar.jpg" width="1941" height="220" style="vertical-align: middle" /></a>
14702 <figure class="mw-default-size mw-halign-left" typeof="mw:Image/Thumb"><a href="./File:Foobar.jpg"><img resource="./File:Foobar.jpg" src="//example.com/images/thumb/3/3a/Foobar.jpg/220px-Foobar.jpg" data-file-width="1941" data-file-height="220" data-file-type="bitmap" height="25" width="220"/></a><figcaption>caption</figcaption></figure>
14703 <p><figure-inline class="mw-default-size mw-valign-middle" typeof="mw:Image" data-mw='{"caption":"caption"}'><a href="./File:Foobar.jpg"><img resource="./File:Foobar.jpg" src="//example.com/images/3/3a/Foobar.jpg" data-file-width="1941" data-file-height="220" data-file-type="bitmap" height="220" width="1941"/></a></figure-inline></p>
14707 Image with width attribute at different positions
14709 [[File:Foobar.jpg|200px|right|Caption]]
14710 [[File:Foobar.jpg|right|200px|Caption]]
14711 [[File:Foobar.jpg|right|Caption|200px]]
14713 <div class="floatright"><a href="/wiki/File:Foobar.jpg" class="image" title="Caption"><img alt="Caption" src="http://example.com/images/thumb/3/3a/Foobar.jpg/200px-Foobar.jpg" width="200" height="23" srcset="http://example.com/images/thumb/3/3a/Foobar.jpg/300px-Foobar.jpg 1.5x, http://example.com/images/thumb/3/3a/Foobar.jpg/400px-Foobar.jpg 2x" /></a></div>
14714 <div class="floatright"><a href="/wiki/File:Foobar.jpg" class="image" title="Caption"><img alt="Caption" src="http://example.com/images/thumb/3/3a/Foobar.jpg/200px-Foobar.jpg" width="200" height="23" srcset="http://example.com/images/thumb/3/3a/Foobar.jpg/300px-Foobar.jpg 1.5x, http://example.com/images/thumb/3/3a/Foobar.jpg/400px-Foobar.jpg 2x" /></a></div>
14715 <div class="floatright"><a href="/wiki/File:Foobar.jpg" class="image" title="Caption"><img alt="Caption" src="http://example.com/images/thumb/3/3a/Foobar.jpg/200px-Foobar.jpg" width="200" height="23" srcset="http://example.com/images/thumb/3/3a/Foobar.jpg/300px-Foobar.jpg 1.5x, http://example.com/images/thumb/3/3a/Foobar.jpg/400px-Foobar.jpg 2x" /></a></div>
14718 <figure class="mw-halign-right" typeof="mw:Image"><a href="./File:Foobar.jpg"><img resource="./File:Foobar.jpg" src="//example.com/images/thumb/3/3a/Foobar.jpg/200px-Foobar.jpg" data-file-width="1941" data-file-height="220" data-file-type="bitmap" height="23" width="200"/></a><figcaption>Caption</figcaption></figure>
14719 <figure class="mw-halign-right" typeof="mw:Image"><a href="./File:Foobar.jpg"><img resource="./File:Foobar.jpg" src="//example.com/images/thumb/3/3a/Foobar.jpg/200px-Foobar.jpg" data-file-width="1941" data-file-height="220" data-file-type="bitmap" height="23" width="200"/></a><figcaption>Caption</figcaption></figure>
14720 <figure class="mw-halign-right" typeof="mw:Image"><a href="./File:Foobar.jpg"><img resource="./File:Foobar.jpg" src="//example.com/images/thumb/3/3a/Foobar.jpg/200px-Foobar.jpg" data-file-width="1941" data-file-height="220" data-file-type="bitmap" height="23" width="200"/></a><figcaption>Caption</figcaption></figure>
14723 # a sad bit of backward-compatibility
14725 Image with size specified with pxpx (T15500, T53628)
14727 parsoid=wt2html,wt2wt,html2html
14729 [[File:Foobar.jpg|20pxpx]]
14730 [[File:Foobar.jpg|200x20pxpx]]
14732 <p><a href="/wiki/File:Foobar.jpg" class="image"><img alt="Foobar.jpg" src="http://example.com/images/thumb/3/3a/Foobar.jpg/20px-Foobar.jpg" width="20" height="2" srcset="http://example.com/images/thumb/3/3a/Foobar.jpg/30px-Foobar.jpg 1.5x, http://example.com/images/thumb/3/3a/Foobar.jpg/40px-Foobar.jpg 2x" /></a>
14733 <a href="/wiki/File:Foobar.jpg" class="image"><img alt="Foobar.jpg" src="http://example.com/images/thumb/3/3a/Foobar.jpg/177px-Foobar.jpg" width="177" height="20" srcset="http://example.com/images/thumb/3/3a/Foobar.jpg/265px-Foobar.jpg 1.5x, http://example.com/images/thumb/3/3a/Foobar.jpg/353px-Foobar.jpg 2x" /></a>
14736 <p><figure-inline typeof="mw:Image"><a href="./File:Foobar.jpg"><img resource="./File:Foobar.jpg" src="//example.com/images/thumb/3/3a/Foobar.jpg/20px-Foobar.jpg" data-file-width="1941" data-file-height="220" data-file-type="bitmap" height="2" width="20"/></a></figure-inline> <figure-inline typeof="mw:Image"><a href="./File:Foobar.jpg"><img resource="./File:Foobar.jpg" src="//example.com/images/thumb/3/3a/Foobar.jpg/177px-Foobar.jpg" data-file-width="1941" data-file-height="220" data-file-type="bitmap" height="20" width="177"/></a></figure-inline></p>
14740 Image with link parameter, wiki target
14742 [[File:Foobar.jpg|link=Main Page]]
14744 <p><a href="/wiki/Main_Page" title="Main Page"><img alt="Foobar.jpg" src="http://example.com/images/3/3a/Foobar.jpg" width="1941" height="220" /></a>
14747 <p><figure-inline class="mw-default-size" typeof="mw:Image"><a href="./Main_Page"><img resource="./File:Foobar.jpg" src="//example.com/images/3/3a/Foobar.jpg" data-file-width="1941" data-file-height="220" data-file-type="bitmap" height="220" width="1941"/></a></figure-inline></p>
14750 # parsoid T51293 (part 1)
14752 Image with link parameter, URL target
14754 [[File:Foobar.jpg|link=http://example.com/]]
14756 <p><a href="http://example.com/" rel="nofollow"><img alt="Foobar.jpg" src="http://example.com/images/3/3a/Foobar.jpg" width="1941" height="220" /></a>
14759 <p><figure-inline class="mw-default-size" typeof="mw:Image"><a href="http://example.com/"><img resource="./File:Foobar.jpg" src="//example.com/images/3/3a/Foobar.jpg" data-file-width="1941" data-file-height="220" data-file-type="bitmap" height="220" width="1941"/></a></figure-inline></p>
14762 # parsoid T51293 (part 2)
14764 Image with link parameter, protocol-less URL target
14766 [[File:Foobar.jpg|link=//example.com/]]
14768 <p><a href="//example.com/" rel="nofollow"><img alt="Foobar.jpg" src="http://example.com/images/3/3a/Foobar.jpg" width="1941" height="220" /></a>
14771 <p><figure-inline class="mw-default-size" typeof="mw:Image"><a href="//example.com/"><img resource="./File:Foobar.jpg" src="//example.com/images/3/3a/Foobar.jpg" data-file-width="1941" data-file-height="220" data-file-type="bitmap" height="220" width="1941"/></a></figure-inline></p>
14775 Escaping non-block captions (T107435)
14778 "modes": ["wt2wt"],
14780 ["[typeof~='mw:Image']", "attr", "data-mw", "{\"caption\": \"|\"}"]
14784 [[Image:Foobar.jpg|caption]]
14786 [[Image:Foobar.jpg|<nowiki>|</nowiki>]]
14789 # wgExternalLinkTarget not supported by Parsoid
14791 Image with link parameter, wgExternalLinkTarget
14793 [[Image:foobar.jpg|link=http://example.com/]]
14795 wgExternalLinkTarget='foobar'
14797 <p><a href="http://example.com/" target="foobar" rel="nofollow noreferrer noopener"><img alt="Foobar.jpg" src="http://example.com/images/3/3a/Foobar.jpg" width="1941" height="220" /></a>
14802 Image with link parameter, wgNoFollowLinks set to false
14804 [[Image:foobar.jpg|link=http://example.com/]]
14806 wgNoFollowLinks=false
14808 <p><a href="http://example.com/"><img alt="Foobar.jpg" src="http://example.com/images/3/3a/Foobar.jpg" width="1941" height="220" /></a>
14813 Image with link parameter, wgNoFollowDomainExceptions
14815 [[Image:foobar.jpg|link=http://example.com/]]
14817 wgNoFollowDomainExceptions='example.com'
14819 <p><a href="http://example.com/"><img alt="Foobar.jpg" src="http://example.com/images/3/3a/Foobar.jpg" width="1941" height="220" /></a>
14823 # wgExternalLinkTarget not supported by Parsoid
14825 Image with link parameter, wgExternalLinkTarget, unnamed parameter
14827 [[Image:foobar.jpg|link=http://example.com/|Title]]
14829 wgExternalLinkTarget='foobar'
14831 <p><a href="http://example.com/" title="Title" target="foobar" rel="nofollow noreferrer noopener"><img alt="Title" src="http://example.com/images/3/3a/Foobar.jpg" width="1941" height="220" /></a>
14836 Image with empty link parameter
14838 [[File:Foobar.jpg|link=]]
14840 <p><img alt="Foobar.jpg" src="http://example.com/images/3/3a/Foobar.jpg" width="1941" height="220" />
14843 <p><figure-inline class="mw-default-size" typeof="mw:Image"><span><img resource="./File:Foobar.jpg" src="//example.com/images/3/3a/Foobar.jpg" data-file-width="1941" data-file-height="220" data-file-type="bitmap" height="220" width="1941"/></span></figure-inline></p>
14847 Image with link parameter (wiki target) and unnamed parameter
14849 [[File:Foobar.jpg|link=Main_Page|Title]]
14851 <p><a href="/wiki/Main_Page" title="Title"><img alt="Title" src="http://example.com/images/3/3a/Foobar.jpg" width="1941" height="220" /></a>
14854 <p><figure-inline class="mw-default-size" typeof="mw:Image" data-mw='{"caption":"Title"}'><a href="./Main_Page"><img resource="./File:Foobar.jpg" src="//example.com/images/3/3a/Foobar.jpg" data-file-width="1941" data-file-height="220" data-file-type="bitmap" height="220" width="1941"/></a></figure-inline></p>
14858 Image with link parameter (URL target) and unnamed parameter
14860 [[File:Foobar.jpg|link=http://example.com/|Title]]
14862 <p><a href="http://example.com/" title="Title" rel="nofollow"><img alt="Title" src="http://example.com/images/3/3a/Foobar.jpg" width="1941" height="220" /></a>
14865 <p><figure-inline class="mw-default-size" typeof="mw:Image" data-mw='{"caption":"Title"}'><a href="http://example.com/"><img resource="./File:Foobar.jpg" src="//example.com/images/3/3a/Foobar.jpg" data-file-width="1941" data-file-height="220" data-file-type="bitmap" height="220" width="1941"/></a></figure-inline></p>
14869 Thumbnail image with link parameter
14872 parsoid=wt2html,wt2wt,html2html
14874 [[File:Foobar.jpg|thumb|link=http://example.com/|Title]]
14876 <div class="thumb tright"><div class="thumbinner" style="width:222px;"><a href="http://example.com/"><img alt="" src="http://example.com/images/thumb/3/3a/Foobar.jpg/220px-Foobar.jpg" width="220" height="25" class="thumbimage" srcset="http://example.com/images/thumb/3/3a/Foobar.jpg/330px-Foobar.jpg 1.5x, http://example.com/images/thumb/3/3a/Foobar.jpg/440px-Foobar.jpg 2x" /></a> <div class="thumbcaption"><div class="magnify"><a href="/wiki/File:Foobar.jpg" class="internal" title="Enlarge"></a></div>Title</div></div></div>
14879 <figure class="mw-default-size" typeof="mw:Image/Thumb"><a href="http://example.com/"><img resource="./File:Foobar.jpg" src="//example.com/images/thumb/3/3a/Foobar.jpg/220px-Foobar.jpg" data-file-width="1941" data-file-height="220" data-file-type="bitmap" height="25" width="220"/></a><figcaption>Title</figcaption></figure>
14883 Manually-specified thumbnail image
14887 [[File:Foobar.jpg|thumbnail=Thumb.png|Title]]
14889 <div class="thumb tright"><div class="thumbinner" style="width:137px;"><a href="/wiki/File:Foobar.jpg"><img alt="" src="http://example.com/images/e/ea/Thumb.png" width="135" height="135" class="thumbimage" /></a> <div class="thumbcaption"><div class="magnify"><a href="/wiki/File:Foobar.jpg" class="internal" title="Enlarge"></a></div>Title</div></div></div>
14892 <figure class="mw-default-size" typeof="mw:Image/Thumb" data-mw='{"thumb":"Thumb.png"}'><a href="./File:Foobar.jpg"><img resource="./File:Foobar.jpg" src="//example.com/images/e/ea/Thumb.png" data-file-width="135" data-file-height="135" data-file-type="bitmap" height="135" width="135"/></a><figcaption>Title</figcaption></figure>
14896 Manually-specified thumbnail image with explicit link to wiki page
14899 parsoid=wt2html,wt2wt,html2html
14901 [[File:Foobar.jpg|thumb=Thumb.png|link=Main_Page|Title]]
14903 <div class="thumb tright"><div class="thumbinner" style="width:137px;"><a href="/wiki/Main_Page" title="Main Page"><img alt="" src="http://example.com/images/e/ea/Thumb.png" width="135" height="135" class="thumbimage" /></a> <div class="thumbcaption"><div class="magnify"><a href="/wiki/File:Foobar.jpg" class="internal" title="Enlarge"></a></div>Title</div></div></div>
14906 <figure class="mw-default-size" typeof="mw:Image/Thumb" data-mw='{"thumb":"Thumb.png"}'><a href="./Main_Page"><img resource="./File:Foobar.jpg" src="//example.com/images/e/ea/Thumb.png" data-file-width="135" data-file-height="135" data-file-type="bitmap" height="135" width="135"/></a><figcaption>Title</figcaption></figure>
14910 Manually-specified thumbnail image with explicit link to url
14913 parsoid=wt2html,wt2wt,html2html
14915 [[File:Foobar.jpg|thumb=Thumb.png|link=http://example.com|Title]]
14917 <div class="thumb tright"><div class="thumbinner" style="width:137px;"><a href="http://example.com"><img alt="" src="http://example.com/images/e/ea/Thumb.png" width="135" height="135" class="thumbimage" /></a> <div class="thumbcaption"><div class="magnify"><a href="/wiki/File:Foobar.jpg" class="internal" title="Enlarge"></a></div>Title</div></div></div>
14920 <figure class="mw-default-size" typeof="mw:Image/Thumb" data-mw='{"thumb":"Thumb.png"}'><a href="http://example.com"><img resource="./File:Foobar.jpg" src="//example.com/images/e/ea/Thumb.png" data-file-width="135" data-file-height="135" data-file-type="bitmap" height="135" width="135"/></a><figcaption>Title</figcaption></figure>
14924 Manually-specified thumbnail image with explicit no link
14927 parsoid=wt2html,wt2wt,html2html
14929 [[File:Foobar.jpg|thumb=Thumb.png|link=|Title]]
14931 <div class="thumb tright"><div class="thumbinner" style="width:137px;"><img alt="" src="http://example.com/images/e/ea/Thumb.png" width="135" height="135" class="thumbimage" /> <div class="thumbcaption"><div class="magnify"><a href="/wiki/File:Foobar.jpg" class="internal" title="Enlarge"></a></div>Title</div></div></div>
14934 <figure class="mw-default-size" typeof="mw:Image/Thumb" data-mw='{"thumb":"Thumb.png"}'><span><img resource="./File:Foobar.jpg" src="//example.com/images/e/ea/Thumb.png" data-file-width="135" data-file-height="135" data-file-type="bitmap" height="135" width="135"/></span><figcaption>Title</figcaption></figure>
14938 Manually-specified thumbnail image with explicit link and alt text
14941 parsoid=wt2html,wt2wt,html2html
14943 [[File:Foobar.jpg|thumb=Thumb.png|link=Main_Page|alt=alttext|Title]]
14945 <div class="thumb tright"><div class="thumbinner" style="width:137px;"><a href="/wiki/Main_Page" title="Main Page"><img alt="alttext" src="http://example.com/images/e/ea/Thumb.png" width="135" height="135" class="thumbimage" /></a> <div class="thumbcaption"><div class="magnify"><a href="/wiki/File:Foobar.jpg" class="internal" title="Enlarge"></a></div>Title</div></div></div>
14948 <figure class="mw-default-size" typeof="mw:Image/Thumb" data-mw='{"thumb":"Thumb.png"}'><a href="./Main_Page"><img alt="alttext" resource="./File:Foobar.jpg" src="//example.com/images/e/ea/Thumb.png" data-file-width="135" data-file-height="135" data-file-type="bitmap" height="135" width="135"/></a><figcaption>Title</figcaption></figure>
14952 Image with frame and link
14954 parsoid=wt2html,wt2wt,html2html
14956 [[File:Foobar.jpg|frame|left|This is a test image [[Main Page]]]]
14958 <div class="thumb tleft"><div class="thumbinner" style="width:1943px;"><a href="/wiki/File:Foobar.jpg" class="image"><img alt="" src="http://example.com/images/3/3a/Foobar.jpg" width="1941" height="220" class="thumbimage" /></a> <div class="thumbcaption">This is a test image <a href="/wiki/Main_Page" title="Main Page">Main Page</a></div></div></div>
14961 <figure class="mw-default-size mw-halign-left" typeof="mw:Image/Frame"><a href="./File:Foobar.jpg"><img resource="./File:Foobar.jpg" src="//example.com/images/3/3a/Foobar.jpg" data-file-width="1941" data-file-height="220" data-file-type="bitmap" height="220" width="1941"/></a><figcaption>This is a test image <a rel="mw:WikiLink" href="./Main_Page" title="Main Page">Main Page</a></figcaption></figure>
14965 Image with frame and link and explicit alt
14967 parsoid=wt2html,wt2wt,html2html
14969 [[Image:Foobar.jpg|frame|left|This is a test image [[Main Page]]|alt=Altitude]]
14971 <div class="thumb tleft"><div class="thumbinner" style="width:1943px;"><a href="/wiki/File:Foobar.jpg" class="image"><img alt="Altitude" src="http://example.com/images/3/3a/Foobar.jpg" width="1941" height="220" class="thumbimage" /></a> <div class="thumbcaption">This is a test image <a href="/wiki/Main_Page" title="Main Page">Main Page</a></div></div></div>
14974 <figure class="mw-default-size mw-halign-left" typeof="mw:Image/Frame"><a href="./File:Foobar.jpg"><img alt="Altitude" resource="./File:Foobar.jpg" src="//example.com/images/3/3a/Foobar.jpg" data-file-width="1941" data-file-height="220" data-file-type="bitmap" height="220" width="1941"/></a><figcaption>This is a test image <a rel="mw:WikiLink" href="./Main_Page" title="Main Page">Main Page</a></figcaption></figure>
14978 Image with wiki markup in implicit alt
14980 [[Image:Foobar.jpg|testing '''bold''' in alt]]
14982 [[Image:Foobar.jpg|alt=testing '''bold''' in alt]]
14984 <p><a href="/wiki/File:Foobar.jpg" class="image" title="testing bold in alt"><img alt="testing bold in alt" src="http://example.com/images/3/3a/Foobar.jpg" width="1941" height="220" /></a>
14985 </p><p><a href="/wiki/File:Foobar.jpg" class="image"><img alt="testing bold in alt" src="http://example.com/images/3/3a/Foobar.jpg" width="1941" height="220" /></a>
14988 <p><figure-inline class="mw-default-size" typeof="mw:Image" data-parsoid='{"optList":[{"ck":"caption","ak":"testing '''bold''' in alt"}]}' data-mw='{"caption":"testing <b data-parsoid='{\"dsr\":[27,37,3,3]}'>bold</b> in alt"}'><a href="./File:Foobar.jpg" data-parsoid='{"a":{"href":"./File:Foobar.jpg"},"sa":{}}'><img resource="./File:Foobar.jpg" src="//example.com/images/3/3a/Foobar.jpg" data-file-width="1941" data-file-height="220" data-file-type="bitmap" height="220" width="1941" data-parsoid='{"a":{"resource":"./File:Foobar.jpg","height":"220","width":"1941"},"sa":{"resource":"Image:Foobar.jpg"}}'/></a></figure-inline></p>
14990 <p><figure-inline class="mw-default-size" typeof="mw:Image" data-parsoid='{"optList":[{"ck":"alt","ak":"alt=testing '''bold''' in alt"}]}'><a href="./File:Foobar.jpg" data-parsoid='{"a":{"href":"./File:Foobar.jpg"},"sa":{}}'><img alt="testing bold in alt" resource="./File:Foobar.jpg" src="//example.com/images/3/3a/Foobar.jpg" data-file-width="1941" data-file-height="220" data-file-type="bitmap" height="220" width="1941" data-parsoid='{"a":{"alt":"testing bold in alt","resource":"./File:Foobar.jpg","height":"220","width":"1941"},"sa":{"alt":"alt=testing '''bold''' in alt","resource":"Image:Foobar.jpg"}}'/></a></figure-inline></p>
14994 Alt image option should handle most kinds of wikitext without barfing
14996 [[Image:Foobar.jpg|thumb|This is the image caption|alt=This is a [[link]] and a {{echo|''bold template''}}.]]
14998 <div class="thumb tright"><div class="thumbinner" style="width:182px;"><a href="/wiki/File:Foobar.jpg" class="image"><img alt="This is a link and a bold template." src="http://example.com/images/thumb/3/3a/Foobar.jpg/180px-Foobar.jpg" width="180" height="20" class="thumbimage" srcset="http://example.com/images/thumb/3/3a/Foobar.jpg/270px-Foobar.jpg 1.5x, http://example.com/images/thumb/3/3a/Foobar.jpg/360px-Foobar.jpg 2x" /></a> <div class="thumbcaption"><div class="magnify"><a href="/wiki/File:Foobar.jpg" class="internal" title="Enlarge"></a></div>This is the image caption</div></div></div>
15001 <figure class="mw-default-size" typeof="mw:Image/Thumb mw:ExpandedAttrs" about="#mwt2" data-parsoid='{"optList":[{"ck":"thumbnail","ak":"thumb"},{"ck":"caption","ak":"This is the image caption"},{"ck":"alt","ak":"alt=This is a [[link]] and a {{echo|''bold template''}}."}]}' data-mw='{"attribs":[["thumbnail",{"html":"thumb"}],["alt",{"html":"alt=This is a <a rel=\"mw:WikiLink\" href=\"./Link\" title=\"Link\" data-parsoid='{\"stx\":\"simple\",\"a\":{\"href\":\"./Link\"},\"sa\":{\"href\":\"link\"},\"dsr\":[65,73,2,2]}'>link</a> and a <i about=\"#mwt1\" typeof=\"mw:Transclusion\" data-parsoid='{\"dsr\":[80,106,null,null],\"pi\":[[{\"k\":\"1\"}]]}' data-mw='{\"parts\":[{\"template\":{\"target\":{\"wt\":\"echo\",\"href\":\"./Template:Echo\"},\"params\":{\"1\":{\"wt\":\"&apos;&apos;bold template&apos;&apos;\"}},\"i\":0}}]}'>bold template</i>."}]]}'><a href="./File:Foobar.jpg" data-parsoid='{"a":{"href":"./File:Foobar.jpg"},"sa":{}}'><img alt="This is a link and a bold template." resource="./File:Foobar.jpg" src="//example.com/images/thumb/3/3a/Foobar.jpg/220px-Foobar.jpg" data-file-width="1941" data-file-height="220" data-file-type="bitmap" height="25" width="220" data-parsoid='{"a":{"alt":"This is a link and a bold template.","resource":"./File:Foobar.jpg","height":"25","width":"220"},"sa":{"alt":"alt=This is a [[link]] and a {{echo|''bold template''}}.","resource":"Image:Foobar.jpg"}}'/></a><figcaption>This is the image caption</figcaption></figure>
15005 Image with table with attributes in caption
15007 parsoid=wt2html,html2html
15009 [[File:Foobar.jpg|thumb|
15016 <figure class="mw-default-size" typeof="mw:Image/Thumb" data-parsoid='{"optList":[{"ck":"thumbnail","ak":"thumb"},{"ck":"caption","ak":"\n{| class=\"123\" |\n|- class=\"456\" |\n| ha\n|}\n"}]}'><a href="./File:Foobar.jpg" data-parsoid='{"a":{"href":"./File:Foobar.jpg"},"sa":{"href":"File:Foobar.jpg"}}'><img resource="./File:Foobar.jpg" src="//example.com/images/thumb/3/3a/Foobar.jpg/220px-Foobar.jpg" data-file-width="1941" data-file-height="220" data-file-type="bitmap" height="25" width="220" data-parsoid='{"a":{"resource":"./File:Foobar.jpg","height":"25","width":"220"},"sa":{"resource":"File:Foobar.jpg"}}'/></a><figcaption>
15017 <table class="123">
15018 <tbody><tr class="456" data-parsoid='{"startTagSrc":"|-"}'>
15021 </figcaption></figure>
15025 Image with table with rows from templates in caption
15027 [[File:Foobar.jpg|thumb|
15033 <figure class="mw-default-size" typeof="mw:Image/Thumb" data-parsoid='{"optList":[{"ck":"thumbnail","ak":"thumb"},{"ck":"caption","ak":"\n{|\n{{echo|{{!}} hi}}\n|}\n"}]}'><a href="./File:Foobar.jpg" data-parsoid='{"a":{"href":"./File:Foobar.jpg"},"sa":{"href":"File:Foobar.jpg"}}'><img resource="./File:Foobar.jpg" src="//example.com/images/thumb/3/3a/Foobar.jpg/220px-Foobar.jpg" data-file-width="1941" data-file-height="220" data-file-type="bitmap" height="25" width="220" data-parsoid='{"a":{"resource":"./File:Foobar.jpg","height":"25","width":"220"},"sa":{"resource":"File:Foobar.jpg"}}'/></a><figcaption>
15035 <tbody about="#mwt4" typeof="mw:Transclusion" data-mw='{"parts":[{"template":{"target":{"wt":"echo","href":"./Template:Echo"},"params":{"1":{"wt":"{{!}} hi"}},"i":0}},"\n"]}'><tr><td> hi</td></tr>
15037 </figcaption></figure>
15041 Image with nested tables in caption
15043 [[File:Foobar.jpg|thumb|Foo<br />
15052 <figure class="mw-default-size" typeof="mw:Image/Thumb" data-parsoid='{"optList":[{"ck":"thumbnail","ak":"thumb"},{"ck":"caption","ak":"Foo<br/>\n{|\n|\n{|\n|z\n|}\n|}\n"}]}'><a href="./File:Foobar.jpg"><img resource="./File:Foobar.jpg" src="//example.com/images/thumb/3/3a/Foobar.jpg/220px-Foobar.jpg" data-file-width="1941" data-file-height="220" data-file-type="bitmap" height="25" width="220" data-parsoid='{"a":{"resource":"./File:Foobar.jpg","height":"25","width":"220"},"sa":{"resource":"File:Foobar.jpg"}}'/></a><figcaption data-parsoid='{"dsr":[null,50,null,null]}'>Foo<br data-parsoid='{"stx":"html","selfClose":true}'/>
15056 <tbody><tr><td>z</td></tr>
15057 </tbody></table></td></tr>
15059 </figcaption></figure>
15063 Image with heading and horizontal rule in caption
15065 [[File:Foobar.jpg|thumb|
15071 <div class="thumb tright"><div class="thumbinner" style="width:182px;"><a href="/wiki/File:Foobar.jpg" class="image"><img alt="" src="http://example.com/images/thumb/3/3a/Foobar.jpg/180px-Foobar.jpg" width="180" height="20" class="thumbimage" srcset="http://example.com/images/thumb/3/3a/Foobar.jpg/270px-Foobar.jpg 1.5x, http://example.com/images/thumb/3/3a/Foobar.jpg/360px-Foobar.jpg 2x" /></a> <div class="thumbcaption"><div class="magnify"><a href="/wiki/File:Foobar.jpg" class="internal" title="Enlarge"></a></div><h3><span class="mw-headline" id="Testing">Testing</span><span class="mw-editsection"><span class="mw-editsection-bracket">[</span><a href="/index.php?title=Parser_test&action=edit&section=1" title="Edit section: Testing">edit</a><span class="mw-editsection-bracket">]</span></span></h3> 123 <hr /></div></div></div>
15074 <figure class="mw-default-size" typeof="mw:Image/Thumb" data-parsoid='{"optList":[{"ck":"thumbnail","ak":"thumb"},{"ck":"caption","ak":"\n=== Testing ===\n123\n--------------\n"}]}'><a href="./File:Foobar.jpg" data-parsoid='{"a":{"href":"./File:Foobar.jpg"},"sa":{"href":"File:Foobar.jpg"}}'><img resource="./File:Foobar.jpg" src="//example.com/images/thumb/3/3a/Foobar.jpg/220px-Foobar.jpg" data-file-width="1941" data-file-height="220" data-file-type="bitmap" height="25" width="220" data-parsoid='{"a":{"resource":"./File:Foobar.jpg","height":"25","width":"220"},"sa":{"resource":"File:Foobar.jpg"}}'/></a><figcaption>
15075 <h3 id="Testing">Testing</h3>
15077 <hr data-parsoid='{"extra_dashes":10}'/>
15078 </figcaption></figure>
15081 ###################
15082 # Conflicting image format options.
15083 # First option specified should 'win'.
15084 # All three cases in each test should be identical.
15087 Image with 'frameless' first.
15089 parsoid=wt2html,wt2wt,html2html
15091 [[File:Foobar.jpg|frameless|caption]]
15093 [[File:Foobar.jpg|frameless|frame|caption]]
15095 [[File:Foobar.jpg|frameless|thumb|caption]]
15097 <p><a href="/wiki/File:Foobar.jpg" class="image" title="caption"><img alt="caption" src="http://example.com/images/thumb/3/3a/Foobar.jpg/180px-Foobar.jpg" width="180" height="20" srcset="http://example.com/images/thumb/3/3a/Foobar.jpg/270px-Foobar.jpg 1.5x, http://example.com/images/thumb/3/3a/Foobar.jpg/360px-Foobar.jpg 2x" /></a>
15098 </p><p><a href="/wiki/File:Foobar.jpg" class="image" title="caption"><img alt="caption" src="http://example.com/images/thumb/3/3a/Foobar.jpg/180px-Foobar.jpg" width="180" height="20" srcset="http://example.com/images/thumb/3/3a/Foobar.jpg/270px-Foobar.jpg 1.5x, http://example.com/images/thumb/3/3a/Foobar.jpg/360px-Foobar.jpg 2x" /></a>
15099 </p><p><a href="/wiki/File:Foobar.jpg" class="image" title="caption"><img alt="caption" src="http://example.com/images/thumb/3/3a/Foobar.jpg/180px-Foobar.jpg" width="180" height="20" srcset="http://example.com/images/thumb/3/3a/Foobar.jpg/270px-Foobar.jpg 1.5x, http://example.com/images/thumb/3/3a/Foobar.jpg/360px-Foobar.jpg 2x" /></a>
15102 <p><figure-inline class="mw-default-size" typeof="mw:Image/Frameless" data-mw='{"caption":"caption"}'><a href="./File:Foobar.jpg"><img resource="./File:Foobar.jpg" src="//example.com/images/thumb/3/3a/Foobar.jpg/220px-Foobar.jpg" data-file-width="1941" data-file-height="220" data-file-type="bitmap" height="25" width="220"/></a></figure-inline></p>
15103 <p><figure-inline class="mw-default-size" typeof="mw:Image/Frameless" data-mw='{"caption":"caption"}'><a href="./File:Foobar.jpg"><img resource="./File:Foobar.jpg" src="//example.com/images/thumb/3/3a/Foobar.jpg/220px-Foobar.jpg" data-file-width="1941" data-file-height="220" data-file-type="bitmap" height="25" width="220"/></a></figure-inline></p>
15104 <p><figure-inline class="mw-default-size" typeof="mw:Image/Frameless" data-mw='{"caption":"caption"}'><a href="./File:Foobar.jpg"><img resource="./File:Foobar.jpg" src="//example.com/images/thumb/3/3a/Foobar.jpg/220px-Foobar.jpg" data-file-width="1941" data-file-height="220" data-file-type="bitmap" height="25" width="220"/></a></figure-inline></p>
15108 Image with 'frame' first.
15110 parsoid=wt2html,wt2wt,html2html
15112 [[File:Foobar.jpg|frame|caption]]
15113 [[File:Foobar.jpg|frame|frameless|caption]]
15114 [[File:Foobar.jpg|frame|thumb|caption]]
15116 <div class="thumb tright"><div class="thumbinner" style="width:1943px;"><a href="/wiki/File:Foobar.jpg" class="image"><img alt="" src="http://example.com/images/3/3a/Foobar.jpg" width="1941" height="220" class="thumbimage" /></a> <div class="thumbcaption">caption</div></div></div>
15117 <div class="thumb tright"><div class="thumbinner" style="width:1943px;"><a href="/wiki/File:Foobar.jpg" class="image"><img alt="" src="http://example.com/images/3/3a/Foobar.jpg" width="1941" height="220" class="thumbimage" /></a> <div class="thumbcaption">caption</div></div></div>
15118 <div class="thumb tright"><div class="thumbinner" style="width:1943px;"><a href="/wiki/File:Foobar.jpg" class="image"><img alt="" src="http://example.com/images/3/3a/Foobar.jpg" width="1941" height="220" class="thumbimage" /></a> <div class="thumbcaption">caption</div></div></div>
15121 <figure class="mw-default-size" typeof="mw:Image/Frame"><a href="./File:Foobar.jpg"><img resource="./File:Foobar.jpg" src="//example.com/images/3/3a/Foobar.jpg" data-file-width="1941" data-file-height="220" data-file-type="bitmap" height="220" width="1941"/></a><figcaption>caption</figcaption></figure>
15122 <figure class="mw-default-size" typeof="mw:Image/Frame"><a href="./File:Foobar.jpg"><img resource="./File:Foobar.jpg" src="//example.com/images/3/3a/Foobar.jpg" data-file-width="1941" data-file-height="220" data-file-type="bitmap" height="220" width="1941"/></a><figcaption>caption</figcaption></figure>
15123 <figure class="mw-default-size" typeof="mw:Image/Frame"><a href="./File:Foobar.jpg"><img resource="./File:Foobar.jpg" src="//example.com/images/3/3a/Foobar.jpg" data-file-width="1941" data-file-height="220" data-file-type="bitmap" height="220" width="1941"/></a><figcaption>caption</figcaption></figure>
15127 Image with 'thumb' first.
15129 parsoid=wt2html,wt2wt,html2html
15131 [[File:Foobar.jpg|thumb|caption]]
15132 [[File:Foobar.jpg|thumb|frameless|caption]]
15133 [[File:Foobar.jpg|thumb|frame|caption]]
15135 <div class="thumb tright"><div class="thumbinner" style="width:182px;"><a href="/wiki/File:Foobar.jpg" class="image"><img alt="" src="http://example.com/images/thumb/3/3a/Foobar.jpg/180px-Foobar.jpg" width="180" height="20" class="thumbimage" srcset="http://example.com/images/thumb/3/3a/Foobar.jpg/270px-Foobar.jpg 1.5x, http://example.com/images/thumb/3/3a/Foobar.jpg/360px-Foobar.jpg 2x" /></a> <div class="thumbcaption"><div class="magnify"><a href="/wiki/File:Foobar.jpg" class="internal" title="Enlarge"></a></div>caption</div></div></div>
15136 <div class="thumb tright"><div class="thumbinner" style="width:182px;"><a href="/wiki/File:Foobar.jpg" class="image"><img alt="" src="http://example.com/images/thumb/3/3a/Foobar.jpg/180px-Foobar.jpg" width="180" height="20" class="thumbimage" srcset="http://example.com/images/thumb/3/3a/Foobar.jpg/270px-Foobar.jpg 1.5x, http://example.com/images/thumb/3/3a/Foobar.jpg/360px-Foobar.jpg 2x" /></a> <div class="thumbcaption"><div class="magnify"><a href="/wiki/File:Foobar.jpg" class="internal" title="Enlarge"></a></div>caption</div></div></div>
15137 <div class="thumb tright"><div class="thumbinner" style="width:182px;"><a href="/wiki/File:Foobar.jpg" class="image"><img alt="" src="http://example.com/images/thumb/3/3a/Foobar.jpg/180px-Foobar.jpg" width="180" height="20" class="thumbimage" srcset="http://example.com/images/thumb/3/3a/Foobar.jpg/270px-Foobar.jpg 1.5x, http://example.com/images/thumb/3/3a/Foobar.jpg/360px-Foobar.jpg 2x" /></a> <div class="thumbcaption"><div class="magnify"><a href="/wiki/File:Foobar.jpg" class="internal" title="Enlarge"></a></div>caption</div></div></div>
15140 <figure class="mw-default-size" typeof="mw:Image/Thumb"><a href="./File:Foobar.jpg"><img resource="./File:Foobar.jpg" src="//example.com/images/thumb/3/3a/Foobar.jpg/220px-Foobar.jpg" data-file-width="1941" data-file-height="220" data-file-type="bitmap" height="25" width="220"/></a><figcaption>caption</figcaption></figure>
15141 <figure class="mw-default-size" typeof="mw:Image/Thumb"><a href="./File:Foobar.jpg"><img resource="./File:Foobar.jpg" src="//example.com/images/thumb/3/3a/Foobar.jpg/220px-Foobar.jpg" data-file-width="1941" data-file-height="220" data-file-type="bitmap" height="25" width="220"/></a><figcaption>caption</figcaption></figure>
15142 <figure class="mw-default-size" typeof="mw:Image/Thumb"><a href="./File:Foobar.jpg"><img resource="./File:Foobar.jpg" src="//example.com/images/thumb/3/3a/Foobar.jpg/220px-Foobar.jpg" data-file-width="1941" data-file-height="220" data-file-type="bitmap" height="25" width="220"/></a><figcaption>caption</figcaption></figure>
15145 ###################
15147 # See https://www.mediawiki.org/wiki/Help:Images#Size_and_frame
15148 # and https://phabricator.wikimedia.org/T64258
15149 # Foobar has actual size of 1941x220
15150 # 1. Thumbs & frameless always reduce, can't be enlarged unless it's
15151 # a scalable format.
15152 # 2. Framed images always ignore size options; always render at default size.
15153 # 3. "Unspecified format" and border are the only types which can be
15157 Image: unspecified format and border enlarge
15159 parsoid=wt2html,wt2wt,html2html
15161 [[File:Foobar.jpg|2000px]]
15163 [[File:Foobar.jpg|border|2000px]]
15165 <p><a href="/wiki/File:Foobar.jpg" class="image"><img alt="Foobar.jpg" src="http://example.com/images/3/3a/Foobar.jpg" width="2000" height="227" /></a>
15166 </p><p><a href="/wiki/File:Foobar.jpg" class="image"><img alt="Foobar.jpg" src="http://example.com/images/3/3a/Foobar.jpg" width="2000" height="227" class="thumbborder" /></a>
15169 <p><figure-inline typeof="mw:Image"><a href="./File:Foobar.jpg"><img resource="./File:Foobar.jpg" src="//example.com/images/3/3a/Foobar.jpg" data-file-width="1941" data-file-height="220" data-file-type="bitmap" height="227" width="2000"/></a></figure-inline></p>
15170 <p><figure-inline class="mw-image-border" typeof="mw:Image"><a href="./File:Foobar.jpg"><img resource="./File:Foobar.jpg" src="//example.com/images/3/3a/Foobar.jpg" data-file-width="1941" data-file-height="220" data-file-type="bitmap" height="227" width="2000"/></a></figure-inline></p>
15174 Image: "unspecified format" and border reduce
15176 parsoid=wt2html,wt2wt,html2html
15178 [[File:Foobar.jpg|1000px]]
15180 [[File:Foobar.jpg|border|1000px]]
15182 <p><a href="/wiki/File:Foobar.jpg" class="image"><img alt="Foobar.jpg" src="http://example.com/images/thumb/3/3a/Foobar.jpg/1000px-Foobar.jpg" width="1000" height="113" srcset="http://example.com/images/thumb/3/3a/Foobar.jpg/1500px-Foobar.jpg 1.5x, http://example.com/images/3/3a/Foobar.jpg 2x" /></a>
15183 </p><p><a href="/wiki/File:Foobar.jpg" class="image"><img alt="Foobar.jpg" src="http://example.com/images/thumb/3/3a/Foobar.jpg/1000px-Foobar.jpg" width="1000" height="113" class="thumbborder" srcset="http://example.com/images/thumb/3/3a/Foobar.jpg/1500px-Foobar.jpg 1.5x, http://example.com/images/3/3a/Foobar.jpg 2x" /></a>
15186 <p><figure-inline typeof="mw:Image"><a href="./File:Foobar.jpg"><img resource="./File:Foobar.jpg" src="//example.com/images/thumb/3/3a/Foobar.jpg/1000px-Foobar.jpg" data-file-width="1941" data-file-height="220" data-file-type="bitmap" height="113" width="1000"/></a></figure-inline></p>
15187 <p><figure-inline class="mw-image-border" typeof="mw:Image"><a href="./File:Foobar.jpg"><img resource="./File:Foobar.jpg" src="//example.com/images/thumb/3/3a/Foobar.jpg/1000px-Foobar.jpg" data-file-width="1941" data-file-height="220" data-file-type="bitmap" height="113" width="1000"/></a></figure-inline></p>
15191 Image: thumbs reduce
15193 parsoid=wt2html,wt2wt,html2html
15195 [[File:Foobar.jpg|thumb|50px]]
15197 <div class="thumb tright"><div class="thumbinner" style="width:52px;"><a href="/wiki/File:Foobar.jpg" class="image"><img alt="Foobar.jpg" src="http://example.com/images/thumb/3/3a/Foobar.jpg/50px-Foobar.jpg" width="50" height="6" class="thumbimage" srcset="http://example.com/images/thumb/3/3a/Foobar.jpg/75px-Foobar.jpg 1.5x, http://example.com/images/thumb/3/3a/Foobar.jpg/100px-Foobar.jpg 2x" /></a> <div class="thumbcaption"><div class="magnify"><a href="/wiki/File:Foobar.jpg" class="internal" title="Enlarge"></a></div></div></div></div>
15200 <figure typeof="mw:Image/Thumb"><a href="./File:Foobar.jpg"><img resource="./File:Foobar.jpg" src="//example.com/images/thumb/3/3a/Foobar.jpg/50px-Foobar.jpg" data-file-width="1941" data-file-height="220" data-file-type="bitmap" height="6" width="50"/></a></figure>
15204 Image: bitmap thumbs can't be enlarged past original size, but vector can.
15206 parsoid=wt2html,wt2wt,html2html
15208 [[File:Foobar.jpg|thumb|2000px]]
15210 [[File:Foobar.svg|thumb|2000px]]
15212 <div class="thumb tright"><div class="thumbinner" style="width:1943px;"><a href="/wiki/File:Foobar.jpg" class="image"><img alt="Foobar.jpg" src="http://example.com/images/3/3a/Foobar.jpg" width="1941" height="220" class="thumbimage" /></a> <div class="thumbcaption"><div class="magnify"><a href="/wiki/File:Foobar.jpg" class="internal" title="Enlarge"></a></div></div></div></div>
15213 <div class="thumb tright"><div class="thumbinner" style="width:2002px;"><a href="/wiki/File:Foobar.svg" class="image"><img alt="Foobar.svg" src="http://example.com/images/thumb/f/ff/Foobar.svg/2000px-Foobar.svg.png" width="2000" height="1500" class="thumbimage" srcset="http://example.com/images/thumb/f/ff/Foobar.svg/3000px-Foobar.svg.png 1.5x, http://example.com/images/thumb/f/ff/Foobar.svg/4000px-Foobar.svg.png 2x" /></a> <div class="thumbcaption"><div class="magnify"><a href="/wiki/File:Foobar.svg" class="internal" title="Enlarge"></a></div></div></div></div>
15216 <figure typeof="mw:Image/Thumb"><a href="./File:Foobar.jpg"><img resource="./File:Foobar.jpg" src="//example.com/images/3/3a/Foobar.jpg" data-file-width="1941" data-file-height="220" data-file-type="bitmap" height="220" width="1941"/></a></figure>
15217 <figure typeof="mw:Image/Thumb"><a href="./File:Foobar.svg"><img resource="./File:Foobar.svg" src="//example.com/images/thumb/f/ff/Foobar.svg/2000px-Foobar.svg.png" data-file-width="240" data-file-height="180" data-file-type="drawing" height="1500" width="2000"/></a></figure>
15221 Image: frameless can reduce in size
15223 parsoid=wt2html,wt2wt,html2html
15225 [[File:Foobar.jpg|frameless|50px]]
15227 <p><a href="/wiki/File:Foobar.jpg" class="image"><img alt="Foobar.jpg" src="http://example.com/images/thumb/3/3a/Foobar.jpg/50px-Foobar.jpg" width="50" height="6" srcset="http://example.com/images/thumb/3/3a/Foobar.jpg/75px-Foobar.jpg 1.5x, http://example.com/images/thumb/3/3a/Foobar.jpg/100px-Foobar.jpg 2x" /></a>
15230 <p><figure-inline typeof="mw:Image/Frameless"><a href="./File:Foobar.jpg"><img resource="./File:Foobar.jpg" src="//example.com/images/thumb/3/3a/Foobar.jpg/50px-Foobar.jpg" data-file-width="1941" data-file-height="220" data-file-type="bitmap" height="6" width="50"/></a></figure-inline></p>
15234 Image: bitmap frameless can't be enlarged past original size, but vector can
15236 parsoid=wt2html,wt2wt,html2html
15238 [[File:Foobar.jpg|frameless|2000px]]
15240 [[File:Foobar.svg|frameless|2000px]]
15242 <p><a href="/wiki/File:Foobar.jpg" class="image"><img alt="Foobar.jpg" src="http://example.com/images/3/3a/Foobar.jpg" width="1941" height="220" /></a>
15243 </p><p><a href="/wiki/File:Foobar.svg" class="image"><img alt="Foobar.svg" src="http://example.com/images/thumb/f/ff/Foobar.svg/2000px-Foobar.svg.png" width="2000" height="1500" srcset="http://example.com/images/thumb/f/ff/Foobar.svg/3000px-Foobar.svg.png 1.5x, http://example.com/images/thumb/f/ff/Foobar.svg/4000px-Foobar.svg.png 2x" /></a>
15246 <p><figure-inline typeof="mw:Image/Frameless"><a href="./File:Foobar.jpg"><img resource="./File:Foobar.jpg" src="//example.com/images/3/3a/Foobar.jpg" data-file-width="1941" data-file-height="220" data-file-type="bitmap" height="220" width="1941"/></a></figure-inline></p>
15247 <p><figure-inline typeof="mw:Image/Frameless"><a href="./File:Foobar.svg"><img resource="./File:Foobar.svg" src="//example.com/images/thumb/f/ff/Foobar.svg/2000px-Foobar.svg.png" data-file-width="240" data-file-height="180" data-file-type="drawing" height="1500" width="2000"/></a></figure-inline></p>
15251 Image: framed images are always unscaled.
15253 parsoid=wt2html,wt2wt,html2html
15255 [[File:Foobar.jpg|frame]]
15257 [[File:Foobar.jpg|frame|50px]]
15259 [[File:Foobar.jpg|frame|50x50px]]
15261 [[File:Foobar.jpg|frame|2000px]]
15263 <div class="thumb tright"><div class="thumbinner" style="width:1943px;"><a href="/wiki/File:Foobar.jpg" class="image"><img alt="Foobar.jpg" src="http://example.com/images/3/3a/Foobar.jpg" width="1941" height="220" class="thumbimage" /></a> <div class="thumbcaption"></div></div></div>
15264 <div class="thumb tright"><div class="thumbinner" style="width:1943px;"><a href="/wiki/File:Foobar.jpg" class="image"><img alt="Foobar.jpg" src="http://example.com/images/3/3a/Foobar.jpg" width="1941" height="220" class="thumbimage" /></a> <div class="thumbcaption"></div></div></div>
15265 <div class="thumb tright"><div class="thumbinner" style="width:1943px;"><a href="/wiki/File:Foobar.jpg" class="image"><img alt="Foobar.jpg" src="http://example.com/images/3/3a/Foobar.jpg" width="1941" height="220" class="thumbimage" /></a> <div class="thumbcaption"></div></div></div>
15266 <div class="thumb tright"><div class="thumbinner" style="width:1943px;"><a href="/wiki/File:Foobar.jpg" class="image"><img alt="Foobar.jpg" src="http://example.com/images/3/3a/Foobar.jpg" width="1941" height="220" class="thumbimage" /></a> <div class="thumbcaption"></div></div></div>
15269 <figure class="mw-default-size" typeof="mw:Image/Frame"><a href="./File:Foobar.jpg"><img resource="./File:Foobar.jpg" src="//example.com/images/3/3a/Foobar.jpg" data-file-width="1941" data-file-height="220" data-file-type="bitmap" height="220" width="1941"/></a></figure>
15270 <figure typeof="mw:Image/Frame"><a href="./File:Foobar.jpg"><img resource="./File:Foobar.jpg" src="//example.com/images/3/3a/Foobar.jpg" data-file-width="1941" data-file-height="220" data-file-type="bitmap" height="220" width="1941"/></a></figure>
15271 <figure typeof="mw:Image/Frame"><a href="./File:Foobar.jpg"><img resource="./File:Foobar.jpg" src="//example.com/images/3/3a/Foobar.jpg" data-file-width="1941" data-file-height="220" data-file-type="bitmap" height="220" width="1941"/></a></figure>
15272 <figure typeof="mw:Image/Frame"><a href="./File:Foobar.jpg"><img resource="./File:Foobar.jpg" src="//example.com/images/3/3a/Foobar.jpg" data-file-width="1941" data-file-height="220" data-file-type="bitmap" height="220" width="1941"/></a></figure>
15275 ###################
15278 Link to image page- image page normally doesn't exists, hence edit link
15279 Add test with existing image page
15280 #<p><a href="/wiki/File:Test" title="Image:Test">Image:test</a>
15284 <p><a href="/index.php?title=File:Test&action=edit&redlink=1" class="new" title="File:Test (page does not exist)">Image:test</a>
15289 T20784 Link to non-existent image page with caption should use caption as link text
15291 [[:Image:test|caption]]
15293 <p><a href="/index.php?title=File:Test&action=edit&redlink=1" class="new" title="File:Test (page does not exist)">caption</a>
15298 Frameless image caption with a free URL
15300 [[File:Foobar.jpg|http://example.com]]
15302 <p><a href="/wiki/File:Foobar.jpg" class="image" title="http://example.com"><img alt="http://example.com" src="http://example.com/images/3/3a/Foobar.jpg" width="1941" height="220" /></a>
15305 <p><figure-inline class="mw-default-size" typeof="mw:Image" data-parsoid='{"optList":[{"ck":"caption","ak":"http://example.com"}]}' data-mw='{"caption":"<a rel=\"mw:ExtLink\" href=\"http://example.com\" data-parsoid='{\"stx\":\"url\",\"dsr\":[18,36,0,0]}'>http://example.com</a>"}'><a href="./File:Foobar.jpg" data-parsoid='{"a":{"href":"./File:Foobar.jpg"},"sa":{}}'><img resource="./File:Foobar.jpg" src="//example.com/images/3/3a/Foobar.jpg" data-file-width="1941" data-file-height="220" data-file-type="bitmap" height="220" width="1941" data-parsoid='{"a":{"resource":"./File:Foobar.jpg","height":"220","width":"1941"},"sa":{"resource":"File:Foobar.jpg"}}'/></a></figure-inline></p>
15309 Thumbnail image caption with a free URL
15313 [[File:Foobar.jpg|thumb|http://example.com]]
15315 <div class="thumb tright"><div class="thumbinner" style="width:222px;"><a href="/wiki/File:Foobar.jpg" class="image"><img alt="" src="http://example.com/images/thumb/3/3a/Foobar.jpg/220px-Foobar.jpg" width="220" height="25" class="thumbimage" srcset="http://example.com/images/thumb/3/3a/Foobar.jpg/330px-Foobar.jpg 1.5x, http://example.com/images/thumb/3/3a/Foobar.jpg/440px-Foobar.jpg 2x" /></a> <div class="thumbcaption"><div class="magnify"><a href="/wiki/File:Foobar.jpg" class="internal" title="Enlarge"></a></div><a rel="nofollow" class="external free" href="http://example.com">http://example.com</a></div></div></div>
15318 <figure class="mw-default-size" typeof="mw:Image/Thumb"><a href="./File:Foobar.jpg"><img resource="./File:Foobar.jpg" src="//example.com/images/thumb/3/3a/Foobar.jpg/220px-Foobar.jpg" data-file-width="1941" data-file-height="220" data-file-type="bitmap" height="25" width="220"/></a><figcaption><a rel="mw:ExtLink" class="external free" href="http://example.com">http://example.com</a></figcaption></figure>
15322 Thumbnail image caption with a free URL and explicit alt
15325 parsoid=wt2html,wt2wt,html2html
15327 [[File:Foobar.jpg|thumb|http://example.com|alt=Alteration]]
15329 <div class="thumb tright"><div class="thumbinner" style="width:222px;"><a href="/wiki/File:Foobar.jpg" class="image"><img alt="Alteration" src="http://example.com/images/thumb/3/3a/Foobar.jpg/220px-Foobar.jpg" width="220" height="25" class="thumbimage" srcset="http://example.com/images/thumb/3/3a/Foobar.jpg/330px-Foobar.jpg 1.5x, http://example.com/images/thumb/3/3a/Foobar.jpg/440px-Foobar.jpg 2x" /></a> <div class="thumbcaption"><div class="magnify"><a href="/wiki/File:Foobar.jpg" class="internal" title="Enlarge"></a></div><a rel="nofollow" class="external free" href="http://example.com">http://example.com</a></div></div></div>
15332 <figure class="mw-default-size" typeof="mw:Image/Thumb"><a href="./File:Foobar.jpg"><img alt="Alteration" resource="./File:Foobar.jpg" src="//example.com/images/thumb/3/3a/Foobar.jpg/220px-Foobar.jpg" data-file-width="1941" data-file-height="220" data-file-type="bitmap" height="25" width="220"/></a><figcaption><a rel="mw:ExtLink" class="external free" href="http://example.com">http://example.com</a></figcaption></figure>
15336 SVG thumbnails with no language set
15339 [[File:Foobar.svg|thumb|caption]]
15341 <div class="thumb tright"><div class="thumbinner" style="width:182px;"><a href="/wiki/File:Foobar.svg" class="image"><img alt="" src="http://example.com/images/thumb/f/ff/Foobar.svg/180px-Foobar.svg.png" width="180" height="135" class="thumbimage" srcset="http://example.com/images/thumb/f/ff/Foobar.svg/270px-Foobar.svg.png 1.5x, http://example.com/images/thumb/f/ff/Foobar.svg/360px-Foobar.svg.png 2x" /></a> <div class="thumbcaption"><div class="magnify"><a href="/wiki/File:Foobar.svg" class="internal" title="Enlarge"></a></div>caption</div></div></div>
15344 <figure class="mw-default-size" typeof="mw:Image/Thumb"><a href="./File:Foobar.svg"><img resource="./File:Foobar.svg" src="//example.com/images/thumb/f/ff/Foobar.svg/220px-Foobar.svg.png" data-file-width="240" data-file-height="180" data-file-type="drawing" height="165" width="220"/></a><figcaption>caption</figcaption></figure>
15348 SVG thumbnails with language de
15350 parsoid=wt2html,wt2wt,html2html
15352 [[File:Foobar.svg|thumb|caption|lang=de]]
15354 <div class="thumb tright"><div class="thumbinner" style="width:182px;"><a href="/index.php?title=File:Foobar.svg&lang=de" class="image"><img alt="" src="http://example.com/images/thumb/f/ff/Foobar.svg/langde-180px-Foobar.svg.png" width="180" height="135" class="thumbimage" srcset="http://example.com/images/thumb/f/ff/Foobar.svg/langde-270px-Foobar.svg.png 1.5x, http://example.com/images/thumb/f/ff/Foobar.svg/langde-360px-Foobar.svg.png 2x" /></a> <div class="thumbcaption"><div class="magnify"><a href="/wiki/File:Foobar.svg" class="internal" title="Enlarge"></a></div>caption</div></div></div>
15357 <figure class="mw-default-size" typeof="mw:Image/Thumb"><a href="./File:Foobar.svg"><img resource="./File:Foobar.svg" src="//example.com/images/thumb/f/ff/Foobar.svg/220px-Foobar.svg.png" lang="de" data-file-width="240" data-file-height="180" data-file-type="drawing" height="165" width="220"/></a><figcaption>caption</figcaption></figure>
15361 SVG thumbnails with invalid language code
15363 parsoid=wt2html,wt2wt,html2html
15365 [[File:Foobar.svg|thumb|caption|lang=invalid:language:code]]
15367 <div class="thumb tright"><div class="thumbinner" style="width:182px;"><a href="/wiki/File:Foobar.svg" class="image"><img alt="" src="http://example.com/images/thumb/f/ff/Foobar.svg/180px-Foobar.svg.png" width="180" height="135" class="thumbimage" srcset="http://example.com/images/thumb/f/ff/Foobar.svg/270px-Foobar.svg.png 1.5x, http://example.com/images/thumb/f/ff/Foobar.svg/360px-Foobar.svg.png 2x" /></a> <div class="thumbcaption"><div class="magnify"><a href="/wiki/File:Foobar.svg" class="internal" title="Enlarge"></a></div>lang=invalid:language:code</div></div></div>
15370 <figure class="mw-default-size" typeof="mw:Image/Thumb"><a href="./File:Foobar.svg"><img resource="./File:Foobar.svg" src="//example.com/images/thumb/f/ff/Foobar.svg/220px-Foobar.svg.png" data-file-width="240" data-file-height="180" data-file-type="drawing" height="165" width="220"/></a><figcaption>lang=invalid:language:code</figcaption></figure>
15374 SVG thumbnails in page language
15377 wgMediaInTargetLanguage = true
15379 [[File:Foobar.svg]] [[File:Foobar.svg|lang=en]]
15381 <p><a href="/wiki/%D0%A4%D0%B0%D0%B9%D0%BB:Foobar.svg" class="image"><img alt="Foobar.svg" src="http://example.com/images/thumb/f/ff/Foobar.svg/langru-240px-Foobar.svg.png" width="240" height="180" srcset="http://example.com/images/thumb/f/ff/Foobar.svg/langru-360px-Foobar.svg.png 1.5x, http://example.com/images/thumb/f/ff/Foobar.svg/langru-480px-Foobar.svg.png 2x" /></a> <a href="/index.php?title=%D0%A4%D0%B0%D0%B9%D0%BB:Foobar.svg&lang=en" class="image"><img alt="Foobar.svg" src="http://example.com/images/thumb/f/ff/Foobar.svg/240px-Foobar.svg.png" width="240" height="180" srcset="http://example.com/images/thumb/f/ff/Foobar.svg/360px-Foobar.svg.png 1.5x, http://example.com/images/thumb/f/ff/Foobar.svg/480px-Foobar.svg.png 2x" /></a>
15386 SVG thumbnails in page language not present in the file
15389 wgMediaInTargetLanguage = true
15391 [[File:Foobar.svg]] [[File:Foobar.svg|lang=ru]]
15393 <p><a href="/wiki/Datei:Foobar.svg" class="image"><img alt="Foobar.svg" src="http://example.com/images/thumb/f/ff/Foobar.svg/240px-Foobar.svg.png" width="240" height="180" srcset="http://example.com/images/thumb/f/ff/Foobar.svg/360px-Foobar.svg.png 1.5x, http://example.com/images/thumb/f/ff/Foobar.svg/480px-Foobar.svg.png 2x" /></a> <a href="/index.php?title=Datei:Foobar.svg&lang=ru" class="image"><img alt="Foobar.svg" src="http://example.com/images/thumb/f/ff/Foobar.svg/langru-240px-Foobar.svg.png" width="240" height="180" srcset="http://example.com/images/thumb/f/ff/Foobar.svg/langru-360px-Foobar.svg.png 1.5x, http://example.com/images/thumb/f/ff/Foobar.svg/langru-480px-Foobar.svg.png 2x" /></a>
15398 T3887: A ISBN with a thumbnail
15400 [[File:Foobar.jpg|thumb|ISBN 1235467890]]
15402 <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>
15405 <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>
15409 T3887: A RFC with a thumbnail
15411 [[File:Foobar.jpg|thumb|This is RFC 12354]]
15413 <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>
15416 <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>
15420 T3887: A mailto link with a thumbnail
15422 [[File:Foobar.jpg|thumb|Please mailto:nobody@example.com]]
15424 <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>
15427 <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>
15430 # Pending resolution to T2368
15432 T2648: Frameless image caption with a link
15434 [[File:Foobar.jpg|text with a [[link]] in it]]
15436 <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>
15439 <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>
15443 T2648: Frameless image caption with a link (suffix)
15445 [[File:Foobar.jpg|text with a [[link]]foo in it]]
15447 <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>
15450 <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>
15454 T2648: Frameless image caption with an interwiki link
15456 [[File:Foobar.jpg|text with a [[MeatBall:Link]] in it]]
15458 <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>
15461 <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>
15465 T2648: Frameless image caption with a piped interwiki link
15467 [[File:Foobar.jpg|text with a [[MeatBall:Link|link]] in it]]
15469 <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>
15472 <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>
15476 T107474: Frameless image caption with <nowiki>
15478 [[File:Foobar.jpg|<nowiki>text with a [[MeatBall:Link|link]] in it</nowiki>]]
15480 <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>
15484 Escape HTML special chars in image alt text
15486 [[File:Foobar.jpg|& < > "]]
15488 <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>
15491 <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>
15495 Escape HTML special chars in image alt text with LanguageConverter
15499 [[File:Foobar.jpg|& < > "]]
15501 <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>
15504 <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>
15508 Entities in file name and attributes
15510 [[File:7%25 solution.gif|manualthumb=7%25 solution.gif|link=7%25 solution|[[7%25 solution]]]]
15512 <p><a href="/index.php?title=Special:Upload&wpDestFile=7%25_solution.gif" class="new" title="File:7% solution.gif">7% solution</a>
15515 <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>
15519 T2499: Alt text should have Ӓ, not &1234;
15521 [[File:Foobar.jpg|♀]]
15523 <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>
15526 <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>
15530 Broken image caption with link
15532 parsoid=wt2html,wt2wt,html2html
15534 [[Image:Foobar.jpg|thumb|This is a broken caption. But [[Main Page|this]] is just an ordinary link.
15536 <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.
15539 <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>
15543 Image caption containing another image
15545 [[File:Foobar.jpg|thumb|This is a caption with another [[File:Thumb.png|image]] inside it!]]
15547 <div class="thumb tright"><div class="thumbinner" style="width:182px;"><a href="/wiki/File:Foobar.jpg" class="image"><img alt="" src="http://example.com/images/thumb/3/3a/Foobar.jpg/180px-Foobar.jpg" width="180" height="20" class="thumbimage" srcset="http://example.com/images/thumb/3/3a/Foobar.jpg/270px-Foobar.jpg 1.5x, http://example.com/images/thumb/3/3a/Foobar.jpg/360px-Foobar.jpg 2x" /></a> <div class="thumbcaption"><div class="magnify"><a href="/wiki/File:Foobar.jpg" class="internal" title="Enlarge"></a></div>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>
15550 <figure class="mw-default-size" typeof="mw:Image/Thumb"><a href="./File:Foobar.jpg"><img resource="./File:Foobar.jpg" src="//example.com/images/thumb/3/3a/Foobar.jpg/220px-Foobar.jpg" data-file-width="1941" data-file-height="220" data-file-type="bitmap" height="25" width="220"/></a><figcaption>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>
15554 Image: caption containing a newline
15556 [[File:Foobar.jpg|This
15559 <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>
15562 <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>
15566 Image: caption containing leading space
15567 (The leading space should not trigger nowiki escaping in wt2wt mode)
15569 [[File:Foobar.jpg|thumb| bar]]
15571 <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>
15574 <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>
15577 # html/php output not have newlines after table, td, th, etc. because
15578 # Linker::makeThumbLink2() replaces the newlines with spaces since
15579 # the table is inside a caption.
15580 # FIXME: Verify if that circa 2004 fix is still required.
15582 Image: caption containing a table
15584 parsoid=wt2html,wt2wt,html2html
15586 [[Image:Foobar.jpg|thumb|200px|This is an example image thumbnail caption with a table
15592 and some more text.]]
15594 <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>
15597 <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
15600 <tr><th>Foo</th><th>Bar</th></tr>
15603 <td>Bar1</td></tr></tbody></table>and some more text.</figcaption></figure>
15607 T5090: External links other than http: in image captions
15609 [[File:Foobar.jpg|thumb|200x200px|This caption has [irc://example.net irc] and [https://example.com Secure] ext links in it.]]
15611 <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>
15614 <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>
15620 parsoid=wt2html,wt2wt,html2html
15622 [[Image:foobar.jpg|a|class=b]]
15624 <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>
15627 <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>
15631 Localized image handling (1).
15633 parsoid=wt2html,wt2wt,html2html
15636 [[Archivo:Foobar.jpg|izquierda|enlace=foo|caption]]
15638 <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>
15641 <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>
15645 Localized image handling (2).
15648 parsoid=wt2html,wt2wt,html2html
15651 [[Archivo:Foobar.jpg|miniatura|izquierda|enlace=foo|caption]]
15653 <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>
15656 <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>
15660 Localized image handling (3).
15665 <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>
15667 [[File:Foobar.jpg|بندانگشتی]]
15671 "border", "frameless" and "class" attributes on an image.
15674 parsoid=wt2html,wt2wt,html2html
15676 [[File:Foobar.jpg|frameless|border|class=extra|caption]]
15678 <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>
15681 <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>
15684 # Note that 'right' is the default alignment, despite the misspelled 'righ' below
15686 Invalid image attributes (T64500)
15689 parsoid=wt2html,wt2wt,html2html
15691 [[File:Foobar.jpg|thumb|float|left|caption]]
15693 [[File:Foobar.jpg|thumb|righ|caption]]
15695 [[File:Foobar.jpg|bogus1|thumb|bogus2|left|bogus3|caption]]
15697 <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>
15698 <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>
15699 <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>
15702 <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>
15703 <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>
15704 <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>
15710 #REDIRECT [[File:Barfoo.jpg]]
15713 # FIXME: Parsoid should run this test -- but we'd need to teach the
15714 # mockAPI about the redirected Barfoo.jpg image.
15718 [[Image:Barfoo.jpg]]
15720 <p><a href="/wiki/File:Barfoo.jpg" class="mw-redirect" title="File:Barfoo.jpg">File:Barfoo.jpg</a>
15725 Missing image with uploads disabled
15729 [[File:Foobaz.jpg]]
15731 <p><a href="/wiki/File:Foobaz.jpg" title="File:Foobaz.jpg">File:Foobaz.jpg</a>
15734 <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>
15737 # Parsoid-specific testing for images
15738 # https://www.mediawiki.org/wiki/Parsoid/MediaWiki_DOM_spec#Images
15739 # Currently imperfect due to a flaw in the Parsoid testrunner
15741 # THESE TESTS SHOULD BE MOVED UP and merged with the php-specific
15745 Parsoid-specific image handling - simple image with size and middle alignment
15747 [[File:Foobar.jpg|middle|50px]]
15749 <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>
15753 Parsoid-specific image handling - simple image with size, middle alignment, non-standard namespace alias
15755 parsoid=wt2wt,wt2html,html2html
15757 [[Image:Foobar.jpg|middle|50px]]
15759 <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>
15763 Parsoid-specific image handling - simple image with size and middle alignment (existing content)
15765 [[File:Foobar.jpg|50px|middle]]
15767 <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>
15771 Parsoid-specific image handling - simple image with size and middle alignment and non-standard namespace name
15773 parsoid=wt2html,wt2wt,html2html
15775 [[Image:Foobar.jpg|50px|middle]]
15777 <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>
15781 Parsoid-specific image handling - simple image with both sizes, a baseline alignment, and a caption
15783 [[File:Foobar.jpg|500x10px|baseline|caption]]
15785 <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>
15789 Parsoid-specific image handling - simple image with border and size spec
15791 [[File:Foobar.jpg|50px|border|caption]]
15793 <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>
15797 Parsoid-specific image handling - thumbnail with halign, valign, and caption
15799 parsoid=wt2html,html2html
15801 [[File:Foobar.jpg|left|baseline|thumb|caption content]]
15803 <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>
15807 Parsoid-specific image handling - thumbnail with halign, valign, and caption (existing content)
15809 parsoid=wt2html,html2html
15811 [[File:Foobar.jpg|thumb|left|baseline|caption content]]
15813 <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>
15817 Parsoid-specific image handling - thumbnail with specific size, halign, valign, and caption
15819 parsoid=wt2html,html2html
15821 [[Image:Foobar.jpg|right|middle|thumb|50x50px|caption]]
15823 <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>
15827 Parsoid-specific image handling - thumbnail with specific size, halign, valign, and caption (existing content)
15829 parsoid=wt2html,html2html
15831 [[File:Foobar.jpg|thumb|50x50px|right|middle|caption]]
15833 <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>
15837 Parsoid-specific image handling - framed image with specific size and caption (size is ignored)
15839 parsoid=wt2html,wt2wt,html2html
15841 [[File:Foobar.jpg|frame|500x50px|caption]]
15843 <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>
15847 Parsoid-specific image handling - framed image with specific size, halign, valign, and caption (size is ignored)
15849 parsoid=wt2html,html2html
15851 [[File:Foobar.jpg|left|baseline|frame|500x50px|caption]]
15853 <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>
15857 Parsoid-specific image handling - frameless image with specific size, border, and caption
15859 [[File:Foobar.jpg|frameless|442x50px|border|caption]]
15861 <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>
15865 Parsoid-specific image handling - simple image with a formatted caption
15867 [[File:Foobar.jpg|<table><tr><td>a</td><td>b</td></tr><tr><td>c</td></tr></table>]]
15869 <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>
15873 Parsoid-specific image handling - caption with a template in it
15875 [[File:Foobar.jpg|thumb|200x23px|This caption has a {{echo|transclusion}} in it.]]
15877 <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>
15881 Parsoid-specific image handling - caption with unbalanced tags in it
15883 parsoid=wt2html,wt2wt,html2html
15886 [[File:Foobar.jpg|thumb|200x200px|This caption has a <center>unbalanced tag in it.]]
15890 <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>
15895 Parsoid-specific image handling - empty caption (1)
15897 parsoid=wt2html,wt2wt
15899 [[File:Foobar.jpg|thumb|]]
15901 <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>
15904 # empty captions don't get serialized unless we're in the "round trip" case
15906 Parsoid-specific image handling - empty caption (2)
15910 <figure class="mw-default-size" typeof="mw:Image/Thumb">
15911 <a href="./File:Foobar.jpg">
15912 <img resource="./File:Foobar.jpg"
15913 src="//example.com/images/3/3a/Foobar.jpg"
15914 data-file-width="1941" data-file-height="220" data-file-type="bitmap"
15915 height="25" width="220"/>
15917 <figcaption></figcaption>
15920 [[File:Foobar.jpg|thumb]]
15924 Parsoid-specific image handling - whitespace caption
15926 [[File:Foobar.jpg|thumb| ]]
15928 <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>
15932 Parsoid-specific image handling - lang option
15935 [[File:Foobar.svg|lang=de|caption]]
15939 <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>
15943 ## Edge case bugs in Parsoid from T93580
15945 T93580: 1. Templated <ref> inside block images
15947 [[File:Foobar.jpg|thumb|Caption with templated ref: {{echo|<ref>foo</ref>}}]]
15951 <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>
15953 <ol class="mw-references references" typeof="mw:Extension/references" about="#mwt6" data-mw='{"name":"references","attrs":{}}'><li about="#cite_note-1" id="cite_note-1"><a href="./Main_Page#cite_ref-1" rel="mw:referencedBy"><span class="mw-linkback-text">↑ </span></a> <span id="mw-reference-text-cite_note-1" class="mw-reference-text" data-parsoid="{}">foo</span></li></ol>
15957 T93580: 2. <ref> inside inline images
15959 [[File:Foobar.jpg|Undisplayed caption in inline image with ref: <ref>foo</ref>]]
15963 <p><figure-inline class="mw-default-size" typeof="mw:Image" data-parsoid='{"optList":[{"ck":"caption","ak":"Undisplayed caption in inline image with ref: <ref>foo</ref>"}]}' data-mw='{"caption":"Undisplayed caption in inline image with ref: <sup about=\"#mwt2\" class=\"mw-ref\" id=\"cite_ref-1\" rel=\"dc:references\" typeof=\"mw:Extension/ref\" data-parsoid='{\"dsr\":[64,78,5,6]}' data-mw='{\"name\":\"ref\",\"attrs\":{},\"body\":{\"id\":\"mw-reference-text-cite_note-1\"}}'><a href=\"./Main_Page#cite_note-1\" style=\"counter-reset: mw-Ref 1;\" data-parsoid=\"{}\"><span class=\"mw-reflink-text\" data-parsoid=\"{}\">[1]</span></a></sup>"}'><a href="./File:Foobar.jpg" data-parsoid='{"a":{"href":"./File:Foobar.jpg"},"sa":{"href":"File:Foobar.jpg"}}'><img resource="./File:Foobar.jpg" src="//example.com/images/3/3a/Foobar.jpg" data-file-width="1941" data-file-height="220" data-file-type="bitmap" height="220" width="1941" data-parsoid='{"a":{"resource":"./File:Foobar.jpg","height":"220","width":"1941"},"sa":{"resource":"File:Foobar.jpg"}}'/></a></figure-inline></p>
15965 <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>
15969 T93580: 3. Templated <ref> inside inline images
15971 [[File:Foobar.jpg|Undisplayed caption in inline image with ref: {{echo|<ref>{{echo|foo}}</ref>}}]]
15975 <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>
15977 <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>
15984 Subpage test/subpage
15992 subpage title=[[Subpage test]]
15996 <p><a href="/wiki/Subpage_test/subpage" title="Subpage test/subpage">/subpage</a>
16001 Subpage noslash link
16003 subpage title=[[Subpage test]]
16007 <p><a href="/wiki/Subpage_test/subpage" title="Subpage test/subpage">subpage</a>
16012 Subpage test/1/2/subpage
16018 Relative subpage noslash link
16020 parsoid=wt2wt,wt2html,html2html
16021 subpage title=[[Subpage test/1/2/3/4]]
16027 <p><a href="/wiki/Subpage_test/1/2/subpage" title="Subpage test/1/2/subpage">subpage</a>
16028 </p><p><a href="/wiki/Subpage_test/1/2/subpage" title="Subpage test/1/2/subpage">Subpage test/1/2/subpage</a>
16031 <p><a rel="mw:WikiLink" href="./Subpage_test/1/2/subpage" title="Subpage test/1/2/subpage">subpage</a></p>
16032 <p><a rel="mw:WikiLink" href="./Subpage_test/1/2/subpage" title="Subpage test/1/2/subpage">Subpage_test/1/2/subpage</a></p>
16036 Parsoid: dot-slash prefixed wikilinks
16046 </p><p>[[././baz/]]
16051 </p><p>[[././baz/]]
16056 Render invalid page names as plain text (T53090)
16068 [[foo[http://example.com]xyz]]
16070 [[{{echo|./../foo}}|bar]]
16071 [[{{echo|foo/.}}|bar]]
16072 [[{{echo|foo/..}}|bar]]
16073 [[{{echo|foo~~~~bar}}]]
16074 [[{{echo|foo>bar}}]]
16075 [[{{echo|foo././bar}}]]
16076 [[{{echo|foo{bar}}]]
16077 [[{{echo|foo}bar}}]]
16078 [[{{echo|foo[bar}}]]
16079 [[{{echo|foo]bar}}]]
16080 [[{{echo|foo<bar}}]]
16082 <p>[[./../foo|bar]]
16092 [[foo<a rel="nofollow" class="external autonumber" href="http://example.com">[1]</a>xyz]]
16093 </p><p>[[./../foo|bar]]
16106 <p>[[./../foo|bar]]
16116 [[foo<a rel="mw:ExtLink" class="external autonumber" href="http://example.com"></a>xyz]]</p>
16118 <p>[[<span typeof="mw:Transclusion" data-mw='{"parts":[{"template":{"target":{"wt":"echo","href":"./Template:Echo"},"params":{"1":{"wt":"./../foo"}},"i":0}}]}'>./../foo</span>|bar]]
16119 [[<span typeof="mw:Transclusion" data-mw='{"parts":[{"template":{"target":{"wt":"echo","href":"./Template:Echo"},"params":{"1":{"wt":"foo/."}},"i":0}}]}'>foo/.</span>|bar]]
16120 [[<span typeof="mw:Transclusion" data-mw='{"parts":[{"template":{"target":{"wt":"echo","href":"./Template:Echo"},"params":{"1":{"wt":"foo/.."}},"i":0}}]}'>foo/..</span>|bar]]
16121 [[<span typeof="mw:Transclusion" data-mw='{"parts":[{"template":{"target":{"wt":"echo","href":"./Template:Echo"},"params":{"1":{"wt":"foo~~~~bar"}},"i":0}}]}'>foo~~~~bar</span>]]
16122 [[<span typeof="mw:Transclusion" data-mw='{"parts":[{"template":{"target":{"wt":"echo","href":"./Template:Echo"},"params":{"1":{"wt":"foo>bar"}},"i":0}}]}'>foo>bar</span>]]
16123 [[<span typeof="mw:Transclusion" data-mw='{"parts":[{"template":{"target":{"wt":"echo","href":"./Template:Echo"},"params":{"1":{"wt":"foo././bar"}},"i":0}}]}'>foo././bar</span>]]
16124 [[<span typeof="mw:Transclusion" data-mw='{"parts":[{"template":{"target":{"wt":"echo","href":"./Template:Echo"},"params":{"1":{"wt":"foo{bar"}},"i":0}}]}'>foo{bar</span>]]
16125 [[<span typeof="mw:Transclusion" data-mw='{"parts":[{"template":{"target":{"wt":"echo","href":"./Template:Echo"},"params":{"1":{"wt":"foo}bar"}},"i":0}}]}'>foo}bar</span>]]
16126 [[<span typeof="mw:Transclusion" data-mw='{"parts":[{"template":{"target":{"wt":"echo","href":"./Template:Echo"},"params":{"1":{"wt":"foo[bar"}},"i":0}}]}'>foo[bar</span>]]
16127 [[<span typeof="mw:Transclusion" data-mw='{"parts":[{"template":{"target":{"wt":"echo","href":"./Template:Echo"},"params":{"1":{"wt":"foo]bar"}},"i":0}}]}'>foo]bar</span>]]
16128 [[<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>
16136 <p><a href="/index.php?title=/subpage&action=edit&redlink=1" class="new" title="/subpage (page does not exist)">/subpage</a>
16141 T2561: {{/Subpage}}
16143 subpage title=[[Page]]
16147 <p><a href="/index.php?title=Page/Subpage&action=edit&redlink=1" class="new" title="Page/Subpage (page does not exist)">Page/Subpage</a>
16155 Category:MediaWiki User's Guide
16163 [[:Category:MediaWiki User's Guide]]
16165 <p><a href="/wiki/Category:MediaWiki_User%27s_Guide" title="Category:MediaWiki User's Guide">Category:MediaWiki User's Guide</a>
16174 [[Category:MediaWiki User's Guide]]
16176 cat=MediaWiki_User's_Guide sort=
16178 <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"}}'/>
16182 PAGESINCATEGORY invalid title fatal (r33546 fix)
16184 {{PAGESINCATEGORY:<bogus>}}
16191 Category with different sort key
16195 [[Category:MediaWiki User's Guide|Foo]]
16197 cat=MediaWiki_User's_Guide sort=Foo
16199 <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"}}'/>
16203 Category with identical sort key
16207 [[Category:MediaWiki User's Guide|MediaWiki User's Guide]]
16209 cat=MediaWiki_User's_Guide sort=MediaWiki User's Guide
16211 <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"}}'/>
16215 Category with empty sort key
16220 [[Category:MediaWiki User's Guide|]]
16222 [[Category:MediaWiki User's Guide|MediaWiki User's Guide]]
16226 Category with empty sort key and parentheses
16231 [[Category:Foo (bar)|]]
16233 [[Category:Foo (bar)|Foo]]
16237 Category with link tail
16242 123[[Category:Foo]]456
16244 123[[Category:Foo]]456
16248 Category with template
16253 [[Category:{{echo|Foo}}]]
16255 [[Category:{{echo|Foo}}]]
16259 Category with template in sort key
16264 [[Category:Foo|{{echo|Bar}}]]
16266 [[Category:Foo|{{echo|Bar}}]]
16270 Category with template in sort key and title
16275 [[Category:{{echo|Foo}}|{{echo|Bar}}]]
16277 [[Category:{{echo|Foo}}|{{echo|Bar}}]]
16280 ## We used to, but no longer wt2wt this test since the default serializer
16281 ## will normalize all categories to serialize on their own line.
16282 ## This wikitext usage is going to be fairly uncommon in production and
16283 ## selser will take care of preserving formatting in those scenarios.
16285 Category / paragraph interactions
16289 Foo [[Category:Baz]] Bar
16291 Foo [[Category:Baz]]
16299 [[Category:Baz]] Bar
16312 {{echo|[[Category:Baz]]}}
16325 <p>Foo <link rel="mw:PageProp/Category" href="./Category:Baz"/> Bar</p>
16326 <p>Foo <link rel="mw:PageProp/Category" href="./Category:Baz"/> Bar</p>
16327 <p>Foo <link rel="mw:PageProp/Category" href="./Category:Baz"/> Bar</p>
16328 <p>Foo <link rel="mw:PageProp/Category" href="./Category:Baz"/> Bar</p>
16329 <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>
16330 <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}}]}'/>
16331 <link rel="mw:PageProp/Category" href="./Category:Baz"/>
16334 ## We used to, but no longer wt2wt this test since the default serializer
16335 ## will normalize all categories to serialize on their own line.
16336 ## This wikitext usage is going to be fairly uncommon in production and
16337 ## selser will take care of preserving formatting in those scenarios.
16339 ## The whitespace on the empty line is part of the test. Please do not delete
16341 1. Categories and newlines: All preceding newlines should be suppressed (courtesy T2087)
16347 [[Category:Foo]] and this should be part of same paragraph (not an indent-pre)
16349 {{echo|[[Category:Foo]] and so should this!}}
16351 <p>This and this should be part of same paragraph (not an indent-pre) and so should this!
16356 <link rel="mw:PageProp/Category" href="./Category:Foo"/> and this should be part of same paragraph (not an indent-pre)
16358 <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>
16361 ## Parsoid will not try to wt2wt this while preserving newlines because
16362 ## it suppresses excess newlines within list items -- and we don't want to
16363 ## introduce a special case just for categories, which is, in reality somewhat
16364 ## odd behavior -- categories are unlikely to be used in list items like this
16365 ## in top-level pages and are only likely to show up in template-generated
16366 ## list items where this RT-ing is a non-issue.
16368 ## The whitespace on the empty line is part of the test. Please do not delete
16370 2. Categories and newlines: All preceding newlines should be suppressed (courtesy T2087)
16376 [[Category:Foo]] and this should be part of the same list item
16379 {{echo|[[Category:Foo]] and this should be part of the same list item}}
16381 <ul><li>This and this should be part of the same list item</li>
16382 <li>So should this and this should be part of the same list item</li></ul>
16385 <li>This <link rel="mw:PageProp/Category" href="./Category:Foo"/> and this should be part of the same list item</li>
16386 <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>
16390 ## Newlines and categories that follow the last item of a list
16391 ## are treated differently because this (list followed by categories)
16392 ## is an extremely common pattern on wikis.
16394 3. Categories and newlines: newline suppression for last list item should RT properly
16415 <link rel="mw:PageProp/Category" href="./Category:Foo"/>
16417 <link rel="mw:PageProp/Category" href="./Category:Bar"/>
16418 <link rel="mw:PageProp/Category" href="./Category:Baz"/>
16420 <dl><dd>c</dd></dl>
16422 <link rel="mw:PageProp/Category" href="./Category:C"/>
16424 <dl><dt>d</dt></dl>
16426 <link rel="mw:PageProp/Category" href="./Category:D"/>
16430 4. Categories and newlines: newline suppression for last list item should RT properly
16438 <ul><li><ul><li><ul><li>b</li></ul></li></ul></li></ul></li></ul>
16440 <link rel="mw:PageProp/Category" href="./Category:Foo" data-parsoid='{"stx":"simple","a":{"href":"./Category:Foo"},"sa":{"href":"Category:Foo"}}'/>
16443 ## only wt2html for this to make sure the algo only applies to the rightmost path
16445 5. Categories and newlines: migrateTrailingCategories dom pass should only run on the rightmost path of nested lists
16458 <link rel="mw:PageProp/Category" href="./Category:Foo" data-parsoid='{"stx":"simple","a":{"href":"./Category:Foo"},"sa":{"href":"Category:Foo"}}'/></li></ul></li>
16460 <ul><li>d</li></ul></li></ul>
16461 <link rel="mw:PageProp/Category" href="./Category:Foo" data-parsoid='{"stx":"simple","a":{"href":"./Category:Foo"},"sa":{"href":"Category:Foo"}}'/>
16464 ## We used to, but no longer wt2wt this test since the default serializer
16465 ## will normalize all categories to serialize on their own line.
16466 ## This wikitext usage is going to be fairly uncommon in production and
16467 ## selser will take care of preserving formatting in those scenarios.
16469 6. Categories and newlines: migrateTrailingCategories dom pass should not migrate categories not preceded by newlines
16473 *a [[Category:Foo]]
16475 <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>
16478 # This test also demonstrates because of newline+category tunneling
16479 # through the list hander, template wrapping doesn't expand to the
16480 # containing list when the list item swallows the category.
16482 7. Categories and newlines: migrateTrailingCategories dom pass should leave template content alone
16487 <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
16488 </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>
16492 8. Categories and newlines: migrateTrailingCategories dom pass should not get tripped by intervening templates
16496 {{echo|[[Category:Foo]]
16500 <ul><li>a</li></ul>
16502 <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">
16503 </span><link rel="mw:PageProp/Category" href="./Category:Bar" about="#mwt1" data-parsoid='{"stx":"simple","a":{"href":"./Category:Bar"},"sa":{"href":"Category:Bar"}}'/>
16504 <link rel="mw:PageProp/Category" href="./Category:Baz" data-parsoid='{"stx":"simple","a":{"href":"./Category:Baz"},"sa":{"href":"Category:Baz"}}'/>
16508 Categories and newlines: migrateTrailingCategories dom pass should not get tripped by comments and whitespace
16512 [[Category:Bar]]<!--boo1--> <!--boo2-->
16513 [[Category:Baz]]<!--boo3--> <!--boo4-->
16515 <ul><li>a</li></ul>
16517 <link rel="mw:PageProp/Category" href="./Category:Bar"/><!--boo1--> <!--boo2-->
16518 <link rel="mw:PageProp/Category" href="./Category:Baz"/><!--boo3--> <!--boo4-->
16522 Categories and newlines: should behave properly with linkprefix (T87753)
16537 <link rel="mw:PageProp/Category" href="./تصنيف:Foo"/>
16538 <link rel="mw:PageProp/Category" href="./تصنيف:Bar"/>
16542 No regressions on internal links following category (T174639)
16544 parsoid=wt2html,html2html
16546 [[Category:Foo]]<div>a
16551 <a href="/wiki/Foo" title="Foo">Foo</a></div>
16554 <link rel="mw:PageProp/Category" href="./Category:Foo"/><div>a
16556 <a rel="mw:WikiLink" href="./Foo" title="Foo">Foo</a></div>
16559 # Note that Parsoid differs slightly from PHP due to T175421
16561 11. Special case where only newlines separate links (T175416)
16563 parsoid=wt2html,html2html
16567 [[Foo]][[es:Alimento]]
16572 <a href="/wiki/Foo" title="Foo">Foo</a>
16573 </p><p><a href="/wiki/Foo" title="Foo">Foo</a>
16576 <link rel="mw:PageProp/Category" href="./Category:Foo"/>
16578 <p><a rel="mw:WikiLink" href="./Foo" title="Foo">Foo</a></p><link rel="mw:PageProp/Language" href="http://es.wikipedia.org/wiki/Alimento"/>
16580 <p><a rel="mw:WikiLink" href="./Foo" title="Foo">Foo</a></p>
16584 Category links with multiple namespaces
16586 [[Category:Project:Foo]]
16588 <link rel="mw:PageProp/Category" href="./Category:Project:Foo" />
16592 Parsoid: Serialize link to category page with colon escape
16598 [[:Category:Foo|Bar]]
16601 <a rel="mw:WikiLink" href="./Category:Foo" title="Category:Foo">Category:Foo</a>
16602 <a rel="mw:WikiLink" href="./Category:Foo" title="Category:Foo">Bar</a>
16606 # We used to, but no longer wt2wt this test since the default serializer
16607 # will normalize all categories to serialize on their own line.
16608 # This wikitext usage is going to be fairly uncommon in production and
16609 # selser will take care of preventing whitespace insertion if this
16610 # occurs in an article.
16612 # html2html disabled for the same reason (whitespace insertion between
16615 # html2wt disabled because it localizes the "Category" namespace.
16617 Link prefix/suffixes aren't applied to category links
16627 <p>x<link rel="mw:PageProp/Category" href="./Flokkur:Foo" data-parsoid=""/>y</p>
16631 Link prefix/suffixes aren't applied to language links
16641 <p>x<link rel="mw:PageProp/Language" href="http://es.wikipedia.org/wiki/Foo" data-parsoid=""/>y</p>
16645 Parsoid: Serialize link to file page with colon escape
16651 [[:File:Foo.png|Bar]]
16654 <a rel="mw:WikiLink" href="./File:Foo.png" title="File:Foo.png">File:Foo.png</a>
16655 <a rel="mw:WikiLink" href="./File:Foo.png" title="File:Foo.png">Bar</a>
16660 Parsoid: Serialize a genuine category link without colon escape
16665 [[Category:Foo|Bar]]
16667 <link rel="mw:PageProp/Category" href="./Category:Foo">
16668 <link rel="mw:PageProp/Category" href="./Category:Foo#Bar">
16672 Normalize hrefs properly before testing for invalid link targets (T72894)
16676 <link rel="mw:PageProp/Category" href="./Category:Toxine_bactérienne"/>
16678 [[Category:Toxine bactérienne]]
16682 Parsoid: Defaultsort
16684 {{DEFAULTSORT:Foo}}
16686 <meta property="mw:PageProp/categorydefaultsort" content="Foo"/>
16689 # NOTE: mw:ExpandedAttrs is not the best typeof here. mw:Transclusion is better.
16690 # But, this is a limitation of our representation and is documented in
16691 # TemplateHandler.js in processSpecialMagicWord
16693 Parsoid: Defaultsort (template-generated)
16695 {{{{echo|DEFAULTSORT}}:Foo}}
16697 <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"}]]}'/>
16701 ### Inter-language links
16704 Interlanguage links
16712 es:Alimento fr:Nourriture zh:食品
16714 <link rel="mw:PageProp/Language" href="http://es.wikipedia.org/wiki/Alimento"/>
16715 <link rel="mw:PageProp/Language" href="http://fr.wikipedia.org/wiki/Nourriture"/>
16716 <link rel="mw:PageProp/Language" href="http://zh.wikipedia.org/wiki/食品"/>
16720 Duplicate interlanguage links (T26502)
16731 <link rel="mw:PageProp/Language" href="http://es.wikipedia.org/wiki/1"/>
16732 <link rel="mw:PageProp/Language" href="http://es.wikipedia.org/wiki/2"/>
16733 <link rel="mw:PageProp/Language" href="http://fr.wikipedia.org/wiki/1"/>
16734 <link rel="mw:PageProp/Language" href="http://fr.wikipedia.org/wiki/2"/>
16741 Basic section headings
16748 ===Smaller headline===
16751 <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>
16754 <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>
16757 <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>
16763 Section headings with TOC
16766 ===Subheadline 1===
16767 =====Skipping a level=====
16768 ======Skipping a level======
16772 ===Another headline===
16774 <div id="toc" class="toc"><input type="checkbox" role="button" id="toctogglecheckbox" class="toctogglecheckbox" style="display:none"/><div class="toctitle" lang="en" dir="ltr"><h2>Contents</h2><span class="toctogglespan"><label class="toctogglelabel" for="toctogglecheckbox"></label></span></div>
16776 <li class="toclevel-1 tocsection-1"><a href="#Headline_1"><span class="tocnumber">1</span> <span class="toctext">Headline 1</span></a>
16778 <li class="toclevel-2 tocsection-2"><a href="#Subheadline_1"><span class="tocnumber">1.1</span> <span class="toctext">Subheadline 1</span></a>
16780 <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>
16782 <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>
16789 <li class="toclevel-1 tocsection-5"><a href="#Headline_2"><span class="tocnumber">2</span> <span class="toctext">Headline 2</span></a>
16791 <li class="toclevel-2 tocsection-6"><a href="#Another_headline"><span class="tocnumber">2.1</span> <span class="toctext">Another headline</span></a></li>
16797 <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>
16798 <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>
16799 <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>
16800 <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>
16801 <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>
16804 <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>
16809 TOC anchors don't collide
16817 <div id="toc" class="toc"><input type="checkbox" role="button" id="toctogglecheckbox" class="toctogglecheckbox" style="display:none"/><div class="toctitle" lang="en" dir="ltr"><h2>Contents</h2><span class="toctogglespan"><label class="toctogglelabel" for="toctogglecheckbox"></label></span></div>
16819 <li class="toclevel-1 tocsection-1"><a href="#Headline_2"><span class="tocnumber">1</span> <span class="toctext">Headline 2</span></a></li>
16820 <li class="toclevel-1 tocsection-2"><a href="#Headline"><span class="tocnumber">2</span> <span class="toctext">Headline</span></a></li>
16821 <li class="toclevel-1 tocsection-3"><a href="#Headline_2_2"><span class="tocnumber">3</span> <span class="toctext">Headline 2</span></a></li>
16822 <li class="toclevel-1 tocsection-4"><a href="#Headline_3"><span class="tocnumber">4</span> <span class="toctext">Headline</span></a></li>
16826 <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>
16827 <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>
16828 <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>
16829 <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>
16833 # perl -e 'print "="x$_," Level $_ heading","="x$_,"\n" for 1..10'
16834 # Parsoid html2wt direction adds <nowiki> for level 7 and up.
16836 Handling of sections up to level 6 and beyond
16841 ==Level 2 Heading==
16842 ===Level 3 Heading===
16843 ====Level 4 Heading====
16844 =====Level 5 Heading=====
16845 ======Level 6 Heading======
16846 =======Level 7 Heading=======
16847 ========Level 8 Heading========
16848 =========Level 9 Heading=========
16849 ==========Level 10 Heading==========
16851 <div id="toc" class="toc"><input type="checkbox" role="button" id="toctogglecheckbox" class="toctogglecheckbox" style="display:none"/><div class="toctitle" lang="en" dir="ltr"><h2>Contents</h2><span class="toctogglespan"><label class="toctogglelabel" for="toctogglecheckbox"></label></span></div>
16853 <li class="toclevel-1 tocsection-1"><a href="#Level_1_Heading"><span class="tocnumber">1</span> <span class="toctext">Level 1 Heading</span></a>
16855 <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>
16857 <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>
16859 <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>
16861 <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>
16863 <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>
16864 <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>
16865 <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>
16866 <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>
16867 <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>
16881 <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>
16882 <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>
16883 <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>
16884 <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>
16885 <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>
16886 <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>
16887 <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>
16888 <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>
16889 <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>
16890 <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>
16893 <h1 id="Level_1_Heading" data-parsoid='{}'>Level 1 Heading</h1>
16894 <h2 id="Level_2_Heading" data-parsoid='{}'>Level 2 Heading</h2>
16895 <h3 id="Level_3_Heading" data-parsoid='{}'>Level 3 Heading</h3>
16896 <h4 id="Level_4_Heading" data-parsoid='{}'>Level 4 Heading</h4>
16897 <h5 id="Level_5_Heading" data-parsoid='{}'>Level 5 Heading</h5>
16898 <h6 id="Level_6_Heading" data-parsoid='{}'>Level 6 Heading</h6>
16899 <h6 id="=Level_7_Heading=" data-parsoid='{}'><span id=".3DLevel_7_Heading.3D" typeof="mw:FallbackId"></span>=Level 7 Heading=</h6>
16900 <h6 id="==Level_8_Heading==" data-parsoid='{}'><span id=".3D.3DLevel_8_Heading.3D.3D" typeof="mw:FallbackId"></span>==Level 8 Heading==</h6>
16901 <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>
16902 <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>
16906 TOC regression (T11764)
16910 ====title 1.1.1====
16915 <div id="toc" class="toc"><input type="checkbox" role="button" id="toctogglecheckbox" class="toctogglecheckbox" style="display:none"/><div class="toctitle" lang="en" dir="ltr"><h2>Contents</h2><span class="toctogglespan"><label class="toctogglelabel" for="toctogglecheckbox"></label></span></div>
16917 <li class="toclevel-1 tocsection-1"><a href="#title_1"><span class="tocnumber">1</span> <span class="toctext">title 1</span></a>
16919 <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>
16921 <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>
16924 <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>
16927 <li class="toclevel-1 tocsection-5"><a href="#title_2"><span class="tocnumber">2</span> <span class="toctext">title 2</span></a>
16929 <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>
16935 <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>
16936 <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>
16937 <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>
16938 <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>
16939 <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>
16940 <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>
16945 TOC for heading containing <span id="..."></span> (T96153)
16948 ==<span id="old-anchor"></span>New title==
16950 <div id="toc" class="toc"><input type="checkbox" role="button" id="toctogglecheckbox" class="toctogglecheckbox" style="display:none"/><div class="toctitle" lang="en" dir="ltr"><h2>Contents</h2><span class="toctogglespan"><label class="toctogglelabel" for="toctogglecheckbox"></label></span></div>
16952 <li class="toclevel-1 tocsection-1"><a href="#New_title"><span class="tocnumber">1</span> <span class="toctext">New title</span></a></li>
16956 <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>
16961 TOC with wgMaxTocLevel=3 (T8204)
16967 ====title 1.1.1====
16972 <div id="toc" class="toc"><input type="checkbox" role="button" id="toctogglecheckbox" class="toctogglecheckbox" style="display:none"/><div class="toctitle" lang="en" dir="ltr"><h2>Contents</h2><span class="toctogglespan"><label class="toctogglelabel" for="toctogglecheckbox"></label></span></div>
16974 <li class="toclevel-1 tocsection-1"><a href="#title_1"><span class="tocnumber">1</span> <span class="toctext">title 1</span></a>
16976 <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>
16977 <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>
16980 <li class="toclevel-1 tocsection-5"><a href="#title_2"><span class="tocnumber">2</span> <span class="toctext">title 2</span></a>
16982 <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>
16988 <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>
16989 <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>
16990 <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>
16991 <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>
16992 <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>
16993 <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>
16998 TOC with wgMaxTocLevel=3 and two level four headings (T8204)
17004 ====Section 1.1.1====
17005 ====Section 1.1.1.1====
17008 <div id="toc" class="toc"><input type="checkbox" role="button" id="toctogglecheckbox" class="toctogglecheckbox" style="display:none"/><div class="toctitle" lang="en" dir="ltr"><h2>Contents</h2><span class="toctogglespan"><label class="toctogglelabel" for="toctogglecheckbox"></label></span></div>
17010 <li class="toclevel-1 tocsection-1"><a href="#Section_1"><span class="tocnumber">1</span> <span class="toctext">Section 1</span></a>
17012 <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>
17015 <li class="toclevel-1 tocsection-5"><a href="#Section_2"><span class="tocnumber">2</span> <span class="toctext">Section 2</span></a></li>
17019 <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>
17020 <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>
17021 <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>
17022 <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>
17023 <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>
17029 Resolving duplicate section names
17034 <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>
17035 <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>
17040 Resolving duplicate section names with differing case (T12721)
17045 <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>
17046 <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>
17058 Template with sections, __NOTOC__
17065 <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>
17066 <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>
17067 <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>
17068 <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>
17073 __NOEDITSECTION__ keyword
17079 <h2><span class="mw-headline" id="Section_1">Section 1</span></h2>
17080 <h2><span class="mw-headline" id="Section_2">Section 2</span></h2>
17085 Link inside a section heading
17087 ==Section with a [[Main Page|link]] in it==
17089 <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>
17094 TOC regression (T14077)
17101 <div id="toc" class="toc"><input type="checkbox" role="button" id="toctogglecheckbox" class="toctogglecheckbox" style="display:none"/><div class="toctitle" lang="en" dir="ltr"><h2>Contents</h2><span class="toctogglespan"><label class="toctogglelabel" for="toctogglecheckbox"></label></span></div>
17103 <li class="toclevel-1 tocsection-1"><a href="#title_1"><span class="tocnumber">1</span> <span class="toctext">title 1</span></a>
17105 <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>
17108 <li class="toclevel-1 tocsection-3"><a href="#title_2"><span class="tocnumber">2</span> <span class="toctext">title 2</span></a></li>
17112 <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>
17113 <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>
17114 <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>
17119 T3219 URL next to image (good)
17121 http://example.com [[File:Foobar.jpg]]
17123 <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>
17126 <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>
17129 # Parsoid doesn't wt2wt this cleanly because it adds <nowiki>s.
17131 Short headings with trailing space should match behavior of Parser::doHeadings (T21910)
17133 parsoid=wt2html,html2html
17136 The line above must have a trailing space!
17139 But just in case it doesn't...
17141 <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>
17142 <p>The line above must have a trailing space!
17144 <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>
17145 <p>But just in case it doesn't...
17148 <h1 id="="><span id=".3D" typeof="mw:FallbackId"></span>=</h1>
17149 <p>The line above must have a trailing space!</p>
17150 <h1 id="=_2"><span id=".3D_2" typeof="mw:FallbackId"></span>=</h1> <!--
17152 <p>But just in case it doesn't...</p>
17156 Header with special characters (T27462)
17158 The tooltips shall not show entities to the user (ie. be double escaped)
17175 <p>The tooltips shall not show entities to the user (ie. be double escaped)
17177 <div id="toc" class="toc"><input type="checkbox" role="button" id="toctogglecheckbox" class="toctogglecheckbox" style="display:none"/><div class="toctitle" lang="en" dir="ltr"><h2>Contents</h2><span class="toctogglespan"><label class="toctogglelabel" for="toctogglecheckbox"></label></span></div>
17179 <li class="toclevel-1 tocsection-1"><a href="#text_.3E_text"><span class="tocnumber">1</span> <span class="toctext">text > text</span></a></li>
17180 <li class="toclevel-1 tocsection-2"><a href="#text_.3C_text"><span class="tocnumber">2</span> <span class="toctext">text < text</span></a></li>
17181 <li class="toclevel-1 tocsection-3"><a href="#text_.26_text"><span class="tocnumber">3</span> <span class="toctext">text & text</span></a></li>
17182 <li class="toclevel-1 tocsection-4"><a href="#text_.27_text"><span class="tocnumber">4</span> <span class="toctext">text ' text</span></a></li>
17183 <li class="toclevel-1 tocsection-5"><a href="#text_.22_text"><span class="tocnumber">5</span> <span class="toctext">text " text</span></a></li>
17187 <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>
17190 <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>
17193 <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>
17196 <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>
17199 <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>
17203 <p>The tooltips shall not show entities to the user (ie. be double escaped)</p>
17205 <h2 id="text_>_text"><span id="text_.3E_text" typeof="mw:FallbackId"></span>text > text</h2>
17208 <h2 id="text_<_text"><span id="text_.3C_text" typeof="mw:FallbackId"></span>text < text</h2>
17211 <h2 id="text_&_text"><span id="text_.26_text" typeof="mw:FallbackId"></span>text & text</h2>
17214 <h2 id="text_'_text"><span id="text_.27_text" typeof="mw:FallbackId"></span>text ' text</h2>
17217 <h2 id='text_"_text'><span id="text_.22_text" typeof="mw:FallbackId"></span>text " text</h2>
17222 Header with space, plus and underscore as entity
17224 Id should not contain + for spaces
17226 ==Space between Text==
17229 ==Space-Entity between Text==
17232 ==Plus+between+Text==
17235 ==Plus-Entity+between+Text==
17238 ==Underscore_between_Text==
17241 ==Underscore-Entity_between_Text==
17244 [[#Space between Text]]
17245 [[#Space-Entity between Text]]
17246 [[#Plus+between+Text]]
17247 [[#Plus-Entity+between+Text]]
17248 [[#Underscore_between_Text]]
17249 [[#Underscore-Entity_between_Text]]
17251 <p>Id should not contain + for spaces
17253 <div id="toc" class="toc"><input type="checkbox" role="button" id="toctogglecheckbox" class="toctogglecheckbox" style="display:none"/><div class="toctitle" lang="en" dir="ltr"><h2>Contents</h2><span class="toctogglespan"><label class="toctogglelabel" for="toctogglecheckbox"></label></span></div>
17255 <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>
17256 <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>
17257 <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>
17258 <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>
17259 <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>
17260 <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>
17264 <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>
17267 <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>
17270 <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>
17273 <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>
17276 <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>
17279 <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>
17281 </p><p><a href="#Space_between_Text">#Space between Text</a>
17282 <a href="#Space-Entity_between_Text">#Space-Entity between Text</a>
17283 <a href="#Plus.2Bbetween.2BText">#Plus+between+Text</a>
17284 <a href="#Plus-Entity.2Bbetween.2BText">#Plus-Entity+between+Text</a>
17285 <a href="#Underscore_between_Text">#Underscore_between_Text</a>
17286 <a href="#Underscore-Entity_between_Text">#Underscore-Entity_between_Text</a>
17289 <p>Id should not contain + for spaces</p>
17291 <h2 id="Space_between_Text">Space between Text</h2>
17294 <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>
17297 <h2 id="Plus+between+Text"><span id="Plus.2Bbetween.2BText" typeof="mw:FallbackId"></span>Plus+between+Text</h2>
17300 <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>
17303 <h2 id="Underscore_between_Text">Underscore_between_Text</h2>
17306 <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>
17309 <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>
17310 <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>
17311 <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>
17312 <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>
17313 <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>
17314 <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>
17317 # Parsoid html2wt disabled because it adds padding spaces around =
17319 Headers with excess '=' characters
17320 (Are similar tests necessary beyond the 1st level?)
17322 parsoid=wt2html,wt2wt,html2html
17326 =''italic'' heading==
17327 ==''italic'' heading=
17329 <div id="toc" class="toc"><input type="checkbox" role="button" id="toctogglecheckbox" class="toctogglecheckbox" style="display:none"/><div class="toctitle" lang="en" dir="ltr"><h2>Contents</h2><span class="toctogglespan"><label class="toctogglelabel" for="toctogglecheckbox"></label></span></div>
17331 <li class="toclevel-1 tocsection-1"><a href="#foo.3D"><span class="tocnumber">1</span> <span class="toctext">foo=</span></a></li>
17332 <li class="toclevel-1 tocsection-2"><a href="#.3Dfoo"><span class="tocnumber">2</span> <span class="toctext">=foo</span></a></li>
17333 <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>
17334 <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>
17338 <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>
17339 <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>
17340 <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>
17341 <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>
17344 <h1 id="foo="><span id="foo.3D" typeof="mw:FallbackId"></span>foo=</h1>
17345 <h1 id="=foo"><span id=".3Dfoo" typeof="mw:FallbackId"></span>=foo</h1>
17346 <h1 id="italic_heading="><span id="italic_heading.3D" typeof="mw:FallbackId"></span><i>italic</i> heading=</h1>
17347 <h1 id="=italic_heading"><span id=".3Ditalic_heading" typeof="mw:FallbackId"></span>=<i>italic</i> heading</h1>
17351 HTML headers vs TOC (T25393)
17352 (__NOEDITSECTION__ for clearer output, doesn't matter here)
17364 <div id="toc" class="toc"><input type="checkbox" role="button" id="toctogglecheckbox" class="toctogglecheckbox" style="display:none"/><div class="toctitle" lang="en" dir="ltr"><h2>Contents</h2><span class="toctogglespan"><label class="toctogglelabel" for="toctogglecheckbox"></label></span></div>
17366 <li class="toclevel-1"><a href="#Header_1"><span class="tocnumber">1</span> <span class="toctext">Header 1</span></a>
17368 <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>
17369 <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>
17372 <li class="toclevel-1"><a href="#Header_2"><span class="tocnumber">2</span> <span class="toctext">Header 2</span></a>
17374 <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>
17375 <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>
17381 <h1><span class="mw-headline" id="Header_1">Header 1</span></h1>
17382 <h2><span class="mw-headline" id="Header_1.1">Header 1.1</span></h2>
17383 <h2><span class="mw-headline" id="Header_1.2">Header 1.2</span></h2>
17384 <h1><span class="mw-headline" id="Header_2">Header 2
17386 <h2><span class="mw-headline" id="Header_2.1">Header 2.1</span></h2>
17387 <h2><span class="mw-headline" id="Header_2.2">Header 2.2</span></h2>
17390 <h1 id="Header_1" data-parsoid='{"stx":"html"}'>Header 1</h1>
17391 <h2 id="Header_1.1" data-parsoid='{}'>Header 1.1</h2>
17392 <h2 id="Header_1.2" data-parsoid='{}'>Header 1.2</h2>
17394 <h1 id="Header_2" data-parsoid='{"stx":"html"}'>Header 2
17396 <h2 id="Header_2.1" data-parsoid='{}'>Header 2.1</h2>
17397 <h2 id="Header_2.2" data-parsoid='{}'>Header 2.2</h2>
17398 <meta property="mw:PageProp/noeditsection"/>
17402 Single-line or multiline-comments can follow headings
17404 parsoid=wt2html,wt2wt
17412 <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>
17413 <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>
17414 <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>
17417 <h2 id="foo">foo</h2><!---->
17418 <h2 id="bar">bar</h2><!--c1-->
17419 <h2 id="baz">baz</h2><!--
17425 T3219 URL next to image (broken)
17427 http://example.com[[File:Foobar.jpg]]
17429 <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>
17432 <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>
17436 T3186 news: in the middle of text
17438 http://en.wikinews.org/wiki/Wikinews:Workplace
17440 <p><a rel="nofollow" class="external free" href="http://en.wikinews.org/wiki/Wikinews:Workplace">http://en.wikinews.org/wiki/Wikinews:Workplace</a>
17446 Namespaced link must have a title
17455 Namespaced link must have a title (bad fragment version)
17457 [[Project:#fragment]]
17459 <p>[[Project:#fragment]]
17465 ### HTML tags and HTML attributes
17469 div with no attributes
17471 <div>HTML rocks</div>
17473 <div>HTML rocks</div>
17478 div with double-quoted attribute
17480 <div id="rock">HTML rocks</div>
17482 <div id="rock">HTML rocks</div>
17487 div with single-quoted attribute
17489 <div id='rock'>HTML rocks</div>
17491 <div id="rock">HTML rocks</div>
17496 div with unquoted attribute
17498 <div id=rock>HTML rocks</div>
17500 <div id="rock">HTML rocks</div>
17505 div with illegal double attributes
17507 <div id="a" id="b">HTML rocks</div>
17509 <div id="b">HTML rocks</div>
17514 div with empty attribute value, space before equals
17516 parsoid=wt2html,html2html
17518 <div class =>HTML rocks</div>
17520 <div class="">HTML rocks</div>
17523 <div class="" data-parsoid='{"stx":"html"}'>HTML rocks</div>
17527 div with multiple empty attribute values
17529 wgFragmentMode=[ 'html5', 'legacy' ]
17531 parsoid=wt2html,html2html
17533 <div id= title=>HTML rocks</div>
17535 <div id="title=">HTML rocks</div>
17538 <div id="title=" data-parsoid='{"stx":"html"}'>HTML rocks</div>
17541 # FIXME Parsoid doesn't actually match PHP here.
17542 # Probably we should use the synthetic <foo /> or <indicator>
17543 # extensions for this test, which are enabled when running parser tests.
17545 Extension tag in attribute value
17547 <span title="<translate>123</translate>">ok</span>
17548 !! html/php+disabled
17549 <p><span title="<translate>123</translate>">ok</span>
17552 <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>
17556 table with multiple empty attribute values
17558 parsoid=wt2html,html2html
17564 <table title="id=">
17570 <table title="id=">
17571 <tbody><tr><td>hi</td></tr>
17576 div with braces in attribute value
17578 <div title="{}">Foo</div>
17580 <div title="{}">Foo</div>
17583 <div title="{}">Foo</div>
17587 div with empty attribute value, no space before equals
17589 parsoid=wt2html,html2html
17591 <div class=>HTML rocks</div>
17593 <div class="">HTML rocks</div>
17596 <div class="">HTML rocks</div>
17600 HTML multiple attributes correction
17602 <p class="error" class="awesome">Awesome!</p>
17604 <p class="awesome">Awesome!</p>
17609 Table multiple attributes correction
17612 !+ class="error" class="awesome"|status
17617 <th class="awesome">status
17625 <DIV ID="x">HTML ROCKS</DIV>
17627 <div id="x">HTML ROCKS</div>
17632 Non-ASCII pseudo-tags are rendered as text
17641 Pseudo-tag with URL 'name' renders as url link
17643 <http://example.com/>
17645 <p><<a rel="nofollow" class="external free" href="http://example.com/">http://example.com/</a>>
17650 text with amp in the middle of nowhere
17654 <p>Remember AT&T?
17659 text with character entity: eacute
17661 I always thought é was a cute letter.
17663 <p>I always thought é was a cute letter.
17668 text with entity-escaped character entity-like string: eacute
17670 I always thought &eacute; was a cute letter.
17672 <p>I always thought &eacute; was a cute letter.
17677 text with undefined character entity: xacute
17679 I always thought &xacute; was a cute letter.
17681 <p>I always thought &xacute; was a cute letter.
17688 <data value="5">five</data>
17689 <time datetime="2000-01-01T00:00Z">The new millenium started</time>
17690 <mark>This highlighted text</mark>
17692 <p><data value="5">five</data>
17693 <time datetime="2000-01-01T00:00Z">The new millenium started</time>
17694 <mark>This highlighted text</mark>
17699 HTML tag with leading space is parsed as text
17703 <p>< div>foo< /div>
17707 ## Don't expect Parsoid and PHP to match, since PHP isn't exactly following
17708 ## the HTML5 parsing spec.
17710 Element with broken attribute syntax
17714 <div style=" style="123">hi</div>
17717 <div style="123">hi</div>
17721 <div style=" style=" data-parsoid='{"stx":"html","a":{"123\"":null},"sa":{"123\"":""}}'>hi</div>
17722 <div data-parsoid='{"stx":"html","a":{"=":null},"sa":{"=":""}}'>ho</div>
17726 ### Nesting tests (see T43545, T52604, T53081)
17729 # This test case is fixed in Parsoid by domino 1.0.12. (T52604)
17730 # Note that html2wt is considerably more difficult if we use <b> in
17731 # the test case, instead of <small>
17733 Ensure that HTML adoption agency algorithm is properly implemented.
17735 <small>X<small>Y</small>Z</small>
17737 <p><small>X<small>Y</small>Z</small>
17741 # This was T43545 in the PHP parser.
17745 <kbd>X<kbd>Y</kbd>Z</kbd>
17747 <p><kbd>X<kbd>Y</kbd>Z</kbd>
17751 # The following cases were T53081 in the PHP parser.
17752 # Note that there are some other nestable tags (b, i, etc) which are
17753 # not covered; see T53081 for discussion.
17758 <em>X<em>Y</em>Z</em>
17760 <p><em>X<em>Y</em>Z</em>
17765 Nesting of <strong>
17767 <strong>X<strong>Y</strong>Z</strong>
17769 <p><strong>X<strong>Y</strong>Z</strong>
17778 <p><q>X<q>Y</q>Z</q>
17785 <ruby>X<ruby>Y</ruby>Z</ruby>
17787 <p><ruby>X<ruby>Y</ruby>Z</ruby>
17794 <bdo>X<bdo>Y</bdo>Z</bdo>
17796 <p><bdo>X<bdo>Y</bdo>Z</bdo>
17808 [[Media:Foobar.jpg]]
17809 [[Media:Video.ogv]]
17810 [[:Media:Video.ogv]]
17812 <p><a href="http://example.com/images/3/3a/Foobar.jpg" class="internal" title="Foobar.jpg">Media:Foobar.jpg</a>
17813 <a href="http://example.com/images/0/00/Video.ogv" class="internal" title="Video.ogv">Media:Video.ogv</a>
17814 <a href="http://example.com/images/0/00/Video.ogv" class="internal" title="Video.ogv">Media:Video.ogv</a>
17817 <p><a rel="mw:MediaLink" href="//example.com/images/3/3a/Foobar.jpg" resource="./Media:Foobar.jpg" title="Foobar.jpg">Media:Foobar.jpg</a>
17818 <a rel="mw:MediaLink" href="//example.com/images/0/00/Video.ogv" resource="./Media:Video.ogv" title="Video.ogv">Media:Video.ogv</a>
17819 <a rel="mw:MediaLink" href="//example.com/images/0/00/Video.ogv" resource="./Media:Video.ogv" title="Video.ogv" data-parsoid='{"a":{"resource":"./Media:Video.ogv"},"sa":{"resource":":Media:Video.ogv"}}'>Media:Video.ogv</a></p>
17823 Media link with text
17825 [[Media:Foobar.jpg|A neat file to look at]]
17827 <p><a href="http://example.com/images/3/3a/Foobar.jpg" class="internal" title="Foobar.jpg">A neat file to look at</a>
17830 <p><a rel="mw:MediaLink" href="//example.com/images/3/3a/Foobar.jpg" resource="./Media:Foobar.jpg" title="Foobar.jpg">A neat file to look at</a></p>
17834 Localized media link
17838 [[Miðill:Foobar.jpg]]
17840 [[Miðill:Foobar.jpg|Icelandic]]
17842 <p><a href="http://example.com/images/3/3a/Foobar.jpg" class="internal" title="Foobar.jpg">Miðill:Foobar.jpg</a>
17843 </p><p><a href="http://example.com/images/3/3a/Foobar.jpg" class="internal" title="Foobar.jpg">Icelandic</a>
17846 <p><a rel="mw:MediaLink" href="//example.com/images/3/3a/Foobar.jpg" resource="./Miðill:Foobar.jpg" title="Foobar.jpg">Miðill:Foobar.jpg</a></p>
17847 <p><a rel="mw:MediaLink" href="//example.com/images/3/3a/Foobar.jpg" resource="./Miðill:Foobar.jpg" title="Foobar.jpg">Icelandic</a></p>
17850 # FIXME: this is still bad HTML tag nesting
17851 # FIXME: doBlockLevels won't wrap this in a paragraph because it contains a div
17852 # Parsoid & Remex fix the p-wrapping since they operate on the DOM.
17854 Media link with nasty text
17856 parsoid=wt2html,html2html
17858 [[Media:Foobar.jpg|Safe Link<div style=display:none>" onmouseover="alert(document.cookie)" onfoo="</div>]]
17860 <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>
17863 <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>
17865 <p><a rel="mw:MediaLink" href="//example.com/images/3/3a/Foobar.jpg" resource="./Media:Foobar.jpg" title="Foobar.jpg">Safe Link</a></p><a rel="mw:MediaLink" href="//example.com/images/3/3a/Foobar.jpg" resource="./Media:Foobar.jpg" title="Foobar.jpg"><div style="display:none" data-parsoid='{"stx":"html"}'>" onmouseover="alert(document.cookie)" onfoo="</div></a>
17869 Media link from missing resource (parsoid-only)
17873 <a rel="mw:MediaLink" href="http://example.com/images/3/3a/Foobar.jpg">Bat!</a>
17875 [[Media:Foobar.jpg|Bat!]]
17879 Media link from missing resource, localized (parsoid-only)
17884 <a rel="mw:MediaLink" href="http://example.com/images/3/3a/Foobar.jpg">Bat!</a>
17886 [[Miðill:Foobar.jpg|Bat!]]
17889 # This is a sanity test to ensure we don't crash or choke when given
17890 # old cached 1.7.0 HTML for media links; we don't require that the
17891 # result be "valid" because wt2wt was completely broken in 1.7.0
17893 Media link from old 1.7.0 DOM spec (crash test, parsoid-only) T198511
17897 <p>This is what Parsoid would emit (and we still handle this HTML fine):</p>
17898 <p><a rel="mw:MediaLink" href="//example.com/images/3/3a/Foobar.jpg" title="Foobar.jpg">A neat file to look at</a></p>
17899 <p>But VisualEditor would mangle the rel attribute, and give us back this:</p>
17900 <p><a rel="mw:ExtLink" href="//example.com/images/3/3a/Foobar.jpg" title="Foobar.jpg">A neat file to look at</a></p>
17901 <p>But at least we don't crash when trying to handle the mangled HTML!</p>
17903 This is what Parsoid would emit (and we still handle this HTML fine):
17905 [[Media:Foobar.jpg|A neat file to look at]]
17907 But VisualEditor would mangle the rel attribute, and give us back this:
17909 [//example.com/images/3/3a/Foobar.jpg A neat file to look at]
17911 But at least we don't crash when trying to handle the mangled HTML!
17915 Media link to nonexistent file (T3702)
17917 [[Media:No such.jpg]]
17918 [[Media:No_such file.jpg]]
17920 <p><a href="/index.php?title=Special:Upload&wpDestFile=No_such.jpg" class="new" title="No such.jpg">Media:No such.jpg</a>
17921 <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>
17924 <p><a rel="mw:MediaLink" href="./Special:FilePath/No_such.jpg" resource="./Media:No_such.jpg" title="No such.jpg" typeof="mw:Error" data-mw='{"errors":[{"key":"apierror-filedoesnotexist","message":"This image does not exist."}]}' data-parsoid='{"a":{"resource":"./Media:No_such.jpg"},"sa":{"resource":"Media:No such.jpg"}}'>Media:No such.jpg</a>
17925 <a rel="mw:MediaLink" href="./Special:FilePath/No_such_file.jpg" resource="./Media:No_such_file.jpg" title="No such file.jpg" typeof="mw:Error" data-mw='{"errors":[{"key":"apierror-filedoesnotexist","message":"This image does not exist."}]}' data-parsoid='{"a":{"resource":"./Media:No_such_file.jpg"},"sa":{"resource":"Media:No_such file.jpg"}}'>Media:No_such file.jpg</a></p>
17929 Image link to nonexistent file (T3850 - good)
17931 [[File:No_such.jpg]]
17933 <p><a href="/index.php?title=Special:Upload&wpDestFile=No_such.jpg" class="new" title="File:No such.jpg">File:No such.jpg</a>
17936 <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>
17940 :Image link to nonexistent file (T3850 - bad)
17942 [[:Image:No such.jpg]]
17944 <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>
17947 <p><a rel="mw:WikiLink" href="./File:No_such.jpg" title="File:No such.jpg">Image:No such.jpg</a></p>
17951 Character reference normalization in link text (T3938)
17953 [[Main Page|this&that]]
17955 <p><a href="/wiki/Main_Page" title="Main Page">this&that</a>
17962 Test for unicode normalization
17964 The page's name is U+05d0 U+05b7, with non-canonical form U+FB2E
17968 (T21451) Links should refer to the normalized form.
17976 <p><a href="/wiki/%D7%90%D6%B7" title="אַ">אַ</a>
17977 <a href="/wiki/%D7%90%D6%B7" title="אַ">אַ</a>
17978 <a href="/wiki/%D7%90%D6%B7" title="אַ">אַ</a>
17979 <a href="/wiki/%D7%90%D6%B7" title="אַ">אַ</a>
17980 <a href="/wiki/%D7%90%D6%B7" title="אַ">אַ</a>
17985 Empty attribute crash test (T4067)
17987 <font color="">foo</font>
17989 <p><font color="">foo</font>
17994 Empty attribute crash test single-quotes (T4067)
17996 <font color=''>foo</font>
17998 <p><font color="">foo</font>
18003 Attribute test: equals, then nothing
18005 parsoid=wt2html,html2html
18007 <font color=>foo</font>
18009 <p><font color="">foo</font>
18012 <p><font color="" data-parsoid='{"stx":"html"}'>foo</font></p>
18016 Attribute test: unquoted value
18018 parsoid=wt2html,html2html
18020 <font color=x>foo</font>
18022 <p><font color="x">foo</font>
18025 <p><font color="x" data-parsoid='{"stx":"html"}'>foo</font></p>
18029 Attribute test: unquoted but illegal value (hash)
18031 <font color=#x>foo</font>
18033 <p><font color="#x">foo</font>
18037 # Parsoid does not serialize to empty attribute syntax,
18038 # so wt2wt and html2wt cases are skipped
18040 Attribute test: no value (T54330)
18042 parsoid=wt2html,html2html
18044 <font color>foo</font>
18046 <p><font color="">foo</font>
18049 <p><font color="">foo</font></p>
18053 T4095: link with three closing brackets
18057 <p><a href="/wiki/Main_Page" title="Main Page">Main Page</a>]
18060 <p><a rel="mw:WikiLink" href="./Main_Page" title="Main Page">Main Page</a>]</p>
18064 T4095: link with pipe and three closing brackets
18066 [[Main Page|link]]]
18068 <p><a href="/wiki/Main_Page" title="Main Page">link</a>]
18071 <p><a rel="mw:WikiLink" href="./Main_Page" title="Main Page">link</a>]</p>
18075 T4095: link with pipe and three closing brackets, version 2
18077 [[Main Page|[http://example.com/]]]
18079 <p><a href="/wiki/Main_Page" title="Main Page">[http://example.com/]</a>
18082 <p><a rel="mw:WikiLink" href="./Main_Page" title="Main Page">[http://example.com/]</a></p>
18091 Template:Dangerous attribute
18093 " onmouseover="alert(document.cookie)
18097 Template:Dangerous style attribute
18099 border-size: expression(alert(document.cookie))
18105 <div style="float: right; {{{1}}}">Magic div</div>
18109 T4304: HTML attribute safety (safe template; regression T4309)
18111 <div title="{{test}}"></div>
18113 <div title="This is a test template"></div>
18116 <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>
18119 # Parsoid has enough context to handle this case
18121 T4304: HTML attribute safety (dangerous template; 2309)
18123 <div title="{{dangerous attribute}}"></div>
18125 <div title=""></div>
18128 <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>
18132 T4304: HTML attribute safety (dangerous style template; 2309)
18134 <div style="{{dangerous style attribute}}"></div>
18136 <div style="/* insecure input */"></div>
18139 <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>
18143 T4304: HTML attribute safety (safe parameter; 2309)
18145 {{div style|width: 200px}}
18147 <div style="float: right; width: 200px">Magic div</div>
18150 <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>
18154 T4304: HTML attribute safety (unsafe parameter; 2309)
18156 {{div style|width: expression(alert(document.cookie))}}
18158 <div style="/* insecure input */">Magic div</div>
18161 <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>
18164 ## Parsoid output here differs; needs investigation.
18166 T4304: HTML attribute safety (unsafe breakout parameter; 2309)
18168 {{div style|"><script>alert(document.cookie)</script>}}
18170 <div style="float: right;"><script>alert(document.cookie)</script>">Magic div</div>
18174 ## Parsoid output here differs; needs investigation.
18176 T4304: HTML attribute safety (unsafe breakout parameter 2; 2309)
18178 {{div style|" ><script>alert(document.cookie)</script>}}
18180 <div style="float: right;"><script>alert(document.cookie)</script>">Magic div</div>
18185 T4304: HTML attribute safety (link)
18187 <div title="[[Main Page]]"></div>
18189 <div title="[[Main Page]]"></div>
18192 <div title="[[Main Page]]"></div>
18196 T4304: HTML attribute safety (italics)
18198 <div title="''foobar''"></div>
18200 <div title="''foobar''"></div>
18205 T4304: HTML attribute safety (bold)
18207 <div title="'''foobar'''"></div>
18209 <div title="'''foobar'''"></div>
18214 T4304: HTML attribute safety (ISBN)
18216 <div title="ISBN 1234567890"></div>
18218 <div title="ISBN 1234567890"></div>
18223 T4304: HTML attribute safety (RFC)
18225 <div title="RFC 1234"></div>
18227 <div title="RFC 1234"></div>
18232 T4304: HTML attribute safety (PMID)
18234 <div title="PMID 1234567890"></div>
18236 <div title="PMID 1234567890"></div>
18241 T4304: HTML attribute safety (web link)
18243 <div title="http://example.com/"></div>
18245 <div title="http://example.com/"></div>
18250 T4304: HTML attribute safety (named web link)
18252 <div title="[http://example.com/ link]"></div>
18254 <div title="[http://example.com/ link]"></div>
18257 <div title="[http://example.com/ link]"></div>
18261 T5244: HTML attribute safety (extension; safe)
18263 <div style="<nowiki>background:blue</nowiki>"></div>
18265 <div style="background:blue"></div>
18268 <div style="background:blue" data-parsoid='{"stx":"html","a":{"style":"background:blue"},"sa":{"style":"<nowiki>background:blue</nowiki>"}}'></div>
18272 T5244: HTML attribute safety (extension; unsafe)
18274 <div style="<nowiki>border-left:expression(alert(document.cookie))</nowiki>"></div>
18276 <div style="/* insecure input */"></div>
18279 <div style="/* insecure input */" data-parsoid='{"stx":"html","a":{"style":"/* insecure input */"},"sa":{"style":"<nowiki>border-left:expression(alert(document.cookie))</nowiki>"}}'></div>
18282 # More MSIE fun discovered by Tom Gilder
18285 MSIE CSS safety test: spurious slash
18287 <div style="background-image:u\rl(javascript:alert('boo'))">evil</div>
18289 <div style="/* insecure input */">evil</div>
18292 <div style="/* insecure input */" data-parsoid='{"stx":"html","a":{"style":"/* insecure input */"},"sa":{"style":"background-image:u\\rl(javascript:alert('boo'))"}}'>evil</div>
18296 MSIE CSS safety test: hex code
18298 <div style="background-image:u\72l(javascript:alert('boo'))">evil</div>
18300 <div style="/* insecure input */">evil</div>
18303 <div style="/* insecure input */" data-parsoid='{"stx":"html","a":{"style":"/* insecure input */"},"sa":{"style":"background-image:u\\72l(javascript:alert('boo'))"}}'>evil</div>
18307 MSIE CSS safety test: comment in url
18309 <div style="background-image:u/**/rl(javascript:alert('boo'))">evil</div>
18311 <div style="background-image:u rl(javascript:alert('boo'))">evil</div>
18314 <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>
18318 MSIE CSS safety test: comment in expression
18320 <div style="background-image:expres/**/sion(alert('boo4'))">evil4</div>
18322 <div style="background-image:expres sion(alert('boo4'))">evil4</div>
18325 <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>
18329 CSS safety test (all browsers): vertical tab (T57332 / CVE-2013-4567)
18331 <p style="font-size: 100px; background-image:url\b(https://www.google.com/images/srpr/logo6w.png)">A</p>
18333 <p style="/* invalid control char */">A</p>
18336 <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>
18340 MSIE 6 CSS safety test: Fullwidth (T57332)
18342 <p style="font-size: 100px; color: expression((title='XSSed'),'red')">A</p>
18343 <div style="top:EXPRESSION(alert())">B</div>
18345 <p style="/* insecure input */">A</p>
18346 <div style="/* insecure input */">B</div>
18349 <p style="/* insecure input */" data-parsoid='{"stx":"html","a":{"style":"/* insecure input */"},"sa":{"style":"font-size: 100px; color: expression((title='XSSed'),'red')"}}'>A</p>
18350 <div style="/* insecure input */" data-parsoid='{"stx":"html","a":{"style":"/* insecure input */"},"sa":{"style":"top:EXPRESSION(alert())"}}'>B</div>
18354 MSIE 6 CSS safety test: IPA extensions (T57332)
18356 <div style="background-image:uʀʟ(javascript:alert())">A</div>
18357 <p style="font-size: 100px; color: expʀessɪoɴ((title='XSSed'),'red')">B</p>
18359 <div style="/* insecure input */">A</div>
18360 <p style="/* insecure input */">B</p>
18363 <div style="/* insecure input */" data-parsoid='{"stx":"html","a":{"style":"/* insecure input */"},"sa":{"style":"background-image:uʀʟ(javascript:alert())"}}'>A</div>
18364 <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>
18368 MSIE 6 CSS safety test: sup/sub script (T57332)
18370 <div style="background-image:url⁽javascript:alert())">A</div>
18371 <div style="background-image:url₍javascript:alert())">B</div>
18372 <p style="font-size: 100px; color: expressioⁿ((title='XSSed'),'red')">C</p>
18374 <div style="/* insecure input */">A</div>
18375 <div style="/* insecure input */">B</div>
18376 <p style="/* insecure input */">C</p>
18379 <div style="/* insecure input */" data-parsoid='{"stx":"html","a":{"style":"/* insecure input */"},"sa":{"style":"background-image:url⁽javascript:alert())"}}'>A</div>
18380 <div style="/* insecure input */" data-parsoid='{"stx":"html","a":{"style":"/* insecure input */"},"sa":{"style":"background-image:url₍javascript:alert())"}}'>B</div>
18381 <p style="/* insecure input */" data-parsoid='{"stx":"html","a":{"style":"/* insecure input */"},"sa":{"style":"font-size: 100px; color: expressioⁿ((title='XSSed'),'red')"}}'>C</p>
18387 parsoid=wt2html,html2html
18390 title="data:text/html,<img src=1 onerror=alert(1)>"
18391 style="-o-link:attr(title);-o-link-source:current">X</div>
18393 <div title="data:text/html,<img src=1 onerror=alert(1)>" style="/* insecure input */">X</div>
18396 <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>
18400 MSIE 6 CSS safety test: Repetition markers (T57332)
18402 <p style="font-size: 100px; color: expres〱ion((title='XSSed'),'red')">A</p>
18403 <p style="font-size: 100px; color: expresゝion((title='XSSed'),'red')">B</p>
18404 <p style="font-size: 100px; color: expresーion((title='XSSed'),'red')">C</p>
18405 <p style="font-size: 100px; color: expresヽion((title='XSSed'),'red')">D</p>
18406 <p style="font-size: 100px; color: expresﹽion((title='XSSed'),'red')">E</p>
18407 <p style="font-size: 100px; color: expresﹼion((title='XSSed'),'red')">F</p>
18408 <p style="font-size: 100px; color: expresーion((title='XSSed'),'red')">G</p>
18410 <p style="/* insecure input */">A</p>
18411 <p style="/* insecure input */">B</p>
18412 <p style="/* insecure input */">C</p>
18413 <p style="/* insecure input */">D</p>
18414 <p style="/* insecure input */">E</p>
18415 <p style="/* insecure input */">F</p>
18416 <p style="/* insecure input */">G</p>
18419 <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>
18420 <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>
18421 <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>
18422 <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>
18423 <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>
18424 <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>
18425 <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>
18429 Table attribute legitimate extension
18432 !+ style="<nowiki>color:blue</nowiki>"|status
18437 <th style="color:blue">status
18443 Table attribute safety
18446 !+ style="<nowiki>border-width:expression(0+alert(document.cookie))</nowiki>"|status
18451 <th style="/* insecure input */">status
18457 CSS line continuation 1
18459 <div style="background-image: u\ rl(test.jpg);"></div>
18461 <div style="/* insecure input */"></div>
18466 CSS line continuation 2
18468 <div style="background-image: u\ rl(test.jpg); "></div>
18470 <div style="/* invalid control char */"></div>
18481 Expansion of multi-line templates in attribute values (T8255)
18483 <div style="background: {{identity|#00FF00}}">-</div>
18485 <div style="background: #00FF00">-</div>
18490 Expansion of multi-line templates in attribute values (T8255 sanity check)
18492 <div style="background:
18495 <div style="background: #00FF00">-</div>
18498 <div style="background:
18503 Expansion of multi-line templates in attribute values (T8255 sanity check 2)
18505 <div style="background: #00FF00">-</div>
18507 <div style="background: #00FF00">-</div>
18512 Tags which are hidden from tidiers cannot pass through the Sanitizer
18514 <mw:toc><script>alert();</script></mw:toc>
18516 <p><mw:toc><script>alert();</script></mw:toc>
18521 ### Parser hooks (see tests/parser/parserTestsParserHook.php for the <tag> extension)
18525 Parser hook: empty input
18536 <pre typeof="mw:Extension/tag" data-mw='{"name":"tag","attrs":{},"body":{"extsrc":""}}' data-parsoid='{}' about="#mwt2"></pre>
18539 ## Don't expect parsoid to rt this form.
18541 Parser hook: empty input using terminated empty elements
18543 parsoid=wt2html,html2html
18554 <pre typeof="mw:Extension/tag" data-mw='{"name":"tag","attrs":{}}' data-parsoid='{}' about="#mwt2"></pre>
18558 Parser hook: empty input using terminated empty elements (space before)
18569 <pre typeof="mw:Extension/tag" data-mw='{"name":"tag","attrs":{}}' data-parsoid='{}' about="#mwt2"></pre>
18573 Parser hook: basic input
18584 <pre typeof="mw:Extension/tag" data-mw='{"name":"tag","attrs":{},"body":{"extsrc":"input"}}' data-parsoid='{}' about="#mwt2"></pre>
18587 ## Don't expect parsoid to rt this form.
18589 Parser hook: case insensitive
18591 parsoid=wt2html,html2html
18602 <pre typeof="mw:Extension/tag" data-mw='{"name":"tag","attrs":{},"body":{"extsrc":"input"}}' data-parsoid='{}' about="#mwt2"></pre>
18605 ## Don't expect parsoid to rt this form.
18607 Parser hook: case insensitive, redux
18609 parsoid=wt2html,html2html
18620 <pre typeof="mw:Extension/tag" data-mw='{"name":"tag","attrs":{},"body":{"extsrc":"input"}}' data-parsoid='{}' about="#mwt2"></pre>
18624 Parser hook: nested tags
18628 <tag><tag></tag></tag>
18640 </tag></pre><p></tag>
18643 <pre typeof="mw:Extension/tag" about="#mwt2" data-mw='{"name":"tag","attrs":{},"body":{"extsrc":"<tag>"}}'></pre><p></tag></p>
18647 Parser hook: basic arguments
18649 <tag width="200" height="100" depth="50" square=""></tag>
18662 <pre typeof="mw:Extension/tag" data-mw='{"name":"tag","attrs":{"width":"200","height":"100","depth":"50","square":""},"body":{"extsrc":""}}' data-parsoid='{}' about="#mwt2"></pre>
18665 ## Don't expect parsoid to rt this form.
18667 Parser hook: basic arguments, variations
18669 parsoid=wt2html,html2html
18671 <tag width=200 height = "100" depth = '50' square></tag>
18684 <pre typeof="mw:Extension/tag" data-mw='{"name":"tag","attrs":{"width":"200","height":"100","depth":"50","square":""},"body":{"extsrc":""}}' data-parsoid='{}' about="#mwt2"></pre>
18688 Parser hook: argument containing a forward slash (T7344)
18690 <tag filename="/tmp/bla"></tag>
18695 'filename' => '/tmp/bla',
18700 <pre typeof="mw:Extension/tag" data-mw='{"name":"tag","attrs":{"filename":"/tmp/bla"},"body":{"extsrc":""}}' data-parsoid='{}' about="#mwt2"></pre>
18703 ## Don't expect parsoid to rt this form.
18705 Parser hook: empty input using terminated empty elements (T4374)
18707 parsoid=wt2html,html2html
18719 <pre typeof="mw:Extension/tag" about="#mwt2" data-mw='{"name":"tag","attrs":{"foo":"bar"}}'></pre><p>text</p>
18722 ## </tag> should be output literally since there is no matching tag that begins it
18723 ## Don't expect parsoid to rt this form.
18725 Parser hook: basic arguments using terminated empty elements (T4374)
18729 <tag width=200 height = "100" depth = '50' square/>
18746 <pre typeof="mw:Extension/tag" data-mw='{"name":"tag","attrs":{"width":"200","height":"100","depth":"50","square":""}}' about="#mwt2"></pre><p>other stuff
18750 ## Don't expect parsoid to rt this form.
18752 Parser hook: Don't allow unclosed extension tags
18758 this is a '''test'''
18760 <p>test <tag>123
18761 </p><p>this is a <b>test</b>
18764 <p>test <tag>123</p>
18766 <p>this is a <b>test</b></p>
18770 Parser hook: horizontal rule inside extension tag that outputs <pre>
18791 ### (see tests/parser/parserTestsParserHook.php for the <statictag> extension)
18795 Parser hook: static parser hook not inside a comment
18797 <statictag>hello, world</statictag>
18799 <statictag action="flush" />
18805 <p><span typeof="mw:Extension/statictag" data-mw='{"name":"statictag","attrs":{},"body":{"extsrc":"hello, world"}}' data-parsoid='{}' about="#mwt2"></span></p>
18806 <p typeof="mw:Extension/statictag" data-mw='{"name":"statictag","attrs":{"action":"flush"}}' data-parsoid='{}' about="#mwt4">hello, world</p>
18810 Parser hook: static parser hook inside a comment
18812 <!-- <statictag>hello, world</statictag> -->
18813 <statictag action="flush" />
18818 <!-- <statictag>hello, world</statictag> -->
18819 <p typeof='mw:Extension/statictag' data-mw='{"name":"statictag","attrs":{"action":"flush"}}' data-parsoid='{}' about='#mwt2'></p>
18822 # Nested template calls; this case was broken by Parser.php rev 1.506,
18826 Template:One-parameter
18828 (My parameter is: {{{1}}})
18832 Template:Map-one-parameter
18834 {{{{{1}}}|{{{2}}}}}
18838 Nested template calls
18840 {{Map-one-parameter|One-parameter|param}}
18842 <p>(My parameter is: param)
18852 Sanitizer: Closing of open tags
18854 <s></s><table></table>
18856 <p><s></s></p><table></table>
18858 <p><s data-parsoid='{"stx":"html"}'></s></p><table data-parsoid='{"stx":"html"}'></table>
18862 Sanitizer: Closing of open but not closed tags
18871 Sanitizer: Closing of closed but not open tags
18877 <p class="mw-empty-elt">
18882 Sanitizer: Closing of closed but not open table tags
18886 Table not started</td></tr></table>
18888 <p>Table not started
18893 Sanitizer: Escaping of spaces, multibyte characters, colons & other stuff in id=""
18895 wgFragmentMode=[ 'html5', 'legacy' ]
18897 <span id="æ: v">byte</span>[[#æ: v|backlink]]
18899 <p><span id="æ:_v">byte</span><a href="#æ:_v">backlink</a>
18902 <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>
18906 Sanitizer: Escaping of spaces, multibyte characters, colons & other stuff in id="" (legacy)
18908 wgFragmentMode=[ 'legacy' ]
18910 <span id="æ: v">byte</span>[[#æ: v|backlink]]
18912 <p><span id=".C3.A6:_v">byte</span><a href="#.C3.A6:_v">backlink</a>
18916 # In HTML5, the restrictions are that id must contain at least one character,
18917 # and must not contain any space characters.
18919 Sanitizer: Validating the contents of the id attribute (T6515)
18923 <br id="" /><br id="a space" />
18928 # In HTML5, id must be unique amongst all the ids in the element's home subtree.
18930 Sanitizer: Validating id attribute uniqueness (T6515, T8301)
18934 <br id="foo" /><br id="foo" />
18936 Something need to be done. foo-2 ?
18940 Sanitizer: Validating that <meta> and <link> work, but only for Microdata
18943 <meta itemprop="hello" content="world">
18944 <meta http-equiv="refresh" content="5">
18945 <meta itemprop="hello" http-equiv="refresh" content="5">
18946 <link itemprop="hello" href="{{SERVER}}">
18947 <link rel="stylesheet" href="{{SERVER}}">
18948 <link rel="stylesheet" itemprop="hello" href="{{SERVER}}">
18952 <p> <meta itemprop="hello" content="world" />
18953 <meta http-equiv="refresh" content="5">
18954 <meta itemprop="hello" content="5" />
18955 <link itemprop="hello" href="http://example.org" />
18956 <link rel="stylesheet" href="<a rel="nofollow" class="external free" href="http://example.org">http://example.org</a>">
18957 <link itemprop="hello" href="http://example.org" />
18964 Sanitizer: Strip comments from CSS attributes
18966 parsoid=wt2html,wt2wt
18968 <span style="margin:/*negate mbox-text padding */-0.125em -0.45em; /*rainbow*/rgba(255, 0, 0, 0.3)">2013</span>
18970 <p><span style="margin: -0.125em -0.45em; rgba(255, 0, 0, 0.3)">2013</span>
18973 <p><span style="margin: -0.125em -0.45em; rgba(255, 0, 0, 0.3)">2013</span></p>
18977 Sanitizer: Avoid unnecessary percent encoded characters in interwiki links
18979 [[meatball:Soft"Security]]
18981 <p><a href="http://www.usemod.com/cgi-bin/mb.pl?Soft%22Security" class="extiw" title="meatball:Soft"Security">meatball:Soft"Security</a>
18984 <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>
18988 Sanitizer: angle brackets are invalid, even in interwiki links (T182338)
18990 [[meatball:Foo<Bar]]
18991 [[meatball:Foo>Bar]]
18992 [[meatball:Foo<bar]]
18993 [[meatball:Foo>bar]]
18995 <p>[[meatball:Foo<Bar]]
18996 [[meatball:Foo>Bar]]
18997 [[meatball:Foo<bar]]
18998 [[meatball:Foo>bar]]
19001 <p>[[meatball:Foo<Bar]]
19002 [[meatball:Foo>Bar]]
19003 [[meatball:Foo<span typeof="mw:Entity" data-parsoid='{"src":"&lt;","srcContent":"<"}'><</span>bar]]
19004 [[meatball:Foo<span typeof="mw:Entity" data-parsoid='{"src":"&gt;","srcContent":">"}'>></span>bar]]</p>
19008 Language converter: output gets cut off unexpectedly (T7757)
19012 this bit is safe: }-
19014 but if we add a conversion instance: -{zh-cn:xxx;zh-tw:yyy}-
19016 then we get cut off here: }-
19018 all additional text is vanished
19020 <p>this bit is safe: }-
19021 </p><p>but if we add a conversion instance: xxx
19022 </p><p>then we get cut off here: }-
19023 </p><p>all additional text is vanished
19026 <p>this bit is safe: }-</p>
19027 <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>
19028 <p>then we get cut off here: }-</p>
19029 <p>all additional text is vanished</p>
19033 Language converter glossary rules inside attributes (T119158)
19035 language=sr variant=sr-el
19037 -{H|foAjrjvi=>sr-el:" onload="alert(1)" data-foo="}-
19039 [[File:Foobar.jpg|alt=-{}-foAjrjvi-{}-]]
19042 </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>
19045 <p><meta typeof="mw:LanguageVariant" data-mw-variant='{"add":true,"oneway":[{"f":"foAjrjvi","l":"sr-el","t":"\" onload=\"alert(1)\" data-foo=\""}]}'/></p>
19047 <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>
19051 Self closed html pairs (T7487)
19053 <center><font id="bug" />Centered text</center>
19054 <div><font id="bug2" />In div text</div>
19056 <center><font id="bug"></font>Centered text</center>
19057 <div><font id="bug2"></font>In div text</div>
19061 Punctuation: nbsp before exclamation
19065 <p>C'est grave !
19070 Punctuation: CSS !important (T13874)
19072 <div style="width:50% !important">important</div>
19074 <div style="width:50% !important">important</div>
19079 Punctuation: CSS ! important (T13874; with space after)
19081 <div style="width:50% ! important">important</div>
19083 <div style="width:50% ! important">important</div>
19088 HTML bullet list, closed tags (T7497)
19101 <ul data-parsoid='{"stx":"html"}'>
19102 <li data-parsoid='{"stx":"html"}'>One</li>
19103 <li data-parsoid='{"stx":"html"}'>Two</li>
19109 HTML bullet list, unclosed tags (T7497)
19121 <ul data-parsoid='{"stx":"html"}'>
19122 <li data-parsoid='{"stx":"html","autoInsertedEnd":true}'>One</li>
19123 <li data-parsoid='{"stx":"html","autoInsertedEnd":true}'>Two</li>
19129 HTML ordered list, closed tags (T7497)
19142 <ol data-parsoid='{"stx":"html"}'>
19143 <li data-parsoid='{"stx":"html"}'>One</li>
19144 <li data-parsoid='{"stx":"html"}'>Two</li>
19150 HTML ordered list, unclosed tags (T7497)
19163 <ol data-parsoid='{"stx":"html"}'>
19164 <li data-parsoid='{"stx":"html","autoInsertedEnd":true}'>One</li>
19165 <li data-parsoid='{"stx":"html","autoInsertedEnd":true}'>Two</li>
19171 HTML nested bullet list, closed tags (T7497)
19194 <ul data-parsoid='{"stx":"html"}'>
19195 <li data-parsoid='{"stx":"html"}'>One</li>
19196 <li data-parsoid='{"stx":"html"}'>Two:
19197 <ul data-parsoid='{"stx":"html"}'>
19198 <li data-parsoid='{"stx":"html"}'>Sub-one</li>
19199 <li data-parsoid='{"stx":"html"}'>Sub-two</li>
19206 HTML nested bullet list, open tags (T7497)
19228 HTML nested ordered list, closed tags (T7497)
19253 HTML nested ordered list, open tags (T7497)
19290 HTML ordered list item with parameters oddity
19292 <ol><li id="fragment">One</li>
19295 <ol><li id="fragment">One</li>
19300 # parsoid doesn't explicitly mark autonumbered links, see T55505
19302 T7918: autonumbering
19304 [http://first/] [http://second] [ftp://ftp]
19308 [mailto:enclosed@mail.tld With target]
19310 [mailto:enclosed@mail.tld]
19312 mailto:inline@mail.tld
19314 <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>
19315 </p><p><a rel="nofollow" class="external free" href="ftp://inlineftp">ftp://inlineftp</a>
19316 </p><p><a rel="nofollow" class="external text" href="mailto:enclosed@mail.tld">With target</a>
19317 </p><p><a rel="nofollow" class="external autonumber" href="mailto:enclosed@mail.tld">[4]</a>
19318 </p><p><a rel="nofollow" class="external free" href="mailto:inline@mail.tld">mailto:inline@mail.tld</a>
19321 <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>
19322 <p><a rel="mw:ExtLink" class="external free" href="ftp://inlineftp">ftp://inlineftp</a></p>
19323 <p><a rel="mw:ExtLink" class="external text" href="mailto:enclosed@mail.tld">With target</a></p>
19324 <p><a rel="mw:ExtLink" class="external autonumber" href="mailto:enclosed@mail.tld"></a></p>
19325 <p><a rel="mw:ExtLink" class="external free" href="mailto:inline@mail.tld">mailto:inline@mail.tld</a></p>
19330 # Security and HTML correctness
19331 # From Nick Jenkins' fuzz testing
19335 Fuzz testing: Parser13
19349 # Note that Parsoid output differs from the PHP parser here: the PHP
19350 # parser breaks the URL for the magic word, while in Parsoid the URL
19351 # production takes precedence.
19353 Fuzz testing: Parser14
19358 <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>
19359 http://<div id="toc" class="toc"><input type="checkbox" role="button" id="toctogglecheckbox" class="toctogglecheckbox" style="display:none"/><div class="toctitle" lang="en" dir="ltr"><h2>Contents</h2><span class="toctogglespan"><label class="toctogglelabel" for="toctogglecheckbox"></label></span></div>
19361 <li class="toclevel-1 tocsection-1"><a href="#onmouseover.3D"><span class="tocnumber">1</span> <span class="toctext">onmouseover=</span></a></li>
19367 <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>
19368 http://</p><div id="toc" class="toc"><input type="checkbox" role="button" id="toctogglecheckbox" class="toctogglecheckbox" style="display:none" /><div class="toctitle" lang="en" dir="ltr"><h2>Contents</h2><span class="toctogglespan"><label class="toctogglelabel" for="toctogglecheckbox"></label></span></div>
19370 <li class="toclevel-1 tocsection-1"><a href="#onmouseover.3D"><span class="tocnumber">1</span> <span class="toctext">onmouseover=</span></a></li>
19374 <h2 id="onmouseover="><span id="onmouseover.3D" typeof="mw:FallbackId"></span>onmouseover=</h2>
19375 <p><a rel="mw:ExtLink" class="external free" href="http://__TOC__" data-parsoid='{"stx":"url"}'>http://__TOC__</a></p>
19379 Fuzz testing: Parser14-table
19381 parsoid=wt2html,html2html
19386 <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>
19387 <table style="__TOC__">
19392 <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>
19393 <table style="__TOC__">
19400 <table style="__TOC__"></table>
19403 # Known to produce bogus xml (extra </td>)
19404 # Don't add the html/php section since it generates broken HTML
19406 Fuzz testing: Parser16
19423 Fuzz testing: Parser21
19426 !irc://{{ftp://a" onmouseover="alert('hello world');"
19431 <th><a rel="nofollow" class="external free" href="irc://{{ftp://a">irc://{{ftp://a</a>" onmouseover="alert('hello world');"
19441 Fuzz testing: Parser22
19443 http://===r:::https://b
19447 <p><a rel="nofollow" class="external free" href="http://===r:::https://b">http://===r:::https://b</a>
19455 ## Remex doesn't account for fostered content.
19456 ## Known to produce bad XML for now
19458 Fuzz testing: Parser24
19465 | {{{{SSSll!!!!!!!VVVV)]]][[Special:*xxxxxxx--><noinclude>}}}} >
19466 <br style="onmouseover='alert(document.cookie);' " />
19468 MOVE YOUR MOUSE CURSOR OVER THIS TEXT
19473 <u class="|">}}}} >
19474 <br style="onmouseover='alert(document.cookie);'" />
19476 MOVE YOUR MOUSE CURSOR OVER THIS TEXT
19486 <u class="|">}}}} >
19487 <br style="onmouseover='alert(document.cookie);'" />
19489 MOVE YOUR MOUSE CURSOR OVER THIS TEXT
19490 </u><table><tbody><tr>
19494 </tbody></table><p><u class="|">
19497 <p data-parsoid='{"fostered":true,"autoInsertedEnd":true,"autoInsertedStart":true}'>
19499 <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>"}'/>}}}} >
19500 <br style="onmouseover='alert(document.cookie);' " data-parsoid='{"stx":"html","selfClose":true}'/>
19502 MOVE YOUR MOUSE CURSOR OVER THIS TEXT</u></p>
19503 <table data-parsoid='{"autoInsertedEnd":true}'><tbody><tr data-parsoid='{"autoInsertedStart":true}'><td></td></tr></tbody></table>
19506 # Note: the current result listed for this is not what the original one was,
19507 # but the original bug was JavaScript injection, which is fixed in any case.
19508 # It's not clear that the original result listed was any more correct than the
19509 # current one. Original result:
19512 # <li class="||">
19513 # }}}blah" onmouseover="alert('hello world');" align="left"<b>MOVE MOUSE CURSOR OVER HERE</b>
19515 Fuzz testing: Parser25 (T8055)
19521 }}}blah" onmouseover="alert('hello world');" align="left"'''MOVE MOUSE CURSOR OVER HERE
19523 <p><LI CLASS=blah" onmouseover="alert('hello world');" align="left"<b>MOVE MOUSE CURSOR OVER HERE</b>
19526 <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"]}'>
19527 </span><p about="#mwt1"><LI CLASS=blah" onmouseover="alert('hello world');" align="left"<b>MOVE MOUSE CURSOR OVER HERE</b></p>
19531 Fuzz testing: URL adjacent extension (with space, clean)
19533 http://example.com <nowiki>junk</nowiki>
19535 <p><a rel="nofollow" class="external free" href="http://example.com">http://example.com</a> junk
19538 <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>
19542 Fuzz testing: URL adjacent extension (no space, dirty; nowiki)
19544 http://example.com<nowiki>junk</nowiki>
19546 <p><a rel="nofollow" class="external free" href="http://example.com">http://example.com</a>junk
19549 <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>
19553 Fuzz testing: URL adjacent extension (no space, dirty; pre)
19555 http://example.com<pre>junk</pre>
19557 <a rel="nofollow" class="external free" href="http://example.com">http://example.com</a><pre>junk</pre>
19560 <p><a rel="nofollow" class="external free" href="http://example.com">http://example.com</a></p><pre>junk</pre>
19562 <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>
19566 Fuzz testing: image with bogus manual thumbnail
19568 [[Image:foobar.jpg|thumbnail= ]]
19570 <div class="thumb tright"><div class="thumbinner" style="width:182px;">Error creating thumbnail: <div class="thumbcaption"></div></div></div>
19573 <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>
19576 # Parsoid will emit the newline literally in wt2wt; see next test case.
19578 Fuzz testing: encoded newline in generated HTML replacements (T8577)
19582 <pre dir=" "></pre>
19584 <pre dir=" "></pre>
19587 <pre typeof="mw:Extension/pre" about="#mwt2" dir="
19588 " data-mw='{"name":"pre","attrs":{"dir":"\n"},"body":{"extsrc":""}}'></pre>
19592 Fuzz testing: encoded newline in generated HTML replacements, html2wt (T8577)
19596 <pre typeof="mw:Extension/pre" about="#mwt2" dir="
19597 " data-mw='{"name":"pre","attrs":{"dir":"\n"},"body":{"extsrc":""}}'></pre>
19607 Templates in extension attributes are not expanded
19609 <pre dir="{{echo|ltr}}"></pre>
19611 <pre dir="{{echo|ltr}}"></pre>
19614 <pre typeof="mw:Extension/pre" about="#mwt2" dir="{{echo|ltr}}" data-mw='{"name":"pre","attrs":{"dir":"{{echo|ltr}}"},"body":{"extsrc":""}}'></pre>
19618 Parsing optional HTML elements (T8171)
19623 <td> Some tabular data</td>
19624 <td> More tabular data ...
19625 <td> And yet som tabular data</td>
19631 <td> Some tabular data</td>
19632 <td> More tabular data ...
19633 </td><td> And yet som tabular data</td>
19640 Correct handling of <td>, <tr> (T8171)
19645 <td> Some tabular data</td>
19646 <td> More tabular data ...</td>
19647 <td> And yet som tabular data</td>
19653 <td> Some tabular data</td>
19654 <td> More tabular data ...</td>
19655 <td> And yet som tabular data</td>
19663 Parsing crashing regression (fr:JavaScript)
19667 <p></body></x>
19672 Inline wiki vs wiki block nesting
19678 <p><b>Bold paragraph</b>
19679 </p><p>New wiki paragraph
19683 # FIXME: The current php output is documented
19684 # and desired output is the parsoid target.
19686 Inline HTML vs wiki block nesting
19692 <p><b>Bold paragraph
19693 </p><p>New wiki paragraph</b>
19696 <p><b>Bold paragraph
19697 </b></p><p><b>New wiki paragraph
19700 <p><b>Bold paragraph</b>
19701 </p><p>New wiki paragraph
19705 # Original result was this:
19706 # <p><b>bold</b><b>bold<i>bolditalics</i></b>
19708 # While that might be marginally more intuitive, maybe, the six-apostrophe
19709 # construct is clearly pathological and the result stated here (which is what
19710 # the parser actually does) is about as reasonable as anything.
19712 Mixing markup for italics and bold
19715 '''bold''''''bold''bolditalics'''''
19717 <p>'<i>bold'</i><b>bold<i>bolditalics</i></b>
19725 Article for special page transclusion test
19729 Special page transclusion
19732 {{Special:Prefixindex/Xyzzyx}}
19734 <ul class="mw-prefixindex-list"><li><a href="/wiki/Xyzzyx" title="Xyzzyx">Xyzzyx</a></li>
19740 Special page transclusion twice (T7021)
19743 {{Special:Prefixindex/Xyzzyx}}
19744 {{Special:Prefixindex/Xyzzyx}}
19746 <ul class="mw-prefixindex-list"><li><a href="/wiki/Xyzzyx" title="Xyzzyx">Xyzzyx</a></li>
19748 <ul class="mw-prefixindex-list"><li><a href="/wiki/Xyzzyx" title="Xyzzyx">Xyzzyx</a></li>
19754 Transclusion of default MediaWiki message
19756 {{MediaWiki:Mainpage}}
19763 Transclusion of nonexistent MediaWiki message
19765 {{MediaWiki:Mainpagexxx}}
19767 <p><a href="/index.php?title=MediaWiki:Mainpagexxx&action=edit&redlink=1" class="new" title="MediaWiki:Mainpagexxx (page does not exist)">MediaWiki:Mainpagexxx</a>
19772 Transclusion of MediaWiki message with underscore
19774 {{MediaWiki:history_short}}
19781 Transclusion of MediaWiki message with space
19783 {{MediaWiki:history short}}
19790 Invalid header with following text
19800 Section extraction test (section 0)
19820 Section extraction test (section 1)
19842 Section extraction test (section 2)
19863 Section extraction test (section 3)
19883 Section extraction test (section 4)
19907 Section extraction test (section 5)
19927 Section extraction test (section 6)
19948 Section extraction test (section 7)
19968 Section extraction test (section 8)
19988 Section extraction test (section 9)
20009 Section extraction test (section 10)
20029 Section extraction test (nonexistent section 11)
20048 Section extraction test with bogus heading (section 1)
20053 ==bogus== not a legal section
20057 ==bogus== not a legal section
20061 Section extraction test with bogus heading (section 2)
20066 ==bogus== not a legal section
20073 Section extraction test with comment after heading (section 1)
20085 Section extraction test with comment after heading (section 2)
20097 Section extraction test with bogus <nowiki> heading (section 1)
20102 ==bogus== <nowiki>not a legal section</nowiki>
20106 ==bogus== <nowiki>not a legal section</nowiki>
20110 Section extraction test with bogus <nowiki> heading (section 2)
20115 ==bogus== <nowiki>not a legal section</nowiki>
20121 # Formerly testing for T4587, now resolved by the use of unmarked sections
20122 # instead of respecting commented sections
20124 Section extraction prefixed by comment (section 1)
20135 Section extraction prefixed by comment (section 2)
20145 # Formerly testing for T4607, now resolved by the use of unmarked sections
20146 # instead of respecting HTML-style headings
20148 Section extraction, mixed wiki and html (section 1)
20164 Section extraction, mixed wiki and html (section 2)
20180 # Formerly testing for T5342
20182 Section extraction, heading surrounded by <noinclude>
20186 <noinclude>==unmarked==</noinclude>
20192 # Test behavior of T21910
20194 Sectiion with all-equals
20199 The line above must have a trailing space
20202 But just in case it doesn't...
20206 But just in case it doesn't...
20210 Section replacement test (section 0)
20241 Section replacement test (section 1)
20270 Section replacement test (section 2)
20300 Section replacement test (section 3)
20331 Section replacement test (section 4)
20358 Section replacement test (section 5)
20389 Section replacement test (section 6)
20419 Section replacement test (section 7)
20450 Section replacement test (section 8)
20481 Section replacement test (section 9)
20510 Section replacement test (section 10)
20540 Section replacement test with initial whitespace (T15728)
20544 Preformatted initial line
20548 Preformatted initial line
20555 Section extraction, heading followed by pre with 20 spaces (T8398)
20567 Section extraction, heading followed by pre with 19 spaces (T8398 sanity check)
20580 Section extraction, <pre> around bogus header (T12309)
20597 Section replacement, <pre> around bogus header (T12309)
20618 Handling of 
 in URLs
20622 <ul><li><a rel="nofollow" class="external free" href="irc://%0Aa">irc://%0Aa</a></li></ul>
20625 <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>
20629 Handling of %0A in URLs
20633 <ul><li><a rel="nofollow" class="external free" href="irc://%0Aa">irc://%0Aa</a></li></ul>
20636 <ul><li><a rel="mw:ExtLink" class="external free" href="irc://%0Aa">irc://%0Aa</a></li></ul>
20639 # The PHP parser strips the empty tags out for giggles; parsoid doesn't.
20641 5 quotes, code coverage +1 line
20648 <p><b><i></i></b></p>
20651 # same html as previous, but wikitext adjusted to match parsoid html2wt
20652 # note that wt2html and html2html will put the <i> before the <b>
20654 5 quotes, code coverage +1 line w/ nowiki (1)
20656 parsoid=wt2wt,html2wt
20658 '''''<nowiki/>'''''
20663 <p><b><i></i></b></p>
20666 # same as previous, just swapping the <i> and <b>
20668 5 quotes, code coverage +1 line w/ nowiki (2)
20670 '''''<nowiki/>'''''
20675 <p><i><b></b></i></p>
20679 Special:Search page linking.
20683 <p><a href="/wiki/Special:Search" title="Special:Search">Special:Search</a>
20688 {{!}} is a magic word
20690 {{!}} is a magic word there and {{!}} is still a magic word here
20691 | is not a magic word here but {{!}} is still a magic word here
20693 <p>| is a magic word there and | is still a magic word here
20694 | is not a magic word here but | is still a magic word here
20697 <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
20698 | 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>
20704 title=[[Parser test]]
20718 *{{SUBJECTPAGENAME}}
20719 *{{SUBJECTPAGENAMEE}}
20722 *{{NAMESPACENUMBER}}
20727 *{{Dynamic|{{NUMBEROFUSERS}}|{{NUMBEROFPAGES}}|{{CURRENTVERSION}}|{{CONTENTLANGUAGE}}|{{DIRECTIONMARK}}|{{CURRENTTIMESTAMP}}|{{NUMBEROFARTICLES}}}}
20729 <ul><li>Parser test</li>
20730 <li>Parser_test</li>
20731 <li>Parser test</li>
20732 <li>Parser_test</li>
20733 <li>Parser test</li>
20734 <li>Parser_test</li>
20735 <li>Parser test</li>
20736 <li>Parser_test</li>
20737 <li>Parser test</li>
20738 <li>Parser_test</li>
20739 <li>Talk:Parser test</li>
20740 <li>Talk:Parser_test</li>
20741 <li>Parser test</li>
20742 <li>Parser_test</li>
20750 <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>
20753 ### Note: Above tests excludes the "{{NUMBEROFADMINS}}" magic word because it generates a MySQL error when included.
20756 Gallery with valid attributes
20758 <gallery type="123" summary="345">
20759 File:File:Foobar.jpg
20762 <ul class="gallery mw-gallery-traditional" type="123">
20763 <li class="gallerybox" style="width: 155px"><div style="width: 155px">
20764 <div class="thumb" style="height: 150px;">File:Foobar.jpg</div>
20765 <div class="gallerytext">
20771 <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"}}'>
20772 <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>
20776 ## Parsoid thinks the "centre" here is a property, not a caption.
20781 "modes": ["wt2html"],
20782 "nativeGallery": true
20790 image4 |300px| centre
20791 image5.svg| http://///////
20796 <ul class="gallery mw-gallery-traditional">
20797 <li class="gallerybox" style="width: 155px"><div style="width: 155px">
20798 <div class="thumb" style="height: 150px;">Image1.png</div>
20799 <div class="gallerytext">
20802 <li class="gallerybox" style="width: 155px"><div style="width: 155px">
20803 <div class="thumb" style="height: 150px;">Image2.gif</div>
20804 <div class="gallerytext">
20807 <li class="gallerybox" style="width: 155px"><div style="width: 155px">
20808 <div class="thumb" style="height: 150px;">Image3</div>
20809 <div class="gallerytext">
20812 <li class="gallerybox" style="width: 155px"><div style="width: 155px">
20813 <div class="thumb" style="height: 150px;">Image4</div>
20814 <div class="gallerytext">
20819 <li class="gallerybox" style="width: 155px"><div style="width: 155px">
20820 <div class="thumb" style="height: 150px;">Image5.svg</div>
20821 <div class="gallerytext">
20822 <p><a rel="nofollow" class="external free" href="http://///////">http://///////</a>
20826 <li class="gallerybox" style="width: 155px"><div style="width: 155px">
20827 <div class="thumb" style="height: 150px;">* image6</div>
20828 <div class="gallerytext">
20834 <ul class="gallery mw-gallery-traditional" typeof="mw:Extension/gallery" about="#mwt3" data-mw='{"name":"gallery","attrs":{},"body":{}}'>
20835 <li class="gallerybox" style="width: 155px;"><div class="thumb" style="width: 150px; height: 150px;"><figure-inline typeof="mw:Error mw:Image"><a href="./File: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>
20836 <li class="gallerybox" style="width: 155px;"><div class="thumb" style="width: 150px; height: 150px;"><figure-inline typeof="mw:Error mw:Image"><a href="./File: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>
20837 <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>
20838 <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>
20839 <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>
20840 <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>
20845 Gallery (with options, html)
20848 "modes": ["wt2html", "html2html"],
20849 "nativeGallery": true
20852 <gallery widths="70px" heights="40px" perrow="2" caption="Foo [[Main Page]]">
20853 File:Nonexistent.jpg|caption
20854 File:Nonexistent.jpg
20855 image:foobar.jpg|some '''caption''' [[Main Page]]
20857 image:foobar.jpg|Blabla|alt=This is a foo-bar.|blabla.
20860 <ul class="gallery mw-gallery-traditional" style="max-width: 226px;_width: 226px;">
20861 <li class='gallerycaption'>Foo <a href="/wiki/Main_Page" title="Main Page">Main Page</a></li>
20862 <li class="gallerybox" style="width: 105px"><div style="width: 105px">
20863 <div class="thumb" style="height: 70px;">Nonexistent.jpg</div>
20864 <div class="gallerytext">
20869 <li class="gallerybox" style="width: 105px"><div style="width: 105px">
20870 <div class="thumb" style="height: 70px;">Nonexistent.jpg</div>
20871 <div class="gallerytext">
20874 <li class="gallerybox" style="width: 105px"><div style="width: 105px">
20875 <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>
20876 <div class="gallerytext">
20877 <p>some <b>caption</b> <a href="/wiki/Main_Page" title="Main Page">Main Page</a>
20881 <li class="gallerybox" style="width: 105px"><div style="width: 105px">
20882 <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>
20883 <div class="gallerytext">
20886 <li class="gallerybox" style="width: 105px"><div style="width: 105px">
20887 <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>
20888 <div class="gallerytext">
20896 <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":{}}'>
20897 <li class="gallerycaption">Foo <a rel="mw:WikiLink" href="./Main_Page" title="Main Page">Main Page</a></li>
20898 <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>
20899 <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>
20900 <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>
20901 <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>
20902 <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>
20907 Gallery (with options, extsrc)
20910 "nativeGallery": false
20913 <gallery widths="70px" heights="40px" perrow="2" caption="Foo [[Main Page]]">
20914 File:Nonexistent.jpg|caption
20915 File:Nonexistent.jpg
20916 image:foobar.jpg|some '''caption''' [[Main Page]]
20918 image:foobar.jpg|Blabla|alt=This is a foo-bar.|blabla.
20921 <ul class="gallery mw-gallery-traditional" style="max-width: 226px;_width: 226px;">
20922 <li class='gallerycaption'>Foo <a href="/wiki/Main_Page" title="Main Page">Main Page</a></li>
20923 <li class="gallerybox" style="width: 105px"><div style="width: 105px">
20924 <div class="thumb" style="height: 70px;">Nonexistent.jpg</div>
20925 <div class="gallerytext">
20930 <li class="gallerybox" style="width: 105px"><div style="width: 105px">
20931 <div class="thumb" style="height: 70px;">Nonexistent.jpg</div>
20932 <div class="gallerytext">
20935 <li class="gallerybox" style="width: 105px"><div style="width: 105px">
20936 <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>
20937 <div class="gallerytext">
20938 <p>some <b>caption</b> <a href="/wiki/Main_Page" title="Main Page">Main Page</a>
20942 <li class="gallerybox" style="width: 105px"><div style="width: 105px">
20943 <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>
20944 <div class="gallerytext">
20947 <li class="gallerybox" style="width: 105px"><div style="width: 105px">
20948 <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>
20949 <div class="gallerytext">
20957 <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"}}'>
20958 <li class="gallerycaption">Foo <a rel="mw:WikiLink" href="./Main_Page" title="Main Page">Main Page</a></li>
20959 <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>
20960 <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>
20961 <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>
20962 <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>
20963 <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>
20968 Gallery (without px units)
20970 <gallery widths="70" heights="40">
20974 <ul class="gallery mw-gallery-traditional">
20975 <li class="gallerybox" style="width: 105px"><div style="width: 105px">
20976 <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>
20977 <div class="gallerytext">
20983 <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"}}'>
20984 <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>
20989 Gallery (with invalid units)
20991 <gallery widths="70em" heights="40em">
20995 <ul class="gallery mw-gallery-traditional">
20996 <li class="gallerybox" style="width: 155px"><div style="width: 155px">
20997 <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>
20998 <div class="gallerytext">
21004 <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"}}'>
21005 <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>
21010 Gallery with link that has fragment
21013 "modes": ["wt2html", "html2html"],
21014 "nativeGallery": true
21018 image:foobar.jpg|link=Main_Page
21019 image:foobar.jpg|link=Main_Page#section
21020 image:foobar.jpg|link=Main Page#section|caption
21023 <ul class="gallery mw-gallery-traditional">
21024 <li class="gallerybox" style="width: 155px"><div style="width: 155px">
21025 <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>
21026 <div class="gallerytext">
21029 <li class="gallerybox" style="width: 155px"><div style="width: 155px">
21030 <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>
21031 <div class="gallerytext">
21034 <li class="gallerybox" style="width: 155px"><div style="width: 155px">
21035 <div class="thumb" style="width: 150px;"><div style="margin:68px auto;"><a href="/wiki/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>
21036 <div class="gallerytext">
21044 <ul class="gallery mw-gallery-traditional" typeof="mw:Extension/gallery" about="#mwt2" data-mw='{"name":"gallery","attrs":{},"body":{}}'>
21045 <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>
21046 <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>
21047 <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>
21051 ## Whoops, Parsoid shouldn't be parsing templates in the attribute caption!
21053 Gallery with template inside caption
21056 "nativeGallery": true
21059 <gallery caption="{{echo|hi}}">
21060 File:Foobar.jpg|{{echo|ho}}
21063 <ul class="gallery mw-gallery-traditional">
21064 <li class='gallerycaption'>{{echo|hi}}</li>
21065 <li class="gallerybox" style="width: 155px"><div style="width: 155px">
21066 <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>
21067 <div class="gallerytext">
21075 <ul class="gallery mw-gallery-traditional" typeof="mw:Extension/gallery" about="#mwt6" data-mw='{"name":"gallery","attrs":{},"body":{}}'>
21076 <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>
21077 <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>
21082 Gallery with wikitext inside caption
21085 "nativeGallery": true
21089 File:Foobar.jpg|alt=galleryalt|[[File:Foobar.jpg|alt=inneralt|20x20px|desc]]
21090 File:Foobar.jpg|alt=galleryalt|{{Test|unamedParam|alt=param}}
21093 <ul class="gallery mw-gallery-traditional">
21094 <li class="gallerybox" style="width: 155px"><div style="width: 155px">
21095 <div class="thumb" style="width: 150px;"><div style="margin:68px auto;"><a href="/wiki/File:Foobar.jpg" class="image"><img alt="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>
21096 <div class="gallerytext">
21097 <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>
21101 <li class="gallerybox" style="width: 155px"><div style="width: 155px">
21102 <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>
21103 <div class="gallerytext">
21104 <p>This is a test template
21111 <ul class="gallery mw-gallery-traditional" typeof="mw:Extension/gallery" about="#mwt6" data-mw='{"name":"gallery","attrs":{},"body":{}}'>
21112 <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>
21113 <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>
21118 Gallery (with showfilename option)
21121 "nativeGallery": true
21124 <gallery showfilename="">
21125 File:Nonexistent.jpg|caption
21126 File:Nonexistent.jpg
21127 File:Foobar.jpg|some '''caption''' [[Main Page]]
21131 <ul class="gallery mw-gallery-traditional">
21132 <li class="gallerybox" style="width: 155px"><div style="width: 155px">
21133 <div class="thumb" style="height: 150px;">Nonexistent.jpg</div>
21134 <div class="gallerytext">
21135 <p><a href="/wiki/File:Nonexistent.jpg" class="galleryfilename galleryfilename-truncate" title="File:Nonexistent.jpg">Nonexistent.jpg</a>
21140 <li class="gallerybox" style="width: 155px"><div style="width: 155px">
21141 <div class="thumb" style="height: 150px;">Nonexistent.jpg</div>
21142 <div class="gallerytext">
21143 <p><a href="/wiki/File:Nonexistent.jpg" class="galleryfilename galleryfilename-truncate" title="File:Nonexistent.jpg">Nonexistent.jpg</a>
21147 <li class="gallerybox" style="width: 155px"><div style="width: 155px">
21148 <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>
21149 <div class="gallerytext">
21150 <p><a href="/wiki/File:Foobar.jpg" class="galleryfilename galleryfilename-truncate" title="File:Foobar.jpg">Foobar.jpg</a>
21151 some <b>caption</b> <a href="/wiki/Main_Page" title="Main Page">Main Page</a>
21155 <li class="gallerybox" style="width: 155px"><div style="width: 155px">
21156 <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>
21157 <div class="gallerytext">
21158 <p><a href="/wiki/File:Foobar.jpg" class="galleryfilename galleryfilename-truncate" title="File:Foobar.jpg">Foobar.jpg</a>
21165 <ul class="gallery mw-gallery-traditional" typeof="mw:Extension/gallery" about="#mwt3" data-mw='{"name":"gallery","attrs":{"showfilename":""},"body":{}}'>
21166 <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>
21167 <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>
21168 <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>
21169 <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>
21173 ## Should Parsoid be preserving these variations? See T151367
21175 Gallery (with namespace-less filenames)
21178 "modes": ["wt2html", "html2html"],
21179 "nativeGallery": true
21183 File:Nonexistent.jpg
21189 <ul class="gallery mw-gallery-traditional">
21190 <li class="gallerybox" style="width: 155px"><div style="width: 155px">
21191 <div class="thumb" style="height: 150px;">Nonexistent.jpg</div>
21192 <div class="gallerytext">
21195 <li class="gallerybox" style="width: 155px"><div style="width: 155px">
21196 <div class="thumb" style="height: 150px;">Nonexistent.jpg</div>
21197 <div class="gallerytext">
21200 <li class="gallerybox" style="width: 155px"><div style="width: 155px">
21201 <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>
21202 <div class="gallerytext">
21205 <li class="gallerybox" style="width: 155px"><div style="width: 155px">
21206 <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>
21207 <div class="gallerytext">
21213 <ul class="gallery mw-gallery-traditional" typeof="mw:Extension/gallery" about="#mwt2" data-mw='{"name":"gallery","attrs":{},"body":{}}'>
21214 <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>
21215 <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>
21216 <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>
21217 <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>
21222 Gallery override link with wikilink (T36852)
21225 "nativeGallery": true
21229 File:Foobar.jpg|alt=galleryalt|link=Wikilink
21232 <ul class="gallery mw-gallery-traditional">
21233 <li class="gallerybox" style="width: 155px"><div style="width: 155px">
21234 <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>
21235 <div class="gallerytext">
21241 <ul class="gallery mw-gallery-traditional" typeof="mw:Extension/gallery" about="#mwt2" data-mw='{"name":"gallery","attrs":{},"body":{}}'>
21242 <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>
21247 Gallery override link with absolute external link (T36852)
21250 "nativeGallery": true
21254 File:Foobar.jpg|alt=galleryalt|link=http://www.example.org
21257 <ul class="gallery mw-gallery-traditional">
21258 <li class="gallerybox" style="width: 155px"><div style="width: 155px">
21259 <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>
21260 <div class="gallerytext">
21266 <ul class="gallery mw-gallery-traditional" typeof="mw:Extension/gallery" about="#mwt2" data-mw='{"name":"gallery","attrs":{},"body":{}}'>
21267 <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>
21272 Gallery override link with absolute external link with LanguageConverter
21277 File:foobar.jpg|caption|alt=galleryalt|link=http://www.example.org
21280 <ul class="gallery mw-gallery-traditional">
21281 <li class="gallerybox" style="width: 155px"><div style="width: 155px">
21282 <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>
21283 <div class="gallerytext">
21291 <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"}}'>
21292 <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>
21297 Gallery override link with malicious javascript (T36852)
21300 "modes": ["wt2html", "html2html"],
21301 "nativeGallery": true
21305 File:Foobar.jpg|alt=galleryalt|link=" onclick="alert('malicious javascript code!');
21308 <ul class="gallery mw-gallery-traditional">
21309 <li class="gallerybox" style="width: 155px"><div style="width: 155px">
21310 <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>
21311 <div class="gallerytext">
21317 <ul class="gallery mw-gallery-traditional" typeof="mw:Extension/gallery" about="#mwt2" data-mw='{"name":"gallery","attrs":{},"body":{}}'>
21318 <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>
21322 # Note that parsoid uses the invalid link as a caption, PHP does not.
21324 Gallery with invalid title as link (T45964)
21327 "modes": ["wt2html", "html2html"],
21328 "nativeGallery": true
21332 File:Foobar.jpg|link=<
21335 <ul class="gallery mw-gallery-traditional">
21336 <li class="gallerybox" style="width: 155px"><div style="width: 155px">
21337 <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>
21338 <div class="gallerytext">
21344 <ul class="gallery mw-gallery-traditional" typeof="mw:Extension/gallery" about="#mwt2" data-mw='{"name":"gallery","attrs":{},"body":{}}'>
21345 <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>
21350 Serialize gallery without attrs in data-mw
21353 "modes": ["html2wt"],
21354 "nativeGallery": true
21357 <ul class="gallery mw-gallery-traditional" typeof="mw:Extension/gallery" about="#mwt2" data-mw='{"name":"gallery","body":{}}'>
21358 <li class="gallerycaption">123</li>
21359 <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>
21362 <gallery caption="123">
21368 Gallery with class and style attributes
21371 "nativeGallery": true
21374 <gallery class="center" style="text-align: center;">
21378 <ul class="gallery mw-gallery-traditional center" style="text-align: center;">
21379 <li class="gallerybox" style="width: 155px"><div style="width: 155px">
21380 <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>
21381 <div class="gallerytext">
21387 <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":{}}'>
21388 <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>
21393 Gallery in slideshow mode
21396 "nativeGallery": true
21399 <gallery mode="slideshow" showthumbnails="">
21403 <ul class="gallery mw-gallery-slideshow" data-showthumbnails="1">
21404 <li class="gallerybox" style="width: 155px"><div style="width: 155px">
21405 <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>
21406 <div class="gallerytext">
21412 <ul class="gallery mw-gallery-slideshow" data-showthumbnails="1" typeof="mw:Extension/gallery" about="#mwt2" data-mw='{"name":"gallery","attrs":{"mode":"slideshow","showthumbnails":""},"body":{}}'>
21413 <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>
21418 Serialize gallery image captions on a line
21421 "modes": ["html2wt"],
21422 "nativeGallery": true
21425 <ul class="gallery mw-gallery-traditional" typeof="mw:Extension/gallery" about="#mwt2" data-mw='{"name":"gallery","attrs":{},"body":{}}'>
21426 <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>
21427 <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>
21431 File:Foobar.jpg| hi ho
21432 File:Foobar.jpg|hi<br />ho
21437 HTML Hex character encoding (spells the word "JavaScript")
21439 parsoid=wt2html,wt2wt,html2html
21441 JavaScript
21443 <p>JavaScript
21446 <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>
21450 HTML Hex character encoding bogus encoding (T28437 regression check)
21454 <p>&#xsee;&#XSEE;
21459 HTML Hex character encoding mixed case
21461 parsoid=wt2html,wt2wt,html2html
21468 <p><span typeof="mw:Entity">î</span><span typeof="mw:Entity">î</span></p>
21471 # See: https://www.w3.org/TR/html5/syntax.html#character-references
21472 # Note that U+000C (form feed) is not a valid XML character, so
21473 # it is banned even though allowed in HTML5.
21475 Illegal character references (T106578)
21480 ; Control (low): 
21481 ; Control (high):  Ÿ
21482 ; Surrogate: ��
21483 ; This is an okay astral character: 💩
21491 <dt>Control (low)</dt>
21493 <dt>Control (high)</dt>
21494 <dd>&#x7F; &#x9F;</dd>
21496 <dd>&#xD83D;&#xDCA9;</dd>
21497 <dt>This is an okay astral character</dt>
21498 <dd>💩</dd></dl>
21502 __FORCETOC__ override
21514 ISBN 978-0-1234-56 789
21516 <p><a href="/wiki/Special:BookSources/9780123456" class="internal mw-magiclink-isbn">ISBN 978-0-1234-56</a> 789
21519 <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>
21523 ISBN followed by 5 spaces
21534 ISBN ISBN 1234567890
21536 <p>ISBN <a href="/wiki/Special:BookSources/1234567890" class="internal mw-magiclink-isbn">ISBN 1234567890</a>
21539 <p>ISBN <a href="./Special:BookSources/1234567890" rel="mw:WikiLink" data-parsoid='{"stx":"magiclink"}'>ISBN 1234567890</a></p>
21542 # Uppercase X and lowercase x as well
21553 <p><a href="/wiki/Special:BookSources/346204561X" class="internal mw-magiclink-isbn">ISBN 3-462-04561-X</a>
21554 <a href="/wiki/Special:BookSources/346204561X" class="internal mw-magiclink-isbn">ISBN 3-462-04561-x</a>
21555 <a href="/wiki/Special:BookSources/080442957X" class="internal mw-magiclink-isbn">ISBN 080442957X</a>
21556 <a href="/wiki/Special:BookSources/080442957X" class="internal mw-magiclink-isbn">ISBN 080442957x</a>
21557 <a href="/wiki/Special:BookSources/978080442957X" class="internal mw-magiclink-isbn">ISBN 978080442957X</a>
21558 <a href="/wiki/Special:BookSources/978080442957X" class="internal mw-magiclink-isbn">ISBN 978080442957x</a>
21561 <p><a href="./Special:BookSources/346204561X" rel="mw:WikiLink" data-parsoid='{"stx":"magiclink"}'>ISBN 3-462-04561-X</a>
21562 <a href="./Special:BookSources/346204561X" rel="mw:WikiLink" data-parsoid='{"stx":"magiclink"}'>ISBN 3-462-04561-x</a>
21563 <a href="./Special:BookSources/080442957X" rel="mw:WikiLink" data-parsoid='{"stx":"magiclink"}'>ISBN 080442957X</a>
21564 <a href="./Special:BookSources/080442957X" rel="mw:WikiLink" data-parsoid='{"stx":"magiclink"}'>ISBN 080442957x</a>
21565 <a href="./Special:BookSources/978080442957X" rel="mw:WikiLink" data-parsoid='{"stx":"magiclink"}'>ISBN 978080442957X</a>
21566 <a href="./Special:BookSources/978080442957X" rel="mw:WikiLink" data-parsoid='{"stx":"magiclink"}'>ISBN 978080442957x</a></p>
21570 ISBN with empty prefix (parsoid test)
21574 <p><a href="/wiki/Special:BookSources/1234567890" class="internal mw-magiclink-isbn">ISBN 1234567890</a>
21577 <p><a href="./Special:BookSources/1234567890" rel="mw:WikiLink">ISBN 1234567890</a></p>
21581 T24905: <abbr> followed by ISBN followed by </a>
21583 <abbr>(fr)</abbr> ISBN 2753300917 [http://www.example.com example.com]
21585 <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>
21588 <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>
21596 <p>RFC <a class="external mw-magiclink-rfc" rel="nofollow" href="https://tools.ietf.org/html/rfc1234">RFC 1234</a>
21599 <p>RFC <a href="https://tools.ietf.org/html/rfc1234" rel="mw:ExtLink" class="external mw-magiclink">RFC 1234</a></p>
21603 Double RFC with a wiki link
21607 <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>
21610 <p>RFC <a rel="mw:WikiLink" href="./RFC_1234" title="RFC 1234">RFC 1234</a></p>
21618 <p><a class="external mw-magiclink-rfc" rel="nofollow" href="https://tools.ietf.org/html/rfc983">RFC 983</a> 987
21621 <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>
21625 Centre-aligned image
21627 [[Image:foobar.jpg|centre]]
21629 <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>
21632 <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>
21638 [[Image:foobar.jpg|none]]
21640 <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>
21643 <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>
21647 Width + Height sized image (using px) (height is ignored)
21649 [[Image:foobar.jpg|640x480px]]
21651 <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>
21654 <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>
21658 Width-sized image (using px, no following whitespace)
21660 [[Image:foobar.jpg|640px]]
21662 <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>
21665 <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>
21669 Width-sized image (using px, with following whitespace - test regression from r39467)
21671 [[Image:foobar.jpg|640px ]]
21673 <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>
21676 <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>
21680 Width-sized image (using px, with preceding whitespace - test regression from r39467)
21682 [[Image:foobar.jpg| 640px]]
21684 <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>
21687 <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>
21691 Image with page parameter
21695 [[File:LoremIpsum.djvu|page=2]]
21697 <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>
21700 <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>
21704 Another italics / bold test
21712 # FIXME: The php output seems broken. It's interleaving some open/close tags.
21718 <dl><dd><dl><dt><dl><dt><dl><dt><dl><dd><dl><dd></dt></dl></dd></dl></dd></dl></dd></dl></dd></dl></dd></dl>
21721 <dl><dd><dl><dt><dl><dt><dl><dt><dl><dd><dl><dd></dd></dl></dd></dl></dt></dl></dt></dl></dt></dl></dd></dl>
21725 # Images with the "|" character in external URLs in comment tags; Eats half the comment, leaves unmatched "</a>" tag.
21727 Images with the "|" character in the comment
21729 [[File:Foobar.jpg|thumb|An [http://test/?param1=|left|¶m2=|x external] URL]]
21731 <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>
21734 <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>
21738 [Before] HTML without raw HTML enabled ($wgRawHtml==false)
21740 <html><script>alert(1);</script></html>
21742 <p><html><script>alert(1);</script></html>
21747 HTML with raw HTML ($wgRawHtml==true)
21751 <html><script>alert(1);</script></html>
21753 <p><script>alert(1);</script>
21758 Parents of subpages, one level up
21760 subpage title=[[Subpage test/L1/L2/L3]]
21764 <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>
21770 Parents of subpages, one level up, not named
21772 subpage title=[[Subpage test/L1/L2/L3]]
21776 <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>
21783 Parents of subpages, two levels up
21785 subpage title=[[Subpage test/L1/L2/L3]]
21791 <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
21792 </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>
21797 Parents of subpages, two levels up, without trailing slash or name.
21799 subpage title=[[Subpage test/L1/L2/L3]]
21808 Parents of subpages, two levels up, with lots of extra trailing slashes.
21810 subpage title=[[Subpage test/L1/L2/L3]]
21814 <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>
21819 Subpage test/L1/L2/L3Sibling
21825 Transclusion of a sibling page (one level up)
21827 subpage title=[[Subpage test/L1/L2/L3]]
21836 Transclusion of a child page
21838 subpage title=[[Subpage test/L1/L2]]
21846 # This is wt2html only in Parsoid because we add <nowiki>
21847 # because of {{..}} and we don't expect to fix that to
21848 # eliminate the nowikis selective for {{..}} markup.
21850 Non-transclusion because of too many up levels
21852 subpage title=[[Subpage test/L1/L2/L3]]
21855 {{../../../../More than parent}}
21857 <p>{{../../../../More than parent}}
21860 <p>{{../../../../More than parent}}</p>
21864 Definition list code coverage
21878 <dl><dt>title </dt><dd>def</dd>
21879 <dt>title </dt><dd>def</dd>
21880 <dt>title</dt><dd>def</dd></dl>
21884 Don't fall for the self-closing div
21886 <div>hello world</div/>
21888 <div>hello world</div>
21897 <p>[[:Template:Msg]]
21906 <p><a href="/index.php?title=Template:QUERTY&action=edit&redlink=1" class="new" title="Template:QUERTY (page does not exist)">Template:QUERTY</a>
21910 # This isn't needed for XHTML conformance, but would be handy as a fallback security measure
21912 Always escape literal '>' in output, not just after '<'
21926 <p>This is a test template
21927 This is a test template
21939 Inclusion of !userCanEdit() content
21943 <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>
21949 Out-of-order TOC heading levels
21958 <div id="toc" class="toc"><input type="checkbox" role="button" id="toctogglecheckbox" class="toctogglecheckbox" style="display:none"/><div class="toctitle" lang="en" dir="ltr"><h2>Contents</h2><span class="toctogglespan"><label class="toctogglelabel" for="toctogglecheckbox"></label></span></div>
21960 <li class="toclevel-1 tocsection-1"><a href="#2"><span class="tocnumber">1</span> <span class="toctext">2</span></a>
21962 <li class="toclevel-2 tocsection-2"><a href="#6"><span class="tocnumber">1.1</span> <span class="toctext">6</span></a></li>
21963 <li class="toclevel-2 tocsection-3"><a href="#3"><span class="tocnumber">1.2</span> <span class="toctext">3</span></a></li>
21966 <li class="toclevel-1 tocsection-4"><a href="#1"><span class="tocnumber">2</span> <span class="toctext">1</span></a>
21968 <li class="toclevel-2 tocsection-5"><a href="#5"><span class="tocnumber">2.1</span> <span class="toctext">5</span></a></li>
21969 <li class="toclevel-2 tocsection-6"><a href="#2_2"><span class="tocnumber">2.2</span> <span class="toctext">2</span></a></li>
21975 <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>
21976 <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>
21977 <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>
21978 <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>
21979 <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>
21980 <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>
21986 ISBN with a dummy number
21996 ISBN with space-delimited number
22000 <p><a href="/wiki/Special:BookSources/9290170328" class="internal mw-magiclink-isbn">ISBN 92 9017 032 8</a>
22003 <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>
22008 ISBN with multiple spaces, no number
22027 </p><p><a href="/wiki/Special:BookSources/1234567890" class="internal mw-magiclink-isbn">ISBN 1234567890</a>
22028 </p><p>ISBN 12345678901
22031 <p>ISBN 123456789</p>
22033 <p><a href="./Special:BookSources/1234567890" rel="mw:WikiLink" data-parsoid='{"stx":"magiclink"}'>ISBN 1234567890</a></p>
22035 <p>ISBN 12345678901</p>
22040 ISBN with trailing year (T9110)
22042 ISBN 1-234-56789-0 - 2006
22044 ISBN 1 234 56789 0 - 2006
22046 <p><a href="/wiki/Special:BookSources/1234567890" class="internal mw-magiclink-isbn">ISBN 1-234-56789-0</a> - 2006
22047 </p><p><a href="/wiki/Special:BookSources/1234567890" class="internal mw-magiclink-isbn">ISBN 1 234 56789 0</a> - 2006
22050 <p><a href="./Special:BookSources/1234567890" rel="mw:WikiLink" data-parsoid='{"stx":"magiclink"}'>ISBN 1-234-56789-0</a> - 2006</p>
22052 <p><a href="./Special:BookSources/1234567890" rel="mw:WikiLink" data-parsoid='{"stx":"magiclink"}'>ISBN 1 234 56789 0</a> - 2006</p>
22059 wgFragmentMode=[ 'html5', 'legacy' ]
22061 {{anchorencode:foo bar©#%n}}
22066 <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>
22070 anchorencode (legacy)
22072 wgFragmentMode=[ 'legacy' ]
22074 {{anchorencode:foo bar©#%n}}
22076 <p>foo_bar.C2.A9.23.25n
22081 anchorencode trims spaces
22083 wgFragmentMode=[ 'html5', 'legacy' ]
22085 {{anchorencode: __pretty__please__}}
22090 <p about="#mwt1" typeof="mw:Transclusion" data-mw='{"parts":[{"template":{"target":{"wt":"anchorencode: __pretty__please__","function":"anchorencode"},"params":{},"i":0}}]}'>pretty_please</p>
22094 anchorencode deals with links
22096 wgFragmentMode=[ 'html5', 'legacy' ]
22098 {{anchorencode: [[hello|world]] [[hi]]}}
22103 <p about="#mwt1" typeof="mw:Transclusion" data-mw='{"parts":[{"template":{"target":{"wt":"anchorencode: [[hello|world]] [[hi]]","function":"anchorencode"},"params":{},"i":0}}]}'>world_hi</p>
22107 anchorencode deals with templates
22109 wgFragmentMode=[ 'html5', 'legacy' ]
22111 {{anchorencode: {{Foo}} x}}
22116 <p about="#mwt2" typeof="mw:Transclusion" data-mw='{"parts":[{"template":{"target":{"wt":"anchorencode: {{Foo}} x","function":"anchorencode"},"params":{},"i":0}}]}'>FOO_x</p>
22120 anchorencode encodes like the TOC generator: (T20431)
22122 wgFragmentMode=[ 'html5', 'legacy' ]
22124 ===_ +:.3A%3A _ &&]] x===
22125 {{anchorencode: _ +:.3A%3A _ &&]] x}}
22128 <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>
22129 <p>+:.3A%3A_&&]]_x
22132 <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>
22133 <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>
22134 <meta property="mw:PageProp/noeditsection"/>
22138 anchorencode encodes like the TOC generator: (T20431) (legacy)
22140 wgFragmentMode=[ 'legacy' ]
22142 ===_ +:.3A%3A&&]]===
22143 {{anchorencode: _ +:.3A%3A&&]] }}
22146 <h3><span class="mw-headline" id=".2B:.3A.253A.26.26.5D.5D">_ +:.3A%3A&&]]</span></h3>
22147 <p>.2B:.3A.253A.26.26.5D.5D
22152 T8200: blockquotes and paragraph formatting
22173 T10293: Use of center tag ruins paragraph formatting
22194 Parsing of overlapping (improperly nested) inline html tags
22196 <span><s>x</span></s>
22198 <p><span><s>x</span></s></span>
22201 <p><span><s>x</s></span>
22206 ### Language variants related tests
22209 # Parsoid does not mark self-links.
22210 # Parsoid does not convert links; PHP will do any necessary redirects.
22213 Self-link in language variants
22215 title=[[Dunav]] language=sr
22217 Both [[Dunav]] and [[Дунав]] are names for this river.
22219 <p>Both <a class="mw-selflink selflink">Dunav</a> and <a class="mw-selflink selflink">Дунав</a> are names for this river.
22222 <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>
22232 Link to another existing title shouldn't be parsed as self-link even if it's a variant of this title
22234 title=[[Duna]] language=sr
22236 [[Дуна]] is not a self-link while [[Duna]] and [[Dуна]] are still self-links.
22238 <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.
22241 <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>
22245 Link to a section of a variant of this title shouldn't be parsed as self-link
22247 title=[[Duna]] language=sr
22249 [[Dуна]] is a self-link while [[Dunа#Foo]] and [[Dуна#Foo]] are not self-links.
22251 <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.
22254 <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>
22258 Link to pages in language variants
22262 Main Page can be written as [[Маин Паге]]
22264 <p>Main Page can be written as <a href="/wiki/Main_Page" title="Main Page">Маин Паге</a>
22267 <p>Main Page can be written as <a rel="mw:WikiLink" href="./Маин_Паге" title="Маин Паге">Маин Паге</a></p>
22272 Multiple links to pages in language variants
22276 [[Main Page]] can be written as [[Маин Паге]] same as [[Маин Паге]].
22278 <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>.
22281 <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>
22286 Simple template in language variants
22292 <p>This is a test template
22298 Template with explicit namespace in language variants
22304 <p>This is a test template
22310 Basic test for template parameter in language variants
22314 {{парамтест|param=foo}}
22316 <p>This is a test template with parameter foo
22321 Simple category in language variants
22325 [[Category:МедиаWики Усер'с Гуиде]]
22327 cat=МедиаWики_Усер'с_Гуиде sort=
22329 <link rel="mw:PageProp/Category" href="./Категорија:МедиаWики_Усер'с_Гуиде" data-parsoid='{"stx":"simple","a":{"href":"./Категорија:МедиаWики_Усер'с_Гуиде"},"sa":{"href":"Category:МедиаWики Усер'с Гуиде"}}'/>
22344 ## We used to, but no longer wt2wt this test since the default serializer
22345 ## will normalize all categories to serialize on their own line.
22346 ## This wikitext usage is going to be fairly uncommon in production and
22347 ## selser will take care of preserving formatting in those scenarios.
22349 Don't convert blue categorylinks to another variant (T35210)
22355 [[A]][[Category:分类]]
22359 <p><a rel="mw:WikiLink" href="./A" title="A">A</a></p>
22360 <link rel="mw:PageProp/Category" href="./Category:分类"/>
22364 Stripping -{}- tags (language variants)
22368 Latin proverb: -{Ne nuntium necare}-
22370 <p>Latin proverb: Ne nuntium necare
22373 <p>Latin proverb: <span typeof="mw:LanguageVariant" data-mw-variant='{"disabled":{"t":"Ne nuntium necare"}}'></span></p>
22378 Prevent conversion with -{}- tags (language variants)
22380 language=sr variant=sr-ec
22382 Latinski: -{Ne nuntium necare}-
22384 <p>Латински: Ne nuntium necare
22387 <p>Latinski: <span typeof="mw:LanguageVariant" data-mw-variant='{"disabled":{"t":"Ne nuntium necare"}}'></span></p>
22392 Prevent conversion of text with -{}- tags (language variants)
22394 language=sr variant=sr-ec
22396 Latinski: -{Ne nuntium necare}-
22398 <p>Латински: Ne nuntium necare
22401 <p>Latinski: <span typeof="mw:LanguageVariant" data-mw-variant='{"disabled":{"t":"Ne nuntium necare"}}'></span></p>
22406 Prevent conversion of links with -{}- tags (language variants)
22408 language=sr variant=sr-ec
22412 <p><a href="/wiki/Main_Page" title="Main Page">Main Page</a>
22415 <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>
22420 -{}- tags within headlines (within html for parserConvert())
22422 wgFragmentMode=[ 'html5', 'legacy' ]
22424 language=sr variant=sr-ec
22428 Note that even an unprotected headline ID is not affected by language
22433 <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>
22434 <p>Ноте тхат евен ан унпротецтед хеадлине ИД ис нот аффецтед бy лангуаге
22437 <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>
22440 <h2 id="-{Naslov}-"><span id="-.7BNaslov.7D-" typeof="mw:FallbackId"></span><span typeof="mw:LanguageVariant" data-mw-variant='{"disabled":{"t":"Naslov"}}'></span></h2>
22442 <p>Note that even an unprotected headline ID is not affected by language
22445 <h2 id="Latinski">Latinski</h2>
22449 Explicit definition of language variant alternatives
22451 language=zh variant=zh-tw
22453 -{zh:China;zh-tw:Taiwan}-, not China
22455 <p>Taiwan, not China
22458 <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>
22462 Filter syntax for language variants
22464 language=zh variant=zh-tw
22466 foo-{zh;zh-hans;zh-hant|blog, WEBJOURNAL, WEBLOG}-quux
22468 <p>fooblog, WEBJOURNAL, WEBLOGquux
22471 <p>foo<span typeof="mw:LanguageVariant" data-mw-variant='{"filter":{"l":["zh","zh-hans","zh-hant"],"t":"blog, WEBJOURNAL, WEBLOG"}}'></span>quux</p>
22474 # Note that Parsoid post-processing for language variants needs to
22475 # update the `title` attribute here, based on the mw:ExpandedAttrs property
22477 Conversion around HTML tags
22479 language=sr variant=sr-ec
22481 -{H|span=>sr-ec:script;title=>sr-ec:src}-
22482 <span title="La-{sr-el:L;sr-ec:C}-tin">ski</span>
22485 <span title="ЛаCтин">ски</span>
22488 <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"}]}'/>
22489 <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>
22493 Explicit session-wise two-way language variant mapping (A flag and - flag)
22495 language=zh variant=zh-tw
22497 This is -{zh:China; zh-tw:Taiwan}-, but we'll forget that now.
22499 Taiwan is not China.
22501 But -{A|zh:China; zh-tw:Taiwan}- is China,
22503 (This-{-|zh:China; zh-tw:Taiwan}- should be stripped!)
22505 and -{China}- is China.
22507 <p>This is Taiwan, but we'll forget that now.
22508 </p><p>Taiwan is not China.
22509 </p><p>But Taiwan is Taiwan,
22510 </p><p>(This should be stripped!)
22511 </p><p>and China is China.
22514 <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>
22515 <p>Taiwan is not China.</p>
22516 <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>
22517 <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>
22518 <p>and <span typeof="mw:LanguageVariant" data-mw-variant='{"disabled":{"t":"China"}}'></span> is China.</p>
22522 Explicit session-wise one-way language variant mapping (A flag and - flag)
22524 language=zh variant=zh-tw
22526 This is -{COUNTRY=>zh:China;COUNTRY=>zh-tw:Taiwan}-, but we'll forget that now.
22528 COUNTRY is China or Taiwan.
22530 But -{A|COUNTRY=>zh:China;COUNTRY=>zh-tw:Taiwan}- is COUNTRY,
22532 (This-{-|COUNTRY=>zh:China;COUNTRY=>zh-tw:Taiwan}- should be stripped!)
22534 and -{COUNTRY}- is COUNTRY.
22536 <p>This is Taiwan, but we'll forget that now.
22537 </p><p>COUNTRY is China or Taiwan.
22538 </p><p>But Taiwan is Taiwan,
22539 </p><p>(This should be stripped!)
22540 </p><p>and COUNTRY is COUNTRY.
22543 <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>
22544 <p>COUNTRY is China or Taiwan.</p>
22545 <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>
22546 <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>
22547 <p>and <span typeof="mw:LanguageVariant" data-mw-variant='{"disabled":{"t":"COUNTRY"}}'></span> is COUNTRY.</p>
22551 Explicit session-wise two-way language variant mapping (H flag for hide)
22553 language=zh variant=zh-tw
22555 (This-{H|zh:China;zh-tw:Taiwan}- should be stripped!)
22559 <p>(This should be stripped!)
22560 </p><p>Taiwan is Taiwan.
22563 <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>
22564 <p>Taiwan is China.</p>
22568 Explicit session-wise one-way language variant mapping (H flag for hide)
22570 language=zh variant=zh-tw
22572 (This-{H|COUNTRY=>zh:China;COUNTRY=>zh-tw:Taiwan}- should be stripped!)
22574 COUNTRY is Taiwan or China.
22576 <p>(This should be stripped!)
22577 </p><p>Taiwan is Taiwan or China.
22580 <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>
22581 <p>COUNTRY is Taiwan or China.</p>
22584 ## Note that parsoid test runner does not support 'showtitle' option.
22586 Adding explicit conversion rule for title (T flag)
22588 language=zh variant=zh-tw showtitle
22590 Should be stripped-{T|zh:China;zh-tw:Taiwan}-!
22595 <p>Should be stripped!
22596 </p><p>Taiwan is China.
22599 <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>
22600 <p>Taiwan is China.</p>
22604 Code coverage: T combined with H flag
22606 language=zh variant=zh-tw showtitle
22608 Should be stripped-{T;H|zh:China; zh-tw:Taiwan}-!
22613 <p>Should be stripped!
22614 </p><p>Taiwan is Taiwan.
22617 <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>
22618 <p>Taiwan is China.</p>
22622 Code coverage: T with no variants
22624 language=zh variant=zh-tw showtitle
22626 -{H|zh:China; zh-tw:Taiwan}-
22627 Taiwan is China.-{T|Taiwan is China}-
22634 <p><meta typeof="mw:LanguageVariant" data-mw-variant='{"add":true,"twoway":[{"l":"zh","t":"China"},{"l":"zh-tw","t":"Taiwan"}]}'/>
22635 Taiwan is China.<meta typeof="mw:LanguageVariant" data-mw-variant='{"disabled":{"t":"Taiwan is China"},"title":true}'/></p>
22639 Code coverage: rules with no variants
22641 language=zh variant=zh-tw
22643 -{H|zh:China; zh-tw:Taiwan}-
22654 <p><meta typeof="mw:LanguageVariant" data-mw-variant='{"add":true,"twoway":[{"l":"zh","t":"China"},{"l":"zh-tw","t":"Taiwan"}]}'/>
22656 <meta typeof="mw:LanguageVariant" data-mw-variant='{"add":true,"twoway":[{"l":"*","t":"China"}]}'/>
22657 Taiwan is China.</p>
22662 Code coverage: D flag for conversion rule
22664 language=zh variant=zh-tw
22666 -{D|zh-cn:XA; zh-tw:YA}-
22667 -{A;D|zh-cn:XB; zh-tw:YB}-
22668 -{D;H|zh-cn:XC; zh-tw:YC}-
22670 -{D;H|FOO=>zh-tw:BAR;FOO=>zh-cn:BAT}-
22676 XA XB XC YA YB YC FOO BAR BAT 012345
22681 </p><p>FOO⇒台灣:BAR;FOO⇒大陆:BAT;
22685 </p><p>XA YB YC YA YB YC BAR BAR BAT 013355
22688 <p><span typeof="mw:LanguageVariant" data-mw-variant='{"describe":true,"twoway":[{"l":"zh-cn","t":"XA"},{"l":"zh-tw","t":"YA"}]}'></span>
22689 <meta typeof="mw:LanguageVariant" data-mw-variant='{"add":true,"describe":true,"twoway":[{"l":"zh-cn","t":"XB"},{"l":"zh-tw","t":"YB"}]}'/>
22690 <span typeof="mw:LanguageVariant" data-mw-variant='{"add":true,"describe":true,"twoway":[{"l":"zh-cn","t":"XC"},{"l":"zh-tw","t":"YC"}]}'></span></p>
22691 <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>
22692 <p><span typeof="mw:LanguageVariant" data-mw-variant='{"describe":true,"oneway":[{"f":"0","l":"zh-tw","t":"1"}]}'></span>
22693 <meta typeof="mw:LanguageVariant" data-mw-variant='{"add":true,"describe":true,"oneway":[{"f":"2","l":"zh-tw","t":"3"}]}'/>
22694 <span typeof="mw:LanguageVariant" data-mw-variant='{"add":true,"describe":true,"oneway":[{"f":"4","l":"zh-tw","t":"5"}]}'></span></p>
22695 <p>XA XB XC YA YB YC FOO BAR BAT 012345</p>
22699 Code coverage: N flag for conversion rule
22701 language=zh variant=zh-cn
22711 </p><p>српски (ћирилица)
22714 <p><span typeof="mw:LanguageVariant" data-mw-variant='{"name":{"t":"zh-cn"}}'></span></p>
22715 <p><span typeof="mw:LanguageVariant" data-mw-variant='{"name":{"t":"zh-tw"}}'></span></p>
22716 <p><span typeof="mw:LanguageVariant" data-mw-variant='{"name":{"t":"sr-ec"}}'></span></p>
22719 # html2wt suppresses the bogus 'D' flag, so this is wt2html only
22721 Code coverage: N flag for conversion rule (wt2html only)
22723 language=zh variant=zh-cn
22724 parsoid=wt2html,html2html
22731 <p><span typeof="mw:LanguageVariant" data-mw-variant='{"name":{"t":"en"}}' data-parsoid='{"fl":["D","N"]}'></span></p>
22735 Testing that changing the language variant here in the tests actually works
22737 language=zh variant=zh showtitle
22739 Should be stripped-{T|zh:China; zh-tw:Taiwan}-!
22742 <p>Should be stripped!
22745 <p>Should be stripped<meta typeof="mw:LanguageVariant" data-mw-variant='{"title":true,"twoway":[{"l":"zh","t":"China"},{"l":"zh-tw","t":"Taiwan"}]}'/>!</p>
22749 Recursive conversion of alt and title attrs shouldn't clear converter state
22751 language=zh variant=zh-cn
22754 -{H|zh-cn:Exclamation; zh-tw:exclamation}-
22755 Should be stripped-{T|zh-cn:China; zh-tw:Taiwan}-<span title="exclamation">!</span>
22759 Should be stripped<span title="Exclamation">!</span>
22762 <p><meta typeof="mw:LanguageVariant" data-mw-variant='{"add":true,"twoway":[{"l":"zh-cn","t":"Exclamation"},{"l":"zh-tw","t":"exclamation"}]}'/>
22763 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>
22767 T26072: more test on conversion rule for title
22769 language=zh variant=zh-tw showtitle
22771 This should be stripped-{T|zh:China; zh-tw:Taiwan}-!
22773 This won't take interferes with the title rule-{H|zh:Beijing; zh-tw:Taipei}-.
22776 <p>This should be stripped!
22777 </p><p>This won't take interferes with the title rule.
22780 <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>
22781 <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>
22785 Partly disable title conversion if variant == main language code
22787 language=zh variant=zh title=[[ZH]] showtitle
22789 -{T|zh-cn:CN;zh-tw:TW}-
22795 <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>
22799 Partly disable title conversion if variant == main language code, more
22801 language=zh variant=zh title=[[ZH]] showtitle
22809 <p><meta typeof="mw:LanguageVariant" data-mw-variant='{"disabled":{"t":"TW"},"title":true}'/></p>
22813 Raw output of variant escape tags (R flag)
22815 language=zh variant=zh-tw
22817 Raw: -{R|zh:China;zh-tw:Taiwan}-
22819 <p>Raw: zh:China;zh-tw:Taiwan
22822 <p>Raw: <span typeof="mw:LanguageVariant" data-mw-variant='{"disabled":{"t":"zh:China;zh-tw:Taiwan"}}'></span></p>
22825 # html2wt suppresses the bogus 'D' flags, so this is wt2html only
22827 Raw output of variant escape tags (R flag) (wt2html only)
22829 language=zh variant=zh-tw
22830 parsoid=wt2html,html2html
22832 -{Variant}- -{D|syntax}- -{D;R|options}-
22834 <p>Variant syntax options
22837 <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>
22841 Nested markup inside raw output of variant escape tags (R flag)
22843 language=zh variant=zh-tw
22845 Nested raw: -{R|nested -{zh:China;zh-tw:Taiwan}- nested}-
22847 <p>Nested raw: nested Taiwan nested
22850 <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>
22854 Nested markup and spaces inside raw output of variant escape tags (R flag)
22856 language=zh variant=zh-tw
22858 X-{ outer -{ inner }- outer }-X
22860 <p>X outer inner outer X
22863 <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>
22867 Templates inside raw output of variant escape tags (R flag)
22869 language=zh variant=zh-tw
22871 Nested raw: -{R|nested {{echo|hi}} templates}-
22873 <p>Nested raw: nested hi templates
22876 <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>
22880 Strings evaluating false shouldn't be ignored by Language converter (T51072)
22882 language=zh variant=zh-cn
22884 -{zh-cn:0;zh-sg:1;zh-tw:2;zh-hk:3}-
22889 <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>
22893 Conversion rules from [numeric-only string] to [something else] (T48634)
22895 language=zh variant=zh-cn
22897 -{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
22902 <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>
22906 Two-way converter rule entries with an empty value should be ignored (T53551)
22908 language=zh variant=zh-cn
22910 -{H|zh-cn:foo;zh-tw:;}-foobar
22915 <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>
22919 One-way converter rule entries with an empty "from" string should be ignored (T53551)
22921 language=zh variant=zh-cn
22923 -{H|=>zh-cn:foo;}-foobar
22928 <p><meta typeof="mw:LanguageVariant" data-parsoid='{"tSp":[5]}' data-mw-variant='{"add":true,"oneway":[{"f":"","l":"zh-cn","t":"foo"}]}'/>foobar</p>
22932 Empty converter rule entries shouldn't be inserted into the conversion table (T53551)
22934 language=zh variant=zh-cn
22941 <p><meta typeof="mw:LanguageVariant" data-mw-variant='{"add":true,"twoway":[{"l":"*","t":""}]}'/>foobar</p>
22945 Nested using of manual convert syntax
22947 language=zh variant=zh-hk
22949 Nested: -{zh-hans:Hi -{zh-cn:China;zh-sg:Singapore;}-;zh-hant:Hello -{zh-tw:Taiwan;zh-hk:H-{ong}- K-{}-ong;}-;}-!
22951 <p>Nested: Hello Hong Kong!
22954 <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>
22958 HTML markups with conversion syntax in attribs, nested in other conversion blocks
22960 language=zh variant=zh-cn
22962 -{zh;zh-hans;zh-hant|<span title="-{X}-">A</span>}-
22964 <p><span title="X">A</span>
22967 <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>
22971 HTML markups with conversion syntax in attribs, nested in other conversion blocks (not working yet in PHP parser)
22973 language=zh variant=zh-cn
22975 -{<span title="-{X}-">A</span>}-
22976 !! html/php+disabled
22977 <p><span title="X">A</span>
22980 <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>
22983 # Parsoid and PHP disagree on how to parse this example: Parsoid
22984 # insists that the content of a language converter element be a valid
22985 # DOM fragment or attribute string
22987 Language converter markup with block content
22989 language=zh variant=zh-cn
22991 <span>a-{b<div>c}-d
22993 <span>a-{zh;zh-hans;zh-hant|b<div>c}-d
22995 <span>a-{H|0=>zh-cn:x<span>y;0=>zh-tw:b<div>c}-d
23000 </span></div></span></div></span>
23002 <span data-parsoid='{"stx":"html","autoInsertedEnd":true}'>a<div typeof="mw:LanguageVariant" data-mw-variant='{"disabled":{"t":"b<div data-parsoid='{\"stx\":\"html\",\"autoInsertedEnd\":true,\"dsr\":[10,16,5,0]}'>c</div>"}}'></div>d
23004 <span data-parsoid='{"stx":"html","autoInsertedEnd":true}'>a<div typeof="mw:LanguageVariant" data-mw-variant='{"filter":{"l":["zh","zh-hans","zh-hant"],"t":"b<div data-parsoid='{\"stx\":\"html\",\"autoInsertedEnd\":true,\"dsr\":[50,56,5,0]}'>c</div>"}}'></div>d
23006 <p><span data-parsoid='{"stx":"html","autoInsertedEnd":true}'>a<meta typeof="mw:LanguageVariant" data-mw-variant='{"add":true,"oneway":[{"f":"0","l":"zh-cn","t":"x<span data-parsoid='{\"stx\":\"html\",\"autoInsertedEnd\":true,\"dsr\":[82,89,6,0]}'>y</span>"},{"f":"0","l":"zh-tw","t":"b<div data-parsoid='{\"stx\":\"html\",\"autoInsertedEnd\":true,\"dsr\":[100,106,5,0]}'>c</div>"}]}'/>d</span></p></span></span>
23010 LanguageConverter selser (1)
23012 language=zh variant=zh-cn
23014 "modes": ["wt2wt", "selser"],
23016 ["span[typeof]", "attr", "data-mw-variant", "{\"disabled\":{\"t\":\"edited\"}}"]
23026 LanguageConverter selser (2)
23028 language=zh variant=zh-cn
23030 "modes": ["wt2wt", "selser"],
23032 ["span[class='x']", "contents", "text", "-{foo}-"],
23033 ["a", "contents", "text", "-{"],
23034 ["span[typeof]", "attr", "data-mw", "{\"parts\":[{\"template\":{\"target\":{\"wt\":\"1x\",\"href\":\"./Template:1x\"},\"params\":{\"1\":{\"wt\":\"-{\"}},\"i\":0}}]}"]
23038 <span class="x">TEXT1</span>
23039 [http://example.com TEXT2]
23043 <span class="x"><nowiki>-{foo}-</nowiki></span>
23044 [http://example.com -{]
23045 [[Foo|<nowiki>-{</nowiki>]]
23046 {{1x|<nowiki>-{</nowiki>}}
23049 # Tests LanguageVariantText in ConstrainedText
23051 LanguageConverter selser (3)
23053 language=zh variant=zh-cn
23055 "modes": ["wt2wt", "selser"],
23057 ["td > span", "attr", "typeof", "mw:LanguageVariant"],
23058 ["td > span", "attr", "data-mw-variant", "{\"disabled\":{\"t\":\"edited\"}}"]
23069 |<nowiki/>-{edited}-
23073 # Tests LanguageVariantText._fromSelSer
23075 LanguageConverter selser (4)
23077 language=zh variant=zh-cn
23079 "modes": ["wt2wt", "selser"],
23081 ["td > span.x", "remove"]
23087 |<span class="x">Foo</span>-{Bar}-
23088 ||<span class="x">Foo</span>-{Bar}-
23098 # Since Parsoid is starting to emit canonical wikitext for links,
23099 # [http://example.com http://example.com] will not RT back to that
23101 # Parsoid does not language-convert links (it is done in a
23102 # post-processing step)
23104 Proper conversion of text in external links
23106 language=sr variant=sr-ec
23109 http://www.google.com
23110 gopher://www.google.com
23111 [http://www.google.com http://www.google.com]
23112 [gopher://www.google.com gopher://www.google.com]
23113 [https://www.google.com irc://www.google.com]
23114 [ftp://www.google.com www.google.com/ftp://dir]
23115 [//www.google.com www.google.com]
23117 <p><a rel="nofollow" class="external free" href="http://www.google.com">http://www.google.com</a>
23118 <a rel="nofollow" class="external free" href="gopher://www.google.com">gopher://www.google.com</a>
23119 <a rel="nofollow" class="external text" href="http://www.google.com">http://www.google.com</a>
23120 <a rel="nofollow" class="external text" href="gopher://www.google.com">gopher://www.google.com</a>
23121 <a rel="nofollow" class="external text" href="https://www.google.com">irc://www.google.com</a>
23122 <a rel="nofollow" class="external text" href="ftp://www.google.com">www.гоогле.цом/фтп://дир</a>
23123 <a rel="nofollow" class="external text" href="//www.google.com">www.гоогле.цом</a>
23126 <p><a rel="mw:ExtLink" class="external free" href="http://www.google.com">http://www.google.com</a>
23127 <a rel="mw:ExtLink" class="external free" href="gopher://www.google.com">gopher://www.google.com</a>
23128 <a rel="mw:ExtLink" class="external text" href="http://www.google.com">http://www.google.com</a>
23129 <a rel="mw:ExtLink" class="external text" href="gopher://www.google.com">gopher://www.google.com</a>
23130 <a rel="mw:ExtLink" class="external text" href="https://www.google.com">irc://www.google.com</a>
23131 <a rel="mw:ExtLink" class="external text" href="ftp://www.google.com">www.google.com/ftp://dir</a>
23132 <a rel="mw:ExtLink" class="external text" href="//www.google.com">www.google.com</a></p>
23136 Do not convert roman numbers to language variants
23138 language=sr variant=sr-ec
23142 <p>Фридрих IV је цар.
23145 <p>Fridrih IV je car.</p>
23149 Unclosed language converter markup "-{"
23160 Don't convert raw rule "-{R|=>}-" to "=>"
23169 <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>
23173 Don't break link parsing if language converter markup is in the caption.
23175 language=sr variant=sr-ec
23177 [[Main Page|-{R|main page}-]]
23179 <p><a href="/wiki/Main_Page" title="Маин Паге">main page</a>
23182 <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>
23186 T146304: Don't break template parsing if language converter markup is in the parameter.
23188 language=sr variant=sr-ec
23195 <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>
23199 T146305: Don't break image parsing if language converter markup is in the caption.
23203 [[Датотека:Foobar.jpg|thumb|-{R|caption:}-]]
23205 <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>
23208 <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>
23212 T146305: Don't break image parsing if nested language converter markup is in the caption.
23214 language=zh variant=zh-cn
23216 [[File:Foobar.jpg|thumb|-{|zh-cn:blog (hk: -{zh-hans|WEBJOURNAL}-, tw: -{zh-hans|WEBLOG}-)}-]]
23218 <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>
23221 <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>
23224 # XXX html2wt disabled because rich markup in alt is not preserved.
23226 Don't break gallery if language converter markup is inside.
23231 File:foobar.jpg|[[File:foobar.jpg|20px|desc|alt=-{R|foo}-|-{R|bar}-]]|alt=-{R|bat}-
23232 File:foobar.jpg|{{Test|unamedParam|alt=-{R|param}-}}|alt=galleryalt
23235 <ul class="gallery mw-gallery-traditional">
23236 <li class="gallerybox" style="width: 155px"><div style="width: 155px">
23237 <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>
23238 <div class="gallerytext">
23239 <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>
23243 <li class="gallerybox" style="width: 155px"><div style="width: 155px">
23244 <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>
23245 <div class="gallerytext">
23246 <p>This is a test template
23253 <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"}}'>
23254 <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>
23255 <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>
23260 T153135: Don't break list handling if language converter markup is in the item.
23262 language=zh variant=zh-cn
23264 ;-{zh-cn:AAA;zh-tw:BBB}-
23268 <dt>foo:bar</dt></dl>
23271 <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>
23272 <dt data-parsoid='{"dsr":[25,39,1,0]}'><span typeof="mw:LanguageVariant" data-mw-variant='{"disabled":{"t":"foo:bar"}}'></span></dt>
23276 // Note that parsoid does not protect colons unless language converter
23277 // markup is properly nested, because it is a backtracking parser.
23279 T153135: Unclosed markup in definition list (code coverage)
23281 language=zh variant=zh-cn
23286 <dl><dt><b>foo:bar</b></dt><b>
23287 <dt>-{zh-cn:AAA</dt></b></dl><p><b>
23290 <dl><dt data-parsoid='{}'><b data-parsoid='{"stx":"html","autoInsertedEnd":true}'>foo:bar</b></dt><b data-parsoid='{"stx":"html","autoInsertedEnd":true,"autoInsertedStart":true}'>
23291 <dt data-parsoid='{}'>-{zh-cn</dt><dd data-parsoid='{"stx":"row"}'>AAA</dd></b></dl>
23295 T153135: Nested language converter markup in definition list (code coverage)
23297 language=zh variant=zh-cn
23299 ;-{|zh-cn:AAA -{zh-hans|foo:bar}- -{R|bat:baz}-}-:def
23301 <dl><dt>AAA foo:bar bat:baz</dt>
23305 <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>
23306 <dd data-parsoid='{"stx":"row","dsr":[49,53,1,0]}'>def</dd>
23310 # html2wt mode disabled due to <nowiki> insertion.
23312 T153140: Don't break table handling if language converter markup is in the cell.
23314 language=sr variant=sr-ec
23315 parsoid=wt2html,wt2wt,html2html
23332 <td><span typeof="mw:LanguageVariant" data-mw-variant='{"disabled":{"t":"B"}}'></span></td>
23339 Language converter tricky html2wt cases (1)
23342 parsoid=html2wt,wt2wt
23344 <p><span typeof="mw:LanguageVariant" data-mw-variant='{"disabled":{"t":"}-"}}'></span></p>
23346 -{<nowiki>}-</nowiki>}-
23353 Language converter tricky html2wt cases (2)
23356 parsoid=html2wt,wt2wt
23360 <nowiki>-{foo}-</nowiki>
23362 <p>-{foo}-
23367 Language converter tricky html2wt cases (3)
23370 parsoid=html2wt,wt2wt
23372 <p><span typeof="mw:LanguageVariant" data-mw-variant='{"disabled":{"t":"|"}}'></span></p>
23373 <p><span typeof="mw:LanguageVariant" data-mw-variant='{"disabled":{"t":"R|raw"}}'></span></p>
23374 <p><span typeof="mw:LanguageVariant" data-mw-variant='{"disabled":{"t":"-{foo}-"}}'></span></p>
23380 -{<nowiki>-{foo}-</nowiki>}-
23384 </p><p>-{foo}-
23389 Language converter tricky html2wt cases (4)
23392 parsoid=html2wt,wt2wt
23394 <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>
23402 # Note that the <nowiki> escaping added by parsoid for source text,
23403 # destination text, and language names only works on the PHP side
23404 # for *destination text*. (HTML entity escaping wouldn't work
23405 # any better.) This is probably a bug, at least for source texts.
23406 # (For language names PHP uses a precise regexp based on the languages
23407 # it currently knows have variants, which is fragile since this set
23408 # can grow/shrink over time.)
23410 Language converter tricky html2wt cases (5)
23412 language=zh variant=zh-cn
23414 <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>
23415 <p><meta typeof="mw:LanguageVariant" data-mw-variant='{"add":true,"oneway":[{"f":"A","l":"bo:g;us","t":"B"}]}'/></p>
23416 <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>
23417 <p><span typeof="mw:LanguageVariant" data-mw-variant='{"twoway":[{"l":"bo:g;us","t":"xyz"},{"l":"zh-cn","t":"abc"}]}'></span></p>
23420 -{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
23422 -{H|A=><nowiki>bo:g;us</nowiki>:B}-
23424 -{A|zh-tw:xyz; zh-cn:<nowiki>0;zh-tw:bar</nowiki>}-
23426 -{<nowiki>bo:g;us</nowiki>:xyz; zh-cn:abc}-
23429 !! html/php+disabled
23430 <p>foobat;xyz=>zh-cn:abc
23434 </p><p>a:b=>c 0;zh-tw:bar
23439 T179579: Nowiki and lc interaction
23446 -{123<nowiki>|</nowiki>456}-
23448 <p><span typeof="mw:LanguageVariant" data-mw-variant='{"disabled":{"t":"&lt;/nowiki>123"}}' data-parsoid='{"fl":[],"src":"-{</nowiki>123}-"}'></span></p>
23450 <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>
23454 T2529: Uncovered bullet
23464 T2529: Uncovered bullet in a deeply nested list
23466 *******Foo {{bullet}}
23468 <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>
23474 T2529: Uncovered table already at line-start
23497 T2529: Uncovered bullet in parser function result
23499 *Foo {{lc:{{bullet}} }}
23507 T7678: Double-parsed template argument
23509 {{lc:{{{1}}}|hello}}
23516 T7678: Double-parsed template invocation
23518 {{lc:{{paramtest {{!}} param = hello }} }}
23520 <p>{{paramtest | param = hello }}
23525 Case insensitivity of parser functions for non-ASCII characters (T10143)
23528 title=[[Main Page]]
23530 {{PRVNÍVELKÉ:ěščř}}
23531 {{prvnívelké:ěščř}}
23551 Morwen/13: Unclosed link followed by heading
23558 <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>
23563 HHP2.1: Heuristics for headings in preprocessor parenthetical structures
23570 <h1><span class="mw-headline" id="heading">heading</span></h1>
23575 HHP2.2: Heuristics for headings in preprocessor parenthetical structures
23582 <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>
23597 Paragraphs inside divs (no extra line breaks)
23609 Paragraphs inside divs (extra line break on open)
23624 Paragraphs inside divs (extra line break on close)
23639 Paragraphs inside divs (extra line break on open and close)
23655 # doBlockLevels screws up this output and Remex cleans up as much as it can.
23657 Nesting tags, paragraphs on lines which begin with <div>
23659 <div></div><strong>A
23662 <div></div><p><strong>A
23663 </strong></p><strong></strong><p><strong>B</strong>
23666 <div data-parsoid='{"stx":"html"}'></div><p><strong data-parsoid='{"stx":"html","autoInsertedEnd":true}'>A</strong></p>
23667 <p><strong data-parsoid='{"stx":"html","autoInsertedStart":true}'>B</strong></p>
23670 # T8200: <blockquote> should behave like <div> with respect to line breaks
23672 T8200: paragraphs inside blockquotes (no extra line breaks)
23674 <blockquote>Line one
23676 Line two</blockquote>
23678 <blockquote>Line one
23679 Line two</blockquote>
23682 <blockquote><p>Line one
23683 Line two</p></blockquote>
23687 T8200: paragraphs inside blockquotes (extra line break on open)
23692 Line two</blockquote>
23697 Line two</blockquote>
23703 Line two</p></blockquote>
23707 T8200: paragraphs inside blockquotes (extra line break on close)
23709 <blockquote>Line one
23714 <blockquote>Line one
23720 <blockquote><p>Line one
23727 T8200: paragraphs inside blockquotes (extra line break on open and close)
23743 ## This is a corner case interaction between the paragraph wrapping in the
23744 ## php parser's BlockLevelPass and Remex. `doBlockLevels` has a notion of
23745 ## some tags which close paragraphs (and thus prevent wrapping on their line),
23746 ## of which "div" is one, but do p-wrapping inside them. These are referred
23747 ## to as "never suppressing". Remex, for its part, doesn't traverse into
23748 ## "div"s to p-wrap. Hence, we only get this partial wrapping.
23750 Paragraphs inside blockquotes/divs (no extra line breaks)
23752 <blockquote><div>Line one
23754 Line two</div></blockquote>
23756 <blockquote><div>Line one
23757 Line two</div></blockquote>
23762 Paragraphs inside blockquotes/divs (extra line break on open)
23767 Line two</div></blockquote>
23772 Line two</div></blockquote>
23777 Paragraphs inside blockquotes/divs (extra line break on close)
23779 <blockquote><div>Line one
23782 </div></blockquote>
23784 <blockquote><div>Line one
23787 </div></blockquote>
23792 Paragraphs inside blockquotes/divs (extra line break on open and close)
23798 </div></blockquote>
23804 </div></blockquote>
23809 Interwiki links trounced by replaceExternalLinks after early LinkHolderArray expansion
23811 wgLinkHolderBatchSize=0
23817 <p><a href="http://www.usemod.com/cgi-bin/mb.pl?1" class="extiw" title="meatball:1">meatball:1</a>
23818 <a href="http://www.usemod.com/cgi-bin/mb.pl?2" class="extiw" title="meatball:2">meatball:2</a>
23819 <a href="http://www.usemod.com/cgi-bin/mb.pl?3" class="extiw" title="meatball:3">meatball:3</a>
23824 Free external link invading image caption
23826 [[Image:Foobar.jpg|thumb|http://x|hello]]
23828 <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>
23831 <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>
23835 T17196: localised external link numbers
23839 [http://en.wikipedia.org/]
23841 <p><a rel="nofollow" class="external autonumber" href="http://en.wikipedia.org/">[۱]</a>
23844 <p><a rel="mw:ExtLink" class="external autonumber" href="http://en.wikipedia.org/"></a></p>
23848 Multibyte character in padleft
23850 {{padleft:-Hello|7|Æ}}
23855 <p typeof="mw:Transclusion" data-mw='{"parts":[{"template":{"target":{"wt":"padleft:-Hello","function":"padleft"},"params":{"1":{"wt":"7"},"2":{"wt":"Æ"}},"i":0}}]}'>Æ-Hello</p>
23859 Multibyte character in padright
23861 {{padright:Hello-|7|Æ}}
23866 <p typeof="mw:Transclusion" data-mw='{"parts":[{"template":{"target":{"wt":"padright:Hello-","function":"padright"},"params":{"1":{"wt":"7"},"2":{"wt":"Æ"}},"i":0}}]}'>Hello-Æ</p>
23870 formatdate parser function
23872 {{#formatdate:2009-03-24}}
23874 <p><span class="mw-formatted-date" title="2009-03-24">2009-03-24</span>
23879 formatdate parser function, with default format
23881 {{#formatdate:2009-03-24|mdy}}
23883 <p><span class="mw-formatted-date" title="2009-03-24">March 24, 2009</span>
23888 Spacing of numbers in formatted dates
23890 {{#formatdate:January 15}}
23892 <p><span class="mw-formatted-date" title="01-15">January 15</span>
23897 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
23899 language=nl title=[[MediaWiki:Common.css]]
23901 {{#formatdate:2009-03-24|dmy}}
23903 <p><span class="mw-formatted-date" title="2009-03-24">24 March 2009</span>
23916 Edit comment with link
23920 I like the [[Main Page]] a lot
23922 I like the <a href="/wiki/Main_Page" title="Main Page">Main Page</a> a lot
23926 Edit comment with link and link text
23930 I like the [[Main Page|best pages]] a lot
23932 I like the <a href="/wiki/Main_Page" title="Main Page">best pages</a> a lot
23936 Edit comment with link and link text with suffix
23940 I like the [[Main Page|best page]]s a lot
23942 I like the <a href="/wiki/Main_Page" title="Main Page">best pages</a> a lot
23946 Edit comment with section link (non-local, eg in history list)
23948 comment title=[[Main Page]]
23950 /* External links */ removed bogus entries
23952 <a href="/wiki/Main_Page#External_links" title="Main Page">→</a><span dir="auto"><span class="autocomment">External links: </span> removed bogus entries</span>
23956 Edit comment with section link and text before it (non-local, eg in history list)
23958 comment title=[[Main Page]]
23960 pre-comment text /* External links */ removed bogus entries
23962 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>
23966 Edit comment with section link (local, eg in diff view)
23968 comment local title=[[Main Page]]
23970 /* External links */ removed bogus entries
23972 <a href="#External_links">→</a><span dir="auto"><span class="autocomment">External links: </span> removed bogus entries</span>
23976 Edit comment with subpage link (T16080)
23980 title=[[Subpage test]]
23982 Poked at a [[/subpage]] here...
23984 Poked at a <a href="/wiki/Subpage_test/subpage" title="Subpage test/subpage">/subpage</a> here...
23988 Edit comment with subpage link and link text (T16080)
23992 title=[[Subpage test]]
23994 Poked at a [[/subpage|neat little page]] here...
23996 Poked at a <a href="/wiki/Subpage_test/subpage" title="Subpage test/subpage">neat little page</a> here...
24000 Edit comment with bogus subpage link in non-subpage NS (T16080)
24003 title=[[Subpage test]]
24005 Poked at a [[/subpage]] here...
24007 Poked at a <a href="/index.php?title=/subpage&action=edit&redlink=1" class="new" title="/subpage (page does not exist)">/subpage</a> here...
24011 Edit comment with bare anchor link (local, as on diff)
24015 title=[[Main Page]]
24019 <a href="#section">#section</a>
24023 Edit comment with bare anchor link (non-local, as on history)
24026 title=[[Main Page]]
24030 <a href="/wiki/Main_Page#section" title="Main Page">#section</a>
24034 Anchor starting with underscore
24040 <p><a href="#_ref">One</a>
24043 <p><a rel="mw:WikiLink" href="./Foo#_ref" data-parsoid='{"stx":"piped","a":{"href":"./Foo#_ref"},"sa":{"href":"#_ref"}}'>One</a></p>
24047 Id starting with underscore
24049 <div id="_ref"></div>
24051 <div id="_ref"></div>
24056 Edit comment with link with more than one pipe (T99346)
24060 [[Main Page|Many|pipes]]
24062 <a href="/wiki/Main_Page" title="Main Page">Many|pipes</a>
24066 Complex edit comment with link with more than one pipe (T99346)
24070 Created page with "<noinclude>[[Category:Requests for permissions/Bot|{{subst:#titleparts:{{subst:PAGENAME}}|1|3}}]]</noinclude> === [[User:MineoBot|]] 8=== {{Request for permissions/links|Mineo..."
24072 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..."
24076 Space normalisation on autocomment (T24784)
24079 title=[[Main Page]]
24081 /* __hello__world__ */
24083 <a href="/wiki/Main_Page#hello_world" title="Main Page">→</a><span dir="auto"><span class="autocomment">__hello__world__</span></span>
24087 percent-encoding and + signs in comments (T28410)
24091 [[ABC%33D% ++]] [[ABC%33D% ++|+%20]]
24093 <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>
24096 # Parsoid doesn't support this yet: see T75581
24097 # but it *should* omit the 'src' attribute if the image is bad.
24098 # PHP side of tests was disabled in
24099 # mediawiki/core:6bd31e7d95161a6e88fa86df60871051da997c3c
24100 # because of issues in the PHP parserTests infrastructure
24101 # (but the output below is indeed what the PHP side emits)
24103 Bad images - basic functionality
24106 !! html/php+disabled
24108 <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>
24112 Bad images - T18039: text after bad image disappears
24117 !! html/php+disabled
24123 <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>
24128 Verify that displaytitle works (T24501) no displaytitle
24132 wgAllowDisplayTitle=true
24133 wgRestrictDisplayTitle=false
24135 this is not the the title
24138 <p>this is not the the title
24143 Verify that displaytitle works (T24501) RestrictDisplayTitle=false
24148 wgAllowDisplayTitle=true
24149 wgRestrictDisplayTitle=false
24151 this is not the the title
24152 {{DISPLAYTITLE:whatever}}
24155 <p>this is not the the title
24160 Verify that displaytitle works (T24501) RestrictDisplayTitle=true mismatch
24165 wgAllowDisplayTitle=true
24166 wgRestrictDisplayTitle=true
24168 this is not the the title
24169 {{DISPLAYTITLE:whatever}}
24172 <p>this is not the the title
24177 Verify that displaytitle works (T24501) RestrictDisplayTitle=true matching
24182 wgAllowDisplayTitle=true
24183 wgRestrictDisplayTitle=true
24185 this is not the the title
24186 {{DISPLAYTITLE:screen}}
24189 <p>this is not the the title
24194 Verify that displaytitle works (T24501) AllowDisplayTitle=false
24199 wgAllowDisplayTitle=false
24201 this is not the the title
24202 {{DISPLAYTITLE:screen}}
24205 <p>this is not the the title
24206 <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>
24211 Verify that displaytitle works (T24501) AllowDisplayTitle=false no DISPLAYTITLE
24216 wgAllowDisplayTitle=false
24218 this is not the the title
24221 <p>this is not the the title
24226 Verify that displaytitle handles inline CSS styles (T28547) - rejected value
24231 wgAllowDisplayTitle=true
24232 wgRestrictDisplayTitle=true
24234 this is not the the title
24235 {{DISPLAYTITLE:<span style="display: none;">s</span>creen}}
24237 <span style="/* attempt to bypass $wgRestrictDisplayTitle */">s</span>creen
24238 <p>this is not the the title
24243 Verify that displaytitle handles inline CSS styles (T28547) - accepted value
24248 wgAllowDisplayTitle=true
24249 wgRestrictDisplayTitle=true
24251 this is not the the title
24252 {{DISPLAYTITLE:<span style="color: red;">s</span>creen}}
24254 <span style="color: red;">s</span>creen
24255 <p>this is not the the title
24260 Page status indicators: Empty name is invalid
24264 <indicator name=" "></indicator>
24265 <indicator></indicator>
24267 <p><span class="error"><strong>Error:</strong> Page status indicators' <code>name</code> attribute must not be empty.</span>
24268 <span class="error"><strong>Error:</strong> Page status indicators' <code>name</code> attribute must not be empty.</span>
24273 Page status indicators: Weird syntaxes that are okay
24277 <indicator name="empty" />
24278 <indicator name="name"></indicator>
24287 Page status indicators: Torture test
24291 <indicator name="01">hello world</indicator>
24292 <indicator name="02">[[Main Page]]</indicator>
24293 <indicator name="03">[[File:Foobar.jpg|25px|link=]]</indicator>
24294 <indicator name="04">[[File:Foobar.jpg|25px]]</indicator>
24295 <indicator name="05">*foo
24297 <indicator name="06"><nowiki>foo</nowiki></indicator>
24298 <indicator name="07"> Preformatted</indicator>
24299 <indicator name="08"><div>Broken tag</indicator>
24300 <indicator name="09">{| class=wikitable
24303 <indicator name="10">Two
24305 paragraphs</indicator>
24308 02=<a href="/wiki/Main_Page" title="Main Page">Main Page</a>
24309 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" />
24310 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>
24311 05=<ul><li>foo</li>
24315 07=<pre>Preformatted
24317 08=<div>Broken tag</div>
24319 09=<table class="wikitable">
24336 preload: check <noinclude> and <includeonly>
24340 Hello <noinclude>cruel</noinclude><includeonly>kind</includeonly> world.
24346 preload: check <onlyinclude>
24350 Goodbye <onlyinclude>Hello world</onlyinclude>
24356 preload: can pass tags through if we want to
24360 <includeonly><</includeonly>includeonly>Hello world<includeonly><</includeonly>/includeonly>
24362 <includeonly>Hello world</includeonly>
24366 preload: check that it doesn't try to do tricks
24370 * <!-- Hello --> ''{{world}}'' {{<includeonly>subst:</includeonly>How are you}}{{ {{{|safesubst:}}} #if:1|2|3}}
24372 * <!-- Hello --> ''{{world}}'' {{subst:How are you}}{{ {{{|safesubst:}}} #if:1|2|3}}
24376 Play a bit with r67090 and T5158
24378 <div style="width:50% !important"> </div>
24379 <div style="width:50% !important"> </div>
24380 <div style="width:50% !important"> </div>
24381 <div style="border : solid;"> </div>
24383 <div style="width:50% !important"> </div>
24384 <div style="width:50% !important"> </div>
24385 <div style="width:50% !important"> </div>
24386 <div style="border : solid;"> </div>
24389 <div style="width:50% !important" data-parsoid='{"stx":"html"}'><span typeof="mw:Entity" data-parsoid='{"srcContent":" "}'> </span></div>
24390 <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>
24391 <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>
24392 <div style="border : solid;" data-parsoid='{"stx":"html"}'><span typeof="mw:Entity" data-parsoid='{"srcContent":" "}'> </span></div>
24397 French spaces in wikitext
24399 foo ! bar ? bat 50 % is less than 75 %.
24401 Hello : this ; is « something ‹ else › again »
24403 <p>foo ! bar ? bat 50 % is less than 75 %.
24404 </p><p>Hello : this ; is « something ‹ else › again »
24408 # It would be reasonable for Parsoid and PHP to differ here.
24409 # The PHP behavior is arguably a bug.
24411 Corner case: french spaces in definition list
24415 <dl><dt>foo </dt>
24420 T5158: Test for French spaces in attributes
24422 <br style=" clear : both ; " />
24424 <p><br style="clear : both ;" />
24429 HTML5 data attributes
24431 <span data-foo="bar">Baz</span>
24432 <p data-abc-def_hij="">Quuz</p>
24434 <p><span data-foo="bar">Baz</span>
24436 <p data-abc-def_hij="">Quuz</p>
24439 <p><span data-foo="bar" data-parsoid='{"stx":"html"}'>Baz</span></p>
24440 <p data-abc-def_hij="" data-parsoid='{"stx":"html"}'>Quuz</p>
24444 Strip reserved data attributes
24446 <div data-mw="foo" data-parsoid="bar" data-mw-someext="baz" data-ok="fred" data-ooui="xyzzy" data-bad:ns="ns">d</div>
24448 <div data-ok="fred">d</div>
24451 <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>
24455 percent-encoding and + signs in internal links (T28410)
24457 [[User:+%]] [[Page+title%]]
24458 [[%+]] [[%+|%20]] [[%+ ]] [[%+r]]
24459 [[%]] [[+]] [[File:%+abc%39|foo|[[bar]]]]
24460 [[%33%45]] [[%33%45+]]
24462 <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>
24463 <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>
24464 <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>
24465 <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>
24468 <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>
24469 <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>
24470 <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>
24471 <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>
24475 Special characters in embedded file links (T29679)
24477 [[File:Contains & ampersand.jpg]]
24478 [[File:Does not exist.jpg|Title with & ampersand]]
24480 <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>
24481 <a href="/index.php?title=Special:Upload&wpDestFile=Does_not_exist.jpg" class="new" title="File:Does not exist.jpg">Title with & ampersand</a>
24484 <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>
24485 <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>
24489 Confirm that 'apos' named character reference doesn't make it to output (not legal in HTML 4)
24491 Text's been normalized?
24493 <p>Text's been normalized?
24498 T21052 U+3000 IDEOGRAPHIC SPACE should terminate free external links
24500 http://www.example.org/ <-- U+3000 (vim: ^Vu3000)
24502 <p><a rel="nofollow" class="external free" href="http://www.example.org/">http://www.example.org/</a> <-- U+3000 (vim: ^Vu3000)
24507 T21052 U+3000 IDEOGRAPHIC SPACE should terminate bracketed external links
24509 [http://www.example.org/ ideograms]
24511 <p><a rel="nofollow" class="external text" href="http://www.example.org/">ideograms</a>
24516 T21052 U+3000 IDEOGRAPHIC SPACE should terminate external images links
24518 http://www.example.org/pic.png <-- U+3000 (vim: ^Vu3000)
24520 <p><img src="http://www.example.org/pic.png" alt="pic.png"/> <-- U+3000 (vim: ^Vu3000)
24544 T33098 Template which includes system messages which includes the template
24548 <p><span class="error">Template loop detected: <a href="/wiki/Template:Identical" title="Template:Identical">Template:Identical</a></span>
24549 <span class="error">Template loop detected: <a href="/wiki/Template:Identical" title="Template:Identical">Template:Identical</a></span>
24554 T33490 Turkish: ucfirst 'blah'
24565 T33490 Turkish: ucfirst 'ix'
24576 T33490 Turkish: lcfirst 'BLAH'
24587 T33490 Turkish: ucfırst (with a dotless i)
24593 <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>
24598 T33490 ucfırst (with a dotless i) with English language
24604 <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>
24608 # Note that Parsoid doesn't emit an explicit TOC.
24609 # Note also that the html2wt direction tends to emit an extra newline
24610 # between the __TOC__ magicword and the first heading unless *both*
24611 # the <meta> and the <h2> have a data-parsoid attribute set (even if
24615 T28375: TOC with italics
24617 title=[[Main Page]]
24620 ==''Lost'' episodes==
24622 <div id="toc" class="toc"><input type="checkbox" role="button" id="toctogglecheckbox" class="toctogglecheckbox" style="display:none"/><div class="toctitle" lang="en" dir="ltr"><h2>Contents</h2><span class="toctogglespan"><label class="toctogglelabel" for="toctogglecheckbox"></label></span></div>
24624 <li class="toclevel-1 tocsection-1"><a href="#Lost_episodes"><span class="tocnumber">1</span> <span class="toctext"><i>Lost</i> episodes</span></a></li>
24628 <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>
24631 <meta property="mw:PageProp/toc" data-parsoid='{}'/>
24632 <h2 id="Lost_episodes" data-parsoid='{}'><i>Lost</i> episodes</h2>
24636 T28375: TOC with bold
24638 title=[[Main Page]]
24641 =='''should be bold''' then normal text==
24643 <div id="toc" class="toc"><input type="checkbox" role="button" id="toctogglecheckbox" class="toctogglecheckbox" style="display:none"/><div class="toctitle" lang="en" dir="ltr"><h2>Contents</h2><span class="toctogglespan"><label class="toctogglelabel" for="toctogglecheckbox"></label></span></div>
24645 <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>
24649 <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>
24652 <meta property="mw:PageProp/toc" data-parsoid='{}'/>
24653 <h2 id="should_be_bold_then_normal_text" data-parsoid='{}'><b>should be bold</b> then normal text</h2>
24657 T35845: Headings become cursive in TOC when they contain an image
24659 title=[[Main Page]]
24662 ==Image [[Image:foobar.jpg]]==
24664 <div id="toc" class="toc"><input type="checkbox" role="button" id="toctogglecheckbox" class="toctogglecheckbox" style="display:none"/><div class="toctitle" lang="en" dir="ltr"><h2>Contents</h2><span class="toctogglespan"><label class="toctogglelabel" for="toctogglecheckbox"></label></span></div>
24666 <li class="toclevel-1 tocsection-1"><a href="#Image"><span class="tocnumber">1</span> <span class="toctext">Image</span></a></li>
24670 <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>
24673 <meta property="mw:PageProp/toc" data-parsoid='{}'/>
24674 <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>
24678 T35845 (2): Headings become bold in TOC when they contain a blockquote
24680 title=[[Main Page]]
24683 ==<blockquote>Quote</blockquote>==
24685 <div id="toc" class="toc"><input type="checkbox" role="button" id="toctogglecheckbox" class="toctogglecheckbox" style="display:none"/><div class="toctitle" lang="en" dir="ltr"><h2>Contents</h2><span class="toctogglespan"><label class="toctogglelabel" for="toctogglecheckbox"></label></span></div>
24687 <li class="toclevel-1 tocsection-1"><a href="#Quote"><span class="tocnumber">1</span> <span class="toctext">Quote</span></a></li>
24691 <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>
24694 <div id="toc" class="toc"><input type="checkbox" role="button" id="toctogglecheckbox" class="toctogglecheckbox" style="display:none" /><div class="toctitle" lang="en" dir="ltr"><h2>Contents</h2><span class="toctogglespan"><label class="toctogglelabel" for="toctogglecheckbox"></label></span></div>
24696 <li class="toclevel-1 tocsection-1"><a href="#Quote"><span class="tocnumber">1</span> <span class="toctext">Quote</span></a></li>
24700 <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>
24702 <meta property="mw:PageProp/toc" data-parsoid='{}'/>
24703 <h2 id="Quote" data-parsoid='{}'><blockquote><p>Quote</p></blockquote></h2>
24707 Unclosed tags in TOC
24709 wgFragmentMode=[ 'html5', 'legacy' ]
24711 title=[[Main Page]]
24715 <small>Hanc marginis exiguitas non caperet.</small>
24718 <div id="toc" class="toc"><input type="checkbox" role="button" id="toctogglecheckbox" class="toctogglecheckbox" style="display:none"/><div class="toctitle" lang="en" dir="ltr"><h2>Contents</h2><span class="toctogglespan"><label class="toctogglelabel" for="toctogglecheckbox"></label></span></div>
24720 <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>
24724 <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>
24725 <p><small>Hanc marginis exiguitas non caperet.</small>
24729 <meta property="mw:PageProp/toc" data-parsoid='{}'/>
24730 <h2 id="Proof:_2_<_3" data-parsoid='{}'><span id="Proof:_2_.3C_3" typeof="mw:FallbackId"></span>Proof: 2 < 3</h2>
24731 <p><small>Hanc marginis exiguitas non caperet.</small>
24736 Multiple tags in TOC
24739 ==<i>Foo</i> <b>Bar</b>==
24741 ==<i>Foo</i> <blockquote>Bar</blockquote>==
24743 <div id="toc" class="toc"><input type="checkbox" role="button" id="toctogglecheckbox" class="toctogglecheckbox" style="display:none"/><div class="toctitle" lang="en" dir="ltr"><h2>Contents</h2><span class="toctogglespan"><label class="toctogglelabel" for="toctogglecheckbox"></label></span></div>
24745 <li class="toclevel-1 tocsection-1"><a href="#Foo_Bar"><span class="tocnumber">1</span> <span class="toctext"><i>Foo</i> <b>Bar</b></span></a></li>
24746 <li class="toclevel-1 tocsection-2"><a href="#Foo_Bar_2"><span class="tocnumber">2</span> <span class="toctext"><i>Foo</i> Bar</span></a></li>
24750 <h2><span class="mw-headline" id="Foo_Bar"><i>Foo</i> <b>Bar</b></span><span class="mw-editsection"><span class="mw-editsection-bracket">[</span><a href="/index.php?title=Parser_test&action=edit&section=1" title="Edit section: Foo Bar">edit</a><span class="mw-editsection-bracket">]</span></span></h2>
24751 <h2><span class="mw-headline" id="Foo_Bar_2"><i>Foo</i> <blockquote>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>
24754 <div id="toc" class="toc"><input type="checkbox" role="button" id="toctogglecheckbox" class="toctogglecheckbox" style="display:none" /><div class="toctitle" lang="en" dir="ltr"><h2>Contents</h2><span class="toctogglespan"><label class="toctogglelabel" for="toctogglecheckbox"></label></span></div>
24756 <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>
24757 <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>
24761 <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>
24762 <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>
24764 <meta property="mw:PageProp/toc" data-parsoid='{}'/>
24765 <h2 id="Foo_Bar" data-parsoid='{}'><i data-parsoid='{"stx":"html"}'>Foo</i> <b data-parsoid='{"stx":"html"}'>Bar</b></h2>
24767 <h2 id="Foo_Bar_2" data-parsoid='{}'><i data-parsoid='{"stx":"html"}'>Foo</i> <blockquote><p>Bar</p></blockquote></h2>
24770 # Don't expect Parsoid to roundtrip this until the php parser comes closer to
24771 # html5 tag parsing.
24773 Tags with parameters in TOC
24778 ==<sup class="in-h2">Hello</sup>==
24780 ==<sup class="a > b">Evilbye</sup>==
24782 <div id="toc" class="toc"><input type="checkbox" role="button" id="toctogglecheckbox" class="toctogglecheckbox" style="display:none"/><div class="toctitle" lang="en" dir="ltr"><h2>Contents</h2><span class="toctogglespan"><label class="toctogglelabel" for="toctogglecheckbox"></label></span></div>
24784 <li class="toclevel-1 tocsection-1"><a href="#Hello"><span class="tocnumber">1</span> <span class="toctext"><sup>Hello</sup></span></a></li>
24785 <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>
24789 <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>
24790 <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>
24793 <meta property="mw:PageProp/toc" />
24794 <h2 id="Hello"><sup class="in-h2" data-parsoid='{"stx":"html"}'>Hello</sup></h2>
24796 <h2 id='b">Evilbye'><span id="b.22.3EEvilbye" typeof="mw:FallbackId"></span><sup class="a " data-parsoid='{"stx":"html"}'> b">Evilbye</sup></h2>
24800 span tags with directionality in TOC
24803 ==<span dir="ltr">C++</span>==
24805 ==<span dir="rtl">זבנג!</span>==
24807 ==<span style="font-style: italic">The attributes on these span tags must be deleted from the TOC</span>==
24809 ==<span style="font-style: italic" dir="ltr">All attributes on these span tags must be deleted from the TOC</span>==
24811 ==<span dir="ltr" style="font-style: italic">Attributes after dir on these span tags must be deleted from the TOC</span>==
24813 <div id="toc" class="toc"><input type="checkbox" role="button" id="toctogglecheckbox" class="toctogglecheckbox" style="display:none"/><div class="toctitle" lang="en" dir="ltr"><h2>Contents</h2><span class="toctogglespan"><label class="toctogglelabel" for="toctogglecheckbox"></label></span></div>
24815 <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>
24816 <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>
24817 <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>
24818 <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>
24819 <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>
24823 <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>
24824 <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>
24825 <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>
24826 <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>
24827 <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>
24830 <meta property="mw:PageProp/toc" data-parsoid='{}'/>
24831 <h2 id="C++" data-parsoid='{}'><span id="C.2B.2B" typeof="mw:FallbackId"></span><span dir="ltr">C++</span></h2>
24832 <h2 id="זבנג!"><span id=".D7.96.D7.91.D7.A0.D7.92.21" typeof="mw:FallbackId"></span><span dir="rtl">זבנג!</span></h2>
24833 <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>
24834 <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>
24835 <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>
24839 T74884: bdi element in ToC
24842 ==<bdi>test</bdi>==
24844 <div id="toc" class="toc"><input type="checkbox" role="button" id="toctogglecheckbox" class="toctogglecheckbox" style="display:none"/><div class="toctitle" lang="en" dir="ltr"><h2>Contents</h2><span class="toctogglespan"><label class="toctogglelabel" for="toctogglecheckbox"></label></span></div>
24846 <li class="toclevel-1 tocsection-1"><a href="#test"><span class="tocnumber">1</span> <span class="toctext"><bdi>test</bdi></span></a></li>
24850 <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>
24853 <meta property="mw:PageProp/toc" data-parsoid='{}'/>
24854 <h2 id="test" data-parsoid='{}'><bdi>test</bdi></h2>
24858 T35715: s/strike element in ToC
24861 ==<s>test</s> test <strike>test</strike>==
24863 <div id="toc" class="toc"><input type="checkbox" role="button" id="toctogglecheckbox" class="toctogglecheckbox" style="display:none"/><div class="toctitle" lang="en" dir="ltr"><h2>Contents</h2><span class="toctogglespan"><label class="toctogglelabel" for="toctogglecheckbox"></label></span></div>
24865 <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>
24869 <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>
24872 <meta property="mw:PageProp/toc" data-parsoid='{}'/>
24873 <h2 id="test_test_test" data-parsoid='{}'><s>test</s> test <strike>test</strike></h2>
24877 T198618: style element in ToC
24882 ==<style>.foo {}</style>Style<style>.bar {}</style>==
24884 <div id="toc" class="toc"><input type="checkbox" role="button" id="toctogglecheckbox" class="toctogglecheckbox" style="display:none"/><div class="toctitle" lang="en" dir="ltr"><h2>Contents</h2><span class="toctogglespan"><label class="toctogglelabel" for="toctogglecheckbox"></label></span></div>
24886 <li class="toclevel-1 tocsection-1"><a href="#Style"><span class="tocnumber">1</span> <span class="toctext">Style</span></a></li>
24890 <h2><span class="mw-headline" id="Style"><style>.foo {}</style>Style<style>.bar {}</style></span><span class="mw-editsection"><span class="mw-editsection-bracket">[</span><a href="/index.php?title=Parser_test&action=edit&section=1" title="Edit section: Style">edit</a><span class="mw-editsection-bracket">]</span></span></h2>
24893 <meta property="mw:PageProp/toc" data-parsoid='{}'/>
24894 <h2 id="Style" data-parsoid='{}'><style>.foo {}</style>Style<style>.bar {}</style></h2>
24898 Empty <p> tag in TOC, removed by Sanitizer (T92892)
24903 <div id="toc" class="toc"><input type="checkbox" role="button" id="toctogglecheckbox" class="toctogglecheckbox" style="display:none"/><div class="toctitle" lang="en" dir="ltr"><h2>Contents</h2><span class="toctogglespan"><label class="toctogglelabel" for="toctogglecheckbox"></label></span></div>
24905 <li class="toclevel-1 tocsection-1"><a href="#x"><span class="tocnumber">1</span> <span class="toctext">x</span></a></li>
24909 <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>
24912 <meta property="mw:PageProp/toc" data-parsoid='{}'/>
24913 <h2 id="x" data-parsoid='{}'>x</h2>
24919 == {{int:headline_sample}} ==
24923 T34057: Title needed when expanding <h> nodes.
24925 title=[[Main Page]]
24929 <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>
24934 Strip marker in urlencode
24936 {{urlencode:x<nowiki/>y}}
24937 {{urlencode:x<nowiki/>y|wiki}}
24938 {{urlencode:x<nowiki/>y|path}}
24939 {{urlencode:x<pre id="one">two</pre>y}}
24967 Strip marker in formatNum
24969 {{formatnum:1<nowiki/>2}}
24970 {{formatnum:1<nowiki/>2|R}}
24978 Check noCommafy in formatNum
24982 {{formatnum:123456.78}}
24983 {{formatnum:123456.78|NOSEP}}
24991 Wrong option for formatNum (T58199)
24993 {{formatnum:1,234.56|Random}}
24994 {{formatnum:1,234.56|EVERYTHING}}
24995 {{formatnum:1234.56|any argument that has the string 'NOSEP'}}
25004 Strip marker in grammar
25008 {{grammar:elative|foo<nowiki/>bar}}
25015 Strip marker in padleft
25017 {{padleft:|2|x<nowiki/>y}}
25024 Strip marker in padright
25026 {{padright:|2|x<nowiki/>y}}
25033 Strip marker in anchorencode
25035 {{anchorencode:x<nowiki/>y}}
25040 <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>
25044 nowiki inside link inside heading (T20295)
25046 ==[[foo|x<nowiki>y</nowiki>z]]==
25048 <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>
25053 new support for bdi element (T33817)
25055 <p dir="rtl" lang="he">ולדימיר לנין (ברוסית: <bdi lang="ru">Владимир Ленин</bdi>, 24 באפריל 1870–22 בינואר 1924) הוא מנהיג פוליטי קומוניסטי רוסי.</p>
25057 <p dir="rtl" lang="he">ולדימיר לנין (ברוסית: <bdi lang="ru">Владимир Ленин</bdi>, 24 באפריל 1870–22 בינואר 1924) הוא מנהיג פוליטי קומוניסטי רוסי.</p>
25062 Ignore pipe between table row attributes
25066 |- id=foo | style='color: red'
25074 <tr id="foo" style="color: red">
25081 Language parser function
25090 Padleft and padright (default 0-padding)
25099 <p><span typeof="mw:Transclusion" data-mw='{"parts":[{"template":{"target":{"wt":"padleft:xyz","function":"padleft"},"params":{"1":{"wt":"5"}},"i":0}}]}'>00xyz</span>
25100 <span typeof="mw:Transclusion" data-mw='{"parts":[{"template":{"target":{"wt":"padright:xyz","function":"padright"},"params":{"1":{"wt":"5"}},"i":0}}]}'>xyz00</span></p>
25104 Padleft and padright (partial fill)
25106 {{padleft:xyz|6|ab}}
25107 {{padright:xyz|6|ab}}
25113 <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>
25114 <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>
25118 Padleft and padright as substr
25120 {{padleft:|3|abcde}}
25121 {{padright:|3|abcde}}
25127 <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>
25128 <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>
25132 Padleft and padright with non-numerical length (T180403)
25134 {{padleft:abcdef|junk}}
25135 {{padright:abcdef|junk}}
25143 Special parser function
25145 {{#special:RandomPage}}
25146 {{#special:BaDtItLe}}
25147 {{#special:Foobar}}
25156 T36939 - Case insensitive link parsing ([HttP://])
25158 [HttP://MediaWiki.Org/]
25160 <p><a rel="nofollow" class="external autonumber" href="HttP://MediaWiki.Org/">[1]</a>
25163 <p><a rel="mw:ExtLink" class="external autonumber" href="HttP://MediaWiki.Org/"></a></p>
25167 T36939 - Case insensitive link parsing ([HttP:// title])
25169 [HttP://MediaWiki.Org/ MediaWiki]
25171 <p><a rel="nofollow" class="external text" href="HttP://MediaWiki.Org/">MediaWiki</a>
25176 T36939 - Case insensitive link parsing (HttP://)
25178 HttP://MediaWiki.Org/
25180 <p><a rel="nofollow" class="external free" href="HttP://MediaWiki.Org/">HttP://MediaWiki.Org/</a>
25183 <p><a rel="mw:ExtLink" class="external free" href="HttP://MediaWiki.Org/">HttP://MediaWiki.Org/</a></p>
25201 <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>
25202 <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>
25203 <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>
25204 <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>
25205 <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>
25211 ### Parsoid-specific tests
25212 ### Parsoid-PHP parser incompatibilities
25215 1. SOL-sensitive wikitext tokens as template-args
25217 parsoid=wt2html,wt2wt
25223 <span about="#mwt1" typeof="mw:Transclusion">
25224 </span><ul about="#mwt1"><li>a</li>
25226 <span about="#mwt2" typeof="mw:Transclusion">
25227 </span><ol about="#mwt2"><li>a</li>
25229 <span about="#mwt3" typeof="mw:Transclusion">
25230 </span><dl about="#mwt3"><dd>a</dd>
25234 #### -----------------------------------------------------------------
25235 #### Parsoid-specific functionality tests
25236 #### -----------------------------------------------------------------
25238 # T65642/T68749: Formatting elt fixup around images.
25239 # We know wt2wt will fail, but we expect selser to pass.
25240 # Due to the nature of our testing, wt2wt and selser tests will enter the
25241 # blacklist and we'll catch selser regressions based on changes to the
25242 # blacklist entries for selser tests.
25244 1. Treebuilder fixup of formatting elt
25246 parsoid=wt2html,wt2wt
25251 [[Image:Foobar.jpg|right|Test]]
25259 </small></p><small>
25260 <div class="floatright"><a href="/wiki/File:Foobar.jpg" class="image" title="Test"><img alt="Test" src="http://example.com/images/3/3a/Foobar.jpg" width="1941" height="220" /></a></div>
25261 </small><p><small></small>
25263 </td></tr></tbody></table>
25267 <p><small data-parsoid='{"stx":"html","autoInsertedEnd":true}'></small></p><small data-parsoid='{"stx":"html","autoInsertedEnd":true,"autoInsertedStart":true}'>
25268 <figure class="mw-default-size mw-halign-right" typeof="mw:Image"><a href="./File:Foobar.jpg"><img resource="./File:Foobar.jpg" src="//example.com/images/3/3a/Foobar.jpg" data-file-width="1941" data-file-height="220" data-file-type="bitmap" height="220" width="1941"/></a><figcaption>Test</figcaption></figure></small>
25269 <p><small data-parsoid='{"stx":"html","autoInsertedStart":true}'></small></p></td></tr>
25274 2. Treebuilder fixup of formatting elt
25276 parsoid=wt2html,wt2wt
25278 '''foo[[File:Foobar.jpg|thumb|caption]]bar'''
25280 <small>[[Image:Foobar.jpg|right|300px]]</small>
25282 <p><b>foo</b></p><b><div class="thumb tright"><div class="thumbinner" style="width:182px;"><a href="/wiki/File:Foobar.jpg" class="image"><img alt="" src="http://example.com/images/thumb/3/3a/Foobar.jpg/180px-Foobar.jpg" width="180" height="20" class="thumbimage" srcset="http://example.com/images/thumb/3/3a/Foobar.jpg/270px-Foobar.jpg 1.5x, http://example.com/images/thumb/3/3a/Foobar.jpg/360px-Foobar.jpg 2x" /></a> <div class="thumbcaption"><div class="magnify"><a href="/wiki/File:Foobar.jpg" class="internal" title="Enlarge"></a></div>caption</div></div></div></b><p><b>bar</b>
25283 </p><small><div class="floatright"><a href="/wiki/File:Foobar.jpg" class="image"><img alt="Foobar.jpg" src="http://example.com/images/thumb/3/3a/Foobar.jpg/300px-Foobar.jpg" width="300" height="34" srcset="http://example.com/images/thumb/3/3a/Foobar.jpg/450px-Foobar.jpg 1.5x, http://example.com/images/thumb/3/3a/Foobar.jpg/600px-Foobar.jpg 2x" /></a></div></small>
25285 <p><b>foo</b></p><b><figure class="mw-default-size" typeof="mw:Image/Thumb"><a href="./File:Foobar.jpg"><img resource="./File:Foobar.jpg" src="//example.com/images/thumb/3/3a/Foobar.jpg/220px-Foobar.jpg" data-file-width="1941" data-file-height="220" data-file-type="bitmap" height="25" width="220"/></a><figcaption>caption</figcaption></figure></b><p><b>bar</b></p>
25287 <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>
25291 3. Treebuilder fixup of formatting elt
25293 parsoid=wt2html,wt2wt
25295 <small>'''foo[[File:Foobar.jpg|thumb|caption]]bar'''</small>
25297 <p><small><b>foo</b></small></p><small><b><div class="thumb tright"><div class="thumbinner" style="width:182px;"><a href="/wiki/File:Foobar.jpg" class="image"><img alt="" src="http://example.com/images/thumb/3/3a/Foobar.jpg/180px-Foobar.jpg" width="180" height="20" class="thumbimage" srcset="http://example.com/images/thumb/3/3a/Foobar.jpg/270px-Foobar.jpg 1.5x, http://example.com/images/thumb/3/3a/Foobar.jpg/360px-Foobar.jpg 2x" /></a> <div class="thumbcaption"><div class="magnify"><a href="/wiki/File:Foobar.jpg" class="internal" title="Enlarge"></a></div>caption</div></div></div></b></small><p><small><b>bar</b></small>
25300 <p><small><b>foo</b></small></p><small><b><figure class="mw-default-size" typeof="mw:Image/Thumb"><a href="./File:Foobar.jpg"><img resource="./File:Foobar.jpg" src="//example.com/images/thumb/3/3a/Foobar.jpg/220px-Foobar.jpg" data-file-width="1941" data-file-height="220" data-file-type="bitmap" height="25" width="220"/></a><figcaption>caption</figcaption></figure></b></small><p><small><b>bar</b></small></p>
25304 4. Treebuilder fixup of formatting elt: formatting tags around captionless images
25306 parsoid=wt2html,wt2wt
25308 '''<small>[[Image:Foobar.jpg|right|300px]]</small>'''
25310 <b><small><div class="floatright"><a href="/wiki/File:Foobar.jpg" class="image"><img alt="Foobar.jpg" src="http://example.com/images/thumb/3/3a/Foobar.jpg/300px-Foobar.jpg" width="300" height="34" srcset="http://example.com/images/thumb/3/3a/Foobar.jpg/450px-Foobar.jpg 1.5x, http://example.com/images/thumb/3/3a/Foobar.jpg/600px-Foobar.jpg 2x" /></a></div></small></b>
25312 <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>
25315 #### ----------------------------------------------------------------
25316 #### Parsoid-only testing of Parsoid's impl of LST
25317 #### Not implemented yet, see
25318 #### https://www.mediawiki.org/wiki/Parsoid/HTML_based_LST
25319 #### ----------------------------------------------------------------
25321 ## We still need to support serializing the older format while content is stored.
25323 LST Sections: Backwards compatibility
25326 "suppressErrors": true,
25327 "modes": ["html2wt"]
25330 <section begin="2011-05-16" />
25331 <section end="2014-04-10 (MW 1.23wmf22)" />
25333 <p><meta typeof="mw:Extension/LabeledSectionTransclusion/begin" content="2011-05-16"/>
25334 <meta typeof="mw:Extension/LabeledSectionTransclusion/end" content="2014-04-10 (MW 1.23wmf22)"/></p>
25338 LST Sections: Newfangled approach
25340 <section begin="2011-05-16" />
25341 <section end="2014-04-10 (MW 1.23wmf22)" />
25343 <p><span typeof="mw:Extension/section" about="#mwt4" data-mw='{"name":"section","attrs":{"begin":"2011-05-16"}}'>
25345 <span typeof="mw:Extension/section" about="#mwt6" data-mw='{"name":"section","attrs":{"end":"2014-04-10 (MW 1.23wmf22)"}}'>
25349 #--------- Test stripping of empty nodes in template content ----------
25352 Empty LI and TR nodes should be stripped from template content
25357 <ul about="#mwt1" typeof="mw:Transclusion" data-mw='{"parts":[{"template":{"target":{"wt":"EmptyLITest","href":"./Template:EmptyLITest"},"params":{},"i":0}}]}'>
25361 <table about="#mwt2" typeof="mw:Transclusion" data-mw='{"parts":[{"template":{"target":{"wt":"EmptyTRTest","href":"./Template:EmptyTRTest"},"params":{},"i":0}}]}'>
25374 Empty LI and TR nodes should not be stripped from top-level content
25388 <li class='mw-empty-elt'></li>
25393 <tr class='mw-empty-elt'></tr>
25402 Empty TR nodes should not be stripped if they have any attributes set
25404 {{EmptyTRWithHTMLAttrTest}}
25406 <table about="#mwt1" typeof="mw:Transclusion" data-mw='{"parts":[{"template":{"target":{"wt":"EmptyTRWithHTMLAttrTest","href":"./Template:EmptyTRWithHTMLAttrTest"},"params":{},"i":0}}]}'>
25407 <tr align='center'></tr>
25408 <tr><td>foo</td></tr>
25409 <tr align='center'></tr>
25410 <tr><td>bar</td></tr>
25414 #### ----------------------------------------------------------------
25415 #### The following section of tests are primarily to test
25416 #### wikitext escaping capabilities of Parsoid. Given that
25417 #### escaping can be done any number of ways, the wikitext (input)
25418 #### is always adjusted to reflect how Parsoid adds nowiki
25421 #### We are marking several tests as parsoid-only since the
25422 #### HTML in the result section is different from what the
25423 #### PHP parser generates for it.
25424 #### ----------------------------------------------------------------
25427 #### --------------- Headings ---------------
25429 #### 1. Nested inside html <h1>=foo=</h1>
25430 #### 2. Outside heading nest on a single line <h1>foo</h1>*bar
25431 #### 3. Nested inside html with wikitext split by html tags
25432 #### 4. No escape needed
25433 #### 5. Empty headings <h1></h1>
25434 #### 6. Heading chars in SOL context
25435 #### ----------------------------------------
25437 Headings: 0. Unnested
25447 <p>=foo<i>a</i>=</p>
25449 <nowiki>=foo=</nowiki>
25451 <nowiki> </nowiki>=foo=
25453 <nowiki>=foo=</nowiki>
25455 =foo''a''<nowiki>=</nowiki>
25458 # New headings and existing headings are handled differently
25460 Headings: 1. Nested inside html
25468 <h1 data-parsoid=''>=foo=</h1>
25469 <h2 data-parsoid=''>=foo=</h2>
25470 <h3 data-parsoid=''>=foo=</h3>
25471 <h4 data-parsoid=''>=foo=</h4>
25472 <h5 data-parsoid=''>=foo=</h5>
25473 <h6 data-parsoid=''>=foo=</h6>
25481 =<nowiki>=foo=</nowiki>=
25482 ==<nowiki>=foo=</nowiki>==
25483 ===<nowiki>=foo=</nowiki>===
25484 ====<nowiki>=foo=</nowiki>====
25485 =====<nowiki>=foo=</nowiki>=====
25486 ======<nowiki>=foo=</nowiki>======
25491 Headings: 2. Outside heading nest on a single line <h1>foo</h1>*bar
25500 <nowiki>*</nowiki>bar
25506 <nowiki>=bar=</nowiki>
25510 Headings: 3. Nested inside html with wikitext split by html tags
25514 <h1>=<b>bold</b>foo=</h1>
25516 = ='''bold'''foo= =
25520 Headings: 4a. No escaping needed (testing just h1 and h2)
25531 <h1><i>=</i>foo=</h1>
25551 Headings: 4b. No escaping needed (inside p-tags)
25568 Headings: 4c. Short headings (1)
25575 <nowiki>===</nowiki>
25581 # in the html2wt direction we emit '= = =' or '=<nowiki>=</nowiki>='
25583 Headings: 4d. Short headings (2)
25585 parsoid=wt2html,html2html
25596 <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>
25597 <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>
25598 <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>
25603 <h1 id="="><span id=".3D" typeof="mw:FallbackId"></span>=</h1>
25604 <h1 id="=="><span id=".3D.3D" typeof="mw:FallbackId"></span>==</h1>
25605 <h2 id="=_2"><span id=".3D_2" typeof="mw:FallbackId"></span>=</h2>
25609 Headings: 5. Empty headings
25613 <h1 data-parsoid='{}'></h1>
25615 <h2 data-parsoid='{}'></h2>
25617 <h3 data-parsoid='{}'></h3>
25619 <h4 data-parsoid='{}'></h4>
25621 <h5 data-parsoid='{}'></h5>
25623 <h6 data-parsoid='{}'></h6>
25633 =====<nowiki/>=====
25635 ======<nowiki/>======
25639 Headings: 6a. Heading chars in SOL context (with trailing spaces)
25649 <nowiki>=a=</nowiki>
25651 <nowiki>=a=</nowiki>
25653 <nowiki>=a=</nowiki>
25657 Headings: 6b. Heading chars in SOL context (with trailing newlines)
25670 <nowiki>=a=</nowiki>
25673 <nowiki>=a=</nowiki>
25676 <nowiki>=a=</nowiki>
25681 Headings: 6c. Heading chars in SOL context (leading newline break)
25689 <nowiki>=b=</nowiki>
25693 Headings: 6d. Heading chars in SOL context (with interspersed comments)
25697 <!--c0--><p>=a=</p>
25699 <!--c1--><p>=a=</p> <!--c2--> <!--c3-->
25701 <!--c0--><nowiki>=a=</nowiki>
25703 <!--c1--><nowiki>=a=</nowiki> <!--c2--> <!--c3-->
25707 Headings: 6d. Heading chars in SOL context (No escaping needed)
25717 Headings: 7. Insert a newline between new content and headings
25723 <h2 data-parsoid='{}'>A</h2>
25724 <p data-parsoid='{}'>a</p>
25735 Headings: Used as horizontal rule
25737 wgFragmentMode=[ 'html5', 'legacy' ]
25743 <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>
25746 <h6 id="==="><span id=".3D.3D.3D" typeof="mw:FallbackId"></span>===</h6>
25749 #### --------------- Lists ---------------
25750 #### 0. Outside nests (*foo, etc.)
25751 #### 1. Nested inside html <ul><li>*foo</li></ul>
25752 #### 2. Inside definition lists
25753 #### 3. Only bullets at start should be escaped
25754 #### 4. No escapes needed
25755 #### 5. No unnecessary escapes
25756 #### 6. Escape bullets in SOL position
25757 #### 7. Escape bullets in a multi-line context
25758 #### ----------------------------------------
25761 Lists: 0. Outside nests
25771 <nowiki>*</nowiki>foo
25773 <nowiki>#</nowiki>foo
25775 <nowiki>;</nowiki>Foo<nowiki>:</nowiki>bar
25778 ## Making these next 3 tests Parsoid-only since they are html2wt tests
25779 ## to test wikitext escaping, and insignificant whitespace diffs
25780 ## cause PHP parser tests to barf
25782 Lists: 1. Nested inside html (No unnecessary escapes)
25791 <li data-parsoid='{}'>*foo</li>
25792 <li data-parsoid='{}'>#foo</li>
25793 <li data-parsoid='{}'>:foo</li>
25794 <li data-parsoid='{}'>;foo</li>
25802 <li data-parsoid='{}'>*foo</li>
25803 <li data-parsoid='{}'>#foo</li>
25804 <li data-parsoid='{}'>:foo</li>
25805 <li data-parsoid='{}'>;foo</li>
25812 *<nowiki>*foo</nowiki>
25813 *<nowiki>#foo</nowiki>
25814 *<nowiki>:foo</nowiki>
25815 *<nowiki>;foo</nowiki>
25821 #<nowiki>*foo</nowiki>
25822 #<nowiki>#foo</nowiki>
25823 #<nowiki>:foo</nowiki>
25824 #<nowiki>;foo</nowiki>
25828 Lists: 2. Inside definition lists
25832 <dl><dt>;foo</dt></dl>
25833 <dl><dt>:foo</dt></dl>
25836 <dl><dd>:foo</dd></dl>
25840 ; <nowiki>:foo</nowiki>
25842 ; <nowiki>:foo</nowiki>
25849 Lists: 3. Only bullets at start of text in wikitext-generated HTML should be escaped
25855 <li data-parsoid='{}'>*foo<i>it</i>*bar</li>
25859 *<nowiki>*foo</nowiki>''it''*bar
25863 Lists: 4. No escapes needed
25876 <li><a rel="mw:WikiLink" href="Foo" title="Foo">Foo</a>: bar
25880 <li><a rel="mw:WikiLink" href="Foo" title="Foo">Foo</a>*bar
25894 Lists: 5. No unnecessary escapes
25898 <ul><li> bar <span>[[foo]]</span></li></ul>
25899 <ul><li> =bar <span>[[foo]]</span></li></ul>
25900 <ul><li> [[bar <span>[[foo]]</span></li></ul>
25901 <ul><li> ]]bar <span>[[foo]]</span></li></ul>
25902 <ul><li> =bar <span>foo]]</span>=</li></ul>
25903 <ul><li> <s></s>: a</li></ul>
25904 <ul><li> <i>* foo</i></li></ul>
25907 * bar <span><nowiki>[[foo]]</nowiki></span>
25909 * =bar <span><nowiki>[[foo]]</nowiki></span>
25911 * [[bar <span><nowiki>[[foo]]</nowiki></span>
25913 * ]]bar <span><nowiki>[[foo]]</nowiki></span>
25915 * =bar <span>foo]]</span>=
25923 Lists: 6. Escape bullets in SOL position
25927 <p><!--cmt-->*foo</p>
25929 <!--cmt--><nowiki>*</nowiki>foo
25933 Lists: 7. Escape bullets in a multi-line context
25942 <nowiki>*</nowiki>b
25946 Lists: 8. Escape colons only if not present in tags
25950 <dl><dt>a:b<i>c:d</i></dt></dl>
25952 ; <nowiki>a:b</nowiki>''c:d''
25955 #### --------------- HRs ---------------
25956 #### 1. Single line
25957 #### -----------------------------------
25960 HRs: 1. Single line
25968 ----<nowiki>----</nowiki>
25973 #### --------------- Tables ---------------
25974 #### 1a. Simple example
25975 #### 1b. No escaping needed (!foo)
25976 #### 1c. No escaping needed (|foo)
25977 #### 1d. No escaping needed (|}foo)
25979 #### 2a. Nested in td (<td>foo|bar</td>)
25980 #### 2b. Nested in td (<td>foo||bar</td>)
25981 #### 2c. Nested in td -- no escaping needed(<td>foo!!bar</td>)
25983 #### 3a. Nested in th (<th>foo!bar</th>)
25984 #### 3b. Nested in th (<th>foo!!bar</th>)
25985 #### 3c. Nested in th -- no escaping needed(<th>foo||bar</th>)
25989 #### 4c. No escaping needed
25990 #### --------------------------------------
25993 Tables: 1a. Simple example
26001 <nowiki>{|</nowiki>
26006 Tables: 1b. No escaping needed
26017 Tables: 1c. No escaping needed
26028 Tables: 1d. No escaping needed
26039 Tables: 2a. Nested in td
26044 <td>foo|bar</td></tr>
26045 <tr><td>x<div>a|b</div></td>
26049 |<nowiki>foo|bar</nowiki>
26051 |x<div><nowiki>a|b</nowiki></div>
26059 <td>x<div>a|b</div>
26060 </td></tr></tbody></table>
26064 Tables: 2b. Nested in td
26070 <td>a<i>b||c</i></td>
26071 <td>a<i><div>b||c</div></i></td>
26072 </tr></tbody></table>
26075 |<nowiki>foo||bar</nowiki>
26076 |a''<nowiki>b||c</nowiki>''
26077 |a''<div><nowiki>b||c</nowiki></div>''
26086 <td>a<i><div>b||c</div></i>
26092 Tables: 2c. Nested in td -- no escaping needed
26108 Tables: 3a. Nested in th
26124 Tables: 3b. Nested in th
26129 <tr><th>foo!!bar</th>
26130 <th><i>foo|bar</i></th>
26131 <th><i>foo!!bar</i></th>
26132 <th><i><span>foo!!bar</span></i></th>
26133 </tr></tbody></table>
26136 !<nowiki>foo!!bar</nowiki>
26137 !''<nowiki>foo|bar</nowiki>''
26138 !''<nowiki>foo!!bar</nowiki>''
26139 !''<span><nowiki>foo!!bar</nowiki></span>''
26148 <th><i>foo!!bar</i>
26150 <th><i><span>foo!!bar</span></i>
26156 Tables: 3c. Nested in th
26161 <tr><th>foo||bar</th>
26162 <th><span typeof="mw:Nowiki">foo||bar</span></th>
26163 </tr></tbody></table>
26166 !<nowiki>foo||bar</nowiki>
26167 !<nowiki>foo||bar</nowiki>
26180 Tables: 4a. Escape -
26196 |<nowiki>-bar</nowiki>
26201 Tables: 4b. Escape +
26217 |<nowiki>+bar</nowiki>
26222 Tables: 4c. No escaping needed
26227 <tr><td>foo-bar</td><td>foo+bar</td></tr>
26228 <tr><td><i>foo</i>-bar</td><td><i>foo</i>+bar</td></tr>
26234 <div>a|b</div></td>
26279 Tables: 4d. No escaping needed
26284 <tbody><tr><td><a rel="mw:WikiLink" href="./Foo" title="Foo">Foo</a>-bar</td>
26285 <td data-parsoid='{"startTagSrc":"|","attrSepSrc":"|"}'>+1</td>
26286 <td data-parsoid='{"startTagSrc":"|","attrSepSrc":"|"}'>-2</td></tr>
26297 <td><a href="/wiki/Foo" title="Foo">Foo</a>-bar
26307 Tables: 5. Empty table cells should get whitespace to avoid need for nowikis
26311 <table><tr><td></td><td align="center" data-parsoid='{"stx":"row"}'></td><td data-parsoid='{"stx":"row"}'></td></tr></table>
26313 <table><tr><td></td><td align="center"></td><td></td></tr></table>
26315 <table><tr><td></td><td align="center" data-parsoid='{"stx":"row", "startTagSrc":"{{!}}{{!}}"}'></td><td data-parsoid='{"stx":"row"}'></td></tr></table>
26317 <table><tr><th></th><th align="center" data-parsoid='{"stx":"row"}'></th><th data-parsoid='{"stx":"row"}'></th></tr></table>
26320 | || align="center" | ||
26330 | {{!}}{{!}} align="center" | ||
26334 ! !! align="center" | !!
26340 <td align="center"></td>
26342 </td></tr></tbody></table>
26347 <td align="center">
26350 </td></tr></tbody></table>
26354 <td align="center"></td>
26356 </td></tr></tbody></table>
26360 <th align="center"></th>
26362 </th></tr></tbody></table>
26366 T97430: Don't emit empty nowiki pairs around marker meta tags
26370 <p>*This is a long sentence here that will make the nowiki algo split up the nowikis into multiple pairs
26371 |** Make this another long long long sentence forcing the nowiki algo to split up the nowikis.</p>
26373 <nowiki>*</nowiki>This is a long sentence here that will make the nowiki algo split up the nowikis into multiple pairs
26374 |** Make this another long long long sentence forcing the nowiki algo to split up the nowikis.
26378 Unclosed xmlish element in table line shouldn't eat end delimiters
26383 <tbody><tr><td> <foo</td>
26384 <td> bar></td></tr>
26401 #### --------------- Links ----------------
26402 #### 1. Quote marks in link text
26403 #### 2. Wikilinks: Escapes needed
26404 #### 3. Wikilinks: No escapes needed
26405 #### 4. Extlinks: Escapes needed
26406 #### 5. Extlinks: No escapes needed
26407 #### --------------------------------------
26409 Links 1. WikiLinks: No escapes needed
26413 <p><a rel="mw:WikiLink" href="Foo" title="Foo">Foo<i>boo</i></a>
26414 <a rel="mw:WikiLink" href="Foo" title="Foo">[Foobar]</a>
26415 <a rel="mw:WikiLink" href="Foo" title="Foo">x [Foobar] x</a></p>
26419 [[Foo|x [Foobar] x]]
26421 <p><a href="/wiki/Foo" title="Foo">Foo<i>boo</i></a>
26422 <a href="/wiki/Foo" title="Foo">[Foobar]</a>
26423 <a href="/wiki/Foo" title="Foo">x [Foobar] x</a>
26428 Links 2. WikiLinks: Escapes needed
26432 <a href="Foo" rel="mw:WikiLink">Foobar]</a>
26433 <a href="Foo" rel="mw:WikiLink">x [http://google.com g] x</a>
26434 <a href="Foo" rel="mw:WikiLink">[[Bar]]</a>
26435 <a href="Foo" rel="mw:WikiLink">x [[Bar]] x</a>
26436 <a href="Foo" rel="mw:WikiLink">|Bar</a>
26437 <a href="Foo" rel="mw:WikiLink">]]bar</a>
26438 <a href="Foo" rel="mw:WikiLink">[[bar</a>
26439 <a href="Foo" rel="mw:WikiLink">x [[ y</a>
26440 <a href="Foo" rel="mw:WikiLink">x ]] y</a>
26441 <a href="Foo" rel="mw:WikiLink">x ]] y [[ z</a>
26443 [[Foo|<nowiki>Foobar]</nowiki>]]
26444 [[Foo|x <nowiki>[http://google.com g]</nowiki> x]]
26445 [[Foo|<nowiki>[[Bar]]</nowiki>]]
26446 [[Foo|<nowiki>x [[Bar]] x</nowiki>]]
26447 [[Foo|<nowiki>|Bar</nowiki>]]
26448 [[Foo|<nowiki>]]bar</nowiki>]]
26449 [[Foo|<nowiki>[[bar</nowiki>]]
26450 [[Foo|<nowiki>x [[ y</nowiki>]]
26451 [[Foo|<nowiki>x ]] y</nowiki>]]
26452 [[Foo|<nowiki>x ]] y [[ z</nowiki>]]
26454 <p><a href="/wiki/Foo" title="Foo">Foobar]</a>
26455 <a href="/wiki/Foo" title="Foo">x [http://google.com g] x</a>
26456 <a href="/wiki/Foo" title="Foo">[[Bar]]</a>
26457 <a href="/wiki/Foo" title="Foo">x [[Bar]] x</a>
26458 <a href="/wiki/Foo" title="Foo">|Bar</a>
26459 <a href="/wiki/Foo" title="Foo">]]bar</a>
26460 <a href="/wiki/Foo" title="Foo">[[bar</a>
26461 <a href="/wiki/Foo" title="Foo">x [[ y</a>
26462 <a href="/wiki/Foo" title="Foo">x ]] y</a>
26463 <a href="/wiki/Foo" title="Foo">x ]] y [[ z</a>
26468 Links 3. WikiLinks: No escapes needed
26472 <p><a rel="mw:WikiLink" href="Foo">[Foobar</a>
26473 <a rel="mw:WikiLink" href="Foo" title="Foo">foo|bar</a></p>
26478 <p><a href="/wiki/Foo" title="Foo">[Foobar</a>
26479 <a href="/wiki/Foo" title="Foo">foo|bar</a>
26484 Links 4. ExtLinks: Escapes needed
26488 <p><a rel="mw:ExtLink" href="http://google.com">[google]</a>
26489 <a rel="mw:ExtLink" href="http://google.com">google]</a>
26490 <a rel="mw:ExtLink" href="http://google.com">goog] le</a></p>
26491 <p>[http://google.com]</p>
26492 <p>[http://google.com google]</p>
26493 <p>[<a rel="mw:ExtLink" href="http://google.com">http://google.com</a>]</p>
26494 <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>
26496 [http://google.com <nowiki>[google]</nowiki>]
26497 [http://google.com <nowiki>google]</nowiki>]
26498 [http://google.com <nowiki>goog] le</nowiki>]
26500 <nowiki>[http://google.com]</nowiki>
26502 <nowiki>[http://google.com google]</nowiki>
26504 [http://google.com<nowiki>]</nowiki>
26506 [{{echo|http://google.com}}<nowiki>]</nowiki>
26508 <p><a rel="nofollow" class="external text" href="http://google.com">[google]</a>
26509 <a rel="nofollow" class="external text" href="http://google.com">google]</a>
26510 <a rel="nofollow" class="external text" href="http://google.com">goog] le</a>
26511 </p><p>[http://google.com]
26512 </p><p>[http://google.com google]
26513 </p><p>[<a rel="nofollow" class="external free" href="http://google.com">http://google.com</a>]
26514 </p><p>[<a rel="nofollow" class="external free" href="http://google.com">http://google.com</a>]
26519 Links 5. ExtLinks: No escapes needed
26523 <p><a rel="mw:ExtLink" href="http://google.com">[google</a></p>
26524 <p>[<a ref="mw:ExtLink" href="http://google.com"></a>]</p>
26526 [http://google.com [google]
26528 [[http://google.com]]
26530 <p><a rel="nofollow" class="external text" href="http://google.com">[google</a>
26531 </p><p>[<a rel="nofollow" class="external autonumber" href="http://google.com">[1]</a>]
26536 Links 6. Add <nowiki/>s between text-nodes and url-links when required (T66300)
26540 <p>x<a rel="mw:ExtLink" href="http://example.com" data-parsoid='{"stx":"url"}'>http://example.com</a>y
26541 <a rel="mw:ExtLink" href="http://example.com" data-parsoid='{"stx":"url"}'>http://example.com</a>?x
26542 <a rel="mw:ExtLink" href="http://example.com" data-parsoid='{"stx":"url"}'>http://example.com</a>&x
26543 <a rel="mw:ExtLink" href="http://example.com" data-parsoid='{"stx":"url"}'>http://example.com</a>'x
26544 <a rel="mw:ExtLink" href="http://example.com" data-parsoid='{"stx":"url"}'>http://example.com</a>,x
26545 <a rel="mw:ExtLink" href="http://example.com" data-parsoid='{"stx":"url"}'>http://example.com</a>.x
26546 <a rel="mw:ExtLink" href="http://example.com" data-parsoid='{"stx":"url"}'>http://example.com</a>;x
26547 <a rel="mw:ExtLink" href="http://example.com" data-parsoid='{"stx":"url"}'>http://example.com</a>:x
26548 <a rel="mw:ExtLink" href="http://example.com" data-parsoid='{"stx":"url"}'>http://example.com</a>;x
26549 <a rel="mw:ExtLink" href="http://example.com" data-parsoid='{"stx":"url"}'>http://example.com</a>!x
26550 <a rel="mw:ExtLink" href="http://example.com" data-parsoid='{"stx":"url"}'>http://example.com</a>=x
26551 <a rel="mw:ExtLink" href="http://example.com" data-parsoid='{"stx":"url"}'>http://example.com</a>(x)
26552 <a rel="mw:ExtLink" href="http://example.com(x" data-parsoid='{"stx":"url"}'>http://example.com(x</a>)
26555 x<nowiki/>http://example.com<nowiki/>y
26556 http://example.com<nowiki/>?x
26557 http://example.com<nowiki/>&x
26558 http://example.com<nowiki/>'x
26559 http://example.com<nowiki/>,x
26560 http://example.com<nowiki/>.x
26561 http://example.com<nowiki/>;x
26562 http://example.com<nowiki/>:x
26563 http://example.com<nowiki/>;x
26564 http://example.com<nowiki/>!x
26565 http://example.com<nowiki/>=x
26566 http://example.com<nowiki/>(x)
26567 http://example.com(x<nowiki/>)
26571 Links 7a. Don't add spurious <nowiki/>s between text-nodes and url-links (T66300)
26576 <a rel="mw:ExtLink" href="http://example.com" data-parsoid='{"stx":"url"}'>http://example.com</a>
26578 "<a rel="mw:ExtLink" href="http://example.com" data-parsoid='{"stx":"url"}'>http://example.com</a>"
26579 (<a rel="mw:ExtLink" href="http://example.com" data-parsoid='{"stx":"url"}'>http://example.com</a>)
26580 (<a rel="mw:ExtLink" href="http://example.com" data-parsoid='{"stx":"url"}'>http://example.com</a>) foo
26581 <a rel="mw:ExtLink" href="http://example.com" data-parsoid='{"stx":"url"}'>http://example.com</a>,
26582 <a rel="mw:ExtLink" href="http://example.com" data-parsoid='{"stx":"url"}'>http://example.com</a>, foo
26588 "http://example.com"
26589 (http://example.com)
26590 (http://example.com) foo
26591 http://example.com,
26592 http://example.com, foo
26595 <a rel="nofollow" class="external free" href="http://example.com">http://example.com</a>
26597 "<a rel="nofollow" class="external free" href="http://example.com">http://example.com</a>"
26598 (<a rel="nofollow" class="external free" href="http://example.com">http://example.com</a>)
26599 (<a rel="nofollow" class="external free" href="http://example.com">http://example.com</a>) foo
26600 <a rel="nofollow" class="external free" href="http://example.com">http://example.com</a>,
26601 <a rel="nofollow" class="external free" href="http://example.com">http://example.com</a>, foo
26606 Links 7b. Don't add spurious <nowiki/>s between text-nodes and url-links (T66300)
26610 <p><a rel="mw:ExtLink" href="http://example.com" data-parsoid='{"stx":"url"}'>http://example.com</a>.,;:!?\
26611 -<a rel="mw:ExtLink" href="http://example.com">http://example.com</a>:</p>
26613 http://example.com.,;:!?\
26614 -http://example.com:
26616 <p><a rel="nofollow" class="external free" href="http://example.com">http://example.com</a>.,;:!?\
26617 -<a rel="nofollow" class="external free" href="http://example.com">http://example.com</a>:
26622 Links 8. Add <nowiki/>s between text-nodes and RFC-links when required (T66300)
26626 <p><a href="https://tools.ietf.org/html/rfc123" rel="mw:ExtLink" data-parsoid='{"stx":"magiclink"}'>RFC 123</a>4
26627 <a href="https://tools.ietf.org/html/rfc123" rel="mw:ExtLink" data-parsoid='{"stx":"magiclink"}'>RFC 123</a>y
26628 X<a href="https://tools.ietf.org/html/rfc123" rel="mw:ExtLink" data-parsoid='{"stx":"magiclink"}'>RFC 123</a>y</p>
26632 X<nowiki/>RFC 123<nowiki/>y
26636 Links 9. Don't add spurious <nowiki/>s between text-nodes and RFC-links (T66300)
26640 <p><a href="https://tools.ietf.org/html/rfc123" rel="mw:ExtLink" data-parsoid='{"stx":"magiclink"}'>RFC 123</a>?foo
26641 <a href="https://tools.ietf.org/html/rfc123" rel="mw:ExtLink" data-parsoid='{"stx":"magiclink"}'>RFC 123</a>&foo
26642 -<a href="https://tools.ietf.org/html/rfc123" rel="mw:ExtLink" data-parsoid='{"stx":"magiclink"}'>RFC 123</a>-
26649 <p><a class="external mw-magiclink-rfc" rel="nofollow" href="https://tools.ietf.org/html/rfc123">RFC 123</a>?foo
26650 <a class="external mw-magiclink-rfc" rel="nofollow" href="https://tools.ietf.org/html/rfc123">RFC 123</a>&foo
26651 -<a class="external mw-magiclink-rfc" rel="nofollow" href="https://tools.ietf.org/html/rfc123">RFC 123</a>-
26656 Links 10. Add <nowiki/>s between text-nodes and PMID-links when required (T66300)
26660 <p><a href="//www.ncbi.nlm.nih.gov/pubmed/123?dopt=Abstract" rel="mw:ExtLink" data-parsoid='{"stx":"magiclink"}'>PMID 123</a>4
26661 <a href="//www.ncbi.nlm.nih.gov/pubmed/123?dopt=Abstract" rel="mw:ExtLink" data-parsoid='{"stx":"magiclink"}'>PMID 123</a>y
26662 X<a href="//www.ncbi.nlm.nih.gov/pubmed/123?dopt=Abstract" rel="mw:ExtLink" data-parsoid='{"stx":"magiclink"}'>PMID 123</a>y
26666 X<nowiki/>PMID 123<nowiki/>y
26670 Links 11. Don't add spurious <nowiki/>s between text-nodes and PMID-links (T66300)
26674 <p><a href="//www.ncbi.nlm.nih.gov/pubmed/123?dopt=Abstract" rel="mw:ExtLink" data-parsoid='{"stx":"magiclink"}'>PMID 123</a>?foo
26675 <a href="//www.ncbi.nlm.nih.gov/pubmed/123?dopt=Abstract" rel="mw:ExtLink" data-parsoid='{"stx":"magiclink"}'>PMID 123</a>&foo
26676 -<a href="//www.ncbi.nlm.nih.gov/pubmed/123?dopt=Abstract" rel="mw:ExtLink" data-parsoid='{"stx":"magiclink"}'>PMID 123</a>-
26683 <p><a class="external mw-magiclink-pmid" rel="nofollow" href="//www.ncbi.nlm.nih.gov/pubmed/123?dopt=Abstract">PMID 123</a>?foo
26684 <a class="external mw-magiclink-pmid" rel="nofollow" href="//www.ncbi.nlm.nih.gov/pubmed/123?dopt=Abstract">PMID 123</a>&foo
26685 -<a class="external mw-magiclink-pmid" rel="nofollow" href="//www.ncbi.nlm.nih.gov/pubmed/123?dopt=Abstract">PMID 123</a>-
26690 Links 12. Add <nowiki/>s between text-nodes and ISBN-links when required (T66300)
26694 <p><a href="./Special:BookSources/1234567890" rel="mw:WikiLink" data-parsoid='{"stx":"magiclink"}'>ISBN 1234567890</a>1
26695 <a href="./Special:BookSources/1234567890" rel="mw:WikiLink" data-parsoid='{"stx":"magiclink"}'>ISBN 1234567890</a>x
26696 a<a href="./Special:BookSources/1234567890" rel="mw:WikiLink" data-parsoid='{"stx":"magiclink"}'>ISBN 1234567890</a>b
26699 ISBN 1234567890<nowiki/>1
26700 ISBN 1234567890<nowiki/>x
26701 a<nowiki/>ISBN 1234567890<nowiki/>b
26705 Links 13. Don't add spurious <nowiki/>s between text-nodes and ISBN-links (T66300)
26709 <p>-<a href="./Special:BookSources/1234567890" rel="mw:WikiLink" data-parsoid='{"stx":"magiclink"}'>ISBN 1234567890</a>'s
26713 <p>-<a href="/wiki/Special:BookSources/1234567890" class="internal mw-magiclink-isbn">ISBN 1234567890</a>'s
26718 Links 14. Protect link-like plain text. (Parsoid bug T78425)
26722 <p>this is not a link: http://example.com
26725 this is not a link: <nowiki>http://example.com</nowiki>
26729 Links 15. Link trails can't become link prefixes.
26734 <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>
26736 [[Söfnuður]]-[[00]]
26738 <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>
26742 #### --------------- Quotes ---------------
26743 #### 1. Quotes inside <b> and <i>
26744 #### 2. Link fragments separated by <i> and <b> tags
26745 #### 3. Link fragments inside <i> and <b>
26746 #### 4. No escaping needed
26747 #### --------------------------------------
26749 1a. Quotes inside <b> and <i>
26760 <b>foo'<i>bar'</i>baz</b>
26769 <i>fools'<span> errand</span></i>
26770 <i><span>fool</span>'s errand</i>
26771 '<i>foo</i> bar '<i>baz</i>
26772 a|!*#-:;+-~[]{}b'<i>x</i>
26776 ''<nowiki>''foo''</nowiki>''
26777 ''<nowiki>'''foo'''</nowiki>''
26779 '''<nowiki/>'foo''''
26780 '''<nowiki>''foo''</nowiki>'''
26781 '''<nowiki>'''foo'''</nowiki>'''
26782 '''foo'<nowiki/>''bar'<nowiki/>''baz'''
26783 '''foo'''<nowiki/>'s
26789 '''foo'''<nowiki/>'
26790 ''''foo'''<nowiki/>'
26791 ''fools'<span> errand</span>''
26792 ''<span>fool</span>'s errand''
26793 '<nowiki/>''foo'' bar '''baz''
26794 a|!*#-:;+-~[]{}b'''x''
26798 1b. Quotes inside <b> and <i> with other tags on same line
26802 '<i>a</i> foo <i><a rel="mw:WikiLink" href="Bar" title="Bar">bar</a></i>
26803 <i>a'</i> foo <i><a rel="mw:WikiLink" href="Bar" title="Bar">bar</a></i>
26804 <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>
26805 <a rel="mw:WikiLink" href="Foo" title="Foo">foo</a> x'<i><a href="Bar" rel="mw:WikiLink" title="Bar">bar</a></i>
26806 '<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>
26807 '<i>foo</i> <div title="name">test</div>
26808 '<i>foo</i> and <br data-parsoid='{"stx":"html","noClose":true}'/> bar
26809 <ol class="mw-references references" typeof="mw:Extension/references" about="#mwt5" data-mw='{"name":"references","attrs":{}}'>
26810 <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>
26813 '''a'' foo ''[[bar]]''
26814 ''a''' foo ''[[bar]]''
26815 ''a''' foo '''{{echo|[[bar]]}}'''
26816 [[foo]] x'''[[bar]]''
26817 '''foo'' <ref>test</ref>
26818 '''foo'' <div title="name">test</div>
26819 '''foo'' and <br> bar
26824 2. Link fragments separated by <i> and <b> tags
26828 <p>[[<i>foo</i>hello]]</p>
26829 <p>[[<b>foo</b>hello]]</p>
26831 [[''foo''<nowiki>hello]]</nowiki>
26833 [['''foo'''<nowiki>hello]]</nowiki>
26836 # FIXME: Escaping one or both of [[ and ]] is also acceptable --
26837 # this is one of the shortcomings of this format
26839 3. Link fragments inside <i> and <b>
26843 <p><i>[[foo</i>]]</p>
26844 <p><b>[[foo</b>]]</p>
26846 ''[[foo''<nowiki>]]</nowiki>
26848 '''[[foo'''<nowiki>]]</nowiki>
26852 4. No escaping needed
26856 <p>'<span><i>bar</i></span>'
26857 '<span><b>bar</b></span>'
26861 '<span>''bar''</span>'
26862 '<span>'''bar'''</span>'
26866 #### ----------- Paragraphs ---------------
26867 #### 1. No unnecessary escapes
26868 #### --------------------------------------
26871 1. No unnecessary escapes
26875 <p>bar <span>[[foo]]</span>
26876 </p><p>=bar <span>[[foo]]</span>
26877 </p><p>[[bar <span>[[foo]]</span>
26878 </p><p>]]bar <span>[[foo]]</span>
26879 </p><p>=bar <span>foo]]</span>=
26882 bar <span><nowiki>[[foo]]</nowiki></span>
26884 =bar <span><nowiki>[[foo]]</nowiki></span>
26886 [[bar <span><nowiki>[[foo]]</nowiki></span>
26888 ]]bar <span><nowiki>[[foo]]</nowiki></span>
26890 =bar <span>foo]]</span><nowiki>=</nowiki>
26893 #### ----------------------- PRE --------------------------
26895 1. Leading whitespace in SOL context should be escaped
26918 <nowiki> </nowiki>a
26920 <nowiki> </nowiki> a
26924 <nowiki> </nowiki> a
26926 <nowiki> </nowiki>a
26929 <nowiki> </nowiki>b
26952 2. Leading whitespace in non-indent-pre contexts should not be escaped
26956 <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>
26957 <ol class="mw-references references" typeof="mw:Extension/references" about="#mwt4" data-mw='{"name":"references","attrs":{}}'>
26958 <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>
26968 3. Leading whitespace in indent-pre suppressing contexts should not be escaped
26987 4. Leading whitespace in indent-pre suppressing contexts should not be escaped
26991 <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>
26993 [[File:Foobar.jpg|thumb|caption]]
26997 5. Nowiki escaping should account for indent-pres
27007 T95794: nowiki escaping should account for leading space at start-of-line in an indent-pre block
27021 Whitespace scrubbing in SOL position should account for SOL-sensitive wikitext markup
27024 "modes": ["html2wt"],
27025 "scrubWikitext": true
27033 <p><link rel="mw:PageProp/Category" href="./Category:Foo" data-parsoid="{}"> *foo</p>
27034 <p> <link rel="mw:PageProp/Category" href="./Category:Foo" data-parsoid="{}">*foo</p>
27035 <p> <!--boo-->*foo</p>
27036 <p><!--boo--> *foo</p>
27037 <p><!--a--> <!--b--> <!--c--> <!--d--> <!--e--> foo</p>
27038 <p><!--a--> <!--b--> <!--c--> <!--d--> <!--e--> *foo</p>
27054 <nowiki>*</nowiki>foo
27056 <nowiki/><!--boo-->*foo
27058 <!--boo--><nowiki/>*foo
27060 <!--a--><!--b--><!--c--><!--d--><!--e-->foo
27062 <!--a--><nowiki/><!--b--><!--c--><!--d--><!--e-->*foo
27065 #### --------------- Behavior Switches --------------------
27068 1. Valid behavior switches should be escaped
27075 <nowiki>__TOC__</nowiki>
27076 ''<nowiki>__TOC__</nowiki>''
27080 2. Invalid behavior switches should not be escaped
27091 # We use indent-pre as an indirect way to test for sol-transparent behavior.
27093 Behavior switches should be SOL-transparent
27097 <meta property="mw:PageProp/toc" />
27099 <!-- this one's bogus -->
27102 <pre data-parsoid='{}'><meta property="mw:PageProp/toc" data-parsoid='{"src":"__TOC__","magicSrc":"__TOC__"}'/> foo</pre>
27104 <meta property="mw:PageProp/toc" data-parsoid='{"src":"__TOC__","magicSrc":"__TOC__"}'/><pre data-parsoid='{}'>bar</pre>
27108 <!-- this one's bogus -->
27117 #### --------------- HTML tags ---------------
27120 #### 3. multi-line html tag
27121 #### 4. extension tags
27122 #### -----------------------------------------
27128 <a href="http://google.com">google</a>
27130 <a href="http://google.com">google</a>
27138 <ul><li> <div>foo</div></li>
27139 <li> <div style="color:red">foo</div></li>
27140 <li> <td></li></ul>
27143 * <nowiki><div>foo</div></nowiki>
27144 * <nowiki><div style="color:red">foo</div></nowiki>
27145 * <nowiki><td></nowiki>
27149 3. multi-line html tag
27168 <p><ref>foo</ref>
27169 </p><p><ref>bar
27170 </p><p>baz</ref>
27173 <nowiki><ref>foo</ref></nowiki>
27175 <nowiki><ref>bar</nowiki>
27177 baz<nowiki></ref></nowiki>
27181 Parsoid: newline inducing block nodes don't suppress <nowiki>
27187 <nowiki> </nowiki>a
27192 #### --------------- Others ---------------
27198 <p><nowiki>foo</nowiki>
27201 <nowiki>foo</nowiki>
27204 ## The quote-char in the input is necessary for triggering the bug
27206 (T54035) Nowiki-escaping should not get tripped by " :" in text
27215 #----------- End of wikitext escaping tests --------------
27219 Tag-like HTML structures are passed through as text
27241 </p><p>1<d e>f
27246 HTML tag with necessary entities in attributes
27248 <span title="&amp;">foo</span>
27250 <p><span title="&amp;">foo</span>
27255 HTML tag with 'unnecessary' entity encoding in attributes
27257 <span title="&">foo</span>
27259 <p><span title="&">foo</span>
27264 HTML tag with broken attribute value quoting
27266 parsoid=wt2html,html2html
27268 <span title="Hello world>Foo</span>
27270 <p><span title="Hello world">Foo</span>
27273 <p><span title="Hello world">Foo</span></p>
27277 Self-closed tag with broken attribute value quoting
27279 parsoid=wt2html,html2html
27281 <div title="Hello world />Foo
27283 <div title="Hello world"></div><p>Foo
27286 <div title="Hello world " data-parsoid='{"stx":"html","selfClose":true}'></div><p>Foo</p>
27290 Table with broken attribute value quoting
27292 parsoid=wt2html,html2html
27295 | title="Hello world|Foo
27300 <td title="Hello world">Foo
27306 <td title="Hello world">Foo
27312 Table with broken attribute value quoting on consecutive lines
27314 parsoid=wt2html,html2html
27317 | title="Hello world|Foo
27318 | style="color:red|Bar
27323 <td title="Hello world">Foo
27325 <td style="color:red">Bar
27331 <td title="Hello world">Foo
27332 </td><td style="color: red">Bar
27333 </td></tr></tbody></table>
27338 Accept empty td cell attribute
27341 | align="center" |foo|| |
27346 <td align="center">foo</td>
27353 Non-empty attributes in th-cells
27356 !Foo!! style="color: red" |Bar
27362 <th style="color: red">Bar
27368 Accept empty attributes in th-cells
27383 Empty table rows go away
27404 ### Parsoid-centric tests for testing RTing of inter-element separators
27405 ### Edge cases not tested by existing parser tests and specific to
27406 ### Parsoid-specific serialization strategies.
27410 RT-ed inter-element separators should be valid separators
27422 <tbody><tr class='mw-empty-elt' data-parsoid='{"startTagSrc":"|-","a":{"[[foo]]":null},"sa":{"[[foo]]":""},"autoInsertedEnd":true}'></tr>
27426 # Parsoid-only test of a DOM pass
27428 Trailing newlines in a deep dom-subtree that ends a wikitext line should be migrated out
27440 <tbody><tr data-parsoid='{"autoInsertedEnd":true,"autoInsertedStart":true}'><td data-parsoid='{"autoInsertedEnd":true}'><small data-parsoid='{"stx":"html","autoInsertedEnd":true}'>foo
27441 <p>bar</p></small></td></tr>
27445 <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>
27449 # Note that the "style" attribute is really a template parameter here.
27450 # The = would have to be {{=}} if you wanted the literal.
27452 Empty TD followed by TD with tpl-generated attribute
27457 |{{echo|style='color:red'}}|foo
27471 Indented table with an empty td
27490 Indented table with blank lines in between (T85627)
27509 <br /></p></td></tr>
27514 Indented block & table
27528 <div data-parsoid='{"stx":"html"}'>foo</div>
27530 <tr data-parsoid='{"autoInsertedEnd":true,"autoInsertedStart":true}'><td data-parsoid='{"autoInsertedEnd":true}'>foo</td></tr>
27535 Indent and comment before table row
27550 <!--hi--><tbody><tr data-parsoid='{"startTagSrc":"|-","autoInsertedEnd":true}'>
27551 <td data-parsoid='{"autoInsertedEnd":true}'> there</td></tr>
27555 # Parsoid-specific since PHP parser doesn't handle this mixed tbl-wikitext
27557 Empty TR followed by a template-generated TR
27563 {{echo|<tr><td>foo</td></tr>}}
27568 <tr class='mw-empty-elt'></tr>
27569 <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}}]}'>
27574 ## PHP and parsoid output differ for this, and since this is primarily
27575 ## for testing Parsoid's serializer, marking this Parsoid only
27577 Empty TR followed by mixed-ws-comment line should RT correctly
27590 <tr class='mw-empty-elt'></tr>
27593 <!--c--> </tr><!--d-->
27599 Multi-line image caption generated by templates with/without trailing newlines
27601 [[File:Foobar.jpg|thumb|300x300px|foo\n{{echo|A}}\n{{echo|B}}\n{{echo|C}}]]
27602 [[File:Foobar.jpg|thumb|300x300px|foo\n{{echo|A}}\n{{echo|B}}\n{{echo|C}}\n\n]]
27604 <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>
27605 <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>
27609 New element inserted (without intervening newlines) after an old sol-transparent node should serialize correctly
27613 <meta typeof="mw:Includes/IncludeOnly" data-parsoid='{"src":"<includeonly>foo</includeonly>"}' data-mw='{"src":"<includeonly>foo</includeonly>"}'/><meta typeof="mw:Includes/IncludeOnly/End" data-parsoid='{"src":""}'/><p>new para</p>
27615 <link rel="mw:PageProp/Category" href="./Category:Foo" data-parsoid='{}'/><h1>new heading</h1>
27617 <includeonly>foo</includeonly>
27625 ## PHP emits broken html for this, and since this is primarily
27626 ## a Parsoid serializer test, marking this Parsoid only
27628 Improperly nested inline or quotes tags with whitespace in between
27630 <span> <s>x</span> </s>
27633 <p><span> <s>x</s></span><s> </s>
27634 <b> <i>x</i></b><i> </i>
27639 Encapsulate protected attributes from wt
27641 <div typeof="mw:placeholder stuff" data-mw="whoo" data-parsoid="weird" data-parsoid-other="no" about="time" rel="mw:true">foo</div>
27643 {| typeof="mw:placeholder stuff" data-mw="whoo" data-parsoid="weird" data-parsoid-other="no" about="time" rel="mw:true"
27647 <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>
27649 <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">
27650 <tbody><tr><td data-parsoid='{"autoInsertedEnd":true}'>ok</td></tr>
27654 ## Currently the p-wrapper is fragile in how it adds / removes transformations.
27655 ## Having nested or stray pre tags results in the attempt to add duplicates,
27656 ## causing an assertion fail. This test tries to prevent that situation.
27658 Ensure ParagraphWrapper can deal with stray closing pre tags
27667 ## Remex doesn't account for fostered content.
27669 1. Ensure fostered text content is wrapped in element nodes
27673 <table>hi</table><table>ho</table>
27675 hi<table></table>ho<table></table>
27677 <p data-parsoid='{"fostered":true,"autoInsertedEnd":true,"autoInsertedStart":true}'>hi</p><table data-parsoid='{"stx":"html"}'></table><p data-parsoid='{"fostered":true,"autoInsertedEnd":true,"autoInsertedStart":true}'>ho</p><table data-parsoid='{"stx":"html"}'></table>
27680 ## Remex doesn't account for fostered content.
27682 2. Ensure fostered text content is wrapped in element nodes (traps regressions around fostered marker on the element getting lost)
27684 parsoid=wt2html,wt2wt
27694 </td></tr></tbody></table>
27696 <p data-parsoid='{"fostered":true,"autoInsertedEnd":true,"autoInsertedStart":true}'> || ||</p>
27697 <table data-parsoid='{"stx":"html"}'>
27698 <tbody><tr data-parsoid='{"stx":"html","autoInsertedEnd":true}'><td data-parsoid='{"stx":"html","autoInsertedEnd":true}'> a
27699 </td></tr></tbody></table>
27702 ## Remex doesn't account for fostered content.
27704 Encapsulation properly handles null DSR information from foster box
27706 parsoid=wt2html,wt2wt
27708 {{echo|<table>foo<tr><td>bar</td></tr></table>}}
27710 <p about="#mwt1" typeof="mw:Transclusion" data-mw='{"parts":[{"template":{"target":{"wt":"echo","href":"./Template:Echo"},"params":{"1":{"wt":"<table>foo<tr><td>bar</td></tr></table>"}},"i":0}}]}'>foo</p><table about="#mwt1" data-parsoid='{"stx":"html"}'><tbody><tr><td>bar</td></tr></tbody></table>
27713 ## Remex doesn't account for fostered content.
27715 1. Encapsulate foster-parented transclusion content
27717 parsoid=wt2wt,wt2html
27719 <table>{{echo|foo<tr><td>bar</td></tr>}}</table>
27721 foo<table><tbody><tr><td>bar</td></tr></tbody></table>
27723 <p about="#mwt2" typeof="mw:Transclusion" data-parsoid='{"fostered":true,"autoInsertedEnd":true,"autoInsertedStart":true,"firstWikitextNode":"TABLE_html","pi":[[{"k":"1"}]]}' data-mw='{"parts":["<table>",{"template":{"target":{"wt":"echo","href":"./Template:Echo"},"params":{"1":{"wt":"foo<tr><td>bar</td></tr>"}},"i":0}},"</table>"]}'>foo</p><table about="#mwt2" data-parsoid='{"stx":"html"}'><tbody><tr><td>bar</td></tr></tbody></table>
27727 2. Encapsulate foster-parented transclusion content
27729 parsoid=wt2wt,wt2html
27731 <table><div>{{echo|foo}}</div><tr><td>bar</td></tr></table>
27733 <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>
27744 3. Encapsulate foster-parented transclusion content
27746 parsoid=wt2wt,wt2html
27748 <table><div><p>{{echo|foo</p></div><tr><td>}}bar</td></tr></table>
27750 <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>"]}">
27763 4. Encapsulate foster-parented transclusion content
27765 parsoid=wt2wt,wt2html
27767 <table><div><p>{{echo|foo</p></div><tr><td>}}bar</td></tr></table>
27769 <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>"]}">
27781 ## Remex doesn't account for fostered content.
27783 5. Encapsulate foster-parented transclusion content
27785 parsoid=wt2wt,wt2html
27787 <table><tr><td><div><p>{{echo|foo</p></div></td>foo}}</tr></table>
27789 foo<table><tbody><tr><td><div><p>foo</p></div></td></tr></tbody></table>
27791 <p about="#mwt2" typeof="mw:Transclusion" data-parsoid='{"fostered":true,"autoInsertedEnd":true,"autoInsertedStart":true,"firstWikitextNode":"TABLE_html","pi":[[{"k":"1"}]]}' data-mw='{"parts":["<table><tr><td><div><p>",{"template":{"target":{"wt":"echo","href":"./Template:Echo"},"params":{"1":{"wt":"foo</p></div></td>foo"}},"i":0}},"</tr></table>"]}'>foo</p><table about="#mwt2" data-parsoid='{"stx":"html"}'><tbody><tr><td><div><p>foo</p></div></td></tr></tbody></table>
27794 ## Remex doesn't account for fostered content.
27796 6. Encapsulate foster-parented transclusion content
27798 parsoid=wt2wt,wt2html
27800 <table><tr><td><div><p>{{echo|foo</p></div></td>foo</tr></table>}}<p>ok</p>
27802 foo<table><tbody><tr><td><div><p>foo</p></div></td></tr></tbody></table><p>ok</p>
27804 <p about="#mwt2" typeof="mw:Transclusion" data-parsoid='{"fostered":true,"autoInsertedEnd":true,"autoInsertedStart":true,"firstWikitextNode":"TABLE_html","pi":[[{"k":"1"}]]}' data-mw='{"parts":["<table><tr><td><div><p>",{"template":{"target":{"wt":"echo","href":"./Template:Echo"},"params":{"1":{"wt":"foo</p></div></td>foo</tr></table>"}},"i":0}}]}'>foo</p><table about="#mwt2" data-parsoid='{"stx":"html"}'><tbody><tr><td><div><p>foo</p></div></td></tr></tbody></table><p data-parsoid='{"stx":"html"}'>ok</p>
27808 7. Encapsulate foster-parented transclusion content
27810 parsoid=wt2wt,wt2html
27812 <table>{{echo|<p>foo</p>}}<td>bar</td></table>
27814 <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>
27824 ## Remex doesn't account for fostered content.
27825 # Note that the wt is broken on purpose: the = should be {{=}} if you
27826 # don't want it to be a template parameter key.
27828 8. Encapsulate foster-parented transclusion content
27830 parsoid=wt2wt,wt2html
27833 }}{|{{echo|style='color:red'}}
27844 </td></tr></tbody></table>
27846 <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">
27847 </span><p about="#mwt3" typeof="mw:Transclusion" data-parsoid='{"fostered":true,"autoInsertedEnd":true,"autoInsertedStart":true,"firstWikitextNode":"TABLE","pi":[[{"k":"style","named":true}]]}' data-mw='{"parts":["{|",{"template":{"target":{"wt":"echo","href":"./Template:Echo"},"params":{"style":{"wt":"'color:red'"}},"i":0}},"\n|-\n|b\n|}"]}'>{{{1}}}</p><table about="#mwt3">
27850 </td></tr></tbody></table>
27853 ## Remex doesn't account for fostered content.
27855 9. Encapsulate foster-parented transclusion content
27857 parsoid=wt2wt,wt2html
27859 <table>{{echo|hi</table>hello}}
27861 hi<table></table><p>hello
27864 <p about="#mwt2" typeof="mw:Transclusion" data-parsoid='{"fostered":true,"autoInsertedEnd":true,"autoInsertedStart":true,"firstWikitextNode":"TABLE_html","pi":[[{"k":"1"}]]}' data-mw='{"parts":["<table>",{"template":{"target":{"wt":"echo","href":"./Template:Echo"},"params":{"1":{"wt":"hi</table>hello"}},"i":0}}]}'>hi</p><table about="#mwt2"></table><p about="#mwt2">hello</p>
27868 Table in fosterable position
27879 <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">
27881 <table about="#mwt1" data-parsoid='{"autoInsertedEnd":true}'></table>
27887 # Parsoid only for T66747
27889 Properly encapsulate empty-content transclusions in fosterable positions
27897 <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"}]]}'>
27902 ## No longer captures its original intention
27904 Always encapsulate foster box when template range is expanded to table
27918 T115289: Unclosed table
27920 {{echo|<table>}}<!--c-->[[Category:Two]]
27922 <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>
27926 T115289: Don't migrate newlines out of tables with fostered content
27928 <table><td></td>{{echo|<tr>[[Category:One]]}}<!--c-->[[Category:Two]]
27930 <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>
27934 T73074: More fostering fun
27936 <table><td></td>{{echo|<tr>}}<!--c-->[[Category:Two]]
27938 <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>
27942 Support <object> element with .data attribute
27946 <object data="test.swf"></object>
27948 <object data="test.swf"></object>
27952 Don't block XML namespace declaration
27954 <span xmlns:dct="http://purl.org/dc/terms/" property="dct:title">MediaWiki</span>
27956 <p><span xmlns:dct="http://purl.org/dc/terms/" property="dct:title">MediaWiki</span>
27959 <p><span xmlns:dct="http://purl.org/dc/terms/" data-x-property="dct:title" data-parsoid='{"stx":"html"}'>MediaWiki</span></p>
27962 # -----------------------------------------------------------------
27963 # The following section of tests are primarily to spec requirements
27964 # around Parsoid's serialization (old, new, edited content)
27966 # All these tests are marked Parsoid html2wt and html2html only
27967 # ----------------------------------------------------------------
27970 Ignore rel attribute in a-tags during serialization to url-links
27974 <a href='http://en.wikipedia.org/wiki/Foobar'>http://en.wikipedia.org/wiki/Foobar</a>
27975 <a href='http://en.wikipedia.org/wiki/Foobar' rel='mw:ExtLink'>http://en.wikipedia.org/wiki/Foobar</a>
27976 <a href='http://en.wikipedia.org/wiki/Foobar' rel='mw:WikiLink'>http://en.wikipedia.org/wiki/Foobar</a>
27978 http://en.wikipedia.org/wiki/Foobar
27979 http://en.wikipedia.org/wiki/Foobar
27980 http://en.wikipedia.org/wiki/Foobar
27983 # 'mi' is a localinterwiki prefix as well as a language
27985 Serialize interwiki links pointing to the current wiki as plain wiki links (T67869)
27989 <p><a rel="mw:ExtLink" href="http://mi.wikipedia.org/wiki/Foo">Foo</a></p>
27995 Parsoid should accept interwiki shortcuts
27999 <p><a rel='mw:WikiLink' href='./fr:Foo'>Foo</a>
28000 <a rel='mw:ExtLink' href='./fr:Foo'>Foo</a>
28001 <a href='./fr:Foo'>Foo</a></p>
28002 <p><a rel='mw:WikiLink' href='fr%3AFoo'>Foo</a>
28003 <a rel='mw:ExtLink' href='fr%3AFoo'>Foo</a>
28004 <a href='fr%3AFoo'>Foo</a></p>
28005 <p><a href='FR%3AFoo'>Foo</a>
28006 <a href='./FR:Foo'>Foo</a></p>
28021 Parsoid should not accept invalid interwiki shortcuts
28025 <p><a rel='mw:WikiLink' href='news:Foo'>Foo</a>
28026 <a rel='mw:ExtLink' href='news:Foo'>Foo</a>
28027 <a href='news:Foo'>Foo</a></p>
28036 New wikilinks should be serialized properly
28040 <a rel="mw:WikiLink" href="./Foo" title="Foo" data-parsoid='{}'>Foo</a>
28041 <a rel="mw:WikiLink" href="./Foo" title="Foo">Foo</a>
28042 <a href="//en.wikipedia.org/wiki/Foo">//en.wikipedia.org/wiki/Foo</a>
28043 <a href="http://en.wikipedia.org/wiki/Foo">http://en.wikipedia.org/wiki/Foo</a>
28044 <a href="//en.wikipedia.org/wiki/Foo_bar">//en.wikipedia.org/wiki/Foo bar</a>
28048 [[:en:Foo|//en.wikipedia.org/wiki/Foo]]
28049 http://en.wikipedia.org/wiki/Foo
28050 [[:en:Foo_bar|//en.wikipedia.org/wiki/Foo bar]]
28054 New wiki links (href variations)
28058 <a rel="mw:WikiLink" href="./Foo_bar">Foo_bar</a>
28059 <a rel="mw:WikiLink" href="Foo_bar">Foo_bar</a>
28060 <a rel="mw:WikiLink" href="Foo bar">Foo_bar</a>
28061 <a rel="mw:WikiLink" href="./Toxine_bact%C3%A9rienne">Toxine bactérienne</a>
28066 [[Toxine bactérienne]]
28070 New wiki links (content string variations)
28074 <a rel="mw:WikiLink" href="./Foo_bar">Foo_bar</a>
28075 <a rel="mw:WikiLink" href="./Foo_bar">Foo bar</a>
28076 <a rel="mw:WikiLink" href="./Foo_bar">./Foo_bar</a>
28080 [[Foo_bar|./Foo_bar]]
28084 New category links (href variations)
28088 <link rel="mw:PageProp/Category" href="./Category:Toxine_bactérienne" />
28089 <link rel="mw:PageProp/Category" href="./Category:Toxine_bact%C3%A9rienne" />
28090 <link rel="mw:PageProp/Category" href="Category:Toxine_bact%C3%A9rienne" />
28092 [[Category:Toxine bactérienne]]
28093 [[Category:Toxine bactérienne]]
28094 [[Category:Toxine bactérienne]]
28098 New sol transparent links don't need indent-pre nowiki protection
28103 <link rel="mw:PageProp/redirect" href="./Main_Page">
28104 <!-- this is good --> <link rel="mw:PageProp/Category" href="./Category:Good" />
28105 <!-- this is great --> <link rel="mw:PageProp/Category" href="./Kategorie:Great" />
28107 #WEITERLEITUNG [[Main Page]]
28108 <!-- this is good --> [[Category:Good]]
28109 <!-- this is great --> [[Kategorie:Great]]
28113 New interlanguage links (href variations)
28117 <link rel="mw:PageProp/Language" href="http://es.wikipedia.org/wiki/Toxine bactérienne" />
28118 <link rel="mw:PageProp/Language" href="http://es.wikipedia.org/wiki/Toxine_bactérienne" />
28119 <link rel="mw:PageProp/Language" href="http://es.wikipedia.org/wiki/Toxine_bact%C3%A9rienne" />
28121 [[es:Toxine bactérienne]]
28122 [[es:Toxine_bactérienne]]
28123 [[es:Toxine_bactérienne]]
28127 Image: Modifying size of an image (1)
28130 "modes": ["wt2wt"],
28132 ["img[height]", "attr", "height", "22"],
28133 ["img[width]", "attr", "width", "200"]
28137 [[Image:Foobar.jpg|230x230px]]
28139 [[Image:Foobar.jpg|200x200px]]
28143 Image: Modifying size of an image (2)
28146 "modes": ["wt2wt"],
28148 ["img[height]", "attr", "height", "100"],
28149 ["img[width]", "attr", "width", "500"]
28153 [[Image:Foobar.jpg|230x230px]]
28155 [[Image:Foobar.jpg|500x500px]]
28158 # Change in size is ignored so long as class='mw-default-size'
28160 Image: Modifying size of an image (3)
28163 "modes": ["wt2wt"],
28165 ["figure[class]", "removeClass", "mw-default-size"],
28166 ["figure img", "attr", "height", "19"],
28167 ["figure img", "attr", "width", "170"]
28171 [[Image:Foobar.jpg|thumb]]
28173 [[Image:Foobar.jpg|thumb|170x170px]]
28177 Image: Modifying alignment of an image (T50665)
28180 "modes": ["wt2wt"],
28182 ["figure[class]", "removeClass", "mw-halign-right"],
28183 ["figure[class]", "addClass", "mw-halign-left"]
28187 [[Image:Foobar.jpg|thumb|caption|right]]
28189 [[Image:Foobar.jpg|thumb|caption|left]]
28193 Image: Modifying mw-default-size of an frameless image (T64805)
28196 "modes": ["wt2wt"],
28198 ["figure.mw-default-size", "removeClass", "mw-default-size"]
28202 [[Image:Foobar.jpg|frameless|right]]
28204 [[Image:Foobar.jpg|frameless|right|220x220px]]
28208 Image: Modifying valign of an image (T51221)
28211 "modes": ["wt2wt"],
28213 ["*[typeof=\"mw:Image\"]", "removeClass", "mw-valign-middle"],
28214 ["*[typeof=\"mw:Image\"]", "addClass", "mw-valign-text-top"]
28218 [[File:Foobar.jpg|20px|middle]]
28220 [[File:Foobar.jpg|20px|text-top]]
28224 Image: Modifying alt attribute of an image (T58400)
28227 "modes": ["wt2wt"],
28229 ["img[alt]", "attr", "alt", "some alternate edited text"]
28233 [[File:Foobar.jpg|thumb|some caption|alt=some alternate text]]
28235 [[File:Foobar.jpg|thumb|some caption|alt=some alternate edited text]]
28239 Image: Modifying caption of an image
28242 "modes": ["wt2wt"],
28244 ["figcaption", "text", "new caption"]
28248 [[Image:Foobar.jpg|thumb|original caption]]
28250 [[Image:Foobar.jpg|thumb|new caption]]
28254 Image: empty alt attribute (T50924)
28258 [[File:Foobar.jpg|thumb|alt=|bar]]
28260 <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>
28264 Image: new attributes should be serialized in wiki's language for RTL languages (T53852)
28270 <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>
28272 [[Imagen:Foobar.jpg|derecha|miniaturadeimagen]]
28276 Image: Block level image should have \n before and after
28279 [[File:Foobar.jpg|right|thumb|150x150px]]
28283 <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>
28288 Image: New block level image should have \n before and after (existing content)
28291 [[File:Foobar.jpg|right|thumb|150x150px]]
28295 <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>
28300 Image: upright option (parsoid)
28302 [[File:Foobar.jpg|thumb|upright|caption]]
28303 [[File:Foobar.jpg|thumb|upright=0.5|caption]]
28304 [[File:Foobar.jpg|thumb|500x500px|upright=0.5|caption]]
28306 <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>
28307 <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>
28308 <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>
28312 Image: upright option is ignored on inline and frame images (parsoid)
28314 [[File:Foobar.jpg|500x500px|upright=0.5|caption]]
28316 <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>
28320 Image: in template parameter with empty parameter
28322 {{echo|[[File:Foobar.jpg|link=]]}}
28324 <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>
28328 Image: from basic HTML (1)
28332 <span typeof="mw:Image">
28333 <img src="./File:Foobar.jpg" width=100 height=100 alt="Alt">
28336 [[File:Foobar.jpg|link=|alt=Alt|100x100px]]
28340 Image: from basic HTML (2)
28344 <img src="./File:Foobar.jpg" width=100 height=100 alt="Alt">
28346 [[File:Foobar.jpg|link=|alt=Alt|100x100px]]
28350 Image: from basic HTML (3)
28354 <a href="Main"><img src="./File:Foobar.jpg" width=100 height=100 alt="Alt"></a>
28356 [[File:Foobar.jpg|link=Main|alt=Alt|100x100px]]
28360 Image: from basic HTML (4)
28364 <img src="./File:Foobar.jpg">
28366 [[File:Foobar.jpg|link=]]
28370 Image: Invalid title as link
28372 [[File:Foobar.jpg|link=<]]
28374 <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>
28377 <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>
28381 Lists: Serialize correctly even when list content is wrapped in p-tags (like VE does)
28386 <li><p>foo</p></li>
28393 Lists: Serialize correctly even when list tags has unneeded whitespace between tags
28397 <ul> <li>foo</li></ul>
28403 Don't strip leading whitespace when handling indent-pre suppressing tags
28408 <tr><td> indented row</td></tr>
28411 <b>This is very bold of you!</b>
28414 indented cell (no pre-wrapping!)
28424 '''This is very bold of you!'''
28428 indented cell (no pre-wrapping!)
28436 Nowiki-wrap leading whitespace when handling indent-pre inducing tags
28458 <nowiki> </nowiki></span>bar2
28461 <nowiki> </nowiki><span>bar</span>
28464 <nowiki> </nowiki><span>foo</span>
28469 Lists: Dont insert newlines in a serialized list item.
28473 <ul><li>a<br>b</li><li>c</li></ul>
28480 1. Headings: Force sol-transparent links and behavior switches to serialize before/after
28483 "modes": ["html2wt"],
28484 "scrubWikitext": false
28487 <h2>hello there<link href="./Category:A1" rel="mw:PageProp/Category" /></h2>
28488 <h2><link href="./Category:A2" rel="mw:PageProp/Category" />hi pal</h2>
28490 <h2><!--foo--> <link href="./Category:A3" rel="mw:PageProp/Category" /> how goes it</h2>
28491 <h2>it goes well <link href="./Category:A4" rel="mw:PageProp/Category" /> <!--bar--></h2>
28493 <h2 data-parsoid='{}'>howdy<link href="./Category:A5" rel="mw:PageProp/Category" /></h2>
28495 <h2><meta property="mw:PageProp/toc" /> ok</h2>
28497 == hello there [[Category:A1]] ==
28499 == [[Category:A2]] hi pal ==
28501 == <!--foo--> [[Category:A3]] how goes it ==
28503 == it goes well [[Category:A4]] <!--bar--> ==
28505 ==howdy [[Category:A5]]==
28511 2. Headings: Force sol-transparent links and behavior switches to serialize before/after
28514 "modes": ["html2wt"],
28515 "scrubWikitext": true
28518 <h2>hello there<link href="./Category:A1" rel="mw:PageProp/Category" /></h2>
28519 <h2><link href="./Category:A2" rel="mw:PageProp/Category" />hi pal</h2>
28521 <h2><!--foo--> <link href="./Category:A3" rel="mw:PageProp/Category" /> how goes it</h2>
28522 <h2>it goes well <link href="./Category:A4" rel="mw:PageProp/Category" /> <!--bar--></h2>
28524 <h2><meta property="mw:PageProp/toc" /> ok</h2>
28532 <!--foo-->[[Category:A3]]
28537 [[Category:A4]] <!--bar-->
28545 Headings: Don't hoist metas that come from templates
28548 "modes": ["html2wt"],
28549 "scrubWikitext": true
28552 <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>
28554 == {{echo|foo [[Category:Foo]]}} ==
28558 Headings: Category in ref isn't hoisted
28561 "modes": ["html2wt"],
28562 "scrubWikitext": true
28565 <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>
28567 <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>
28570 [[Category:Baz]] </ref> ==
28576 Parsoid: Serialize positional parameters with = in them as named parameter
28580 <p about="#mwt1" typeof="mw:Transclusion"
28581 data-mw='{"parts":[{"template":{"target":{"wt":"echo","href":"./Template:Echo"},"params":{"1":{"wt":"f=oo"}},"i":0}}]}'>foo</p>
28583 <p about="#mwt1" typeof="mw:Transclusion"
28584 data-mw='{"parts":[{"template":{"target":{"wt":"echo","href":"./Template:Echo"},"params":{"1":{"wt":"f=oo"}, "2":{"wt":"bar"}},"i":0}}]}'>foo</p>
28586 <!--Orig params with data-parsoid has heuristics for handling = chars-->
28587 <!--FIXME: But maybe the heuristic needs fixing to apply to new params as well-->
28588 <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>
28592 {{echo|1=f=oo|2=bar}}
28594 <!--Orig params with data-parsoid has heuristics for handling = chars-->
28595 <!--FIXME: But maybe the heuristic needs fixing to apply to new params as well-->
28596 {{echo|<nowiki>f=oo</nowiki>|bar}}
28600 Parsoid: Serialize positional parameters with = in extlink as named parameter
28604 <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>
28606 {{echo|1=http://stuff?is=ok}}
28610 Parsoid: Correctly serialize block-node children when they are a combination of text and p-nodes
28614 <div>a<p>b</p></div>
28635 Substrings resembling wikitext in hrefs should not get nowiki escapes
28639 <a rel="mw:WikiLink" href="./Foo''bar''baz">Foo''bar''baz</a>
28645 Enforce single-line context in the serializer
28652 <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">
28653 </span><span about="#mwt1">you</span> </h2>
28655 <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>
28657 <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
28658 there</span></li></ol>
28670 ho </dt><dd data-parsoid='{"stx":"row"}'> hi
28677 </tbody></table></dd></dl>
28681 == hi {{bogus|there
28692 * foo '''bar''' baz
28704 Serialize new placeholder space without spans
28708 <p>foo<span typeof="mw:Placeholder"> </span>: bar</p>
28710 <p>foo<span typeof="mw:DisplaySpace mw:Placeholder" data-parsoid='{"src":" ","isDisplayHack":true}'> </span>: bar</p>
28712 <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>
28718 <ref>foo : bar</ref>ok
28722 #-----------------------
28723 # Tag minimization tests
28724 #-----------------------
28727 1. I/B quote minimization: wikitext-only tags should be combined
28731 <p><i>A</i><i>B</i></p>
28732 <p><b>A</b><b>B</b></p>
28733 <p><i>A</i><b><i>B</i></b></p>
28734 <p><b>A</b><i><b>B</b></i></p>
28735 <p><b>A</b><i><b>B</b><b>C</b></i><b>D</b></p>
28736 <p><i><b>A</b></i><i><b>B</b></i></p>
28737 <p><i><b>A</b></i><b><i>B</i></b></p>
28738 <p><b><i>A</i></b><i><b>B</b></i></p>
28758 2. I/B quote minimization: wikitext and html tags should not be combined
28762 <p><i>A</i><i data-parsoid='{"stx":"html"}'>B</i></p>
28763 <p><i>A</i><b><i data-parsoid='{"stx":"html"}'>B</i></b></p>
28767 ''A''<nowiki/>'''<i>B</i>'''
28771 3. I/B quote minimization: templated content stops minimization
28775 <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>
28776 <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>
28778 ''A''{{echo|''B''}}
28780 ''A''{{echo|'''''B'''''}}
28784 4. I/B quote minimization: new content should be mimimized with adjacent old content
28788 <p><i>A</i><i>B</i></p>
28789 <p><b>A</b><b>B</b></p>
28790 <p><i>A</i><b><i>B</i></b></p>
28800 5a. Merge adjacent quote nodes if they've been edited
28803 "modes": ["wt2wt", "selser"],
28805 ["p", "contents", "remove", ":contains('b')"]
28815 5b. Merge adjacent quote nodes if they've been edited
28818 "modes": ["wt2wt", "selser"],
28824 ''a''<span id="x">b</span>''c''
28830 1. Merge adjacent link nodes as long as at least one element is new
28833 "modes": ["html2wt"],
28834 "scrubWikitext": true
28837 <a rel="mw:WikiLink" href="./Football">Foot</a><a rel="mw:WikiLink" href="./Football">ball</a>
28838 <a data-parsoid="{}" rel="mw:WikiLink" href="./Football">Foot</a><a rel="mw:WikiLink" href="./Football">ball</a>
28839 <a data-parsoid="{}" rel="mw:WikiLink" href="./Football">Foot</a><a data-parsoid="{}" rel="mw:WikiLink" href="./Football">ball</a>
28843 [[Football|Foot]][[Football|ball]]
28847 2. Merge adjacent link nodes and enable additional normalizations
28850 "modes": ["html2wt"],
28851 "scrubWikitext": true
28854 <a rel="mw:WikiLink" href="./Football"><i>Foot</i></a><a rel="mw:WikiLink" href="./Football"><i>ball</i></a>
28860 3. Don't merge adjacent link nodes if scrubWikitext is false
28863 "modes": ["html2wt"],
28864 "scrubWikitext": false
28867 <a rel="mw:WikiLink" href="./Football">Foot</a><a rel="mw:WikiLink" href="./Football">ball</a>
28869 [[Football|Foot]][[Football|ball]]
28873 1. Move format tags outside of WikiLink
28876 "modes": ["html2wt"],
28877 "scrubWikitext": true
28880 <a rel="mw:WikiLink" href="./Football"><i>Football</i></a>
28881 <a rel="mw:WikiLink" href="./Football"><i><b>Football</b></i></a>
28882 <a rel="mw:WikiLink" href="./Football"><u><i><b>Football</b></i></u></a>
28885 '''''[[Football]]'''''
28886 <u>'''''[[Football]]'''''</u>
28890 2. Move format tags outside of WikiLink with mergable A tags
28893 "modes": ["html2wt"],
28894 "scrubWikitext": true
28897 <a rel="mw:WikiLink" href="./Football"><i><b>Foot</b></i></a><a rel="mw:WikiLink" href="./Football"><i><b>ball</b></i></a>
28899 '''''[[Football]]'''''
28903 3. Move format tags outside of WikiLink while preserving formats already outside WikiLink
28906 "modes": ["html2wt"],
28907 "scrubWikitext": true
28910 <font color="red"><a rel="mw:WikiLink" href="./Foo" title="Foo" class="mw-redirect"><u><b>Foo</b></u></a></font>
28912 <font color="red"><u>'''[[Foo]]'''</u></font>
28916 4. Do not move format tags outside of WikiLink which includes attributes color, style and class
28919 "modes": ["html2wt"],
28920 "scrubWikitext": true
28923 <a rel="mw:WikiLink" href="./Foo" title="Foo" class="mw-redirect"><font color="red">Foo</font></a>
28924 <a rel="mw:WikiLink" href="./Foo" title="Foo" class="mw-redirect"><span style="color: blue; font-size: 46px;">Foo></span></a>
28925 <a rel="mw:WikiLink" href="./Foo" title="Foo" class="mw-redirect"><span class="Bar">Foo</span></a>
28927 [[Foo|<font color="red">Foo</font>]]
28928 [[Foo|<span style="color: blue; font-size: 46px;">Foo></span>]]
28929 [[Foo|<span class="Bar">Foo</span>]]
28933 5. T194083 Regression test: Manual edit test that also enables scrubWikitext to move format tags outside wikilinks
28936 "modes": ["selser"],
28937 "scrubWikitext": true,
28939 ["a", "html", "<i>Foo</i>"]
28949 6. Regression test: Manual edit test to ensure diff markers are not lost
28952 "modes": ["selser"],
28953 "scrubWikitext": true,
28955 ["i", "wrap", "<a href='./Foo' rel='mw:WikiLink'></a>"]
28965 7. T194083 Regression test: Manual edit test to ensure nested diff markers aren't inserted
28968 "modes": ["selser"],
28969 "scrubWikitext": true,
28971 ["div", "after", "\n<p><a href='./Foo' rel='mw:WikiLink'>Foo </a>, placeholder</p>"]
28975 <div>placeholder</div>
28977 <div>placeholder</div>
28978 [[Foo]] , placeholder
28981 #------------------------------
28982 # End of tag minimization tests
28983 #------------------------------
28986 T56262: New entities
28990 <span typeof="mw:Entity"> </span>
28995 ## Note that there is no wikitext output for 'unknownproperty' ##
28996 ## Unknown magic words are silently dropped ##
29003 <meta property='mw:PageProp/toc' />
29004 <meta property='mw:PageProp/notoc' />
29005 <meta property='mw:PageProp/forcetoc' />
29006 <meta property='mw:PageProp/index' />
29007 <meta property='mw:PageProp/noindex' />
29008 <meta property='mw:PageProp/nogallery' />
29009 <meta property='mw:PageProp/noeditsection' />
29010 <meta property='mw:PageProp/notitleconvert' />
29011 <meta property='mw:PageProp/nocontentconvert' />
29012 <meta property='mw:PageProp/unknownproperty' />
29022 __NOCONTENTCONVERT__
29026 Consecutive <pre>s should not get merged
29028 parsoid=html2wt,html2html
29030 <pre>a</pre><pre>b</pre>
29058 Edited ISBN links not serializable as ISBN links should serialize as wikilinks
29062 <a href="./Special:BookSources/1234567890" rel="mw:ExtLink">ISBN 1234567895</a>
29064 [[Special:BookSources/1234567890|ISBN 1234567895]]
29068 Edited RFC links not serializable as RFC links should serialize as extlinks
29072 <a href="https://tools.ietf.org/html/rfc123" rel="mw:ExtLink">New RFC</a>
29074 [https://tools.ietf.org/html/rfc123 New RFC]
29078 Edited PMID links not serializable as PMID links should serialize as extlinks
29082 <a href="//www.ncbi.nlm.nih.gov/pubmed/123?dopt=Abstract" rel="mw:ExtLink">New PMID</a>
29084 [//www.ncbi.nlm.nih.gov/pubmed/123?dopt=Abstract New PMID]
29088 WTS of autolinks with trailing/surrounding context
29092 <p><a href="http://cscott.net">http://cscott.net</a><b>foo</b></p>
29093 <p><a href="http://cscott.net">http://cscott.net</a><b data-parsoid='{"stx":"html"}'>foo</b></p>
29094 <p><b><a href="http://cscott.net">http://cscott.net</a></b></p>
29095 <p><b><a href="http://cscott.net">http://cscott.net</a> </b></p>
29096 <p><b><a href="http://cscott.net">http://cscott.net</a>x</b></p>
29097 <p><a href="http://cscott.net">http://cscott.net</a>x</p>
29099 http://cscott.net'''foo'''
29101 http://cscott.net<b>foo</b>
29103 '''http://cscott.net'''
29105 '''http://cscott.net '''
29107 '''http://cscott.net<nowiki/>x'''
29109 http://cscott.net<nowiki/>x
29113 WTS of autolinks with nowikis (round-trip)
29115 x<nowiki/>http://cscott.net<nowiki/>x
29117 <p>x<a rel="mw:ExtLink" class="external free" href="http://cscott.net">http://cscott.net</a>x</p>
29120 # this is the "easy" test because it leaves in place all the
29121 # data-parsoid information indicating this is an autolink
29123 WTS of autolinks with escapes (editing)
29126 "modes": ["wt2wt"],
29128 [ "span", "remove" ]
29132 x<nowiki/>http://cscott.net<nowiki/>x
29134 x<nowiki/>http://cscott.net<nowiki/>x
29138 WTS of edited autolink-like text (T103364)
29141 "modes": ["wt2wt"],
29143 [ "span[typeof]", "removeAttr", "typeof" ]
29147 Not a link: <nowiki>http://example.com</nowiki>.
29149 Not a link: <span><nowiki>http://example.com</nowiki></span>.
29153 WTS of newly-authored autolink-like text (T103364)
29157 <p>http://example.com is not a link.</p>
29159 <nowiki>http://example.com</nowiki> is not a link.
29163 WTS of autolink-like text after an autolink (T108563)
29167 <p><a rel="mw:ExtLink" href="http://example.com">http://example.com</a> http://example.com is not a link.</p>
29169 http://example.com <nowiki>http://example.com</nowiki> is not a link.
29173 Magic links inside links (not autolinked)
29175 [[Foo|http://example.com]]
29178 [[Foo|ISBN 123456789x]]
29180 [http://foo.com http://example.com]
29181 [http://foo.com RFC 1234]
29182 [http://foo.com PMID 1234]
29183 [http://foo.com ISBN 123456789x]
29185 <p><a href="/wiki/Foo" title="Foo">http://example.com</a>
29186 <a href="/wiki/Foo" title="Foo">RFC 1234</a>
29187 <a href="/wiki/Foo" title="Foo">PMID 1234</a>
29188 <a href="/wiki/Foo" title="Foo">ISBN 123456789x</a>
29189 </p><p><a rel="nofollow" class="external text" href="http://foo.com">http://example.com</a>
29190 <a rel="nofollow" class="external text" href="http://foo.com">RFC 1234</a>
29191 <a rel="nofollow" class="external text" href="http://foo.com">PMID 1234</a>
29192 <a rel="nofollow" class="external text" href="http://foo.com">ISBN 123456789x</a>
29195 <p><a rel="mw:WikiLink" href="./Foo" title="Foo">http://example.com</a>
29196 <a rel="mw:WikiLink" href="./Foo" title="Foo">RFC 1234</a>
29197 <a rel="mw:WikiLink" href="./Foo" title="Foo">PMID 1234</a>
29198 <a rel="mw:WikiLink" href="./Foo" title="Foo">ISBN 123456789x</a></p>
29200 <p><a rel="mw:ExtLink" class="external text" href="http://foo.com">http://example.com</a>
29201 <a rel="mw:ExtLink" class="external text" href="http://foo.com">RFC 1234</a>
29202 <a rel="mw:ExtLink" class="external text" href="http://foo.com">PMID 1234</a>
29203 <a rel="mw:ExtLink" class="external text" href="http://foo.com">ISBN 123456789x</a></p>
29207 Magic links inside image captions (autolinked)
29209 [[File:Foobar.jpg|thumb|http://example.com]]
29210 [[File:Foobar.jpg|thumb|RFC 1234]]
29211 [[File:Foobar.jpg|thumb|PMID 1234]]
29212 [[File:Foobar.jpg|thumb|ISBN 123456789x]]
29214 <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>
29215 <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>
29216 <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>
29217 <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>
29219 <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>
29220 <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>
29221 <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>
29222 <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>
29226 WTS of magic word text (T109371)
29231 <p><a href="http://foo.com" rel="mw:ExtLink">RFC 1234</a></p>
29232 <p><a href="./Foo" rel="mw:WikiLink">RFC 1234</a></p>
29234 <nowiki>RFC 1234</nowiki>
29236 [http://foo.com RFC 1234]
29242 Edited Redirect link should emit a non-piped wikitext link
29246 <link rel="mw:PageProp/redirect" href="Bar" data-parsoid='{"a":{"href":"./Foo"},"sa":{"href":"Foo"}}'>
29252 T75121: Infer extension name from typeOf if data-mw is not present
29254 parsoid={ "modes": ["html2wt"], "suppressErrors": true }
29256 <div typeOf="mw:Extension/foo"></div>
29261 # Note that the <p> wrapping isn't present in PHP parser output
29262 # The important thing for this test is that P-wrapping doesn't
29263 # interfere with the <nowiki> protection for leading - in <td>
29264 # (which isn't necessary for <th>).
29266 T88318: p-wrapped dash in table.
29268 parsoid=html2wt,wt2wt
29271 <tr><th><p>-</p></th><th><p>- </p></th></tr>
29272 <tr><td><p>-</p></td><td><p>- </p></td></tr>
29273 <tr><td><small>-</small></td><td><br/><p>-</p></td><td><br/>-</td></tr>
29280 |<nowiki>-</nowiki>
29281 |<nowiki>- </nowiki>
29301 <td><small>-</small>
29308 </td></tr></tbody></table>
29312 T149209: WTS: Handle newlines in table cells properly
29320 </td><td data-parsoid='{"stx":"row"}'>c</td></tr>
29322 </td><td data-parsoid='{"stx":"row", "startTagSrc": "{{!}}{{!}}"}'>y</td></tr>
29328 </th><th data-parsoid='{"stx":"row"}'>c</th></tr>
29330 </th><th data-parsoid='{"stx":"row"}'>y</th></tr>
29352 T149209: Selser: Handle newlines in table cells properly
29355 "modes": ["selser"],
29357 [ "#h1", "html", "a\nb\n" ],
29358 [ "#h2", "html", "a\nb\n" ],
29359 [ "#c1", "html", "a\nb\n" ],
29360 [ "#c2", "html", "<p>a</p>" ],
29361 [ "#c3", "html", "<p>a</p>" ],
29362 [ "#c4", "html", "edit-me<p>a</p>" ]
29367 ! id="h1" |edit-me!!1
29369 ! id="h2" |edit-me||2
29371 | id="c1" |edit-me||3
29373 | id="c2" |edit-me||4
29375 | id="c3" |edit-me||p||q||r
29377 | id="c4" |edit-me||p||q||r
29406 HTML id attribute with Parsoid-like element ids should not be serialized to wikitext
29411 <td id='mwAc'>foo</td>
29412 <td id='serialize-this'>bar</td>
29417 | id="serialize-this" |bar
29422 Parsoid-like element ids should not be serialized to wikitext unless shadowed
29426 <div id="mwAQ" data-parsoid='{"stx":"html","a":{"id":"mwAQ"},"sa":{"id":"hello"}}'>ok</div>
29428 <div id="hello">ok</div>
29432 Testing serialization after deletion in references
29435 "modes": ["wt2wt"],
29441 hi <ref><div id="x">ho</div></ref>
29451 Testing serialization after deletion of table cells
29454 "modes": ["wt2wt", "selser"],
29462 | id="x" |c1 {{!}}{{!}}{{!}}c2 |||c3
29472 Testing selser after addition of new row before first row (T125419)
29475 "modes": ["wt2wt", "selser"],
29477 [ "tr", "before", "<tr><td>X</td></tr>" ]
29493 Serialize new table rows in a HTML table using HTML tags
29496 "modes": ["wt2wt", "selser"],
29498 [ "tr", "before", "<tr><td>X</td></tr>" ]
29502 <table><tr><td>a</td></tr></table>
29504 <table><tr><td>X</td></tr><tr><td>a</td></tr></table>
29508 Serialize new table cells in a HTML row using HTML tags
29511 "modes": ["wt2wt", "selser"],
29513 [ "td", "before", "<td>X</td>" ]
29517 <table><tr><td>a</td></tr></table>
29519 <table><tr><td>X</td><td>a</td></tr></table>
29523 Serialize wikitext list items as HTML list items when embedded in a HTML list
29527 <ul data-parsoid='{"stx": "html"}'>
29528 <li data-parsoid='{}'>a</li>
29538 # SSS FIXME: Is this actually a good thing given the
29539 # odd nested list output that is generated by MW?
29540 # <ul><li>foo<ul>..</ul></li></ul> instead of
29541 # <ul><li>foo</li><ul>..</ul></ul>
29543 Wikitext lists can be nested inside HTML lists
29547 <ul data-parsoid='{"stx": "html"}'>
29548 <li data-parsoid='{"stx": "html"}'>a
29549 <ul><li>b</li></ul>
29553 <ul data-parsoid='{"stx": "html"}'>
29555 <ul><li>y</li></ul>
29576 "modes": ["wt2wt"],
29578 [ "#xyz", "before", "<b>before</b> stuff " ],
29579 [ "#xyz", "after", " stuff <i>after</i>" ],
29580 [ "#xyz", "html", "x <b>y</b> z" ]
29584 <span id="xyz">hello</span>
29586 '''before''' stuff <span id="xyz">x '''y''' z</span> stuff ''after''
29590 Never serialize a-tag as html, regardless of what data-parsoid has to say
29592 parsoid={ "modes": ["html2wt"], "suppressErrors": true }
29594 <a rel="mw:WikiLink" href="./Foo" title="Foo" data-parsoid='{"stx":"html"}'>Foo</a>
29599 ## SSS FIXME: This is broken output nevertheless.
29600 ## What might be a reasonable non-broken output for this?
29601 ## This is an edge case unlikely to be seen in production
29602 ## that I am not wasting more time on this right now.
29604 Never serialize a-tag as html, no matter what attributes it has
29606 parsoid={ "modes": ["html2wt"], "suppressErrors": true }
29608 <a bad='true' href='http://boo.org'><img src='http://boohoo.org' /></a>
29610 [http://boo.org http://boohoo.org]
29613 # Misnested is an indication that selser can reuse the source but these have
29614 # shown to sneak through on occasion. See T101768.
29615 # The original wikitext here is: [http://test.com [[one]] two three]
29617 Strip span tags added to mark misnested links
29621 <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>
29623 [http://test.com][[one]] two three
29627 Catch regression when unpacking misnested links
29631 {{echo|hi}}[http://example.com [[ho]]]
29633 <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>
29637 Catch regression when unpacking with trailing content
29639 {{echo|Foo <references/> bar}}
29641 <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>
29645 Use data-parsoid.firstWikitextNode to compute newline constraints for template content
29649 <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|}"]}'>
29661 ## This test verifies the presence and computation of this attribute indirectly
29662 ## by making an edit and ensuring that the serialization is correct (which it would be
29663 ## only if firstWikitextNode is properly set).
29665 data-parsoid.firstWikitextNode should be computed properly in the presence of fostered content
29668 "modes": ["wt2wt"],
29670 [ "div#x", "remove" ],
29671 [ "div", "before", "<div>new</div>" ]
29675 <div id="x">foo</div>
29677 {{echo|<div>boo</div>
29685 {{echo|<div>boo</div>
29691 # --------------------------------------------
29692 # Tests spec'ing wikitext serialization norms |
29693 # --------------------------------------------
29696 Serialize multi-line indent-pre starting with wikitext syntax
29710 1. Categories should always be serialized on their own line
29714 foo<link rel="mw:PageProp/Category" href="./Category:Foo">bar
29722 2. Categories that are part of templates should not introduce a line break
29724 foo {{echo|<span>bar</span> [[Category:baz]]}} bar
29726 <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>
29729 # Careful while editing these next 2 tests. There are \u200f characters
29730 # before and after the <link> tags in the HTML and following some
29731 # of the categories in wikitext
29732 # Do not remove these characters in edits.
29734 # As part of the serialization, these bidi characters will get stripped.
29736 RTL (\u200f) and LTR (\u200e) markers around category tags should be stripped
29739 "modes": ["html2wt"],
29740 "scrubWikitext": true
29743 <p><link rel="mw:PageProp/Category" href="./קטגוריה:טקסים" />
29744 <link rel="mw:PageProp/Category" href="./קטגוריה:_שיטות_משפט" /></p>
29747 [[קטגוריה: שיטות משפט]]
29751 RTL (\u200f) and LTR (\u200e) markers should not be stripped if followed by a text node
29754 "modes": ["html2wt"],
29755 "scrubWikitext": true
29758 <p><link rel="mw:PageProp/Category" href="./קטגוריה:טקסים" />y</p>
29765 Lists: Add space after bullets
29772 <li><span> baz</span></li>
29777 * <span> baz</span>
29781 1. Headings: Add space before/after == (T53744)
29788 <h2><span> baz</span></h2>
29796 == <span> baz</span> ==
29800 2. Headings: Add space before/after == even after hoisted content
29803 "modes": ["html2wt"],
29804 "scrubWikitext": true
29807 <h2> <link href="./Category:A2" rel="mw:PageProp/Category" />ok</h2>
29815 1. Headings: suppress newly created empty headings
29818 "modes": ["html2wt"],
29819 "scrubWikitext": true
29827 2. Headings: don't suppress empty headings if scrubWikitext is false
29837 3. Headings: suppress empty headings on edits
29840 "modes": ["selser"],
29841 "scrubWikitext": true,
29847 ==<span id="x">foo</span>==
29852 Headings: Replace <br/> with a single whitespace char (when scrubWikitext = true)
29855 "modes": ["html2wt"],
29856 "scrubWikitext": true
29859 <h2>foo<br/>bar</h2>
29860 <h2>foo <span><br/>bar</span> baz</h2>
29864 == foo <span> bar</span> baz ==
29868 Headings: Replace <br/> with a single whitespace char (when scrubWikitext = false)
29871 "modes": ["html2wt"],
29872 "scrubWikitext": false
29875 <h2>foo<br/>bar</h2>
29881 1. WT Quote Tags: suppress newly created empty style tags
29884 "modes": ["html2wt"],
29885 "scrubWikitext": true
29893 2. WT Quote Tags: don't suppress empty style tags if scrubWikitext is false
29899 ''<nowiki/>'''''<nowiki/>'''
29903 3. WT Quote Tags: suppress empty style tags on edits
29906 "modes": ["selser"],
29907 "scrubWikitext": true,
29913 '''<span id="x">foo</span>'''
29918 1. Anchors: suppress newly created empty anchors
29921 "modes": ["html2wt"],
29922 "scrubWikitext": true
29925 <a rel="mw:WikiLink" href="./Test" title="Test"></a>
29930 2. Anchors: don't suppress empty anchors if scrubWikitext is false
29933 "modes": ["html2wt"],
29934 "scrubWikitext": false
29937 <a rel="mw:WikiLink" href="./Test" title="Test"></a>
29943 3. Anchors: suppress empty anchors on edits
29946 "modes": ["selser"],
29947 "scrubWikitext": true,
29953 [[Test|<span id="x">foo</span>]]
29958 3a. Anchors: do not suppress numbered extlinks
29961 "modes": ["wt2wt"],
29962 "scrubWikitext": true
29967 <a rel="mw:ExtLink" href="http://foo.com"></a>
29971 3b. Anchors: do not suppress numbered extlinks
29974 "modes": ["wt2wt"],
29975 "scrubWikitext": true,
29981 [http://foo.com <span id="x">foo</span>]
29987 Normalizations should be restricted to edited content
29990 "modes": ["selser"],
29991 "scrubWikitext": true,
29993 [ "h1", "before", "<i></i>"]
30007 1. Multiple normalizations (html2wt)
30010 "modes": ["html2wt"],
30011 "scrubWikitext": true
30015 <p><a href='Foo' rel='mw:WikiLink'>foo<i></i>
30016 </a><b><i></i></b>x</p>
30025 2. Multiple normalizations (selser)
30028 "modes": ["selser"],
30029 "scrubWikitext": true,
30031 [ "#x", "after", "<h1><i></i></h1>\n<p> x<b></b></p>"]
30035 <span id="x">foo</span>
30037 <span id="x">foo</span>
30043 1. Indent Pre Nowiki: suppress whitespace at the start of new paragraph
30046 "modes": ["html2wt"],
30047 "scrubWikitext": true
30059 2. Indent Pre Nowiki: don't suppress whitespace at the start of new paragraph if scrubWikitext is false
30066 <nowiki> </nowiki>hi
30068 <nowiki> </nowiki> hello
30072 3. Indent Pre Nowiki: suppress whitespace after newlines in new paragraph or table cell
30075 "modes": ["html2wt"],
30076 "scrubWikitext": true
30085 baz bang</td></tr></table>
30091 bar<span>boo</span></p>
30107 bar<span>boo</span>
30111 4. Indent Pre Nowiki: suppress leading whitespace in edited paragraphs
30114 "modes": ["selser"],
30115 "scrubWikitext": true,
30117 [ "p", "html", " a\n b" ]
30128 1. New links that end in spaces
30131 "modes": ["html2wt"],
30132 "scrubWikitext": false
30135 <p><a rel="mw:WikiLink" href="./Berlin" title="Berlin">Berlin </a>is the capital of Germany.</p>
30136 <p><a rel="mw:WikiLink" href="./Foo" title="Foo">Foo </a><b>bar</b></p>
30137 <p><a rel="mw:WikiLink" href="./Boston" title="Boston">Boston </a> is a city.</p>
30139 [[Berlin ]]<nowiki/>is the capital of Germany.
30143 [[Boston ]] is a city.
30147 2. New links that end in spaces
30150 "modes": ["html2wt"],
30151 "scrubWikitext": true
30154 <p><a rel="mw:WikiLink" href="./Berlin" title="Berlin">Berlin </a>is the capital of Germany.</p>
30155 <p><a rel="mw:WikiLink" href="./Foo" title="Foo">Foo </a><b>bar</b></p>
30156 <p><a rel="mw:WikiLink" href="./Boston" title="Boston">Boston </a> is a city.</p>
30158 [[Berlin]] is the capital of Germany.
30162 [[Boston]] is a city.
30166 1. Table cells with escapable prefixes
30169 "modes": ["html2wt"],
30170 "scrubWikitext": false
30174 <tr><td>a</td></tr>
30175 <tr><td>-</td></tr>
30176 <tr><td>+</td></tr>
30182 |<nowiki>-</nowiki>
30184 |<nowiki>+</nowiki>
30189 2. Table cells with escapable prefixes
30192 "modes": ["html2wt"],
30193 "scrubWikitext": true
30197 <tr><td>a</td></tr>
30198 <tr><td>-</td></tr>
30199 <tr><td>+</td></tr>
30212 3a. Table cells with escapable prefixes after edits
30215 "modes": ["selser"],
30216 "scrubWikitext": true,
30218 [ "table tbody tr:first-child td:first-child", "remove"]
30232 3b. Table cells with escapable prefixes after edits
30235 "modes": ["selser"],
30236 "scrubWikitext": true,
30238 [ "table tbody tr:first-child td:first-child", "html", "-" ],
30245 |<span id="x">foo</span>+
30254 # FIXME: This test will fail because
30255 # normalization doesn't realize that the id attribute
30256 # will eliminate the escapable scenario
30258 4a. Table cells without escapable prefixes after edits
30261 "modes": ["selser"],
30262 "scrubWikitext": true,
30264 [ "#x", "html", "-" ]
30277 ## This tests normalizer's ability to discriminate between
30278 ## cells having identical content.
30280 4b. Table cells without escapable prefixes after edits
30283 "modes": ["selser"],
30284 "scrubWikitext": true,
30286 [ "td", "html", "-" ]
30299 ## This tests normalizer's ability to not be tripped by
30300 ## comments (and whitespace)
30302 4c. Table cells without escapable prefixes after edits
30305 "modes": ["selser"],
30306 "scrubWikitext": true,
30308 [ "table tbody tr td:first-child", "remove" ]
30323 ## This tests normalizer's ability to handle HTML cells
30325 4d. Table cells without escapable prefixes after edits
30328 "modes": ["selser"],
30329 "scrubWikitext": true,
30331 [ "td", "html", "-" ]
30336 <tr><td>a</td></tr>
30340 <tr><td>-</td></tr>
30344 ## T111151 Remove font elements without attributes
30346 5a. font tags without attributes should be dropped in scrubWikitext mode
30349 "modes": ["html2wt"],
30350 "scrubWikitext": true
30354 <font><font>bar</font></font>
30355 <font class="x">boo</font>
30359 <font class="x">boo</font>
30363 5b. font tags should not be dropped without scrubWikitext being enabled
30366 "modes": ["html2wt"],
30367 "scrubWikitext": false
30376 Escape nowiki DOM elements
30380 <nowiki><i>foo</i></nowiki>
30382 <nowiki>''foo''</nowiki>
30385 # This is meant to be an interim fix while we go about figuring out
30386 # how to not introduce these trailing <nowiki/>s in the first place.
30388 T115717: Strip trailing <nowiki/>s (without affecting valid uses)
30392 <p>x<meta typeof="mw:Placeholder" data-parsoid='{"src":"<nowiki/>"}'/><meta typeof="mw:Placeholder" data-parsoid='{"src":"<nowiki/>"}'/>
30394 <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>
30395 <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>
30409 New list is serialized on newlines
30413 <p>The quick brown fox jumps over the lazy dog.</p><ul>
30417 </ul><p>The quick onyx goblin jumps over the lazy dwarf.</p>
30419 The quick brown fox jumps over the lazy dog.
30425 The quick onyx goblin jumps over the lazy dwarf.
30429 New lists in formatting elements serialized w/o newlines
30441 <small><ul><li>hi</li></ul></small>
30453 New list in table doesn't need newlines
30457 <table><tr><td><ul><li>test</li><li>123</li></td></tr></table>
30466 # ---------------------------------------------------
30467 # End of tests spec'ing wikitext serialization norms |
30468 # ---------------------------------------------------
30472 Bare inline nodes not wrapped inside p-tags should be treated as p-wrapped
30480 <td><b>c</b><p>d</p></td>
30499 Anchor without href scenarios
30501 parsoid={ "modes": ["html2wt"], "suppressErrors": true }
30504 <a class="no">dice</a>
30509 <span name="foo"></span>
30513 New transclusion added after a list should be serialized after the list
30517 <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>
30523 # -----------------------------------------------------------------
30524 # End of section for Parsoid-only html2wt tests for serialization
30526 # -----------------------------------------------------------------
30528 # -----------------------------------------------------------------
30529 # The following section of tests are primarily to spec behavior of
30530 # the selective serializer. All these tests have manual selser
30531 # changes. The automated selser changes for all tests handle the
30532 # wide variation of changes, but these tests here capture specs
30533 # deterministically.
30534 # ----------------------------------------------------------------
30538 Selser: New comments should not be lost
30541 "modes": ["selser"],
30543 [ "#a", "after", "<!--c1-->" ],
30544 [ "#b", "before", "<!--c2-->" ]
30548 <span id="a">a</span>
30550 <span id="b">b</span>
30552 <span id="a">a</span><!--c1-->
30554 <!--c2--><span id="b">b</span>
30559 Selser: Check for validity of DSR before using it
30562 "modes": ["selser"],
30564 [ "#a", "before", "<meta property='mw:PageProp/displaytitle' content='foo'>" ]
30568 <span id="a">a</span>
30570 {{DISPLAYTITLE:foo}}
30571 <span id="a">a</span>
30575 1. DOMDiff: Changes to <ref> content should be looked up using id
30578 "modes": ["selser"],
30580 ["#X", "after", "bar"],
30581 ["#Y", "after", "baz"]
30585 X <ref><span id="X">foo</span></ref>
30588 <ref name="a"><span id="Y">foo</span></ref>
30591 X <ref><span id="X">foo</span>bar</ref>
30594 <ref name="a"><span id="Y">foo</span>baz</ref>
30599 2. DOMDiff: Changes to <ref> content should be looked up using id
30602 "modes": ["selser"],
30604 ["#Z", "after", "bar"]
30608 A <ref>foo bar for a</ref>
30609 B <ref group="X" name="b" />
30613 <references group="X">
30614 <ref name="b"><span id="Z">foo</span></ref>
30617 A <ref>foo bar for a</ref>
30618 B <ref group="X" name="b" />
30622 <references group="X">
30623 <ref name="b"><span id="Z">foo</span>bar</ref>
30628 DOMDiff: Edits to content nested in elements with templated attributes should not be lost (T139388)
30631 "modes": ["selser"],
30633 [ "div:first-child", "text", "bar" ]
30637 <div style="{{1x|color:red;}}%">foo</div>
30639 <div style="{{1x|color:red;}}%">bar</div>
30651 <li class="mw-empty-elt"></li>
30652 <li class="mw-empty-elt"></li>
30659 [[File:Thumb.png|thumb]]
30661 <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>
30663 <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>
30667 unclosed internal link XSS (T137264)
30669 [[#%3Cscript%3Ealert(1)%3C/script%3E|
30671 <p>[[#<script>alert(1)</script>|
30674 <p>[[#%3Cscript%3Ealert(1)%3C/script%3E|</p>
30678 Validating that <style> isn't eaten by tidy (T167349)
30683 <style>.foo::before { content: "<foo>"; }</style>
30684 <style data-mw-foobar="baz">.foo::after { content: "<bar>"; }</style>
30688 <style>.foo::before { content: "<foo>"; }</style>
30689 <style data-mw-foobar="baz">.foo::after { content: "<bar>"; }</style>
30694 Validating that <style> isn't wrapped in a paragraph (T186965)
30698 A style tag, by itself or with other style/link tags, shouldn't be wrapped in a paragraph
30700 <style>.foo::before { content: "<foo>"; }</style>
30702 <style>.foo::before { content: "<foo>"; }</style> <link rel="foo" href="bar"/><style>.foo::before { content: "<foo>"; }</style>
30704 But if it's on a line with other content, let it be wrapped.
30706 <style>.foo::before { content: "<foo>"; }</style> bar
30708 foo <style>.foo::before { content: "<foo>"; }</style>
30710 foo <style>.foo::before { content: "<foo>"; }</style> bar
30712 And the same if we have non-paragraph-breaking whitespace
30715 <style>.foo::before { content: "<foo>"; }</style>
30718 <p>A style tag, by itself or with other style/link tags, shouldn't be wrapped in a paragraph
30720 <style>.foo::before { content: "<foo>"; }</style>
30721 <style>.foo::before { content: "<foo>"; }</style> <link rel="foo" href="bar"/><style>.foo::before { content: "<foo>"; }</style>
30722 <p>But if it's on a line with other content, let it be wrapped.
30723 </p><p><style>.foo::before { content: "<foo>"; }</style> bar
30724 </p><p>foo <style>.foo::before { content: "<foo>"; }</style>
30725 </p><p>foo <style>.foo::before { content: "<foo>"; }</style> bar
30726 </p><p>And the same if we have non-paragraph-breaking whitespace
30728 <style>.foo::before { content: "<foo>"; }</style>
30734 Validating that <link> isn't wrapped in a paragraph (T186965)
30738 A link tag, by itself or with other style/link tags, shouldn't be wrapped in a paragraph
30740 <link rel="foo" href="bar"/>
30742 <link rel="foo" href="bar"/> <style>.foo::before { content: "<foo>"; }</style><link rel="foo" href="bar"/>
30744 But if it's on a line with other content, let it be wrapped.
30746 <link rel="foo" href="bar"/> bar
30748 foo <link rel="foo" href="bar"/>
30750 foo <link rel="foo" href="bar"/> bar
30752 And the same if we have non-paragraph-breaking whitespace
30755 <link rel="foo" href="bar"/>
30758 <p>A link tag, by itself or with other style/link tags, shouldn't be wrapped in a paragraph
30760 <link rel="foo" href="bar"/>
30761 <link rel="foo" href="bar"/> <style>.foo::before { content: "<foo>"; }</style><link rel="foo" href="bar"/>
30762 <p>But if it's on a line with other content, let it be wrapped.
30763 </p><p><link rel="foo" href="bar"/> bar
30764 </p><p>foo <link rel="foo" href="bar"/>
30765 </p><p>foo <link rel="foo" href="bar"/> bar
30766 </p><p>And the same if we have non-paragraph-breaking whitespace
30768 <link rel="foo" href="bar"/>
30774 Decoding of HTML entities in headings and links for IDs and link fragments (T103714)
30776 wgFragmentMode=[ 'html5', 'legacy' ]
30778 ==A&B&C&amp;D&amp;amp;E==
30779 [[#A&B&C&amp;D&amp;amp;E]]
30781 <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>
30782 <p><a href="#A&B&C&amp;D&amp;amp;E">#A&B&C&amp;D&amp;amp;E</a>
30785 <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>
30786 <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>
30790 Decoding of HTML entities in headings and links for IDs and link fragments (T103714) (legacy)
30792 wgFragmentMode=[ 'legacy' ]
30794 ==A&B&C&amp;D&amp;amp;E==
30795 [[#A&B&C&amp;D&amp;amp;E]]
30797 <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>
30798 <p><a href="#A.26B.26C.26amp.3BD.26amp.3Bamp.3BE">#A&B&C&amp;D&amp;amp;E</a>
30803 Decoding of HTML entities in embedded HTML tags
30805 <table class="1&2&3&amp;4&amp;amp;5"><tr><td>x</td></tr></table>
30807 <table class="1&2&3&amp;4&amp;amp;5"><tr><td>x</td></tr></table>
30810 <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>
30814 Decoding of HTML entities in indicator names for IDs (T104196)
30816 parsoid=wt2html,html2html
30819 <indicator name="1&2&3&amp;4&amp;amp;5">Indicator</indicator>
30821 1&2&3&4&amp;5=Indicator
30824 <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>
30827 # this version of the test strips out the ambiguity so Parsoid rts cleanly
30829 Decoding of HTML entities in indicator names for IDs (unambiguous) (T104196)
30833 <indicator name="1&2&3&amp;4&amp;amp;5">Indicator</indicator>
30835 1&2&3&4&amp;5=Indicator
30838 <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>
30841 # This fragment mode is what Parsoid supports.
30843 HTML5 ids: fallback to legacy
30845 wgFragmentMode=[ 'html5', 'legacy' ]
30857 ==Hey < # " > % : '==
30858 [[#Foo bar]] [[#foo Bar]] [[#Тест]] [[#тест]] [[#Hey < # " > % : ']]
30860 {{anchorencode:💩}} <span id="{{anchorencode:💩}}"></span>
30862 <!-- These two links should produce identical HTML -->
30863 [[#啤酒]] [[#%E5%95%A4%E9%85%92]]
30866 <div id="toc" class="toc"><input type="checkbox" role="button" id="toctogglecheckbox" class="toctogglecheckbox" style="display:none"/><div class="toctitle" lang="en" dir="ltr"><h2>Contents</h2><span class="toctogglespan"><label class="toctogglelabel" for="toctogglecheckbox"></label></span></div>
30868 <li class="toclevel-1 tocsection-1"><a href="#Foo_bar"><span class="tocnumber">1</span> <span class="toctext">Foo bar</span></a></li>
30869 <li class="toclevel-1 tocsection-2"><a href="#foo_Bar_2"><span class="tocnumber">2</span> <span class="toctext">foo Bar</span></a></li>
30870 <li class="toclevel-1 tocsection-3"><a href="#Тест"><span class="tocnumber">3</span> <span class="toctext">Тест</span></a></li>
30871 <li class="toclevel-1 tocsection-4"><a href="#Тест_2"><span class="tocnumber">4</span> <span class="toctext">Тест</span></a></li>
30872 <li class="toclevel-1 tocsection-5"><a href="#тест"><span class="tocnumber">5</span> <span class="toctext">тест</span></a></li>
30873 <li class="toclevel-1 tocsection-6"><a href="#Hey_<_#_"_>_%_:_'"><span class="tocnumber">6</span> <span class="toctext">Hey < # " > % : '</span></a></li>
30877 <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>
30878 <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>
30879 <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>
30880 <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>
30881 <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>
30882 <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>
30883 <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>
30884 </p><p>💩 <span id="💩"></span>
30885 </p><p><a href="#啤酒">#啤酒</a> <a href="#啤酒">#啤酒</a>
30888 <h2 id="Foo_bar">Foo bar</h2>
30890 <h2 id="foo_Bar_2">foo Bar</h2>
30892 <h2 id="Тест"><span id=".D0.A2.D0.B5.D1.81.D1.82" typeof="mw:FallbackId"></span>Тест</h2>
30894 <h2 id="Тест_2"><span id=".D0.A2.D0.B5.D1.81.D1.82_2" typeof="mw:FallbackId"></span>Тест</h2>
30896 <h2 id="тест"><span id=".D1.82.D0.B5.D1.81.D1.82" typeof="mw:FallbackId"></span>тест</h2>
30898 <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>
30899 <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>
30901 <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>
30903 <!-- These two links should produce identical HTML -->
30904 <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>
30907 # Parsoid doesn't support this mode
30909 HTML5 ids: legacy with a fallback to modern
30911 wgFragmentMode=[ 'legacy', 'html5' ]
30923 ==Hey < # " > % : '==
30924 [[#Foo bar]] [[#foo Bar]] [[#Тест]] [[#тест]] [[#Hey < # " > % : ']]
30926 {{anchorencode:💩}} <span id="{{anchorencode:💩}}"></span>
30928 <!-- These two links should produce identical HTML -->
30929 [[#啤酒]] [[#%E5%95%A4%E9%85%92]]
30932 <div id="toc" class="toc"><input type="checkbox" role="button" id="toctogglecheckbox" class="toctogglecheckbox" style="display:none"/><div class="toctitle" lang="en" dir="ltr"><h2>Contents</h2><span class="toctogglespan"><label class="toctogglelabel" for="toctogglecheckbox"></label></span></div>
30934 <li class="toclevel-1 tocsection-1"><a href="#Foo_bar"><span class="tocnumber">1</span> <span class="toctext">Foo bar</span></a></li>
30935 <li class="toclevel-1 tocsection-2"><a href="#foo_Bar_2"><span class="tocnumber">2</span> <span class="toctext">foo Bar</span></a></li>
30936 <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>
30937 <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>
30938 <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>
30939 <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>
30943 <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>
30944 <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>
30945 <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>
30946 <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>
30947 <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>
30948 <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>
30949 <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>
30950 </p><p>.F0.9F.92.A9 <span id=".F0.9F.92.A9"></span>
30951 </p><p><a href="#.E5.95.A4.E9.85.92">#啤酒</a> <a href="#.E5.95.A4.E9.85.92">#啤酒</a>
30955 # Parsoid doesn't support this mode.
30957 HTML5 ids: no legacy
30959 wgFragmentMode=[ 'html5' ]
30971 ==Hey < # " > % : '==
30972 [[#Foo bar]] [[#foo Bar]] [[#Тест]] [[#тест]] [[#Hey < # " > % : ']]
30974 {{anchorencode:💩}} <span id="{{anchorencode:💩}}"></span>
30976 <!-- These two links should produce identical HTML -->
30977 [[#啤酒]] [[#%E5%95%A4%E9%85%92]]
30980 <div id="toc" class="toc"><input type="checkbox" role="button" id="toctogglecheckbox" class="toctogglecheckbox" style="display:none"/><div class="toctitle" lang="en" dir="ltr"><h2>Contents</h2><span class="toctogglespan"><label class="toctogglelabel" for="toctogglecheckbox"></label></span></div>
30982 <li class="toclevel-1 tocsection-1"><a href="#Foo_bar"><span class="tocnumber">1</span> <span class="toctext">Foo bar</span></a></li>
30983 <li class="toclevel-1 tocsection-2"><a href="#foo_Bar_2"><span class="tocnumber">2</span> <span class="toctext">foo Bar</span></a></li>
30984 <li class="toclevel-1 tocsection-3"><a href="#Тест"><span class="tocnumber">3</span> <span class="toctext">Тест</span></a></li>
30985 <li class="toclevel-1 tocsection-4"><a href="#Тест_2"><span class="tocnumber">4</span> <span class="toctext">Тест</span></a></li>
30986 <li class="toclevel-1 tocsection-5"><a href="#тест"><span class="tocnumber">5</span> <span class="toctext">тест</span></a></li>
30987 <li class="toclevel-1 tocsection-6"><a href="#Hey_<_#_"_>_%_:_'"><span class="tocnumber">6</span> <span class="toctext">Hey < # " > % : '</span></a></li>
30991 <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>
30992 <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>
30993 <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>
30994 <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>
30995 <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>
30996 <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>
30997 <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>
30998 </p><p>💩 <span id="💩"></span>
30999 </p><p><a href="#啤酒">#啤酒</a> <a href="#啤酒">#啤酒</a>
31004 T90902: Normalize weird characters in section IDs
31006 wgFragmentMode=[ 'html5', 'legacy' ]
31012 <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>
31013 <p><a href="#Foo_bar">#Foo bar</a>
31016 <h2 id="Foo_bar"> Foo<span typeof="mw:Entity" data-parsoid='{"src":"&nbsp;","srcContent":" "}'> </span>bar </h2>
31017 <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>
31021 T51672: Test for brackets in attributes of elements in external link texts
31023 [http://example.com/ link <span title="title with [brackets]">span</span>]
31024 [http://example.com/ link <span title="title with [brackets]">span</span>]
31027 <p><a rel="nofollow" class="external text" href="http://example.com/">link <span title="title with [brackets]">span</span></a>
31028 <a rel="nofollow" class="external text" href="http://example.com/">link <span title="title with [brackets]">span</span></a>
31031 <p><a rel="mw:ExtLink" class="external text" href="http://example.com/">link <span title="title with [brackets]">span</span></a>
31032 <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>
31036 T72875: Test for brackets in attributes of elements in internal link texts
31038 [[Foo|link <span title="title with [[double brackets]]">span</span>]]
31039 [[Foo|link <span title="title with [[double brackets]]">span</span>]]
31042 <p><a href="/wiki/Foo" title="Foo">link <span title="title with [[double brackets]]">span</span></a>
31043 <a href="/wiki/Foo" title="Foo">link <span title="title with [[double brackets]]">span</span></a>
31046 <p><a rel="mw:WikiLink" href="./Foo" title="Foo">link <span title="title with [[double brackets]]">span</span></a>
31047 <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>
31051 T199926: html arrow wt: Parsoid sometimes trips up on verticalbar chars in hrefs
31054 "modes": ["html2wt"]
31057 <a href="https://stats.wikimedia.org/v2/#/fr.wikipedia.org/reading/page-views-by-country/normal|map|2-Year~2016060100~2018071100|~total">9</a>
31058 <a href="https://stats.wikimedia.org/v2/#/fr.wikipedia.org/reading/page-views-by-country/normal%7Cmap%7C2-Year~2016060100~2018071100%7C~total">10</a>
31060 [https://stats.wikimedia.org/v2/#/fr.wikipedia.org/reading/page-views-by-country/normal|map|2-Year~2016060100~2018071100|~total 9]
31061 [[stats:v2/#/fr.wikipedia.org/reading/page-views-by-country/normal%7Cmap%7C2-Year~2016060100~2018071100%7C~total|10]]
31065 T179544: {{anchorencode:}} output should be always usable in links
31067 wgFragmentMode=[ 'html5' ]
31069 <span id="{{anchorencode:[foo]}}"></span>[[#{{anchorencode:[foo]}}]]
31071 <p><span id="[foo]"></span><a href="#[foo]">#[foo]</a>
31074 <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>
31077 ## ------------------------------
31078 ## Parsoid section-wrapping tests
31079 ## ------------------------------
31081 Section wrapping for well-nested sections (no leading content)
31084 "wrapSections": true
31105 <section data-mw-section-id="0"></section><section data-mw-section-id="1"><h1 id="1">1</h1>
31108 </section><section data-mw-section-id="2"><h1 id="2">2</h1>
31111 <section data-mw-section-id="3"><h2 id="2.1">2.1</h2>
31114 </section><section data-mw-section-id="4"><h2 id="2.2">2.2</h2>
31117 <section data-mw-section-id="5"><h3 id="2.2.1">2.2.1</h3>
31120 </section></section></section><section data-mw-section-id="6"><h1 id="3">3</h1>
31127 Section wrapping for well-nested sections (with leading content)
31130 "wrapSections": true
31135 Para 2 with a <div>nested in it</div>
31148 <section data-mw-section-id="0"><p>Para 1.</p>
31150 <p>Para 2 with a </p><div>nested in it</div>
31154 </section><section data-mw-section-id="1"><h1 id="1">1</h1>
31157 </section><section data-mw-section-id="2"><h1 id="2">2</h1>
31160 <section data-mw-section-id="3"><h2 id="2.1">2.1</h2>
31163 </section></section>
31167 Section wrapping with template-generated sections (good nesting 1)
31170 "wrapSections": true
31187 <section data-mw-section-id="0"></section><section data-mw-section-id="1"><h1 id="1">1</h1>
31190 <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">
31191 </span><p about="#mwt1">b</p>
31192 </section><section data-mw-section-id="3"><h2 id="1.2">1.2</h2>
31195 </section></section><section data-mw-section-id="4"><h1 id="2">2</h1>
31199 # In this example, the template scope is mildly expanded to incorporate the
31200 # trailing newline after the transclusion since that is part of section 1.1.1
31202 Section wrapping with template-generated sections (good nesting 2)
31205 "wrapSections": true,
31206 "modes": ["wt2html", "wt2wt"]
31221 <section data-mw-section-id="0"></section><section data-mw-section-id="1"><h1 id="1">1</h1>
31224 <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">
31225 </span><p about="#mwt1">b</p><span about="#mwt1">
31226 </span><section data-mw-section-id="-1" about="#mwt1"><h3 about="#mwt1" id="1.1.1">1.1.1</h3><span about="#mwt1">
31227 </span><p about="#mwt1">d</p><span about="#mwt1">
31228 </span></section></section></section><section data-mw-section-id="4" data-parsoid="{}"><h1 id="2">2</h1>
31232 # In this example, the template scope is mildly expanded to incorporate the
31233 # trailing newline after the transclusion since that is part of section 1.2.1
31235 Section wrapping with template-generated sections (good nesting 3)
31238 "wrapSections": true,
31239 "modes": ["wt2html", "wt2wt"]
31257 <section data-mw-section-id="0"></section><section data-mw-section-id="1" data-parsoid="{}"><h1 id="1"> 1 </h1>
31260 <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">
31261 </span><section data-mw-section-id="-1" about="#mwt1"><h2 about="#mwt1" id="1.1">1.1</h2><span about="#mwt1">
31262 </span><p about="#mwt1">b</p><span about="#mwt1">
31263 </span></section><section data-mw-section-id="-1" about="#mwt1"><h2 about="#mwt1" id="1.2">1.2</h2><span about="#mwt1">
31264 </span><p about="#mwt1">c</p><span about="#mwt1">
31265 </span><section data-mw-section-id="-1" about="#mwt1"><h3 about="#mwt1" id="1.2.1">1.2.1</h3><span about="#mwt1">
31266 </span><p about="#mwt1">d</p><span about="#mwt1">
31267 </span></section></section></section><section data-mw-section-id="5"><h1 id="2">2</h1>
31271 # Because of section-wrapping and template-wrapping interactions,
31272 # the scope of the template is expanded so that the template markup
31273 # is valid in the presence of <section> tags.
31274 # This exercises the s1 is null scenario in the wrapSections code
31276 Section wrapping with template-generated sections (bad nesting 1)
31279 "wrapSections": true
31293 <section data-mw-section-id="-1"></section><section data-mw-section-id="-2"><div data-parsoid='{"stx":"html"}'>
31296 <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"]}'>
31297 </span><section data-mw-section-id="-1" about="#mwt1"><h1 about="#mwt1" id="1">1</h1><span about="#mwt1">
31298 </span><p about="#mwt1">b
31299 </p><span about="#mwt1">
31301 </span><p about="#mwt1">c</p><span about="#mwt1">
31302 </span></section></div></section>
31305 # Because of section-wrapping and template-wrapping interactions,
31306 # the scope of the template is expanded so that the template markup
31307 # is valid in the presence of <section> tags.
31308 # This exercises the s1 is ancestor of s2 scenario in the wrapSections code
31310 Section wrapping with template-generated sections (bad nesting 2)
31313 "wrapSections": true
31331 <section data-mw-section-id="0"></section><section data-mw-section-id="1"><h1 id="1">1</h1>
31334 </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">
31335 </span><p about="#mwt1">b</p><span about="#mwt1">
31336 </span><section data-mw-section-id="-1" about="#mwt1"><h2 about="#mwt1" id="2.1">2.1</h2><span about="#mwt1">
31337 </span><p about="#mwt1">c</p><span about="#mwt1">
31339 </span><p about="#mwt1">d</p><span about="#mwt1">
31341 </span></section></section><section data-mw-section-id="4"><h1 id="3">3</h1>
31345 # Because of section-wrapping and template-wrapping interactions,
31346 # additional template wrappers are added to <section> tags
31347 # so that template wrapping semantics are valid whether section
31348 # tags are retained or stripped. But, the template scope can expand
31349 # greatly when accounting for section tags.
31350 # This exercises the s1 and s2 are in different subtrees scenario
31352 Section wrapping with template-generated sections (bad nesting 3)
31355 "wrapSections": true,
31356 "modes": ["wt2html", "wt2wt"]
31374 <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>
31377 <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">
31378 </span><p about="#mwt1">b</p><span about="#mwt1">
31379 </span></section></section><section data-mw-section-id="-1" about="#mwt1"><h1 about="#mwt1" id="2">2</h1><span about="#mwt1">
31380 </span><p about="#mwt1">c</p>
31383 </section><section data-mw-section-id="4" data-parsoid="{}"><h1 id="3">3</h1>
31388 Section wrapping with uneditable lead section + div wrapping multiple sections
31391 "wrapSections": true
31396 <div style="border:1px solid red;">
31413 <section data-mw-section-id="-1"><p>foo</p>
31415 </section><section data-mw-section-id="-2"><div style="border:1px solid red;">
31416 <section data-mw-section-id="1"><h1 id="1">1</h1>
31419 <section data-mw-section-id="2"><h2 id="1.1">1.1</h2>
31422 </section></section><section data-mw-section-id="-1"><h1 id="2">2</h1>
31426 </section><section data-mw-section-id="4"><h1 id="3">3</h1>
31429 <section data-mw-section-id="5"><h2 id="3.1">3.1</h2>
31431 </section></section>
31435 Section wrapping with editable lead section + div overlapping multiple sections
31438 "wrapSections": true
31445 <div style="border:1px solid red;">
31462 <section data-mw-section-id="0"><p>foo</p>
31464 </section><section data-mw-section-id="-1"><h1 id="1">1</h1>
31466 </section><section data-mw-section-id="-2"><div style="border:1px solid red;">
31469 <section data-mw-section-id="2"><h2 id="1.1">1.1</h2>
31472 </section><section data-mw-section-id="-1"><h1 id="2">2</h1>
31477 </section><section data-mw-section-id="4"><h1 id="3">3</h1>
31480 <section data-mw-section-id="5"><h2 id="3.1">3.1</h2>
31482 </section></section>
31486 HTML header tags should not be wrapped in section tags
31489 "wrapSections": true
31502 <section data-mw-section-id="0"><p>foo</p>
31504 <h1 id="a" data-parsoid='{"stx":"html"}'>a</h1>
31506 </section><section data-mw-section-id="1"><h1 id="b">b</h1>
31508 <h1 id="c" data-parsoid='{"stx":"html"}'>c</h1>
31510 </section><section data-mw-section-id="2"><h1 id="d">d</h1></section>
31514 Lead section containing only whitespace and comments.
31517 "wrapSections": true
31521 <!-- this is a comment, presumably significant to editors -->
31528 <section data-mw-section-id="0" data-parsoid="{}">
31529 <!-- this is a comment, presumably significant to editors -->
31530 </section><section data-mw-section-id="1"><h1 id="1">1</h1>
31533 </section><section data-mw-section-id="2"><h1 id="2">2</h1>
31538 Pseudo-sections emitted by templates should have id -2
31541 "wrapSections": true
31551 <section data-mw-section-id="-1"><p>foo</p>
31552 </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}}]}'>
31553 <section data-mw-section-id="-1"><h2 id="a">a</h2>
31554 </section><section data-mw-section-id="-1"><h2 id="b">b</h2>
31555 </section></div><span about="#mwt1">
31559 ##########################################################################
31560 Tests demonstrating white-space insensitivity in input wikitext
31561 for wikitext headings, wikitext list items, and wikitext table captions,
31562 headings, and cells. HTML versions of the same should preserve whitespace.
31563 ##########################################################################
31565 Trim whitespace in wikitext headings, list items, table captions, headings, and cells
31568 "modes": ["wt2html"],
31569 "preserveIEW": true
31573 == <!--c1--> <!--c2--> Spaces <!--c3--> <!--c4--> ==
31574 == <!--c1--> <!--c2--> Tabs <!--c3--><!--c4--> ==
31575 == <!--Headings with fallback ids--> Личная жизнь ==
31576 * <!--c1--> <!--c2--> List item <!--c3--> <!--c4-->
31577 ; <!--term to define--> term : <!--term's definition--> definition
31579 |+ <!--c1--> <!--c2--> Table Caption <!--c3--> <!--c4-->
31581 ! <!--c1--> <!--c2--> Table Heading 1 <!--c3--> <!--c4--> !! Table Heading 2 <!--c5-->
31583 | <!--c1--> <!--c2--> Table Cell 1 <!--c3--> <!--c4--> || Table Cell 2 <!--c5-->
31585 | class="foo" || <!--c1--> <!--c2--> Table Cell 3 <!--c3--> <!--c4-->
31587 | <!--c1--> testing [[one|two]] <!--c2--> | <!--c3--> some content
31590 | <!--c1--> <!--c2--> Table Cell 1 <!--c3--> <!--c4--> || Table Cell 2 <!--c5-->
31593 <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>
31594 <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>
31595 <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>
31596 <ul><li>List item</li></ul>
31597 <dl><dt>term </dt>
31598 <dd>definition</dd></dl>
31600 <caption>Table Caption
31603 <th>Table Heading 1</th>
31604 <th>Table Heading 2
31607 <td>Table Cell 1</td>
31611 <td>class="foo"</td>
31615 <td>testing <a href="/index.php?title=One&action=edit&redlink=1" class="new" title="One (page does not exist)">two</a> | some content
31616 </td></tr></tbody></table>
31619 <td>Table Cell 1</td>
31621 </td></tr></tbody></table> foo</dd></dl>
31623 <meta property="mw:PageProp/notoc">
31624 <h2 id="Spaces"><!--c1--><!--c2-->Spaces<!--c3--><!--c4--></h2>
31625 <h2 id="Tabs"><!--c1--><!--c2-->Tabs<!--c3--><!--c4--></h2>
31626 <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>
31627 <ul><li><!--c1--><!--c2-->List item<!--c3--><!--c4--></li></ul>
31628 <dl><dt><!--term to define-->term </dt><dd><!--term's definition-->definition</dd></dl>
31630 <caption><!--c1--><!--c2-->Table Caption<!--c3--><!--c4--></caption>
31632 <th><!--c1--><!--c2-->Table Heading 1<!--c3--><!--c4--></th><th>Table Heading 2<!--c5--></th></tr>
31634 <td><!--c1--><!--c2-->Table Cell 1<!--c3--><!--c4--></td><td>Table Cell 2<!--c5--></td></tr>
31636 <td>class="foo"</td><td><!--c1--><!--c2-->Table Cell 3<!--c3--><!--c4--></td></tr>
31638 <td><!--c1-->testing <a rel="mw:WikiLink" href="./One" title="One">two</a> <!--c2--> | <!--c3--> some content</td></tr>
31641 <tbody><tr><td><!--c1--><!--c2-->Table Cell 1<!--c3--><!--c4--></td><td>Table Cell 2<!--c5--></td></tr>
31642 </tbody></table> foo<!--c1--></dd></dl>
31645 # Looks like <caption> is not accepted in HTML
31647 Do not trim whitespace in HTML headings, list items, table captions, headings, and cells
31650 "modes": ["wt2html"],
31651 "preserveIEW": true
31655 <h2> <!--c1--> <!--c2--> Heading <!--c3--> <!--c4--> </h2>
31656 <ul><li> <!--c1--> <!--c2--> List item <!--c3--> <!--c4--> </li></ul>
31658 <tr><th> <!--c1--> <!--c2--> Table Heading <!--c3--> <!--c4--> <th></tr>
31659 <tr><td> <!--c1--> <!--c2--> Table Cell <!--c3--> <!--c4--> <th></tr>
31662 <h2><span class="mw-headline" id="Heading"> Heading </span></h2>
31663 <ul><li> List item </li></ul>
31665 <tbody><tr><th> Table Heading </th><th></th></tr>
31666 <tr><td> Table Cell </td><th></th></tr>
31669 <meta property="mw:PageProp/notoc"/>
31670 <h2 id="Heading"> <!--c1--> <!--c2--> Heading <!--c3--> <!--c4--> </h2>
31671 <ul><li> <!--c1--> <!--c2--> List item <!--c3--> <!--c4--> </li></ul>
31673 <tbody><tr><th> <!--c1--> <!--c2--> Table Heading <!--c3--> <!--c4--> </th><th></th></tr>
31674 <tr><td> <!--c1--> <!--c2--> Table Cell <!--c3--> <!--c4--> </td><th></th></tr>
31679 Do not trim whitespace in links and quotes
31682 "modes": ["wt2html"],
31683 "preserveIEW": true
31686 foo '' <!--c1--> italic <!--c2--> '' and ''' <!--c3--> bold <!--c4--> '''
31687 [[Foo| some text ]]
31689 <p>foo <i> italic </i> and <b> bold </b>
31690 <a href="/wiki/Foo" title="Foo"> some text </a>
31693 <p>foo <i> <!--c1--> italic <!--c2--> </i> and <b> <!--c3--> bold <!--c4--> </b>
31694 <a rel="mw:WikiLink" href="./Foo" title="Foo"> some text </a></p>
31698 Remove p tags surrounding a single element in a figcaption
31702 [[File:Foobar.jpg|right|200x200px|Caption]]
31704 <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>
31708 Selser preserves lack of newline before list and allows newline after the list
31711 "modes": ["selser"],
31712 "scrubWikitext": true,
31714 [ "ul", "after", "<p>footer</p>" ]
31731 Selser does not introduce newlines between unedited paragraph preceding the list
31734 "modes": ["selser"],
31736 [ "table tbody tr td p:last-child", "empty" ]
31758 Selser does not introduce newlines between unedited paragraph following the list
31761 "modes": ["selser"],
31763 [ "table tbody tr td p:first-child", "empty" ]
31785 Remove a list item but do not insert newline above list
31788 "modes": ["selser"],
31790 [ "ul li:last-child", "remove" ]