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.
62 Article titles can contain single quotes!
72 Template:redirect to foo
74 #REDIRECT [[Template:Foo]]
95 MediaWiki:bad image list
97 * [[File:Bad.jpg]] except [[Nasty page]]
132 // For Serbian; localize Template namespace
140 Template:echo_with_span
146 Template:echo_with_div
152 Template:echo with depth
165 Template:table_attribs
168 |</noinclude>style="color:red;"|Foo
172 Template:table_attribs_2
175 |</noinclude>style="color:red;"|Foo
180 Template:table_attribs_3
183 |</noinclude>style{{=}}"background:#f9f9f9;"|Foo
187 Template:table_attribs_4
189 | style="background-color:#DC241f;" width="10px" |
193 Template:table_attribs_5
196 |</noinclude>style="color:red;"||Bar
200 Template:table_attribs_6
202 style="background: <nowiki>
209 Template:table_attribs_7
212 |</noinclude>style{{=}}"background:#f9f9f9;"|Foo<ref>foo</ref>
216 Template:table_header_cells
218 {{table_attribs}}!!style='color:red;'|''Bar''||style='color:brown;'|''Foo'' and Baz
224 {{table_attribs}}||style='color:red;'|''Bar''||style='color:brown;'|''Foo'' and Baz
228 Template:PartialTable
235 Template:image_attribs
238 [[File:foobar.jpg|</noinclude>right|Caption text<noinclude>]]</noinclude>
241 ## See T48811 for details
243 Template:mixed_attr_content_template
245 style="color:red;" title="T48811"
251 Template:definition_list
298 Template:EmptyTRWithHTMLAttrTest
301 <tr align="center"></tr>
302 <tr><td>foo</td></tr>
303 <tr align="center"></tr>
304 <tr><td>bar</td></tr>
327 This is a simple paragraph.
329 <p>This is a simple paragraph.
334 Paragraphs with extra newline spacing
365 Paragraphs with newline spacing with comment lines in between
373 <!--foo--><!--More than 1 comment, still stripped-->
377 <!--foo--> <!----> <!-- bar -->
438 Paragraphs with newline spacing with non-empty white-space lines in between
465 Paragraphs with newline spacing with non-empty mixed comment and white-space lines in between
473 <!--foo--><!--More than 1 comment doesn't disable stripping of this line!-->
512 Extra newlines: More paragraphs with indented comment
527 Extra newlines followed by heading
541 <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>
542 <p><a href="/index.php?title=A&action=edit&redlink=1" class="new" title="A (page does not exist)">a</a>
545 <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>
550 Extra newlines between heading and content are swallowed (Parsoid does not)
558 <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>
559 <p><a href="/index.php?title=A&action=edit&redlink=1" class="new" title="A (page does not exist)">a</a>
566 <p><a rel="mw:WikiLink" href="./A" title="A">a</a></p>
570 Extra new lines before and after lists are preserved
597 # Parsoid regression test
599 Multiple newlines after tables are converted to p-br-p tags
601 parsoid=wt2html,wt2wt
615 </td></tr></tbody></table>
619 <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>
634 Heading with line break in nowiki
638 wgFragmentMode=[ 'html5', 'legacy' ]
643 <h2><span id="A_B.0AC"></span><span class="mw-headline" id="A_B
645 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>
649 C"><span id="A_B.0AC" typeof="mw:FallbackId"></span>A <span typeof="mw:Nowiki">B
656 http://fr.wikipedia.org/wiki/🍺
657 <!-- EasterEgg we love beer, better be able be able to link to it -->
659 <p><a rel="nofollow" class="external free" href="http://fr.wikipedia.org/wiki/🍺">http://fr.wikipedia.org/wiki/🍺</a>
678 *plain''italic''plain
679 *plain''italic''plain''italic''plain
680 *plain'''bold'''plain
681 *plain'''bold'''plain'''bold'''plain
682 *plain''italic''plain'''bold'''plain
683 *plain'''bold'''plain''italic''plain
684 *plain''italic'''bold-italic'''italic''plain
685 *plain'''bold''bold-italic''bold'''plain
686 *plain'''''bold-italic'''italic''plain
687 *plain'''''bold-italic''bold'''plain
688 *plain''italic'''bold-italic'''''plain
689 *plain'''bold''bold-italic'''''plain
690 *plain l'''italic''plain
691 *plain l''''bold''' plain
694 <li>plain<i>italic</i>plain</li>
695 <li>plain<i>italic</i>plain<i>italic</i>plain</li>
696 <li>plain<b>bold</b>plain</li>
697 <li>plain<b>bold</b>plain<b>bold</b>plain</li>
698 <li>plain<i>italic</i>plain<b>bold</b>plain</li>
699 <li>plain<b>bold</b>plain<i>italic</i>plain</li>
700 <li>plain<i>italic<b>bold-italic</b>italic</i>plain</li>
701 <li>plain<b>bold<i>bold-italic</i>bold</b>plain</li>
702 <li>plain<i><b>bold-italic</b>italic</i>plain</li>
703 <li>plain<b><i>bold-italic</i>bold</b>plain</li>
704 <li>plain<i>italic<b>bold-italic</b></i>plain</li>
705 <li>plain<b>bold<i>bold-italic</i></b>plain</li>
706 <li>plain l'<i>italic</i>plain</li>
707 <li>plain l'<b>bold</b> plain</li></ul>
711 # this example taken from the [[simple:Moon]] article (T49326)
713 Italics and possessives (1)
715 obtained by ''[[Lunar Prospector]]'''s gamma-ray spectrometer
717 <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
721 # this example taken from [[en:Flaming Pie]] (T51926)
723 Italics and possessives (2)
725 '''''Flaming Pie''''' is ... released in 1997. In ''Flaming Pie'''s liner notes
727 <p><i><b>Flaming Pie</b></i> is ... released in 1997. In <i>Flaming Pie'</i>s liner notes
731 # this example taken from [[en:Dictionary]] (T51926)
733 Italics and possessives (3)
735 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''.
737 <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>.
743 ### 2-quote opening sequence tests
746 Italics and bold: 2-quote opening sequence: (2,2)
755 Italics and bold: 2-quote opening sequence: (2,3)
764 Italics and bold: 2-quote opening sequence: (2,4)
774 # same html as previous, but wikitext adjusted to match parsoid html2wt
776 Italics and bold: 2-quote opening sequence: (2,4) w/ nowiki
778 ''foo<nowiki>''</nowiki>''
784 # The PHP parser strips the empty tags out for giggles; parsoid doesn't.
786 Italics and bold: 2-quote opening sequence: (2,5)
799 # same html as previous, but wikitext adjusted to match parsoid html2wt
801 Italics and bold: 2-quote opening sequence: (2,5+3) w/ nowiki
803 ''foo'''''<nowiki/>'''
814 ### 3-quote opening sequence tests
818 Italics and bold: 3-quote opening sequence: (3,2)
827 Italics and bold: 3-quote opening sequence: (3,3)
836 Italics and bold: 3-quote opening sequence: (3,4)
844 # The PHP parser strips the empty tags out for giggles; parsoid doesn't.
846 Italics and bold: 3-quote opening sequence: (3,5)
859 # same html as previous, but wikitext adjusted to match parsoid html2wt
861 Italics and bold: 3-quote opening sequence: (3,5+2) w/ nowiki
863 '''foo'''''<nowiki/>''
874 ### 4-quote opening sequence tests
878 Italics and bold: 4-quote opening sequence: (4,2)
888 # same html as previous, but wikitext adjusted to match parsoid html2wt
890 Italics and bold: 4-quote opening sequence: (4,2) w/ nowiki
892 <nowiki>''</nowiki>''foo''
899 Italics and bold: 4-quote opening sequence: (4,3)
908 Italics and bold: 4-quote opening sequence: (4,4)
918 # same html as previous, but wikitext adjusted to match parsoid html2wt
920 Italics and bold: 4-quote opening sequence: (4,4) w/ nowiki
928 # The PHP parser strips the empty tags out for giggles; parsoid doesn't.
930 Italics and bold: 4-quote opening sequence: (4,5)
939 <p>'<b>foo</b><i></i>
943 # same html as previous, but wikitext adjusted to match parsoid html2wt
945 Italics and bold: 4-quote opening sequence: (4,5+2) w/ nowiki
947 '<nowiki/>'''foo'''''<nowiki/>''
952 <p>'<b>foo</b><i></i>
958 ### 5-quote opening sequence tests
962 Italics and bold: 5-quote opening sequence: (5,2)
972 # same html as previous, but wikitext adjusted to match parsoid html2wt
974 Italics and bold: 5-quote opening sequence: (5,2+3)
983 Italics and bold: 5-quote opening sequence: (5,3)
993 # same html as previous, but wikitext adjusted to match parsoid html2wt
995 Italics and bold: 5-quote opening sequence: (5,3+2)
1004 Italics and bold: 5-quote opening sequence: (5,4)
1010 <p><i><b>foo'</b></i>
1015 Italics and bold: 5-quote opening sequence: (5,5)
1019 <p><i><b>foo</b></i>
1024 Italics and bold: 5-quote opening sequence: (5,6)
1028 <p><i><b>foo'</b></i>
1033 ### multiple quote sequences in a line
1037 Italics and bold: multiple quote sequences: (2,4,2)
1043 <p><i>foo'<b>bar</b></i>
1047 # same html as previous, but wikitext adjusted to match parsoid html2wt
1049 Italics and bold: multiple quote sequences: (2,4,2+3) w/ nowiki
1051 ''foo'<nowiki/>'''bar'''''
1053 <p><i>foo'<b>bar</b></i>
1058 Italics and bold: multiple quote sequences: (2,4,3)
1064 <p><i>foo'<b>bar</b></i>
1068 # same html as previous, but wikitext adjusted to match parsoid html2wt
1070 Italics and bold: multiple quote sequences: (2,4,3+2) w/ nowiki
1072 ''foo'<nowiki/>'''bar'''''
1074 <p><i>foo'<b>bar</b></i>
1079 Italics and bold: multiple quote sequences: (2,4,4)
1085 <p><i>foo'<b>bar'</b></i>
1089 # same html as previous, but wikitext adjusted to match parsoid html2wt
1091 Italics and bold: multiple quote sequences: (2,4,4+2) w/ nowiki
1093 ''foo'<nowiki/>'''bar'<nowiki/>'''''
1095 <p><i>foo'<b>bar'</b></i>
1099 # The PHP parser strips the empty tags out for giggles; parsoid doesn't.
1101 Italics and bold: multiple quote sequences: (3,4,2)
1110 <p><b>foo'</b>bar<i></i>
1114 # same html as previous, but wikitext adjusted to match parsoid html2wt
1116 Italics and bold: multiple quote sequences: (3,4,2+2) w/ nowiki
1118 '''foo''''bar''<nowiki/>''
1123 <p><b>foo'</b>bar<i></i>
1127 # The PHP parser strips the empty tags out for giggles; parsoid doesn't.
1129 Italics and bold: multiple quote sequences: (3,4,3)
1138 <p><b>foo'</b>bar<b></b>
1142 # same html as previous, but wikitext adjusted to match parsoid html2wt
1144 Italics and bold: multiple quote sequences: (3,4,3+3) w/ nowiki
1146 '''foo''''bar'''<nowiki/>'''
1151 <p><b>foo'</b>bar<b></b>
1156 ### other quote tests
1159 Italics and bold: other quote tests: (2,3,5)
1161 ''this is about '''foo's family'''''
1163 <p><i>this is about <b>foo's family</b></i>
1169 Italics and bold: other quote tests: (2,(3,3),2)
1171 ''this is about '''foo's''' family''
1173 <p><i>this is about <b>foo's</b> family</i>
1179 Italics and bold: other quote tests: (3,2,3,2)
1183 '''this is about ''foo'''s family''
1185 <p><b>this is about <i>foo</i></b><i>s family</i>
1190 # same html as previous, but wikitext adjusted to match parsoid html2wt
1192 Italics and bold: other quote tests: (3,2,3+2+2,2)
1194 '''this is about ''foo'''''<nowiki/>''s family''
1196 <p><b>this is about <i>foo</i></b><i>s family</i>
1202 Italics and bold: other quote tests: (3,2,3,3)
1204 '''this is about ''foo'''s family'''
1206 <p>'<i>this is about </i>foo<b>s family</b>
1212 Italics and bold: other quote tests: (3,(2,2),3)
1214 '''this is about ''foo's'' family'''
1216 <p><b>this is about <i>foo's</i> family</b>
1222 Italicized possessive
1224 The ''[[Main Page]]'''s talk page.
1226 <p>The <i><a href="/wiki/Main_Page" title="Main Page">Main Page</a>'</i>s talk page.
1229 <p>The <i><a rel="mw:WikiLink" href="./Main_Page" title="Main Page">Main Page</a>'</i>s talk page.</p>
1233 Quote balancing context should be restricted to td/th cells on the same wikitext line
1235 parsoid=wt2html,wt2wt
1249 </td></tr></tbody></table>
1257 Non-html5 tags should be accepted
1259 <center>''foo''</center>
1261 <font>''foo''</font>
1262 <strike>''foo''</strike>
1265 <center><i>foo</i></center>
1266 <p><big><i>foo</i></big>
1267 <font><i>foo</i></font>
1268 <strike><i>foo</i></strike>
1274 <wbr> is valid wikitext (T54468)
1282 # <strike> is HTML4, <s> is HTML4/5.
1284 <s> or <strike> for strikethrough
1286 <strike>strike</strike>
1290 <p><strike>strike</strike>
1298 Text-level semantic html elements in wikitext
1301 <strong>text</strong>
1317 <ruby><rb>明日</rb><rp>(</rp><rt>Ashita</rt><rp> </rp><rtc>あした</rtc><rp>)</rp></ruby>
1324 <strong>text</strong>
1340 <ruby><rb>明日</rb><rp>(</rp><rt>Ashita</rt><rp> </rp><rtc>あした</rtc><rp>)</rp></ruby>
1348 # test cases taken from
1349 # https://www.w3.org/TR/html5/text-level-semantics.html#the-ruby-element
1351 Ruby markup (W3C-style)
1353 ;Mono-ruby for individual base characters
1354 :<ruby>日<rt>に</rt>本<rt>ほん</rt>語<rt>ご</rt></ruby>
1356 :<ruby>今日<rt>きょう</rt></ruby>
1358 :<ruby>法<rb>華</rb><rb>経</rb><rt>ほ</rt><rt>け</rt><rt>きょう</rt></ruby>
1360 :<ruby>東<rb>京</rb><rp>(</rp><rt>とう</rt><rt>きょう</rt><rp>)</rp></ruby>
1362 :<ruby><rb>旧</rb><rb>金</rb><rb>山</rb><rt>jiù</rt><rt>jīn</rt><rt>shān</rt><rtc>San Francisco</rtc></ruby>
1365 <rb>♥</rb><rtc><rt>Heart</rt></rtc><rtc lang="fr"><rt>Cœur</rt></rtc>
1366 <rb>☘</rb><rtc><rt>Shamrock</rt></rtc><rtc lang="fr"><rt>Trèfle</rt></rtc>
1367 <rb>✶</rb><rtc><rt>Star</rt></rtc><rtc lang="fr"><rt>Étoile</rt></rtc>
1370 <dl><dt>Mono-ruby for individual base characters</dt>
1371 <dd><ruby>日<rt>に</rt>本<rt>ほん</rt>語<rt>ご</rt></ruby></dd>
1373 <dd><ruby>今日<rt>きょう</rt></ruby></dd>
1374 <dt>Jukugo ruby</dt>
1375 <dd><ruby>法<rb>華</rb><rb>経</rb><rt>ほ</rt><rt>け</rt><rt>きょう</rt></ruby></dd>
1376 <dt>Inline ruby</dt>
1377 <dd><ruby>東<rb>京</rb><rp>(</rp><rt>とう</rt><rt>きょう</rt><rp>)</rp></ruby></dd>
1378 <dt>Double-sided ruby</dt>
1379 <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>
1381 <rb>♥</rb><rtc><rt>Heart</rt></rtc><rtc lang="fr"><rt>Cœur</rt></rtc>
1382 <rb>☘</rb><rtc><rt>Shamrock</rt></rtc><rtc lang="fr"><rt>Trèfle</rt></rtc>
1383 <rb>✶</rb><rtc><rt>Star</rt></rtc><rtc lang="fr"><rt>Étoile</rt></rtc>
1388 # The next two test different paths in the sanitizer.
1390 Non-word characters don't terminate tag names (T19663, T42670, T54022)
1392 <blockquote|>a</blockquote>
1394 <b→> doesn't terminate </b→>
1396 <bä> doesn't terminate </bä>
1398 <boo> doesn't terminate </boo>
1400 <s.foo> doesn't terminate </s.foo>
1404 <p><blockquote|>a</blockquote>
1405 </p><p><b→> doesn't terminate </b→>
1406 </p><p><bä> doesn't terminate </bä>
1407 </p><p><boo> doesn't terminate </boo>
1408 </p><p><s.foo> doesn't terminate </s.foo>
1409 </p><p><sub-ID#1>
1414 Non-word characters don't terminate tag names
1416 <blockquote|>a</blockquote>
1418 <b→> doesn't terminate </b→>
1420 <bä> doesn't terminate </bä>
1422 <boo> doesn't terminate </boo>
1424 <s.foo> doesn't terminate </s.foo>
1428 <p><blockquote|>a
1429 </p><p><b→> doesn't terminate </b→>
1430 </p><p><bä> doesn't terminate </bä>
1431 </p><p><boo> doesn't terminate </boo>
1432 </p><p><s.foo> doesn't terminate </s.foo>
1433 </p><p><sub-ID#1>
1438 ### See tests/parser/ParserTestParserHook.php for the <tåg> extension)
1439 ### This checks that HTML5 tags (with non-word characters in the tag
1440 ### name) make it safely through the parser -- the Sanitizer will
1441 ### munge them later, as it should.
1444 Non-word characters are valid in extension tags (T19663)
1455 <pre typeof="mw:Extension/tåg" data-mw='{"name":"tåg","attrs":{},"body":{"extsrc":"tåg"}}' data-parsoid='{}' about="#mwt2"></pre>
1459 Isolated close tags should be treated as literal text (T54760)
1467 <p class="mw-empty-elt">
1468 </p><p><s.foo>s
1473 ### Special characters
1477 Bare pipe character (T54363)
1486 Bare pipe character from a template (T54363)
1495 ### <nowiki> test cases
1499 <nowiki> unordered list
1501 <nowiki>* This is not an unordered list item.</nowiki>
1503 <p>* This is not an unordered list item.
1506 <p><span typeof="mw:Nowiki">* This is not an unordered list item.</span></p>
1512 <nowiki>Lorem ipsum dolor
1520 <p>Lorem ipsum dolor
1529 <p><span typeof="mw:Nowiki">Lorem ipsum dolor
1539 Don't parse <nowiki><span class="error"></nowiki> (T149622)
1541 <nowiki><span class="error"></nowiki>
1543 <p><span class="error">
1546 <p><span typeof="mw:Nowiki"><span class="error"></span></p>
1552 :There is not nowiki.
1553 :There is <nowiki>nowiki</nowiki>.
1555 #There is not nowiki.
1556 #There is <nowiki>nowiki</nowiki>.
1558 *There is not nowiki.
1559 *There is <nowiki>nowiki</nowiki>.
1561 <dl><dd>There is not nowiki.</dd>
1562 <dd>There is nowiki.</dd></dl>
1563 <ol><li>There is not nowiki.</li>
1564 <li>There is nowiki.</li></ol>
1565 <ul><li>There is not nowiki.</li>
1566 <li>There is nowiki.</li></ul>
1569 <dl><dd data-parsoid='{}'>There is not nowiki.</dd>
1570 <dd data-parsoid='{}'>There is <span typeof="mw:Nowiki">nowiki</span>.</dd></dl>
1572 <ol><li data-parsoid='{}'>There is not nowiki.</li>
1573 <li data-parsoid='{}'>There is <span typeof="mw:Nowiki">nowiki</span>.</li></ol>
1575 <ul><li data-parsoid='{}'>There is not nowiki.</li>
1576 <li data-parsoid='{}'>There is <span typeof="mw:Nowiki">nowiki</span>.</li></ul>
1580 Entities inside <nowiki>
1582 <nowiki><</nowiki>
1587 <p><span typeof="mw:Nowiki"><span typeof="mw:Entity" data-parsoid='{"src":"&lt;","srcContent":"<"}'><</span></span></p>
1591 Entities inside template parameters
1598 <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>
1602 Properly escape nowiki when combined with other wiki markup
1606 <p>* </nowiki> tag</p>
1608 <nowiki>*</nowiki> <nowiki></nowiki></nowiki> tag
1612 T93824: Put escaped HTML tags inside nowiki
1616 <p><h2>foo</h2></p>
1618 <nowiki><h2>foo</h2></nowiki>
1622 T71950: 1. Put nowiki as close to cause as possible, even with non-quote escapable chars
1626 <p>This text: L'<a rel="mw:WikiLink" href="./Foo">Foo</a>
1627 This text: L''<a rel="mw:WikiLink" href="./Foo">Foo</a>
1628 This text: L'''<a rel="mw:WikiLink" href="./Foo">Foo</a>''</p>
1630 This text: L'[[Foo]]
1631 This text: L<nowiki>''</nowiki>[[Foo]]
1632 This text: L<nowiki>'''</nowiki>[[Foo]]<nowiki>''</nowiki>
1635 # This test fails because wikitext whitespace is not normalized before comparing.
1637 T71950: 2. Put nowiki as close to cause as possible, after ' :'
1641 <p>This text : L''<a rel="mw:WikiLink" href="./Foo">Foo</a>
1644 This text : L<nowiki>''</nowiki>[[Foo]]
1647 # This test and the next one are html2wt only as they test that incorrect wikitext
1648 # passed in template arguments gets escaped or wrapped in nowikis where required.
1650 T71482: Use {{!}} instead of nowiki for single pipe in template argument
1654 <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>
1655 <span typeof="mw:Transclusion" data-mw="{"parts":[{"template":{"target":{"wt":"echo","href":"./Template:Echo"},"params":{"1":{"wt":"foo|bar |[["}},"i":0}}]}" about="#mwt2"></p>
1657 {{echo|foo{{!}}bar}}
1658 {{echo|<nowiki>foo|bar |[[</nowiki>}}
1662 T53961: Output correct nowikis in template arguments
1666 <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>
1667 <span typeof="mw:Transclusion" data-mw="{"parts":[{"template":{"target":{"wt":"echo","href":"./Template:Echo"},"params":{"1":{"wt":"a }} b"}},"i":0}}]}" about="#mwt2"></span>
1668 <span typeof="mw:Transclusion" data-mw="{"parts":[{"template":{"target":{"wt":"echo","href":"./Template:Echo"},"params":{"1":{"wt":"a [[ b"}},"i":0}}]}" about="#mwt3"></span>
1669 <span typeof="mw:Transclusion" data-mw="{"parts":[{"template":{"target":{"wt":"echo","href":"./Template:Echo"},"params":{"1":{"wt":"a | {{ ]]"}},"i":0}}]}" about="#mwt4"></span>
1670 <span typeof="mw:Transclusion" data-mw="{"parts":[{"template":{"target":{"wt":"echo","href":"./Template:Echo"},"params":{"1":{"wt":"a }"}},"i":0}}]}" about="#mwt5"></span></p>
1673 {{echo|<nowiki>a }} b</nowiki>}}
1674 {{echo|<nowiki>a [[ b</nowiki>}}
1675 {{echo|<nowiki>a | {{ ]]</nowiki>}}
1676 {{echo|a <nowiki>}</nowiki>}}
1680 Cases where "!!" needs nowiki protection
1685 <tr><th>this needs protection !! here</th></tr>
1689 <tr><th>this does not need
1690 protection !! here</th></tr>
1694 !<nowiki>this needs protection !! here</nowiki>
1707 Comments and Indent-Pre
1709 <!-- comment 1 --> asdf
1711 <!-- comment 1 --> asdf
1714 <!-- comment 1 --> asdf
1715 <!-- comment 2 -->xyz
1717 <!-- comment 1 --> asdf
1718 <!-- comment 2 --> xyz
1774 asdf<!-- comment 1 -->jkl
1784 <!-- foo --> b <!-- bar -->
1798 <!-- returns a single newline, not nothing, since the newline after > is not stripped -->
1804 Comment semantics and delimiters
1806 <!-- --><!----><!-----><!------>
1810 <!-- --><!----><!-----><!------>
1814 Comment semantics and delimiters, redux
1816 <!-- In SGML every "foo" here would actually show up in the text -- foo -- bar
1817 -- foo -- funky huh? ... -->
1821 <!-- In SGML every "foo" here would actually show up in the text -- foo -- bar
1822 -- foo -- funky huh? ... -->
1826 Comment semantics and delimiters: directors cut
1828 <!-- ... However we like to keep things simple and somewhat XML-ish so we eat
1829 everything starting with < followed by !-- until the first -- and > we see,
1830 that wouldn't be valid XML however, since in XML -- has to terminate a comment
1836 <!-- ... However we like to keep things simple and somewhat XML-ish so we eat
1837 everything starting with < followed by !-- until the first -- and > we see,
1838 that wouldn't be valid XML however, since in XML -- has to terminate a comment
1843 Comment semantics: nesting
1845 <!--<!-- no, we're not going to do anything fancy here -->-->
1850 <!--<!-- no, we're not going to do anything fancy here --><p>--></p>
1853 # Parsoid closes the unclosed comment, even if it means a slight
1856 Comment semantics: unclosed comment at end
1858 parsoid=wt2html,html2html
1860 <!--This comment will run out to the end of the document
1864 <!--This comment will run out to the end of the document-->
1868 Comment semantics: normalize comments to play nice with XML and browsers
1870 <!-- Browsers --!> think this is closed -->
1871 <!--> This would normally be text -->
1872 <!---> As would this -->
1873 <!-- XML doesn't like trailing dashes -------->
1874 <!-- Nor doubled hyphens -- anywhere in the data -->
1875 But this is not a comment.
1877 <p>But this is not a comment.
1880 <!-- Browsers --!> think this is closed -->
1881 <!--> This would normally be text -->
1882 <!---> As would this -->
1883 <!-- XML doesn't like trailing dashes -------->
1884 <!-- Nor doubled hyphens -- anywhere in the data -->
1885 <p>But this is not a comment.</p>
1889 Comment semantics: round-trip even text which contains encoded -->
1891 <!-- hello & goodbye - > --> --&gt; --&xx -->
1893 <!-- hello & goodbye - > --> --&gt; --&xx -->
1897 Comment in template title
1906 Comment on its own line post-expand
1918 Comment on its own line post-expand with non-significant whitespace
1930 post-expand include size being exceeded
1934 {{echo3|1234567890}}
1936 <p><a href="/wiki/Template:Echo3" title="Template:Echo3">Template:Echo3</a><!-- WARNING: template omitted, post-expand include size too large -->
1941 max template depth being reached
1945 {{echo with depth|too deep!}}
1947 <p><span class="error">Template recursion depth limit exceeded (1)</span>
1952 multiple templates that are redirects
1963 Multiple comments should still parse as SOL-transparent
1965 parsoid=wt2html,wt2wt
1968 <!--c2--><!--c3--><!--c4-->*b
1977 <!--c2--><!--c3--><!--c4-->
1983 ## Make sure ">" gets escaped in comments to avoid XSS
1985 IE conditional comments
1988 <script>alert('hi');</script>
1991 <!--[if lt IE 9]>
1992 <script>alert('hi');</script>
1997 ### paragraph wrapping tests
2013 Block tag on one line (<div>)
2023 <p>a </p><div>foo</div>
2029 No p-wrappable content
2031 parsoid=wt2html,html2html
2033 <span><div>x</div></span>
2034 <span><s><div>x</div></s></span>
2035 <small><em></em></small><span><s><div>x</div></s></span>
2037 <span><div>x</div></span>
2038 <span><s><div>x</div></s></span>
2039 <p><small><em></em></small></p><span><s><div>x</div></s></span>
2042 # T177612: Parsoid-only test
2044 Transclusion meta tags shouldn't trip Parsoid's useless p-wrapper stripping code
2046 {{echo|<span><div>x</div></span>}}
2049 <span about="#mwt1" typeof="mw:Transclusion" data-parsoid='{"stx":"html","pi":[[{"k":"1"}]]}' data-mw='{"parts":[{"template":{"target":{"wt":"echo","href":"./Template:Echo"},"params":{"1":{"wt":"<span><div>x</div></span>"}},"i":0}}]}'><div>x</div></span>
2054 Block tag on one line (<blockquote>)
2056 a <blockquote>foo</blockquote>
2060 a <blockquote>foo</blockquote>
2064 <p>a </p><blockquote><p>foo</p></blockquote>
2070 Block tag on both lines (<div>)
2080 <p>a </p><div>foo</div><p>
2081 b </p><div>foo</div>
2085 Block tag on both lines (<blockquote>)
2087 a <blockquote>foo</blockquote>
2089 b <blockquote>foo</blockquote>
2091 a <blockquote>foo</blockquote>
2092 b <blockquote>foo</blockquote>
2095 <p>a </p><blockquote><p>foo</p></blockquote><p>
2096 b </p><blockquote><p>foo</p></blockquote>
2100 Multiple lines without block tags
2121 x </p><div>foo</div><p> z
2126 Empty lines between lines with block tags
2161 </p><div>b</div><p>d
2166 <div data-parsoid='{"stx":"html"}'></div>
2169 <div data-parsoid='{"stx":"html"}'></div><p>a</p>
2172 <div data-parsoid='{"stx":"html"}'>a</div><p>b</p>
2174 <div data-parsoid='{"stx":"html"}'>b</div><p>d</p>
2177 <div data-parsoid='{"stx":"html"}'>e</div>
2181 Unclosed HTML p-tags should be handled properly
2188 <div><p>foo</p></div>
2193 <div data-parsoid='{"stx":"html"}'><p data-parsoid='{"stx":"html", "autoInsertedEnd":true}'>foo</p></div>
2198 ## SSS FIXME: I can come up with other scenarios where this doesn't work because
2199 ## of eager output of buffered tokens in the p-wrapper. But, I'm going to ignore
2202 1. P-wrapping should leave sol-transparent tags outside p-tags where possible
2206 a [[Category:A1]] [[Category:A2]]
2211 <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"/>
2215 2. P-wrapping should leave sol-transparent tags outside p-tags where possible
2221 <link rel="mw:PageProp/Category" href="./Category:A1"/><p>a</p>
2225 No paragraph necessary for SOL transparent template
2227 <span><div>foo</div></span>
2230 <span><div>foo</div></span>
2231 {{echo|[[Category:Foo]]}}
2233 <span><div>foo</div></span>
2234 <span><div>foo</div></span>
2237 <span data-parsoid='{"stx":"html"}'><div data-parsoid='{"stx":"html"}'>foo</div></span>
2238 <link rel="mw:PageProp/Category" href="./Category:Foo"/>
2240 <span data-parsoid='{"stx":"html"}'><div data-parsoid='{"stx":"html"}'>foo</div></span>
2241 <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}}]}'/>
2245 Avoid expanding multiline sol transparent template ranges unnecessarily
2263 <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">
2266 <link rel="mw:PageProp/Category" href="./Category:Ho" />
2270 Paragraph wrapping following unclosed table
2272 parsoid=wt2html,html2html
2293 </td></tr></tbody></table>
2299 <table data-parsoid='{"autoInsertedEnd":true}'>
2300 <tbody><tr class="mw-empty-elt" data-parsoid='{"startTagSrc":"|-"}'></tr>
2302 </tbody></table><table>
2303 <tbody><tr data-parsoid='{"autoInsertedStart":true}'><td>x</td></tr>
2314 Paragraph wrapping suppressed in html p
2316 parsoid=wt2html,html2html
2336 <p data-parsoid='{"stx":"html"}'>
2347 Dangling table row doesn't prevent p-wrapping
2349 parsoid=wt2html,html2html
2357 <tbody><tr><td>hi</td></tr>
2358 <tr class="mw-empty-elt"></tr>
2359 </tbody></table><p> ho</p>
2363 P-wrapping non-breaking spaces
2374 ### Preformatted text
2384 And a [[Main Page|link]]
2390 And a <a href="/wiki/Main_Page" title="Main Page">link</a>
2395 Tabs don't trigger preformatted text
2399 This is preformatted text.
2405 <pre>This is preformatted text.
2410 preformatted text.</p>
2411 <pre>This is preformatted text.
2416 Space before tab needs nowiki pre protection
2422 <nowiki> </nowiki> a
2426 Ident preformatting with inline content
2437 <pre> with <nowiki> inside (compatibility with 1.6 and earlier)
2454 Regression with preformatted in <center>
2468 T54763: Preformatted in <blockquote>
2474 indented cell (no pre-wrapping!)
2484 <p> indented cell (no pre-wrapping!)
2492 T53086: Double newlines in blockquotes should be turned into paragraphs
2509 T17491: <ins>/<del> in blockquote
2512 Foo <del>bar</del> <ins>baz</ins> quux
2516 <p>Foo <del>bar</del> <ins>baz</ins> quux
2522 <p>Foo <del>bar</del> <ins>baz</ins> quux
2528 T17491: <ins>/<del> in blockquote (2)
2530 <blockquote>Foo <del>bar</del> <ins>baz</ins> quux
2533 <blockquote>Foo <del>bar</del> <ins>baz</ins> quux
2537 <blockquote><p>Foo <del>bar</del> <ins>baz</ins> quux
2542 <pre> with attributes (T5202)
2544 <pre style="background: blue; color:white">Bluescreen of WikiDeath</pre>
2546 <pre style="background: blue; color:white">Bluescreen of WikiDeath</pre>
2551 <pre> with width attribute (T5202)
2553 <pre width="8">Narrow screen goodies</pre>
2555 <pre width="8">Narrow screen goodies</pre>
2560 <pre> with forbidden attribute (T5202)
2562 <pre width="8" onmouseover="alert(document.cookie)">Narrow screen goodies</pre>
2564 <pre width="8">Narrow screen goodies</pre>
2569 Entities inside <pre>
2578 <pre> with forbidden attribute values (T5202)
2580 <pre width="8" style="border-width: expression(alert(document.cookie))">Narrow screen goodies</pre>
2582 <pre width="8" style="/* insecure input */">Narrow screen goodies</pre>
2587 <nowiki> inside <pre> (T15238)
2595 <pre><nowiki><nowiki></nowiki>Foo<nowiki></nowiki></nowiki></pre>
2603 <pre><nowiki>Foo</nowiki></pre>
2608 <nowiki> inside of #tag:pre
2610 {{#tag:pre|Foo <nowiki>→bar</nowiki>}}
2612 <pre>Foo →bar</pre>
2615 <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>
2618 ## Don't expect this to rt, Parsoid drops the unmatched closing pre tags that
2619 ## aren't enclosed in nowikis.
2621 <nowiki> and <pre> preference (first one wins)
2652 <pre typeof="mw:Extension/pre" about="#mwt2" data-mw='{"name":"pre","attrs":{},"body":{"extsrc":"\n<nowiki>\n"}}'><nowiki>
2657 <p><span typeof="mw:Nowiki">
2665 </pre> inside nowiki
2667 <nowiki></pre></nowiki>
2674 Empty pre; pre inside other HTML tags (T56946)
2691 <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
2693 <pre typeof="mw:Extension/pre" about="#mwt4" data-parsoid='{"stx":"html"}' data-mw='{"name":"pre","attrs":{},"body":{"extsrc":""}}'></pre>
2697 HTML pre followed by indent-pre
2710 <p><pre>foo</pre></p>
2712 <p class="mw-empty-elt"></p><pre>foo</pre><p class="mw-empty-elt"></p>
2714 <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>
2718 Templates: Indent-Pre: 1a. Templates that break a line should suppress <pre>
2726 Templates: Indent-Pre: 1b. Templates that break a line should suppress <pre>
2736 Templates: Indent-Pre: 1c: Wrapping should be based on expanded content
2748 Templates: Indent-Pre: 1d: Wrapping should be based on expanded content
2769 Templates: Indent-Pre: 1e. Wrapping should be based on expanded content
2773 {{echo| foo}}{{echo| bar}}
2778 {{echo|<!--cmt--> foo}}
2780 <!--cmt-->{{echo| foo}}
2782 {{echo|{{echo| }}bar}}
2800 Templates: Indent-Pre: 1f: Wrapping should be based on expanded content
2836 ## Hmm, should Parsoid rt this?
2838 Pres with newline attributes
2840 parsoid=wt2html,html2html
2845 <pre class="one two">hi</pre>
2848 <pre class="one two" typeof="mw:Extension/pre" about="#mwt2" data-mw='{"name":"pre","attrs":{"class":"one two"},"body":{"extsrc":"hi"}}'>hi</pre>
2852 Things that look like <pre> tags aren't treated as such
2854 Barack Obama <President> of the United States
2855 <President></President>
2857 <p>Barack Obama <President> of the United States
2858 <President></President>
2862 ## Remex doesn't account for fostered content.
2863 ## The difference between Parsoid and the PHP parser can be attributed to core
2864 ## commit 674e8388cba and 710618f89af in Parsoid's repo. Parsoid doesn't
2865 ## tokenize unmatched extension tags that shadow html tags as strings to ease
2866 ## an escaping mechanism. See the comment in `maybeExtensionTag`.
2868 Handle broken pre-like tags (T66025)
2872 {{echo|<pre <pre>x</pre>}}
2874 <table><pre </table>
2877 <table><pre </table>
2881 <pre <table></table>
2883 <pre typeof="mw:Extension/pre mw:Transclusion" 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>
2885 <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>
2888 ## Similar to the above, but shows the difference between extension and html tags
2890 Less than in attribute position
2897 <div </p><div>123</div>
2899 <pre typeof="mw:Extension/pre" about="#mwt2" data-mw='{"name":"pre","attrs":{"<pre":""},"body":{"extsrc":"123"}}'>123</pre><p>
2901 <div </p><div>123</div>
2905 Parsoid: handle pre with space after attribute
2909 <pre style="width:50%;" >{{echo|foo}}</pre>
2911 <pre style="width:50%;">{{echo|foo}}</pre>
2914 <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>
2925 <pre typeof="mw:Extension/pre" about="#mwt2" data-mw='{"name":"pre","attrs":{}}'></pre>
2929 Newline before table-close generates empty table row: T208619
2937 <tbody><tr><td></td></tr></tbody></table>
2939 <table data-parsoid='{}'>
2944 # PHP has one more row in the output than Parsoid does: T208619
2946 Parsoid: Don't paragraph-wrap fosterable content even if table syntax is unbalanced
2966 </tr><tr><td></td></tr></tbody></table>
2983 #--------------------------------------------------------------------
2984 # Transclusion parameter whitespace stripping tests
2985 # Behavior is different for positional and named parameters
2986 #--------------------------------------------------------------------
2988 Templates: Strip leading and trailing whitespace from named-param values
2992 {{echo|1= {{echo|b}} }}
3010 Templates: Don't strip whitespace from positional-param values
3014 {{echo|{{echo|b}} }}
3054 Templates: Don't recognize targets split by newlines
3070 Templates: Recognize targets when newlines and comments don't split the target
3075 <!--X--> ech<!--X-->o<!--X-->
3083 <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>
3087 Templates: Handle empty comment-and-ws-only lines correctly
3090 <!--should be ignored-->
3091 <!--should be ignored as well-->
3098 <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>
3102 Templates: Handle comments in the target
3105 <!-- should be ignored -->
3109 <!-- should be ignored and spaces on next line should not trip us up (T147742) -->
3112 {{echo<!-- should be ignored -->
3115 {{echo<!-- should be ignored -->|foo}}
3117 {{<!-- should be ignored -->echo|foo}}
3126 <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>
3128 <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>
3130 <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>
3132 <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>
3134 <p typeof="mw:Transclusion" data-mw='{"parts":[{"template":{"target":{"wt":"echo","href":"./Template:Echo"},"params":{"1":{"wt":"foo"}},"i":0}}]}'>foo</p>
3138 Templates: Handle comments in parameter names (T69657)
3141 <!-- should be ignored -->
3145 <!-- should be ignored -->
3148 {{echo|1<!-- should be ignored -->=foo}}
3150 {{echo|<!-- should be ignored -->1=foo}}
3158 <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>
3160 <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>
3162 <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>
3164 <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>
3168 Templates: Other wikitext in parameter names (T69657)
3175 <p typeof="mw:Transclusion" data-mw='{"parts":[{"template":{"target":{"wt":"echo","href":"./Template:Echo"},"params":{"''1''":{"wt":"foo"}},"i":0}}]}'>{{{1}}}</p>
3179 Templates: With colons
3183 <p>Template with colon
3186 <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>
3189 #--------------------------------------------------------------------
3190 # Transclusion parameter escaping tests
3191 #--------------------------------------------------------------------
3194 Templates: Parsoid parameter escaping test 1
3196 {{echo|[foo]|{{echo|[bar]}}}}
3201 <p about="#mwt1" typeof="mw:Transclusion"
3202 data-mw='{"parts":[{"template":{"target":{"wt":"echo","href":"./Template:Echo"},"params":{"1":{"wt":"[foo]"},"2":{"wt":"{{echo|[bar]}}"}},"i":0}}]}'>[foo]</p>
3206 Parsoid: Pipes in external links in template parameter
3208 {{echo|[{{echo|http://example.com}} link]}}
3210 <p><a rel="nofollow" class="external text" href="http://example.com">link</a>
3213 <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>
3217 Parsoid: pipe in transclusion parameter
3219 {{echo|http://foo.com/a|b}}
3221 <p><a rel="nofollow" class="external free" href="http://foo.com/a%7Cb">http://foo.com/a%7Cb</a>
3224 <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>
3228 Parsoid: Pipe in external link target and content in template parameter
3230 parsoid=html2wt,wt2wt
3232 {{echo|[http://foo.com/a|b a|b]}}
3234 <p><a rel="nofollow" class="external text" href="http://foo.com/a%7Cb">a|b</a>
3237 <p><a rel="mw:ExtLink" href="http://foo.com/a|b" about="#mwt1"
3238 typeof="mw:Transclusion"
3239 data-mw='{"parts":[{"template":{"target":{"wt":"echo","href":"./Template:Echo"},
3240 "params":{"1":{"wt":"[http://foo.com/a|b a|b]"}},"i":0}}]}'>a|b</a></p>
3244 Parsoid: Pipe in template with nested template in external link target in template parameter (seriously)
3246 {{echo|[{{fullurl:{{FULLPAGENAME}}|action=edit}} bar]}}
3248 <p><a rel="nofollow" class="external text" href="http://example.org/index.php?title=Parser_test&action=edit">bar</a>
3251 <p><a rel="mw:ExtLink" class="external text" href="http://example.org/index.php?title=Parser_test&action=edit" typeof="mw:Transclusion" data-mw='{"parts":[{"template":{"target":{"wt":"echo","href":"./Template:Echo"},"params":{"1":{"wt":"[{{fullurl:{{FULLPAGENAME}}|action=edit}} bar]"}},"i":0}}]}'>bar</a></p>
3255 Templates: Don't escape already nowiki-escaped text in template parameters
3257 parsoid=html2wt,wt2wt
3259 {{echo|foo<nowiki>|</nowiki>bar}}
3260 {{echo|<nowiki><div></nowiki>}}
3261 {{echo|<nowiki></nowiki>}}
3268 <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>
3269 <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>
3270 <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>
3276 Templates: '=' char in nested transclusions should not trigger nowiki escapes or conversion to named param
3278 parsoid=html2wt,wt2wt
3280 {{echo|{{echo|1=bar}}}}
3285 <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>
3290 Templates parameters with special tokenizing behavior dont get modified because of arg escaping
3297 <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>
3302 Templates: Preserve blank parameter names
3309 <p about="#mwt1" typeof="mw:Transclusion" data-mw='{"parts":[{"template":{"target":{"wt":"echo","href":"./Template:Echo"},"params":{"":{"wt":"foo"}},"i":0}}]}'>{{{1}}}</p>
3313 Templates: Preserve blank parameter names in other positions
3315 {{blank_param|bar|=foo}}
3321 <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
3326 ### Parsoid-centric tests for testing RT edge cases for pre
3330 1a. Indent-Pre and Comments
3343 1b. Indent-Pre and Comments
3356 1c. Indent-Pre and Comments
3369 1d. Indent-Pre and Comments
3370 (Pre-handler currently cannot distinguish between comment/ws order and normalizes them to [comment,ws] order)
3383 2a. Indent-Pre and tables
3404 2b. Indent-Pre and tables
3420 2c. Indent-Pre and tables (T44252)
3437 2d. Indent-Pre and tables
3454 <tbody><tr><td> b</td></tr>
3459 2e. Indent-Pre and table-line syntax
3472 2f. Indent-pre started by table-line syntax
3491 2g. Indented table markup mixed with indented pre content (proposed in T8200)
3496 Text that should be rendered preformatted
3504 <pre>Text that should be rendered preformatted
3513 2h. Indent pre in tables
3515 parsoid=wt2html,html2html
3558 </td><td data-parsoid='{"startTagSrc":"{{!}}"}'>
3560 </td></tr></tbody></table>
3564 3a. Indent-Pre and block tags (single-line html)
3568 c <blockquote> foo </blockquote>
3573 c <blockquote> foo </blockquote>
3574 <pre><span> foo </span>
3577 <p> a </p><p> foo </p><p>
3578 b </p><div> foo </div><p>
3579 c </p><blockquote><p> foo </p></blockquote>
3580 <pre><span> foo </span>
3583 <p> a </p><p data-parsoid='{"stx":"html"}'> foo </p><p>
3584 b </p><div data-parsoid='{"stx":"html"}'> foo </div><p>
3585 c </p><blockquote data-parsoid='{"stx":"html"}'><p> foo </p></blockquote>
3586 <pre><span data-parsoid='{"stx":"html"}'> foo </span></pre>
3590 3b. Indent-Pre and block tags (multi-line html)
3593 <!-- comment --> b <div> foo </div>
3595 <pre>a <span>foo</span>
3600 <pre>a <span data-parsoid='{"stx":"html"}'>foo</span></pre>
3601 <!-- comment --> <p>b </p><div data-parsoid='{"stx":"html"}'> foo </div>
3603 <pre>a <span>foo</span>
3605 b </p><div> foo </div>
3609 3c. Indent-Pre and block tags (pre-content on separate line)
3673 4. Indent-Pre and extension tags
3675 parsoid=wt2html,html2html
3684 <p> a </p><pre typeof="mw:Extension/tag" about="#mwt2" data-mw='{"name":"tag","attrs":{}}'></pre>
3688 5. Indent-Pre and html pre
3690 <pre class="123">hi</pre>
3692 <pre class="123">hi</pre>
3695 <pre class="123" typeof="mw:Extension/pre" about="#mwt2" data-mw='{"name":"pre","attrs":{"class":"123"},"body":{"extsrc":"hi"}}'>hi</pre>
3699 Render paragraphs when indent-pre is suppressed in blocklevels
3716 4. Multiple spaces at start-of-line
3734 ## NOTE: the leading white-space chars on empty line are significant
3736 5a. White-space in indent-pre
3748 ## NOTE: the leading white-space chars on empty line are significant
3750 5b. White-space in indent-pre
3769 5c. White-space in indent-pre
3782 6. Pre-blocks should extend across lines with leading WS even when there is no wrappable content
3805 7a. Indent-pre and category links
3807 parsoid=wt2html,wt2wt
3809 [[Category:foo]] <!-- No pre-wrapping -->
3810 {{echo| [[Category:foo]]}} <!-- No pre-wrapping -->
3813 <link rel="mw:PageProp/Category" href="./Category:Foo"> <!-- No pre-wrapping -->
3814 <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 -->
3817 ## We used to, but no longer wt2wt this test since the default serializer
3818 ## will normalize all categories to serialize on their own line.
3819 ## This wikitext usage is going to be fairly uncommon in production and
3820 ## selser will take care of preserving formatting in those scenarios.
3822 7b. Indent-pre and category links
3827 [[Category:foo]] {{echo|b}}
3829 <pre><link rel="mw:PageProp/Category" href="./Category:Foo"> a
3830 <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>
3834 Indent-Pre: Newlines in comments shouldn't affect sol state
3849 ### HTML-pre (some to spec PHP parser behavior and some Parsoid-RT-centric)
3853 HTML-pre: 1. embedded newlines
3885 <pre typeof="mw:Extension/pre" about="#mwt2" data-mw='{"name":"pre","attrs":{},"body":{"extsrc":"foo"}}'>foo</pre>
3887 <pre typeof="mw:Extension/pre" about="#mwt4" data-mw='{"name":"pre","attrs":{},"body":{"extsrc":"\nfoo\n"}}'>foo
3890 <pre typeof="mw:Extension/pre" about="#mwt6" data-mw='{"name":"pre","attrs":{},"body":{"extsrc":"\n\nfoo\n"}}'>
3895 <pre typeof="mw:Extension/pre" about="#mwt8" data-mw='{"name":"pre","attrs":{},"body":{"extsrc":"\n\n\nfoo\n"}}'>
3903 HTML-pre: big spaces
3939 <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"}}'>
3958 HTML-pre: 2: indented text
3971 HTML-pre: 3: other wikitext
3990 <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
3999 ### Definition lists
4007 <dd>Definition</dd></dl>
4012 Definition list for indentation only
4016 <dl><dd>Indented text</dd></dl>
4021 Definition list with no space
4026 <dd>Definition</dd></dl>
4031 Definition list with URL link
4033 ;http://example.com/ :definition
4035 <dl><dt><a rel="nofollow" class="external free" href="http://example.com/">http://example.com/</a></dt>
4036 <dd>definition</dd></dl>
4041 Definition list with bracketed URL link
4043 ;[http://www.example.com/ Example]:Something about it
4045 <dl><dt><a rel="nofollow" class="external text" href="http://www.example.com/">Example</a></dt>
4046 <dd>Something about it</dd></dl>
4051 Definition list with wikilink containing colon
4053 ;[[Help:FAQ]]:The least-read page on Wikipedia
4055 <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>
4056 <dd>The least-read page on Wikipedia</dd></dl>
4060 # At Brion's and JeLuF's insistence... :)
4062 Definition list with news link containing colon
4064 ;news:alt.wikipedia.rox :This isn't even a real newsgroup!
4066 <dl><dt><a rel="nofollow" class="external free" href="news:alt.wikipedia.rox">news:alt.wikipedia.rox</a></dt>
4067 <dd>This isn't even a real newsgroup!</dd></dl>
4070 <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>
4074 Malformed definition list with colon
4076 ;news:alt.wikipedia.rox -- don't crash or enter an infinite loop
4078 <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>
4083 Definition lists: colon in external link text
4085 ;[http://www.wikipedia2.org/ Wikipedia :The Next Generation] :OK, I made that up
4087 <dl><dt><a rel="nofollow" class="external text" href="http://www.wikipedia2.org/">Wikipedia :The Next Generation</a></dt>
4088 <dd>OK, I made that up</dd></dl>
4093 Definition lists: colon in HTML attribute
4095 ;<b style="display: inline">bold</b>
4097 <dl><dt><b style="display: inline">bold</b></dt></dl>
4102 Definition lists: self-closed tag
4104 ;one<br/>two :two-line fun
4106 <dl><dt>one<br />two</dt>
4107 <dd>two-line fun</dd></dl>
4112 Definition lists: ignore colons inside tags
4114 ;one <b>two : tag <i>fun:</i>:</b>:def
4116 <dl><dt>one <b>two : tag <i>fun:</i>:</b></dt>
4122 Definition lists: excess closed tags
4124 ;one</b>two :bad tag fun
4127 <dd>bad tag fun</dd></dl>
4131 <dd>bad tag fun</dd>
4136 T13748: Literal closing tags
4140 <dd>test test test test test</dd>
4142 <dd>test test test test test</dd>
4147 <dd>test test test test test</dd>
4149 <dd>test test test test test</dd>
4155 Definition and unordered list using wiki syntax nested in unordered list using html tags.
4164 <dd>description</dd></dl>
4165 <ul><li>unordered</li></ul>
4171 Definition list with empty definition and following paragraph
4184 Nested definition lists using html syntax
4197 Definition Lists: No nesting: Multiple dd's
4210 Definition Lists: Indentation: Regular
4218 <dl><dd>i3</dd></dl></dd></dl></dd></dl>
4223 Definition Lists: Indentation: Missing 1st level
4229 <dl><dd>i3</dd></dl></dd></dl></dd></dl>
4234 Definition Lists: Indentation: Multi-level indent
4238 <dl><dd><dl><dd><dl><dd>i3</dd></dl></dd></dl></dd></dl>
4243 Definition Lists: Hacky use to indent tables
4250 should be left alone
4252 <dl><dd><dl><dd><table>
4257 </td></tr></table></dd></dl></dd></dl>
4259 should be left alone
4264 Definition Lists: Hacky use to indent tables (with content following table)
4269 |} <!--c1--> this text should be part of the dl
4276 </td></tr></tbody></table> this text should be part of the dl</dd></dl>
4283 </td></tr></tbody></table> <!--c1--> this text should be part of the dl</dd></dl>
4287 Definition Lists: Hacky use to indent tables, with comments (T65979)
4295 should be left alone
4298 <dl><dd><dl><dd><table><tr>
4301 </tr></table><!-- bar --></dd></dl></dd></dl>
4303 should be left alone</p>
4307 Definition Lists: Hacky use to indent tables, with comment before table
4315 <dl><dd><dl><dd><!-- foo --><table><tr>
4317 </tr></table></dd></dl></dd></dl>
4320 # The trailing whitespace in this test is to catch a regression in
4321 # Parsoid after T54473.
4323 Definition Lists: Hacky use to indent tables (WS-insensitive)
4332 </td></tr></table></dd></dl>
4336 <tbody><tr><td>a</td></tr>
4337 </tbody></table></dd></dl>
4340 ## The PHP parser treats : items (dd) without a corresponding ; item (dt)
4341 ## as an empty dt item. It also ignores all but the last ";" when followed
4342 ## by ":" later on. So, ";" are not ignored in ";;;t3" but are ignored in
4343 ## ";;;t3 :d1". So, PHP parser behavior is a little inconsistent wrt multiple
4346 ## Ex: ";;t2 ::d2" is transformed into:
4358 ## But, Parsoid treats "; :" as a tight atomic unit and excess ":" as plain text
4359 ## So, the same wikitext above (;;t2 ::d2) is transformed into:
4370 ## All Parsoid only definition list tests have this difference.
4372 ## See also: https://phabricator.wikimedia.org/T8569
4373 ## and https://lists.wikimedia.org/pipermail/wikitext-l/2011-November/000483.html
4376 Table / list interaction: indented table with lists in table contents
4398 </td></tr></table></dd></dl>
4403 Table / list interaction: lists nested in tables nested in indented lists
4426 </td></tr></table></dd></dl>
4433 Definition Lists: Nesting: Multi-level (Parsoid only)
4461 Definition Lists: Nesting: Test 2
4468 <dl><dd>d2</dd></dl></dd></dl>
4473 Definition Lists: Nesting: Test 3
4478 <dl><dd><dl><dt>t1</dt>
4480 <dl><dd><dl><dd>d2</dd></dl></dd></dl></dd></dl></dd></dl>
4485 Definition Lists: Nesting: Test 4
4490 <dl><dd><dl><dd><dl><dt>t3</dt>
4491 <dd>d3</dd></dl></dd></dl></dd></dl>
4496 ## The Parsoid team believes the following three test exposes a
4497 ## bug in the PHP parser. (Parsoid team thinks the PHP parser is
4498 ## wrong to close the <dl> after the <dt> containing the <ul>.)
4499 ## It also exposes a "misfeature" in tidy, which doesn't like
4500 ## <dl> tags with a single <dt> child; it converts the <dt> into
4501 ## a <dd> in that case. (Parsoid leaves the <dt> alone!)
4503 Definition Lists: Mixed Lists: Test 1
4509 <dl><dd><dl><dt><ul><li>foo</li>
4510 <li>bar</li></ul></dt></dl>
4511 <dl><dt>baz</dt></dl></dd></dl>
4514 <dl><dd><dl><dt><ul><li>foo</li>
4515 <li>bar</li></ul></dt></dl>
4516 <dl><dt>baz</dt></dl></dd></dl>
4534 Definition Lists: Mixed Lists: Test 2
4539 <ul><li><dl><dd>d1</dd>
4540 <dd>d2</dd></dl></li></ul>
4546 Definition Lists: Mixed Lists: Test 3
4551 <ul><li><dl><dd><dl><dd><dl><dd>d1</dd>
4552 <dd>d2</dd></dl></dd></dl></dd></dl></li></ul>
4558 Definition Lists: Mixed Lists: Test 4
4563 <ul><li><dl><dt>d1</dt>
4566 <dd>d4</dd></dl></li></ul>
4572 Definition Lists: Mixed Lists: Test 5
4578 <dl><dd>d2</dd></dl></dd></dl></li></ul>
4584 Definition Lists: Mixed Lists: Test 6
4589 <ol><li><ul><li><dl><dd>d1
4590 <dl><dd><dl><dd>d3</dd></dl></dd></dl></dd></dl></li></ul></li></ol>
4596 Definition Lists: Mixed Lists: Test 7
4601 <dl><dd><ul><li>d1</li>
4602 <li>d2</li></ul></dd></dl>
4608 Definition Lists: Mixed Lists: Test 8
4613 <dl><dd><ul><li>d1</li></ul>
4614 <dl><dd><ul><li>d2</li></ul></dd></dl></dd></dl>
4620 Definition Lists: Mixed Lists: Test 9
4624 <ul><li><dl><dt>foo</dt>
4625 <dd>bar</dd></dl></li></ul>
4631 Definition Lists: Mixed Lists: Test 10
4635 <ul><li><ol><li><dl><dt>foo</dt>
4636 <dd>bar</dd></dl></li></ol></li></ul>
4640 # The Parsoid team disagrees with the PHP parser's seemingly-random
4641 # rules regarding dd/dt on the next few tests. Parsoid is more
4642 # consistent, and recognizes the shared nesting and keeps the
4643 # still-open tags around until the nesting is complete.
4645 # This is a regression test for T175099
4647 Definition Lists: Mixed Lists: Test 11
4654 <ul><li>b</li></ul></dd></dl>
4658 <dd><ul><li>b</li></ul></dd></dl>
4661 # FIXME: Maybe get rid of this test?
4663 Definition Lists: Mixed Lists: Test 12
4668 <ul><li><ol><li><ul><li><ol><li><dl><dt>foo</dt>
4669 <dd><ul><li><dl><dt><dl><dt>bar</dt></dl></dd></dl></li></ul></dd></dl>
4671 <dd>baz</dd></dl></li></ol></li></ul></li></ol></li></ul>
4674 <ul><li><ol><li><ul><li><ol><li><dl><dt>foo</dt>
4675 <dd><ul><li><dl><dt><dl><dt>bar</dt></dl></dt></dl></li></ul></dd></dl></li></ol></li></ul>
4677 <dd>baz</dd></dl></li></ol></li></ul>
4695 <dd data-parsoid='{"stx":"row"}'>bar</dd>
4700 <dd data-parsoid='{"stx":"row"}'>baz</dd>
4709 Definition Lists: Mixed Lists: Test 13
4714 <ul><li><ol><li><ul><li><ol><li><dl><dt>foo </dt>
4715 <dd><ul><li><dl><dt><dl><dt>bar</dt></dl></dt></dl></li></ul></dd></dl></li></ol></li></ul>
4716 <dl><dt>boo </dt>
4717 <dd>baz</dd></dl></li></ol></li></ul>
4720 # FIXME: Maybe get rid of this test?
4722 # * The test is wrong, there are two colons where there should be :;
4723 # * The PHP parser is wrong to close the <dl> after the <dt> containing the <ul>.
4725 Definition Lists: Weird Ones: Test 1
4727 *#;*::;;foo :bar (who uses this?)
4729 <ul><li><ol><li><dl><dt>foo</dt>
4730 <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>
4748 <dd data-parsoid='{"stx":"row"}'>bar (who uses this?)</dd>
4760 Definition Lists: colons occurring in tags
4777 <dt><span>a:b</span></dt>
4778 <dt><div>a:b</div></dt>
4779 <dt><div>a</div></dt>
4783 <dt><i>a:b</i></dt></dl>
4784 <dl><dt><dl><dt><dl><dt><i>a:b</i></dt></dl></dt></dl></dt></dl>
4786 <dl><dt>a</dt><dd data-parsoid='{"stx":"row"}'>b</dd>
4788 <dt><i data-parsoid='{"stx":"html"}'>a:b</i></dt>
4789 <dt><span data-parsoid='{"stx":"html"}'>a:b</span></dt>
4790 <dt><div data-parsoid='{"stx":"html"}'>a:b</div></dt>
4791 <dt><div data-parsoid='{"stx":"html","autoInsertedEnd":true}'>a</div></dt>
4793 <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>
4794 <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>
4795 <dl><dt><dl><dt><i>a:b</i></dt></dl></dt></dl></dt></dl>
4798 # Parsoid's output differs here again because it shares
4799 # nesting between the two lists unlike the PHP parser.
4800 # Unsure which is more desirable.
4802 Definition Lists: colons and tables 1
4814 </td></tr></table></dd></dl>
4818 </td></tr></table></dd></dl>
4824 </td></tr></table></dd>
4828 </td></tr></table></dd></dl>
4831 # FIXME: Does this need a html/php section?
4833 Definition Lists: template interaction
4835 ::{{definition_list}}
4838 ::{{definition_list}}
4843 <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">
4844 </span><dd about="#mwt1">two</dd></dl></dd></dl>
4846 <dl><dd data-parsoid='{}'>one
4847 <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">
4848 </span><dd about="#mwt2">two
4850 <dd>three</dd></dl></dd>
4851 <dd data-parsoid='{}'>four</dd></dl></dd></dl>
4859 External links: non-bracketed
4861 Non-bracketed: http://example.com
4863 <p>Non-bracketed: <a rel="nofollow" class="external free" href="http://example.com">http://example.com</a>
4867 # parsoid doesn't explicitly mark autonumbered links, see T55505
4869 External links: numbered
4871 Numbered: [http://example.com]
4872 Numbered: [http://example.net]
4873 Numbered: [http://example.com]
4875 <p>Numbered: <a rel="nofollow" class="external autonumber" href="http://example.com">[1]</a>
4876 Numbered: <a rel="nofollow" class="external autonumber" href="http://example.net">[2]</a>
4877 Numbered: <a rel="nofollow" class="external autonumber" href="http://example.com">[3]</a>
4880 <p>Numbered: <a rel="mw:ExtLink" class="external autonumber" href="http://example.com"></a>
4881 Numbered: <a rel="mw:ExtLink" class="external autonumber" href="http://example.net"></a>
4882 Numbered: <a rel="mw:ExtLink" class="external autonumber" href="http://example.com"></a></p>
4886 External links: specified text
4888 Specified text: [http://example.com link]
4890 <p>Specified text: <a rel="nofollow" class="external text" href="http://example.com">link</a>
4895 External links: trail
4897 Linktrails should not work for external links: [http://example.com link]s
4899 <p>Linktrails should not work for external links: <a rel="nofollow" class="external text" href="http://example.com">link</a>s
4904 External links: dollar sign in URL
4906 http://example.com/1$2345
4908 <p><a rel="nofollow" class="external free" href="http://example.com/1$2345">http://example.com/1$2345</a>
4912 # parsoid doesn't explicitly mark autonumbered links, see T55505
4914 External links: dollar sign in URL (autonumber)
4916 [http://example.com/1$2345]
4918 <p><a rel="nofollow" class="external autonumber" href="http://example.com/1$2345">[1]</a>
4921 <p><a rel="mw:ExtLink" class="external autonumber" href="http://example.com/1$2345"></a></p>
4925 External links: open square bracket forbidden in URL (T6377)
4927 parsoid=wt2html,wt2wt,html2html
4929 http://example.com/1[2345
4931 <p><a rel="nofollow" class="external free" href="http://example.com/1">http://example.com/1</a>[2345
4934 <p><a rel="mw:ExtLink" class="external free" href="http://example.com/1">http://example.com/1</a>[2345</p>
4938 External links: open square bracket forbidden in URL (named) (T6377)
4940 parsoid=wt2html,html2html
4942 [http://example.com/1[2345]
4944 <p><a rel="nofollow" class="external text" href="http://example.com/1">[2345</a>
4947 <p><a rel="mw:ExtLink" class="external text" href="http://example.com/1">[2345</a></p>
4950 # parsoid adds a space before the link name
4952 External links: open square bracket forbidden in URL (named) (T6377)
4955 [http://example.com/1 [2345]
4957 <p><a rel="nofollow" class="external text" href="http://example.com/1">[2345</a>
4962 External links: nowiki in URL link text (T8230)
4964 [http://example.com/ <nowiki>''example site''</nowiki>]
4966 <p><a rel="nofollow" class="external text" href="http://example.com/">''example site''</a>
4971 External links: newline forbidden in text (T8230 regression check)
4973 [http://example.com/ first
4976 <p>[<a rel="nofollow" class="external free" href="http://example.com/">http://example.com/</a> first
4982 External links: Pipe char between url and text
4984 [http://example.com | link]
4986 <p><a rel="nofollow" class="external text" href="http://example.com">| link</a>
4991 External links: protocol-relative URL in brackets
4993 [//example.com/ Test]
4995 <p><a rel="nofollow" class="external text" href="//example.com/">Test</a>
4999 # parsoid doesn't explicitly mark autonumbered links, see T55505
5001 External links: protocol-relative URL in brackets without text
5005 <p><a rel="nofollow" class="external autonumber" href="//example.com">[1]</a>
5008 <p><a rel="mw:ExtLink" class="external autonumber" href="//example.com"></a></p>
5012 External links: protocol-relative URL in free text is left alone
5016 <p>//example.com/Foo
5021 External links: protocol-relative URL in the middle of a word is left alone (T32269)
5023 foo//example.com/Foo
5025 <p>foo//example.com/Foo
5029 ## html2wt and html2html will fail because we will prefer the :en: interwiki prefix over wikipedia:
5031 External links: with no contents
5033 parsoid=wt2html,wt2wt
5035 [http://en.wikipedia.org/wiki/Foo]
5037 [[wikipedia:Foo|Bar]]
5039 [[wikipedia:Foo|<span>Bar</span>]]
5041 <p><a rel="nofollow" class="external autonumber" href="http://en.wikipedia.org/wiki/Foo">[1]</a>
5042 </p><p><a href="http://en.wikipedia.org/wiki/Foo" class="extiw" title="wikipedia:Foo">Bar</a>
5043 </p><p><a href="http://en.wikipedia.org/wiki/Foo" class="extiw" title="wikipedia:Foo"><span>Bar</span></a>
5046 <p><a rel="mw:ExtLink" class="external autonumber" href="http://en.wikipedia.org/wiki/Foo"></a></p>
5047 <p><a rel="mw:WikiLink/Interwiki" href="http://en.wikipedia.org/wiki/Foo" title="wikipedia:Foo">Bar</a></p>
5048 <p><a rel="mw:WikiLink/Interwiki" href="http://en.wikipedia.org/wiki/Foo" title="wikipedia:Foo"><span>Bar</span></a></p>
5052 External links: Free with trailing punctuation
5062 http://example.com/url_with_(brackets)
5063 (http://example.com/url_without_brackets)
5064 http://example.com/url_with_entity&
5065 http://example.com/url_with_entity&
5066 http://example.com/url_with_entity&
5067 http://example.com/url_with_entity
5068 http://example.com/url_with_entity 
5069 http://example.com/url_with_entity 
5070 http://example.com/url_with_entity<
5071 http://example.com/url_with_entity<
5072 http://example.com/url_with_entity<
5074 <p><a rel="nofollow" class="external free" href="http://example.com">http://example.com</a>,
5075 <a rel="nofollow" class="external free" href="http://example.com">http://example.com</a>;
5076 <a rel="nofollow" class="external free" href="http://example.com">http://example.com</a>\
5077 <a rel="nofollow" class="external free" href="http://example.com">http://example.com</a>.
5078 <a rel="nofollow" class="external free" href="http://example.com">http://example.com</a>:
5079 <a rel="nofollow" class="external free" href="http://example.com">http://example.com</a>!
5080 <a rel="nofollow" class="external free" href="http://example.com">http://example.com</a>?
5081 <a rel="nofollow" class="external free" href="http://example.com">http://example.com</a>)
5082 <a rel="nofollow" class="external free" href="http://example.com/url_with_(brackets)">http://example.com/url_with_(brackets)</a>
5083 (<a rel="nofollow" class="external free" href="http://example.com/url_without_brackets">http://example.com/url_without_brackets</a>)
5084 <a rel="nofollow" class="external free" href="http://example.com/url_with_entity&">http://example.com/url_with_entity&</a>
5085 <a rel="nofollow" class="external free" href="http://example.com/url_with_entity&">http://example.com/url_with_entity&</a>
5086 <a rel="nofollow" class="external free" href="http://example.com/url_with_entity&">http://example.com/url_with_entity&</a>
5087 <a rel="nofollow" class="external free" href="http://example.com/url_with_entity">http://example.com/url_with_entity</a> 
5088 <a rel="nofollow" class="external free" href="http://example.com/url_with_entity">http://example.com/url_with_entity</a> 
5089 <a rel="nofollow" class="external free" href="http://example.com/url_with_entity">http://example.com/url_with_entity</a> 
5090 <a rel="nofollow" class="external free" href="http://example.com/url_with_entity">http://example.com/url_with_entity</a><
5091 <a rel="nofollow" class="external free" href="http://example.com/url_with_entity">http://example.com/url_with_entity</a><
5092 <a rel="nofollow" class="external free" href="http://example.com/url_with_entity">http://example.com/url_with_entity</a><
5095 <p><a rel="mw:ExtLink" class="external free" href="http://example.com">http://example.com</a>,
5096 <a rel="mw:ExtLink" class="external free" href="http://example.com">http://example.com</a>;
5097 <a rel="mw:ExtLink" class="external free" href="http://example.com">http://example.com</a>\
5098 <a rel="mw:ExtLink" class="external free" href="http://example.com">http://example.com</a>.
5099 <a rel="mw:ExtLink" class="external free" href="http://example.com">http://example.com</a>:
5100 <a rel="mw:ExtLink" class="external free" href="http://example.com">http://example.com</a>!
5101 <a rel="mw:ExtLink" class="external free" href="http://example.com">http://example.com</a>?
5102 <a rel="mw:ExtLink" class="external free" href="http://example.com">http://example.com</a>)
5103 <a rel="mw:ExtLink" class="external free" href="http://example.com/url_with_(brackets)">http://example.com/url_with_(brackets)</a>
5104 (<a rel="mw:ExtLink" class="external free" href="http://example.com/url_without_brackets">http://example.com/url_without_brackets</a>)
5105 <a rel="mw:ExtLink" class="external free" href="http://example.com/url_with_entity&">http://example.com/url_with_entity&</a>
5106 <a rel="mw:ExtLink" class="external free" href="http://example.com/url_with_entity&">http://example.com/url_with_entity&</a>
5107 <a rel="mw:ExtLink" class="external free" href="http://example.com/url_with_entity&">http://example.com/url_with_entity&</a>
5108 <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>
5109 <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>
5110 <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>
5111 <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>
5112 <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>
5113 <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>
5117 External links: tricky Parsoid html2html case
5119 parsoid=wt2html,wt2wt,html2html
5121 http://example.com/url_with_entity&amp;
5123 <p><a rel="nofollow" class="external free" href="http://example.com/url_with_entity&amp">http://example.com/url_with_entity&amp</a>;
5126 <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>
5130 External links: Free with trailing quotes (T113666)
5132 '''News:''' Stuff here
5136 <p><b>News:</b> Stuff here
5137 </p><p><a rel="nofollow" class="external free" href="news:'a'b">news:'a'b</a><i>c</i>d e
5140 <p><b>News:</b> Stuff here</p>
5141 <p><a rel="mw:ExtLink" class="external free" href="news:'a'b">news:'a'b</a><i>c</i>d e</p>
5145 External links: with entity
5147 [http:// www.librarieswithoutborders.org Libraries without borders]
5149 <p><a rel="nofollow" class="external text" href="http://+www.librarieswithoutborders.org">Libraries without borders</a>
5152 <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>
5156 External links: Lone protocols are never linked (T105697)
5175 External links: No preceding word characters allowed (T67278)
5177 NOPEhttp://example.com
5178 N0http://example.com
5179 ok:http://example.com
5180 ok-http://example.com
5182 <p>NOPEhttp://example.com
5183 N0http://example.com
5184 ok:<a rel="nofollow" class="external free" href="http://example.com">http://example.com</a>
5185 ok-<a rel="nofollow" class="external free" href="http://example.com">http://example.com</a>
5190 External links: nofollow domain exception
5192 A [https://no-nofollow.org/foobar link], and another [https://example.org link].
5194 <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>.
5201 External image: http://meta.wikimedia.org/upload/f/f1/Ncwikicol.png
5203 <p>External image: <img src="http://meta.wikimedia.org/upload/f/f1/Ncwikicol.png" alt="Ncwikicol.png"/>
5208 External image from https
5210 External image from https: https://meta.wikimedia.org/upload/f/f1/Ncwikicol.png
5212 <p>External image from https: <img src="https://meta.wikimedia.org/upload/f/f1/Ncwikicol.png" alt="Ncwikicol.png"/>
5217 External image (when not allowed)
5219 wgAllowExternalImages=0
5221 External image: http://meta.wikimedia.org/upload/f/f1/Ncwikicol.png
5223 <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>
5228 Link to non-http image, no img tag
5230 Link to non-http image, no img tag: ftp://example.com/test.jpg
5232 <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>
5237 External links: terminating separator
5239 Terminating separator: http://example.com/thing,
5241 <p>Terminating separator: <a rel="nofollow" class="external free" href="http://example.com/thing">http://example.com/thing</a>,
5246 External links: intervening separator
5248 Intervening separator: http://example.com/1,2,3
5250 <p>Intervening separator: <a rel="nofollow" class="external free" href="http://example.com/1,2,3">http://example.com/1,2,3</a>
5255 External links: old bug with URL in query
5257 Old bug with URL in query: [http://example.com/thing?url=http://example.com link]
5259 <p>Old bug with URL in query: <a rel="nofollow" class="external text" href="http://example.com/thing?url=http://example.com">link</a>
5264 External links: old URL-in-URL bug, mixed protocols
5266 And again with mixed protocols: [ftp://example.com?url=http://example.com link]
5268 <p>And again with mixed protocols: <a rel="nofollow" class="external text" href="ftp://example.com?url=http://example.com">link</a>
5272 # Since Parsoid is starting to emit canonical wikitext for links,
5273 # [http://example.com http://example.com] will not RT back to that
5276 External links: URL in text
5280 URL in text: [http://example.com http://example.com]
5282 <p>URL in text: <a rel="nofollow" class="external text" href="http://example.com">http://example.com</a>
5285 <p>URL in text: <a rel="mw:ExtLink" class="external text" href="http://example.com">http://example.com</a></p>
5289 External links: Clickable images
5291 ja-style clickable images: [http://example.com http://meta.wikimedia.org/upload/f/f1/Ncwikicol.png]
5293 <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>
5296 <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>
5300 External links: raw ampersand
5302 Old & use: http://x&y
5304 <p>Old & use: <a rel="nofollow" class="external free" href="http://x&y">http://x&y</a>
5309 External links: encoded ampersand
5311 Old & use: http://x&y
5313 <p>Old & use: <a rel="nofollow" class="external free" href="http://x&y">http://x&y</a>
5316 <p>Old <span typeof="mw:Entity">&</span> use: <a rel="mw:ExtLink" class="external free" href="http://x&y">http://x&y</a></p>
5320 External links: encoded equals (T8102)
5322 http://example.com/?foo=bar
5324 <p><a rel="nofollow" class="external free" href="http://example.com/?foo=bar">http://example.com/?foo=bar</a>
5327 <p><a rel="mw:ExtLink" class="external free" href="http://example.com/?foo=bar">http://example.com/?foo=bar</a></p>
5331 ## Note that parsoid doesn't explicit mark autonumbered links, nor
5332 ## does it number them. As discussed in T55505, we can identify
5333 ## autonumbered links via CSS.
5337 External links: [raw ampersand]
5339 Old & use: [http://x&y]
5341 <p>Old & use: <a rel="nofollow" class="external autonumber" href="http://x&y">[1]</a>
5344 <p>Old <span typeof="mw:Entity">&</span> use: <a rel="mw:ExtLink" class="external autonumber" href="http://x&y"></a></p>
5347 # note that parsoid html is identical to [raw ampersand] case; so html2wt
5348 # mode will return the [raw ampersand] wikitext
5350 External links: [encoded ampersand]
5352 parsoid=wt2html,wt2wt,html2html
5354 Old & use: [http://x&y]
5356 <p>Old & use: <a rel="nofollow" class="external autonumber" href="http://x&y">[1]</a>
5359 <p>Old <span typeof="mw:Entity">&</span> use: <a rel="mw:ExtLink" class="external autonumber" href="http://x&y"></a></p>
5363 External links: [raw equals]
5365 [http://example.com/?foo=bar]
5367 <p><a rel="nofollow" class="external autonumber" href="http://example.com/?foo=bar">[1]</a>
5370 <p><a rel="mw:ExtLink" class="external autonumber" href="http://example.com/?foo=bar"></a></p>
5373 # note that parsoid html is identical to [raw equals] case; so html2wt
5374 # mode will return the [raw equals] wikitext
5376 External links: [encoded equals] (T8102)
5378 parsoid=wt2html,wt2wt,html2html
5380 [http://example.com/?foo=bar]
5382 <p><a rel="nofollow" class="external autonumber" href="http://example.com/?foo=bar">[1]</a>
5385 <p><a rel="mw:ExtLink" class="external autonumber" href="http://example.com/?foo=bar"></a></p>
5388 # xxx parsoid strips the IDN character, so the round-trip tests will
5389 # obviously fail and are disabled. --cscott
5391 External links: [IDN ignored character reference in hostname; strip it right off]
5393 parsoid=wt2html,wt2wt,html2html
5395 [http://e‌xample.com/]
5397 <p><a rel="nofollow" class="external autonumber" href="http://example.com/">[1]</a>
5400 <p><a rel="mw:ExtLink" class="external autonumber" href="http://example.com/"></a></p>
5403 # FIXME: This test (the IDN characters in the text of a link) is an inconsistency.
5404 # Where an external link could easily circumvent the sanitization of the text of
5405 # a link like this (where an IDN-ignore character is in the URL somewhere), this
5406 # test demands a higher standard. That's a bit strange.
5410 # http://example.com -> [http://example.com|http://example.com]
5411 # [http://example.com|http://example.com] -> [http://example.com|http://example.com]
5413 # The first example is sanitized, but the second is not. Any security benefits
5414 # from this production are trivial to circumvent. Either remove this test and
5415 # let the parser(s) do their thing unaccosted, or fix the inconsistency and change
5416 # the test accordingly.
5420 # xxx parsoid strips the IDN character, so the round-trip tests will
5421 # obviously fail and are disabled. --cscott
5423 External links: IDN ignored character reference in hostname; strip it right off
5425 parsoid=wt2html,html2html
5427 http://e‌xample.com/
5429 <p><a rel="nofollow" class="external free" href="http://example.com/">http://example.com/</a>
5432 <p><a rel="mw:ExtLink" class="external free" href="http://example.com/">http://example.com/</a></p>
5436 External links: www.jpeg.org (T2554)
5440 <p><a rel="nofollow" class="external free" href="http://www.jpeg.org">http://www.jpeg.org</a>
5444 # parsoid doesn't explicitly mark autonumbered links, see T55505
5446 External links: URL within URL (T2002)
5448 [http://www.unausa.org/newindex.asp?place=http://www.unausa.org/programs/mun.asp]
5450 <p><a rel="nofollow" class="external autonumber" href="http://www.unausa.org/newindex.asp?place=http://www.unausa.org/programs/mun.asp">[1]</a>
5453 <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>
5457 T2361: URL inside bracketed URL
5459 [http://www.example.com/foo http://www.example.com/bar]
5461 <p><a rel="nofollow" class="external text" href="http://www.example.com/foo">http://www.example.com/bar</a>
5466 T2361: URL within URL, not bracketed
5468 http://www.example.com/foo?=http://www.example.com/bar
5470 <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>
5475 T2289: ">"-token in URL-tail
5477 http://www.example.com/<hello>
5479 <p><a rel="nofollow" class="external free" href="http://www.example.com/">http://www.example.com/</a><hello>
5484 T2289: literal ">"-token in URL-tail
5486 http://www.example.com/<b>html</b>
5488 <p><a rel="nofollow" class="external free" href="http://www.example.com/">http://www.example.com/</a><b>html</b>
5491 <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>
5495 T2289: ">"-token in bracketed URL
5497 [http://www.example.com/<hello> stuff]
5499 <p><a rel="nofollow" class="external text" href="http://www.example.com/"><hello> stuff</a>
5504 T2289: literal ">"-token in bracketed URL
5506 [http://www.example.com/<b>html</b> stuff]
5508 <p><a rel="nofollow" class="external text" href="http://www.example.com/"><b>html</b> stuff</a>
5513 T2289: literal double quote at end of URL
5515 http://www.example.com/"hello"
5517 <p><a rel="nofollow" class="external free" href="http://www.example.com/">http://www.example.com/</a>"hello"
5522 T2289: literal double quote in bracketed URL
5524 [http://www.example.com/"hello" stuff]
5526 <p><a rel="nofollow" class="external text" href="http://www.example.com/">"hello" stuff</a>
5531 External links: multiple legal whitespace is fine, Magnus. Don't break it please. (T7081)
5533 [http://www.example.com test]
5535 <p><a rel="nofollow" class="external text" href="http://www.example.com">test</a>
5540 External links: link text with spaces
5542 [http://www.example.com a b c]
5543 [http://www.example.com ''a'' ''b'']
5545 <p><a rel="nofollow" class="external text" href="http://www.example.com">a b c</a>
5546 <a rel="nofollow" class="external text" href="http://www.example.com"><i>a</i> <i>b</i></a>
5550 # Note edge case difference between PHP and Parsoid here.
5552 External links: wiki links within external link (T5695)
5554 parsoid=wt2html,html2html
5556 [http://example.com [[wikilink]] embedded in ext link]
5558 [http://example.com test [[wikilink]] embedded in ext link]
5560 <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>
5561 </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>
5564 <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>
5565 <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>
5569 T2787: Links with one slash after the url protocol are invalid
5573 [http:/example.com title]
5575 <p>http:/example.com
5576 </p><p>[http:/example.com title]
5581 Bracketed external links with template-generated invalid target
5583 [{{echo|http:/example.com}} title]
5585 <p>[http:/example.com title]
5589 # wt2html only because Parsoid would want to add <nowiki>s coming from html
5591 Broken wikilinks (but not external links) prevent templates from closing
5595 [http://example.com x
5597 {{echo|[http://example.com x}}
5603 <p>[<a rel="nofollow" class="external free" href="http://example.com">http://example.com</a> x
5604 </p><p>[<a rel="nofollow" class="external free" href="http://example.com">http://example.com</a> x
5606 </p><p>{{echo|[[Foo}}
5609 <p>[<a rel="mw:ExtLink" class="external free" href="http://example.com">http://example.com</a> x</p>
5610 <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>
5612 <p>{{echo|[[Foo}}</p>
5616 Wikilinks with embedded newlines are not broken
5627 <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>
5639 <p>{{echo|<a href="/wiki/Foo" title="Foo">}}</a>
5643 <p>{{echo|<a rel="mw:WikiLink" href="./Foo" title="Foo">}}</a></p>
5644 <p>[[Foo|<span typeof="mw:Transclusion" data-mw='{"parts":[{"template":{"target":{"wt":"echo","href":"./Template:Echo"},"params":{"1":{"wt":"]]"}},"i":0}}]}'>]]</span></p>
5648 T4702: Mismatched <i>, <b> and <a> tags are invalid
5650 ''[http://example.com text'']
5651 [http://example.com '''text]'''
5652 ''Something [http://example.com in italic'']
5653 ''Something [http://example.com mixed''''', even bold]'''
5654 '''''Now [http://example.com both''''']
5656 <p><a rel="nofollow" class="external text" href="http://example.com"><i>text</i></a>
5657 <a rel="nofollow" class="external text" href="http://example.com"><b>text</b></a>
5658 <i>Something </i><a rel="nofollow" class="external text" href="http://example.com"><i>in italic</i></a>
5659 <i>Something </i><a rel="nofollow" class="external text" href="http://example.com"><i>mixed</i><b>, even bold</b></a>
5660 <i><b>Now </b></i><a rel="nofollow" class="external text" href="http://example.com"><i><b>both</b></i></a>
5668 http://www.example.com/?title=AT%26T
5670 <p><a rel="nofollow" class="external free" href="http://www.example.com/?title=AT%26T">http://www.example.com/?title=AT%26T</a>
5673 <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>
5676 # According to https://www.w3.org/TR/2011/WD-html5-20110525/Overview.html#parsing-urls a plain
5677 # % is actually legal in HTML5. Any change in output would need testing though.
5679 T6781, T7267: %25 in URL
5681 http://www.example.com/?title=100%25_Bran
5683 <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>
5686 <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>
5690 T6781, T7267: %28, %29 in URL
5692 http://www.example.com/?title=Ben-Hur_%281959_film%29
5694 <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>
5697 <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>
5702 T6781: %26 in autonumber URL
5704 [http://www.example.com/?title=AT%26T]
5706 <p><a rel="nofollow" class="external autonumber" href="http://www.example.com/?title=AT%26T">[1]</a>
5709 <p><a rel="mw:ExtLink" class="external autonumber" href="http://www.example.com/?title=AT%26T"></a></p>
5713 T6781, T7267: %26 in autonumber URL
5715 [http://www.example.com/?title=100%25_Bran]
5717 <p><a rel="nofollow" class="external autonumber" href="http://www.example.com/?title=100%25_Bran">[1]</a>
5720 <p><a rel="mw:ExtLink" class="external autonumber" href="http://www.example.com/?title=100%25_Bran"></a></p>
5724 T6781, T7267: %28, %29 in autonumber URL
5726 [http://www.example.com/?title=Ben-Hur_%281959_film%29]
5728 <p><a rel="nofollow" class="external autonumber" href="http://www.example.com/?title=Ben-Hur_%281959_film%29">[1]</a>
5731 <p><a rel="mw:ExtLink" class="external autonumber" href="http://www.example.com/?title=Ben-Hur_%281959_film%29"></a></p>
5736 T6781: %26 in bracketed URL
5738 [http://www.example.com/?title=AT%26T link]
5740 <p><a rel="nofollow" class="external text" href="http://www.example.com/?title=AT%26T">link</a>
5743 <p><a rel="mw:ExtLink" class="external text" href="http://www.example.com/?title=AT%26T">link</a></p>
5747 T6781, T7267: %25 in bracketed URL
5749 [http://www.example.com/?title=100%25_Bran link]
5751 <p><a rel="nofollow" class="external text" href="http://www.example.com/?title=100%25_Bran">link</a>
5756 T6781, T7267: %28, %29 in bracketed URL
5758 [http://www.example.com/?title=Ben-Hur_%281959_film%29 link]
5760 <p><a rel="nofollow" class="external text" href="http://www.example.com/?title=Ben-Hur_%281959_film%29">link</a>
5763 <p><a rel="mw:ExtLink" class="external text" href="http://www.example.com/?title=Ben-Hur_%281959_film%29">link</a></p>
5767 External link containing a period in the anchor. (T65947)
5769 [//foo.org/bar#baz. bang]
5771 [//foo.org/bar. bang]
5773 <p><a rel="nofollow" class="external text" href="//foo.org/bar#baz.">bang</a>
5774 </p><p><a rel="nofollow" class="external text" href="//foo.org/bar.">bang</a>
5777 <p><a rel="mw:ExtLink" class="external text" href="//foo.org/bar#baz.">bang</a></p>
5778 <p><a rel="mw:ExtLink" class="external text" href="//foo.org/bar.">bang</a></p>
5782 External link containing a single quote. (T65947)
5786 [//foo.org/bar'baz bang]
5788 <p><a rel="nofollow" class="external autonumber" href="//foo.org/bar'baz">[1]</a>
5789 </p><p><a rel="nofollow" class="external text" href="//foo.org/bar'baz">bang</a>
5792 <p><a rel="mw:ExtLink" class="external autonumber" href="//foo.org/bar'baz"></a></p>
5793 <p><a rel="mw:ExtLink" class="external text" href="//foo.org/bar'baz">bang</a></p>
5797 External link containing double-single-quotes in text '' (T6598 sanity check)
5799 Some [http://example.com/ pretty ''italics'' and stuff]!
5801 <p>Some <a rel="nofollow" class="external text" href="http://example.com/">pretty <i>italics</i> and stuff</a>!
5806 External link containing double-single-quotes in text embedded in italics (T6598 sanity check)
5808 ''Some [http://example.com/ pretty ''italics'' and stuff]!''
5810 <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>
5814 # Don't add the html/php section since the output is broken and there isn't any reason to spec it
5816 External link containing double-single-quotes with no space separating the url from text in italics
5818 [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]].]
5820 <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>.
5823 <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>
5827 External link with comments in link text
5829 [http://www.google.com Google <!-- comment -->]
5831 <p><a rel="nofollow" class="external text" href="http://www.google.com">Google </a>
5834 <p><a rel="mw:ExtLink" class="external text" href="http://www.google.com">Google <!-- comment --></a></p>
5838 External link to bare IPv4 address
5840 [http://192.168.0.1 Link]
5842 <p><a rel="nofollow" class="external text" href="http://192.168.0.1">Link</a>
5845 <p><a rel="mw:ExtLink" class="external text" href="http://192.168.0.1">Link</a></p>
5849 URL-encoding in URL functions (single parameter)
5851 {{localurl:Some page|amp=&}}
5853 <p>/index.php?title=Some_page&amp=&
5858 URL-encoding in URL functions (multiple parameters)
5860 {{localurl:Some page|q=?&=&}}
5862 <p>/index.php?title=Some_page&q=?&amp=&
5869 http://example.com/index.php?foozoid%5B%5D=bar
5871 http://example.com/index.php?foozoid[]=bar
5873 <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>
5874 </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>
5877 <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>
5879 <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>
5883 IPv6 urls, autolink format (T23261)
5885 http://[2404:130:0:1000::187:2]/index.php
5887 Examples from RFC 2373, section 2.2:
5889 *http://[1080::8:800:200C:417A]/unicast
5890 *http://[FF01::101]/multicast
5891 *http://[::1]/loopback
5892 *http://[::]/unspecified
5893 *http://[::13.1.68.3]/ipv4compat
5894 *http://[::FFFF:129.144.52.38]/ipv4compat
5896 Examples from RFC 2732, section 2:
5898 *http://[FEDC:BA98:7654:3210:FEDC:BA98:7654:3210]:80/index.html
5899 *http://[1080:0:0:0:8:800:200C:417A]/index.html
5900 *http://[3ffe:2a00:100:7031::1]
5901 *http://[1080::8:800:200C:417A]/foo
5902 *http://[::192.9.5.5]/ipng
5903 *http://[::FFFF:129.144.52.38]:80/index.html
5904 *http://[2010:836B:4179::836B:4179]
5906 <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>
5907 </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:
5909 <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>
5910 <li><a rel="nofollow" class="external free" href="http://[FF01::101]/multicast">http://[FF01::101]/multicast</a></li>
5911 <li><a rel="nofollow" class="external free" href="http://[::1]/loopback">http://[::1]/loopback</a></li>
5912 <li><a rel="nofollow" class="external free" href="http://[::]/unspecified">http://[::]/unspecified</a></li>
5913 <li><a rel="nofollow" class="external free" href="http://[::13.1.68.3]/ipv4compat">http://[::13.1.68.3]/ipv4compat</a></li>
5914 <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>
5915 <p>Examples from <a class="external mw-magiclink-rfc" rel="nofollow" href="https://tools.ietf.org/html/rfc2732">RFC 2732</a>, section 2:
5917 <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>
5918 <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>
5919 <li><a rel="nofollow" class="external free" href="http://[3ffe:2a00:100:7031::1]">http://[3ffe:2a00:100:7031::1]</a></li>
5920 <li><a rel="nofollow" class="external free" href="http://[1080::8:800:200C:417A]/foo">http://[1080::8:800:200C:417A]/foo</a></li>
5921 <li><a rel="nofollow" class="external free" href="http://[::192.9.5.5]/ipng">http://[::192.9.5.5]/ipng</a></li>
5922 <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>
5923 <li><a rel="nofollow" class="external free" href="http://[2010:836B:4179::836B:4179]">http://[2010:836B:4179::836B:4179]</a></li></ul>
5926 <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>
5928 <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>
5929 <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>
5930 <li><a rel="mw:ExtLink" class="external free" href="http://[FF01::101]/multicast">http://[FF01::101]/multicast</a></li>
5931 <li><a rel="mw:ExtLink" class="external free" href="http://[::1]/loopback">http://[::1]/loopback</a></li>
5932 <li><a rel="mw:ExtLink" class="external free" href="http://[::]/unspecified">http://[::]/unspecified</a></li>
5933 <li><a rel="mw:ExtLink" class="external free" href="http://[::13.1.68.3]/ipv4compat">http://[::13.1.68.3]/ipv4compat</a></li>
5934 <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>
5936 <p>Examples from <a href="https://tools.ietf.org/html/rfc2732" rel="mw:ExtLink" class="external mw-magiclink">RFC 2732</a>, section 2:</p>
5937 <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>
5938 <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>
5939 <li><a rel="mw:ExtLink" class="external free" href="http://[3ffe:2a00:100:7031::1]">http://[3ffe:2a00:100:7031::1]</a></li>
5940 <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>
5941 <li><a rel="mw:ExtLink" class="external free" href="http://[::192.9.5.5]/ipng">http://[::192.9.5.5]/ipng</a></li>
5942 <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>
5943 <li><a rel="mw:ExtLink" class="external free" href="http://[2010:836B:4179::836B:4179]">http://[2010:836B:4179::836B:4179]</a></li></ul>
5947 IPv6 urls, bracketed format (T23261)
5949 [http://[2404:130:0:1000::187:2]/index.php test]
5951 Examples from RFC 2373, section 2.2:
5953 *[http://[1080::8:800:200C:417A] unicast]
5954 *[http://[FF01::101] multicast]
5955 *[http://[::1]/ loopback]
5956 *[http://[::] unspecified]
5957 *[http://[::13.1.68.3] ipv4compat]
5958 *[http://[::FFFF:129.144.52.38] ipv4compat]
5960 Examples from RFC 2732, section 2:
5962 *[http://[FEDC:BA98:7654:3210:FEDC:BA98:7654:3210]:80/index.html 1]
5963 *[http://[1080:0:0:0:8:800:200C:417A]/index.html 2]
5964 *[http://[3ffe:2a00:100:7031::1] 3]
5965 *[http://[1080::8:800:200C:417A]/foo 4]
5966 *[http://[::192.9.5.5]/ipng 5]
5967 *[http://[::FFFF:129.144.52.38]:80/index.html 6]
5968 *[http://[2010:836B:4179::836B:4179] 7]
5970 <p><a rel="nofollow" class="external text" href="http://[2404:130:0:1000::187:2]/index.php">test</a>
5971 </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:
5973 <ul><li><a rel="nofollow" class="external text" href="http://[1080::8:800:200C:417A]">unicast</a></li>
5974 <li><a rel="nofollow" class="external text" href="http://[FF01::101]">multicast</a></li>
5975 <li><a rel="nofollow" class="external text" href="http://[::1]/">loopback</a></li>
5976 <li><a rel="nofollow" class="external text" href="http://[::]">unspecified</a></li>
5977 <li><a rel="nofollow" class="external text" href="http://[::13.1.68.3]">ipv4compat</a></li>
5978 <li><a rel="nofollow" class="external text" href="http://[::FFFF:129.144.52.38]">ipv4compat</a></li></ul>
5979 <p>Examples from <a class="external mw-magiclink-rfc" rel="nofollow" href="https://tools.ietf.org/html/rfc2732">RFC 2732</a>, section 2:
5981 <ul><li><a rel="nofollow" class="external text" href="http://[FEDC:BA98:7654:3210:FEDC:BA98:7654:3210]:80/index.html">1</a></li>
5982 <li><a rel="nofollow" class="external text" href="http://[1080:0:0:0:8:800:200C:417A]/index.html">2</a></li>
5983 <li><a rel="nofollow" class="external text" href="http://[3ffe:2a00:100:7031::1]">3</a></li>
5984 <li><a rel="nofollow" class="external text" href="http://[1080::8:800:200C:417A]/foo">4</a></li>
5985 <li><a rel="nofollow" class="external text" href="http://[::192.9.5.5]/ipng">5</a></li>
5986 <li><a rel="nofollow" class="external text" href="http://[::FFFF:129.144.52.38]:80/index.html">6</a></li>
5987 <li><a rel="nofollow" class="external text" href="http://[2010:836B:4179::836B:4179]">7</a></li></ul>
5990 <p><a rel="mw:ExtLink" class="external text" href="http://[2404:130:0:1000::187:2]/index.php">test</a></p>
5992 <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>
5993 <ul><li><a rel="mw:ExtLink" class="external text" href="http://[1080::8:800:200C:417A]">unicast</a></li>
5994 <li><a rel="mw:ExtLink" class="external text" href="http://[FF01::101]">multicast</a></li>
5995 <li><a rel="mw:ExtLink" class="external text" href="http://[::1]/">loopback</a></li>
5996 <li><a rel="mw:ExtLink" class="external text" href="http://[::]">unspecified</a></li>
5997 <li><a rel="mw:ExtLink" class="external text" href="http://[::13.1.68.3]">ipv4compat</a></li>
5998 <li><a rel="mw:ExtLink" class="external text" href="http://[::FFFF:129.144.52.38]">ipv4compat</a></li></ul>
6000 <p>Examples from <a href="https://tools.ietf.org/html/rfc2732" rel="mw:ExtLink" class="external mw-magiclink">RFC 2732</a>, section 2:</p>
6001 <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>
6002 <li><a rel="mw:ExtLink" class="external text" href="http://[1080:0:0:0:8:800:200C:417A]/index.html">2</a></li>
6003 <li><a rel="mw:ExtLink" class="external text" href="http://[3ffe:2a00:100:7031::1]">3</a></li>
6004 <li><a rel="mw:ExtLink" class="external text" href="http://[1080::8:800:200C:417A]/foo">4</a></li>
6005 <li><a rel="mw:ExtLink" class="external text" href="http://[::192.9.5.5]/ipng">5</a></li>
6006 <li><a rel="mw:ExtLink" class="external text" href="http://[::FFFF:129.144.52.38]:80/index.html">6</a></li>
6007 <li><a rel="mw:ExtLink" class="external text" href="http://[2010:836B:4179::836B:4179]">7</a></li></ul>
6011 Non-extlinks in brackets
6020 [{{echo|foo}} ''bar'']
6021 [{{echo|foo}}l's] errand
6022 [{{echo|foo}}l's errand]
6024 [url=http://example.com]
6025 [http:// bare protocols don't count]
6038 [url=<a rel="nofollow" class="external free" href="http://example.com">http://example.com</a>]
6039 [http:// bare protocols don't count]
6047 [<span about="#mwt19" typeof="mw:Transclusion" data-mw='{"parts":[{"template":{"target":{"wt":"echo","href":"./Template:Echo"},"params":{"1":{"wt":"foo"}},"i":0}}]}'>foo</span>]
6048 [<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]
6049 [<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>]
6050 [<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
6051 [<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]
6052 [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>]
6053 [url=<a rel="mw:ExtLink" class="external free" href="http://example.com">http://example.com</a>]
6054 [http:// bare protocols don't count]</p>
6058 Percent encoding in external links
6060 [https://github.com/search?l=&q=ResourceLoader+%40wikimedia Search]
6062 <p><a rel="nofollow" class="external text" href="https://github.com/search?l=&q=ResourceLoader+%40wikimedia">Search</a>
6065 <p><a rel="mw:ExtLink" class="external text" href="https://github.com/search?l=&q=ResourceLoader+%40wikimedia">Search</a></p>
6069 Use url link syntax for links where the content is equal the link target
6073 <p><a rel="nofollow" class="external free" href="http://example.com">http://example.com</a>
6076 <p><a rel="mw:ExtLink" class="external free" href="http://example.com">http://example.com</a></p>
6080 Parenthesis in external links, especially URL links
6084 http://example.com/test)
6086 http://example.com/(test)
6088 http://example.com/((test)
6090 (http://example.com/(test))
6092 (http://example.com/(test)))))
6094 http://example.com/a)b
6096 [http://example.com) foo]
6098 <p><a rel="nofollow" class="external free" href="http://example.com">http://example.com</a>)
6099 </p><p><a rel="nofollow" class="external free" href="http://example.com/test">http://example.com/test</a>)
6100 </p><p><a rel="nofollow" class="external free" href="http://example.com/(test)">http://example.com/(test)</a>
6101 </p><p><a rel="nofollow" class="external free" href="http://example.com/((test)">http://example.com/((test)</a>
6102 </p><p>(<a rel="nofollow" class="external free" href="http://example.com/(test))">http://example.com/(test))</a>
6103 </p><p>(<a rel="nofollow" class="external free" href="http://example.com/(test)))))">http://example.com/(test)))))</a>
6104 </p><p><a rel="nofollow" class="external free" href="http://example.com/a)b">http://example.com/a)b</a>
6105 </p><p><a rel="nofollow" class="external text" href="http://example.com)">foo</a>
6108 <p><a rel="mw:ExtLink" class="external free" href="http://example.com">http://example.com</a>)</p>
6109 <p><a rel="mw:ExtLink" class="external free" href="http://example.com/test">http://example.com/test</a>)</p>
6110 <p><a rel="mw:ExtLink" class="external free" href="http://example.com/(test)">http://example.com/(test)</a></p>
6111 <p><a rel="mw:ExtLink" class="external free" href="http://example.com/((test)">http://example.com/((test)</a></p>
6112 <p>(<a rel="mw:ExtLink" class="external free" href="http://example.com/(test))">http://example.com/(test))</a></p>
6113 <p>(<a rel="mw:ExtLink" class="external free" href="http://example.com/(test)))))">http://example.com/(test)))))</a></p>
6114 <p><a rel="mw:ExtLink" class="external free" href="http://example.com/a)b">http://example.com/a)b</a></p>
6115 <p><a rel="mw:ExtLink" class="external text" href="http://example.com)">foo</a></p>
6119 Parenthesis in external links, w/ transclusion or comment
6121 (http://example.com/{{echo|hi}})
6123 (http://example.com<!-- hi -->)
6125 <p>(<a rel="nofollow" class="external free" href="http://example.com/hi">http://example.com/hi</a>)
6126 </p><p>(<a rel="nofollow" class="external free" href="http://example.com">http://example.com</a>)
6129 <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>
6131 <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>
6135 Serialize <a> tags with invalid link targets as plain text
6137 parsoid={ "modes": ["html2wt"], "suppressErrors": true }
6139 <a rel="mw:WikiLink" href="[[foo]]">text</a>
6140 <a rel="mw:WikiLink" href="[[foo]]">*text</a>
6141 <a rel="mw:WikiLink" href="[[foo]]">[[foo]]</a>
6142 <a rel="mw:WikiLink" href="[[foo]]">*a [[foo]]</a>
6145 <nowiki>*</nowiki>text
6146 <nowiki>[[foo]]</nowiki>
6147 <nowiki>*</nowiki>a <nowiki>[[foo]]</nowiki>
6151 mw:ExtLink -vs- mw:WikiLink (T94723)
6155 <a rel="mw:WikiLink" href="./Foo" title="Foo" data-parsoid='{"stx":"piped","a":{"href":"./Foo"},"sa":{"href":"Foo"}}'>Bar</a>
6156 <a rel="mw:WikiLink" href="./Foo" title="Foo">Bar</a>
6157 <a rel="mw:WikiLink" href="http://en.wikipedia.org/wiki/Foo" title="Foo">Bar</a>
6158 <a rel="mw:ExtLink" href="http://en.wikipedia.org/wiki/Foo" title="Foo">Bar</a>
6160 <a rel="mw:ExtLink" href="http://en.wikipedia.org/wiki/European_Robin">European Robin</a>
6161 <a rel="mw:WikiLink" href="http://en.wikipedia.org/wiki/European_Robin">European Robin</a>
6169 [[:en:European_Robin|European Robin]]
6170 [[:en:European_Robin|European Robin]]
6174 mw:ExtLink linking to a interwiki URL can be round-tripped losslessly (T94723)
6178 [http://en.wikipedia.org/wiki/European_Robin European Robin]
6180 THIS SECTION IS NOT USED (but Parsoid won't run the test without it)
6191 Normal text. '''Bold text.''' Normal text. ''Italic text.''
6193 Normal text. '''''Bold italic text.''''' Normal text.
6195 <p>Normal text. <b>Bold text.</b> Normal text. <i>Italic text.</i>
6196 </p><p>Normal text. <i><b>Bold italic text.</b></i> Normal text.
6201 Quotes wrapping HTML table
6203 '''<table><tr><td>hi</td></tr></table>'''
6205 <b><table><tbody><tr><td>hi</td></tr></tbody></table></b>
6207 <b><table data-parsoid='{"stx":"html"}'><tbody><tr data-parsoid='{"stx":"html"}'><td data-parsoid='{"stx":"html"}'>hi</td></tr></tbody></table></b>
6210 # Parsoid inserts an empty bold tag pair at the end of the line, that the PHP
6211 # parser strips. The wikitext contains just the first half of the bold
6214 Unclosed and unmatched quotes
6216 '''''Bold italic text '''with bold deactivated''' in between.'''''
6218 '''''Bold italic text ''with italic deactivated'' in between.'''''
6222 ..spanning two paragraphs (should not work).'''
6224 '''Bold tag left open
6226 ''Italic tag left open
6230 <!-- Unmatching number of opening, closing tags: -->
6231 '''This year''''s election ''should'' beat '''last year''''s.
6233 ''Tom'''s car is bigger than ''Susan'''s.
6235 Plain ''italic'''s plain
6237 <p><i><b>Bold italic text </b>with bold deactivated<b> in between.</b></i>
6238 </p><p><b><i>Bold italic text </i>with italic deactivated<i> in between.</i></b>
6239 </p><p><b>Bold text..</b>
6240 </p><p>..spanning two paragraphs (should not work).
6241 </p><p><b>Bold tag left open</b>
6242 </p><p><i>Italic tag left open</i>
6244 </p><p><b>This year'</b>s election <i>should</i> beat <b>last year'</b>s.
6245 </p><p><i>Tom<b>s car is bigger than </b></i><b>Susan</b>s.
6246 </p><p>Plain <i>italic'</i>s plain
6249 <p><i><b>Bold italic text </b>with bold deactivated<b> in between.</b></i>
6250 </p><p><b><i>Bold italic text </i>with italic deactivated<i> in between.</i></b>
6251 </p><p><b>Bold text..</b>
6252 </p><p>..spanning two paragraphs (should not work).<b></b>
6253 </p><p><b>Bold tag left open</b>
6254 </p><p><i>Italic tag left open</i>
6257 <!-- Unmatching number of opening, closing tags: -->
6258 <p><b>This year'</b>s election <i>should</i> beat <b>last year'</b>s.
6259 </p><p><i>Tom<b>s car is bigger than </b></i><b>Susan</b>s.
6260 </p><p>Plain <i>italic'</i>s plain
6267 ### some content taken from http://meta.wikimedia.org/wiki/MediaWiki_User%27s_Guide:_Using_tables
6270 # This should not produce <table></table> as <table><tr><td></td></tr></table>
6271 # is the bare minimum required by the spec, see:
6272 # https://www.w3.org/TR/xhtml-modularization/dtd_module_defs.html#a_module_Basic_Tables
6273 # Parsoid team replies: empty table tags are legal in HTML5
6275 A table with no data.
6288 A table with stray table end tags on start tag line (wt2html)
6292 {|style="color: red;"|}
6294 {|style="color: red;" |}
6298 {|style="color: red;"|} id="foo"
6302 {|style="color: red;" |} id="foo"
6306 <table style="color: red;">
6308 </table><table style="color: red;">
6311 </td></tr></tbody></table>
6312 <table style="color: red;" id="foo">
6315 </td></tr></tbody></table>
6316 <table style="color: red;" id="foo">
6319 </td></tr></tbody></table>
6321 <table style="color: red;"></table>
6323 <table style="color: red;">
6329 <table style="color: red;" id="foo">
6335 <table style="color: red;" id="foo">
6344 A table with no data (take 2)
6352 # A table with nothing but a caption is invalid XHTML, we might want to render
6353 # this as <p>caption</p>
6354 # Parsoid team replies: table with only a caption is legal in HTML5
6356 A table with nothing but a caption
6364 </caption><tr><td></td></tr></table>
6367 <table><caption>caption</caption></table>
6371 A table with caption with default-spaced attributes and a table row
6374 |+ style="color: red;" |caption1
6380 <caption style="color: red;">caption1
6389 A table with captions with non-default spaced attributes and a table row
6392 |+style="color: red;"|caption2
6393 |+ style="color: red;"|caption3
6399 <caption style="color: red;">caption2
6401 <caption style="color: red;">caption3
6410 Table td-cell syntax variations
6415 |style='color:red;'|baz
6416 |style='color:red;'||baz
6423 <td>foo bar foo</td>
6426 <td style="color:red;">baz
6428 <td>style='color:red;'</td>
6456 Simple table but with multiple dashes for row wikitext
6475 Multiplication table
6477 {| border="1" cellpadding="2"
6478 |+Multiplication table
6498 <table border="1" cellpadding="2">
6499 <caption>Multiplication table
6546 Accept "||" in table headings
6561 Accept "!!" in table data
6575 <tbody><tr data-parsoid='{"autoInsertedEnd":true,"autoInsertedStart":true}'><td data-parsoid='{"autoInsertedEnd":true}'> Foo!! </td><td data-parsoid='{"stx":"row","autoInsertedEnd":true}'></td></tr>
6580 Accept "||" in indented table headings
6590 </th></tr></table></dd></dl>
6595 Accept "!!" in templates
6609 <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>
6613 Accept "!!" in table headings after newline
6630 <p>b!!c</p></th></tr>
6635 Accept "!!" in table data of mixed wikitext / html syntax
6639 <tr><td>b!!c</td></tr>
6645 </th></tr><tr><td>b!!c</td></tr>
6649 <tbody><tr><th>a</th></tr>
6650 <tr data-parsoid='{"stx":"html"}'><td data-parsoid='{"stx":"html"}'>b!!c</td></tr>
6655 Accept empty attributes in td/th cells (td/th cells starting with leading ||)
6672 Accept "| !" at start of line in tables (ignore !-attribute)
6676 |!style="color:red"|bar
6688 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 +/-
6692 |style='color:red;'|+1
6693 |style='color:blue;'|-1
6705 <td style="color:red;">+1
6707 <td style="color:blue;">-1
6731 |rowspan=2|Cell 2, row 1 (and 2)
6742 <td rowspan="2">Cell 2, row 1 (and 2)
6760 {| bgcolor=#ABCDEF border=2
6765 |the original table again
6773 <table bgcolor="#ABCDEF" border="2">
6781 <td>the original table again
6787 Invalid attributes in table cell (T3830)
6801 Table cell attributes: Pipes protected by nowikis should be treated as a plain character
6805 |title="foo<nowiki>|</nowiki>" |bar
6806 |title="foo<nowiki>|</nowiki>" bar
6813 <td title="foo|">bar
6815 <td>title="foo|" bar
6820 <tbody><tr><td title="foo">bar</td>
6821 <td title="foo|" data-parsoid='{"a":{"title":"foo|"},"sa":{"title":"foo<nowiki>|</nowiki>"},"autoInsertedEnd":true}'>bar</td>
6822 <td> title="foo<span typeof="mw:Nowiki">|</span>" bar</td></tr>
6826 # See: http://lists.wikimedia.org/mailman/htdig/wikitech-l/2006-April/022293.html
6827 # N.B. The "|}" to close the table is missing from the input, so parsoid's
6828 # *2wt modes will fail.
6830 Table security: embedded pipes
6832 parsoid=wt2html,html2html
6835 | |[ftp://|x||]" onmouseover="alert(document.cookie)">test
6839 <td>[<a rel="nofollow" class="external free" href="ftp://%7Cx">ftp://%7Cx</a></td>
6840 <td>]" onmouseover="alert(document.cookie)">test
6848 <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>
6852 Element attributes with double ! should not be broken up by <th>
6855 !hi <div class="!!">ha</div> ho
6860 <th>hi <div class="!!">ha</div> ho
6865 <tbody><tr><th>hi <div class="!!" data-parsoid='{"stx":"html"}'>ha</div> ho</th></tr>
6870 ! and || in element attributes should not be parsed as <th>/<td>
6873 |<div style="color: red !important;" data-contrived="put this here ||">hi</div>
6878 <td><div style="color: red !important;" data-contrived="put this here ||">hi</div>
6883 <tbody><tr><td><div style="color: red !important;" data-contrived="put this here ||" data-parsoid='{"stx":"html"}'>hi</div></td></tr>
6887 # FIXME: The output seems broken. Filed as T110268.
6889 ! and || in td attributes should not be parsed as <th>/<td>
6894 |style="color: red !important;" data-contrived="put this here ||"|foo
6899 <td>style="color: red !important;" data-contrived="put this here</td>
6905 <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>
6910 Break on | in element attribute in template
6912 parsoid=wt2html,html2html
6914 {{echo|1=<div class="hi|ho">ha</div>}}
6916 <p>ho">ha</div>
6919 <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>
6923 Break on | in element attribute name in template
6925 {{echo|<div cla|ss="hiho">ha</div>}}
6927 <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>
6931 Don't break on | in extension attribute in template
6933 {{echo|<ref name="hi|ho">ha</ref>}}
6937 <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="./Parser_test#cite_note-hi|ho-1" style="counter-reset: mw-Ref 1;"><span class="mw-reflink-text">[1]</span></a></sup></p>
6939 <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="./Parser_test#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>
6942 ## We don't support roundtripping of these attributes in Parsoid.
6943 ## Selective serialization takes care of preventing dirty diffs.
6944 ## But, on edits, we dirty-diff the invalid attribute text.
6946 Invalid text in table attributes should be discarded
6950 {| <span>boo</span> style='border:1px solid black'
6951 | <span>boo</span> style='color:blue' |1
6952 |<span>boo</span> style='color:blue'|2
6955 <table style="border:1px solid black">
6957 <td style="color:blue">1
6959 <td style="color:blue">2
6963 <table style="border:1px solid black">
6965 <td style="color:blue">1</td>
6966 <td style="color:blue">2</td>
6972 Invalid text in table attributes should be preserved by selective serializer
6975 "modes": ["selser"],
6977 ["td:first-child", "text", "abc"],
6978 ["td + td", "text", "xyz"]
6982 {| <span>boo</span> style='border:1px solid black'
6983 | <span>boo</span> style='color:blue' | 1
6984 |<span>boo</span> style='color:blue'| 2
6987 {| <span>boo</span> style='border:1px solid black'
6988 | <span>boo</span> style='color:blue' | abc
6989 |<span>boo</span> style='color:blue'| xyz
6994 1. Template-generated table cell attributes and cell content
6999 || {{table_attribs_5}}
7000 | <!--foo--> <!--bar--> <!--baz--> {{table_attribs}}
7001 |align=center {{table_attribs}}
7002 | <!--foo--> align=center <!--bar--> {{table_attribs}}
7007 <td style="color:red;">Foo
7009 <td style="color:red;">Foo
7011 <td>style="color:red;"</td>
7014 <td style="color:red;">Foo
7016 <td align="center" style="color:red;">Foo
7018 <td align="center" style="color:red;">Foo
7024 2. Template-generated table cell attributes and cell content
7027 |{{table_attribs_2}}
7032 <td style="color:red;">Foo
7040 <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>
7041 <td about="#mwt1">Bar</td><td about="#mwt1">Baz</td></tr>
7046 3. Template-generated table cell attributes and cell content
7049 !align=center {{table_header_cells}}
7051 |align=center {{table_cells}}
7056 <th align="center" style="color:red;">Foo</th>
7057 <th style="color:red;"><i>Bar</i></th>
7058 <th style="color:brown;"><i>Foo</i> and Baz
7061 <td align="center" style="color:red;">Foo</td>
7062 <td style="color:red;"><i>Bar</i></td>
7063 <td style="color:brown;"><i>Foo</i> and Baz
7068 <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>
7069 <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>
7074 4. Template-generated table cell attributes and cell content inside a templated table
7077 !align=center {{table_header_cells}}
7079 |align=center {{table_cells}}
7084 <th align="center" style="color:red;">Foo</th>
7085 <th style="color:red;"><i>Bar</i></th>
7086 <th style="color:brown;"><i>Foo</i> and Baz
7089 <td align="center" style="color:red;">Foo</td>
7090 <td style="color:red;"><i>Bar</i></td>
7091 <td style="color:brown;"><i>Foo</i> and Baz
7095 <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}}]}'>
7096 <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>
7098 <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>
7102 ## Edge case fix to prevent future regressions
7104 T107652: <ref>s in templates that also generate table cell attributes should be rendered properly
7107 |{{table_attribs_7}}
7112 <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="./Parser_test#cite_note-1" style="counter-reset: mw-Ref 1;"><span class="mw-reflink-text">[1]</span></a></s></td></tr>
7114 <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="./Parser_test#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>
7118 Table with row followed by newlines and table heading
7120 parsoid=wt2html,html2html
7138 Table with empty line following the start tag
7140 parsoid=wt2html,html2html
7158 Table attributes with empty value
7160 parsoid=wt2html,html2html
7173 <tbody><tr><td style="">hello</td></tr>
7178 Wikitext table with a lot of comments
7201 Wikitext table comments represented in parsoid dom
7203 {|<!--c1--><!--c2-->
7212 </td></tr></tbody></table>
7214 <table><!--c1--><!--c2-->
7215 <tbody><tr data-parsoid='{"startTagSrc":"|-","autoInsertedEnd":true}'><!--c3-->
7216 <td data-parsoid='{"autoInsertedEnd":true}'>x</td></tr>
7221 Wikitext table with double-line table cell
7238 Table cell with a single comment
7255 Table-cell after a comment-only-empty-line
7272 <tbody><tr data-parsoid='{"autoInsertedEnd":true,"autoInsertedStart":true}'><td data-parsoid='{"autoInsertedEnd":true}'>a</td>
7274 <!--c2--><td data-parsoid='{"autoInsertedEnd":true}'>b</td></tr>
7280 Build table with {{!}}
7282 {{{!}} class="wikitable"
7285 {{!}}- style="color:red;"
7286 {{!}}data{{!}}{{!}} style="color:red;" {{!}}second data
7289 <table class="wikitable">
7295 <tr style="color:red;">
7297 <td style="color:red;">second data
7303 Build table with pipe as data
7305 {| class="wikitable"
7308 |- style="color:red;"
7309 |data|| style="color:red;" |second data
7311 | style="color:red;" |data with | || style="color:red;" | second data with |
7313 ||data with | |||second data with |
7316 <table class="wikitable">
7322 <tr style="color:red;">
7324 <td style="color:red;">second data
7327 <td style="color:red;">data with |</td>
7328 <td style="color:red;">second data with |
7331 <td>data with |</td>
7332 <td>second data with |
7338 Build table with wikilink
7340 {| class="wikitable"
7341 !header||second header
7342 |- style="color:red;"
7343 |data [[Main Page|linktext]]||second data [[Main Page|linktext]]
7345 |data||second data [[Main Page|link|text with pipe]]
7348 <table class="wikitable">
7353 <tr style="color:red;">
7354 <td>data <a href="/wiki/Main_Page" title="Main Page">linktext</a></td>
7355 <td>second data <a href="/wiki/Main_Page" title="Main Page">linktext</a>
7359 <td>second data <a href="/wiki/Main_Page" title="Main Page">link|text with pipe</a>
7364 # The expected HTML structure in this test is debatable. The PHP parser does
7365 # not parse this kind of table at all. The main focus for Parsoid is on
7366 # round-tripping, so this output is ok for now. TODO: revisit!
7368 Wikitext table with html-syntax row
7378 <td>foo</td></tr></tbody></table>
7381 ## Remex doesn't account for fostered content.
7383 Fostered content in tables: Plain text
7403 <p data-parsoid='{"fostered":true,"autoInsertedEnd":true,"autoInsertedStart":true}'>
7406 <tbody><tr class="mw-empty-elt" data-parsoid='{"startTagSrc":"|-"}'></tr></tbody></table>
7410 Fostered content in tables: Lists
7412 parsoid=wt2html,html2html
7425 <ul><li>a</li></ul><table>
7430 <ul data-parsoid='{"fostered":true,"autoInsertedEnd":true}'><li>a</li></ul><table>
7431 <tbody><tr data-parsoid='{"startTagSrc":"|-","autoInsertedEnd":true}'>
7433 </tr></tbody></table>
7437 Template generated table cell with attributes
7441 {{table_attribs_4}} ||a||b
7447 <td style="background-color:#DC241f;" width="10px"></td>
7450 </td></tr></tbody></table>
7453 <tbody><tr data-parsoid='{"startTagSrc":"|-","autoInsertedEnd":true}'>
7454 <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>
7458 Parsoid: Round-trip tables directly followed by content (T53219)
7460 parsoid=wt2html,wt2wt
7473 </td></tr></tbody></table><p> bar
7477 </td></tr></tbody></table><p><b>quux</b>
7482 Parsoid: Default to a newline after tables in new content (T53219)
7487 <tr><td>foo</td></tr></tbody></table> bar
7489 <tr><td>baz</td></tr></tbody></table><b>quux</b>
7494 <nowiki> </nowiki>bar
7502 Parsoid: Row-syntax table headings followed by comment & table cells
7504 parsoid=wt2html,wt2wt
7508 <!-- foo --> ||baz||quux
7522 <tbody><tr><th>foo</th><th>bar
7523 <!-- foo --></th><td> baz </td><td>quux</td></tr>
7528 Parsoid: Recover better from broken table attributes
7542 </td></tr></tbody></table>
7547 <p>foo</p></td></tr>
7551 # Note: PHP parser omits empty rows
7553 Tables: Digest broken attributes on table and tr tag
7569 <tr class='mw-empty-elt'></tr>
7570 <tr class='mw-empty-elt'></tr>
7575 Table with missing opening <tr> tag
7577 parsoid=wt2html,wt2wt
7585 <tbody><tr><td>foo</td>
7590 # T137406: Whitespace in the HTML
7592 1. Generate correct wikitext for tables with thead/tbody/tfoot
7597 <caption>Test</caption>
7659 </td></tr></tbody></table>
7662 # T137406: No whitespace in the HTML
7664 2. Generate correct wikitext for tables with thead/tbody/tfoot
7668 <table><thead><tr><th>heading</th></tr></thead><tbody><tr><td>foo</td></tr></tbody></table>
7678 Wikitext tables can be nested inside HTML tables
7682 <table data-parsoid='{"stx":"html"}'>
7685 <tr><td>foo</td></tr>
7703 </td></tr></tbody></table>
7712 Plain link, capitalized
7716 <p><a href="/wiki/Main_Page" title="Main Page">Main Page</a>
7721 Plain link, uncapitalized
7725 <p><a href="/wiki/Main_Page" title="Main Page">main Page</a>
7732 [[Main Page|The Main Page]]
7734 <p><a href="/wiki/Main_Page" title="Main Page">The Main Page</a>
7739 Piped link with comment in link text
7741 [[Main Page|The Main<!--front--> Page]]
7743 <p><a href="/wiki/Main_Page" title="Main Page">The Main Page</a>
7748 Piped link with multiple pipe characters in link text
7750 [[Main Page||The|Main|Page|]]
7752 <p><a href="/wiki/Main_Page" title="Main Page">|The|Main|Page|</a>
7755 <p><a rel="mw:WikiLink" href="./Main_Page" title="Main Page">|The|Main|Page|</a></p>
7759 Piped link with no link text
7761 [[Thomas Bek (bishop of St David's)|]]
7763 <p>[[Thomas Bek (bishop of St David's)|]]
7766 <p>[[Thomas Bek (bishop of St David's)|]]</p>
7770 Piped link with empty link text
7772 [[Main Page|<nowiki/>]] - empty nowiki
7773 [[Main Page| ]] - empty space
7774 [[Main Page| ]] - empty non breaking space
7776 <p><a href="/wiki/Main_Page" title="Main Page"></a> - empty nowiki
7777 <a href="/wiki/Main_Page" title="Main Page"> </a> - empty space
7778 <a href="/wiki/Main_Page" title="Main Page"> </a> - empty non breaking space
7781 <p><a rel="mw:WikiLink" href="./Main_Page" title="Main Page"><span typeof="mw:Nowiki"></span></a> - empty nowiki
7782 <a rel="mw:WikiLink" href="./Main_Page" title="Main Page"> </a> - empty space
7783 <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>
7791 <p><a href="/index.php?title=Zigzagzogzagzig&action=edit&redlink=1" class="new" title="Zigzagzogzagzig (page does not exist)">Zigzagzogzagzig</a>
7796 Broken link with fragment
7798 [[Zigzagzogzagzig#zug]]
7800 <p><a href="/index.php?title=Zigzagzogzagzig&action=edit&redlink=1" class="new" title="Zigzagzogzagzig (page does not exist)">Zigzagzogzagzig#zug</a>
7805 Special page link with fragment
7807 [[Special:Version#anchor]]
7809 <p><a href="/wiki/Special:Version#anchor" title="Special:Version">Special:Version#anchor</a>
7814 Nonexistent special page link with fragment
7816 [[Special:ThisNameWillHopefullyNeverBeUsed#anchor]]
7818 <p><a href="/wiki/Special:ThisNameWillHopefullyNeverBeUsed" class="new" title="Special:ThisNameWillHopefullyNeverBeUsed (page does not exist)">Special:ThisNameWillHopefullyNeverBeUsed#anchor</a>
7825 xxx[[main Page]], xxx[[Main Page]], Xxx[[main Page]] XXX[[main Page]], XXX[[Main Page]]
7827 <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>
7834 [[Main Page]]xxx, [[Main Page]]XXX, [[Main Page]]!!!
7836 <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>!!!
7847 T45661: Piped links with identical prefixes
7849 [[prefixed article|prefixed articles with spaces]]
7851 [[prefixed article|prefixed articlesaoeu]]
7853 [[Main Page|Main Page test]]
7855 <p><a href="/wiki/Prefixed_article" title="Prefixed article">prefixed articles with spaces</a>
7856 </p><p><a href="/wiki/Prefixed_article" title="Prefixed article">prefixed articlesaoeu</a>
7857 </p><p><a href="/wiki/Main_Page" title="Main Page">Main Page test</a>
7863 Link with HTML entity in suffix / tail
7865 [[Main Page]]", [[Main Page]]a
7867 <p><a href="/wiki/Main_Page" title="Main Page">Main Page</a>", <a href="/wiki/Main_Page" title="Main Page">Main Page</a>a
7870 <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>
7874 Link with 3 brackets
7885 Link with 4 brackets
7889 <p>[[<a href="/wiki/Main_Page" title="Main Page">Main Page</a>]]
7894 Piped link with 3 brackets
7896 [[[main page|the main page]]]
7898 <p>[[[main page|the main page]]]
7903 Piped link with extlink-like text
7906 [[Main Page|This is a [bar]]]
7909 <p><a href="/wiki/Main_Page" title="Main Page">[bar]</a>
7910 <a href="/wiki/Main_Page" title="Main Page">This is a [bar]</a>
7911 <a href="/wiki/Main_Page" title="Main Page">[bar</a>
7914 <p><a rel="mw:WikiLink" href="./Main_Page" title="Main Page" data-parsoid='{"stx":"piped"}'>[bar]</a>
7915 <a rel="mw:WikiLink" href="./Main_Page" title="Main Page" data-parsoid='{"stx":"piped"}'>This is a [bar]</a>
7916 <a rel="mw:WikiLink" href="./Main_Page" title="Main Page" data-parsoid='{"stx":"piped"}'>[bar</a></p>
7920 Link with multiple pipes
7922 [[Main Page|The|Main|Page]]
7924 <p><a href="/wiki/Main_Page" title="Main Page">The|Main|Page</a>
7929 Anchor containing a #. (T65430)
7931 wgFragmentMode=[ 'html5', 'legacy' ]
7933 [[Main Page#And#Link]]
7935 <p><a href="/wiki/Main_Page#And#Link" title="Main Page">Main Page#And#Link</a>
7938 <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>
7944 [[Talk:Parser testing]], [[Meta:Disclaimers]]
7946 <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>
7951 Link with space in namespace
7953 [[User talk:Foo bar]]
7955 <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>
7960 MemoryAlpha:AlphaTest
7962 This is an article in the MemoryAlpha namespace
7963 (which shadows the memoryalpha interwiki link).
7967 Namespace takes precedence over interwiki link (T53680)
7969 [[MemoryAlpha:AlphaTest]]
7971 <p><a href="/wiki/MemoryAlpha:AlphaTest" title="MemoryAlpha:AlphaTest">MemoryAlpha:AlphaTest</a>
7975 # The previous test doesn't work correctly in html2*, due to not recognizing the
7976 # link as an internal one. This one checks for the correct behavior.
7978 Link to namespace preferred over interwiki with correct rel attribute
7980 parsoid=html2wt,html2html
7982 <p><a rel="mw:WikiLink" href="./MemoryAlpha:AlphaTest" title="MemoryAlpha:AlphaTest">MemoryAlpha:AlphaTest</a></p>
7984 [[MemoryAlpha:AlphaTest]]
7988 Piped link to namespace
7990 [[Meta:Disclaimers|The disclaimers]]
7992 <p><a href="/index.php?title=Meta:Disclaimers&action=edit&redlink=1" class="new" title="Meta:Disclaimers (page does not exist)">The disclaimers</a>
7999 [[Usually caused by a typo (oops}]]
8001 <p>[[Usually caused by a typo (oops}]]
8008 Just a test of an article title containing a percent.
8012 Link containing % (not as a hex sequence)
8015 [[7% Solution|7%25 Solution]]
8017 <p><a href="/wiki/7%25_Solution" title="7% Solution">7% Solution</a>
8018 <a href="/wiki/7%25_Solution" title="7% Solution">7%25 Solution</a>
8021 <p><a rel="mw:WikiLink" href="./7%25_Solution" title="7% Solution">7% Solution</a>
8022 <a rel="mw:WikiLink" href="./7%25_Solution" title="7% Solution">7%25 Solution</a></p>
8025 # note that the parsoid HTML is identical to the previous test output,
8026 # so the previous test ensures that the html2wt mode will generate the
8027 # "not as a hex sequence" wikitext.
8029 Link containing % as a single hex sequence interpreted to char
8031 parsoid=wt2wt,wt2html,html2html
8034 [[7%25 Solution|7%25 Solution]]
8036 <p><a href="/wiki/7%25_Solution" title="7% Solution">7% Solution</a>
8037 <a href="/wiki/7%25_Solution" title="7% Solution">7%25 Solution</a>
8040 <p><a rel="mw:WikiLink" href="./7%25_Solution" title="7% Solution">7% Solution</a>
8041 <a rel="mw:WikiLink" href="./7%25_Solution" title="7% Solution">7%25 Solution</a></p>
8045 Link containing % as a double hex sequence interpreted to hex sequence
8049 <p>[[7%2525 Solution]]
8053 ## Example for such a section: == < ==
8055 Link containing "#<" and "#>" % as a hex sequences- these are valid section anchors
8059 wgFragmentMode=[ 'html5', 'legacy' ]
8061 [[%23%3c]][[%23%3e]]
8063 <p><a href="#<">#<</a><a href="#>">#></a>
8066 <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>
8069 ## Example for such a section: == < ==
8071 Link containing "#<" and "#>" % as a hex sequences- these are valid section anchors (legacy)
8073 wgFragmentMode=[ 'legacy' ]
8075 [[%23%3c]][[%23%3e]]
8077 <p><a href="#.3C">#<</a><a href="#.3E">#></a>
8082 Link containing "<#" and ">#" as a hex sequences
8084 [[%3c%23]][[%3e%23]]
8086 <p>[[%3c%23]][[%3e%23]]
8091 Link containing an equals sign
8093 [[Special:BookSources/isbn=4-00-026157-6]]
8095 <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>
8098 <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>
8104 Just a test of an article title containing an ampersand
8108 Link containing an ampersand
8114 [[Foo &amp; bar]]
8116 <p><a href="/wiki/Foo_%26_bar" title="Foo & bar">Foo & bar</a>
8117 </p><p><a href="/wiki/Foo_%26_bar" title="Foo & bar">Foo & bar</a>
8118 </p><p>[[Foo &amp; bar]]
8121 <p><a rel="mw:WikiLink" href="./Foo_&_bar" title="Foo & bar">Foo & bar</a></p>
8122 <p><a rel="mw:WikiLink" href="./Foo_&_bar" title="Foo & bar" data-parsoid='{"stx":"simple","a":{"href":"./Foo_&_bar"},"sa":{"href":"Foo &amp; bar"}}'>Foo & bar</a></p>
8123 <p>[[Foo <span typeof="mw:Entity" data-parsoid='{"src":"&amp;","srcContent":"&"}'>&</span>amp; bar]]</p>
8129 Just a test of an article title containing a tilde.
8132 # note that links containing signatures, like [[Foo~~~~]], are
8133 # massaged by the pre-save transform (PST) and so the tildes are never
8134 # seen by the parser.
8136 Link containing a tilde
8140 <p><a href="/wiki/Foo~bar" title="Foo~bar">Foo~bar</a>
8143 <p><a rel="mw:WikiLink" href="./Foo~bar" title="Foo~bar">Foo~bar</a></p>
8147 Link containing double-single-quotes '' (T6598)
8149 [[Lista d''e paise d''o munno]]
8151 <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>
8154 <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>
8158 Link containing double quotes and spaces
8162 <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>
8165 <p><a rel="mw:WikiLink" href='./Cool_"Gator"' title='Cool "Gator"'>Cool "Gator"</a></p>
8169 File containing double quotes and spaces
8171 [[File:Cool "Gator".png]]
8173 <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>
8177 Redirect containing double quotes and spaces
8179 #REDIRECT [[Cool "Gator"]]
8181 <link rel="mw:PageProp/redirect" href="./Cool_%22Gator%22" data-parsoid='{"src":"#REDIRECT ","a":{"href":"./Cool_%22Gator%22"},"sa":{"href":"Cool \"Gator\""}}'/>
8185 Link containing double-single-quotes '' in text (T6598 sanity check)
8187 Some [[Link|pretty ''italics'' and stuff]]!
8189 <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>!
8192 <p>Some <a rel="mw:WikiLink" href="./Link" title="Link">pretty <i>italics</i> and stuff</a>!</p>
8196 Link containing double-single-quotes '' in text embedded in italics (T6598 sanity check)
8198 ''Some [[Link|pretty ''italics'' and stuff]]!''
8200 <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>
8205 Link with double quotes in title part (literal) and alternate part (interpreted)
8207 [[File:Denys_Savchenko_''Pentecoste''.jpg]]
8211 [[''Pentecoste''|Pentecoste]]
8213 [[''Pentecoste''|''Pentecoste'']]
8215 <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>
8216 </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>
8217 </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>
8218 </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>
8221 <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>
8222 <p><a rel="mw:WikiLink" href="./''Pentecoste''" title="''Pentecoste''">''Pentecoste''</a></p>
8223 <p><a rel="mw:WikiLink" href="./''Pentecoste''" title="''Pentecoste''">Pentecoste</a></p>
8224 <p><a rel="mw:WikiLink" href="./''Pentecoste''" title="''Pentecoste''"><i>Pentecoste</i></a></p>
8228 Broken image links with HTML captions (T41700)
8230 [[File:Nonexistent|<script></script>]]
8231 [[File:Nonexistent|100x100px|<script></script>]]
8232 [[File:Nonexistent|<]]
8233 [[File:Nonexistent|a<i>b</i>c]]
8235 <p><a href="/index.php?title=Special:Upload&wpDestFile=Nonexistent" class="new" title="File:Nonexistent"><script></script></a>
8236 <a href="/index.php?title=Special:Upload&wpDestFile=Nonexistent" class="new" title="File:Nonexistent"><script></script></a>
8237 <a href="/index.php?title=Special:Upload&wpDestFile=Nonexistent" class="new" title="File:Nonexistent"><</a>
8238 <a href="/index.php?title=Special:Upload&wpDestFile=Nonexistent" class="new" title="File:Nonexistent">abc</a>
8241 <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>
8242 <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>
8243 <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>
8244 <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>
8250 [[http://www.example.com]]
8252 <p>[<a rel="nofollow" class="external autonumber" href="http://www.example.com">[1]</a>]
8255 <p>[<a rel="mw:ExtLink" class="external autonumber" href="http://www.example.com"></a>]</p>
8259 Plain link to URL with link text
8261 [[http://www.example.com Link text]]
8263 <p>[<a rel="nofollow" class="external text" href="http://www.example.com">Link text</a>]
8268 Plain link to protocol-relative URL
8270 [[//www.example.com]]
8272 <p>[<a rel="nofollow" class="external autonumber" href="//www.example.com">[1]</a>]
8275 <p>[<a rel="mw:ExtLink" class="external autonumber" href="//www.example.com"></a>]</p>
8279 Plain link to protocol-relative URL with link text
8281 [[//www.example.com Link text]]
8283 <p>[<a rel="nofollow" class="external text" href="//www.example.com">Link text</a>]
8288 Plain link to page with question mark in title
8294 <p><a href="/wiki/A%3Fb" title="A?b">A?b</a>
8295 </p><p><a href="/wiki/A%3Fb" title="A?b">Baz</a>
8299 # I'm fairly sure the expected result here is wrong.
8300 # We want these to be URL links, not pseudo-pages with URLs for titles....
8301 # However the current output is also pretty screwy.
8304 # I'm changing it to match the current output--it arguably makes more
8305 # sense in the light of the test above. Old expected result was:
8306 #<p>Piped link to URL: <a href="/index.php?title=Http://www.example.com&action=edit" class="new">an example URL</a>
8308 # But I think this test is bordering on "garbage in, garbage out" anyway.
8313 Piped link to URL: [[http://www.example.com|an example URL]]
8315 <p>Piped link to URL: [<a rel="nofollow" class="external text" href="http://www.example.com%7Can">example URL</a>]
8318 <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>
8322 Plain link in template argument
8326 {{echo|[http://www.example.com |123]}}
8328 {{echo|[[http://www.example.com |123]]}}
8330 {{echo|[[http://www.example.com |123]}}
8332 {{echo|[http://www.example.com |123]]}}
8334 <p>[<a rel="nofollow" class="external free" href="http://www.example.com">http://www.example.com</a>
8335 </p><p>[<a rel="nofollow" class="external text" href="http://www.example.com">|123</a>]
8336 </p><p>{{echo|[<a rel="nofollow" class="external text" href="http://www.example.com">|123</a>}}
8337 </p><p>[<a rel="nofollow" class="external free" href="http://www.example.com">http://www.example.com</a>
8340 <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>
8342 <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>
8344 <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>
8346 <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>
8350 T2002: [[page|http://url/]] should link to page, not http://url/
8352 [[Main Page|http://url/]]
8354 <p><a href="/wiki/Main_Page" title="Main Page">http://url/</a>
8357 <p><a rel="mw:WikiLink" href="./Main_Page" title="Main Page">http://url/</a></p>
8360 # Parsoid does not mark self-links, by design.
8362 T2337: Escaped self-links should be bold
8366 [[Bug462]] [[Bug462]]
8368 <p><a class="mw-selflink selflink">Bug462</a> <a class="mw-selflink selflink">Bug462</a>
8371 <p><a rel="mw:WikiLink" href="./Bug462" title="Bug462">Bug462</a> <a rel="mw:WikiLink" href="./Bug462" title="Bug462">Bug462</a></p>
8375 Self-link to section should not be bold
8379 [[Main Page#section]]
8381 <p><a href="/wiki/Main_Page#section" title="Main Page">Main Page#section</a>
8392 Self-link to numeric title
8398 <p><a class="mw-selflink selflink">0</a>
8403 Link to numeric-equivalent title
8409 <p><a href="/wiki/00" title="00">00</a>
8414 <nowiki> inside a link
8416 [[Main<nowiki> Page</nowiki>]] [[Main Page|the main page <nowiki>[it's not very good]</nowiki>]]
8418 <p>[[Main Page]] <a href="/wiki/Main_Page" title="Main Page">the main page [it's not very good]</a>
8423 Non-breaking spaces in title
8425 [[ Main Page ]]
8427 <p><a href="/wiki/Main_Page" title="Main Page">  Main   Page  </a>
8431 # Add new article for the test below so that it doesn't red-link
8439 Multiple spaces in titles should normalize to a single underscore
8441 parsoid=wt2html,wt2wt
8447 <p><a href="/wiki/Foo_bar_baz" title="Foo bar baz">x</a>
8448 <a href="/wiki/Foo_bar_baz" title="Foo bar baz">x</a>
8449 <a href="/wiki/Foo_bar_baz" title="Foo bar baz">x</a>
8452 <p><a rel="mw:WikiLink" href="./Foo_bar_baz" title="Foo bar baz">x</a>
8453 <a rel="mw:WikiLink" href="./Foo_bar_baz" title="Foo bar baz">x</a>
8454 <a rel="mw:WikiLink" href="./Foo_bar_baz" title="Foo bar baz">x</a>
8459 Internal link with ca linktrail, surrounded by bold apostrophes (T29473 primary issue)
8465 <p><b><a href="/wiki/Main_Page" title="Main Page">Main Page</a></b>
8470 Internal link with ca linktrail, surrounded by italic apostrophes (T29473 primary issue)
8476 <p><i><a href="/wiki/Main_Page" title="Main Page">Main Page</a></i>
8481 Internal link with en linktrail: no apostrophes (T29473)
8487 <p><a href="/index.php?title=Something&action=edit&redlink=1" class="new" title="Something (page does not exist)">Something</a>'nice
8492 Internal link with ca linktrail with apostrophes (T29473)
8498 <p><a href="/index.php?title=Something&action=edit&redlink=1" class="new" title="Something (encara no existeix)">Something'nice</a>
8503 Internal link with kaa linktrail with apostrophes (T29473)
8509 <p><a href="/index.php?title=Something&action=edit&redlink=1" class="new" title="Something (bet ele jaratılmag'an)">Something'nice</a>
8514 Link with multiple ":" in a subpage-supporting namespace (T65636)
8516 [[User:Foo/Test/63636:Bar|Test]]
8518 <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>
8521 <p><a rel="mw:WikiLink" href="./User:Foo/Test/63636:Bar" title="User:Foo/Test/63636:Bar">Test</a></p>
8524 ## Mainly a sanity check for Parsoid
8526 Handle title parsing for subpages
8546 Link to a subpage from a namespace other than main
8553 <p><a href="/wiki/User:Test/123" title="User:Test/123">/123</a>
8556 <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>
8560 Ensure that transclusion titles are not url-decoded
8562 subpage title=[[Test]]
8565 {{Bar%C3%A9}} {{/Bar%C3%A9}}
8567 <p>{{Bar%C3%A9}} {{/Bar%C3%A9}}
8570 <p>{{Bar%C3%A9}} {{/Bar%C3%A9}}</p>
8574 Purely hash wikilink
8576 title=[[User:Test/123]]
8581 <p><a href="#a">b</a>
8584 <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>
8588 Serialization of purely hash wikilink
8590 title=[[User:Test/123]]
8594 <p><a href="#a">[[</a></p>
8596 [[#a|<nowiki>[[</nowiki>]]
8598 <p><a href="#a">[[</a>
8603 1. Interaction of linktrail and template encapsulation
8607 <p><a href="/wiki/Foo" title="Foo">Fool</a>
8610 <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>
8614 2. Interaction of linktrail and template encapsulation
8616 {{echo|Some [[Fool]]}}s
8618 <p>Some <a href="/index.php?title=Fool&action=edit&redlink=1" class="new" title="Fool (page does not exist)">Fools</a>
8621 <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>
8625 3. Interaction of linktrail and template encapsulation
8627 {{echo|Some [[Fool]]s are '''bold and foolish'''}}
8629 <p>Some <a href="/index.php?title=Fool&action=edit&redlink=1" class="new" title="Fool (page does not exist)">Fools</a> are <b>bold and foolish</b>
8632 <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>
8642 Internal link with is link prefix
8646 Aðrir mótmælenda[[söfnuður|söfnuðir]] og
8648 <p>Aðrir <a href="/wiki/S%C3%B6fnu%C3%B0ur" title="Söfnuður">mótmælendasöfnuðir</a> og
8659 Internal link with is link trail and link prefix
8663 [[mótmælendatrú|xxx]]ar
8665 mótmælenda[[söfnuður]]
8666 mótmælenda[[söfnuður|söfnuðir]]
8667 mótmælenda[[söfnuður|söfnuðir]]xxx
8669 <p><a href="/wiki/M%C3%B3tm%C3%A6lendatr%C3%BA" title="Mótmælendatrú">xxxar</a>
8670 <a href="/wiki/M%C3%B3tm%C3%A6lendatr%C3%BA" title="Mótmælendatrú">mótmælendatrúar</a>
8671 <a href="/wiki/S%C3%B6fnu%C3%B0ur" title="Söfnuður">mótmælendasöfnuður</a>
8672 <a href="/wiki/S%C3%B6fnu%C3%B0ur" title="Söfnuður">mótmælendasöfnuðir</a>
8673 <a href="/wiki/S%C3%B6fnu%C3%B0ur" title="Söfnuður">mótmælendasöfnuðirxxx</a>
8678 Parsoid link trail escaping
8680 parsoid=html2wt,html2html
8682 <p><a rel="mw:WikiLink" href="./Apple" title="Apple">apple</a>s</p>
8688 Parsoid link prefix escaping
8691 parsoid=html2wt,html2html
8693 <p>Aðrir mótmælenda<a rel="mw:WikiLink" href="./Söfnuður" title="Söfnuður">söfnuður</a></p>
8695 Aðrir mótmælenda<nowiki/>[[söfnuður]]
8699 Parsoid link bracket escaping
8701 parsoid=html2wt,html2html
8703 <p><a rel="mw:WikiLink" href="./Test" title="Test">Test</a></p>
8704 <p>[<a rel="mw:WikiLink" href="./Test" title="Test">Test</a>]</p>
8705 <p>[[<a rel="mw:WikiLink" href="./Test" title="Test">Test</a>]]</p>
8706 <p>[[[<a rel="mw:WikiLink" href="./Test" title="Test">Test</a>]]]</p>
8707 <p>[[[[<a rel="mw:WikiLink" href="./Test" title="Test">Test</a>]]]]</p>
8708 <p>[[[[[<a rel="mw:WikiLink" href="./Test" title="Test">Test</a>]]]]]</p>
8716 [[[<nowiki/>[[Test]]]]]
8720 [[[[[<nowiki/>[[Test]]]]]]]
8724 Parsoid-centric test: Whitespace in ext- and wiki-links should be preserved
8732 [http://wp.org ''foo'']
8734 <p><a href="/wiki/Foo" title="Foo"> bar</a>
8735 </p><p><a href="/wiki/Foo" title="Foo"> <i>bar</i></a>
8736 </p><p><a rel="nofollow" class="external text" href="http://wp.org">foo</a>
8737 </p><p><a rel="nofollow" class="external text" href="http://wp.org"><i>foo</i></a>
8742 Parsoid: Scoped parsing should handle mixed transclusions and plain text
8744 [[Foo|{{echo|a}} b {{echo|c}}]]
8746 <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>
8750 Link with angle bracket after anchor
8752 wgFragmentMode=[ 'html5', 'legacy' ]
8756 <p><a href="/wiki/Foo#<bar>" title="Foo">Foo#<bar></a>
8759 <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>
8763 Link with angle bracket after anchor (legacy)
8765 wgFragmentMode=[ 'legacy' ]
8769 <p><a href="/wiki/Foo#.3Cbar.3E" title="Foo">Foo#<bar></a>
8774 ### Interwiki links (see maintenance/interwiki.sql)
8778 Inline interwiki link
8780 parsoid=wt2html,wt2wt,html2html
8782 [[MeatBall:SoftSecurity]]
8784 <p><a href="http://www.usemod.com/cgi-bin/mb.pl?SoftSecurity" class="extiw" title="meatball:SoftSecurity">MeatBall:SoftSecurity</a>
8787 <p><a rel="mw:WikiLink/Interwiki" href="http://www.usemod.com/cgi-bin/mb.pl?SoftSecurity" title="meatball:SoftSecurity">MeatBall:SoftSecurity</a></p>
8791 Inline interwiki link with empty title (T4372)
8793 parsoid=wt2html,wt2wt,html2html
8797 <p><a href="http://www.usemod.com/cgi-bin/mb.pl" class="extiw" title="meatball:">MeatBall:</a>
8800 <p><a rel="mw:WikiLink/Interwiki" href="http://www.usemod.com/cgi-bin/mb.pl?" title="meatball:">MeatBall:</a></p>
8803 ## html2wt and html2html will fail because we will prefer the :en: interwiki prefix over wikipedia:
8805 Interwiki link encoding conversion (T3636)
8807 parsoid=wt2html,wt2wt
8809 *[[Wikipedia:ro:Olteniţa]]
8810 *[[Wikipedia:ro:Olteniţa]]
8812 <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>
8813 <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>
8816 <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>
8817 <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>
8820 <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>
8821 <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>
8826 Interwiki link with fragment (T4130)
8828 [[MeatBall:SoftSecurity#foo]]
8830 <p><a href="http://www.usemod.com/cgi-bin/mb.pl?SoftSecurity#foo" class="extiw" title="meatball:SoftSecurity">MeatBall:SoftSecurity#foo</a>
8835 Link scenarios with escaped fragments
8839 wgFragmentMode=[ 'html5', 'legacy' ]
8842 [[Foo#Is this great?]]
8843 [[meatball:Foo#Is this great?]]
8845 <p><a href="#Is_this_great?">#Is this great?</a>
8846 <a href="/wiki/Foo#Is_this_great?" title="Foo">Foo#Is this great?</a>
8847 <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>
8850 <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>
8851 <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>
8852 <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>
8856 Link scenarios with escaped fragments (legacy)
8858 wgFragmentMode=[ 'legacy' ]
8861 [[Foo#Is this great?]]
8862 [[meatball:Foo#Is this great?]]
8864 <p><a href="#Is_this_great.3F">#Is this great?</a>
8865 <a href="/wiki/Foo#Is_this_great.3F" title="Foo">Foo#Is this great?</a>
8866 <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>
8870 # Ideally the wikipedia: prefix here should be proto-relative too
8871 # [CSA]: this is kind of a bogus test, as the PHP parser test doesn't
8872 # define the 'en' prefix, and originally the test used 'wikipedia',
8873 # which isn't a localinterwiki prefix hence the links to the 'en:Foo'
8876 Different interwiki prefixes mapping to the same URL
8884 [[:wikipedia:Foo|Foo]]
8886 [[wikipedia:en:Foo]]
8888 [[:wikipedia:en:Foo]]
8892 <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>
8894 <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>
8896 <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>
8898 <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>
8900 <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>
8902 <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>
8904 <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>
8908 Interwiki links that cannot be represented in wiki syntax
8911 [[meatball:ok#foo|ok with fragment]]
8912 [[meatball:ok_as_well?|ok ending with ? mark]]
8913 [http://de.wikipedia.org/wiki/Foo?action=history has query]
8914 [http://de.wikipedia.org/wiki/#foo is just fragment]
8917 <p><a href="http://www.usemod.com/cgi-bin/mb.pl?ok" class="extiw" title="meatball:ok">meatball:ok</a>
8918 <a href="http://www.usemod.com/cgi-bin/mb.pl?ok#foo" class="extiw" title="meatball:ok">ok with fragment</a>
8919 <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>
8920 <a rel="nofollow" class="external text" href="http://de.wikipedia.org/wiki/Foo?action=history">has query</a>
8921 <a rel="nofollow" class="external text" href="http://de.wikipedia.org/wiki/#foo">is just fragment</a>
8924 <p><a rel="mw:WikiLink/Interwiki" href="http://www.usemod.com/cgi-bin/mb.pl?ok" title="meatball:ok">meatball:ok</a>
8925 <a rel="mw:WikiLink/Interwiki" href="http://www.usemod.com/cgi-bin/mb.pl?ok#foo" title="meatball:ok">ok with fragment</a>
8926 <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>
8927 <a rel="mw:ExtLink" class="external text" href="http://de.wikipedia.org/wiki/Foo?action=history">has query</a>
8928 <a rel="mw:ExtLink" class="external text" href="http://de.wikipedia.org/wiki/#foo">is just fragment</a></p>
8932 Interwiki links: trail
8934 [[wikipedia:Foo|Ba]]r
8936 <p><a href="http://en.wikipedia.org/wiki/Foo" class="extiw" title="wikipedia:Foo">Bar</a>
8939 <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>
8943 Local interwiki link
8945 parsoid=wt2html,wt2wt,html2html
8947 [[local:Template:Foo]]
8949 <p><a href="/wiki/Template:Foo" title="Template:Foo">local:Template:Foo</a>
8952 <p><a rel="mw:WikiLink" href="./Template:Foo" title="Template:Foo">local:Template:Foo</a></p>
8955 # Parsoid does not mark self-links, by design.
8957 Local interwiki link: self-link to current page
8960 parsoid=wt2html,wt2wt,html2html
8964 <p><a class="mw-selflink selflink">local:Main Page</a>
8967 <p><a rel="mw:WikiLink" href="./Main_Page" title="Main Page">local:Main Page</a></p>
8971 Local interwiki link: prefix only (T66167)
8973 parsoid=wt2html,wt2wt,html2html
8977 <p><a href="/wiki/Main_Page" title="Main Page">local:</a>
8980 <p><a rel="mw:WikiLink" href="./Main_Page" title="Main Page">local:</a></p>
8984 Local interwiki link: with additional interwiki prefix (T63357)
8986 parsoid=wt2html,wt2wt,html2html
8988 [[local:meatball:Hello]]
8990 <p><a href="http://www.usemod.com/cgi-bin/mb.pl?Hello" class="extiw" title="meatball:Hello">local:meatball:Hello</a>
8993 <p><a rel="mw:WikiLink/Interwiki" href="http://www.usemod.com/cgi-bin/mb.pl?Hello" title="meatball:Hello">local:meatball:Hello</a></p>
8997 Multiple local interwiki link prefixes
8999 [[local:local:local:local:mi:local:Foo]]
9001 parsoid=wt2html,wt2wt,html2html
9003 <p><a href="/wiki/Foo" title="Foo">local:local:local:local:mi:local:Foo</a>
9006 <p><a rel="mw:WikiLink" href="./Foo" title="Foo">local:local:local:local:mi:local:Foo</a></p>
9010 Interwiki link with percent encoded target
9012 [[:es:Nueva Guip%C3%BAzcoa|Nueva Guipúzcoa]]
9014 <p><a href="http://es.wikipedia.org/wiki/Nueva_Guip%C3%BAzcoa" class="extiw" title="es:Nueva Guipúzcoa">Nueva Guipúzcoa</a>
9017 <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>
9021 ### Interlanguage links
9022 ### Language links (so that searching for '### language' matches..)
9034 <p>Blah blah blah</p>
9035 <link rel="mw:PageProp/Language" href="http://zh.wikipedia.org/wiki/Chinese"/>
9038 ## parsoid html2wt will lose the space variations
9040 Interlanguage link with spacing
9042 parsoid=wt2html,wt2wt,html2html
9050 <p>Blah blah blah</p>
9051 <link rel="mw:PageProp/Language" href="http://zh.wikipedia.org/wiki/Chinese"/>
9055 Double interlanguage link
9064 <p>Blah blah blah</p>
9065 <link rel="mw:PageProp/Language" href="http://es.wikipedia.org/wiki/Spanish"/>
9066 <link rel="mw:PageProp/Language" href="http://zh.wikipedia.org/wiki/Chinese"/>
9069 ## parsoid html2wt will lose the space variations
9071 Interlanguage link variations
9073 parsoid=wt2html,wt2wt,html2html
9083 <p>Blah blah blah</p>
9084 <link rel="mw:PageProp/Language" href="http://es.wikipedia.org/wiki/Spanish" />
9085 <link rel="mw:PageProp/Language" href="http://zh.wikipedia.org/wiki/Chinese" />
9086 <link rel="mw:PageProp/Language" href="http://es.wikipedia.org/wiki/Foo_bar" />
9090 Escaping of interlanguage links (T129218, T156308)
9094 [[ : zh : Chinese ]]
9097 <a href="http://es.wikipedia.org/wiki/Spanish" class="extiw" title="es:Spanish">es:Spanish</a>
9098 <a href="http://zh.wikipedia.org/wiki/Chinese" class="extiw" title="zh:Chinese"> zh : Chinese </a>
9102 <a rel="mw:WikiLink/Interwiki" href="http://es.wikipedia.org/wiki/Spanish" title="es:Spanish">es:Spanish</a>
9103 <a rel="mw:WikiLink/Interwiki" href="http://zh.wikipedia.org/wiki/Chinese" title="zh:Chinese"> zh : Chinese </a></p>
9107 Multiple colons escaping interlanguage links
9115 <p><a href="http://es.wikipedia.org/wiki/Spanish" class="extiw" title="es:Spanish">es:Spanish</a>
9120 <p><a rel="mw:WikiLink/Interwiki" href="http://es.wikipedia.org/wiki/Spanish" title="es:Spanish">es:Spanish</a>
9122 [[:::es:Spanish]]</p>
9125 ## parsoid html2wt will normalize the space to _
9127 Space and question mark encoding in interlanguage links (T95473)
9129 parsoid=wt2html,wt2wt,html2html
9137 <p>Blah blah blah</p>
9138 <link rel="mw:PageProp/Language" href="http://es.wikipedia.org/wiki/Foo_bar%3F" />
9142 Interlanguage link, with prefix links
9152 <p>Blah blah blah</p>
9153 <link rel="mw:PageProp/Language" href="http://zh.wikipedia.org/wiki/Chinese"/>
9157 Double interlanguage link, with prefix links (T10897)
9168 <p>Blah blah blah</p>
9169 <link rel="mw:PageProp/Language" href="http://es.wikipedia.org/wiki/Spanish"/>
9170 <link rel="mw:PageProp/Language" href="http://zh.wikipedia.org/wiki/Chinese"/>
9174 "Extra" interlanguage links (T34189 / gerrit 111390)
9182 <p>Blah blah blah</p>
9183 <link rel="mw:PageProp/Language" title="Multilingual" href="http://wikisource.org/wiki/Article"/>
9186 ## PHP parser tests script needs an update
9187 ## Parsoid html2wt will normalize output to [[:zh:Chinese]]
9189 Language links render as inline links if $wgInterwikiMagic=false
9191 wgInterwikiMagic=false
9192 parsoid=wt2html,wt2wt,html2html
9197 <p>Blah blah blah <a rel="mw:WikiLink/Interwiki" href="http://zh.wikipedia.org/wiki/Chinese" title="zh:Chinese">zh:Chinese</a></p>
9200 ## PHP parser tests script needs an update
9201 ## Parsoid html2wt will normalize output to [[:zh:Chinese]]
9203 Language links render as inline links in the Talk namespace
9206 parsoid=wt2html,wt2wt,html2html
9211 <p>Blah blah blah <a rel="mw:WikiLink/Interwiki" href="http://zh.wikipedia.org/wiki/Chinese" title="zh:Chinese">zh:Chinese</a></p>
9215 Parsoid-specific test: Wikilinks with should RT properly
9221 <p><a href="/index.php?title=WW_II&action=edit&redlink=1" class="new" title="WW II (lonkásá ezalí tɛ̂)">WW II</a>
9226 Parsoid T55221: Wikilinks should be properly entity-escaped
9228 parsoid={ "modes": ["html2wt"], "suppressErrors": true }
9230 <p>He&nbsp;llo <a href="./Foo" rel="mw:WikiLink">He&nbsp;llo</a></p>
9231 <p>He&nbsp;llo <a href="./He&nbsp;llo" rel="mw:WikiLink">He&nbsp;llo</a></p>
9233 He&nbsp;llo [[Foo|He&nbsp;llo]]
9235 He&nbsp;llo He&nbsp;llo
9237 <p>He&nbsp;llo <a href="/wiki/Foo" title="Foo">He&nbsp;llo</a>
9238 </p><p>He&nbsp;llo He&nbsp;llo
9242 # html2wt will fail because of title normalization without data-parsoid
9244 Parsoid: handle constructor well
9246 parsoid=wt2html,wt2wt
9252 <p><a href="/index.php?title=Constructor&action=edit&redlink=1" class="new" title="Constructor (page does not exist)">constructor</a>
9253 </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>
9256 <p><a rel="mw:WikiLink" href="./Constructor" title="Constructor" data-parsoid='{"stx":"simple","a":{"href":"./Constructor"},"sa":{"href":"constructor"}}'>constructor</a></p>
9258 <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>
9262 Template parameter named "constructor"
9264 {{echo| constructor = |hi}}
9266 <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>
9275 # Note that `ko` isn't a known interlanguage prefix
9277 Parsoid: recognize interlanguage links without a target page
9287 <link rel="mw:PageProp/Language" href="http://es.wikipedia.org/wiki/"/>
9289 <p><a rel="mw:WikiLink" href="./Ko:" title="Ko:">ko:</a></p>
9292 # Note that `ko` isn't a known interwiki prefix
9294 Parsoid: recognize interwiki links without a target page
9296 parsoid=wt2html,wt2wt,html2html
9302 <p><a href="http://es.wikipedia.org/wiki/" class="extiw" title="es:">es:</a>
9303 </p><p><a href="/wiki/Ko:" title="Ko:">ko:</a>
9306 <p><a rel="mw:WikiLink/Interwiki" href="http://es.wikipedia.org/wiki/" title="es:">es:</a></p>
9307 <p><a rel="mw:WikiLink" href="./Ko:" title="Ko:">ko:</a></p>
9311 Handle interwiki links pointing to the current wiki as plain wiki links (T47209)
9315 <p><a href="/wiki/Foo" title="Foo">mi:Foo</a>
9318 <p><a rel="mw:WikiLink" href="./Foo" title="Foo" data-parsoid='{"stx":"simple","a":{"href":"./Foo"},"sa":{"href":"mi:Foo"}}'>mi:Foo</a></p>
9322 Interlanguage link with preceding local interwiki link (T70085)
9324 parsoid=wt2html,wt2wt,html2html
9327 [[local:es:Spanish]]
9330 <a href="http://es.wikipedia.org/wiki/Spanish" class="extiw" title="es:Spanish">local:es:Spanish</a>
9334 <a rel="mw:WikiLink/Interwiki" href="http://es.wikipedia.org/wiki/Spanish" title="es:Spanish">local:es:Spanish</a></p>
9338 Looks like an interlanguage link, but is actually a local interwiki
9340 parsoid=wt2html,wt2wt,html2html
9346 <a href="/wiki/Template:Foo" title="Template:Foo">mi:Template:Foo</a>
9350 <a rel="mw:WikiLink" href="./Template:Foo" title="Template:Foo">mi:Template:Foo</a></p>
9354 ### Redirects, Parsoid-only
9358 1. Simple redirect to page
9360 #REDIRECT [[Main Page]]
9362 <link rel="mw:PageProp/redirect" href="./Main_Page"/>
9366 2. Other redirect variants
9368 #REDIRECT [[Main_Page]]
9370 <link rel="mw:PageProp/redirect" href="./Main_Page" data-parsoid='{"src":"#REDIRECT ","a":{"href":"./Main_Page"},"sa":{"href":"Main_Page"}}'/>
9373 # Not a valid redirect in PHP (although perhaps it was, once upon a time)
9374 # This tests the Parsoid bail-out code.
9376 3. Other redirect variants
9380 #REDIRECT [[<nowiki>[[Bar]]</nowiki>]]
9382 <ol><li>REDIRECT [[<span typeof="mw:Nowiki">[[Bar]]</span>]]</li></ol>
9386 4. Redirect to a templated destination
9388 #REDIRECT [[{{echo|Foo}}bar]]
9390 <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"}]]}'/>
9396 parsoid=wt2html,wt2wt
9401 <li>REDIRECT [[]]</li></ol>
9405 Optional colon in #REDIRECT
9407 # the colon is archaic syntax. we support it for wt2html, but we
9408 # don't care that it roundtrips back to the modern syntax.
9409 parsoid=wt2html,html2html
9411 #REDIRECT:[[Main Page]]
9413 <link rel="mw:PageProp/redirect" href="./Main_Page"/>
9417 Whitespace in #REDIRECT with optional colon
9419 # the colon and gratuitous whitespace is archaic syntax. we support
9420 # it for wt2html, but we don't care that it roundtrips back to the
9421 # modern syntax (without extra whitespace)
9422 parsoid=wt2html,html2html
9429 <link rel="mw:PageProp/redirect" href="./Main_Page"/>
9433 Piped link in #REDIRECT
9435 # content after piped link is ignored. we support this syntax,
9436 # but don't care that the piped link is lost when we roundtrip this.
9439 #REDIRECT [[Main Page|bar]]
9441 <link rel="mw:PageProp/redirect" href="./Main_Page"/>
9445 Redirect to category (T104502)
9447 parsoid=wt2html,wt2wt
9449 #REDIRECT [[Category:Foo]]
9451 <link rel="mw:PageProp/redirect" href="./Category:Foo"/>
9455 Redirect to category with URL encoding (T104502)
9459 #REDIRECT [[Category%3AFoo]]
9461 <link rel="mw:PageProp/redirect" href="./Category:Foo"/>
9465 Redirect to category page
9467 #REDIRECT [[:Category:Foo]]
9469 <link rel="mw:PageProp/redirect" href="./Category:Foo"/>
9473 Redirect to image page (1)
9475 #REDIRECT [[File:Wiki.png]]
9477 <link rel="mw:PageProp/redirect" href="./File:Wiki.png"/>
9481 Redirect to image page (2)
9483 #REDIRECT [[Image:Wiki.png]]
9485 <link rel="mw:PageProp/redirect" href="./File:Wiki.png" data-parsoid='{"src":"#REDIRECT ","a":{"href":"./File:Wiki.png"},"sa":{"href":"Image:Wiki.png"}}'/>
9488 # html2wt disabled because wts serializes as "#REDIRECT [[:en:File:Wiki.png]]"
9489 # Next test confirms this.
9491 Redirect to language (1) (T104918)
9493 parsoid=wt2html,wt2wt,html2html
9495 #REDIRECT [[en:File:Wiki.png]]
9497 <link rel="mw:PageProp/redirect" href="//en.wikipedia.org/wiki/File:Wiki.png"/>
9501 Redirect to language (2) (T104918)
9503 #REDIRECT [[:en:File:Wiki.png]]
9505 <link rel="mw:PageProp/redirect" href="//en.wikipedia.org/wiki/File:Wiki.png"/>
9509 Redirect to interwiki (T104918)
9511 #REDIRECT [[meatball:File:Wiki.png]]
9513 <link rel="mw:PageProp/redirect" href="http://www.usemod.com/cgi-bin/mb.pl?File:Wiki.png"/>
9517 Non-English #REDIRECT
9521 #TILVÍSUN [[Main Page]]
9523 <link rel="mw:PageProp/redirect" href="./Main_Page" data-parsoid='{"src":"#TILVÍSUN ","a":{"href":"./Main_Page"},"sa":{"href":"Main Page"}}'/>
9527 Redirect syntax under text isn't considered a redirect
9531 #redirect [[Main Page]]
9534 <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>
9542 <p>Foo<link rel="mw:PageProp/redirect" href="./Foo"/></p>
9549 Redirect followed by block on the same line
9553 #REDIRECT [[Main Page]]<!-- haha -->==hi==
9555 <link rel="mw:PageProp/redirect" href="./Main_Page"/><!-- haha --><h2 id="hi">hi</h2>
9559 Redirect followed by a newline
9561 #REDIRECT [[Main Page]]
9564 <link rel="mw:PageProp/redirect" href="./Main_Page"/>
9569 Redirect followed by multiple newlines
9571 #REDIRECT [[Main Page]]
9576 <link rel="mw:PageProp/redirect" href="./Main_Page"/>
9583 Drop duplicate redirects
9587 <link rel="mw:PageProp/redirect" href="./Foo"/>
9588 <link rel="mw:PageProp/redirect" href="./Bar"/>
9589 <link rel="mw:PageProp/redirect" href="./Baz"/>
9608 Broken br tag sanitization
9616 # TODO: Fix html2html mode (T53055)!
9618 Parsoid: Broken br tag recognition
9632 Incorrecly removing closing slashes from correctly formed XHTML
9634 <br style="clear:both;" />
9636 <p><br style="clear:both;" />
9641 Failing to transform badly formed HTML into correct XHTML
9643 <br style="clear: left;">
9644 <br style="clear: right;">
9645 <br style="clear: both;">
9647 <p><br style="clear: left;" />
9648 <br style="clear: right;" />
9649 <br style="clear: both;" />
9653 ## FIXME: Is Parsoid's acceptance of self-closing html-tags
9654 ## a feature or a bug? See https://phabricator.wikimedia.org/T76962
9656 Handling html with a div self-closing tag
9665 <div title=""></div>
9666 <div title=""></div>
9668 <div title="bar"></div>
9669 <div title="bar"></div>
9673 <div title="" data-parsoid='{"stx":"html","selfClose":true}'></div>
9674 <div title="" data-parsoid='{"stx":"html","selfClose":true}'></div>
9675 <div title="" data-parsoid='{"stx":"html","autoInsertedEnd":true}'>
9676 <div title="bar" data-parsoid='{"stx":"html","selfClose":true}'></div>
9677 <div title="bar" data-parsoid='{"stx":"html","selfClose":true}'></div>
9678 <div title="bar/" data-parsoid='{"stx":"html","autoInsertedEnd":true}'></div></div>
9682 Elements with solidus in various attribute positions
9684 parsoid=wt2html,html2html
9686 <div cla/ss="123">ha</div>
9688 <div / class="123">ha</div>
9690 <div class= / "123">ha</div>
9693 <div class="123">ha</div>
9694 <div class="/">ha</div>
9696 <div data-parsoid='{"stx":"html","a":{"cla":null,"ss":null},"sa":{"cla":"","ss":"123"}}'>ha</div>
9698 <div class="123" data-parsoid='{"stx":"html"}'>ha</div>
9700 <div class="/" data-parsoid='{"stx":"html","a":{"\"123\"":null},"sa":{"\"123\"":""}}'>ha</div>
9704 Handling html with a br self-closing tag
9731 Quoted attributes without spaces
9735 <div class="foo"style="color:red">red</div>
9737 <div class="foo" style="color:red">red</div>
9739 <div class="foo" style="color:red">red</div>
9743 Horizontal ruler (should it add that extra space?)
9752 foo </p><hr /><p> bar
9757 Horizontal ruler -- 4+ dashes render hr
9766 Horizontal ruler -- eats additional dashes on the same line
9775 Horizontal ruler -- does not collapse dashes on consecutive lines
9786 Horizontal ruler -- <4 dashes render as plain text
9795 Horizontal ruler -- Supports content following dashes on same line
9807 ### Block-level elements
9816 <ul><li>Common list</li>
9818 <li>item 3</li></ul>
9829 <ol><li>Numbered list</li>
9831 <li>item 3</li></ol>
9835 # the switch from level 3 to ordered should not introduce a newline between
9846 ***#Number on level 4
9848 **#Number on level 3
9849 **#Number on level 3
9853 #**Level 3, but ordered
9856 <ol><li>with numbers</li></ol>
9857 <ul><li>and bullets</li></ul>
9858 <ol><li>and numbers</li></ol></li>
9860 <ul><li>bullet level 2
9861 <ul><li>bullet level 3
9862 <ol><li>Number on level 4</li></ol></li></ul></li>
9864 <ol><li>Number on level 3</li>
9865 <li>Number on level 3</li></ol></li></ul>
9866 <ol><li>number level 2</li></ol></li>
9868 <ul><li><ul><li>Level 3</li></ul></li></ul></li></ul>
9869 <ol><li><ul><li><ul><li>Level 3, but ordered</li></ul></li></ul></li></ol>
9874 1. Nested mixed wikitext and html list
9877 *<ul><li>ho</li></ul>
9882 <li><ul><li>ho</li></ul></li>
9884 <ul><li>ho</li></ul></li></ul>
9888 <li><ul data-parsoid='{"stx":"html"}'><li data-parsoid='{"stx":"html"}'>ho</li></ul></li>
9890 <ul><li>ho</li></ul></li></ul>
9894 2. Nested mixed wikitext and html list (incompatible)
9897 :{{echo|<li>ho</li>}}
9900 <dd><li>ho</li></dd></dl>
9904 <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>
9914 <ul><li>bar</li></ul></li></ul>
9924 <ul><li><ul><li>foo</li></ul></li>
9930 Nested lists 3 (first element empty)
9936 <ul><li>bar</li></ul></li></ul>
9941 Nested lists 4 (first element empty)
9946 <ul><li><ul><li></li></ul></li>
9952 Nested lists 5 (both elements empty)
9957 <ul><li><ul><li></li></ul></li>
9963 Nested lists 6 (both elements empty)
9969 <ul><li></li></ul></li></ul>
9974 Nested lists 7 (skip initial nesting levels)
9978 <ul><li><ul><li><ul><li>foo</li></ul></li></ul></li></ul>
9983 Nested lists 8 (multiple nesting transitions)
9991 <ul><li><ul><li>bar</li></ul></li>
9992 <li>baz</li></ul></li>
9997 # XXX this test should be moved to citeParserTests, since it depends
9998 # on the Cite extension, which is "built in" to Parsoid.
10000 Nested lists 9 (extension interaction)
10003 !! html/php+tidy-DISABLED
10004 <ul><li class="mw-empty-elt"></li></ul>
10006 <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>
10010 1. Lists with start-of-line-transparent tokens before bullets: Comments
10023 Nested lists 10 (list and span siblings: wt2wt regression)
10028 <ul><li>a <span>x</span>
10029 <ul><li>b <span>y</span></li></ul></li></ul>
10033 2. Lists with start-of-line-transparent tokens before bullets: Template close
10038 <ul><li>foo bar</li>
10044 List items are not parsed correctly following a <pre> block (T2785)
10050 <ul><li><pre>foo</pre></li>
10051 <li><pre>bar</pre></li>
10055 <ul><li><pre typeof="mw:Extension/pre" about="#mwt2" data-mw='{"name":"pre","attrs":{},"body":{"extsrc":"foo"}}'>foo</pre></li>
10056 <li><pre typeof="mw:Extension/pre" about="#mwt4" data-mw='{"name":"pre","attrs":{},"body":{"extsrc":"bar"}}'>bar</pre></li>
10060 # FIXME: Might benefit from a html/parsoid since this has a template
10062 List items from template
10073 *notSOL{{inner list}}
10076 <ul><li>item 1</li>
10077 <li>item 2</li></ul>
10078 <ul><li>item 0</li>
10080 <li>item 2</li></ul>
10081 <ul><li>item 0</li>
10084 <li>item 2</li></ul>
10089 List interrupted by empty line or heading
10097 <ul><li>foo</li></ul>
10098 <ul><li><ul><li>bar</li></ul></li></ul>
10099 <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>
10100 <ul><li>Another list item</li></ul>
10105 Multiple list tags generated by templates
10124 <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>
10125 <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>
10126 <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>
10130 Multiple newlines in between HTML list items don't induce paragraph wrapping
10143 <dd>ho<div>123</div>
10159 <dd>ho<div>123</div>
10167 Single-comment whitespace lines dont break lists, and neither do multi-comment whitespace lines
10170 <!--This line will NOT split the list-->
10172 <!--This line will NOT split the list either-->
10174 <!--foo--> <!----> <!--This line NOT split the list either-->
10185 Replacing whitespace with tabs still doesn't break the list (gerrit 78327)
10188 <!--This line will NOT split the list-->
10190 <!--This line will NOT split the list either-->
10192 <!--foo--> <!----> <!--This line NOT split the list
10203 # FIXME: Parsoid has a dedicated DOM pass to mimic this Tidy-specific li-hack
10204 # That pass could possibly be removed.
10206 Test the li-hack (a hack from Tidy days, but doesn't work as advertised with Remex)
10208 parsoid=wt2html,wt2wt
10212 *{{echo|<li>templated li-hack}}
10213 *<!--foo--><li> unsupported li-hack with preceding comments
10216 <li><li>not a li-hack
10221 <li class="mw-empty-elt"></li><li>li-hack</li>
10222 <li class="mw-empty-elt"></li><li>templated li-hack</li>
10223 <li class="mw-empty-elt"></li><li> unsupported li-hack with preceding comments</li></ul>
10225 <li class="mw-empty-elt"></li><li>not a li-hack
10230 <li data-parsoid='{"stx":"html","autoInsertedEnd":true,"liHackSrc":"*"}'>li-hack</li>
10231 <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>
10232 <li data-parsoid='{"autoInsertedEnd":true}'><!--foo--></li><li data-parsoid='{"stx":"html","autoInsertedEnd":true}'>unsupported li-hack with preceding comments</li></ul>
10234 <ul data-parsoid='{"stx":"html"}'>
10235 <li class="mw-empty-elt" data-parsoid='{"stx":"html","autoInsertedEnd":true}'></li><li data-parsoid='{"stx":"html"}'>not a li-hack
10242 Parsoid: Make sure nested lists are serialized on their own line even if HTML contains no newlines
10254 <ol><li>bar</li></ol></li></ol>
10256 <ul><li>bar</li></ul></li></ul>
10258 <dl><dd>bar</dd></dl></dd></dl>
10276 Parsoid: Test of whitespace serialization with Templated bullets
10283 <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>
10287 # ------------------------------------------------------------------------
10288 # The next set of tests are about Parsoid's ability to handle badly nested
10289 # tags (parse, minimize scope of fixup, and roundtrip back)
10290 # ------------------------------------------------------------------------
10292 # Remex and Parsoid output stems from list handling diffs because Parsoid & PHP parser.
10293 # Parsoid's list handling is more aware of block structure.
10295 Unbalanced closing block tags break a list
10302 <ul><li>a</li></ul></div><div>
10314 Unbalanced closing non-block tags don't break a list
10316 parsoid=wt2html,html2html
10324 <ul><li>a<span></span></li>
10327 <p><span data-parsoid='{"stx":"html","autoInsertedEnd":true}'></span></p>
10328 <ul><li>a<span data-parsoid='{"stx":"html","autoInsertedEnd":true}'></span></li>
10332 # Parsoid does some post-dom-building cleanup
10333 # which is why its output differs from Remex.
10335 Unclosed formatting tags that straddle lists are closed and reopened
10337 parsoid=wt2html,wt2wt,html2html
10342 <ol><li><s> a</s></li><s>
10343 </s><li><s>b </s></li></ol>
10345 <ol><li><s> a</s></li>
10346 <li><s>b </s></li></ol>
10349 # Output is ugly because of all the misnested tag fixups.
10351 1. List embedded in a formatting tag
10358 </small></p><small><ul><li>foo</li></ul></small><small></small><p><small></small>
10361 <p><small data-parsoid='{"stx":"html","autoInsertedEnd":true}'></small></p><small data-parsoid='{"stx":"html","autoInsertedEnd":true,"autoInsertedStart":true}'>
10362 <ul><li data-parsoid='{}'>foo</li></ul></small>
10363 <p><small data-parsoid='{"stx":"html","autoInsertedStart":true}'></small></p>
10366 # Output is ugly because of all the misnested tag fixups.
10368 2. List embedded in a formatting tag in a misnested way
10375 </small></p><small></small><ul><small><li>a</li>
10376 </small><li><small>b</small></li></ul>
10378 <p><small data-parsoid='{"stx":"html","autoInsertedEnd":true}'></small></p>
10379 <ul><small data-parsoid='{"stx":"html","autoInsertedEnd":true,"autoInsertedStart":true}'><li>a</li></small>
10380 <li><small data-parsoid='{"stx":"html","autoInsertedStart":true}'>b</small></li></ul>
10383 # Output is ugly because of all the misnested tag fixups.
10385 3. List embedded in a formatting tag in a misnested way
10392 </small></p><small></small><ul><small></small><li><small></small><ul><small></small><li><small>123</small></li></ul></li></ul>
10394 <p><small data-parsoid='{"stx":"html","autoInsertedEnd":true}'></small></p>
10396 <ul><li><ul><li data-parsoid='{}'><small data-parsoid='{"stx":"html","autoInsertedStart":true}'> 123</small></li></ul></li></ul>
10403 # Note that the current date is hard-coded as
10404 # 1970-01-01T00:02:03Z (a Thursday)
10405 # when running parser tests. The timezone is also fixed to GMT, so
10406 # local date will be identical to current date.
10409 Magic Word: {{CURRENTDAY}}
10418 Magic Word: {{CURRENTDAY2}}
10427 Magic Word: {{CURRENTDAYNAME}}
10436 Magic Word: {{CURRENTDOW}}
10445 Magic Word: {{CURRENTMONTH}}
10454 Magic Word: {{CURRENTMONTH1}}
10463 Magic Word: {{CURRENTMONTHABBREV}}
10465 {{CURRENTMONTHABBREV}}
10472 Magic Word: {{CURRENTMONTHNAME}}
10474 {{CURRENTMONTHNAME}}
10481 Magic Word: {{CURRENTMONTHNAMEGEN}}
10483 {{CURRENTMONTHNAMEGEN}}
10490 Magic Word: {{CURRENTTIME}}
10499 Magic Word: {{CURRENTHOUR}}
10508 Magic Word: {{CURRENTWEEK}} (T6594)
10517 Magic Word: {{CURRENTYEAR}}
10526 Magic Word: {{CURRENTTIMESTAMP}}
10528 {{CURRENTTIMESTAMP}}
10535 Magic Words LOCAL (UTC)
10539 *{{LOCALMONTHNAME}}
10540 *{{LOCALMONTHNAMEGEN}}
10541 *{{LOCALMONTHABBREV}}
10550 *{{LOCALTIMESTAMP}}
10565 <li>19700101000203</li></ul>
10570 Magic Word: {{FULLPAGENAME}}
10572 title=[[User:Ævar Arnfjörð Bjarmason]]
10573 parsoid={ "modes": ["wt2html","wt2wt"], "normalizePhp": true }
10577 <p>User:Ævar Arnfjörð Bjarmason
10582 Magic Word: {{FULLPAGENAMEE}}
10584 title=[[User:Ævar Arnfjörð Bjarmason]]
10585 parsoid={ "modes": ["wt2html","wt2wt"], "normalizePhp": true }
10589 <p>User:%C3%86var_Arnfj%C3%B6r%C3%B0_Bjarmason
10594 Magic Word: {{TALKSPACE}}
10596 title=[[User:Ævar Arnfjörð Bjarmason]]
10597 parsoid={ "modes": ["wt2html","wt2wt"], "normalizePhp": true }
10606 Magic Word: {{TALKSPACE}}, same namespace
10608 title=[[User talk:Ævar Arnfjörð Bjarmason]]
10609 parsoid={ "modes": ["wt2html","wt2wt"], "normalizePhp": true }
10618 Magic Word: {{TALKSPACE}}, main namespace
10620 title=[[Parser Test]]
10621 parsoid={ "modes": ["wt2html","wt2wt"], "normalizePhp": true }
10630 Magic Word: {{TALKSPACEE}}
10632 title=[[User:Ævar Arnfjörð Bjarmason]]
10633 parsoid={ "modes": ["wt2html","wt2wt"], "normalizePhp": true }
10642 Magic Word: {{SUBJECTSPACE}}
10644 title=[[User talk:Ævar Arnfjörð Bjarmason]]
10645 parsoid={ "modes": ["wt2html","wt2wt"], "normalizePhp": true }
10654 Magic Word: {{SUBJECTSPACE}}, same namespace
10656 title=[[User:Ævar Arnfjörð Bjarmason]]
10657 parsoid={ "modes": ["wt2html","wt2wt"], "normalizePhp": true }
10666 Magic Word: {{SUBJECTSPACE}}, main namespace
10668 title=[[Parser Test]]
10669 parsoid={ "modes": ["wt2html","wt2wt"], "normalizePhp": true }
10677 Magic Word: {{SUBJECTSPACEE}}
10679 title=[[User talk:Ævar Arnfjörð Bjarmason]]
10680 parsoid={ "modes": ["wt2html","wt2wt"], "normalizePhp": true }
10689 Magic Word: {{NAMESPACE}}
10691 title=[[User:Ævar Arnfjörð Bjarmason]]
10692 parsoid={ "modes": ["wt2html","wt2wt"], "normalizePhp": true }
10701 Magic Word: {{NAMESPACEE}}
10703 title=[[User:Ævar Arnfjörð Bjarmason]]
10704 parsoid={ "modes": ["wt2html","wt2wt"], "normalizePhp": true }
10713 Magic Word: {{NAMESPACENUMBER}}
10715 title=[[User:Ævar Arnfjörð Bjarmason]]
10716 parsoid={ "modes": ["wt2html","wt2wt"], "normalizePhp": true }
10718 {{NAMESPACENUMBER}}
10725 Magic Word: {{SUBPAGENAME}}
10727 title=[[Ævar Arnfjörð Bjarmason/sub ö]] subpage
10728 parsoid={ "modes": ["wt2html","wt2wt"], "normalizePhp": true }
10737 Magic Word: {{SUBPAGENAMEE}}
10739 title=[[Ævar Arnfjörð Bjarmason/sub ö]] subpage
10740 parsoid={ "modes": ["wt2html","wt2wt"], "normalizePhp": true }
10749 Magic Word: {{ROOTPAGENAME}}
10751 title=[[Ævar Arnfjörð Bjarmason/sub/sub2]] subpage
10752 parsoid={ "modes": ["wt2html","wt2wt"], "normalizePhp": true }
10756 <p>Ævar Arnfjörð Bjarmason
10761 Magic Word: {{ROOTPAGENAMEE}}
10763 title=[[Ævar Arnfjörð Bjarmason/sub/sub2]] subpage
10764 parsoid={ "modes": ["wt2html","wt2wt"], "normalizePhp": true }
10768 <p>%C3%86var_Arnfj%C3%B6r%C3%B0_Bjarmason
10773 Magic Word: {{BASEPAGENAME}}
10775 title=[[Ævar Arnfjörð Bjarmason/sub]] subpage
10776 parsoid={ "modes": ["wt2html","wt2wt"], "normalizePhp": true }
10780 <p>Ævar Arnfjörð Bjarmason
10785 Magic Word: {{BASEPAGENAMEE}}
10787 title=[[Ævar Arnfjörð Bjarmason/sub]] subpage
10788 parsoid={ "modes": ["wt2html","wt2wt"], "normalizePhp": true }
10792 <p>%C3%86var_Arnfj%C3%B6r%C3%B0_Bjarmason
10797 Magic Word: {{TALKPAGENAME}}
10799 title=[[User:Ævar Arnfjörð Bjarmason]]
10800 parsoid={ "modes": ["wt2html","wt2wt"], "normalizePhp": true }
10804 <p>User talk:Ævar Arnfjörð Bjarmason
10809 Magic Word: {{TALKPAGENAMEE}}
10811 title=[[User:Ævar Arnfjörð Bjarmason]]
10812 parsoid={ "modes": ["wt2html","wt2wt"], "normalizePhp": true }
10816 <p>User_talk:%C3%86var_Arnfj%C3%B6r%C3%B0_Bjarmason
10821 Magic Word: {{SUBJECTPAGENAME}}
10823 title=[[User talk:Ævar Arnfjörð Bjarmason]]
10824 parsoid={ "modes": ["wt2html","wt2wt"], "normalizePhp": true }
10826 {{SUBJECTPAGENAME}}
10828 <p>User:Ævar Arnfjörð Bjarmason
10833 Magic Word: {{SUBJECTPAGENAMEE}}
10835 title=[[User talk:Ævar Arnfjörð Bjarmason]]
10836 parsoid={ "modes": ["wt2html","wt2wt"], "normalizePhp": true }
10838 {{SUBJECTPAGENAMEE}}
10840 <p>User:%C3%86var_Arnfj%C3%B6r%C3%B0_Bjarmason
10845 Magic Word: {{NUMBEROFFILES}}
10847 parsoid={ "modes": ["wt2html","wt2wt"], "normalizePhp": true }
10856 Magic Word: {{PAGENAME}}
10858 title=[[User:Ævar Arnfjörð Bjarmason]]
10859 parsoid={ "modes": ["wt2html","wt2wt"], "normalizePhp": true }
10863 <p>Ævar Arnfjörð Bjarmason
10868 Magic Word: {{PAGENAME}} with metacharacters
10870 title=[['foo & bar = baz']]
10871 parsoid={ "modes": ["wt2html","wt2wt"], "normalizePhp": true }
10875 <p><i>'foo & bar = baz'</i>
10880 Magic Word: {{PAGENAME}} with metacharacters (T28781)
10882 title=[[*RFC 1234 http://example.com/]]
10883 parsoid={ "modes": ["wt2html","wt2wt"], "normalizePhp": true }
10887 <p>*RFC 1234 http://example.com/
10892 Magic Word: {{PAGENAMEE}}
10894 title=[[User:Ævar Arnfjörð Bjarmason]]
10895 parsoid={ "modes": ["wt2html","wt2wt"], "normalizePhp": true }
10899 <p>%C3%86var_Arnfj%C3%B6r%C3%B0_Bjarmason
10904 Magic Word: {{PAGENAMEE}} with metacharacters (T28781)
10906 title=[[*RFC 1234 http://example.com/]]
10907 parsoid={ "modes": ["wt2html","wt2wt"], "normalizePhp": true }
10911 <p>*RFC_1234_http://example.com/
10916 Magic Word: {{REVISIONID}}
10918 parsoid={ "modes": ["wt2html","wt2wt"], "normalizePhp": true }
10925 flags=vary-revision-id
10929 Magic Word: {{SCRIPTPATH}}
10931 parsoid={ "modes": ["wt2html","wt2wt"], "normalizePhp": true }
10939 Magic Word: {{STYLEPATH}}
10941 parsoid={ "modes": ["wt2html","wt2wt"], "normalizePhp": true }
10950 Magic Word: {{SERVER}}
10952 parsoid={ "modes": ["wt2html","wt2wt"], "normalizePhp": true }
10956 <p><a rel="nofollow" class="external free" href="http://example.org">http://example.org</a>
10961 Magic Word: {{SERVERNAME}}
10963 parsoid={ "modes": ["wt2html","wt2wt"], "normalizePhp": true }
10972 Magic Word: {{SITENAME}}
10974 parsoid={ "modes": ["wt2html","wt2wt"], "normalizePhp": true }
10983 Magic Word: {{PAGELANGUAGE}}
10986 parsoid={ "modes": ["wt2html","wt2wt"], "normalizePhp": true }
10995 Magic Word: {{PAGELANGUAGE}} on a page with no explicitly set language
10997 parsoid={ "modes": ["wt2html","wt2wt"], "normalizePhp": true }
11006 Case-sensitive magic words, when cased differently, should just be template transclusions
11013 <p><a href="/index.php?title=Template:CurrentMonth&action=edit&redlink=1" class="new" title="Template:CurrentMonth (page does not exist)">Template:CurrentMonth</a>
11014 <a href="/index.php?title=Template:Currentday&action=edit&redlink=1" class="new" title="Template:Currentday (page does not exist)">Template:Currentday</a>
11015 <a href="/index.php?title=Template:CURreNTweEK&action=edit&redlink=1" class="new" title="Template:CURreNTweEK (page does not exist)">Template:CURreNTweEK</a>
11016 <a href="/index.php?title=Template:CurrentHour&action=edit&redlink=1" class="new" title="Template:CurrentHour (page does not exist)">Template:CurrentHour</a>
11021 Case-insensitive magic words should still work with weird casing.
11031 <a rel="nofollow" class="external free" href="http://example.org">http://example.org</a>
11035 # From plwiki:PLOS_ONE
11037 Parsoid: Page property magic word with magic word contents
11041 wgAllowDisplayTitle=true
11042 wgRestrictDisplayTitle=false
11044 {{DISPLAYTITLE:''{{PAGENAME}}''}}
11049 <meta property="mw:PageProp/displaytitle" content="Parser test" 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}}]}'>Parser test</span></i>"}]]}'/>
11052 # NOTE: mw:ExpandedAttrs is not the best typeof here. mw:Transclusion is better.
11053 # But, this is a limitation of our representation and is documented in
11054 # TemplateHandler.js in processSpecialMagicWord
11056 Parsoid: Template-generated DISPLAYTITLE
11058 {{{{echo|DISPLAYTITLE}}:Foo}}
11062 wgAllowDisplayTitle=true
11063 wgRestrictDisplayTitle=false
11068 <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"}]]}'/>
11072 Namespace 1 {{ns:1}}
11081 Namespace 1 {{ns:01}}
11090 Namespace 0 {{ns:0}} (T6783)
11098 Namespace 0 {{ns:00}} (T6783)
11106 Namespace -1 {{ns:-1}}
11115 Namespace User {{ns:User}}
11124 Namespace User talk {{ns:User_talk}}
11133 Namespace User talk {{ns:uSeR tAlK}}
11142 Namespace File {{ns:File}}
11151 Namespace File {{ns:Image}}
11160 Namespace (lang=de) Benutzer {{ns:User}}
11171 Namespace (lang=de) Benutzer Diskussion {{ns:3}}
11177 <p>Benutzer Diskussion
11184 {{urlencode:hi world?!}}
11185 {{urlencode:hi world?!|WIKI}}
11186 {{urlencode:hi world?!|PATH}}
11187 {{urlencode:hi world?!|QUERY}}
11197 Magic Word: prioritize type info over data-parsoid
11201 <meta property="mw:PageProp/forcetoc" data-parsoid='{"magicSrc":"__NOTOC__"}'/>
11207 Magic Word: serialize on separate line (parsoid)
11209 parsoid=wt2wt,html2wt
11215 foo<meta property="mw:PageProp/notoc"/>bar
11219 Magic Word: rt non-english wikis
11226 <meta property="mw:PageProp/noeditsection" data-parsoid='{"magicSrc":"__NOEDITSECTION__"}'/>
11230 __proto__ is treated as normal wikitext (T105997)
11242 Magic links: internal link to RFC (T2479)
11246 <p><a href="/index.php?title=RFC_123&action=edit&redlink=1" class="new" title="RFC 123 (page does not exist)">RFC 123</a>
11249 <p><a rel="mw:WikiLink" href="./RFC_123" title="RFC 123">RFC 123</a></p>
11253 Magic links: RFC (T2479)
11257 <p><a class="external mw-magiclink-rfc" rel="nofollow" href="https://tools.ietf.org/html/rfc822">RFC 822</a>
11260 <p><a href="https://tools.ietf.org/html/rfc822" rel="mw:ExtLink" class="external mw-magiclink">RFC 822</a></p>
11264 Magic links: RFC (T67278)
11266 This is RFC 822 but thisRFC 822 is not RFC 822linked.
11268 <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.
11271 <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>
11275 Magic links: RFC (w/ non-newline whitespace, T30950/T31025)
11277 RFC      822
11281 <p><a class="external mw-magiclink-rfc" rel="nofollow" href="https://tools.ietf.org/html/rfc822">RFC 822</a>
11286 <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>
11292 Magic links: ISBN (T3937)
11296 <p><a href="/wiki/Special:BookSources/0306406152" class="internal mw-magiclink-isbn">ISBN 0-306-40615-2</a>
11299 <p><a href="./Special:BookSources/0306406152" rel="mw:WikiLink">ISBN 0-306-40615-2</a></p>
11303 Magic links: ISBN (T67278)
11305 This is ISBN 978-0-316-09811-3 but thisISBN 978-0-316-09811-3 is not ISBN 978-0-316-09811-3linked.
11307 <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.
11310 <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>
11314 Magic links: ISBN (w/ non-newline whitespace, T30950/T31025)
11316 ISBN      978 0 316 09811 3
11322 <p><a href="/wiki/Special:BookSources/9780316098113" class="internal mw-magiclink-isbn">ISBN 978 0 316 09811 3</a>
11329 <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>
11337 Magic links: PMID incorrectly converts space to underscore
11341 <p><a class="external mw-magiclink-pmid" rel="nofollow" href="//www.ncbi.nlm.nih.gov/pubmed/1234?dopt=Abstract">PMID 1234</a>
11344 <p><a href="//www.ncbi.nlm.nih.gov/pubmed/1234?dopt=Abstract" rel="mw:ExtLink" class="external mw-magiclink">PMID 1234</a></p>
11348 Magic links: PMID (T67278)
11350 This is PMID 1234 but thisPMID 1234 is not PMID 1234linked.
11352 <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.
11355 <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>
11359 Magic links: PMID (w/ non-newline whitespace, T30950/T31025)
11361 PMID      1234
11365 <p><a class="external mw-magiclink-pmid" rel="nofollow" href="//www.ncbi.nlm.nih.gov/pubmed/1234?dopt=Abstract">PMID 1234</a>
11370 <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>
11375 # <nowiki> nodes shouldn't be inserted during html2wt by Parsoid,
11376 # since these are ExtLinkText, not MagicLinkText
11378 Magic links: use appropriate serialization for "almost" magic links.
11380 X[[Special:BookSources/0978739256|foo]]
11382 X[https://tools.ietf.org/html/rfc1234 foo]
11384 <p>X<a href="/wiki/Special:BookSources/0978739256" title="Special:BookSources/0978739256">foo</a>
11385 </p><p>X<a rel="nofollow" class="external text" href="https://tools.ietf.org/html/rfc1234">foo</a>
11388 <p>X<a rel="mw:WikiLink" href="./Special:BookSources/0978739256" title="Special:BookSources/0978739256">foo</a></p>
11389 <p>X<a rel="mw:ExtLink" class="external text" href="https://tools.ietf.org/html/rfc1234">foo</a></p>
11393 Magic links: All disabled (T47942)
11395 wgEnableMagicLinks={"ISBN":false, "PMID":false, "RFC":false}
11401 <p>ISBN 0-306-40615-2
11412 Nonexistent template
11414 {{thistemplatedoesnotexist}}
11416 <p><a href="/index.php?title=Template:Thistemplatedoesnotexist&action=edit&redlink=1" class="new" title="Template:Thistemplatedoesnotexist (page does not exist)">Template:Thistemplatedoesnotexist</a>
11421 Template with invalid target containing tags
11423 {{a<b>b</b>|{{echo|foo}}|{{echo|a}}={{echo|b}}|a = b}}
11425 <p>{{a<b>b</b>|foo|a=b|a = b}}
11430 Template with invalid target containing unclosed tag
11432 {{a<b>|{{echo|foo}}|{{echo|a}}={{echo|b}}|a = b}}
11434 <p>{{a<b>|foo|a=b|a = b}}</b>
11439 Template with invalid target containing wikilink
11443 <p>{{<a href="/wiki/Main_Page" title="Main Page">Main Page</a>}}
11446 <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>
11450 Template with just whitespace in it, T70421
11454 <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>
11460 This is a test template
11468 <p>This is a test template
11473 Template with explicit namespace
11477 <p>This is a test template
11485 This is a test template with parameter {{{param}}}
11491 {{paramtest|param=foo}}
11493 <p>This is a test template with parameter foo
11498 Template:paramtestnum
11500 [[{{{1}}}|{{{2}}}]]
11504 Template unnamed parameter
11506 {{paramtestnum|Main Page|the main page}}
11508 <p><a href="/wiki/Main_Page" title="Main Page">the main page</a>
11513 Template:templatesimple
11519 Template:templateredirect
11521 #redirect [[Template:templatesimple]]
11525 Template:templateasargtestnum
11531 Template:templateasargtest
11533 {{template{{{templ}}}}}
11537 Template:templateasargtest2
11543 Template with template name as unnamed argument
11545 {{templateasargtestnum|templatesimple}}
11552 Template with template name as argument
11554 {{templateasargtest|templ=simple}}
11561 Template with template name as argument (2)
11563 {{templateasargtest2|templ=templatesimple}}
11570 Template:templateasargtestdefault
11572 {{{{{templ|templatesimple}}}}}
11582 Template with default value
11584 {{templateasargtestdefault}}
11591 Template with default value (value set)
11593 {{templateasargtestdefault|templ=templa}}
11602 {{templateredirect}}
11607 <link rel="mw:PageProp/redirect" href="./Template:Templatesimple" typeof="mw:Transclusion" data-mw='{"parts":[{"template":{"target":{"wt":"templateredirect","href":"./Template:Templateredirect"},"params":{},"i":0}}]}'/>
11611 Template with argument in separate line
11613 {{ templateasargtest |
11621 Template with complex template as argument
11624 param ={{ templateasargtest |
11625 templ = simple }}}}
11627 <p>This is a test template with parameter (test)
11632 Templates with templated name
11634 {{{{echo|echo}}|foo}}
11635 {{{{echo|inner list}} }}
11639 <ul><li>item 1</li></ul>
11642 <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>
11643 <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>
11646 ## Regression test; the output here isn't really that interesting.
11648 Templates with templated name and top level template args
11650 {{1{{2{{{3}}}|4=5}}}}
11652 <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>
11655 # Parsoid markup is deliberate "broken". This is an edge case.
11656 # See long comment in TemplateHandler.js:convertAttribsToString.
11658 Templates with invalid templated targets
11669 <p typeof="mw:Transclusion" data-mw='{"parts":[{"template":{"target":{"wt":"echo\n{{echo|foo}}\n"},"params":{},"i":0}}]}'>{{echo
11674 Template with thumb image (with link in description)
11676 {{paramtest|param=[[Image:noimage.png|thumb|[[no link|link]] [[no link|caption]]]]}}
11678 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>
11681 <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>
11683 <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>
11687 Template:complextemplate
11689 {{{1}}} {{paramtest|
11690 param ={{{param}}}}}
11694 Template with complex arguments
11697 param ={{ templateasargtest |
11698 templ = simple }}|[[Template:complextemplate|link]]}}
11700 <p><a href="/wiki/Template:Complextemplate" title="Template:Complextemplate">link</a> This is a test template with parameter (test)
11705 T2553: link with two variables in a piped link
11708 |[[{{{1}}}|{{{2}}}]]
11713 <td>[[{{{1}}}|{{{2}}}]]
11718 <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>
11724 Abort table cell attribute parsing on wikilink
11727 |testing [[one|two]] |three||four
11728 |testing one two |three||four
11729 |testing="[[one|two]]" |three||four
11734 <td>testing <a href="/index.php?title=One&action=edit&redlink=1" class="new" title="One (page does not exist)">two</a> |three</td>
11740 <td>testing="<a href="/index.php?title=One&action=edit&redlink=1" class="new" title="One (page does not exist)">two</a>" |three</td>
11746 <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>
11747 <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>
11748 <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>
11753 Don't abort table cell attribute parsing if wikilink is found in template arg
11756 |Test {{#tag:ref|One two "[[three]]" four}}
11760 <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>
11765 Magic variable as template parameter
11767 {{paramtest|param={{SITENAME}}}}
11769 <p>This is a test template with parameter MediaWiki
11776 [[{{{param}}}|link]]
11780 Template parameter as link source
11782 {{linktest|param=Main Page}}
11784 <p><a href="/wiki/Main_Page" title="Main Page">link</a>
11789 Template:paramtest2
11791 including another template, {{paramtest|param={{{arg}}}}}
11795 Template passing argument to another template
11797 {{paramtest2|arg='hmm'}}
11799 <p>including another template, This is a test template with parameter 'hmm'
11810 Template as link source
11814 [[{{linktest2}}|Main Page]]
11816 [[{{linktest2}}]]Page
11818 <p><a href="/wiki/Main_Page" title="Main Page">Main Page</a>
11819 </p><p><a href="/wiki/Main_Page" title="Main Page">Main Page</a>
11820 </p><p><a href="/wiki/Main_Page" title="Main Page">Main Page</a>Page
11838 Template infinite loop
11842 <p><span class="error">Template loop detected: <a href="/wiki/Template:Loop1" title="Template:Loop1">Template:Loop1</a></span>
11847 Template from main namespace
11856 Template from non-includable namespace
11858 wgNonincludableNamespaces=10
11862 <p><a href="/wiki/Template:Echo" title="Template:Echo">Template:Echo</a>
11877 T2529: Template with table, not included at beginning of line
11896 T2523: Template shouldn't eat newline (or add an extra one before table)
11916 T2041: Template parameters shown as broken links
11925 Template with targets containing wikilinks
11931 {{[[{{echo|foo}}]]}}
11933 {{{{echo|[[foo}}]]}}
11935 <p>{{<a href="/wiki/Foo" title="Foo">foo</a>}}
11936 </p><p>{{<a href="/wiki/Foo" title="Foo">foo</a>}}
11940 <p>{{<a rel="mw:WikiLink" href="./Foo" title="Foo">foo</a>}}</p>
11941 <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>
11942 <p>{{<span typeof="mw:Transclusion" data-mw='{"parts":[{"template":{"target":{"wt":"echo","href":"./Template:Echo"},"params":{"1":{"wt":"[[foo}}]]"}},"i":0}}]}'>[[foo}}]]</span></p>
11952 Templates: Double quotes as template target
11959 <p>foo <span about="#mwt1" typeof="mw:Transclusion" data-mw='{"parts":[{"template":{"target":{"wt":"''","href":"./Template:''"},"params":{},"i":0}}]}'>bar</span> baz
11963 ## This test is about making sure Parsoid's data-mw is well formed in the
11964 ## face of multiple templates with intersecting and overlapping ranges. The
11965 ## wikitext itself is wretched.
11967 Templates with intersecting and overlapping ranges
11978 </table><p>ho</p><table>
11982 </td></tr></tbody></table>
11984 <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":""}]]}'>
11986 </table><p about="#mwt1">ho</p><table about="#mwt1" typeof="mw:ExpandedAttrs" data-mw='{"attribs":[[{"txt":"","html":""},{"html":""}]]}'>
11988 <tbody><tr><td>hi</td></tr>
11993 Template:MSGNW test
11995 ''None'' of '''this''' should be
11997 but rather passed unmodified
12005 # hmm, fix this or just deprecate msgnw and document its behavior?
12009 {{msgnw:MSGNW test}}
12011 <p>''None'' of '''this''' should be
12013  but rather passed unmodified
12014 {{test}}
12018 <!-- comment -->
12025 {{int:youhavenewmessages|lots of money|not!}}
12027 <p>You have lots of money (not!).
12032 int keyword - non-existing message
12043 Foo<noinclude>zar</noinclude><includeonly>bar</includeonly>
12047 <includeonly> and <noinclude> being included
12058 <onlyinclude>Foo</onlyinclude>bar
12062 <onlyinclude> being included
12074 <onlyinclude>Foo</onlyinclude>bar<includeonly>zar</includeonly>
12078 <onlyinclude> and <includeonly> being included
12087 <includeonly> and <noinclude> on a page
12089 Foo<noinclude>zar</noinclude><includeonly>bar</includeonly>
12096 Un-closed <noinclude>
12103 <onlyinclude> on a page
12105 <onlyinclude>Foo</onlyinclude>bar
12112 Un-closed <onlyinclude>
12119 Self-closed noinclude, includeonly, onlyinclude tags
12130 Unbalanced includeonly and noinclude tags
12134 |b</noinclude></noinclude>
12135 |c</noinclude></includeonly>
12136 |d</includeonly></includeonly>
12145 <td>c</includeonly>
12147 <td>d</includeonly></includeonly>
12153 Template:Includeonly section
12156 ==Includeonly section==
12162 T8563: Edit link generation for section shown by <includeonly>
12164 {{includeonly section}}
12166 <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>
12167 <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>
12171 # Uses same input as the contents of [[Template:Includeonly section]]
12173 T8563: Section extraction for section shown by <includeonly>
12178 ==Includeonly section==
12186 T8563: Edit link generation for section suppressed by <includeonly>
12189 ==Includeonly section==
12193 <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>
12198 T8563: Section extraction for section suppressed by <includeonly>
12203 ==Includeonly section==
12211 Un-closed <includeonly>
12216 <meta typeof="mw:Includes/IncludeOnly" data-parsoid='{"src":"<includeonly>"}' data-mw='{"src":"<includeonly>"}'/>
12219 ## We used to, but no longer wt2wt this test since the default serializer
12220 ## will normalize the include directives to serialize on their own line.
12221 ## Selser will take care of preserving formatting in scenarios where they
12222 ## intermingled with other wikitext.
12224 Includes and comments at SOL
12226 parsoid=wt2html,html2html
12228 <!-- comment --><noinclude><!-- comment --></noinclude><!-- comment -->==hu==
12236 some</noinclude>* stuff
12239 <includeonly>can have stuff</includeonly>===here===
12242 <h2><span class="mw-headline" id="hu">hu</span></h2>
12250 <ul><li>here</li></ul>
12251 <h3><span class="mw-headline" id="here">here</span></h3>
12254 <!-- 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>
12256 <meta typeof="mw:Includes/NoInclude" data-parsoid='{"src":"<noinclude>"}'/>
12258 <meta typeof="mw:Includes/NoInclude/End" data-parsoid='{"src":"</noinclude>"}'/><ul><li>stuff</li>
12261 <meta typeof="mw:Includes/NoInclude" data-parsoid='{"src":"<noinclude>"}'/>
12262 <p>some<meta typeof="mw:Includes/NoInclude/End" data-parsoid='{"src":"</noinclude>"}'/>* stuff</p>
12263 <ul><li>here</li></ul>
12265 <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>
12269 # TODO: test with DOM fragment reuse!
12271 Parsoid: DOM fragment reuse
12273 parsoid=wt2wt,wt2html
12275 a{{echo|b<table></table>c}}d
12287 <p>ab</p><table></table><p>cd
12298 <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>
12300 <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">
12301 </span><table about="#mwt2" data-parsoid='{"stx":"html"}'></table><span about="#mwt2">
12302 </span><p about="#mwt2">cd</p>
12304 <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">
12306 </span><table about="#mwt3" data-parsoid='{"stx":"html"}'></table><span about="#mwt3">
12308 </span><p about="#mwt3">b</p>
12312 Parsoid: Merge double tds (T52603)
12315 |{{echo|{{!}} foo}}
12321 </td></tr></tbody></table>
12324 <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>
12329 Parsoid: Merge double tds in nested transclusion content (T52603)
12333 |{{echo|{{!}} foo}}
12341 </td></tr></tbody></table>
12344 <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}}]}'>
12346 <tr><td data-mw='{"parts":["|"]}'> foo</td></tr>
12352 ### <includeonly> and <noinclude> in attributes
12355 0. includeonly around the entire attribute
12357 <span <includeonly>id="v1"</includeonly><noinclude>id="v2"</noinclude>>bar</span>
12359 <p><span id="v2">bar</span>
12364 1. includeonly in html attr key
12366 <span <noinclude>id</noinclude><includeonly>about</includeonly>="foo">bar</span>
12368 <p><span id="foo">bar</span>
12373 2. includeonly in html attr value
12375 <span id="<noinclude>v1</noinclude><includeonly>v2</includeonly>">bar</span>
12376 <span id=<noinclude>"v1"</noinclude><includeonly>"v2"</includeonly>>bar</span>
12378 <p><span id="v1">bar</span>
12379 <span id="v1">bar</span>
12384 3. includeonly in part of an attr value
12386 <span style="color:<noinclude>red</noinclude><includeonly>blue</includeonly>;">bar</span>
12388 <p><span style="color:red;">bar</span>
12393 4. includeonly in table attributes
12417 ### Preprocessor precedence tests
12418 ### See: https://www.mediawiki.org/wiki/Preprocessor_ABNF
12420 ##{{[[-{{{{{{[[Foo|bar}}]]}-}}}}}]]
12422 Preprocessor precedence 1: link is rightmost opening
12428 But close-brace is not a valid character in a link title:
12431 However, we can still tell this was handled as a link in the preprocessor:
12432 {{echo|[[Foo}}|bar]]|bat}}
12434 <p>{{<a href="/wiki/Foo" title="Foo">bar}}</a>
12435 </p><p>But close-brace is not a valid character in a link title:
12437 </p><p>However, we can still tell this was handled as a link in the preprocessor:
12441 <p>{{<a rel="mw:WikiLink" href="./Foo" title="Foo">bar}}</a></p>
12442 <p>But close-brace is not a valid character in a link title: {{[[Foo}}|bar]]</p>
12443 <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>
12447 Preprocessor precedence 2: template is rightmost opening
12456 <p>-<span typeof="mw:Transclusion" data-mw='{"parts":[{"template":{"target":{"wt":"echo","href":"./Template:Echo"},"params":{"1":{"wt":"foo}-"}},"i":0}}]}'>foo}-</span>-</p>
12460 Preprocessor precedence 3: language converter is rightmost opening
12476 <p typeof="mw:Transclusion" data-mw='{"parts":[{"template":{"target":{"wt":"echo","href":"./Template:Echo"},"params":{"1":{"wt":"hi"}},"i":0}}]}'>hi</p>
12477 <p>{{<span typeof="mw:LanguageVariant" data-mw-variant='{"disabled":{"t":"echo|hi}}"}}'></span></p>
12478 <p>[[<span typeof="mw:LanguageVariant" data-mw-variant='{"disabled":{"t":"raw]]"}}'></span></p>
12482 Preprocessor precedence 4: left-most angle bracket
12493 Template:Precedence5
12499 Preprocessor precedence 5: tplarg takes precedence over template
12501 {{Precedence5|Bullet}}
12503 <ul><li>Bar</li></ul>
12506 <ul typeof="mw:Transclusion" data-mw='{"parts":[{"template":{"target":{"wt":"Precedence5","href":"./Template:Precedence5"},"params":{"1":{"wt":"Bullet"}},"i":0}}]}'><li>Bar</li></ul>
12510 Preprocessor precedence 6: broken link is rightmost opening
12516 {{echo|[[Foo|bar|bat=baz}}
12519 </p><p>{{echo|[[Foo|bar|bat=baz}}
12522 <p>{{echo|[[Foo}}</p>
12523 <p>{{echo|[[Foo|bar|bat=baz}}</p>
12526 # This next test exposes a difference between PHP and Parsoid:
12527 # Given [[Foo|{{echo|Bar]]x}}y]]z:
12528 # 1) Both PHP and Parsoid ignore the `]]` inside the `echo` in the
12529 # "preprocessor" stage. The `{{echo` extends until the `x}}`, and the
12530 # outer `[[Foo` extends until the `y]]`
12531 # 2a) But then the PHP preprocessor emits `[[Foo|Bar]]xy]]z` as an
12532 # intermediate result (after template expansion), and link processing
12533 # happens on this intermediate result, which moves the wikilink
12534 # boundary leftward to `[[Foo|Bar]]`
12535 # 2b) Parsoid works in a single step, so it's going to keep the
12536 # wikilink as extending to the `y]]`
12537 # 3a) Then PHP does linktrail processing which slurps up the trailing
12538 # `xy` inside the link.
12539 # 3b) Parsoid will do linktrail processing to slurp up the trailing
12540 # `z` inside the link.
12541 # This is "correct" behavior. Parsoid's basic worldview is that the
12542 # `]]` inside the template shouldn't be allowed to leak out to affect
12543 # the surrounding wikilink. PHP may match Parsoid (in the future)
12544 # if you use {{#balance}} (T114445).
12547 Preprocessor precedence 7: broken template is rightmost opening
12553 [[Foo|{{echo|Bar]]-x}}-y]]-z
12555 Careful: linktrails can move the end of the wikilink:
12556 [[Foo|{{echo|y']]a}}l]]l
12558 <p><a href="/wiki/Foo" title="Foo">{{echo|Bar</a>
12559 </p><p><a href="/wiki/Foo" title="Foo">Bar</a>-x-y]]-z
12560 </p><p>Careful: linktrails can move the end of the wikilink:
12561 <a href="/wiki/Foo" title="Foo">y'al</a>]]l
12564 <p>[[Foo|{{echo|Bar]]</p>
12565 <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>
12566 <p>Careful: linktrails can move the end of the wikilink:
12567 <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>
12571 Preprocessor precedence 8: broken language converter is rightmost opening
12582 Template:Preprocessor_precedence_9
12587 ;7: {{{{{{{4}}}}}}}
12591 Preprocessor precedence 9: groups of braces
12593 {{Preprocessor precedence 9|Four|Bullet|1|2}}
12599 <ul><li>Bar</li></ul>
12603 <dd>{Bullet}</dd></dl>
12606 <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}}]}'>
12611 </dl><ul about="#mwt1">
12613 </ul><span about="#mwt1"> </span><dl about="#mwt1">
12622 Template:Preprocessor_precedence_10
12629 ;6: -{{{{{{4}}}}}}-
12630 ;7: -{{{{{{{5}}}}}}}-
12634 Preprocessor precedence 10: groups of braces with leading dash
12638 {{Preprocessor precedence 10|Three|raw2|Bullet|1|2}}
12644 <ul><li>Bar-</li></ul>
12651 <ul><li>Bar-</li></ul>
12658 <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}}]}'>
12660 <dd><span typeof="mw:LanguageVariant" data-mw-variant='{"disabled":{"t":"raw"}}'></span></dd>
12663 </dl><ul about="#mwt1">
12665 </ul><span about="#mwt1"> </span><dl about="#mwt1">
12669 <dd><span typeof="mw:LanguageVariant" data-mw-variant='{"disabled":{"t":"raw2"}}'></span></dd>
12672 </dl><ul about="#mwt1">
12674 </ul><span about="#mwt1"> </span><dl about="#mwt1">
12678 <dd><span typeof="mw:LanguageVariant" data-mw-variant='{"disabled":{"t":"raw2"}}'></span></dd>
12683 Preprocessor precedence 11: found during visual diff testing
12685 {{#tag:span|-{{#tag:span|-{{echo|x}}}}}}
12687 {{echo|-{{echo|-{{echo|x}}}}}}
12689 {{echo|-{{echo|x}}}}
12691 <p><span>-<span>-x</span></span>
12696 <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>
12698 <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>
12700 <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>
12704 Preprocessor precedence 12: broken language converter closed by brace.
12708 This form breaks the template, which is unfortunate:
12709 *{{echo|foo-{bar}bat}}
12711 But if the broken language converter markup is inside an extension
12712 tag, nothing bad happens:
12713 *<nowiki>foo-{bar}bat</nowiki>
12714 *{{echo|<nowiki>foo-{bar}bat</nowiki>}}
12715 *<pre>foo-{bar}bat</pre>
12716 *{{echo|<pre>foo-{bar}bat</pre>}}
12718 <tag>foo-{bar}bat</tag>
12719 {{echo|<tag>foo-{bar}bat</tag>}}
12722 <p>This form breaks the template, which is unfortunate:
12724 <ul><li>{{echo|foo-{bar}bat}}</li></ul>
12725 <p>But if the broken language converter markup is inside an extension
12726 tag, nothing bad happens:
12728 <ul><li>foo-{bar}bat</li>
12729 <li>foo-{bar}bat</li>
12730 <li><pre>foo-{bar}bat</pre></li>
12731 <li><pre>foo-{bar}bat</pre></li></ul>
12732 <pre>'foo-{bar}bat'
12736 <pre>'foo-{bar}bat'
12741 <p>This form breaks the template, which is unfortunate:</p>
12743 <li>{{echo|foo-{bar}bat}}</li>
12745 <p>But if the broken language converter markup is inside an extension tag, nothing bad happens:</p>
12747 <li><span typeof="mw:Nowiki">foo-{bar}bat</span></li>
12748 <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>
12749 <li><pre typeof="mw:Extension/pre" data-mw='{"name":"pre","attrs":{},"body":{"extsrc":"foo-{bar}bat"}}'>foo-{bar}bat</pre></li>
12750 <li><pre typeof="mw:Extension/pre mw:Transclusion" 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>
12752 <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>
12756 Preprocessor precedence 13: broken language converter in external link
12760 *[http://example.com/-{foo Example in URL]
12761 *[http://example.com Example in -{link} description]
12762 *{{echo|[http://example.com/-{foo Breaks template, however]}}
12764 <ul><li><a rel="nofollow" class="external text" href="http://example.com/-{foo">Example in URL</a></li>
12765 <li><a rel="nofollow" class="external text" href="http://example.com">Example in -{link} description</a></li>
12766 <li>{{echo|<a rel="nofollow" class="external text" href="http://example.com/-{foo">Breaks template, however</a>}}</li></ul>
12769 <li><a rel="mw:ExtLink" class="external text" href="http://example.com/-{foo">Example in URL</a></li>
12770 <li><a rel="mw:ExtLink" class="external text" href="http://example.com">Example in -{link} description</a></li>
12771 <li>{{echo|<a rel="mw:ExtLink" class="external text" href="http://example.com/-{foo">Breaks template, however</a>}}</li>
12776 Preprocessor precedence 14: broken language converter in comment
12778 *<!--{{foo}}-->...should be ok
12779 *<!---{{foo}}-->...extra dashes
12780 *{{echo|foo<!-- -{bar} -->bat}}...should be ok
12782 <ul><li>...should be ok</li>
12783 <li>...extra dashes</li>
12784 <li>foobat...should be ok</li></ul>
12787 <li><!--{{foo}}-->...should be ok</li>
12788 <li><!---{{foo}}-->...extra dashes</li>
12789 <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>
12794 Preprocessor precedence 15: broken brace markup in headings
12796 wgFragmentMode=[ 'html5', 'legacy' ]
12800 __NOTOC__ __NOEDITSECTION__
12809 ===5 foo{{{bar 5===
12814 <h3><span id="1_foo.5Bbar_1"></span><span class="mw-headline" id="1_foo[bar_1">1 foo[bar 1</span></h3>
12817 <h3><span id="2_foo.5B.5Bbar_2"></span><span class="mw-headline" id="2_foo[[bar_2">2 foo[[bar 2</span></h3>
12820 <h3><span id="3_foo.7Bbar_3"></span><span class="mw-headline" id="3_foo{bar_3">3 foo{bar 3</span></h3>
12823 <h3><span id="4_foo.7B.7Bbar_4"></span><span class="mw-headline" id="4_foo{{bar_4">4 foo{{bar 4</span></h3>
12826 <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>
12829 <h3><span id="6_foo-.7Bbar_6"></span><span class="mw-headline" id="6_foo-{bar_6">6 foo-{bar 6</span></h3>
12833 <meta property="mw:PageProp/notoc"/> <meta property="mw:PageProp/noeditsection"/>
12834 <h3 id="1_foo[bar_1"><span id="1_foo.5Bbar_1" typeof="mw:FallbackId"></span>1 foo[bar 1</h3>
12836 <h3 id="2_foo[[bar_2"><span id="2_foo.5B.5Bbar_2" typeof="mw:FallbackId"></span>2 foo[[bar 2</h3>
12838 <h3 id="3_foo{bar_3"><span id="3_foo.7Bbar_3" typeof="mw:FallbackId"></span>3 foo{bar 3</h3>
12840 <h3 id="4_foo{{bar_4"><span id="4_foo.7B.7Bbar_4" typeof="mw:FallbackId"></span>4 foo{{bar 4</h3>
12842 <h3 id="5_foo{{{bar_5"><span id="5_foo.7B.7B.7Bbar_5" typeof="mw:FallbackId"></span>5 foo{{{bar 5</h3>
12844 <h3 id="6_foo-{bar_6"><span id="6_foo-.7Bbar_6" typeof="mw:FallbackId"></span>6 foo-{bar 6</h3>
12849 Preprocessor precedence 16: matching closing braces to opening braces
12854 -{{{echo|foo}}bar}-
12859 <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>
12863 Preprocessor precedence 17: template w/o target shouldn't prevent closing
12872 <p about="#mwt1" typeof="mw:Transclusion" data-mw='{"parts":[{"template":{"target":{"wt":"echo","href":"./Template:Echo"},"params":{"1":{"wt":"hi {{}}"}},"i":0}}]}'>hi {{}}</p>
12875 # Ensure we're using a language without variants for this test; even
12876 # if $wgUsePigLatinVariant is true. We've picked `de` arbitrarily.
12878 Preprocessor precedence 18: another rightmost wins scenario
12883 {{ -{{{{1|tplarg}}} }} }-
12885 <p>{{ -{tplarg }} }-
12888 <p>{{ -{<span about="#mwt1" typeof="mw:Param" data-mw='{"parts":[{"templatearg":{"target":{"wt":"1"},"params":{"1":{"wt":"tplarg"}},"i":0}}]}'>tplarg</span> }} }-</p>
12892 Preprocessor precedence 19: break syntax
12905 ### Token Stream Patcher tests
12907 ### These tests won't always pass wt2wt and other modes because
12908 ### on serialization, the table will be output on a new line.
12909 ### For now, we are blacklisting them, and using this to test selser.
12913 1. Table tag in SOL posn. should get reparsed correctly with valid TSR
12915 parsoid=wt2html,wt2wt
12917 {{echo|}}{| width = '100%'
12921 <span typeof="mw:Transclusion" data-mw='{"parts":[{"template":{"target":{"wt":"echo","href":"./Template:Echo"},"params":{"1":{"wt":""}},"i":0}}]}'></span><table width="100%">
12922 <tbody><tr><td>foo</td></tr>
12926 ## We used to, but no longer wt2wt this test since the default serializer
12927 ## will normalize the include directives to serialize on their own line.
12928 ## Selser will take care of preserving formatting in scenarios where they
12929 ## intermingled with other wikitext.
12931 2. Table tag in SOL posn. should get reparsed correctly with valid TSR
12935 <includeonly>a</includeonly>{| {{{b}}}
12939 <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":""}]]}'>
12940 <tbody><tr><td>c</td></tr>
12945 Table wikitext syntax outside wiki-tables
12949 ! not a table heading
12952 | class="foo bar" | baz
12960 ! not a table heading
12963 | class="foo bar" | baz
12972 ### Testing parsing of templates where a template arg
12973 ### has the same name as the template itself.
12979 {{{quote|{{{1}}}}}}
12983 Templates: Template Name/Arg clash: 1. Use of positional param
12992 Templates: Template Name/Arg clash: 2. Use of named param
12994 {{quote|quote=foo}}
13001 Templates: Template Name/Arg clash: 3. Use of named param with empty input
13010 ### Parsoid-centric tests to stress Parsoid's ability to RT them unchanged
13014 Templates: 1. Simple use
13023 Templates: 2. Inside a block tag
13025 <div>{{echo|Foo}}</div>
13026 <blockquote>{{echo|Foo}}</blockquote>
13029 <blockquote>Foo</blockquote>
13033 <blockquote><p>Foo</p></blockquote>
13037 Templates: P-wrapping: 1a. Templates on consecutive lines
13048 Templates: P-wrapping: 1b. Templates on consecutive lines
13062 Templates: P-wrapping: 1c. Templates on consecutive lines
13065 {{echo|bar}} <div>baz</div>
13074 bar </p><div>baz</div>
13078 Templates: P-wrapping: 1d. Template preceded by comment-only line
13088 <p about="#mwt223" typeof="mw:Transclusion" data-mw='{"parts":[{"template":{"target":{"wt":"echo","href":"./Template:Echo"},"params":{"1":{"wt":"Bar"}},"i":0}}]}'>Bar</p>
13092 Templates: Scopes should not be expanded unnecessarily
13094 parsoid=wt2html,wt2wt
13096 {{echo|<div>a</div>}}b{{echo|
13102 <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}}]}'>
13103 </span><div about="#mwt2">c</div>
13107 Templates: Inline Text: 1. Multiple template uses
13109 {{echo|Foo}}bar{{echo|baz}}
13116 Templates: Inline Text: 2. Back-to-back template uses
13118 {{echo|Foo}}{{echo|bar}}
13125 Templates: Block Tags: 1. Multiple template uses
13127 {{echo|<div>Foo</div>}}<div>bar</div>{{echo|<div>baz</div>}}
13129 <div>Foo</div><div>bar</div><div>baz</div>
13134 Templates: Block Tags: 2. Back-to-back template uses
13136 {{echo|<div>Foo</div>}}{{echo|<div>bar</div>}}
13138 <div>Foo</div><div>bar</div>
13142 ## Parsoid drops empty elements in templates.
13144 Templates: Correctly encapsulate templates producing </p> tag without a corresponding <p> tag
13151 b</p><p class="mw-empty-elt"></p>
13153 <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">
13154 </span><p about="#mwt1">b</p>
13158 Templates: Links: 1. Simple example
13160 {{echo|[[Foo|bar]]}}
13162 <p><a href="/wiki/Foo" title="Foo">bar</a>
13167 Templates: Links: 2. Generation of link href
13169 [[{{echo|Foo}}|bar]]
13171 <p><a href="/wiki/Foo" title="Foo">bar</a>
13176 Templates: Links: 3. Generation of part of a link href
13178 [[Fo{{echo|o}}|bar]]
13180 [[Foo{{echo|bar}}]]
13182 [[Foo{{echo|bar}}baz]]
13184 [[Foo{{echo|bar}}|bar]]
13186 [[:Foo{{echo|bar}}]]
13188 [[:Foo{{echo|bar}}|bar]]
13190 <p><a href="/wiki/Foo" title="Foo">bar</a>
13191 </p><p><a href="/index.php?title=Foobar&action=edit&redlink=1" class="new" title="Foobar (page does not exist)">Foobar</a>
13192 </p><p><a href="/index.php?title=Foobarbaz&action=edit&redlink=1" class="new" title="Foobarbaz (page does not exist)">Foobarbaz</a>
13193 </p><p><a href="/index.php?title=Foobar&action=edit&redlink=1" class="new" title="Foobar (page does not exist)">bar</a>
13194 </p><p><a href="/index.php?title=Foobar&action=edit&redlink=1" class="new" title="Foobar (page does not exist)">Foobar</a>
13195 </p><p><a href="/index.php?title=Foobar&action=edit&redlink=1" class="new" title="Foobar (page does not exist)">bar</a>
13200 Templates: Links: 4. Multiple templates generating link href
13202 [[{{echo|F}}{{echo|o}}ob{{echo|ar}}]]
13204 <p><a href="/index.php?title=Foobar&action=edit&redlink=1" class="new" title="Foobar (page does not exist)">Foobar</a>
13209 Templates: Links: 5. Generation of link text
13211 [[Foo|{{echo|bar}}]]
13213 <p><a href="/wiki/Foo" title="Foo">bar</a>
13218 Templates: Links: 5. Nested templates (only outermost template should be marked)
13220 {{echo|[[{{echo|Foo}}|bar]]}}
13222 <p><a href="/wiki/Foo" title="Foo">bar</a>
13227 Templates: HTML Tag: 1. Generation of HTML attr. key
13229 <div {{echo|style}}="color:red;">foo</div>
13231 <div style="color:red;">foo</div>
13236 Templates: HTML Tag: 2. Generation of HTML attr. value
13238 <div style={{echo|'color:red;'}}>foo</div>
13240 <div style="color:red;">foo</div>
13245 Templates: HTML Tag: 3. Generation of HTML attr key and value
13247 <div {{echo|style}}={{echo|'color:red;'}}>foo</div>
13249 <div style="color:red;">foo</div>
13254 Templates: HTML Tag: 4. Generation of starting piece of HTML attr value
13256 <div title="{{echo|This is a long title}} with just one piece templated">foo</div>
13258 <div title="This is a long title with just one piece templated">foo</div>
13263 Templates: HTML Tag: 5. Generation of middle piece of HTML attr value
13265 <div title="This is a long title with just {{echo|one piece}} templated">foo</div>
13267 <div title="This is a long title with just one piece templated">foo</div>
13272 Templates: HTML Tag: 6. Generation of end piece of HTML attr value
13274 <div title="This is a long title with just one piece {{echo|templated}}">foo</div>
13276 <div title="This is a long title with just one piece templated">foo</div>
13280 # SSS FIXME: While it is great we added support for all this,
13281 # do we want to make this part of the spec? Maybe we want to
13282 # deprecate this kind of usage in the future?
13284 Templates: HTML Tag: 7. Generation of partial attribute key string
13286 <div st{{echo|yle}}="color:red;">foo</div>
13288 <div style="color:red;">foo</div>
13293 Templates: HTML Tag: 8. Template-generated attribute (k=v)
13295 <div {{echo|1=id="v1"}}>bar</div>
13297 <div id="v1">bar</div>
13302 Templates: HTML Tag: 9. Multiple template-generated attributes
13304 <div {{echo|1=id="v1" title="foo"}}>bar</div>
13306 <div id="v1" title="foo">bar</div>
13311 Templates: Support for templates generating attributes and content
13313 {| {{mixed_attr_content_template}}
13318 <table style="color:red;" title="T48811">
13328 <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|}"]}'>
13337 Template:attribute_from_template
13343 Table cell with attribute before expanded attribute
13346 | align="center" {{attribute_from_template}} |456
13350 <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>
13355 1. Entities and nowikis inside templated attributes should be handled correctly
13357 <div {{echo|style{{=}}"background:#f9f9f9;"}}>foo</div>
13359 <div style="background:#f9f9f9;">foo</div>
13362 <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>
13366 2. Entities and nowikis inside templated attributes should be handled correctly
13369 |{{table_attribs_3}}
13374 <td style="background:#f9f9f9;">Foo
13379 <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>
13384 3. Entities and nowikis inside templated attributes should be handled correctly inside templated tables
13387 |{{table_attribs_3}}
13392 <td style="background:#f9f9f9;">Foo
13396 <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}}]}'>
13397 <tbody><tr><td style="background:#f9f9f9;">Foo</td></tr>
13403 4. Entities and nowikis inside templated attributes should be handled correctly inside templated tables
13406 |{{table_attribs_6}} hi
13411 <td style="background: red;">hi
13416 <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>
13421 Templates: HTML Tables: 1. Generating start of a HTML table
13423 {{echo|<table><tr><td>foo</td>}}</tr></table>
13425 <table><tr><td>foo</td></tr></table>
13430 Templates: HTML Tables: 2a. Generating middle of a HTML table
13432 <table><tr>{{echo|<td>foo</td>}}</tr></table>
13434 <table><tr><td>foo</td></tr></table>
13439 Templates: HTML Tables: 2b. Generating middle of a HTML table
13441 <table>{{echo|<tr><td>foo</td></tr>}}</table>
13443 <table><tr><td>foo</td></tr></table>
13448 Templates: HTML Tables: 3. Generating end of a HTML table
13450 <table><tr>{{echo|<td>foo</td></tr></table>}}
13452 <table><tr><td>foo</td></tr></table>
13457 Templates: HTML Tables: 4a. Generating a single tag of a HTML table
13459 {{echo|<table>}}<tr><td>foo</td></tr></table>
13461 <table><tr><td>foo</td></tr></table>
13466 Templates: HTML Tables: 4b. Generating a single tag of a HTML table
13468 <table>{{echo|<tr>}}<td>foo</td></tr></table>
13470 <table><tr><td>foo</td></tr></table>
13475 Templates: HTML Tables: 4c. Generating a single tag of a HTML table
13477 <table><tr>{{echo|<td>}}foo</td></tr></table>
13479 <table><tr><td>foo</td></tr></table>
13484 Templates: HTML Tables: 4d. Generating a single tag of a HTML table
13486 <table><tr><td>foo{{echo|</td>}}</tr></table>
13488 <table><tr><td>foo</td></tr></table>
13493 Templates: HTML Tables: 4e. Generating a single tag of a HTML table
13495 <table><tr><td>foo</td>{{echo|</tr>}}</table>
13497 <table><tr><td>foo</td></tr></table>
13502 Templates: HTML Tables: 4f. Generating a single tag of a HTML table
13504 <table><tr><td>foo</td></tr>{{echo|</table>}}
13506 <table><tr><td>foo</td></tr></table>
13511 Templates: HTML Tables: 5. Proper fostering of categories from inside
13513 parsoid=wt2html,wt2wt
13515 <table>[[Category:foo1]]<tr><td>foo</td></tr></table>
13516 <!--Two categories (T52330)-->
13517 <table>[[Category:bar1]][[Category:bar2]]<tr><td>foo</td></tr></table>
13519 <table><tbody><tr><td>foo</td></tr></tbody></table>
13520 <table><tbody><tr><td>foo</td></tr></tbody></table>
13522 <link rel="mw:PageProp/Category" href="./Category:Foo1"><table><tbody><tr><td>foo</td></tr></tbody></table>
13523 <!--Two categories (T52330)-->
13524 <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>
13527 ## Remex doesn't account for fostered content.
13529 Templates: Wiki Tables: 1a. Fostering of entire template content
13537 <tr><td></td></tr></table>
13542 <table><tbody><tr><td></td></tr></tbody></table>
13544 <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">
13550 Templates: Wiki Tables: 1b. Fostering of entire template content
13563 <tr><td></td></tr></table>
13571 <tbody><tr><td></td></tr></tbody></table>
13573 <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|}"]}'>
13575 </div><table about="#mwt3">
13580 ## Remex doesn't account for fostered content.
13582 Templates: Wiki Tables: 2. Fostering of partial template content
13592 <tr><td></td></tr></table>
13597 <div>b</div><table>
13598 <tbody><tr><td></td></tr></tbody></table>
13600 <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">
13607 Templates: Wiki Tables: 3. td-content via multiple templates
13610 {{echo|{{pipe}}a}}{{echo|b}}
13621 Templates: Wiki Tables: 4. Templated tags, no content
13627 <tr><td></td></tr></table>
13632 Templates: Wiki Tables: 5. Templated tags, regular td-tags
13646 Templates: Wiki Tables: 6. Templated tags, templated td-tags
13659 ## This test case is very specific to Parsoid's internals
13660 ## and is hence only tested for Parsoid's code. Parsoid uses
13661 ## a <meta> marker tag for <ref> tags and they are expanded
13662 ## much later. We are verifying that this <meta> tag usage
13663 ## doesn't prevent foster parenting.
13665 Templates: Wiki Tables: 7. Fosterable <ref>s should get fostered
13667 {{PartialTable}}<ref>foo</ref>
13672 <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="./Parser_test#cite_note-1" style="counter-reset: mw-Ref 1;"><span class="mw-reflink-text">[1]</span></a></sup></p><table about="#mwt2">
13676 <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="./Parser_test#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>
13680 Templates: Wiki Tables: 8. Fosterable meta-tags should get fostered
13690 <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{{!}}}"]}'>
13691 </span><meta typeof="mw:Includes/OnlyInclude" about="#mwt1"/><table about="#mwt1">
13695 <meta typeof="mw:Includes/OnlyInclude/End"/></td></tr>
13700 Templates: Lists: Multi-line list-items via templates
13702 *{{echo|a {{nonexistent|
13704 *{{echo|b {{nonexistent|
13707 <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>
13708 <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>
13713 Templates: Ugly nesting: 1. Quotes opened/closed across templates (echo)
13715 {{echo|''a}}{{echo|b''c''d}}{{echo|''e}}
13717 <p><i>ab</i>c<i>d</i>e
13722 Templates: Ugly nesting: 2. Quotes opened/closed across templates (echo_with_span)
13723 (PHP parser generates misnested html)
13725 {{echo_with_span|''a}}{{echo_with_span|b''c''d}}{{echo_with_span|''e}}
13727 <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>
13731 Templates: Ugly nesting: 3. Quotes opened/closed across templates (echo_with_div)
13732 (PHP parser generates misnested html; Parsoid html2wt mode adds newlines between {{echo}}s)
13734 parsoid=wt2html,wt2wt
13736 {{echo_with_div|''a}}{{echo_with_div|b''c''d}}{{echo_with_div|''e}}
13738 <div><i>a</i></div><div><i>b</i>c<i>d</i></div><div>e</div>
13740 <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>
13741 <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>
13742 <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>
13746 Templates: Ugly nesting: 4. Divs opened/closed across templates
13748 a<div>b{{echo|c</div>d}}e
13753 <p>a</p><div>bc</div><p>de
13758 Templates: Ugly templates: 3. newline-only template parameter
13767 # This looks like a bug: a single newline triggers p/br for some reason.
13769 Templates: Ugly templates: 4. newline-only template parameter inconsistency
13778 # T66017 -- ugly wikitext with fostered content generates two template ranges that
13779 # have a true overlap (T1-start - T2-start - T1-end - T2-end).
13781 Templates: Ugly templates: 5. Template encapsulation test: Non-trivial overlap of template ranges is properly handled
13787 <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">
13788 </span><table about="#mwt1">
13792 # T66017 -- ugly wikitext with fostered content generates two template ranges
13793 # that are "identical" and generate nesting cycles in the algorithm
13795 Templates: Ugly templates: 6. Template encapsulation test: Cyclical nesting of template ranges is properly handled
13797 {{echo|<table><tr><td><table>}}
13801 <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"}'>
13802 </div><table about="#mwt1" data-parsoid='{"stx":"html"}'>
13803 </table></td></tr></tbody></table>
13807 Templates: Parameters substituted at the top-level
13809 {{{foo|''who'' {{echo|me}}? '''never!'''}}}
13813 <p><i>who</i> me? <b>never!</b>
13817 <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>
13819 <p about="#mwt3" typeof="mw:Param" data-mw='{"parts":[{"templatearg":{"target":{"wt":"foo"},"params":{"1":{"wt":"bar"},"2":{"wt":"baz"}},"i":0}}]}'>bar</p>
13823 Templates: Param with empty arg in the final position
13827 <span about="#mwt1" typeof="mw:Param" data-mw='{"parts":[{"templatearg":{"target":{"wt":"hi"},"params":{"1":{"wt":""}},"i":0}}]}'></span>
13831 Parser Functions: 1. Simple example
13840 Parser Functions: 2. Nested use (only outermost should be marked up)
13848 ## Note that the templates inside the references are not wrapped
13850 Template nested in extension tag in template
13852 title=[[Main Page]]
13855 {{echo|hi<ref>[[ho|{{echo|hi}}]]</ref>}}
13856 {{echo|hi<ref>[http://test.com?q={{echo|ho}}]</ref>}}
13857 {{echo|hi<ref>-{ho|{{echo|hi}}}-</ref>}}
13860 <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="./Main_Page#cite_note-1" style="counter-reset: mw-Ref 1;"><span class="mw-reflink-text">[1]</span></a></sup>
13861 <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="./Main_Page#cite_note-2" style="counter-reset: mw-Ref 2;"><span class="mw-reflink-text">[2]</span></a></sup>
13862 <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="./Main_Page#cite_note-3" style="counter-reset: mw-Ref 3;"><span class="mw-reflink-text">[3]</span></a></sup></p>
13863 <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="./Main_Page#cite_ref-1" rel="mw:referencedBy"><span class="mw-linkback-text">↑ </span></a> <span id="mw-reference-text-cite_note-1" class="mw-reference-text"><a rel="mw:WikiLink" href="./Ho" title="Ho">hi</a></span></li><li about="#cite_note-2" id="cite_note-2"><a href="./Main_Page#cite_ref-2" rel="mw:referencedBy"><span class="mw-linkback-text">↑ </span></a> <span id="mw-reference-text-cite_note-2" class="mw-reference-text"><a 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="./Main_Page#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>
13867 ### Pre-save transform tests
13871 pre-save transform: subst:
13877 This is a test template
13881 pre-save transform: normal template
13891 pre-save transform: nonexistent template
13895 {{thistemplatedoesnotexist}}
13897 {{thistemplatedoesnotexist}}
13901 pre-save transform: subst magic variables
13910 # This is T2089, which I fixed. -- wtm
13912 pre-save transform: subst: templates with parameters
13916 {{subst:paramtest|param="something else"}}
13918 This is a test template with parameter "something else"
13922 Template:nowikitest
13924 <nowiki>'''not wiki'''</nowiki>
13928 pre-save transform: nowiki in subst (T3188)
13932 {{subst:nowikitest}}
13934 <nowiki>'''not wiki'''</nowiki>
13938 Template:commenttest
13940 This template has <!-- a comment --> in it.
13944 pre-save transform: comment in subst (T3936)
13948 {{subst:commenttest}}
13950 This template has <!-- a comment --> in it.
13954 pre-save transform: unclosed tag
13958 <nowiki>'''not wiki'''
13960 <nowiki>'''not wiki'''
13964 pre-save transform: mixed tag case
13968 <NOwiki>'''not wiki'''</noWIKI>
13970 <NOwiki>'''not wiki'''</noWIKI>
13974 pre-save transform: unclosed comment in <nowiki>
13978 wiki<nowiki>nowiki<!--nowiki</nowiki>wiki
13980 wiki<nowiki>nowiki<!--nowiki</nowiki>wiki
13983 # Leading @ in this template definition works around a limitation
13984 # in parsoid's parserTests which otherwise strips the <span> from the
13985 # result (confusing it for a template wrapper)
13989 @<span onmouseover="alert('crap')">Oh no</span>
13993 (confirming safety of fix for subst T3936)
13995 {{Template:dangerous}}
13997 <p>@<span>Oh no</span>
14002 pre-save transform: comment containing gallery (T7024)
14006 <!-- <gallery>data</gallery> -->
14008 <!-- <gallery>data</gallery> -->
14012 pre-save transform: comment containing extension
14016 <!-- <tag>data</tag> -->
14018 <!-- <tag>data</tag> -->
14022 pre-save transform: comment containing nowiki
14026 <!-- <nowiki>data</nowiki> -->
14028 <!-- <nowiki>data</nowiki> -->
14032 pre-save transform: <noinclude> in subst (T5298)
14042 pre-save transform: <onlyinclude> in subst (T5298)
14046 {{subst:Includes2}}
14054 {{<includeonly>subst:</includeonly>Includes}}
14058 Template:SafeSubstTest
14060 {{<includeonly>safesubst:</includeonly>Includes}}
14064 T24297: safesubst: works during PST
14068 {{subst:SafeSubstTest}}{{safesubst:SubstTest}}
14074 T24297: safesubst: works during normal parse
14083 subst: does not work during normal parse
14087 <p>{{subst:Includes}}
14092 pre-save transform: context links ("pipe trick")
14096 [[Article (context)|]]
14099 [[Bar:Article (context)|]]
14100 [[:Bar:Article (context)|]]
14102 [[|Article (context)]]
14106 [[Article (context)|Article]]
14107 [[Bar:Article|Article]]
14108 [[:Bar:Article|Article]]
14109 [[Bar:Article (context)|Article]]
14110 [[:Bar:Article (context)|Article]]
14112 [[Article (context)]]
14113 [[Bar:X (Y) Z|X (Y) Z]]
14114 [[:Bar:X (Y) Z|X (Y) Z]]
14118 pre-save transform: context links ("pipe trick") with interwiki prefix
14122 [[interwiki:Article|]]
14123 [[:interwiki:Article|]]
14124 [[interwiki:Bar:Article|]]
14125 [[:interwiki:Bar:Article|]]
14127 [[interwiki:Article|Article]]
14128 [[:interwiki:Article|Article]]
14129 [[interwiki:Bar:Article|Bar:Article]]
14130 [[:interwiki:Bar:Article|Bar:Article]]
14134 pre-save transform: context links ("pipe trick") with parens in title
14136 pst title=[[Somearticle (context)]]
14140 [[Article (context)|Article]]
14144 pre-save transform: context links ("pipe trick") with comma in title
14146 pst title=[[Someplace, Somewhere]]
14149 [[Otherplace, Elsewhere|]]
14150 [[Otherplace, Elsewhere, Anywhere|]]
14152 [[Otherplace, Somewhere|Otherplace]]
14153 [[Otherplace, Elsewhere|Otherplace]]
14154 [[Otherplace, Elsewhere, Anywhere|Otherplace]]
14158 pre-save transform: context links ("pipe trick") with parens and comma
14160 pst title=[[Someplace (IGNORED), Somewhere]]
14163 [[Otherplace (place), Elsewhere|]]
14165 [[Otherplace, Somewhere|Otherplace]]
14166 [[Otherplace (place), Elsewhere|Otherplace]]
14170 pre-save transform: context links ("pipe trick") with comma and parens
14172 pst title=[[Who, me? (context)]]
14175 [[Me, Myself, and I (1937 song)|]]
14177 [[Yes, you. (context)|Yes, you.]]
14178 [[Me, Myself, and I (1937 song)|Me, Myself, and I]]
14182 pre-save transform: context links ("pipe trick") with namespace
14184 pst title=[[Ns:Somearticle]]
14188 [[Ns:Article|Article]]
14192 pre-save transform: context links ("pipe trick") with namespace and parens
14194 pst title=[[Ns:Somearticle (context)]]
14198 [[Ns:Article (context)|Article]]
14202 pre-save transform: context links ("pipe trick") with namespace and comma
14204 pst title=[[Ns:Somearticle, Context, Whatever]]
14208 [[Ns:Article, Context, Whatever|Article]]
14212 pre-save transform: context links ("pipe trick") with namespace, comma and parens
14214 pst title=[[Ns:Somearticle, Context (context)]]
14218 [[Ns:Article (context)|Article]]
14222 pre-save transform: context links ("pipe trick") with namespace, parens and comma
14224 pst title=[[Ns:Somearticle (IGNORED), Context]]
14228 [[Ns:Article, Context|Article]]
14232 pre-save transform: context links ("pipe trick") with full-width parens and no space (Japanese and Chinese style, T32149)
14236 [[Article(context)|]]
14237 [[Bar:Article(context)|]]
14238 [[:Bar:Article(context)|]]
14239 [[|Article(context)]]
14243 [[Article(context)|Article]]
14244 [[Bar:Article(context)|Article]]
14245 [[:Bar:Article(context)|Article]]
14246 [[Article(context)]]
14247 [[Bar:X(Y)Z|X(Y)Z]]
14248 [[:Bar:X(Y)Z|X(Y)Z]]
14252 pre-save transform: context links ("pipe trick") with full-width parens and space (Japanese and Chinese style, T32149)
14256 [[Article (context)|]]
14257 [[Bar:Article (context)|]]
14258 [[:Bar:Article (context)|]]
14259 [[|Article (context)]]
14263 [[Article (context)|Article]]
14264 [[Bar:Article (context)|Article]]
14265 [[:Bar:Article (context)|Article]]
14266 [[Article (context)]]
14267 [[Bar:X (Y) Z|X (Y) Z]]
14268 [[:Bar:X (Y) Z|X (Y) Z]]
14272 pre-save transform: context links ("pipe trick") with parens and no space (Korean style, T32149)
14276 [[Article(context)|]]
14277 [[Bar:Article(context)|]]
14278 [[:Bar:Article(context)|]]
14279 [[|Article(context)]]
14283 [[Article(context)|Article]]
14284 [[Bar:Article(context)|Article]]
14285 [[:Bar:Article(context)|Article]]
14286 [[Article(context)]]
14287 [[Bar:X(Y)Z|X(Y)Z]]
14288 [[:Bar:X(Y)Z|X(Y)Z]]
14292 pre-save transform: context links ("pipe trick") with commas (T23660)
14296 [[Article (context), context|]]
14297 [[Article (context),context|]]
14298 [[Bar:Article (context), context|]]
14299 [[Bar:Article (context),context|]]
14300 [[:Bar:Article (context), context|]]
14301 [[:Bar:Article (context),context|]]
14303 [[Article (context), context|Article]]
14304 [[Article (context),context|Article]]
14305 [[Bar:Article (context), context|Article]]
14306 [[Bar:Article (context),context|Article]]
14307 [[:Bar:Article (context), context|Article]]
14308 [[:Bar:Article (context),context|Article]]
14312 Parsoid: backwards pipe trick
14319 <p>[[|<b>bar</b>]]</p>
14323 pre-save transform: trim trailing empty lines
14327 Empty lines are trimmed
14333 Empty lines are trimmed
14337 pre-save transform: Signature expansion
14344 * <noinclude>~~~</noinclude>
14345 * <includeonly>~~~</includeonly>
14346 * <onlyinclude>~~~</onlyinclude>
14348 * [[Special:Contributions/127.0.0.1|127.0.0.1]]
14349 * [[Special:Contributions/127.0.0.1|127.0.0.1]] 00:02, 1 January 1970 (UTC)
14350 * 00:02, 1 January 1970 (UTC)
14351 * <noinclude>[[Special:Contributions/127.0.0.1|127.0.0.1]]</noinclude>
14352 * <includeonly>[[Special:Contributions/127.0.0.1|127.0.0.1]]</includeonly>
14353 * <onlyinclude>[[Special:Contributions/127.0.0.1|127.0.0.1]]</onlyinclude>
14358 ParserOutput flags from signature expansion (T84843)
14365 [[Special:Contributions/127.0.0.1|127.0.0.1]] 00:02, 1 January 1970 (UTC)
14366 flags=user-signature
14371 pre-save transform: Signature expansion in nowiki tags (T2093)
14377 <nowiki>~~~~</nowiki>
14379 <includeonly><nowiki>~~~~</nowiki></includeonly>
14381 <noinclude><nowiki>~~~~</nowiki></noinclude>
14383 <onlyinclude><nowiki>~~~~</nowiki></onlyinclude>
14385 {{subst:Foo}} shall be converted to FOO
14387 As well as inside noinclude/onlyinclude
14388 <noinclude>{{subst:Foo}}</noinclude>
14389 <onlyinclude>{{subst:Foo}}</onlyinclude>
14391 But not inside includeonly
14392 <includeonly>{{subst:Foo}}</includeonly>
14396 <nowiki>~~~~</nowiki>
14398 <includeonly><nowiki>~~~~</nowiki></includeonly>
14400 <noinclude><nowiki>~~~~</nowiki></noinclude>
14402 <onlyinclude><nowiki>~~~~</nowiki></onlyinclude>
14404 FOO shall be converted to FOO
14406 As well as inside noinclude/onlyinclude
14407 <noinclude>FOO</noinclude>
14408 <onlyinclude>FOO</onlyinclude>
14410 But not inside includeonly
14411 <includeonly>{{subst:Foo}}</includeonly>
14415 Parsoid: Recognize nowiki with trailing space in tags
14419 <nowiki ><div>[[foo]]</nowiki >
14427 <p><div>[[foo]]
14428 </p><p>a<nowiki / >b
14430 </p><p>e<nowiki/ >f
14433 <p><span typeof="mw:Nowiki"><div>[[foo]]</span></p>
14435 <p>a<nowiki / >b</p>
14437 <p>c<span typeof="mw:Nowiki"></span>d</p>
14439 <p>e<nowiki/ >f</p>
14443 Parsoid: Recognize nowiki with odd capitalization
14447 <noWikI ><div>[[foo]]</Nowiki >
14449 <p><div>[[foo]]
14452 <p><span typeof="mw:Nowiki"><div>[[foo]]</span></p>
14457 Parsoid: Escape nowiki with trailing space in tags
14461 <p><nowiki > foo </nowiki ></p>
14462 <p>a<nowiki />b</p>
14463 <p>c<nowiki/ >d</p>
14465 <nowiki > foo </nowiki >
14473 Parsoid: Escape weird noWikI capitalizations
14477 <p><noWikI > foo </NoWikI ></p>
14479 <noWikI > foo </NoWikI >
14483 ### Message transform tests
14486 message transform: magic variables
14496 message transform: should not transform wiki markup
14506 message transform: <noinclude> in transcluded template (T6926)
14516 message transform: <onlyinclude> in transcluded template (T6926)
14526 {{#special:}} page name, known
14530 {{#special:Recentchanges}}
14532 Special:RecentChanges
14536 {{#special:}} page name with subpage, known
14540 {{#special:Recentchanges/param}}
14542 Special:RecentChanges/param
14546 {{#special:}} page name, unknown
14550 {{#special:foobar nonexistent}}
14552 Special:Foobar nonexistent
14556 {{#speciale:}} page name, known
14560 {{#speciale:Recentchanges}}
14562 Special:RecentChanges
14566 {{#speciale:}} page name with subpage, known
14570 {{#speciale:Recentchanges/param}}
14572 Special:RecentChanges/param
14576 {{#speciale:}} page name, unknown
14580 {{#speciale:foobar nonexistent}}
14582 Special:Foobar_nonexistent
14588 ### For Parsoid-specific tests, see
14589 #### https://www.mediawiki.org/wiki/Parsoid/MediaWiki_DOM_spec#Images
14594 parsoid=wt2html,wt2wt,html2html
14596 [[Image:foobar.jpg]]
14598 <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>
14601 <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>
14605 Serialize simple image with span wrapper
14609 <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>
14611 [[File:Foobar.jpg]]
14615 Simple image (using File: namespace, now canonical)
14617 [[File:Foobar.jpg]]
14619 <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>
14622 <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>
14626 Right-aligned image
14628 [[File:Foobar.jpg|right]]
14630 <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>
14633 <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>
14639 [[File:Foobar.jpg|right|Caption text]]
14641 <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>
14644 <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>
14648 Image with caption, T55312 #1
14650 [[File:Foobar.jpg|right|Caption page stuff]]
14652 <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>
14655 <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>
14659 Image with caption, T55312 #2
14661 [[File:Foobar.jpg|right|Caption page=]]
14663 <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>
14666 <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>
14670 Image with caption, T55312 #3
14672 [[File:Foobar.jpg|right|Caption page=stuff]]
14674 <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>
14677 <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>
14681 Image caption with pipe entity
14683 [[File:Foobar.jpg|thumb|one | two]]
14684 [[File:Foobar.jpg|thumb|one ''two'' | three]]
14686 <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>
14687 <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>
14690 <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>
14691 <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>
14695 Allow empty links in image captions (T62753)
14699 [[File:Foobar.jpg|thumb|Caption [[Link1]]
14704 <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>
14707 <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>
14709 <a rel="mw:WikiLink" href="./Link2" title="Link2" data-parsoid='{"stx":"simple","a":{"href":"./Link2"},"sa":{"href":"Link2"}}'>Link2</a>
14710 </figcaption></figure>
14714 Titles in unlinked images (T23454)
14716 [[File:Foobar.jpg|link=|stuff]]
14718 <p><img alt="stuff" src="http://example.com/images/3/3a/Foobar.jpg" title="stuff" width="1941" height="220" />
14721 <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>
14725 Link with empty target
14734 Image with link trail
14736 Linktrails should not work for images: [[File:Foobar.jpg]]s
14738 <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
14741 <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>
14745 Image with empty attribute
14747 parsoid=wt2html,wt2wt,html2html
14749 [[File:Foobar.jpg|right||Caption text]]
14751 <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>
14754 <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>
14758 1. Block image with individual attributes from templates
14760 [[File:Foobar.jpg|thumb|{{echo|137px}}|This is a caption]]
14762 <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>
14765 <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>
14769 2. Block Image with individual attributes from templates
14771 [[File:Foobar.jpg|{{echo|thumb}}|{{echo|137px}}|This is a caption]]
14773 <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>
14776 <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>
14780 3. Inline image with individual attributes from templates
14782 [[File:Foobar.jpg|{{echo|50px}}]]
14784 <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>
14787 <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>
14790 ## Parsoid does not provide editing support for images where templates produce multiple image attributes.
14791 ## To signal this, we add a 'mw:Placeholder' type to such images. This could change in the future.
14793 Image with multiple attributes from the same template
14795 [[File:Foobar.jpg|{{image_attribs}}]]
14797 <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>
14800 <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>
14804 Image with link tails
14808 123[[File:Foobar.jpg]]456
14809 123[[File:Foobar.jpg|right]]456
14810 123[[File:Foobar.jpg|thumb]]456
14812 <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
14814 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
14815 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
14818 <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
14820 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
14821 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
14824 <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>
14825 <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
14826 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>
14830 Image with multiple captions -- only last one is accepted
14832 [[File:Foobar.jpg|right|Caption1 - ignored|[[Caption2]] - ignored|Caption3 - accepted]]
14834 <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>
14837 <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>
14841 Image with multiple widths -- use last
14843 [[File:Foobar.jpg|200px|300px|caption]]
14845 <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>
14848 <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>
14852 Image with multiple alignments -- use first (T50664)
14856 [[File:Foobar.jpg|thumb|left|right|center|caption]]
14858 [[File:Foobar.jpg|middle|text-top|caption]]
14860 <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>
14861 <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>
14864 <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>
14865 <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>
14869 Image with width attribute at different positions
14871 [[File:Foobar.jpg|200px|right|Caption]]
14872 [[File:Foobar.jpg|right|200px|Caption]]
14873 [[File:Foobar.jpg|right|Caption|200px]]
14875 <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>
14876 <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>
14877 <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>
14880 <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>
14881 <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>
14882 <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>
14885 # a sad bit of backward-compatibility
14887 Image with size specified with pxpx (T15500, T53628)
14889 parsoid=wt2html,wt2wt,html2html
14891 [[File:Foobar.jpg|20pxpx]]
14892 [[File:Foobar.jpg|200x20pxpx]]
14894 <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>
14895 <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>
14898 <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>
14902 Image with link parameter, wiki target
14904 [[File:Foobar.jpg|link=Main Page]]
14906 <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>
14909 <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>
14912 # parsoid T51293 (part 1)
14914 Image with link parameter, URL target
14916 [[File:Foobar.jpg|link=http://example.com/]]
14918 <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>
14921 <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>
14924 # parsoid T51293 (part 2)
14926 Image with link parameter, protocol-less URL target
14928 [[File:Foobar.jpg|link=//example.com/]]
14930 <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>
14933 <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>
14937 Escaping non-block captions (T107435)
14940 "modes": ["wt2wt"],
14942 ["[typeof~='mw:Image']", "attr", "data-mw", "{\"caption\": \"|\"}"]
14946 [[Image:Foobar.jpg|caption]]
14948 [[Image:Foobar.jpg|<nowiki>|</nowiki>]]
14951 # wgExternalLinkTarget not supported by Parsoid
14953 Image with link parameter, wgExternalLinkTarget
14955 [[Image:foobar.jpg|link=http://example.com/]]
14957 wgExternalLinkTarget='foobar'
14959 <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>
14964 Image with link parameter, wgNoFollowLinks set to false
14966 [[Image:foobar.jpg|link=http://example.com/]]
14968 wgNoFollowLinks=false
14970 <p><a href="http://example.com/"><img alt="Foobar.jpg" src="http://example.com/images/3/3a/Foobar.jpg" width="1941" height="220" /></a>
14975 Image with link parameter, wgNoFollowDomainExceptions
14977 [[Image:foobar.jpg|link=http://example.com/]]
14979 wgNoFollowDomainExceptions='example.com'
14981 <p><a href="http://example.com/"><img alt="Foobar.jpg" src="http://example.com/images/3/3a/Foobar.jpg" width="1941" height="220" /></a>
14985 # wgExternalLinkTarget not supported by Parsoid
14987 Image with link parameter, wgExternalLinkTarget, unnamed parameter
14989 [[Image:foobar.jpg|link=http://example.com/|Title]]
14991 wgExternalLinkTarget='foobar'
14993 <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>
14998 Image with empty link parameter
15000 [[File:Foobar.jpg|link=]]
15002 <p><img alt="Foobar.jpg" src="http://example.com/images/3/3a/Foobar.jpg" width="1941" height="220" />
15005 <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>
15009 Image with link parameter (wiki target) and unnamed parameter
15011 [[File:Foobar.jpg|link=Main_Page|Title]]
15013 <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>
15016 <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>
15020 Image with link parameter (URL target) and unnamed parameter
15022 [[File:Foobar.jpg|link=http://example.com/|Title]]
15024 <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>
15027 <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>
15031 Thumbnail image with link parameter
15034 parsoid=wt2html,wt2wt,html2html
15036 [[File:Foobar.jpg|thumb|link=http://example.com/|Title]]
15038 <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>
15041 <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>
15045 Manually-specified thumbnail image
15049 [[File:Foobar.jpg|thumbnail=Thumb.png|Title]]
15051 <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>
15054 <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>
15058 Manually-specified thumbnail image with explicit link to wiki page
15061 parsoid=wt2html,wt2wt,html2html
15063 [[File:Foobar.jpg|thumb=Thumb.png|link=Main_Page|Title]]
15065 <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>
15068 <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>
15072 Manually-specified thumbnail image with explicit link to url
15075 parsoid=wt2html,wt2wt,html2html
15077 [[File:Foobar.jpg|thumb=Thumb.png|link=http://example.com|Title]]
15079 <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>
15082 <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>
15086 Manually-specified thumbnail image with explicit no link
15089 parsoid=wt2html,wt2wt,html2html
15091 [[File:Foobar.jpg|thumb=Thumb.png|link=|Title]]
15093 <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>
15096 <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>
15100 Manually-specified thumbnail image with explicit link and alt text
15103 parsoid=wt2html,wt2wt,html2html
15105 [[File:Foobar.jpg|thumb=Thumb.png|link=Main_Page|alt=alttext|Title]]
15107 <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>
15110 <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>
15114 Image with frame and link
15116 parsoid=wt2html,wt2wt,html2html
15118 [[File:Foobar.jpg|frame|left|This is a test image [[Main Page]]]]
15120 <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>
15123 <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>
15127 Image with frame and link and explicit alt
15129 parsoid=wt2html,wt2wt,html2html
15131 [[Image:Foobar.jpg|frame|left|This is a test image [[Main Page]]|alt=Altitude]]
15133 <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>
15136 <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>
15140 Image with wiki markup in implicit alt
15142 [[Image:Foobar.jpg|testing '''bold''' in alt]]
15144 [[Image:Foobar.jpg|alt=testing '''bold''' in alt]]
15146 <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>
15147 </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>
15150 <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>
15152 <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>
15156 Alt image option should handle most kinds of wikitext without barfing
15158 [[Image:Foobar.jpg|thumb|This is the image caption|alt=This is a [[link]] and a {{echo|''bold template''}}.]]
15160 <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>
15163 <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>
15167 Ampersand in alt attribute (T206940)
15170 "nativeGallery": true
15173 [[File:Foobar.jpg|alt=&amp;]]
15175 <!-- consistency with gallery extension -->
15177 File:Foobar.jpg|alt=&amp;
15180 <p><a href="/wiki/File:Foobar.jpg" class="image"><img alt="&amp;" src="http://example.com/images/3/3a/Foobar.jpg" width="1941" height="220" /></a>
15182 <ul class="gallery mw-gallery-traditional">
15183 <li class="gallerybox" style="width: 155px"><div style="width: 155px">
15184 <div class="thumb" style="width: 150px;"><div style="margin:68px auto;"><a href="/wiki/File:Foobar.jpg" class="image"><img alt="&amp;" 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>
15185 <div class="gallerytext">
15190 <p><figure-inline class="mw-default-size" typeof="mw:Image"><a href="./File:Foobar.jpg"><img alt="&amp;" resource="./File:Foobar.jpg" 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>
15192 <!-- consistency with gallery extension -->
15193 <ul class="gallery mw-gallery-traditional" typeof="mw:Extension/gallery" data-mw='{"name":"gallery","attrs":{},"body":{}}'>
15194 <li class="gallerybox">
15195 <div class="thumb"><figure-inline typeof="mw:Image"><a href="./File:Foobar.jpg"><img alt="&amp;" 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>
15196 <div class="gallerytext"></div>
15202 Italics markup in alt attribute (T206940)
15204 [[File:Foobar.jpg|alt=''x''|caption]]
15206 <!-- consistency with gallery extension -->
15208 File:Foobar.jpg|alt=''x''|caption
15211 <p><a href="/wiki/File:Foobar.jpg" class="image" title="caption"><img alt="x" src="http://example.com/images/3/3a/Foobar.jpg" width="1941" height="220" /></a>
15213 <ul class="gallery mw-gallery-traditional">
15214 <li class="gallerybox" style="width: 155px"><div style="width: 155px">
15215 <div class="thumb" style="width: 150px;"><div style="margin:68px auto;"><a href="/wiki/File:Foobar.jpg" class="image"><img alt="x" 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>
15216 <div class="gallerytext">
15223 <p><figure-inline class="mw-default-size" typeof="mw:Image" data-parsoid='{"optList":[{"ck":"alt","ak":"alt=''x''"},{"ck":"caption","ak":"caption"}]}' data-mw='{"caption":"caption"}'><a href="./File:Foobar.jpg"><img alt="x" resource="./File:Foobar.jpg" 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":"x","resource":"./File:Foobar.jpg","height":"220","width":"1941"},"sa":{"alt":"alt=''x''","resource":"File:Foobar.jpg"}}'/></a></figure-inline></p>
15225 <!-- consistency with gallery extension -->
15226 <ul class="gallery mw-gallery-traditional" typeof="mw:Extension/gallery" about="#mwt2" data-mw='{"name":"gallery","attrs":{},"body":{"extsrc":"\nFile:Foobar.jpg|alt=''x''|caption\n"}}'>
15227 <li class="gallerybox">
15228 <div class="thumb"><figure-inline typeof="mw:Image"><a href="./File:Foobar.jpg"><img alt="x" 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>
15229 <div class="gallerytext">caption</div>
15235 Nowiki markup in alt attribute (T206940)
15237 [[File:Foobar.jpg|alt=<nowiki>''</nowiki>x<nowiki>''</nowiki>|caption]]
15239 <!-- consistency with gallery extension -->
15241 File:Foobar.jpg|alt=<nowiki>''</nowiki>x<nowiki>''</nowiki>|caption
15244 <p><a href="/wiki/File:Foobar.jpg" class="image" title="caption"><img alt="''x''" src="http://example.com/images/3/3a/Foobar.jpg" width="1941" height="220" /></a>
15246 <ul class="gallery mw-gallery-traditional">
15247 <li class="gallerybox" style="width: 155px"><div style="width: 155px">
15248 <div class="thumb" style="width: 150px;"><div style="margin:68px auto;"><a href="/wiki/File:Foobar.jpg" class="image"><img alt="''x''" 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>
15249 <div class="gallerytext">
15256 <p><figure-inline class="mw-default-size" typeof="mw:Image" data-parsoid='{"optList":[{"ck":"alt","ak":"alt=<nowiki>''</nowiki>x<nowiki>''</nowiki>"},{"ck":"caption","ak":"caption"}],"dsr":[0,71,null,null]}' data-mw='{"caption":"caption"}'><a href="./File:Foobar.jpg"><img alt="''x''" resource="./File:Foobar.jpg" 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":"''x''","resource":"./File:Foobar.jpg","height":"220","width":"1941"},"sa":{"alt":"alt=<nowiki>''</nowiki>x<nowiki>''</nowiki>","resource":"File:Foobar.jpg"}}'/></a></figure-inline></p>
15258 <!-- consistency with gallery extension -->
15259 <ul class="gallery mw-gallery-traditional" typeof="mw:Extension/gallery" data-mw='{"name":"gallery","attrs":{},"body":{"extsrc":"\nFile:Foobar.jpg|alt=<nowiki>''</nowiki>x<nowiki>''</nowiki>|caption\n"}}'>
15260 <li class="gallerybox">
15261 <div class="thumb"><figure-inline typeof="mw:Image"><a href="./File:Foobar.jpg"><img alt="''x''" 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>
15262 <div class="gallerytext">caption</div>
15268 Nowiki markup in alt attribute (edited html, no data-parsoid) (T206940)
15271 "nativeGallery": true
15274 [[File:Foobar.jpg|alt=<nowiki>''x''</nowiki>|caption]]
15276 <!-- consistency with gallery extension -->
15278 File:Foobar.jpg|alt=<nowiki>''x''</nowiki>|caption
15281 <p><a href="/wiki/File:Foobar.jpg" class="image" title="caption"><img alt="''x''" src="http://example.com/images/3/3a/Foobar.jpg" width="1941" height="220" /></a>
15283 <ul class="gallery mw-gallery-traditional">
15284 <li class="gallerybox" style="width: 155px"><div style="width: 155px">
15285 <div class="thumb" style="width: 150px;"><div style="margin:68px auto;"><a href="/wiki/File:Foobar.jpg" class="image"><img alt="''x''" 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>
15286 <div class="gallerytext">
15293 <p><figure-inline class="mw-default-size" typeof="mw:Image" data-mw='{"caption":"caption"}'><a href="./File:Foobar.jpg"><img alt="''x''" resource="./File:Foobar.jpg" 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>
15295 <!-- consistency with gallery extension -->
15296 <ul class="gallery mw-gallery-traditional" typeof="mw:Extension/gallery" data-mw='{"name":"gallery","attrs":{},"body":{}}'>
15297 <li class="gallerybox">
15298 <div class="thumb"><figure-inline typeof="mw:Image"><a href="./File:Foobar.jpg"><img alt="''x''" 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>
15299 <div class="gallerytext">caption</div>
15305 Ampersand in link attribute (T206940)
15307 [[File:Foobar.jpg|link=Foo & bar]]
15309 <!-- consistency with gallery extension -->
15311 File:Foobar.jpg|link=Foo & bar
15314 <p><a href="/wiki/Foo_%26_bar" title="Foo & bar"><img alt="Foobar.jpg" src="http://example.com/images/3/3a/Foobar.jpg" width="1941" height="220" /></a>
15316 <ul class="gallery mw-gallery-traditional">
15317 <li class="gallerybox" style="width: 155px"><div style="width: 155px">
15318 <div class="thumb" style="width: 150px;"><div style="margin:68px auto;"><a href="/wiki/Foo_%26_bar"><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>
15319 <div class="gallerytext">
15324 <p><figure-inline class="mw-default-size" typeof="mw:Image" data-parsoid='{"optList":[{"ck":"link","ak":"link=Foo &amp; bar"}]}'><a href="./Foo_&_bar" data-parsoid='{"a":{"href":"./Foo_&_bar"},"sa":{"href":"link=Foo &amp; bar"}}'><img resource="./File:Foobar.jpg" 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>
15326 <!-- consistency with gallery extension -->
15327 <ul class="gallery mw-gallery-traditional" typeof="mw:Extension/gallery" data-mw='{"name":"gallery","attrs":{},"body":{"extsrc":"\nFile:Foobar.jpg|link=Foo &amp; bar\n"}}'>
15328 <li class="gallerybox">
15329 <div class="thumb"><figure-inline typeof="mw:Image"><a href="./Foo_&_bar"><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>
15330 <div class="gallerytext"></div>
15336 Ampersand in link attribute (edited html, no data-parsoid) (T206940)
15339 "nativeGallery": true
15342 [[File:Foobar.jpg|link=Foo_&_bar]]
15344 <!-- consistency with gallery extension -->
15346 File:Foobar.jpg|link=Foo_&_bar
15349 <p><a href="/wiki/Foo_%26_bar" title="Foo & bar"><img alt="Foobar.jpg" src="http://example.com/images/3/3a/Foobar.jpg" width="1941" height="220" /></a>
15351 <ul class="gallery mw-gallery-traditional">
15352 <li class="gallerybox" style="width: 155px"><div style="width: 155px">
15353 <div class="thumb" style="width: 150px;"><div style="margin:68px auto;"><a href="/wiki/Foo_%26_bar"><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>
15354 <div class="gallerytext">
15359 <p><figure-inline class="mw-default-size" typeof="mw:Image"><a href="./Foo_&_bar"><img resource="./File:Foobar.jpg" 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>
15361 <!-- consistency with gallery extension -->
15362 <ul class="gallery mw-gallery-traditional" typeof="mw:Extension/gallery" data-mw='{"name":"gallery","attrs":{},"body":{}}'>
15363 <li class="gallerybox">
15364 <div class="thumb"><figure-inline typeof="mw:Image"><a href="./Foo_&_bar"><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>
15365 <div class="gallerytext"></div>
15371 Italics markup in link attribute (T206940)
15375 <!-- Note that "italics" are stripped, even though this is a valid page title -->
15376 [[File:Foobar.jpg|link=Foo''s bar''s|caption1]]
15378 [[File:Foobar.jpg|link=''Main Page''|caption2]]
15380 <!-- consistency with gallery extension -->
15382 File:Foobar.jpg|link=Foo''s bar''s|caption1
15383 File:Foobar.jpg|link=''Main Page''|caption2
15386 <p><a href="/wiki/Foo%27%27s_bar%27%27s" title="Foo''s bar''s">Foo''s bar''s</a>
15387 </p><p><a href="/wiki/Foos_bars" title="caption1"><img alt="caption1" src="http://example.com/images/3/3a/Foobar.jpg" width="1941" height="220" /></a>
15388 </p><p><a href="/wiki/Main_Page" title="caption2"><img alt="caption2" src="http://example.com/images/3/3a/Foobar.jpg" width="1941" height="220" /></a>
15390 <ul class="gallery mw-gallery-traditional">
15391 <li class="gallerybox" style="width: 155px"><div style="width: 155px">
15392 <div class="thumb" style="width: 150px;"><div style="margin:68px auto;"><a href="/wiki/Foos_bars"><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>
15393 <div class="gallerytext">
15398 <li class="gallerybox" style="width: 155px"><div style="width: 155px">
15399 <div class="thumb" style="width: 150px;"><div style="margin:68px auto;"><a href="/wiki/Main_Page"><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>
15400 <div class="gallerytext">
15407 <p><a rel="mw:WikiLink" href="./Foo''s_bar''s" title="Foo''s bar''s">Foo''s bar''s</a></p>
15409 <!-- Note that "italics" are stripped, even though this is a valid page title -->
15410 <p><figure-inline class="mw-default-size" typeof="mw:Image" data-parsoid='{"optList":[{"ck":"link","ak":"link=Foo''s bar''s"},{"ck":"caption","ak":"caption1"}]}' data-mw='{"caption":"caption1"}'><a href="./Foos_bars" data-parsoid='{"a":{"href":"./Foos_bars"},"sa":{"href":"link=Foo''s bar''s"}}'><img resource="./File:Foobar.jpg" 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>
15412 <p><figure-inline class="mw-default-size" typeof="mw:Image" data-parsoid='{"optList":[{"ck":"link","ak":"link=''Main Page''"},{"ck":"caption","ak":"caption2"}]}' data-mw='{"caption":"caption2"}'><a href="./Main_Page" data-parsoid='{"a":{"href":"./Main_Page"},"sa":{"href":"link=''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" data-parsoid='{"a":{"resource":"./File:Foobar.jpg","height":"220","width":"1941"},"sa":{"resource":"File:Foobar.jpg"}}'/></a></figure-inline></p>
15414 <!-- consistency with gallery extension -->
15415 <ul class="gallery mw-gallery-traditional" typeof="mw:Extension/gallery" data-mw='{"name":"gallery","attrs":{},"body":{"extsrc":"\nFile:Foobar.jpg|link=Foo''s bar''s|caption1\nFile:Foobar.jpg|link=''Main Page''|caption2\n"}}'>
15416 <li class="gallerybox">
15417 <div class="thumb"><figure-inline typeof="mw:Image"><a href="./Foos_bars"><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>
15418 <div class="gallerytext">caption1</div>
15420 <li class="gallerybox">
15421 <div class="thumb"><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>
15422 <div class="gallerytext">caption2</div>
15428 Nowiki markup in link attribute (T206940)
15430 [[File:Foobar.jpg|link=Foo<nowiki>''</nowiki>s_bar<nowiki>''</nowiki>s|caption]]
15432 <!-- consistency with gallery extension -->
15434 File:Foobar.jpg|link=Foo<nowiki>''</nowiki>s_bar<nowiki>''</nowiki>s|caption
15437 <p><a href="/wiki/Foo%27%27s_bar%27%27s" title="caption"><img alt="caption" src="http://example.com/images/3/3a/Foobar.jpg" width="1941" height="220" /></a>
15439 <ul class="gallery mw-gallery-traditional">
15440 <li class="gallerybox" style="width: 155px"><div style="width: 155px">
15441 <div class="thumb" style="width: 150px;"><div style="margin:68px auto;"><a href="/wiki/Foo%27%27s_bar%27%27s"><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>
15442 <div class="gallerytext">
15449 <p><figure-inline class="mw-default-size" typeof="mw:Image" data-parsoid='{"optList":[{"ck":"link","ak":"link=Foo<nowiki>''</nowiki>s_bar<nowiki>''</nowiki>s"},{"ck":"caption","ak":"caption"}]}' data-mw='{"caption":"caption"}'><a href="./Foo''s_bar''s" data-parsoid='{"a":{"href":"./Foo''s_bar''s"},"sa":{"href":"link=Foo<nowiki>''</nowiki>s_bar<nowiki>''</nowiki>s"}}'><img resource="./File:Foobar.jpg" 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>
15451 <!-- consistency with gallery extension -->
15452 <ul class="gallery mw-gallery-traditional" typeof="mw:Extension/gallery" data-mw='{"name":"gallery","attrs":{},"body":{"extsrc":"\nFile:Foobar.jpg|link=Foo<nowiki>''</nowiki>s_bar<nowiki>''</nowiki>s|caption\n"}}'>
15453 <li class="gallerybox">
15454 <div class="thumb"><figure-inline typeof="mw:Image"><a href="./Foo''s_bar''s"><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>
15455 <div class="gallerytext">caption</div>
15461 Nowiki markup in link attribute (edited html, no data-parsoid) (T206940)
15464 "nativeGallery": true
15467 [[File:Foobar.jpg|link=Foo<nowiki>''s_bar''</nowiki>s|caption]]
15469 <!-- consistency with gallery extension -->
15471 File:Foobar.jpg|link=Foo<nowiki>''s_bar''</nowiki>s|caption
15474 <p><a href="/wiki/Foo%27%27s_bar%27%27s" title="caption"><img alt="caption" src="http://example.com/images/3/3a/Foobar.jpg" width="1941" height="220" /></a>
15476 <ul class="gallery mw-gallery-traditional">
15477 <li class="gallerybox" style="width: 155px"><div style="width: 155px">
15478 <div class="thumb" style="width: 150px;"><div style="margin:68px auto;"><a href="/wiki/Foo%27%27s_bar%27%27s"><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>
15479 <div class="gallerytext">
15486 <p><figure-inline class="mw-default-size" typeof="mw:Image" data-mw='{"caption":"caption"}'><a href="./Foo''s_bar''s"><img resource="./File:Foobar.jpg" 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>
15488 <!-- consistency with gallery extension -->
15489 <ul class="gallery mw-gallery-traditional" typeof="mw:Extension/gallery" data-mw='{"name":"gallery","attrs":{},"body":{}}'>
15490 <li class="gallerybox">
15491 <div class="thumb"><figure-inline typeof="mw:Image"><a href="./Foo''s_bar''s"><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>
15492 <div class="gallerytext">caption</div>
15498 HTML entity prefix in link markup (T209236)
15500 [[File:Foobar.jpg|link=https://example.com?foo¶ms=bar]]
15502 <!-- consistency with gallery extension -->
15504 File:Foobar.jpg|link=https://example.com?foo¶ms=bar
15507 <p><a href="https://example.com?foo&params=bar" rel="nofollow"><img alt="Foobar.jpg" src="http://example.com/images/3/3a/Foobar.jpg" width="1941" height="220" /></a>
15509 <ul class="gallery mw-gallery-traditional">
15510 <li class="gallerybox" style="width: 155px"><div style="width: 155px">
15511 <div class="thumb" style="width: 150px;"><div style="margin:68px auto;"><a href="https://example.com?foo&params=bar"><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>
15512 <div class="gallerytext">
15517 <p><figure-inline class="mw-default-size" typeof="mw:Image"><a href="https://example.com?foo&params=bar"><img resource="./File:Foobar.jpg" 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>
15519 <!-- consistency with gallery extension -->
15520 <ul class="gallery mw-gallery-traditional" typeof="mw:Extension/gallery" data-mw='{"name":"gallery","attrs":{},"body":{"extsrc":"\nFile:Foobar.jpg|link=https://example.com?foo&params=bar\n"}}'>
15521 <li class="gallerybox">
15522 <div class="thumb"><figure-inline typeof="mw:Image"><a href="https://example.com?foo&params=bar"><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>
15523 <div class="gallerytext"></div>
15529 Image with table with attributes in caption
15531 parsoid=wt2html,html2html
15533 [[File:Foobar.jpg|thumb|
15540 <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>
15541 <table class="123">
15542 <tbody><tr class="456" data-parsoid='{"startTagSrc":"|-"}'>
15545 </figcaption></figure>
15549 Image with table with rows from templates in caption
15551 [[File:Foobar.jpg|thumb|
15557 <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>
15559 <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>
15561 </figcaption></figure>
15565 Image with nested tables in caption
15567 [[File:Foobar.jpg|thumb|Foo<br />
15576 <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}'/>
15580 <tbody><tr><td>z</td></tr>
15581 </tbody></table></td></tr>
15583 </figcaption></figure>
15587 Image with heading and horizontal rule in caption
15589 [[File:Foobar.jpg|thumb|
15595 <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>
15598 <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>
15599 <h3 id="Testing">Testing</h3>
15601 <hr data-parsoid='{"extra_dashes":10}'/>
15602 </figcaption></figure>
15605 ###################
15606 # Conflicting image format options.
15607 # First option specified should 'win'.
15608 # All three cases in each test should be identical.
15611 Image with 'frameless' first.
15613 parsoid=wt2html,wt2wt,html2html
15615 [[File:Foobar.jpg|frameless|caption]]
15617 [[File:Foobar.jpg|frameless|frame|caption]]
15619 [[File:Foobar.jpg|frameless|thumb|caption]]
15621 <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>
15622 </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>
15623 </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>
15626 <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>
15627 <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>
15628 <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>
15632 Image with 'frame' first.
15634 parsoid=wt2html,wt2wt,html2html
15636 [[File:Foobar.jpg|frame|caption]]
15637 [[File:Foobar.jpg|frame|frameless|caption]]
15638 [[File:Foobar.jpg|frame|thumb|caption]]
15640 <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>
15641 <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>
15642 <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>
15645 <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>
15646 <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>
15647 <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>
15651 Image with 'thumb' first.
15653 parsoid=wt2html,wt2wt,html2html
15655 [[File:Foobar.jpg|thumb|caption]]
15656 [[File:Foobar.jpg|thumb|frameless|caption]]
15657 [[File:Foobar.jpg|thumb|frame|caption]]
15659 <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>
15660 <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>
15661 <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>
15664 <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>
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><figcaption>caption</figcaption></figure>
15666 <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>
15669 ###################
15671 # See https://www.mediawiki.org/wiki/Help:Images#Size_and_frame
15672 # and https://phabricator.wikimedia.org/T64258
15673 # Foobar has actual size of 1941x220
15674 # 1. Thumbs & frameless always reduce, can't be enlarged unless it's
15675 # a scalable format.
15676 # 2. Framed images always ignore size options; always render at default size.
15677 # 3. "Unspecified format" and border are the only types which can be
15681 Image: unspecified format and border enlarge
15683 parsoid=wt2html,wt2wt,html2html
15685 [[File:Foobar.jpg|2000px]]
15687 [[File:Foobar.jpg|border|2000px]]
15689 <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>
15690 </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>
15693 <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>
15694 <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>
15698 Image: "unspecified format" and border reduce
15700 parsoid=wt2html,wt2wt,html2html
15702 [[File:Foobar.jpg|1000px]]
15704 [[File:Foobar.jpg|border|1000px]]
15706 <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>
15707 </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>
15710 <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>
15711 <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>
15715 Image: thumbs reduce
15717 parsoid=wt2html,wt2wt,html2html
15719 [[File:Foobar.jpg|thumb|50px]]
15721 <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>
15724 <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>
15728 Image: bitmap thumbs can't be enlarged past original size, but vector can.
15730 parsoid=wt2html,wt2wt,html2html
15732 [[File:Foobar.jpg|thumb|2000px]]
15734 [[File:Foobar.svg|thumb|2000px]]
15736 <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>
15737 <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>
15740 <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>
15741 <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>
15745 Image: frameless can reduce in size
15747 parsoid=wt2html,wt2wt,html2html
15749 [[File:Foobar.jpg|frameless|50px]]
15751 <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>
15754 <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>
15758 Image: bitmap frameless can't be enlarged past original size, but vector can
15760 parsoid=wt2html,wt2wt,html2html
15762 [[File:Foobar.jpg|frameless|2000px]]
15764 [[File:Foobar.svg|frameless|2000px]]
15766 <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>
15767 </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>
15770 <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>
15771 <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>
15775 Image: framed images are always unscaled.
15777 parsoid=wt2html,wt2wt,html2html
15779 [[File:Foobar.jpg|frame]]
15781 [[File:Foobar.jpg|frame|50px]]
15783 [[File:Foobar.jpg|frame|50x50px]]
15785 [[File:Foobar.jpg|frame|2000px]]
15787 <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>
15788 <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>
15789 <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>
15790 <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>
15793 <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>
15794 <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>
15795 <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>
15796 <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>
15799 ###################
15802 Link to image page- image page normally doesn't exists, hence edit link
15803 Add test with existing image page
15804 #<p><a href="/wiki/File:Test" title="Image:Test">Image:test</a>
15808 <p><a href="/index.php?title=File:Test&action=edit&redlink=1" class="new" title="File:Test (page does not exist)">Image:test</a>
15813 T20784 Link to non-existent image page with caption should use caption as link text
15815 [[:Image:test|caption]]
15817 <p><a href="/index.php?title=File:Test&action=edit&redlink=1" class="new" title="File:Test (page does not exist)">caption</a>
15822 Frameless image caption with a free URL
15824 [[File:Foobar.jpg|http://example.com]]
15826 <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>
15829 <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>
15833 Thumbnail image caption with a free URL
15837 [[File:Foobar.jpg|thumb|http://example.com]]
15839 <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>
15842 <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>
15846 Thumbnail image caption with a free URL and explicit alt
15849 parsoid=wt2html,wt2wt,html2html
15851 [[File:Foobar.jpg|thumb|http://example.com|alt=Alteration]]
15853 <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>
15856 <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>
15860 SVG thumbnails with no language set
15863 [[File:Foobar.svg|thumb|caption]]
15865 <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>
15868 <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>
15872 SVG thumbnails with language de
15874 parsoid=wt2html,wt2wt,html2html
15876 [[File:Foobar.svg|thumb|caption|lang=de]]
15878 <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>
15881 <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>
15885 SVG thumbnails with invalid language code
15887 parsoid=wt2html,wt2wt,html2html
15889 [[File:Foobar.svg|thumb|caption|lang=invalid:language:code]]
15891 <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>
15894 <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>
15898 SVG thumbnails in page language
15901 wgMediaInTargetLanguage = true
15903 [[File:Foobar.svg]] [[File:Foobar.svg|lang=en]]
15905 <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>
15910 SVG thumbnails in page language not present in the file
15913 wgMediaInTargetLanguage = true
15915 [[File:Foobar.svg]] [[File:Foobar.svg|lang=ru]]
15917 <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>
15922 T3887: A ISBN with a thumbnail
15924 [[File:Foobar.jpg|thumb|ISBN 1235467890]]
15926 <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>
15929 <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>
15933 T3887: A RFC with a thumbnail
15935 [[File:Foobar.jpg|thumb|This is RFC 12354]]
15937 <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>
15940 <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>
15944 T3887: A mailto link with a thumbnail
15946 [[File:Foobar.jpg|thumb|Please mailto:nobody@example.com]]
15948 <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>
15951 <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>
15954 # Pending resolution to T2368
15956 T2648: Frameless image caption with a link
15958 [[File:Foobar.jpg|text with a [[link]] in it]]
15960 <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>
15963 <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>
15967 T2648: Frameless image caption with a link (suffix)
15969 [[File:Foobar.jpg|text with a [[link]]foo in it]]
15971 <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>
15974 <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>
15978 T2648: Frameless image caption with an interwiki link
15980 [[File:Foobar.jpg|text with a [[MeatBall:Link]] in it]]
15982 <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>
15985 <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>
15989 T2648: Frameless image caption with a piped interwiki link
15991 [[File:Foobar.jpg|text with a [[MeatBall:Link|link]] in it]]
15993 <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>
15996 <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>
16000 T107474: Frameless image caption with <nowiki>
16002 [[File:Foobar.jpg|<nowiki>text with a [[MeatBall:Link|link]] in it</nowiki>]]
16004 <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>
16008 Escape HTML special chars in image alt text
16010 [[File:Foobar.jpg|& < > "]]
16012 <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>
16015 <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>
16019 Escape HTML special chars in image alt text with LanguageConverter
16023 [[File:Foobar.jpg|& < > "]]
16025 <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>
16028 <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>
16032 Entities in file name and attributes
16034 [[File:7%25 solution.gif|manualthumb=7%25 solution.gif|link=7%25 solution|[[7%25 solution]]]]
16036 <p><a href="/index.php?title=Special:Upload&wpDestFile=7%25_solution.gif" class="new" title="File:7% solution.gif">7% solution</a>
16039 <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>
16043 T2499: Alt text should have Ӓ, not &1234;
16045 [[File:Foobar.jpg|♀]]
16047 <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>
16050 <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>
16054 Broken image caption with link
16056 parsoid=wt2html,wt2wt,html2html
16058 [[Image:Foobar.jpg|thumb|This is a broken caption. But [[Main Page|this]] is just an ordinary link.
16060 <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.
16063 <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>
16067 Image caption containing another image
16069 [[File:Foobar.jpg|thumb|This is a caption with another [[File:Thumb.png|image]] inside it!]]
16071 <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>
16074 <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>
16078 Image: caption containing a newline
16080 [[File:Foobar.jpg|This
16083 <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>
16086 <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>
16090 Image: caption containing leading space
16091 (The leading space should not trigger nowiki escaping in wt2wt mode)
16093 [[File:Foobar.jpg|thumb| bar]]
16095 <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>
16098 <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>
16101 # html/php output not have newlines after table, td, th, etc. because
16102 # Linker::makeThumbLink2() replaces the newlines with spaces since
16103 # the table is inside a caption.
16104 # FIXME: Verify if that circa 2004 fix is still required.
16106 Image: caption containing a table
16108 parsoid=wt2html,wt2wt,html2html
16110 [[Image:Foobar.jpg|thumb|200px|This is an example image thumbnail caption with a table
16116 and some more text.]]
16118 <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>
16121 <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
16124 <tr><th>Foo</th><th>Bar</th></tr>
16127 <td>Bar1</td></tr></tbody></table>and some more text.</figcaption></figure>
16131 T5090: External links other than http: in image captions
16133 [[File:Foobar.jpg|thumb|200x200px|This caption has [irc://example.net irc] and [https://example.com Secure] ext links in it.]]
16135 <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>
16138 <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>
16144 parsoid=wt2html,wt2wt,html2html
16146 [[Image:foobar.jpg|a|class=b]]
16148 <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>
16151 <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>
16155 Localized image handling (1).
16157 parsoid=wt2html,wt2wt,html2html
16160 [[Archivo:Foobar.jpg|izquierda|enlace=foo|caption]]
16162 <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>
16165 <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>
16169 Localized image handling (2).
16172 parsoid=wt2html,wt2wt,html2html
16175 [[Archivo:Foobar.jpg|miniatura|izquierda|enlace=foo|caption]]
16177 <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>
16180 <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>
16184 Localized image handling (3).
16189 <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>
16191 [[File:Foobar.jpg|بندانگشتی]]
16195 "border", "frameless" and "class" attributes on an image.
16198 parsoid=wt2html,wt2wt,html2html
16200 [[File:Foobar.jpg|frameless|border|class=extra|caption]]
16202 <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>
16205 <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>
16208 # Note that 'right' is the default alignment, despite the misspelled 'righ' below
16210 Invalid image attributes (T64500)
16213 parsoid=wt2html,wt2wt,html2html
16215 [[File:Foobar.jpg|thumb|float|left|caption]]
16217 [[File:Foobar.jpg|thumb|righ|caption]]
16219 [[File:Foobar.jpg|bogus1|thumb|bogus2|left|bogus3|caption]]
16221 <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>
16222 <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>
16223 <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>
16226 <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>
16227 <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>
16228 <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>
16234 #REDIRECT [[File:Barfoo.jpg]]
16237 # FIXME: Parsoid should run this test -- but we'd need to teach the
16238 # mockAPI about the redirected Barfoo.jpg image.
16242 [[Image:Barfoo.jpg]]
16244 <p><a href="/wiki/File:Barfoo.jpg" class="mw-redirect" title="File:Barfoo.jpg">File:Barfoo.jpg</a>
16249 Missing image with uploads disabled
16253 [[File:Foobaz.jpg]]
16255 <p><a href="/wiki/File:Foobaz.jpg" title="File:Foobaz.jpg">File:Foobaz.jpg</a>
16258 <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>
16261 # Parsoid-specific testing for images
16262 # https://www.mediawiki.org/wiki/Parsoid/MediaWiki_DOM_spec#Images
16263 # Currently imperfect due to a flaw in the Parsoid testrunner
16265 # THESE TESTS SHOULD BE MOVED UP and merged with the php-specific
16269 Parsoid-specific image handling - simple image with size and middle alignment
16271 [[File:Foobar.jpg|middle|50px]]
16273 <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>
16277 Parsoid-specific image handling - simple image with size, middle alignment, non-standard namespace alias
16279 parsoid=wt2wt,wt2html,html2html
16281 [[Image:Foobar.jpg|middle|50px]]
16283 <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>
16287 Parsoid-specific image handling - simple image with size and middle alignment (existing content)
16289 [[File:Foobar.jpg|50px|middle]]
16291 <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>
16295 Parsoid-specific image handling - simple image with size and middle alignment and non-standard namespace name
16297 parsoid=wt2html,wt2wt,html2html
16299 [[Image:Foobar.jpg|50px|middle]]
16301 <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>
16305 Parsoid-specific image handling - simple image with both sizes, a baseline alignment, and a caption
16307 [[File:Foobar.jpg|500x10px|baseline|caption]]
16309 <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>
16313 Parsoid-specific image handling - simple image with border and size spec
16315 [[File:Foobar.jpg|50px|border|caption]]
16317 <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>
16321 Parsoid-specific image handling - thumbnail with halign, valign, and caption
16323 parsoid=wt2html,html2html
16325 [[File:Foobar.jpg|left|baseline|thumb|caption content]]
16327 <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>
16331 Parsoid-specific image handling - thumbnail with halign, valign, and caption (existing content)
16333 parsoid=wt2html,html2html
16335 [[File:Foobar.jpg|thumb|left|baseline|caption content]]
16337 <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>
16341 Parsoid-specific image handling - thumbnail with specific size, halign, valign, and caption
16343 parsoid=wt2html,html2html
16345 [[Image:Foobar.jpg|right|middle|thumb|50x50px|caption]]
16347 <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>
16351 Parsoid-specific image handling - thumbnail with specific size, halign, valign, and caption (existing content)
16353 parsoid=wt2html,html2html
16355 [[File:Foobar.jpg|thumb|50x50px|right|middle|caption]]
16357 <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>
16361 Parsoid-specific image handling - framed image with specific size and caption (size is ignored)
16363 parsoid=wt2html,wt2wt,html2html
16365 [[File:Foobar.jpg|frame|500x50px|caption]]
16367 <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>
16371 Parsoid-specific image handling - framed image with specific size, halign, valign, and caption (size is ignored)
16373 parsoid=wt2html,html2html
16375 [[File:Foobar.jpg|left|baseline|frame|500x50px|caption]]
16377 <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>
16381 Parsoid-specific image handling - frameless image with specific size, border, and caption
16383 [[File:Foobar.jpg|frameless|442x50px|border|caption]]
16385 <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>
16389 Parsoid-specific image handling - simple image with a formatted caption
16391 [[File:Foobar.jpg|<table><tr><td>a</td><td>b</td></tr><tr><td>c</td></tr></table>]]
16393 <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>
16397 Parsoid-specific image handling - caption with a template in it
16399 [[File:Foobar.jpg|thumb|200x23px|This caption has a {{echo|transclusion}} in it.]]
16401 <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>
16405 Parsoid-specific image handling - caption with unbalanced tags in it
16407 parsoid=wt2html,wt2wt,html2html
16410 [[File:Foobar.jpg|thumb|200x200px|This caption has a <center>unbalanced tag in it.]]
16414 <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>
16419 Parsoid-specific image handling - empty caption (1)
16421 parsoid=wt2html,wt2wt
16423 [[File:Foobar.jpg|thumb|]]
16425 <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>
16428 # empty captions don't get serialized unless we're in the "round trip" case
16430 Parsoid-specific image handling - empty caption (2)
16434 <figure class="mw-default-size" typeof="mw:Image/Thumb">
16435 <a href="./File:Foobar.jpg">
16436 <img resource="./File:Foobar.jpg"
16437 src="//example.com/images/3/3a/Foobar.jpg"
16438 data-file-width="1941" data-file-height="220" data-file-type="bitmap"
16439 height="25" width="220"/>
16441 <figcaption></figcaption>
16444 [[File:Foobar.jpg|thumb]]
16448 Parsoid-specific image handling - whitespace caption
16450 [[File:Foobar.jpg|thumb| ]]
16452 <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>
16456 Parsoid-specific image handling - lang option
16459 [[File:Foobar.svg|lang=de|caption]]
16463 <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>
16467 ## Edge case bugs in Parsoid from T93580
16469 T93580: 1. Templated <ref> inside block images
16471 [[File:Foobar.jpg|thumb|Caption with templated ref: {{echo|<ref>foo</ref>}}]]
16475 <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="./Parser_test#cite_note-1" style="counter-reset: mw-Ref 1;"><span class="mw-reflink-text">[1]</span></a></sup></figcaption></figure>
16477 <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="./Parser_test#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>
16481 T93580: 2. <ref> inside inline images
16483 [[File:Foobar.jpg|Undisplayed caption in inline image with ref: <ref>foo</ref>]]
16487 <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=\"./Parser_test#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>
16489 <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="./Parser_test#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>
16493 T93580: 3. Templated <ref> inside inline images
16495 [[File:Foobar.jpg|Undisplayed caption in inline image with ref: {{echo|<ref>{{echo|foo}}</ref>}}]]
16499 <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=\"./Parser_test#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>
16501 <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="./Parser_test#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>
16508 Subpage test/subpage
16516 subpage title=[[Subpage test]]
16520 <p><a href="/wiki/Subpage_test/subpage" title="Subpage test/subpage">/subpage</a>
16525 Subpage noslash link
16527 subpage title=[[Subpage test]]
16531 <p><a href="/wiki/Subpage_test/subpage" title="Subpage test/subpage">subpage</a>
16536 Subpage test/1/2/subpage
16542 Relative subpage noslash link
16544 parsoid=wt2wt,wt2html,html2html
16545 subpage title=[[Subpage test/1/2/3/4]]
16551 <p><a href="/wiki/Subpage_test/1/2/subpage" title="Subpage test/1/2/subpage">subpage</a>
16552 </p><p><a href="/wiki/Subpage_test/1/2/subpage" title="Subpage test/1/2/subpage">Subpage test/1/2/subpage</a>
16555 <p><a rel="mw:WikiLink" href="./Subpage_test/1/2/subpage" title="Subpage test/1/2/subpage">subpage</a></p>
16556 <p><a rel="mw:WikiLink" href="./Subpage_test/1/2/subpage" title="Subpage test/1/2/subpage">Subpage_test/1/2/subpage</a></p>
16560 Parsoid: dot-slash prefixed wikilinks
16570 </p><p>[[././baz/]]
16575 </p><p>[[././baz/]]
16580 Render invalid page names as plain text (T53090)
16592 [[foo[http://example.com]xyz]]
16594 [[{{echo|./../foo}}|bar]]
16595 [[{{echo|foo/.}}|bar]]
16596 [[{{echo|foo/..}}|bar]]
16597 [[{{echo|foo~~~~bar}}]]
16598 [[{{echo|foo>bar}}]]
16599 [[{{echo|foo././bar}}]]
16600 [[{{echo|foo{bar}}]]
16601 [[{{echo|foo}bar}}]]
16602 [[{{echo|foo[bar}}]]
16603 [[{{echo|foo]bar}}]]
16604 [[{{echo|foo<bar}}]]
16606 <p>[[./../foo|bar]]
16616 [[foo<a rel="nofollow" class="external autonumber" href="http://example.com">[1]</a>xyz]]
16617 </p><p>[[./../foo|bar]]
16630 <p>[[./../foo|bar]]
16640 [[foo<a rel="mw:ExtLink" class="external autonumber" href="http://example.com"></a>xyz]]</p>
16642 <p>[[<span typeof="mw:Transclusion" data-mw='{"parts":[{"template":{"target":{"wt":"echo","href":"./Template:Echo"},"params":{"1":{"wt":"./../foo"}},"i":0}}]}'>./../foo</span>|bar]]
16643 [[<span typeof="mw:Transclusion" data-mw='{"parts":[{"template":{"target":{"wt":"echo","href":"./Template:Echo"},"params":{"1":{"wt":"foo/."}},"i":0}}]}'>foo/.</span>|bar]]
16644 [[<span typeof="mw:Transclusion" data-mw='{"parts":[{"template":{"target":{"wt":"echo","href":"./Template:Echo"},"params":{"1":{"wt":"foo/.."}},"i":0}}]}'>foo/..</span>|bar]]
16645 [[<span typeof="mw:Transclusion" data-mw='{"parts":[{"template":{"target":{"wt":"echo","href":"./Template:Echo"},"params":{"1":{"wt":"foo~~~~bar"}},"i":0}}]}'>foo~~~~bar</span>]]
16646 [[<span typeof="mw:Transclusion" data-mw='{"parts":[{"template":{"target":{"wt":"echo","href":"./Template:Echo"},"params":{"1":{"wt":"foo>bar"}},"i":0}}]}'>foo>bar</span>]]
16647 [[<span typeof="mw:Transclusion" data-mw='{"parts":[{"template":{"target":{"wt":"echo","href":"./Template:Echo"},"params":{"1":{"wt":"foo././bar"}},"i":0}}]}'>foo././bar</span>]]
16648 [[<span typeof="mw:Transclusion" data-mw='{"parts":[{"template":{"target":{"wt":"echo","href":"./Template:Echo"},"params":{"1":{"wt":"foo{bar"}},"i":0}}]}'>foo{bar</span>]]
16649 [[<span typeof="mw:Transclusion" data-mw='{"parts":[{"template":{"target":{"wt":"echo","href":"./Template:Echo"},"params":{"1":{"wt":"foo}bar"}},"i":0}}]}'>foo}bar</span>]]
16650 [[<span typeof="mw:Transclusion" data-mw='{"parts":[{"template":{"target":{"wt":"echo","href":"./Template:Echo"},"params":{"1":{"wt":"foo[bar"}},"i":0}}]}'>foo[bar</span>]]
16651 [[<span typeof="mw:Transclusion" data-mw='{"parts":[{"template":{"target":{"wt":"echo","href":"./Template:Echo"},"params":{"1":{"wt":"foo]bar"}},"i":0}}]}'>foo]bar</span>]]
16652 [[<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>
16660 <p><a href="/index.php?title=/subpage&action=edit&redlink=1" class="new" title="/subpage (page does not exist)">/subpage</a>
16665 T2561: {{/Subpage}}
16667 subpage title=[[Page]]
16671 <p><a href="/index.php?title=Page/Subpage&action=edit&redlink=1" class="new" title="Page/Subpage (page does not exist)">Page/Subpage</a>
16679 Category:MediaWiki User's Guide
16687 [[:Category:MediaWiki User's Guide]]
16689 <p><a href="/wiki/Category:MediaWiki_User%27s_Guide" title="Category:MediaWiki User's Guide">Category:MediaWiki User's Guide</a>
16698 [[Category:MediaWiki User's Guide]]
16700 cat=MediaWiki_User's_Guide sort=
16702 <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"}}'/>
16706 PAGESINCATEGORY invalid title fatal (r33546 fix)
16708 {{PAGESINCATEGORY:<bogus>}}
16715 Category with different sort key
16719 [[Category:MediaWiki User's Guide|Foo]]
16721 cat=MediaWiki_User's_Guide sort=Foo
16723 <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"}}'/>
16727 Category with identical sort key
16731 [[Category:MediaWiki User's Guide|MediaWiki User's Guide]]
16733 cat=MediaWiki_User's_Guide sort=MediaWiki User's Guide
16735 <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"}}'/>
16739 Category with empty sort key
16744 [[Category:MediaWiki User's Guide|]]
16746 [[Category:MediaWiki User's Guide|MediaWiki User's Guide]]
16750 Category with empty sort key and parentheses
16755 [[Category:Foo (bar)|]]
16757 [[Category:Foo (bar)|Foo]]
16761 Category with link tail
16766 123[[Category:Foo]]456
16768 123[[Category:Foo]]456
16772 Category with template
16777 [[Category:{{echo|Foo}}]]
16779 [[Category:{{echo|Foo}}]]
16783 Category with template in sort key
16788 [[Category:Foo|{{echo|Bar}}]]
16790 [[Category:Foo|{{echo|Bar}}]]
16794 Category with template in sort key and title
16799 [[Category:{{echo|Foo}}|{{echo|Bar}}]]
16801 [[Category:{{echo|Foo}}|{{echo|Bar}}]]
16804 ## We used to, but no longer wt2wt this test since the default serializer
16805 ## will normalize all categories to serialize on their own line.
16806 ## This wikitext usage is going to be fairly uncommon in production and
16807 ## selser will take care of preserving formatting in those scenarios.
16809 Category / paragraph interactions
16813 Foo [[Category:Baz]] Bar
16815 Foo [[Category:Baz]]
16823 [[Category:Baz]] Bar
16836 {{echo|[[Category:Baz]]}}
16849 <p>Foo <link rel="mw:PageProp/Category" href="./Category:Baz"/> Bar</p>
16850 <p>Foo <link rel="mw:PageProp/Category" href="./Category:Baz"/> Bar</p>
16851 <p>Foo <link rel="mw:PageProp/Category" href="./Category:Baz"/> Bar</p>
16852 <p>Foo <link rel="mw:PageProp/Category" href="./Category:Baz"/> Bar</p>
16853 <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>
16854 <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}}]}'/>
16855 <link rel="mw:PageProp/Category" href="./Category:Baz"/>
16858 ## We used to, but no longer wt2wt this test since the default serializer
16859 ## will normalize all categories to serialize on their own line.
16860 ## This wikitext usage is going to be fairly uncommon in production and
16861 ## selser will take care of preserving formatting in those scenarios.
16863 ## The whitespace on the empty line is part of the test. Please do not delete
16865 1. Categories and newlines: All preceding newlines should be suppressed (courtesy T2087)
16871 [[Category:Foo]] and this should be part of same paragraph (not an indent-pre)
16873 {{echo|[[Category:Foo]] and so should this!}}
16875 <p>This and this should be part of same paragraph (not an indent-pre) and so should this!
16880 <link rel="mw:PageProp/Category" href="./Category:Foo"/> and this should be part of same paragraph (not an indent-pre)
16882 <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>
16885 ## Parsoid will not try to wt2wt this while preserving newlines because
16886 ## it suppresses excess newlines within list items -- and we don't want to
16887 ## introduce a special case just for categories, which is, in reality somewhat
16888 ## odd behavior -- categories are unlikely to be used in list items like this
16889 ## in top-level pages and are only likely to show up in template-generated
16890 ## list items where this RT-ing is a non-issue.
16892 ## The whitespace on the empty line is part of the test. Please do not delete
16894 2. Categories and newlines: All preceding newlines should be suppressed (courtesy T2087)
16900 [[Category:Foo]] and this should be part of the same list item
16903 {{echo|[[Category:Foo]] and this should be part of the same list item}}
16905 <ul><li>This and this should be part of the same list item</li>
16906 <li>So should this and this should be part of the same list item</li></ul>
16909 <li>This <link rel="mw:PageProp/Category" href="./Category:Foo"/> and this should be part of the same list item</li>
16910 <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>
16914 ## Newlines and categories that follow the last item of a list
16915 ## are treated differently because this (list followed by categories)
16916 ## is an extremely common pattern on wikis.
16918 3. Categories and newlines: newline suppression for last list item should RT properly
16939 <link rel="mw:PageProp/Category" href="./Category:Foo"/>
16941 <link rel="mw:PageProp/Category" href="./Category:Bar"/>
16942 <link rel="mw:PageProp/Category" href="./Category:Baz"/>
16944 <dl><dd>c</dd></dl>
16946 <link rel="mw:PageProp/Category" href="./Category:C"/>
16948 <dl><dt>d</dt></dl>
16950 <link rel="mw:PageProp/Category" href="./Category:D"/>
16954 4. Categories and newlines: newline suppression for last list item should RT properly
16962 <ul><li><ul><li><ul><li>b</li></ul></li></ul></li></ul></li></ul>
16964 <link rel="mw:PageProp/Category" href="./Category:Foo" data-parsoid='{"stx":"simple","a":{"href":"./Category:Foo"},"sa":{"href":"Category:Foo"}}'/>
16967 ## only wt2html for this to make sure the algo only applies to the rightmost path
16969 5. Categories and newlines: migrateTrailingCategories dom pass should only run on the rightmost path of nested lists
16982 <link rel="mw:PageProp/Category" href="./Category:Foo" data-parsoid='{"stx":"simple","a":{"href":"./Category:Foo"},"sa":{"href":"Category:Foo"}}'/></li></ul></li>
16984 <ul><li>d</li></ul></li></ul>
16985 <link rel="mw:PageProp/Category" href="./Category:Foo" data-parsoid='{"stx":"simple","a":{"href":"./Category:Foo"},"sa":{"href":"Category:Foo"}}'/>
16988 ## We used to, but no longer wt2wt this test since the default serializer
16989 ## will normalize all categories to serialize on their own line.
16990 ## This wikitext usage is going to be fairly uncommon in production and
16991 ## selser will take care of preserving formatting in those scenarios.
16993 6. Categories and newlines: migrateTrailingCategories dom pass should not migrate categories not preceded by newlines
16997 *a [[Category:Foo]]
16999 <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>
17002 # This test also demonstrates because of newline+category tunneling
17003 # through the list hander, template wrapping doesn't expand to the
17004 # containing list when the list item swallows the category.
17006 7. Categories and newlines: migrateTrailingCategories dom pass should leave template content alone
17011 <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
17012 </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>
17016 8. Categories and newlines: migrateTrailingCategories dom pass should not get tripped by intervening templates
17020 {{echo|[[Category:Foo]]
17024 <ul><li>a</li></ul>
17026 <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">
17027 </span><link rel="mw:PageProp/Category" href="./Category:Bar" about="#mwt1" data-parsoid='{"stx":"simple","a":{"href":"./Category:Bar"},"sa":{"href":"Category:Bar"}}'/>
17028 <link rel="mw:PageProp/Category" href="./Category:Baz" data-parsoid='{"stx":"simple","a":{"href":"./Category:Baz"},"sa":{"href":"Category:Baz"}}'/>
17032 Categories and newlines: migrateTrailingCategories dom pass should not get tripped by comments and whitespace
17036 [[Category:Bar]]<!--boo1--> <!--boo2-->
17037 [[Category:Baz]]<!--boo3--> <!--boo4-->
17039 <ul><li>a</li></ul>
17041 <link rel="mw:PageProp/Category" href="./Category:Bar"/><!--boo1--> <!--boo2-->
17042 <link rel="mw:PageProp/Category" href="./Category:Baz"/><!--boo3--> <!--boo4-->
17046 Categories and newlines: should behave properly with linkprefix (T87753)
17061 <link rel="mw:PageProp/Category" href="./تصنيف:Foo"/>
17062 <link rel="mw:PageProp/Category" href="./تصنيف:Bar"/>
17066 No regressions on internal links following category (T174639)
17068 parsoid=wt2html,html2html
17070 [[Category:Foo]]<div>a
17075 <a href="/wiki/Foo" title="Foo">Foo</a></div>
17078 <link rel="mw:PageProp/Category" href="./Category:Foo"/><div>a
17080 <a rel="mw:WikiLink" href="./Foo" title="Foo">Foo</a></div>
17083 # Note that Parsoid differs slightly from PHP due to T175421
17085 11. Special case where only newlines separate links (T175416)
17087 parsoid=wt2html,html2html
17091 [[Foo]][[es:Alimento]]
17096 <a href="/wiki/Foo" title="Foo">Foo</a>
17097 </p><p><a href="/wiki/Foo" title="Foo">Foo</a>
17100 <link rel="mw:PageProp/Category" href="./Category:Foo"/>
17102 <p><a rel="mw:WikiLink" href="./Foo" title="Foo">Foo</a></p><link rel="mw:PageProp/Language" href="http://es.wikipedia.org/wiki/Alimento"/>
17104 <p><a rel="mw:WikiLink" href="./Foo" title="Foo">Foo</a></p>
17108 Category links with multiple namespaces
17110 [[Category:Project:Foo]]
17112 <link rel="mw:PageProp/Category" href="./Category:Project:Foo" />
17116 Parsoid: Serialize link to category page with colon escape
17120 [[:Category:Foo|Bar]]
17122 <p><a href="/index.php?title=Category:Foo&action=edit&redlink=1" class="new" title="Category:Foo (page does not exist)">Category:Foo</a>
17123 <a href="/index.php?title=Category:Foo&action=edit&redlink=1" class="new" title="Category:Foo (page does not exist)">Bar</a>
17127 <a rel="mw:WikiLink" href="./Category:Foo" title="Category:Foo">Category:Foo</a>
17128 <a rel="mw:WikiLink" href="./Category:Foo" title="Category:Foo">Bar</a>
17132 # We used to, but no longer wt2wt this test since the default serializer
17133 # will normalize all categories to serialize on their own line.
17134 # This wikitext usage is going to be fairly uncommon in production and
17135 # selser will take care of preventing whitespace insertion if this
17136 # occurs in an article.
17138 # html2html disabled for the same reason (whitespace insertion between
17141 # html2wt disabled because it localizes the "Category" namespace.
17143 Link prefix/suffixes aren't applied to category links
17153 <p>x<link rel="mw:PageProp/Category" href="./Flokkur:Foo" data-parsoid=""/>y</p>
17157 Link prefix/suffixes aren't applied to language links
17167 <p>x<link rel="mw:PageProp/Language" href="http://es.wikipedia.org/wiki/Foo" data-parsoid=""/>y</p>
17171 Parsoid: Serialize link to file page with colon escape
17175 [[:File:Foo.png|Bar]]
17177 <p><a href="/index.php?title=File:Foo.png&action=edit&redlink=1" class="new" title="File:Foo.png (page does not exist)">File:Foo.png</a>
17178 <a href="/index.php?title=File:Foo.png&action=edit&redlink=1" class="new" title="File:Foo.png (page does not exist)">Bar</a>
17182 <a rel="mw:WikiLink" href="./File:Foo.png" title="File:Foo.png">File:Foo.png</a>
17183 <a rel="mw:WikiLink" href="./File:Foo.png" title="File:Foo.png">Bar</a>
17188 Parsoid: Serialize a genuine category link without colon escape
17191 [[Category:Foo|Bar]]
17194 <link rel="mw:PageProp/Category" href="./Category:Foo">
17195 <link rel="mw:PageProp/Category" href="./Category:Foo#Bar">
17199 Normalize hrefs properly before testing for invalid link targets (T72894)
17203 <link rel="mw:PageProp/Category" href="./Category:Toxine_bactérienne"/>
17205 [[Category:Toxine bactérienne]]
17209 Parsoid: Defaultsort
17211 {{DEFAULTSORT:Foo}}
17213 <meta property="mw:PageProp/categorydefaultsort" content="Foo"/>
17216 # NOTE: mw:ExpandedAttrs is not the best typeof here. mw:Transclusion is better.
17217 # But, this is a limitation of our representation and is documented in
17218 # TemplateHandler.js in processSpecialMagicWord
17220 Parsoid: Defaultsort (template-generated)
17222 {{{{echo|DEFAULTSORT}}:Foo}}
17224 <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"}]]}'/>
17228 ### Inter-language links
17231 Interlanguage links
17239 es:Alimento fr:Nourriture zh:食品
17241 <link rel="mw:PageProp/Language" href="http://es.wikipedia.org/wiki/Alimento"/>
17242 <link rel="mw:PageProp/Language" href="http://fr.wikipedia.org/wiki/Nourriture"/>
17243 <link rel="mw:PageProp/Language" href="http://zh.wikipedia.org/wiki/食品"/>
17247 Duplicate interlanguage links (T26502)
17258 <link rel="mw:PageProp/Language" href="http://es.wikipedia.org/wiki/1"/>
17259 <link rel="mw:PageProp/Language" href="http://es.wikipedia.org/wiki/2"/>
17260 <link rel="mw:PageProp/Language" href="http://fr.wikipedia.org/wiki/1"/>
17261 <link rel="mw:PageProp/Language" href="http://fr.wikipedia.org/wiki/2"/>
17268 Basic section headings
17275 ===Smaller headline===
17278 <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>
17281 <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>
17284 <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>
17290 Section headings with TOC
17293 ===Subheadline 1===
17294 =====Skipping a level=====
17295 ======Skipping a level======
17299 ===Another headline===
17301 <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>
17303 <li class="toclevel-1 tocsection-1"><a href="#Headline_1"><span class="tocnumber">1</span> <span class="toctext">Headline 1</span></a>
17305 <li class="toclevel-2 tocsection-2"><a href="#Subheadline_1"><span class="tocnumber">1.1</span> <span class="toctext">Subheadline 1</span></a>
17307 <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>
17309 <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>
17316 <li class="toclevel-1 tocsection-5"><a href="#Headline_2"><span class="tocnumber">2</span> <span class="toctext">Headline 2</span></a>
17318 <li class="toclevel-2 tocsection-6"><a href="#Another_headline"><span class="tocnumber">2.1</span> <span class="toctext">Another headline</span></a></li>
17324 <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>
17325 <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>
17326 <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>
17327 <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>
17328 <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>
17331 <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>
17336 TOC anchors don't collide
17344 <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>
17346 <li class="toclevel-1 tocsection-1"><a href="#Headline_2"><span class="tocnumber">1</span> <span class="toctext">Headline 2</span></a></li>
17347 <li class="toclevel-1 tocsection-2"><a href="#Headline"><span class="tocnumber">2</span> <span class="toctext">Headline</span></a></li>
17348 <li class="toclevel-1 tocsection-3"><a href="#Headline_2_2"><span class="tocnumber">3</span> <span class="toctext">Headline 2</span></a></li>
17349 <li class="toclevel-1 tocsection-4"><a href="#Headline_3"><span class="tocnumber">4</span> <span class="toctext">Headline</span></a></li>
17353 <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>
17354 <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>
17355 <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>
17356 <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>
17360 # perl -e 'print "="x$_," Level $_ heading","="x$_,"\n" for 1..10'
17361 # Parsoid html2wt direction adds <nowiki> for level 7 and up.
17363 Handling of sections up to level 6 and beyond
17368 ==Level 2 Heading==
17369 ===Level 3 Heading===
17370 ====Level 4 Heading====
17371 =====Level 5 Heading=====
17372 ======Level 6 Heading======
17373 =======Level 7 Heading=======
17374 ========Level 8 Heading========
17375 =========Level 9 Heading=========
17376 ==========Level 10 Heading==========
17378 <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>
17380 <li class="toclevel-1 tocsection-1"><a href="#Level_1_Heading"><span class="tocnumber">1</span> <span class="toctext">Level 1 Heading</span></a>
17382 <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>
17384 <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>
17386 <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>
17388 <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>
17390 <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>
17391 <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>
17392 <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>
17393 <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>
17394 <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>
17408 <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>
17409 <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>
17410 <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>
17411 <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>
17412 <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>
17413 <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>
17414 <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>
17415 <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>
17416 <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>
17417 <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>
17420 <h1 id="Level_1_Heading" data-parsoid='{}'>Level 1 Heading</h1>
17421 <h2 id="Level_2_Heading" data-parsoid='{}'>Level 2 Heading</h2>
17422 <h3 id="Level_3_Heading" data-parsoid='{}'>Level 3 Heading</h3>
17423 <h4 id="Level_4_Heading" data-parsoid='{}'>Level 4 Heading</h4>
17424 <h5 id="Level_5_Heading" data-parsoid='{}'>Level 5 Heading</h5>
17425 <h6 id="Level_6_Heading" data-parsoid='{}'>Level 6 Heading</h6>
17426 <h6 id="=Level_7_Heading=" data-parsoid='{}'><span id=".3DLevel_7_Heading.3D" typeof="mw:FallbackId"></span>=Level 7 Heading=</h6>
17427 <h6 id="==Level_8_Heading==" data-parsoid='{}'><span id=".3D.3DLevel_8_Heading.3D.3D" typeof="mw:FallbackId"></span>==Level 8 Heading==</h6>
17428 <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>
17429 <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>
17433 TOC regression (T11764)
17437 ====title 1.1.1====
17442 <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>
17444 <li class="toclevel-1 tocsection-1"><a href="#title_1"><span class="tocnumber">1</span> <span class="toctext">title 1</span></a>
17446 <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>
17448 <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>
17451 <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>
17454 <li class="toclevel-1 tocsection-5"><a href="#title_2"><span class="tocnumber">2</span> <span class="toctext">title 2</span></a>
17456 <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>
17462 <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>
17463 <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>
17464 <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>
17465 <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>
17466 <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>
17467 <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>
17472 TOC for heading containing <span id="..."></span> (T96153)
17475 ==<span id="old-anchor"></span>New title==
17477 <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>
17479 <li class="toclevel-1 tocsection-1"><a href="#New_title"><span class="tocnumber">1</span> <span class="toctext">New title</span></a></li>
17483 <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>
17488 TOC with wgMaxTocLevel=3 (T8204)
17494 ====title 1.1.1====
17499 <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>
17501 <li class="toclevel-1 tocsection-1"><a href="#title_1"><span class="tocnumber">1</span> <span class="toctext">title 1</span></a>
17503 <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>
17504 <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>
17507 <li class="toclevel-1 tocsection-5"><a href="#title_2"><span class="tocnumber">2</span> <span class="toctext">title 2</span></a>
17509 <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>
17515 <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>
17516 <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>
17517 <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>
17518 <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>
17519 <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>
17520 <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>
17525 TOC with wgMaxTocLevel=3 and two level four headings (T8204)
17531 ====Section 1.1.1====
17532 ====Section 1.1.1.1====
17535 <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>
17537 <li class="toclevel-1 tocsection-1"><a href="#Section_1"><span class="tocnumber">1</span> <span class="toctext">Section 1</span></a>
17539 <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>
17542 <li class="toclevel-1 tocsection-5"><a href="#Section_2"><span class="tocnumber">2</span> <span class="toctext">Section 2</span></a></li>
17546 <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>
17547 <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>
17548 <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>
17549 <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>
17550 <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>
17556 Resolving duplicate section names
17561 <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>
17562 <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>
17567 Resolving duplicate section names with differing case (T12721)
17572 <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>
17573 <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>
17585 Template with sections, __NOTOC__
17592 <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>
17593 <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>
17594 <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>
17595 <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>
17600 __NOEDITSECTION__ keyword
17606 <h2><span class="mw-headline" id="Section_1">Section 1</span></h2>
17607 <h2><span class="mw-headline" id="Section_2">Section 2</span></h2>
17612 Link inside a section heading
17614 ==Section with a [[Main Page|link]] in it==
17616 <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>
17621 TOC regression (T14077)
17628 <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>
17630 <li class="toclevel-1 tocsection-1"><a href="#title_1"><span class="tocnumber">1</span> <span class="toctext">title 1</span></a>
17632 <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>
17635 <li class="toclevel-1 tocsection-3"><a href="#title_2"><span class="tocnumber">2</span> <span class="toctext">title 2</span></a></li>
17639 <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>
17640 <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>
17641 <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>
17646 T3219 URL next to image (good)
17648 http://example.com [[File:Foobar.jpg]]
17650 <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>
17653 <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>
17656 # Parsoid doesn't wt2wt this cleanly because it adds <nowiki>s.
17658 Short headings with trailing space should match behavior of Parser::doHeadings (T21910)
17660 parsoid=wt2html,html2html
17663 The line above must have a trailing space!
17666 But just in case it doesn't...
17668 <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>
17669 <p>The line above must have a trailing space!
17671 <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>
17672 <p>But just in case it doesn't...
17675 <h1 id="="><span id=".3D" typeof="mw:FallbackId"></span>=</h1>
17676 <p>The line above must have a trailing space!</p>
17677 <h1 id="=_2"><span id=".3D_2" typeof="mw:FallbackId"></span>=</h1> <!--
17679 <p>But just in case it doesn't...</p>
17683 Header with special characters (T27462)
17685 The tooltips shall not show entities to the user (ie. be double escaped)
17702 <p>The tooltips shall not show entities to the user (ie. be double escaped)
17704 <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>
17706 <li class="toclevel-1 tocsection-1"><a href="#text_.3E_text"><span class="tocnumber">1</span> <span class="toctext">text > text</span></a></li>
17707 <li class="toclevel-1 tocsection-2"><a href="#text_.3C_text"><span class="tocnumber">2</span> <span class="toctext">text < text</span></a></li>
17708 <li class="toclevel-1 tocsection-3"><a href="#text_.26_text"><span class="tocnumber">3</span> <span class="toctext">text & text</span></a></li>
17709 <li class="toclevel-1 tocsection-4"><a href="#text_.27_text"><span class="tocnumber">4</span> <span class="toctext">text ' text</span></a></li>
17710 <li class="toclevel-1 tocsection-5"><a href="#text_.22_text"><span class="tocnumber">5</span> <span class="toctext">text " text</span></a></li>
17714 <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>
17717 <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>
17720 <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>
17723 <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>
17726 <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>
17730 <p>The tooltips shall not show entities to the user (ie. be double escaped)</p>
17732 <h2 id="text_>_text"><span id="text_.3E_text" typeof="mw:FallbackId"></span>text > text</h2>
17735 <h2 id="text_<_text"><span id="text_.3C_text" typeof="mw:FallbackId"></span>text < text</h2>
17738 <h2 id="text_&_text"><span id="text_.26_text" typeof="mw:FallbackId"></span>text & text</h2>
17741 <h2 id="text_'_text"><span id="text_.27_text" typeof="mw:FallbackId"></span>text ' text</h2>
17744 <h2 id='text_"_text'><span id="text_.22_text" typeof="mw:FallbackId"></span>text " text</h2>
17749 Header with space, plus and underscore as entity
17751 Id should not contain + for spaces
17753 ==Space between Text==
17756 ==Space-Entity between Text==
17759 ==Plus+between+Text==
17762 ==Plus-Entity+between+Text==
17765 ==Underscore_between_Text==
17768 ==Underscore-Entity_between_Text==
17771 [[#Space between Text]]
17772 [[#Space-Entity between Text]]
17773 [[#Plus+between+Text]]
17774 [[#Plus-Entity+between+Text]]
17775 [[#Underscore_between_Text]]
17776 [[#Underscore-Entity_between_Text]]
17778 <p>Id should not contain + for spaces
17780 <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>
17782 <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>
17783 <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>
17784 <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>
17785 <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>
17786 <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>
17787 <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>
17791 <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>
17794 <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>
17797 <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>
17800 <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>
17803 <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>
17806 <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>
17808 </p><p><a href="#Space_between_Text">#Space between Text</a>
17809 <a href="#Space-Entity_between_Text">#Space-Entity between Text</a>
17810 <a href="#Plus.2Bbetween.2BText">#Plus+between+Text</a>
17811 <a href="#Plus-Entity.2Bbetween.2BText">#Plus-Entity+between+Text</a>
17812 <a href="#Underscore_between_Text">#Underscore_between_Text</a>
17813 <a href="#Underscore-Entity_between_Text">#Underscore-Entity_between_Text</a>
17816 <p>Id should not contain + for spaces</p>
17818 <h2 id="Space_between_Text">Space between Text</h2>
17821 <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>
17824 <h2 id="Plus+between+Text"><span id="Plus.2Bbetween.2BText" typeof="mw:FallbackId"></span>Plus+between+Text</h2>
17827 <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>
17830 <h2 id="Underscore_between_Text">Underscore_between_Text</h2>
17833 <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>
17836 <p><a rel="mw:WikiLink" href="./Parser_test#Space_between_Text" data-parsoid='{"stx":"simple","a":{"href":"./Parser_test#Space_between_Text"},"sa":{"href":"#Space between Text"}}'>#Space between Text</a>
17837 <a rel="mw:WikiLink" href="./Parser_test#Space-Entity_between_Text" data-parsoid='{"stx":"simple","a":{"href":"./Parser_test#Space-Entity_between_Text"},"sa":{"href":"#Space-Entity&#32;between&#32;Text"}}'>#Space-Entity between Text</a>
17838 <a rel="mw:WikiLink" href="./Parser_test#Plus+between+Text" data-parsoid='{"stx":"simple","a":{"href":"./Parser_test#Plus+between+Text"},"sa":{"href":"#Plus+between+Text"}}'>#Plus+between+Text</a>
17839 <a rel="mw:WikiLink" href="./Parser_test#Plus-Entity+between+Text" data-parsoid='{"stx":"simple","a":{"href":"./Parser_test#Plus-Entity+between+Text"},"sa":{"href":"#Plus-Entity&#43;between&#43;Text"}}'>#Plus-Entity+between+Text</a>
17840 <a rel="mw:WikiLink" href="./Parser_test#Underscore_between_Text" data-parsoid='{"stx":"simple","a":{"href":"./Parser_test#Underscore_between_Text"},"sa":{"href":"#Underscore_between_Text"}}'>#Underscore_between_Text</a>
17841 <a rel="mw:WikiLink" href="./Parser_test#Underscore-Entity_between_Text" data-parsoid='{"stx":"simple","a":{"href":"./Parser_test#Underscore-Entity_between_Text"},"sa":{"href":"#Underscore-Entity&#95;between&#95;Text"}}'>#Underscore-Entity_between_Text</a></p>
17844 # Parsoid html2wt disabled because it adds padding spaces around =
17846 Headers with excess '=' characters
17847 (Are similar tests necessary beyond the 1st level?)
17849 parsoid=wt2html,wt2wt,html2html
17853 =''italic'' heading==
17854 ==''italic'' heading=
17856 <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>
17858 <li class="toclevel-1 tocsection-1"><a href="#foo.3D"><span class="tocnumber">1</span> <span class="toctext">foo=</span></a></li>
17859 <li class="toclevel-1 tocsection-2"><a href="#.3Dfoo"><span class="tocnumber">2</span> <span class="toctext">=foo</span></a></li>
17860 <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>
17861 <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>
17865 <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>
17866 <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>
17867 <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>
17868 <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>
17871 <h1 id="foo="><span id="foo.3D" typeof="mw:FallbackId"></span>foo=</h1>
17872 <h1 id="=foo"><span id=".3Dfoo" typeof="mw:FallbackId"></span>=foo</h1>
17873 <h1 id="italic_heading="><span id="italic_heading.3D" typeof="mw:FallbackId"></span><i>italic</i> heading=</h1>
17874 <h1 id="=italic_heading"><span id=".3Ditalic_heading" typeof="mw:FallbackId"></span>=<i>italic</i> heading</h1>
17878 HTML headers vs TOC (T25393)
17879 (__NOEDITSECTION__ for clearer output, doesn't matter here)
17891 <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>
17893 <li class="toclevel-1"><a href="#Header_1"><span class="tocnumber">1</span> <span class="toctext">Header 1</span></a>
17895 <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>
17896 <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>
17899 <li class="toclevel-1"><a href="#Header_2"><span class="tocnumber">2</span> <span class="toctext">Header 2</span></a>
17901 <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>
17902 <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>
17908 <h1><span class="mw-headline" id="Header_1">Header 1</span></h1>
17909 <h2><span class="mw-headline" id="Header_1.1">Header 1.1</span></h2>
17910 <h2><span class="mw-headline" id="Header_1.2">Header 1.2</span></h2>
17911 <h1><span class="mw-headline" id="Header_2">Header 2
17913 <h2><span class="mw-headline" id="Header_2.1">Header 2.1</span></h2>
17914 <h2><span class="mw-headline" id="Header_2.2">Header 2.2</span></h2>
17917 <h1 id="Header_1" data-parsoid='{"stx":"html"}'>Header 1</h1>
17918 <h2 id="Header_1.1" data-parsoid='{}'>Header 1.1</h2>
17919 <h2 id="Header_1.2" data-parsoid='{}'>Header 1.2</h2>
17921 <h1 id="Header_2" data-parsoid='{"stx":"html"}'>Header 2
17923 <h2 id="Header_2.1" data-parsoid='{}'>Header 2.1</h2>
17924 <h2 id="Header_2.2" data-parsoid='{}'>Header 2.2</h2>
17925 <meta property="mw:PageProp/noeditsection"/>
17929 Single-line or multiline-comments can follow headings
17931 parsoid=wt2html,wt2wt
17939 <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>
17940 <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>
17941 <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>
17944 <h2 id="foo">foo</h2><!---->
17945 <h2 id="bar">bar</h2><!--c1-->
17946 <h2 id="baz">baz</h2><!--
17952 T3219 URL next to image (broken)
17954 http://example.com[[File:Foobar.jpg]]
17956 <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>
17959 <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>
17963 T3186 news: in the middle of text
17965 http://en.wikinews.org/wiki/Wikinews:Workplace
17967 <p><a rel="nofollow" class="external free" href="http://en.wikinews.org/wiki/Wikinews:Workplace">http://en.wikinews.org/wiki/Wikinews:Workplace</a>
17973 Namespaced link must have a title
17982 Namespaced link must have a title (bad fragment version)
17984 [[Project:#fragment]]
17986 <p>[[Project:#fragment]]
17992 ### HTML tags and HTML attributes
17996 div with no attributes
17998 <div>HTML rocks</div>
18000 <div>HTML rocks</div>
18005 div with double-quoted attribute
18007 <div id="rock">HTML rocks</div>
18009 <div id="rock">HTML rocks</div>
18014 div with single-quoted attribute
18016 <div id='rock'>HTML rocks</div>
18018 <div id="rock">HTML rocks</div>
18023 div with unquoted attribute
18025 <div id=rock>HTML rocks</div>
18027 <div id="rock">HTML rocks</div>
18032 div with illegal double attributes
18034 <div id="a" id="b">HTML rocks</div>
18036 <div id="b">HTML rocks</div>
18041 div with empty attribute value, space before equals
18043 parsoid=wt2html,html2html
18045 <div class =>HTML rocks</div>
18047 <div class="">HTML rocks</div>
18050 <div class="" data-parsoid='{"stx":"html"}'>HTML rocks</div>
18054 div with multiple empty attribute values
18056 wgFragmentMode=[ 'html5', 'legacy' ]
18058 parsoid=wt2html,html2html
18060 <div id= title=>HTML rocks</div>
18062 <div id="title=">HTML rocks</div>
18065 <div id="title=" data-parsoid='{"stx":"html"}'>HTML rocks</div>
18068 # FIXME Parsoid doesn't actually match PHP here.
18069 # Probably we should use the synthetic <foo /> or <indicator>
18070 # extensions for this test, which are enabled when running parser tests.
18072 Extension tag in attribute value
18074 <span title="<translate>123</translate>">ok</span>
18075 !! html/php+disabled
18076 <p><span title="<translate>123</translate>">ok</span>
18079 <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>
18083 table with multiple empty attribute values
18085 parsoid=wt2html,html2html
18091 <table title="id=">
18097 <table title="id=">
18098 <tbody><tr><td>hi</td></tr>
18103 div with braces in attribute value
18105 <div title="{}">Foo</div>
18107 <div title="{}">Foo</div>
18110 <div title="{}">Foo</div>
18114 div with empty attribute value, no space before equals
18116 parsoid=wt2html,html2html
18118 <div class=>HTML rocks</div>
18120 <div class="">HTML rocks</div>
18123 <div class="">HTML rocks</div>
18127 HTML multiple attributes correction
18129 <p class="error" class="awesome">Awesome!</p>
18131 <p class="awesome">Awesome!</p>
18136 Table multiple attributes correction
18139 !+ class="error" class="awesome"|status
18144 <th class="awesome">status
18152 <DIV ID="x">HTML ROCKS</DIV>
18154 <div id="x">HTML ROCKS</div>
18159 Non-ASCII pseudo-tags are rendered as text
18168 Pseudo-tag with URL 'name' renders as url link
18170 <http://example.com/>
18172 <p><<a rel="nofollow" class="external free" href="http://example.com/">http://example.com/</a>>
18177 text with amp in the middle of nowhere
18181 <p>Remember AT&T?
18186 text with character entity: eacute
18188 I always thought é was a cute letter.
18190 <p>I always thought é was a cute letter.
18195 text with entity-escaped character entity-like string: eacute
18197 I always thought &eacute; was a cute letter.
18199 <p>I always thought &eacute; was a cute letter.
18204 text with undefined character entity: xacute
18206 I always thought &xacute; was a cute letter.
18208 <p>I always thought &xacute; was a cute letter.
18215 <data value="5">five</data>
18216 <time datetime="2000-01-01T00:00Z">The new millenium started</time>
18217 <mark>This highlighted text</mark>
18219 <p><data value="5">five</data>
18220 <time datetime="2000-01-01T00:00Z">The new millenium started</time>
18221 <mark>This highlighted text</mark>
18226 HTML tag with leading space is parsed as text
18230 <p>< div>foo< /div>
18234 ## FIXME: The untrimmed attribute in Parsoid is T205737
18236 Element with broken attribute syntax
18240 <div style=" style="123">hi</div>
18243 <div style="style=">hi</div>
18247 <div style=" style=" data-parsoid='{"stx":"html","a":{"123\"":null},"sa":{"123\"":""}}'>hi</div>
18248 <div data-parsoid='{"stx":"html","a":{"=":null},"sa":{"=":""}}'>ho</div>
18252 ### Nesting tests (see T43545, T52604, T53081)
18255 # This test case is fixed in Parsoid by domino 1.0.12. (T52604)
18256 # Note that html2wt is considerably more difficult if we use <b> in
18257 # the test case, instead of <small>
18259 Ensure that HTML adoption agency algorithm is properly implemented.
18261 <small>X<small>Y</small>Z</small>
18263 <p><small>X<small>Y</small>Z</small>
18267 # This was T43545 in the PHP parser.
18271 <kbd>X<kbd>Y</kbd>Z</kbd>
18273 <p><kbd>X<kbd>Y</kbd>Z</kbd>
18277 # The following cases were T53081 in the PHP parser.
18278 # Note that there are some other nestable tags (b, i, etc) which are
18279 # not covered; see T53081 for discussion.
18284 <em>X<em>Y</em>Z</em>
18286 <p><em>X<em>Y</em>Z</em>
18291 Nesting of <strong>
18293 <strong>X<strong>Y</strong>Z</strong>
18295 <p><strong>X<strong>Y</strong>Z</strong>
18304 <p><q>X<q>Y</q>Z</q>
18311 <ruby>X<ruby>Y</ruby>Z</ruby>
18313 <p><ruby>X<ruby>Y</ruby>Z</ruby>
18320 <bdo>X<bdo>Y</bdo>Z</bdo>
18322 <p><bdo>X<bdo>Y</bdo>Z</bdo>
18334 [[Media:Foobar.jpg]]
18335 [[Media:Video.ogv]]
18336 [[:Media:Video.ogv]]
18338 <p><a href="http://example.com/images/3/3a/Foobar.jpg" class="internal" title="Foobar.jpg">Media:Foobar.jpg</a>
18339 <a href="http://example.com/images/0/00/Video.ogv" class="internal" title="Video.ogv">Media:Video.ogv</a>
18340 <a href="http://example.com/images/0/00/Video.ogv" class="internal" title="Video.ogv">Media:Video.ogv</a>
18343 <p><a rel="mw:MediaLink" href="//example.com/images/3/3a/Foobar.jpg" resource="./Media:Foobar.jpg" title="Foobar.jpg">Media:Foobar.jpg</a>
18344 <a rel="mw:MediaLink" href="//example.com/images/0/00/Video.ogv" resource="./Media:Video.ogv" title="Video.ogv">Media:Video.ogv</a>
18345 <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>
18349 Media link with text
18351 [[Media:Foobar.jpg|A neat file to look at]]
18353 <p><a href="http://example.com/images/3/3a/Foobar.jpg" class="internal" title="Foobar.jpg">A neat file to look at</a>
18356 <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>
18360 Localized media link
18364 [[Miðill:Foobar.jpg]]
18366 [[Miðill:Foobar.jpg|Icelandic]]
18368 <p><a href="http://example.com/images/3/3a/Foobar.jpg" class="internal" title="Foobar.jpg">Miðill:Foobar.jpg</a>
18369 </p><p><a href="http://example.com/images/3/3a/Foobar.jpg" class="internal" title="Foobar.jpg">Icelandic</a>
18372 <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>
18373 <p><a rel="mw:MediaLink" href="//example.com/images/3/3a/Foobar.jpg" resource="./Miðill:Foobar.jpg" title="Foobar.jpg">Icelandic</a></p>
18376 # FIXME: this is still bad HTML tag nesting
18377 # FIXME: doBlockLevels won't wrap this in a paragraph because it contains a div
18378 # Parsoid & Remex fix the p-wrapping since they operate on the DOM.
18380 Media link with nasty text
18382 parsoid=wt2html,html2html
18384 [[Media:Foobar.jpg|Safe Link<div style=display:none>" onmouseover="alert(document.cookie)" onfoo="</div>]]
18386 <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>
18389 <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>
18391 <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>
18395 Media link from missing resource (parsoid-only)
18399 <a rel="mw:MediaLink" href="http://example.com/images/3/3a/Foobar.jpg">Bat!</a>
18401 [[Media:Foobar.jpg|Bat!]]
18405 Media link from missing resource, localized (parsoid-only)
18410 <a rel="mw:MediaLink" href="http://example.com/images/3/3a/Foobar.jpg">Bat!</a>
18412 [[Miðill:Foobar.jpg|Bat!]]
18415 # This is a sanity test to ensure we don't crash or choke when given
18416 # old cached 1.7.0 HTML for media links; we don't require that the
18417 # result be "valid" because wt2wt was completely broken in 1.7.0
18419 Media link from old 1.7.0 DOM spec (crash test, parsoid-only) T198511
18423 <p>This is what Parsoid would emit (and we still handle this HTML fine):</p>
18424 <p><a rel="mw:MediaLink" href="//example.com/images/3/3a/Foobar.jpg" title="Foobar.jpg">A neat file to look at</a></p>
18425 <p>But VisualEditor would mangle the rel attribute, and give us back this:</p>
18426 <p><a rel="mw:ExtLink" href="//example.com/images/3/3a/Foobar.jpg" title="Foobar.jpg">A neat file to look at</a></p>
18427 <p>But at least we don't crash when trying to handle the mangled HTML!</p>
18429 This is what Parsoid would emit (and we still handle this HTML fine):
18431 [[Media:Foobar.jpg|A neat file to look at]]
18433 But VisualEditor would mangle the rel attribute, and give us back this:
18435 [//example.com/images/3/3a/Foobar.jpg A neat file to look at]
18437 But at least we don't crash when trying to handle the mangled HTML!
18441 Media link to nonexistent file (T3702)
18443 [[Media:No such.jpg]]
18444 [[Media:No_such file.jpg]]
18446 <p><a href="/index.php?title=Special:Upload&wpDestFile=No_such.jpg" class="new" title="No such.jpg">Media:No such.jpg</a>
18447 <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>
18450 <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>
18451 <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>
18455 Image link to nonexistent file (T3850 - good)
18457 [[File:No_such.jpg]]
18459 <p><a href="/index.php?title=Special:Upload&wpDestFile=No_such.jpg" class="new" title="File:No such.jpg">File:No such.jpg</a>
18462 <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>
18466 :Image link to nonexistent file (T3850 - bad)
18468 [[:Image:No such.jpg]]
18470 <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>
18473 <p><a rel="mw:WikiLink" href="./File:No_such.jpg" title="File:No such.jpg">Image:No such.jpg</a></p>
18477 Character reference normalization in link text (T3938)
18479 [[Main Page|this&that]]
18481 <p><a href="/wiki/Main_Page" title="Main Page">this&that</a>
18488 Test for unicode normalization
18490 The page's name is U+05d0 U+05b7, with non-canonical form U+FB2E
18494 (T21451) Links should refer to the normalized form.
18502 <p><a href="/wiki/%D7%90%D6%B7" title="אַ">אַ</a>
18503 <a href="/wiki/%D7%90%D6%B7" title="אַ">אַ</a>
18504 <a href="/wiki/%D7%90%D6%B7" title="אַ">אַ</a>
18505 <a href="/wiki/%D7%90%D6%B7" title="אַ">אַ</a>
18506 <a href="/wiki/%D7%90%D6%B7" title="אַ">אַ</a>
18511 Empty attribute crash test (T4067)
18513 <font color="">foo</font>
18515 <p><font color="">foo</font>
18520 Empty attribute crash test single-quotes (T4067)
18522 <font color=''>foo</font>
18524 <p><font color="">foo</font>
18529 Attribute test: equals, then nothing
18531 parsoid=wt2html,html2html
18533 <font color=>foo</font>
18535 <p><font color="">foo</font>
18538 <p><font color="" data-parsoid='{"stx":"html"}'>foo</font></p>
18542 Attribute test: unquoted value
18544 parsoid=wt2html,html2html
18546 <font color=x>foo</font>
18548 <p><font color="x">foo</font>
18551 <p><font color="x" data-parsoid='{"stx":"html"}'>foo</font></p>
18555 Attribute test: unquoted but illegal value (hash)
18557 <font color=#x>foo</font>
18559 <p><font color="#x">foo</font>
18563 # Parsoid does not serialize to empty attribute syntax,
18564 # so wt2wt and html2wt cases are skipped
18566 Attribute test: no value (T54330)
18568 parsoid=wt2html,html2html
18570 <font color>foo</font>
18572 <p><font color="">foo</font>
18575 <p><font color="">foo</font></p>
18579 T4095: link with three closing brackets
18583 <p><a href="/wiki/Main_Page" title="Main Page">Main Page</a>]
18586 <p><a rel="mw:WikiLink" href="./Main_Page" title="Main Page">Main Page</a>]</p>
18590 T4095: link with pipe and three closing brackets
18592 [[Main Page|link]]]
18594 <p><a href="/wiki/Main_Page" title="Main Page">link</a>]
18597 <p><a rel="mw:WikiLink" href="./Main_Page" title="Main Page">link</a>]</p>
18601 T4095: link with pipe and three closing brackets, version 2
18603 [[Main Page|[http://example.com/]]]
18605 <p><a href="/wiki/Main_Page" title="Main Page">[http://example.com/]</a>
18608 <p><a rel="mw:WikiLink" href="./Main_Page" title="Main Page">[http://example.com/]</a></p>
18617 Template:Dangerous attribute
18619 " onmouseover="alert(document.cookie)
18623 Template:Dangerous style attribute
18625 border-size: expression(alert(document.cookie))
18631 <div style="float: right; {{{1}}}">Magic div</div>
18635 T4304: HTML attribute safety (safe template; regression T4309)
18637 <div title="{{test}}"></div>
18639 <div title="This is a test template"></div>
18642 <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>
18645 # Parsoid has enough context to handle this case
18647 T4304: HTML attribute safety (dangerous template; 2309)
18649 <div title="{{dangerous attribute}}"></div>
18651 <div title=""></div>
18654 <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>
18658 T4304: HTML attribute safety (dangerous style template; 2309)
18660 <div style="{{dangerous style attribute}}"></div>
18662 <div style="/* insecure input */"></div>
18665 <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>
18669 T4304: HTML attribute safety (safe parameter; 2309)
18671 {{div style|width: 200px}}
18673 <div style="float: right; width: 200px">Magic div</div>
18676 <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>
18680 T4304: HTML attribute safety (unsafe parameter; 2309)
18682 {{div style|width: expression(alert(document.cookie))}}
18684 <div style="/* insecure input */">Magic div</div>
18687 <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>
18690 ## Parsoid output here differs; needs investigation.
18692 T4304: HTML attribute safety (unsafe breakout parameter; 2309)
18694 {{div style|"><script>alert(document.cookie)</script>}}
18696 <div style="float: right;"><script>alert(document.cookie)</script>">Magic div</div>
18700 ## Parsoid output here differs; needs investigation.
18702 T4304: HTML attribute safety (unsafe breakout parameter 2; 2309)
18704 {{div style|" ><script>alert(document.cookie)</script>}}
18706 <div style="float: right;"><script>alert(document.cookie)</script>">Magic div</div>
18711 T4304: HTML attribute safety (link)
18713 <div title="[[Main Page]]"></div>
18715 <div title="[[Main Page]]"></div>
18718 <div title="[[Main Page]]"></div>
18722 T4304: HTML attribute safety (italics)
18724 <div title="''foobar''"></div>
18726 <div title="''foobar''"></div>
18731 T4304: HTML attribute safety (bold)
18733 <div title="'''foobar'''"></div>
18735 <div title="'''foobar'''"></div>
18740 T4304: HTML attribute safety (ISBN)
18742 <div title="ISBN 1234567890"></div>
18744 <div title="ISBN 1234567890"></div>
18749 T4304: HTML attribute safety (RFC)
18751 <div title="RFC 1234"></div>
18753 <div title="RFC 1234"></div>
18758 T4304: HTML attribute safety (PMID)
18760 <div title="PMID 1234567890"></div>
18762 <div title="PMID 1234567890"></div>
18767 T4304: HTML attribute safety (web link)
18769 <div title="http://example.com/"></div>
18771 <div title="http://example.com/"></div>
18776 T4304: HTML attribute safety (named web link)
18778 <div title="[http://example.com/ link]"></div>
18780 <div title="[http://example.com/ link]"></div>
18783 <div title="[http://example.com/ link]"></div>
18787 T5244: HTML attribute safety (extension; safe)
18789 <div style="<nowiki>background:blue</nowiki>"></div>
18791 <div style="background:blue"></div>
18794 <div style="background:blue" data-parsoid='{"stx":"html","a":{"style":"background:blue"},"sa":{"style":"<nowiki>background:blue</nowiki>"}}'></div>
18798 T5244: HTML attribute safety (extension; unsafe)
18800 <div style="<nowiki>border-left:expression(alert(document.cookie))</nowiki>"></div>
18802 <div style="/* insecure input */"></div>
18805 <div style="/* insecure input */" data-parsoid='{"stx":"html","a":{"style":"/* insecure input */"},"sa":{"style":"<nowiki>border-left:expression(alert(document.cookie))</nowiki>"}}'></div>
18808 # More MSIE fun discovered by Tom Gilder
18811 MSIE CSS safety test: spurious slash
18813 <div style="background-image:u\rl(javascript:alert('boo'))">evil</div>
18815 <div style="/* insecure input */">evil</div>
18818 <div style="/* insecure input */" data-parsoid='{"stx":"html","a":{"style":"/* insecure input */"},"sa":{"style":"background-image:u\\rl(javascript:alert('boo'))"}}'>evil</div>
18822 MSIE CSS safety test: hex code
18824 <div style="background-image:u\72l(javascript:alert('boo'))">evil</div>
18826 <div style="/* insecure input */">evil</div>
18829 <div style="/* insecure input */" data-parsoid='{"stx":"html","a":{"style":"/* insecure input */"},"sa":{"style":"background-image:u\\72l(javascript:alert('boo'))"}}'>evil</div>
18833 MSIE CSS safety test: comment in url
18835 <div style="background-image:u/**/rl(javascript:alert('boo'))">evil</div>
18837 <div style="background-image:u rl(javascript:alert('boo'))">evil</div>
18840 <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>
18844 MSIE CSS safety test: comment in expression
18846 <div style="background-image:expres/**/sion(alert('boo4'))">evil4</div>
18848 <div style="background-image:expres sion(alert('boo4'))">evil4</div>
18851 <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>
18855 CSS safety test (all browsers): vertical tab (T57332 / CVE-2013-4567)
18857 <p style="font-size: 100px; background-image:url\b(https://www.google.com/images/srpr/logo6w.png)">A</p>
18859 <p style="/* invalid control char */">A</p>
18862 <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>
18866 MSIE 6 CSS safety test: Fullwidth (T57332)
18868 <p style="font-size: 100px; color: expression((title='XSSed'),'red')">A</p>
18869 <div style="top:EXPRESSION(alert())">B</div>
18871 <p style="/* insecure input */">A</p>
18872 <div style="/* insecure input */">B</div>
18875 <p style="/* insecure input */" data-parsoid='{"stx":"html","a":{"style":"/* insecure input */"},"sa":{"style":"font-size: 100px; color: expression((title='XSSed'),'red')"}}'>A</p>
18876 <div style="/* insecure input */" data-parsoid='{"stx":"html","a":{"style":"/* insecure input */"},"sa":{"style":"top:EXPRESSION(alert())"}}'>B</div>
18880 MSIE 6 CSS safety test: IPA extensions (T57332)
18882 <div style="background-image:uʀʟ(javascript:alert())">A</div>
18883 <p style="font-size: 100px; color: expʀessɪoɴ((title='XSSed'),'red')">B</p>
18885 <div style="/* insecure input */">A</div>
18886 <p style="/* insecure input */">B</p>
18889 <div style="/* insecure input */" data-parsoid='{"stx":"html","a":{"style":"/* insecure input */"},"sa":{"style":"background-image:uʀʟ(javascript:alert())"}}'>A</div>
18890 <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>
18894 MSIE 6 CSS safety test: sup/sub script (T57332)
18896 <div style="background-image:url⁽javascript:alert())">A</div>
18897 <div style="background-image:url₍javascript:alert())">B</div>
18898 <p style="font-size: 100px; color: expressioⁿ((title='XSSed'),'red')">C</p>
18900 <div style="/* insecure input */">A</div>
18901 <div style="/* insecure input */">B</div>
18902 <p style="/* insecure input */">C</p>
18905 <div style="/* insecure input */" data-parsoid='{"stx":"html","a":{"style":"/* insecure input */"},"sa":{"style":"background-image:url⁽javascript:alert())"}}'>A</div>
18906 <div style="/* insecure input */" data-parsoid='{"stx":"html","a":{"style":"/* insecure input */"},"sa":{"style":"background-image:url₍javascript:alert())"}}'>B</div>
18907 <p style="/* insecure input */" data-parsoid='{"stx":"html","a":{"style":"/* insecure input */"},"sa":{"style":"font-size: 100px; color: expressioⁿ((title='XSSed'),'red')"}}'>C</p>
18913 parsoid=wt2html,html2html
18916 title="data:text/html,<img src=1 onerror=alert(1)>"
18917 style="-o-link:attr(title);-o-link-source:current">X</div>
18919 <div title="data:text/html,<img src=1 onerror=alert(1)>" style="/* insecure input */">X</div>
18922 <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>
18926 MSIE 6 CSS safety test: Repetition markers (T57332)
18928 <p style="font-size: 100px; color: expres〱ion((title='XSSed'),'red')">A</p>
18929 <p style="font-size: 100px; color: expresゝion((title='XSSed'),'red')">B</p>
18930 <p style="font-size: 100px; color: expresーion((title='XSSed'),'red')">C</p>
18931 <p style="font-size: 100px; color: expresヽion((title='XSSed'),'red')">D</p>
18932 <p style="font-size: 100px; color: expresﹽion((title='XSSed'),'red')">E</p>
18933 <p style="font-size: 100px; color: expresﹼion((title='XSSed'),'red')">F</p>
18934 <p style="font-size: 100px; color: expresーion((title='XSSed'),'red')">G</p>
18936 <p style="/* insecure input */">A</p>
18937 <p style="/* insecure input */">B</p>
18938 <p style="/* insecure input */">C</p>
18939 <p style="/* insecure input */">D</p>
18940 <p style="/* insecure input */">E</p>
18941 <p style="/* insecure input */">F</p>
18942 <p style="/* insecure input */">G</p>
18945 <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>
18946 <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>
18947 <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>
18948 <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>
18949 <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>
18950 <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>
18951 <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>
18955 Table attribute legitimate extension
18958 !+ style="<nowiki>color:blue</nowiki>"|status
18963 <th style="color:blue">status
18969 Table attribute safety
18972 !+ style="<nowiki>border-width:expression(0+alert(document.cookie))</nowiki>"|status
18977 <th style="/* insecure input */">status
18983 CSS line continuation 1
18985 <div style="background-image: u\ rl(test.jpg);"></div>
18987 <div style="/* insecure input */"></div>
18992 CSS line continuation 2
18994 <div style="background-image: u\ rl(test.jpg); "></div>
18996 <div style="/* invalid control char */"></div>
19007 Expansion of multi-line templates in attribute values (T8255)
19009 <div style="background: {{identity|#00FF00}}">-</div>
19011 <div style="background: #00FF00">-</div>
19016 Expansion of multi-line templates in attribute values (T8255 sanity check)
19018 <div style="background:
19021 <div style="background: #00FF00">-</div>
19024 <div style="background:
19029 Expansion of multi-line templates in attribute values (T8255 sanity check 2)
19031 <div style="background: #00FF00">-</div>
19033 <div style="background: #00FF00">-</div>
19038 Tags which are hidden from tidiers cannot pass through the Sanitizer
19040 <mw:toc><script>alert();</script></mw:toc>
19042 <p><mw:toc><script>alert();</script></mw:toc>
19047 ### Parser hooks (see tests/parser/ParserTestParserHook.php for the <tag> extension)
19051 Parser hook: empty input
19062 <pre typeof="mw:Extension/tag" data-mw='{"name":"tag","attrs":{},"body":{"extsrc":""}}' data-parsoid='{}' about="#mwt2"></pre>
19065 ## Don't expect parsoid to rt this form.
19067 Parser hook: empty input using terminated empty elements
19069 parsoid=wt2html,html2html
19080 <pre typeof="mw:Extension/tag" data-mw='{"name":"tag","attrs":{}}' data-parsoid='{}' about="#mwt2"></pre>
19084 Parser hook: empty input using terminated empty elements (space before)
19095 <pre typeof="mw:Extension/tag" data-mw='{"name":"tag","attrs":{}}' data-parsoid='{}' about="#mwt2"></pre>
19099 Parser hook: basic input
19110 <pre typeof="mw:Extension/tag" data-mw='{"name":"tag","attrs":{},"body":{"extsrc":"input"}}' data-parsoid='{}' about="#mwt2"></pre>
19113 ## Don't expect parsoid to rt this form.
19115 Parser hook: case insensitive
19117 parsoid=wt2html,html2html
19128 <pre typeof="mw:Extension/tag" data-mw='{"name":"tag","attrs":{},"body":{"extsrc":"input"}}' data-parsoid='{}' about="#mwt2"></pre>
19131 ## Don't expect parsoid to rt this form.
19133 Parser hook: case insensitive, redux
19135 parsoid=wt2html,html2html
19146 <pre typeof="mw:Extension/tag" data-mw='{"name":"tag","attrs":{},"body":{"extsrc":"input"}}' data-parsoid='{}' about="#mwt2"></pre>
19150 Parser hook: nested tags
19154 <tag><tag></tag></tag>
19166 </tag></pre><p></tag>
19169 <pre typeof="mw:Extension/tag" about="#mwt2" data-mw='{"name":"tag","attrs":{},"body":{"extsrc":"<tag>"}}'></pre><p></tag></p>
19173 Parser hook: basic arguments
19175 <tag width="200" height="100" depth="50" square=""></tag>
19188 <pre typeof="mw:Extension/tag" data-mw='{"name":"tag","attrs":{"width":"200","height":"100","depth":"50","square":""},"body":{"extsrc":""}}' data-parsoid='{}' about="#mwt2"></pre>
19191 ## Don't expect parsoid to rt this form.
19193 Parser hook: basic arguments, variations
19195 parsoid=wt2html,html2html
19197 <tag width=200 height = "100" depth = '50' square></tag>
19210 <pre typeof="mw:Extension/tag" data-mw='{"name":"tag","attrs":{"width":"200","height":"100","depth":"50","square":""},"body":{"extsrc":""}}' data-parsoid='{}' about="#mwt2"></pre>
19214 Parser hook: argument containing a forward slash (T7344)
19216 <tag filename="/tmp/bla"></tag>
19221 'filename' => '/tmp/bla',
19226 <pre typeof="mw:Extension/tag" data-mw='{"name":"tag","attrs":{"filename":"/tmp/bla"},"body":{"extsrc":""}}' data-parsoid='{}' about="#mwt2"></pre>
19229 ## Don't expect parsoid to rt this form.
19231 Parser hook: empty input using terminated empty elements (T4374)
19233 parsoid=wt2html,html2html
19245 <pre typeof="mw:Extension/tag" about="#mwt2" data-mw='{"name":"tag","attrs":{"foo":"bar"}}'></pre><p>text</p>
19248 ## </tag> should be output literally since there is no matching tag that begins it
19249 ## Don't expect parsoid to rt this form.
19251 Parser hook: basic arguments using terminated empty elements (T4374)
19255 <tag width=200 height = "100" depth = '50' square/>
19272 <pre typeof="mw:Extension/tag" data-mw='{"name":"tag","attrs":{"width":"200","height":"100","depth":"50","square":""}}' about="#mwt2"></pre><p>other stuff
19276 ## Don't expect parsoid to rt this form.
19278 Parser hook: Don't allow unclosed extension tags
19284 this is a '''test'''
19286 <p>test <tag>123
19287 </p><p>this is a <b>test</b>
19290 <p>test <tag>123</p>
19292 <p>this is a <b>test</b></p>
19296 Parser hook: horizontal rule inside extension tag that outputs <pre>
19317 ### (see tests/parser/ParserTestParserHook.php for the <statictag> extension)
19321 Parser hook: static parser hook not inside a comment
19323 <statictag>hello, world</statictag>
19325 <statictag action="flush" />
19331 <p><span typeof="mw:Extension/statictag" data-mw='{"name":"statictag","attrs":{},"body":{"extsrc":"hello, world"}}' about="#mwt2"></span></p>
19332 <p><span typeof="mw:Extension/statictag" data-mw='{"name":"statictag","attrs":{"action":"flush"}}' about="#mwt4">hello, world</span></p>
19336 Parser hook: static parser hook inside a comment
19338 <!-- <statictag>hello, world</statictag> -->
19339 <statictag action="flush" />
19344 <!-- <statictag>hello, world</statictag> -->
19345 <p><span typeof='mw:Extension/statictag' data-mw='{"name":"statictag","attrs":{"action":"flush"}}' data-parsoid='{}' about='#mwt2'></span></p>
19348 # Nested template calls; this case was broken by Parser.php rev 1.506,
19352 Template:One-parameter
19354 (My parameter is: {{{1}}})
19358 Template:Map-one-parameter
19360 {{{{{1}}}|{{{2}}}}}
19364 Nested template calls
19366 {{Map-one-parameter|One-parameter|param}}
19368 <p>(My parameter is: param)
19378 Sanitizer: Closing of open tags
19380 <s></s><table></table>
19382 <p><s></s></p><table></table>
19384 <p><s data-parsoid='{"stx":"html"}'></s></p><table data-parsoid='{"stx":"html"}'></table>
19388 Sanitizer: Closing of open but not closed tags
19397 Sanitizer: Closing of closed but not open tags
19403 <p class="mw-empty-elt">
19408 Sanitizer: Closing of closed but not open table tags
19412 Table not started</td></tr></table>
19414 <p>Table not started
19419 Sanitizer: Escaping of spaces, multibyte characters, colons & other stuff in id=""
19421 title=[[Main Page]]
19423 wgFragmentMode=[ 'html5', 'legacy' ]
19425 <span id="æ: v">byte</span>[[#æ: v|backlink]]
19427 <p><span id="æ:_v">byte</span><a href="#æ:_v">backlink</a>
19430 <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>
19434 Sanitizer: Escaping of spaces, multibyte characters, colons & other stuff in id="" (legacy)
19436 wgFragmentMode=[ 'legacy' ]
19438 <span id="æ: v">byte</span>[[#æ: v|backlink]]
19440 <p><span id=".C3.A6:_v">byte</span><a href="#.C3.A6:_v">backlink</a>
19444 # In HTML5, the restrictions are that id must contain at least one character,
19445 # and must not contain any space characters.
19447 Sanitizer: Validating the contents of the id attribute (T6515)
19451 <br id="" /><br id="a space" />
19456 # In HTML5, id must be unique amongst all the ids in the element's home subtree.
19458 Sanitizer: Validating id attribute uniqueness (T6515, T8301)
19462 <br id="foo" /><br id="foo" />
19464 Something need to be done. foo-2 ?
19468 Sanitizer: Validating that <meta> and <link> work, but only for Microdata
19471 <meta itemprop="hello" content="world">
19472 <meta http-equiv="refresh" content="5">
19473 <meta itemprop="hello" http-equiv="refresh" content="5">
19474 <link itemprop="hello" href="{{SERVER}}">
19475 <link rel="stylesheet" href="{{SERVER}}">
19476 <link rel="stylesheet" itemprop="hello" href="{{SERVER}}">
19480 <p> <meta itemprop="hello" content="world" />
19481 <meta http-equiv="refresh" content="5">
19482 <meta itemprop="hello" content="5" />
19483 <link itemprop="hello" href="http://example.org" />
19484 <link rel="stylesheet" href="<a rel="nofollow" class="external free" href="http://example.org">http://example.org</a>">
19485 <link itemprop="hello" href="http://example.org" />
19492 Sanitizer: Strip comments from CSS attributes
19494 parsoid=wt2html,wt2wt
19496 <span style="margin:/*negate mbox-text padding */-0.125em -0.45em; /*rainbow*/rgba(255, 0, 0, 0.3)">2013</span>
19498 <p><span style="margin: -0.125em -0.45em; rgba(255, 0, 0, 0.3)">2013</span>
19501 <p><span style="margin: -0.125em -0.45em; rgba(255, 0, 0, 0.3)">2013</span></p>
19505 Sanitizer: Avoid unnecessary percent encoded characters in interwiki links
19507 [[meatball:Soft"Security]]
19509 <p><a href="http://www.usemod.com/cgi-bin/mb.pl?Soft%22Security" class="extiw" title="meatball:Soft"Security">meatball:Soft"Security</a>
19512 <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>
19516 Sanitizer: angle brackets are invalid, even in interwiki links (T182338)
19518 [[meatball:Foo<Bar]]
19519 [[meatball:Foo>Bar]]
19520 [[meatball:Foo<bar]]
19521 [[meatball:Foo>bar]]
19523 <p>[[meatball:Foo<Bar]]
19524 [[meatball:Foo>Bar]]
19525 [[meatball:Foo<bar]]
19526 [[meatball:Foo>bar]]
19529 <p>[[meatball:Foo<Bar]]
19530 [[meatball:Foo>Bar]]
19531 [[meatball:Foo<span typeof="mw:Entity" data-parsoid='{"src":"&lt;","srcContent":"<"}'><</span>bar]]
19532 [[meatball:Foo<span typeof="mw:Entity" data-parsoid='{"src":"&gt;","srcContent":">"}'>></span>bar]]</p>
19536 Language converter: output gets cut off unexpectedly (T7757)
19540 this bit is safe: }-
19542 but if we add a conversion instance: -{zh-cn:xxx;zh-tw:yyy}-
19544 then we get cut off here: }-
19546 all additional text is vanished
19548 <p>this bit is safe: }-
19549 </p><p>but if we add a conversion instance: xxx
19550 </p><p>then we get cut off here: }-
19551 </p><p>all additional text is vanished
19554 <p>this bit is safe: }-</p>
19555 <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>
19556 <p>then we get cut off here: }-</p>
19557 <p>all additional text is vanished</p>
19561 Language converter glossary rules inside attributes (T119158)
19563 language=sr variant=sr-el
19565 -{H|foAjrjvi=>sr-el:" onload="alert(1)" data-foo="}-
19567 [[File:Foobar.jpg|alt=-{}-foAjrjvi-{}-]]
19570 </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>
19573 <p><meta typeof="mw:LanguageVariant" data-mw-variant='{"add":true,"oneway":[{"f":"foAjrjvi","l":"sr-el","t":"\" onload=\"alert(1)\" data-foo=\""}]}'/></p>
19575 <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>
19579 Self closed html pairs (T7487)
19581 <center><font id="bug" />Centered text</center>
19582 <div><font id="bug2" />In div text</div>
19584 <center><font id="bug"></font>Centered text</center>
19585 <div><font id="bug2"></font>In div text</div>
19589 Punctuation: nbsp before exclamation
19593 <p>C'est grave !
19598 Punctuation: CSS !important (T13874)
19600 <div style="width:50% !important">important</div>
19602 <div style="width:50% !important">important</div>
19607 Punctuation: CSS ! important (T13874; with space after)
19609 <div style="width:50% ! important">important</div>
19611 <div style="width:50% ! important">important</div>
19616 HTML bullet list, closed tags (T7497)
19629 <ul data-parsoid='{"stx":"html"}'>
19630 <li data-parsoid='{"stx":"html"}'>One</li>
19631 <li data-parsoid='{"stx":"html"}'>Two</li>
19637 HTML bullet list, unclosed tags (T7497)
19649 <ul data-parsoid='{"stx":"html"}'>
19650 <li data-parsoid='{"stx":"html","autoInsertedEnd":true}'>One</li>
19651 <li data-parsoid='{"stx":"html","autoInsertedEnd":true}'>Two</li>
19657 HTML ordered list, closed tags (T7497)
19670 <ol data-parsoid='{"stx":"html"}'>
19671 <li data-parsoid='{"stx":"html"}'>One</li>
19672 <li data-parsoid='{"stx":"html"}'>Two</li>
19678 HTML ordered list, unclosed tags (T7497)
19691 <ol data-parsoid='{"stx":"html"}'>
19692 <li data-parsoid='{"stx":"html","autoInsertedEnd":true}'>One</li>
19693 <li data-parsoid='{"stx":"html","autoInsertedEnd":true}'>Two</li>
19699 HTML nested bullet list, closed tags (T7497)
19722 <ul data-parsoid='{"stx":"html"}'>
19723 <li data-parsoid='{"stx":"html"}'>One</li>
19724 <li data-parsoid='{"stx":"html"}'>Two:
19725 <ul data-parsoid='{"stx":"html"}'>
19726 <li data-parsoid='{"stx":"html"}'>Sub-one</li>
19727 <li data-parsoid='{"stx":"html"}'>Sub-two</li>
19734 HTML nested bullet list, open tags (T7497)
19756 HTML nested ordered list, closed tags (T7497)
19781 HTML nested ordered list, open tags (T7497)
19818 HTML ordered list item with parameters oddity
19820 <ol><li id="fragment">One</li>
19823 <ol><li id="fragment">One</li>
19828 # parsoid doesn't explicitly mark autonumbered links, see T55505
19830 T7918: autonumbering
19832 [http://first/] [http://second] [ftp://ftp]
19836 [mailto:enclosed@mail.tld With target]
19838 [mailto:enclosed@mail.tld]
19840 mailto:inline@mail.tld
19842 <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>
19843 </p><p><a rel="nofollow" class="external free" href="ftp://inlineftp">ftp://inlineftp</a>
19844 </p><p><a rel="nofollow" class="external text" href="mailto:enclosed@mail.tld">With target</a>
19845 </p><p><a rel="nofollow" class="external autonumber" href="mailto:enclosed@mail.tld">[4]</a>
19846 </p><p><a rel="nofollow" class="external free" href="mailto:inline@mail.tld">mailto:inline@mail.tld</a>
19849 <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>
19850 <p><a rel="mw:ExtLink" class="external free" href="ftp://inlineftp">ftp://inlineftp</a></p>
19851 <p><a rel="mw:ExtLink" class="external text" href="mailto:enclosed@mail.tld">With target</a></p>
19852 <p><a rel="mw:ExtLink" class="external autonumber" href="mailto:enclosed@mail.tld"></a></p>
19853 <p><a rel="mw:ExtLink" class="external free" href="mailto:inline@mail.tld">mailto:inline@mail.tld</a></p>
19858 # Security and HTML correctness
19859 # From Nick Jenkins' fuzz testing
19863 Fuzz testing: Parser13
19877 # Note that Parsoid output differs from the PHP parser here: the PHP
19878 # parser breaks the URL for the magic word, while in Parsoid the URL
19879 # production takes precedence.
19881 Fuzz testing: Parser14
19886 <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>
19887 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>
19889 <li class="toclevel-1 tocsection-1"><a href="#onmouseover.3D"><span class="tocnumber">1</span> <span class="toctext">onmouseover=</span></a></li>
19895 <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>
19896 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>
19898 <li class="toclevel-1 tocsection-1"><a href="#onmouseover.3D"><span class="tocnumber">1</span> <span class="toctext">onmouseover=</span></a></li>
19902 <h2 id="onmouseover="><span id="onmouseover.3D" typeof="mw:FallbackId"></span>onmouseover=</h2>
19903 <p><a rel="mw:ExtLink" class="external free" href="http://__TOC__" data-parsoid='{"stx":"url"}'>http://__TOC__</a></p>
19907 Fuzz testing: Parser14-table
19909 parsoid=wt2html,html2html
19914 <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>
19915 <table style="__TOC__">
19920 <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>
19921 <table style="__TOC__">
19922 <tbody><tr><td></td></tr>
19926 <table style="__TOC__"></table>
19929 # Known to produce bogus xml (extra </td>)
19930 # Don't add the html/php section since it generates broken HTML
19932 Fuzz testing: Parser16
19949 Fuzz testing: Parser21
19952 !irc://{{ftp://a" onmouseover="alert('hello world');"
19957 <th><a rel="nofollow" class="external free" href="irc://{{ftp://a">irc://{{ftp://a</a>" onmouseover="alert('hello world');"
19967 Fuzz testing: Parser22
19969 http://===r:::https://b
19973 <p><a rel="nofollow" class="external free" href="http://===r:::https://b">http://===r:::https://b</a>
19981 ## Remex doesn't account for fostered content.
19982 ## Known to produce bad XML for now
19984 Fuzz testing: Parser24
19991 | {{{{SSSll!!!!!!!VVVV)]]][[Special:*xxxxxxx--><noinclude>}}}} >
19992 <br style="onmouseover='alert(document.cookie);' " />
19994 MOVE YOUR MOUSE CURSOR OVER THIS TEXT
19999 <u class="|">}}}} >
20000 <br style="onmouseover='alert(document.cookie);'" />
20002 MOVE YOUR MOUSE CURSOR OVER THIS TEXT
20012 <u class="|">}}}} >
20013 <br style="onmouseover='alert(document.cookie);'" />
20015 MOVE YOUR MOUSE CURSOR OVER THIS TEXT
20016 </u><table><tbody><tr>
20020 </tbody></table><p><u class="|">
20023 <p data-parsoid='{"fostered":true,"autoInsertedEnd":true,"autoInsertedStart":true}'>
20025 <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>"}'/>}}}} >
20026 <br style="onmouseover='alert(document.cookie);' " data-parsoid='{"stx":"html","selfClose":true}'/>
20028 MOVE YOUR MOUSE CURSOR OVER THIS TEXT</u></p>
20029 <table data-parsoid='{"autoInsertedEnd":true}'><tbody><tr data-parsoid='{"autoInsertedStart":true}'><td></td></tr></tbody></table>
20032 # Note: the current result listed for this is not what the original one was,
20033 # but the original bug was JavaScript injection, which is fixed in any case.
20034 # It's not clear that the original result listed was any more correct than the
20035 # current one. Original result:
20038 # <li class="||">
20039 # }}}blah" onmouseover="alert('hello world');" align="left"<b>MOVE MOUSE CURSOR OVER HERE</b>
20041 Fuzz testing: Parser25 (T8055)
20047 }}}blah" onmouseover="alert('hello world');" align="left"'''MOVE MOUSE CURSOR OVER HERE
20049 <p><LI CLASS=blah" onmouseover="alert('hello world');" align="left"<b>MOVE MOUSE CURSOR OVER HERE</b>
20052 <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"]}'>
20053 </span><p about="#mwt1"><LI CLASS=blah" onmouseover="alert('hello world');" align="left"<b>MOVE MOUSE CURSOR OVER HERE</b></p>
20057 Fuzz testing: URL adjacent extension (with space, clean)
20059 http://example.com <nowiki>junk</nowiki>
20061 <p><a rel="nofollow" class="external free" href="http://example.com">http://example.com</a> junk
20064 <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>
20068 Fuzz testing: URL adjacent extension (no space, dirty; nowiki)
20070 http://example.com<nowiki>junk</nowiki>
20072 <p><a rel="nofollow" class="external free" href="http://example.com">http://example.com</a>junk
20075 <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>
20079 Fuzz testing: URL adjacent extension (no space, dirty; pre)
20081 http://example.com<pre>junk</pre>
20083 <a rel="nofollow" class="external free" href="http://example.com">http://example.com</a><pre>junk</pre>
20086 <p><a rel="nofollow" class="external free" href="http://example.com">http://example.com</a></p><pre>junk</pre>
20088 <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>
20092 Fuzz testing: image with bogus manual thumbnail
20094 [[Image:foobar.jpg|thumbnail= ]]
20096 <div class="thumb tright"><div class="thumbinner" style="width:182px;">Error creating thumbnail: <div class="thumbcaption"></div></div></div>
20099 <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>
20102 # Parsoid will emit the newline literally in wt2wt; see next test case.
20104 Fuzz testing: encoded newline in generated HTML replacements (T8577)
20108 <pre dir=" "></pre>
20110 <pre dir=" "></pre>
20114 " typeof="mw:Extension/pre" about="#mwt2"data-mw='{"name":"pre","attrs":{"dir":"\n"},"body":{"extsrc":""}}'></pre>
20118 Fuzz testing: encoded newline in generated HTML replacements, html2wt (T8577)
20122 <pre typeof="mw:Extension/pre" about="#mwt2" dir="
20123 " data-mw='{"name":"pre","attrs":{"dir":"\n"},"body":{"extsrc":""}}'></pre>
20133 Templates in extension attributes are not expanded
20135 <pre dir="{{echo|ltr}}"></pre>
20137 <pre dir="{{echo|ltr}}"></pre>
20140 <pre dir="{{echo|ltr}}" typeof="mw:Extension/pre" about="#mwt2" data-mw='{"name":"pre","attrs":{"dir":"{{echo|ltr}}"},"body":{"extsrc":""}}'></pre>
20144 Parsing optional HTML elements (T8171)
20149 <td> Some tabular data</td>
20150 <td> More tabular data ...
20151 <td> And yet som tabular data</td>
20157 <td> Some tabular data</td>
20158 <td> More tabular data ...
20159 </td><td> And yet som tabular data</td>
20166 Correct handling of <td>, <tr> (T8171)
20171 <td> Some tabular data</td>
20172 <td> More tabular data ...</td>
20173 <td> And yet som tabular data</td>
20179 <td> Some tabular data</td>
20180 <td> More tabular data ...</td>
20181 <td> And yet som tabular data</td>
20189 Parsing crashing regression (fr:JavaScript)
20193 <p></body></x>
20198 Inline wiki vs wiki block nesting
20204 <p><b>Bold paragraph</b>
20205 </p><p>New wiki paragraph
20209 # FIXME: The current php output is documented
20210 # and desired output is the parsoid target.
20212 Inline HTML vs wiki block nesting
20218 <p><b>Bold paragraph
20219 </p><p>New wiki paragraph</b>
20222 <p><b>Bold paragraph
20223 </b></p><p><b>New wiki paragraph
20226 <p><b>Bold paragraph</b>
20227 </p><p>New wiki paragraph
20231 # Original result was this:
20232 # <p><b>bold</b><b>bold<i>bolditalics</i></b>
20234 # While that might be marginally more intuitive, maybe, the six-apostrophe
20235 # construct is clearly pathological and the result stated here (which is what
20236 # the parser actually does) is about as reasonable as anything.
20238 Mixing markup for italics and bold
20241 '''bold''''''bold''bolditalics'''''
20243 <p>'<i>bold'</i><b>bold<i>bolditalics</i></b>
20251 Article for special page transclusion test
20255 Special page transclusion
20258 {{Special:Prefixindex/Xyzzyx}}
20260 <ul class="mw-prefixindex-list"><li><a href="/wiki/Xyzzyx" title="Xyzzyx">Xyzzyx</a></li>
20266 Special page transclusion twice (T7021)
20269 {{Special:Prefixindex/Xyzzyx}}
20270 {{Special:Prefixindex/Xyzzyx}}
20272 <ul class="mw-prefixindex-list"><li><a href="/wiki/Xyzzyx" title="Xyzzyx">Xyzzyx</a></li>
20274 <ul class="mw-prefixindex-list"><li><a href="/wiki/Xyzzyx" title="Xyzzyx">Xyzzyx</a></li>
20280 Transclusion of default MediaWiki message
20282 {{MediaWiki:Mainpage}}
20289 Transclusion of nonexistent MediaWiki message
20291 {{MediaWiki:Mainpagexxx}}
20293 <p><a href="/index.php?title=MediaWiki:Mainpagexxx&action=edit&redlink=1" class="new" title="MediaWiki:Mainpagexxx (page does not exist)">MediaWiki:Mainpagexxx</a>
20298 Transclusion of MediaWiki message with underscore
20300 {{MediaWiki:history_short}}
20307 Transclusion of MediaWiki message with space
20309 {{MediaWiki:history short}}
20316 Invalid header with following text
20326 Section extraction test (section 0)
20346 Section extraction test (section 1)
20368 Section extraction test (section 2)
20389 Section extraction test (section 3)
20409 Section extraction test (section 4)
20433 Section extraction test (section 5)
20453 Section extraction test (section 6)
20474 Section extraction test (section 7)
20494 Section extraction test (section 8)
20514 Section extraction test (section 9)
20535 Section extraction test (section 10)
20555 Section extraction test (nonexistent section 11)
20574 Section extraction test with bogus heading (section 1)
20579 ==bogus== not a legal section
20583 ==bogus== not a legal section
20587 Section extraction test with bogus heading (section 2)
20592 ==bogus== not a legal section
20599 Section extraction test with comment after heading (section 1)
20611 Section extraction test with comment after heading (section 2)
20623 Section extraction test with bogus <nowiki> heading (section 1)
20628 ==bogus== <nowiki>not a legal section</nowiki>
20632 ==bogus== <nowiki>not a legal section</nowiki>
20636 Section extraction test with bogus <nowiki> heading (section 2)
20641 ==bogus== <nowiki>not a legal section</nowiki>
20647 # Formerly testing for T4587, now resolved by the use of unmarked sections
20648 # instead of respecting commented sections
20650 Section extraction prefixed by comment (section 1)
20661 Section extraction prefixed by comment (section 2)
20671 # Formerly testing for T4607, now resolved by the use of unmarked sections
20672 # instead of respecting HTML-style headings
20674 Section extraction, mixed wiki and html (section 1)
20690 Section extraction, mixed wiki and html (section 2)
20706 # Formerly testing for T5342
20708 Section extraction, heading surrounded by <noinclude>
20712 <noinclude>==unmarked==</noinclude>
20718 # Test behavior of T21910
20720 Sectiion with all-equals
20725 The line above must have a trailing space
20728 But just in case it doesn't...
20732 But just in case it doesn't...
20736 Section replacement test (section 0)
20767 Section replacement test (section 1)
20796 Section replacement test (section 2)
20826 Section replacement test (section 3)
20857 Section replacement test (section 4)
20884 Section replacement test (section 5)
20915 Section replacement test (section 6)
20945 Section replacement test (section 7)
20976 Section replacement test (section 8)
21007 Section replacement test (section 9)
21036 Section replacement test (section 10)
21066 Section replacement test with initial whitespace (T15728)
21070 Preformatted initial line
21074 Preformatted initial line
21081 Section extraction, heading followed by pre with 20 spaces (T8398)
21093 Section extraction, heading followed by pre with 19 spaces (T8398 sanity check)
21106 Section extraction, <pre> around bogus header (T12309)
21123 Section replacement, <pre> around bogus header (T12309)
21144 Handling of 
 in URLs
21148 <ul><li><a rel="nofollow" class="external free" href="irc://%0Aa">irc://%0Aa</a></li></ul>
21151 <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>
21155 Handling of %0A in URLs
21159 <ul><li><a rel="nofollow" class="external free" href="irc://%0Aa">irc://%0Aa</a></li></ul>
21162 <ul><li><a rel="mw:ExtLink" class="external free" href="irc://%0Aa">irc://%0Aa</a></li></ul>
21165 # The PHP parser strips the empty tags out for giggles; parsoid doesn't.
21167 5 quotes, code coverage +1 line
21174 <p><b><i></i></b></p>
21177 # same html as previous, but wikitext adjusted to match parsoid html2wt
21178 # note that wt2html and html2html will put the <i> before the <b>
21180 5 quotes, code coverage +1 line w/ nowiki (1)
21182 parsoid=wt2wt,html2wt
21184 '''''<nowiki/>'''''
21189 <p><b><i></i></b></p>
21192 # same as previous, just swapping the <i> and <b>
21194 5 quotes, code coverage +1 line w/ nowiki (2)
21196 '''''<nowiki/>'''''
21201 <p><i><b></b></i></p>
21205 Special:Search page linking.
21209 <p><a href="/wiki/Special:Search" title="Special:Search">Special:Search</a>
21214 {{!}} is a magic word
21216 {{!}} is a magic word there and {{!}} is still a magic word here
21217 | is not a magic word here but {{!}} is still a magic word here
21219 <p>| is a magic word there and | is still a magic word here
21220 | is not a magic word here but | is still a magic word here
21223 <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
21224 | 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>
21230 title=[[Parser test]]
21244 *{{SUBJECTPAGENAME}}
21245 *{{SUBJECTPAGENAMEE}}
21248 *{{NAMESPACENUMBER}}
21253 *{{Dynamic|{{NUMBEROFUSERS}}|{{NUMBEROFPAGES}}|{{CURRENTVERSION}}|{{CONTENTLANGUAGE}}|{{DIRECTIONMARK}}|{{CURRENTTIMESTAMP}}|{{NUMBEROFARTICLES}}}}
21255 <ul><li>Parser test</li>
21256 <li>Parser_test</li>
21257 <li>Parser test</li>
21258 <li>Parser_test</li>
21259 <li>Parser test</li>
21260 <li>Parser_test</li>
21261 <li>Parser test</li>
21262 <li>Parser_test</li>
21263 <li>Parser test</li>
21264 <li>Parser_test</li>
21265 <li>Talk:Parser test</li>
21266 <li>Talk:Parser_test</li>
21267 <li>Parser test</li>
21268 <li>Parser_test</li>
21276 <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>
21279 ### Note: Above tests excludes the "{{NUMBEROFADMINS}}" magic word because it generates a MySQL error when included.
21282 Gallery with valid attributes
21284 <gallery type="123" summary="345">
21285 File:File:Foobar.jpg
21288 <ul class="gallery mw-gallery-traditional" type="123">
21289 <li class="gallerybox" style="width: 155px"><div style="width: 155px">
21290 <div class="thumb" style="height: 150px;">File:Foobar.jpg</div>
21291 <div class="gallerytext">
21297 <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"}}'>
21298 <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>
21302 ## Parsoid thinks the "centre" here is a property, not a caption.
21307 "modes": ["wt2html"],
21308 "nativeGallery": true
21316 image4 |300px| centre
21317 image5.svg| http://///////
21322 <ul class="gallery mw-gallery-traditional">
21323 <li class="gallerybox" style="width: 155px"><div style="width: 155px">
21324 <div class="thumb" style="height: 150px;">Image1.png</div>
21325 <div class="gallerytext">
21328 <li class="gallerybox" style="width: 155px"><div style="width: 155px">
21329 <div class="thumb" style="height: 150px;">Image2.gif</div>
21330 <div class="gallerytext">
21333 <li class="gallerybox" style="width: 155px"><div style="width: 155px">
21334 <div class="thumb" style="height: 150px;">Image3</div>
21335 <div class="gallerytext">
21338 <li class="gallerybox" style="width: 155px"><div style="width: 155px">
21339 <div class="thumb" style="height: 150px;">Image4</div>
21340 <div class="gallerytext">
21345 <li class="gallerybox" style="width: 155px"><div style="width: 155px">
21346 <div class="thumb" style="height: 150px;">Image5.svg</div>
21347 <div class="gallerytext">
21348 <p><a rel="nofollow" class="external free" href="http://///////">http://///////</a>
21352 <li class="gallerybox" style="width: 155px"><div style="width: 155px">
21353 <div class="thumb" style="height: 150px;">* image6</div>
21354 <div class="gallerytext">
21360 <ul class="gallery mw-gallery-traditional" typeof="mw:Extension/gallery" about="#mwt3" data-mw='{"name":"gallery","attrs":{},"body":{}}'>
21361 <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>
21362 <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>
21363 <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>
21364 <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>
21365 <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>
21366 <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>
21371 Gallery (with options, html)
21374 "modes": ["wt2html", "html2html"],
21375 "nativeGallery": true
21378 <gallery widths="70px" heights="40px" perrow="2" caption="Foo [[Main Page]]">
21379 File:Nonexistent.jpg|caption
21380 File:Nonexistent.jpg
21381 image:foobar.jpg|some '''caption''' [[Main Page]]
21383 image:foobar.jpg|Blabla|alt=This is a foo-bar.|blabla.
21386 <ul class="gallery mw-gallery-traditional" style="max-width: 226px;_width: 226px;">
21387 <li class='gallerycaption'>Foo <a href="/wiki/Main_Page" title="Main Page">Main Page</a></li>
21388 <li class="gallerybox" style="width: 105px"><div style="width: 105px">
21389 <div class="thumb" style="height: 70px;">Nonexistent.jpg</div>
21390 <div class="gallerytext">
21395 <li class="gallerybox" style="width: 105px"><div style="width: 105px">
21396 <div class="thumb" style="height: 70px;">Nonexistent.jpg</div>
21397 <div class="gallerytext">
21400 <li class="gallerybox" style="width: 105px"><div style="width: 105px">
21401 <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>
21402 <div class="gallerytext">
21403 <p>some <b>caption</b> <a href="/wiki/Main_Page" title="Main Page">Main Page</a>
21407 <li class="gallerybox" style="width: 105px"><div style="width: 105px">
21408 <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>
21409 <div class="gallerytext">
21412 <li class="gallerybox" style="width: 105px"><div style="width: 105px">
21413 <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>
21414 <div class="gallerytext">
21422 <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":{}}'>
21423 <li class="gallerycaption">Foo <a rel="mw:WikiLink" href="./Main_Page" title="Main Page">Main Page</a></li>
21424 <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>
21425 <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>
21426 <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>
21427 <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>
21428 <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>
21433 Gallery (with options, extsrc)
21436 "nativeGallery": false
21439 <gallery widths="70px" heights="40px" perrow="2" caption="Foo [[Main Page]]">
21440 File:Nonexistent.jpg|caption
21441 File:Nonexistent.jpg
21442 image:foobar.jpg|some '''caption''' [[Main Page]]
21444 image:foobar.jpg|Blabla|alt=This is a foo-bar.|blabla.
21447 <ul class="gallery mw-gallery-traditional" style="max-width: 226px;_width: 226px;">
21448 <li class='gallerycaption'>Foo <a href="/wiki/Main_Page" title="Main Page">Main Page</a></li>
21449 <li class="gallerybox" style="width: 105px"><div style="width: 105px">
21450 <div class="thumb" style="height: 70px;">Nonexistent.jpg</div>
21451 <div class="gallerytext">
21456 <li class="gallerybox" style="width: 105px"><div style="width: 105px">
21457 <div class="thumb" style="height: 70px;">Nonexistent.jpg</div>
21458 <div class="gallerytext">
21461 <li class="gallerybox" style="width: 105px"><div style="width: 105px">
21462 <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>
21463 <div class="gallerytext">
21464 <p>some <b>caption</b> <a href="/wiki/Main_Page" title="Main Page">Main Page</a>
21468 <li class="gallerybox" style="width: 105px"><div style="width: 105px">
21469 <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>
21470 <div class="gallerytext">
21473 <li class="gallerybox" style="width: 105px"><div style="width: 105px">
21474 <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>
21475 <div class="gallerytext">
21483 <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"}}'>
21484 <li class="gallerycaption">Foo <a rel="mw:WikiLink" href="./Main_Page" title="Main Page">Main Page</a></li>
21485 <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>
21486 <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>
21487 <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>
21488 <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>
21489 <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>
21494 Gallery (without px units)
21496 <gallery widths="70" heights="40">
21500 <ul class="gallery mw-gallery-traditional">
21501 <li class="gallerybox" style="width: 105px"><div style="width: 105px">
21502 <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>
21503 <div class="gallerytext">
21509 <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"}}'>
21510 <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>
21515 Gallery (with invalid units)
21517 <gallery widths="70em" heights="40em">
21521 <ul class="gallery mw-gallery-traditional">
21522 <li class="gallerybox" style="width: 155px"><div style="width: 155px">
21523 <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>
21524 <div class="gallerytext">
21530 <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"}}'>
21531 <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>
21536 Gallery with link that has fragment
21539 "modes": ["wt2html", "html2html"],
21540 "nativeGallery": true
21544 image:foobar.jpg|link=Main_Page
21545 image:foobar.jpg|link=Main_Page#section
21546 image:foobar.jpg|link=Main Page#section|caption
21549 <ul class="gallery mw-gallery-traditional">
21550 <li class="gallerybox" style="width: 155px"><div style="width: 155px">
21551 <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>
21552 <div class="gallerytext">
21555 <li class="gallerybox" style="width: 155px"><div style="width: 155px">
21556 <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>
21557 <div class="gallerytext">
21560 <li class="gallerybox" style="width: 155px"><div style="width: 155px">
21561 <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>
21562 <div class="gallerytext">
21570 <ul class="gallery mw-gallery-traditional" typeof="mw:Extension/gallery" about="#mwt2" data-mw='{"name":"gallery","attrs":{},"body":{}}'>
21571 <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>
21572 <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>
21573 <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>
21578 Gallery with template inside caption
21581 "nativeGallery": true
21584 <gallery caption="{{echo|hi}}">
21585 File:Foobar.jpg|{{echo|ho}}
21588 <ul class="gallery mw-gallery-traditional">
21589 <li class='gallerycaption'>hi</li>
21590 <li class="gallerybox" style="width: 155px"><div style="width: 155px">
21591 <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>
21592 <div class="gallerytext">
21600 <ul class="gallery mw-gallery-traditional" typeof="mw:Extension/gallery" about="#mwt6" data-mw='{"name":"gallery","attrs":{},"body":{}}'>
21601 <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>
21602 <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>
21607 Gallery with wikitext inside gallery caption
21609 <gallery caption="# List item
21611 Text '''bold''' [[link]] {{ns:-1}}
21613 [[File:Foobar.jpg|thumb|File in gallery caption]]">
21614 File:Foobar.jpg|Image caption
21617 <ul class="gallery mw-gallery-traditional">
21618 <li class='gallerycaption'># List item Text <b>bold</b> <a href="/index.php?title=Link&action=edit&redlink=1" class="new" title="Link (page does not exist)">link</a> Special <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>File in gallery caption</div></div></div></li>
21619 <li class="gallerybox" style="width: 155px"><div style="width: 155px">
21620 <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>
21621 <div class="gallerytext">
21631 Gallery with wikitext inside caption
21634 "nativeGallery": true
21638 File:Foobar.jpg|alt=galleryalt|[[File:Foobar.jpg|alt=inneralt|20x20px|desc]]
21639 File:Foobar.jpg|alt=galleryalt|{{Test|unamedParam|alt=param}}
21642 <ul class="gallery mw-gallery-traditional">
21643 <li class="gallerybox" style="width: 155px"><div style="width: 155px">
21644 <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>
21645 <div class="gallerytext">
21646 <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>
21650 <li class="gallerybox" style="width: 155px"><div style="width: 155px">
21651 <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>
21652 <div class="gallerytext">
21653 <p>This is a test template
21660 <ul class="gallery mw-gallery-traditional" typeof="mw:Extension/gallery" about="#mwt6" data-mw='{"name":"gallery","attrs":{},"body":{}}'>
21661 <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>
21662 <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>
21667 Gallery (with showfilename option)
21670 "nativeGallery": true
21673 <gallery showfilename="">
21674 File:Nonexistent.jpg|caption
21675 File:Nonexistent.jpg
21676 File:Foobar.jpg|some '''caption''' [[Main Page]]
21680 <ul class="gallery mw-gallery-traditional">
21681 <li class="gallerybox" style="width: 155px"><div style="width: 155px">
21682 <div class="thumb" style="height: 150px;">Nonexistent.jpg</div>
21683 <div class="gallerytext">
21684 <p><a href="/wiki/File:Nonexistent.jpg" class="galleryfilename galleryfilename-truncate" title="File:Nonexistent.jpg">Nonexistent.jpg</a>
21689 <li class="gallerybox" style="width: 155px"><div style="width: 155px">
21690 <div class="thumb" style="height: 150px;">Nonexistent.jpg</div>
21691 <div class="gallerytext">
21692 <p><a href="/wiki/File:Nonexistent.jpg" class="galleryfilename galleryfilename-truncate" title="File:Nonexistent.jpg">Nonexistent.jpg</a>
21696 <li class="gallerybox" style="width: 155px"><div style="width: 155px">
21697 <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>
21698 <div class="gallerytext">
21699 <p><a href="/wiki/File:Foobar.jpg" class="galleryfilename galleryfilename-truncate" title="File:Foobar.jpg">Foobar.jpg</a>
21700 some <b>caption</b> <a href="/wiki/Main_Page" title="Main Page">Main Page</a>
21704 <li class="gallerybox" style="width: 155px"><div style="width: 155px">
21705 <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>
21706 <div class="gallerytext">
21707 <p><a href="/wiki/File:Foobar.jpg" class="galleryfilename galleryfilename-truncate" title="File:Foobar.jpg">Foobar.jpg</a>
21714 <ul class="gallery mw-gallery-traditional" typeof="mw:Extension/gallery" about="#mwt3" data-mw='{"name":"gallery","attrs":{"showfilename":""},"body":{}}'>
21715 <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>
21716 <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>
21717 <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>
21718 <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>
21722 ## Should Parsoid be preserving these variations? See T151367
21724 Gallery (with namespace-less filenames)
21727 "modes": ["wt2html", "html2html"],
21728 "nativeGallery": true
21732 File:Nonexistent.jpg
21738 <ul class="gallery mw-gallery-traditional">
21739 <li class="gallerybox" style="width: 155px"><div style="width: 155px">
21740 <div class="thumb" style="height: 150px;">Nonexistent.jpg</div>
21741 <div class="gallerytext">
21744 <li class="gallerybox" style="width: 155px"><div style="width: 155px">
21745 <div class="thumb" style="height: 150px;">Nonexistent.jpg</div>
21746 <div class="gallerytext">
21749 <li class="gallerybox" style="width: 155px"><div style="width: 155px">
21750 <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>
21751 <div class="gallerytext">
21754 <li class="gallerybox" style="width: 155px"><div style="width: 155px">
21755 <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>
21756 <div class="gallerytext">
21762 <ul class="gallery mw-gallery-traditional" typeof="mw:Extension/gallery" about="#mwt2" data-mw='{"name":"gallery","attrs":{},"body":{}}'>
21763 <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>
21764 <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>
21765 <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>
21766 <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>
21771 Gallery override link with wikilink (T36852)
21774 "nativeGallery": true
21778 File:Foobar.jpg|alt=galleryalt|link=Wikilink
21781 <ul class="gallery mw-gallery-traditional">
21782 <li class="gallerybox" style="width: 155px"><div style="width: 155px">
21783 <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>
21784 <div class="gallerytext">
21790 <ul class="gallery mw-gallery-traditional" typeof="mw:Extension/gallery" about="#mwt2" data-mw='{"name":"gallery","attrs":{},"body":{}}'>
21791 <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>
21796 Gallery override link with absolute external link (T36852)
21799 "nativeGallery": true
21803 File:Foobar.jpg|alt=galleryalt|link=http://www.example.org
21806 <ul class="gallery mw-gallery-traditional">
21807 <li class="gallerybox" style="width: 155px"><div style="width: 155px">
21808 <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>
21809 <div class="gallerytext">
21815 <ul class="gallery mw-gallery-traditional" typeof="mw:Extension/gallery" about="#mwt2" data-mw='{"name":"gallery","attrs":{},"body":{}}'>
21816 <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>
21821 Gallery override link with absolute external link with LanguageConverter
21826 File:foobar.jpg|caption|alt=galleryalt|link=http://www.example.org
21829 <ul class="gallery mw-gallery-traditional">
21830 <li class="gallerybox" style="width: 155px"><div style="width: 155px">
21831 <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>
21832 <div class="gallerytext">
21840 <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"}}'>
21841 <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>
21846 Gallery override link with malicious javascript (T36852)
21849 "modes": ["wt2html", "html2html"],
21850 "nativeGallery": true
21854 File:Foobar.jpg|alt=galleryalt|link=" onclick="alert('malicious javascript code!');
21857 <ul class="gallery mw-gallery-traditional">
21858 <li class="gallerybox" style="width: 155px"><div style="width: 155px">
21859 <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>
21860 <div class="gallerytext">
21866 <ul class="gallery mw-gallery-traditional" typeof="mw:Extension/gallery" about="#mwt2" data-mw='{"name":"gallery","attrs":{},"body":{}}'>
21867 <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>
21871 # Note that parsoid uses the invalid link as a caption, PHP does not.
21873 Gallery with invalid title as link (T45964)
21876 "modes": ["wt2html", "html2html"],
21877 "nativeGallery": true
21881 File:Foobar.jpg|link=<
21884 <ul class="gallery mw-gallery-traditional">
21885 <li class="gallerybox" style="width: 155px"><div style="width: 155px">
21886 <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>
21887 <div class="gallerytext">
21893 <ul class="gallery mw-gallery-traditional" typeof="mw:Extension/gallery" about="#mwt2" data-mw='{"name":"gallery","attrs":{},"body":{}}'>
21894 <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>
21899 Serialize gallery without attrs in data-mw
21902 "modes": ["html2wt"],
21903 "nativeGallery": true
21906 <ul class="gallery mw-gallery-traditional" typeof="mw:Extension/gallery" about="#mwt2" data-mw='{"name":"gallery","body":{}}'>
21907 <li class="gallerycaption">123</li>
21908 <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>
21911 <gallery caption="123">
21917 Gallery with class and style attributes
21920 "nativeGallery": true
21923 <gallery class="center" style="text-align: center;">
21927 <ul class="gallery mw-gallery-traditional center" style="text-align: center;">
21928 <li class="gallerybox" style="width: 155px"><div style="width: 155px">
21929 <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>
21930 <div class="gallerytext">
21936 <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":{}}'>
21937 <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>
21942 Gallery in slideshow mode
21945 "nativeGallery": true
21948 <gallery mode="slideshow" showthumbnails="">
21952 <ul class="gallery mw-gallery-slideshow" data-showthumbnails="1">
21953 <li class="gallerybox" style="width: 155px"><div style="width: 155px">
21954 <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>
21955 <div class="gallerytext">
21961 <ul class="gallery mw-gallery-slideshow" data-showthumbnails="1" typeof="mw:Extension/gallery" about="#mwt2" data-mw='{"name":"gallery","attrs":{"mode":"slideshow","showthumbnails":""},"body":{}}'>
21962 <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>
21967 Serialize gallery image captions on a line
21970 "modes": ["html2wt"],
21971 "nativeGallery": true
21974 <ul class="gallery mw-gallery-traditional" typeof="mw:Extension/gallery" about="#mwt2" data-mw='{"name":"gallery","attrs":{},"body":{}}'>
21975 <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>
21976 <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>
21980 File:Foobar.jpg| hi ho
21981 File:Foobar.jpg|hi<br />ho
21986 HTML Hex character encoding (spells the word "JavaScript")
21988 parsoid=wt2html,wt2wt,html2html
21990 JavaScript
21992 <p>JavaScript
21995 <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>
21999 HTML Hex character encoding bogus encoding (T28437 regression check)
22003 <p>&#xsee;&#XSEE;
22008 HTML Hex character encoding mixed case
22010 parsoid=wt2html,wt2wt,html2html
22017 <p><span typeof="mw:Entity">î</span><span typeof="mw:Entity">î</span></p>
22020 # See: https://www.w3.org/TR/html5/syntax.html#character-references
22021 # Note that U+000C (form feed) is not a valid XML character, so
22022 # it is banned even though allowed in HTML5.
22024 Illegal character references (T106578)
22029 ; Control (low): 
22030 ; Control (high):  Ÿ
22031 ; Surrogate: ��
22032 ; This is an okay astral character: 💩
22040 <dt>Control (low)</dt>
22042 <dt>Control (high)</dt>
22043 <dd>&#x7F; &#x9F;</dd>
22045 <dd>&#xD83D;&#xDCA9;</dd>
22046 <dt>This is an okay astral character</dt>
22047 <dd>💩</dd></dl>
22051 __FORCETOC__ override
22063 ISBN 978-0-1234-56 789
22065 <p><a href="/wiki/Special:BookSources/9780123456" class="internal mw-magiclink-isbn">ISBN 978-0-1234-56</a> 789
22068 <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>
22072 ISBN followed by 5 spaces
22083 ISBN ISBN 1234567890
22085 <p>ISBN <a href="/wiki/Special:BookSources/1234567890" class="internal mw-magiclink-isbn">ISBN 1234567890</a>
22088 <p>ISBN <a href="./Special:BookSources/1234567890" rel="mw:WikiLink" data-parsoid='{"stx":"magiclink"}'>ISBN 1234567890</a></p>
22091 # Uppercase X and lowercase x as well
22102 <p><a href="/wiki/Special:BookSources/346204561X" class="internal mw-magiclink-isbn">ISBN 3-462-04561-X</a>
22103 <a href="/wiki/Special:BookSources/346204561X" class="internal mw-magiclink-isbn">ISBN 3-462-04561-x</a>
22104 <a href="/wiki/Special:BookSources/080442957X" class="internal mw-magiclink-isbn">ISBN 080442957X</a>
22105 <a href="/wiki/Special:BookSources/080442957X" class="internal mw-magiclink-isbn">ISBN 080442957x</a>
22106 <a href="/wiki/Special:BookSources/978080442957X" class="internal mw-magiclink-isbn">ISBN 978080442957X</a>
22107 <a href="/wiki/Special:BookSources/978080442957X" class="internal mw-magiclink-isbn">ISBN 978080442957x</a>
22110 <p><a href="./Special:BookSources/346204561X" rel="mw:WikiLink" data-parsoid='{"stx":"magiclink"}'>ISBN 3-462-04561-X</a>
22111 <a href="./Special:BookSources/346204561X" rel="mw:WikiLink" data-parsoid='{"stx":"magiclink"}'>ISBN 3-462-04561-x</a>
22112 <a href="./Special:BookSources/080442957X" rel="mw:WikiLink" data-parsoid='{"stx":"magiclink"}'>ISBN 080442957X</a>
22113 <a href="./Special:BookSources/080442957X" rel="mw:WikiLink" data-parsoid='{"stx":"magiclink"}'>ISBN 080442957x</a>
22114 <a href="./Special:BookSources/978080442957X" rel="mw:WikiLink" data-parsoid='{"stx":"magiclink"}'>ISBN 978080442957X</a>
22115 <a href="./Special:BookSources/978080442957X" rel="mw:WikiLink" data-parsoid='{"stx":"magiclink"}'>ISBN 978080442957x</a></p>
22119 ISBN with empty prefix (parsoid test)
22123 <p><a href="/wiki/Special:BookSources/1234567890" class="internal mw-magiclink-isbn">ISBN 1234567890</a>
22126 <p><a href="./Special:BookSources/1234567890" rel="mw:WikiLink">ISBN 1234567890</a></p>
22130 T24905: <abbr> followed by ISBN followed by </a>
22132 <abbr>(fr)</abbr> ISBN 2753300917 [http://www.example.com example.com]
22134 <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>
22137 <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>
22145 <p>RFC <a class="external mw-magiclink-rfc" rel="nofollow" href="https://tools.ietf.org/html/rfc1234">RFC 1234</a>
22148 <p>RFC <a href="https://tools.ietf.org/html/rfc1234" rel="mw:ExtLink" class="external mw-magiclink">RFC 1234</a></p>
22152 Double RFC with a wiki link
22156 <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>
22159 <p>RFC <a rel="mw:WikiLink" href="./RFC_1234" title="RFC 1234">RFC 1234</a></p>
22167 <p><a class="external mw-magiclink-rfc" rel="nofollow" href="https://tools.ietf.org/html/rfc983">RFC 983</a> 987
22170 <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>
22174 Centre-aligned image
22176 [[Image:foobar.jpg|centre]]
22178 <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>
22181 <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>
22187 [[Image:foobar.jpg|none]]
22189 <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>
22192 <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>
22196 Width + Height sized image (using px) (height is ignored)
22198 [[Image:foobar.jpg|640x480px]]
22200 <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>
22203 <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>
22207 Width-sized image (using px, no following whitespace)
22209 [[Image:foobar.jpg|640px]]
22211 <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>
22214 <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>
22218 Width-sized image (using px, with following whitespace - test regression from r39467)
22220 [[Image:foobar.jpg|640px ]]
22222 <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>
22225 <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>
22229 Width-sized image (using px, with preceding whitespace - test regression from r39467)
22231 [[Image:foobar.jpg| 640px]]
22233 <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>
22236 <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>
22240 Image with page parameter
22244 [[File:LoremIpsum.djvu|page=2]]
22246 <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>
22249 <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>
22253 Another italics / bold test
22261 # FIXME: The php output seems broken. It's interleaving some open/close tags.
22267 <dl><dd><dl><dt><dl><dt><dl><dt><dl><dd><dl><dd></dt></dl></dd></dl></dd></dl></dd></dl></dd></dl></dd></dl>
22270 <dl><dd><dl><dt><dl><dt><dl><dt><dl><dd><dl><dd></dd></dl></dd></dl></dt></dl></dt></dl></dt></dl></dd></dl>
22274 # Images with the "|" character in external URLs in comment tags; Eats half the comment, leaves unmatched "</a>" tag.
22276 Images with the "|" character in the comment
22278 [[File:Foobar.jpg|thumb|An [http://test/?param1=|left|¶m2=|x external] URL]]
22280 <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>
22283 <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>
22287 [Before] HTML without raw HTML enabled ($wgRawHtml==false)
22289 <html><script>alert(1);</script></html>
22291 <p><html><script>alert(1);</script></html>
22296 HTML with raw HTML ($wgRawHtml==true)
22300 <html><script>alert(1);</script></html>
22302 <p><script>alert(1);</script>
22305 <p><script typeof="mw:Extension/html" about="#mwt3" data-mw='{"name":"html","attrs":{},"body":{"extsrc":"<script>alert(1);</script>"}}'>alert(1);</script></p>
22309 Parents of subpages, one level up
22311 subpage title=[[Subpage test/L1/L2/L3]]
22315 <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>
22321 Parents of subpages, one level up, not named
22323 subpage title=[[Subpage test/L1/L2/L3]]
22327 <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>
22334 Parents of subpages, two levels up
22336 subpage title=[[Subpage test/L1/L2/L3]]
22342 <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
22343 </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>
22348 Parents of subpages, two levels up, without trailing slash or name.
22350 subpage title=[[Subpage test/L1/L2/L3]]
22359 Parents of subpages, two levels up, with lots of extra trailing slashes.
22361 subpage title=[[Subpage test/L1/L2/L3]]
22365 <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>
22370 Subpage test/L1/L2/L3Sibling
22376 Transclusion of a sibling page (one level up)
22378 subpage title=[[Subpage test/L1/L2/L3]]
22387 Transclusion of a child page
22389 subpage title=[[Subpage test/L1/L2]]
22397 # This is wt2html only in Parsoid because we add <nowiki>
22398 # because of {{..}} and we don't expect to fix that to
22399 # eliminate the nowikis selective for {{..}} markup.
22401 Non-transclusion because of too many up levels
22403 subpage title=[[Subpage test/L1/L2/L3]]
22406 {{../../../../More than parent}}
22408 <p>{{../../../../More than parent}}
22411 <p>{{../../../../More than parent}}</p>
22415 Definition list code coverage
22429 <dl><dt>title </dt><dd>def</dd>
22430 <dt>title </dt><dd>def</dd>
22431 <dt>title</dt><dd>def</dd></dl>
22435 Don't fall for the self-closing div
22437 <div>hello world</div/>
22439 <div>hello world</div>
22448 <p>[[:Template:Msg]]
22457 <p><a href="/index.php?title=Template:QUERTY&action=edit&redlink=1" class="new" title="Template:QUERTY (page does not exist)">Template:QUERTY</a>
22461 # This isn't needed for XHTML conformance, but would be handy as a fallback security measure
22463 Always escape literal '>' in output, not just after '<'
22477 <p>This is a test template
22478 This is a test template
22490 Inclusion of !userCanEdit() content
22494 <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>
22500 Out-of-order TOC heading levels
22509 <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>
22511 <li class="toclevel-1 tocsection-1"><a href="#2"><span class="tocnumber">1</span> <span class="toctext">2</span></a>
22513 <li class="toclevel-2 tocsection-2"><a href="#6"><span class="tocnumber">1.1</span> <span class="toctext">6</span></a></li>
22514 <li class="toclevel-2 tocsection-3"><a href="#3"><span class="tocnumber">1.2</span> <span class="toctext">3</span></a></li>
22517 <li class="toclevel-1 tocsection-4"><a href="#1"><span class="tocnumber">2</span> <span class="toctext">1</span></a>
22519 <li class="toclevel-2 tocsection-5"><a href="#5"><span class="tocnumber">2.1</span> <span class="toctext">5</span></a></li>
22520 <li class="toclevel-2 tocsection-6"><a href="#2_2"><span class="tocnumber">2.2</span> <span class="toctext">2</span></a></li>
22526 <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>
22527 <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>
22528 <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>
22529 <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>
22530 <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>
22531 <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>
22537 ISBN with a dummy number
22547 ISBN with space-delimited number
22551 <p><a href="/wiki/Special:BookSources/9290170328" class="internal mw-magiclink-isbn">ISBN 92 9017 032 8</a>
22554 <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>
22559 ISBN with multiple spaces, no number
22578 </p><p><a href="/wiki/Special:BookSources/1234567890" class="internal mw-magiclink-isbn">ISBN 1234567890</a>
22579 </p><p>ISBN 12345678901
22582 <p>ISBN 123456789</p>
22584 <p><a href="./Special:BookSources/1234567890" rel="mw:WikiLink" data-parsoid='{"stx":"magiclink"}'>ISBN 1234567890</a></p>
22586 <p>ISBN 12345678901</p>
22591 ISBN with trailing year (T9110)
22593 ISBN 1-234-56789-0 - 2006
22595 ISBN 1 234 56789 0 - 2006
22597 <p><a href="/wiki/Special:BookSources/1234567890" class="internal mw-magiclink-isbn">ISBN 1-234-56789-0</a> - 2006
22598 </p><p><a href="/wiki/Special:BookSources/1234567890" class="internal mw-magiclink-isbn">ISBN 1 234 56789 0</a> - 2006
22601 <p><a href="./Special:BookSources/1234567890" rel="mw:WikiLink" data-parsoid='{"stx":"magiclink"}'>ISBN 1-234-56789-0</a> - 2006</p>
22603 <p><a href="./Special:BookSources/1234567890" rel="mw:WikiLink" data-parsoid='{"stx":"magiclink"}'>ISBN 1 234 56789 0</a> - 2006</p>
22610 wgFragmentMode=[ 'html5', 'legacy' ]
22612 {{anchorencode:foo bar©#%n}}
22617 <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>
22621 anchorencode (legacy)
22623 wgFragmentMode=[ 'legacy' ]
22625 {{anchorencode:foo bar©#%n}}
22627 <p>foo_bar.C2.A9.23.25n
22632 anchorencode trims spaces
22634 wgFragmentMode=[ 'html5', 'legacy' ]
22636 {{anchorencode: __pretty__please__}}
22641 <p about="#mwt1" typeof="mw:Transclusion" data-mw='{"parts":[{"template":{"target":{"wt":"anchorencode: __pretty__please__","function":"anchorencode"},"params":{},"i":0}}]}'>pretty_please</p>
22645 anchorencode deals with links
22647 wgFragmentMode=[ 'html5', 'legacy' ]
22649 {{anchorencode: [[hello|world]] [[hi]]}}
22654 <p about="#mwt1" typeof="mw:Transclusion" data-mw='{"parts":[{"template":{"target":{"wt":"anchorencode: [[hello|world]] [[hi]]","function":"anchorencode"},"params":{},"i":0}}]}'>world_hi</p>
22658 anchorencode deals with templates
22660 wgFragmentMode=[ 'html5', 'legacy' ]
22662 {{anchorencode: {{Foo}} x}}
22667 <p about="#mwt2" typeof="mw:Transclusion" data-mw='{"parts":[{"template":{"target":{"wt":"anchorencode: {{Foo}} x","function":"anchorencode"},"params":{},"i":0}}]}'>FOO_x</p>
22671 anchorencode encodes like the TOC generator: (T20431)
22673 wgFragmentMode=[ 'html5', 'legacy' ]
22675 ===_ +:.3A%3A _ &&]] x===
22676 {{anchorencode: _ +:.3A%3A _ &&]] x}}
22679 <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>
22680 <p>+:.3A%3A_&&]]_x
22683 <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>
22684 <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>
22685 <meta property="mw:PageProp/noeditsection"/>
22689 anchorencode encodes like the TOC generator: (T20431) (legacy)
22691 wgFragmentMode=[ 'legacy' ]
22693 ===_ +:.3A%3A&&]]===
22694 {{anchorencode: _ +:.3A%3A&&]] }}
22697 <h3><span class="mw-headline" id=".2B:.3A.253A.26.26.5D.5D">_ +:.3A%3A&&]]</span></h3>
22698 <p>.2B:.3A.253A.26.26.5D.5D
22703 T8200: blockquotes and paragraph formatting
22724 T10293: Use of center tag ruins paragraph formatting
22745 Parsing of overlapping (improperly nested) inline html tags
22747 <span><s>x</span></s>
22749 <p><span><s>x</span></s></span>
22752 <p><span><s>x</s></span>
22757 ### Language variants related tests
22760 # Parsoid does not mark self-links.
22761 # Parsoid does not convert links; PHP will do any necessary redirects.
22764 Self-link in language variants
22766 title=[[Dunav]] language=sr
22768 Both [[Dunav]] and [[Дунав]] are names for this river.
22770 <p>Both <a class="mw-selflink selflink">Dunav</a> and <a class="mw-selflink selflink">Дунав</a> are names for this river.
22773 <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>
22783 Link to another existing title shouldn't be parsed as self-link even if it's a variant of this title
22785 title=[[Duna]] language=sr
22787 [[Дуна]] is not a self-link while [[Duna]] and [[Dуна]] are still self-links.
22789 <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.
22792 <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>
22796 Link to a section of a variant of this title shouldn't be parsed as self-link
22798 title=[[Duna]] language=sr
22800 [[Dуна]] is a self-link while [[Dunа#Foo]] and [[Dуна#Foo]] are not self-links.
22802 <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.
22805 <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>
22809 Link to pages in language variants
22813 Main Page can be written as [[Маин Паге]]
22815 <p>Main Page can be written as <a href="/wiki/Main_Page" title="Main Page">Маин Паге</a>
22818 <p>Main Page can be written as <a rel="mw:WikiLink" href="./Маин_Паге" title="Маин Паге">Маин Паге</a></p>
22823 Multiple links to pages in language variants
22827 [[Main Page]] can be written as [[Маин Паге]] same as [[Маин Паге]].
22829 <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>.
22832 <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>
22837 Simple template in language variants
22843 <p>This is a test template
22849 Template with explicit namespace in language variants
22855 <p>This is a test template
22861 Basic test for template parameter in language variants
22865 {{парамтест|param=foo}}
22867 <p>This is a test template with parameter foo
22872 Simple category in language variants
22876 [[Category:МедиаWики Усер'с Гуиде]]
22878 cat=МедиаWики_Усер'с_Гуиде sort=
22880 <link rel="mw:PageProp/Category" href="./Категорија:МедиаWики_Усер'с_Гуиде" data-parsoid='{"stx":"simple","a":{"href":"./Категорија:МедиаWики_Усер'с_Гуиде"},"sa":{"href":"Category:МедиаWики Усер'с Гуиде"}}'/>
22895 ## We used to, but no longer wt2wt this test since the default serializer
22896 ## will normalize all categories to serialize on their own line.
22897 ## This wikitext usage is going to be fairly uncommon in production and
22898 ## selser will take care of preserving formatting in those scenarios.
22900 Don't convert blue categorylinks to another variant (T35210)
22906 [[A]][[Category:分类]]
22910 <p><a rel="mw:WikiLink" href="./A" title="A">A</a></p>
22911 <link rel="mw:PageProp/Category" href="./Category:分类"/>
22915 Stripping -{}- tags (language variants)
22919 Latin proverb: -{Ne nuntium necare}-
22921 <p>Latin proverb: Ne nuntium necare
22924 <p>Latin proverb: <span typeof="mw:LanguageVariant" data-mw-variant='{"disabled":{"t":"Ne nuntium necare"}}'></span></p>
22929 Prevent conversion with -{}- tags (language variants)
22931 language=sr variant=sr-ec
22933 Latinski: -{Ne nuntium necare}-
22935 <p>Латински: Ne nuntium necare
22938 <p>Latinski: <span typeof="mw:LanguageVariant" data-mw-variant='{"disabled":{"t":"Ne nuntium necare"}}'></span></p>
22943 Prevent conversion of text with -{}- tags (language variants)
22945 language=sr variant=sr-ec
22947 Latinski: -{Ne nuntium necare}-
22949 <p>Латински: Ne nuntium necare
22952 <p>Latinski: <span typeof="mw:LanguageVariant" data-mw-variant='{"disabled":{"t":"Ne nuntium necare"}}'></span></p>
22957 Prevent conversion of links with -{}- tags (language variants)
22959 language=sr variant=sr-ec
22963 <p><a href="/wiki/Main_Page" title="Main Page">Main Page</a>
22966 <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>
22971 -{}- tags within headlines (within html for parserConvert())
22973 wgFragmentMode=[ 'html5', 'legacy' ]
22975 language=sr variant=sr-ec
22979 Note that even an unprotected headline ID is not affected by language
22984 <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>
22985 <p>Ноте тхат евен ан унпротецтед хеадлине ИД ис нот аффецтед бy лангуаге
22988 <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>
22991 <h2 id="-{Naslov}-"><span id="-.7BNaslov.7D-" typeof="mw:FallbackId"></span><span typeof="mw:LanguageVariant" data-mw-variant='{"disabled":{"t":"Naslov"}}'></span></h2>
22993 <p>Note that even an unprotected headline ID is not affected by language
22996 <h2 id="Latinski">Latinski</h2>
23000 Explicit definition of language variant alternatives
23002 language=zh variant=zh-tw
23004 -{zh:China;zh-tw:Taiwan}-, not China
23006 <p>Taiwan, not China
23009 <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>
23013 Explicit definition of language variant alternatives (BCP 47 codes)
23015 language=zh variant=zh-tw
23017 -{zh:China;zh-Hant-TW:Taiwan}-, not China
23019 <p>Taiwan, not China
23022 <p><span typeof="mw:LanguageVariant" data-parsoid='{"tSp":[6]}' data-mw-variant='{"twoway":[{"l":"zh","t":"China"},{"l":"zh-Hant-TW","t":"Taiwan"}]}'></span>, not China</p>
23026 Filter syntax for language variants
23028 language=zh variant=zh-tw
23030 foo-{zh;zh-hans;zh-hant|blog, WEBJOURNAL, WEBLOG}-quux
23032 <p>fooblog, WEBJOURNAL, WEBLOGquux
23035 <p>foo<span typeof="mw:LanguageVariant" data-mw-variant='{"filter":{"l":["zh","zh-hans","zh-hant"],"t":"blog, WEBJOURNAL, WEBLOG"}}'></span>quux</p>
23038 # Note that Parsoid post-processing for language variants needs to
23039 # update the `title` attribute here, based on the mw:ExpandedAttrs property
23041 Conversion around HTML tags
23043 language=sr variant=sr-ec
23045 -{H|span=>sr-ec:script;title=>sr-ec:src}-
23046 <span title="La-{sr-el:L;sr-ec:C}-tin">ski</span>
23049 <span title="ЛаCтин">ски</span>
23052 <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"}]}'/>
23053 <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>
23057 Explicit session-wise two-way language variant mapping (A flag and - flag)
23059 language=zh variant=zh-tw
23061 This is -{zh:China; zh-tw:Taiwan}-, but we'll forget that now.
23063 Taiwan is not China.
23065 But -{A|zh:China; zh-tw:Taiwan}- is China,
23067 (This-{-|zh:China; zh-tw:Taiwan}- should be stripped!)
23069 and -{China}- is China.
23071 <p>This is Taiwan, but we'll forget that now.
23072 </p><p>Taiwan is not China.
23073 </p><p>But Taiwan is Taiwan,
23074 </p><p>(This should be stripped!)
23075 </p><p>and China is China.
23078 <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>
23079 <p>Taiwan is not China.</p>
23080 <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>
23081 <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>
23082 <p>and <span typeof="mw:LanguageVariant" data-mw-variant='{"disabled":{"t":"China"}}'></span> is China.</p>
23086 Explicit session-wise one-way language variant mapping (A flag and - flag)
23088 language=zh variant=zh-tw
23090 This is -{COUNTRY=>zh:China;COUNTRY=>zh-tw:Taiwan}-, but we'll forget that now.
23092 COUNTRY is China or Taiwan.
23094 But -{A|COUNTRY=>zh:China;COUNTRY=>zh-tw:Taiwan}- is COUNTRY,
23096 (This-{-|COUNTRY=>zh:China;COUNTRY=>zh-tw:Taiwan}- should be stripped!)
23098 and -{COUNTRY}- is COUNTRY.
23100 <p>This is Taiwan, but we'll forget that now.
23101 </p><p>COUNTRY is China or Taiwan.
23102 </p><p>But Taiwan is Taiwan,
23103 </p><p>(This should be stripped!)
23104 </p><p>and COUNTRY is COUNTRY.
23107 <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>
23108 <p>COUNTRY is China or Taiwan.</p>
23109 <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>
23110 <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>
23111 <p>and <span typeof="mw:LanguageVariant" data-mw-variant='{"disabled":{"t":"COUNTRY"}}'></span> is COUNTRY.</p>
23115 Explicit session-wise two-way language variant mapping (H flag for hide)
23117 language=zh variant=zh-tw
23119 (This-{H|zh:China;zh-tw:Taiwan}- should be stripped!)
23123 <p>(This should be stripped!)
23124 </p><p>Taiwan is Taiwan.
23127 <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>
23128 <p>Taiwan is China.</p>
23132 Explicit session-wise one-way language variant mapping (H flag for hide)
23134 language=zh variant=zh-tw
23136 (This-{H|COUNTRY=>zh:China;COUNTRY=>zh-tw:Taiwan}- should be stripped!)
23138 COUNTRY is Taiwan or China.
23140 <p>(This should be stripped!)
23141 </p><p>Taiwan is Taiwan or China.
23144 <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>
23145 <p>COUNTRY is Taiwan or China.</p>
23148 ## Note that parsoid test runner does not support 'showtitle' option.
23150 Adding explicit conversion rule for title (T flag)
23152 language=zh variant=zh-tw showtitle
23154 Should be stripped-{T|zh:China;zh-tw:Taiwan}-!
23159 <p>Should be stripped!
23160 </p><p>Taiwan is China.
23163 <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>
23164 <p>Taiwan is China.</p>
23168 Code coverage: T combined with H flag
23170 language=zh variant=zh-tw showtitle
23172 Should be stripped-{T;H|zh:China; zh-tw:Taiwan}-!
23177 <p>Should be stripped!
23178 </p><p>Taiwan is Taiwan.
23181 <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>
23182 <p>Taiwan is China.</p>
23186 Code coverage: T with no variants
23188 language=zh variant=zh-tw showtitle
23190 -{H|zh:China; zh-tw:Taiwan}-
23191 Taiwan is China.-{T|Taiwan is China}-
23198 <p><meta typeof="mw:LanguageVariant" data-mw-variant='{"add":true,"twoway":[{"l":"zh","t":"China"},{"l":"zh-tw","t":"Taiwan"}]}'/>
23199 Taiwan is China.<meta typeof="mw:LanguageVariant" data-mw-variant='{"disabled":{"t":"Taiwan is China"},"title":true}'/></p>
23203 Code coverage: rules with no variants
23205 language=zh variant=zh-tw
23207 -{H|zh:China; zh-tw:Taiwan}-
23218 <p><meta typeof="mw:LanguageVariant" data-mw-variant='{"add":true,"twoway":[{"l":"zh","t":"China"},{"l":"zh-tw","t":"Taiwan"}]}'/>
23220 <meta typeof="mw:LanguageVariant" data-mw-variant='{"add":true,"twoway":[{"l":"*","t":"China"}]}'/>
23221 Taiwan is China.</p>
23226 Code coverage: D flag for conversion rule
23228 language=zh variant=zh-tw
23230 -{D|zh-cn:XA; zh-tw:YA}-
23231 -{A;D|zh-cn:XB; zh-tw:YB}-
23232 -{D;H|zh-cn:XC; zh-tw:YC}-
23234 -{D;H|FOO=>zh-tw:BAR;FOO=>zh-cn:BAT}-
23240 XA XB XC YA YB YC FOO BAR BAT 012345
23245 </p><p>FOO⇒台灣:BAR;FOO⇒大陆:BAT;
23249 </p><p>XA YB YC YA YB YC BAR BAR BAT 013355
23252 <p><span typeof="mw:LanguageVariant" data-mw-variant='{"describe":true,"twoway":[{"l":"zh-cn","t":"XA"},{"l":"zh-tw","t":"YA"}]}'></span>
23253 <meta typeof="mw:LanguageVariant" data-mw-variant='{"add":true,"describe":true,"twoway":[{"l":"zh-cn","t":"XB"},{"l":"zh-tw","t":"YB"}]}'/>
23254 <span typeof="mw:LanguageVariant" data-mw-variant='{"add":true,"describe":true,"twoway":[{"l":"zh-cn","t":"XC"},{"l":"zh-tw","t":"YC"}]}'></span></p>
23255 <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>
23256 <p><span typeof="mw:LanguageVariant" data-mw-variant='{"describe":true,"oneway":[{"f":"0","l":"zh-tw","t":"1"}]}'></span>
23257 <meta typeof="mw:LanguageVariant" data-mw-variant='{"add":true,"describe":true,"oneway":[{"f":"2","l":"zh-tw","t":"3"}]}'/>
23258 <span typeof="mw:LanguageVariant" data-mw-variant='{"add":true,"describe":true,"oneway":[{"f":"4","l":"zh-tw","t":"5"}]}'></span></p>
23259 <p>XA XB XC YA YB YC FOO BAR BAT 012345</p>
23263 Code coverage: N flag for conversion rule
23265 language=zh variant=zh-cn
23275 </p><p>српски (ћирилица)
23278 <p><span typeof="mw:LanguageVariant" data-mw-variant='{"name":{"t":"zh-cn"}}'></span></p>
23279 <p><span typeof="mw:LanguageVariant" data-mw-variant='{"name":{"t":"zh-tw"}}'></span></p>
23280 <p><span typeof="mw:LanguageVariant" data-mw-variant='{"name":{"t":"sr-ec"}}'></span></p>
23283 # html2wt suppresses the bogus 'D' flag, so this is wt2html only
23285 Code coverage: N flag for conversion rule (wt2html only)
23287 language=zh variant=zh-cn
23288 parsoid=wt2html,html2html
23295 <p><span typeof="mw:LanguageVariant" data-mw-variant='{"name":{"t":"en"}}' data-parsoid='{"fl":["D","N"]}'></span></p>
23299 Testing that changing the language variant here in the tests actually works
23301 language=zh variant=zh showtitle
23303 Should be stripped-{T|zh:China; zh-tw:Taiwan}-!
23306 <p>Should be stripped!
23309 <p>Should be stripped<meta typeof="mw:LanguageVariant" data-mw-variant='{"title":true,"twoway":[{"l":"zh","t":"China"},{"l":"zh-tw","t":"Taiwan"}]}'/>!</p>
23313 Recursive conversion of alt and title attrs shouldn't clear converter state
23315 language=zh variant=zh-cn
23318 -{H|zh-cn:Exclamation; zh-tw:exclamation}-
23319 Should be stripped-{T|zh-cn:China; zh-tw:Taiwan}-<span title="exclamation">!</span>
23323 Should be stripped<span title="Exclamation">!</span>
23326 <p><meta typeof="mw:LanguageVariant" data-mw-variant='{"add":true,"twoway":[{"l":"zh-cn","t":"Exclamation"},{"l":"zh-tw","t":"exclamation"}]}'/>
23327 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>
23331 T26072: more test on conversion rule for title
23333 language=zh variant=zh-tw showtitle
23335 This should be stripped-{T|zh:China; zh-tw:Taiwan}-!
23337 This won't take interferes with the title rule-{H|zh:Beijing; zh-tw:Taipei}-.
23340 <p>This should be stripped!
23341 </p><p>This won't take interferes with the title rule.
23344 <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>
23345 <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>
23349 Partly disable title conversion if variant == main language code
23351 language=zh variant=zh title=[[ZH]] showtitle
23353 -{T|zh-cn:CN;zh-tw:TW}-
23359 <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>
23363 Partly disable title conversion if variant == main language code, more
23365 language=zh variant=zh title=[[ZH]] showtitle
23373 <p><meta typeof="mw:LanguageVariant" data-mw-variant='{"disabled":{"t":"TW"},"title":true}'/></p>
23377 Raw output of variant escape tags (R flag)
23379 language=zh variant=zh-tw
23381 Raw: -{R|zh:China;zh-tw:Taiwan}-
23383 <p>Raw: zh:China;zh-tw:Taiwan
23386 <p>Raw: <span typeof="mw:LanguageVariant" data-mw-variant='{"disabled":{"t":"zh:China;zh-tw:Taiwan"}}'></span></p>
23389 # html2wt suppresses the bogus 'D' flags, so this is wt2html only
23391 Raw output of variant escape tags (R flag) (wt2html only)
23393 language=zh variant=zh-tw
23394 parsoid=wt2html,html2html
23396 -{Variant}- -{D|syntax}- -{D;R|options}-
23398 <p>Variant syntax options
23401 <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>
23405 Nested markup inside raw output of variant escape tags (R flag)
23407 language=zh variant=zh-tw
23409 Nested raw: -{R|nested -{zh:China;zh-tw:Taiwan}- nested}-
23411 <p>Nested raw: nested Taiwan nested
23414 <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>
23418 Nested markup and spaces inside raw output of variant escape tags (R flag)
23420 language=zh variant=zh-tw
23422 X-{ outer -{ inner }- outer }-X
23424 <p>X outer inner outer X
23427 <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>
23431 Templates inside raw output of variant escape tags (R flag)
23433 language=zh variant=zh-tw
23435 Nested raw: -{R|nested {{echo|hi}} templates}-
23437 <p>Nested raw: nested hi templates
23440 <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>
23444 Strings evaluating false shouldn't be ignored by Language converter (T51072)
23446 language=zh variant=zh-cn
23448 -{zh-cn:0;zh-sg:1;zh-tw:2;zh-hk:3}-
23453 <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>
23457 Conversion rules from [numeric-only string] to [something else] (T48634)
23459 language=zh variant=zh-cn
23461 -{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
23466 <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>
23470 Two-way converter rule entries with an empty value should be ignored (T53551)
23472 language=zh variant=zh-cn
23474 -{H|zh-cn:foo;zh-tw:;}-foobar
23479 <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>
23483 One-way converter rule entries with an empty "from" string should be ignored (T53551)
23485 language=zh variant=zh-cn
23487 -{H|=>zh-cn:foo;}-foobar
23492 <p><meta typeof="mw:LanguageVariant" data-parsoid='{"tSp":[5]}' data-mw-variant='{"add":true,"oneway":[{"f":"","l":"zh-cn","t":"foo"}]}'/>foobar</p>
23496 Empty converter rule entries shouldn't be inserted into the conversion table (T53551)
23498 language=zh variant=zh-cn
23505 <p><meta typeof="mw:LanguageVariant" data-mw-variant='{"add":true,"twoway":[{"l":"*","t":""}]}'/>foobar</p>
23509 Nested using of manual convert syntax
23511 language=zh variant=zh-hk
23513 Nested: -{zh-hans:Hi -{zh-cn:China;zh-sg:Singapore;}-;zh-hant:Hello -{zh-tw:Taiwan;zh-hk:H-{ong}- K-{}-ong;}-;}-!
23515 <p>Nested: Hello Hong Kong!
23518 <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>
23522 HTML markups with conversion syntax in attribs, nested in other conversion blocks
23524 language=zh variant=zh-cn
23526 -{zh;zh-hans;zh-hant|<span title="-{X}-">A</span>}-
23528 <p><span title="X">A</span>
23531 <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>
23535 HTML markups with conversion syntax in attribs, nested in other conversion blocks (not working yet in PHP parser)
23537 language=zh variant=zh-cn
23539 -{<span title="-{X}-">A</span>}-
23540 !! html/php+disabled
23541 <p><span title="X">A</span>
23544 <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>
23547 # Parsoid and PHP disagree on how to parse this example: Parsoid
23548 # insists that the content of a language converter element be a valid
23549 # DOM fragment or attribute string
23551 Language converter markup with block content
23553 language=zh variant=zh-cn
23555 <span>a-{b<div>c}-d
23557 <span>a-{zh;zh-hans;zh-hant|b<div>c}-d
23559 <span>a-{H|0=>zh-cn:x<span>y;0=>zh-tw:b<div>c}-d
23564 </span></div></span></div></span>
23566 <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
23568 <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
23570 <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>
23574 LanguageConverter selser (1)
23576 language=zh variant=zh-cn
23578 "modes": ["wt2wt", "selser"],
23580 ["span[typeof]", "attr", "data-mw-variant", "{\"disabled\":{\"t\":\"edited\"}}"]
23590 LanguageConverter selser (2)
23592 language=zh variant=zh-cn
23594 "modes": ["wt2wt", "selser"],
23596 ["span[class='x']", "contents", "text", "-{foo}-"],
23597 ["a", "contents", "text", "-{"],
23598 ["span[typeof]", "attr", "data-mw", "{\"parts\":[{\"template\":{\"target\":{\"wt\":\"1x\",\"href\":\"./Template:1x\"},\"params\":{\"1\":{\"wt\":\"-{\"}},\"i\":0}}]}"]
23602 <span class="x">TEXT1</span>
23603 [http://example.com TEXT2]
23607 <span class="x"><nowiki>-{foo}-</nowiki></span>
23608 [http://example.com -{]
23609 [[Foo|<nowiki>-{</nowiki>]]
23610 {{1x|<nowiki>-{</nowiki>}}
23613 # Tests LanguageVariantText in ConstrainedText
23615 LanguageConverter selser (3)
23617 language=zh variant=zh-cn
23619 "modes": ["wt2wt", "selser"],
23621 ["td > span", "attr", "typeof", "mw:LanguageVariant"],
23622 ["td > span", "attr", "data-mw-variant", "{\"disabled\":{\"t\":\"edited\"}}"]
23633 |<nowiki/>-{edited}-
23637 # Tests LanguageVariantText._fromSelSer
23639 LanguageConverter selser (4)
23641 language=zh variant=zh-cn
23643 "modes": ["wt2wt", "selser"],
23645 ["td > span.x", "remove"]
23651 |<span class="x">Foo</span>-{Bar}-
23652 ||<span class="x">Foo</span>-{Bar}-
23662 # Since Parsoid is starting to emit canonical wikitext for links,
23663 # [http://example.com http://example.com] will not RT back to that
23665 # Parsoid does not language-convert links (it is done in a
23666 # post-processing step)
23668 Proper conversion of text in external links
23670 language=sr variant=sr-ec
23673 http://www.google.com
23674 gopher://www.google.com
23675 [http://www.google.com http://www.google.com]
23676 [gopher://www.google.com gopher://www.google.com]
23677 [https://www.google.com irc://www.google.com]
23678 [ftp://www.google.com www.google.com/ftp://dir]
23679 [//www.google.com www.google.com]
23681 <p><a rel="nofollow" class="external free" href="http://www.google.com">http://www.google.com</a>
23682 <a rel="nofollow" class="external free" href="gopher://www.google.com">gopher://www.google.com</a>
23683 <a rel="nofollow" class="external text" href="http://www.google.com">http://www.google.com</a>
23684 <a rel="nofollow" class="external text" href="gopher://www.google.com">gopher://www.google.com</a>
23685 <a rel="nofollow" class="external text" href="https://www.google.com">irc://www.google.com</a>
23686 <a rel="nofollow" class="external text" href="ftp://www.google.com">www.гоогле.цом/фтп://дир</a>
23687 <a rel="nofollow" class="external text" href="//www.google.com">www.гоогле.цом</a>
23690 <p><a rel="mw:ExtLink" class="external free" href="http://www.google.com">http://www.google.com</a>
23691 <a rel="mw:ExtLink" class="external free" href="gopher://www.google.com">gopher://www.google.com</a>
23692 <a rel="mw:ExtLink" class="external text" href="http://www.google.com">http://www.google.com</a>
23693 <a rel="mw:ExtLink" class="external text" href="gopher://www.google.com">gopher://www.google.com</a>
23694 <a rel="mw:ExtLink" class="external text" href="https://www.google.com">irc://www.google.com</a>
23695 <a rel="mw:ExtLink" class="external text" href="ftp://www.google.com">www.google.com/ftp://dir</a>
23696 <a rel="mw:ExtLink" class="external text" href="//www.google.com">www.google.com</a></p>
23700 Do not convert roman numbers to language variants
23702 language=sr variant=sr-ec
23706 <p>Фридрих IV је цар.
23709 <p>Fridrih IV je car.</p>
23713 Unclosed language converter markup "-{"
23724 Don't convert raw rule "-{R|=>}-" to "=>"
23733 <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>
23737 Don't break link parsing if language converter markup is in the caption.
23739 language=sr variant=sr-ec
23741 [[Main Page|-{R|main page}-]]
23743 <p><a href="/wiki/Main_Page" title="Маин Паге">main page</a>
23746 <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>
23750 T146304: Don't break template parsing if language converter markup is in the parameter.
23752 language=sr variant=sr-ec
23759 <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>
23763 T146305: Don't break image parsing if language converter markup is in the caption.
23767 [[Датотека:Foobar.jpg|thumb|-{R|caption:}-]]
23769 <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>
23772 <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>
23776 T146305: Don't break image parsing if nested language converter markup is in the caption.
23778 language=zh variant=zh-cn
23780 [[File:Foobar.jpg|thumb|-{|zh-cn:blog (hk: -{zh-hans|WEBJOURNAL}-, tw: -{zh-hans|WEBLOG}-)}-]]
23782 <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>
23785 <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>
23788 # XXX html2wt disabled because rich markup in alt is not preserved.
23790 Don't break gallery if language converter markup is inside.
23795 File:foobar.jpg|[[File:foobar.jpg|20px|desc|alt=-{R|foo}-|-{R|bar}-]]|alt=-{R|bat}-
23796 File:foobar.jpg|{{Test|unamedParam|alt=-{R|param}-}}|alt=galleryalt
23799 <ul class="gallery mw-gallery-traditional">
23800 <li class="gallerybox" style="width: 155px"><div style="width: 155px">
23801 <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>
23802 <div class="gallerytext">
23803 <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>
23807 <li class="gallerybox" style="width: 155px"><div style="width: 155px">
23808 <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>
23809 <div class="gallerytext">
23810 <p>This is a test template
23817 <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"}}'>
23818 <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>
23819 <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>
23824 T153135: Don't break list handling if language converter markup is in the item.
23826 language=zh variant=zh-cn
23828 ;-{zh-cn:AAA;zh-tw:BBB}-
23832 <dt>foo:bar</dt></dl>
23835 <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>
23836 <dt data-parsoid='{"dsr":[25,39,1,0]}'><span typeof="mw:LanguageVariant" data-mw-variant='{"disabled":{"t":"foo:bar"}}'></span></dt>
23840 // Note that parsoid does not protect colons unless language converter
23841 // markup is properly nested, because it is a backtracking parser.
23843 T153135: Unclosed markup in definition list (code coverage)
23845 language=zh variant=zh-cn
23850 <dl><dt><b>foo:bar</b></dt><b>
23851 <dt>-{zh-cn:AAA</dt></b></dl><p><b>
23854 <dl><dt data-parsoid='{}'><b data-parsoid='{"stx":"html","autoInsertedEnd":true}'>foo:bar</b></dt><b data-parsoid='{"stx":"html","autoInsertedEnd":true,"autoInsertedStart":true}'>
23855 <dt data-parsoid='{}'>-{zh-cn</dt><dd data-parsoid='{"stx":"row"}'>AAA</dd></b></dl>
23859 T153135: Nested language converter markup in definition list (code coverage)
23861 language=zh variant=zh-cn
23863 ;-{|zh-cn:AAA -{zh-hans|foo:bar}- -{R|bat:baz}-}-:def
23865 <dl><dt>AAA foo:bar bat:baz</dt>
23869 <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>
23870 <dd data-parsoid='{"stx":"row","dsr":[49,53,1,0]}'>def</dd>
23874 # html2wt mode disabled due to <nowiki> insertion.
23876 T153140: Don't break table handling if language converter markup is in the cell.
23878 language=sr variant=sr-ec
23879 parsoid=wt2html,wt2wt,html2html
23896 <td><span typeof="mw:LanguageVariant" data-mw-variant='{"disabled":{"t":"B"}}'></span></td>
23903 Language converter tricky html2wt cases (1)
23906 parsoid=html2wt,wt2wt
23908 <p><span typeof="mw:LanguageVariant" data-mw-variant='{"disabled":{"t":"}-"}}'></span></p>
23910 -{<nowiki>}-</nowiki>}-
23917 Language converter tricky html2wt cases (2)
23920 parsoid=html2wt,wt2wt
23924 <nowiki>-{foo}-</nowiki>
23926 <p>-{foo}-
23931 Language converter tricky html2wt cases (3)
23934 parsoid=html2wt,wt2wt
23936 <p><span typeof="mw:LanguageVariant" data-mw-variant='{"disabled":{"t":"|"}}'></span></p>
23937 <p><span typeof="mw:LanguageVariant" data-mw-variant='{"disabled":{"t":"R|raw"}}'></span></p>
23938 <p><span typeof="mw:LanguageVariant" data-mw-variant='{"disabled":{"t":"-{foo}-"}}'></span></p>
23944 -{<nowiki>-{foo}-</nowiki>}-
23948 </p><p>-{foo}-
23953 Language converter tricky html2wt cases (4)
23956 parsoid=html2wt,wt2wt
23958 <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>
23966 # Note that the <nowiki> escaping added by parsoid for source text,
23967 # destination text, and language names only works on the PHP side
23968 # for *destination text*. (HTML entity escaping wouldn't work
23969 # any better.) This is probably a bug, at least for source texts.
23970 # (For language names PHP uses a precise regexp based on the languages
23971 # it currently knows have variants, which is fragile since this set
23972 # can grow/shrink over time.)
23974 Language converter tricky html2wt cases (5)
23976 language=zh variant=zh-cn
23978 <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>
23979 <p><meta typeof="mw:LanguageVariant" data-mw-variant='{"add":true,"oneway":[{"f":"A","l":"bo:g;us","t":"B"}]}'/></p>
23980 <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>
23981 <p><span typeof="mw:LanguageVariant" data-mw-variant='{"twoway":[{"l":"bo:g;us","t":"xyz"},{"l":"zh-cn","t":"abc"}]}'></span></p>
23984 -{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
23986 -{H|A=><nowiki>bo:g;us</nowiki>:B}-
23988 -{A|zh-tw:xyz; zh-cn:<nowiki>0;zh-tw:bar</nowiki>}-
23990 -{<nowiki>bo:g;us</nowiki>:xyz; zh-cn:abc}-
23993 !! html/php+disabled
23994 <p>foobat;xyz=>zh-cn:abc
23998 </p><p>a:b=>c 0;zh-tw:bar
24003 T179579: Nowiki and lc interaction
24010 -{123<nowiki>|</nowiki>456}-
24012 <p><span typeof="mw:LanguageVariant" data-mw-variant='{"disabled":{"t":"&lt;/nowiki>123"}}' data-parsoid='{"fl":[],"src":"-{</nowiki>123}-"}'></span></p>
24014 <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>
24018 T2529: Uncovered bullet
24028 T2529: Uncovered bullet in a deeply nested list
24030 *******Foo {{bullet}}
24032 <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>
24038 T2529: Uncovered table already at line-start
24061 T2529: Uncovered bullet in parser function result
24063 *Foo {{lc:{{bullet}} }}
24071 T7678: Double-parsed template argument
24073 {{lc:{{{1}}}|hello}}
24080 T7678: Double-parsed template invocation
24082 {{lc:{{paramtest {{!}} param = hello }} }}
24084 <p>{{paramtest | param = hello }}
24089 Case insensitivity of parser functions for non-ASCII characters (T10143)
24092 title=[[Main Page]]
24094 {{PRVNÍVELKÉ:ěščř}}
24095 {{prvnívelké:ěščř}}
24115 Morwen/13: Unclosed link followed by heading
24122 <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>
24127 HHP2.1: Heuristics for headings in preprocessor parenthetical structures
24134 <h1><span class="mw-headline" id="heading">heading</span></h1>
24139 HHP2.2: Heuristics for headings in preprocessor parenthetical structures
24146 <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>
24161 Paragraphs inside divs (no extra line breaks)
24173 Paragraphs inside divs (extra line break on open)
24188 Paragraphs inside divs (extra line break on close)
24203 Paragraphs inside divs (extra line break on open and close)
24219 # doBlockLevels screws up this output and Remex cleans up as much as it can.
24221 Nesting tags, paragraphs on lines which begin with <div>
24223 <div></div><strong>A
24226 <div></div><p><strong>A
24227 </strong></p><strong></strong><p><strong>B</strong>
24230 <div data-parsoid='{"stx":"html"}'></div><p><strong data-parsoid='{"stx":"html","autoInsertedEnd":true}'>A</strong></p>
24231 <p><strong data-parsoid='{"stx":"html","autoInsertedStart":true}'>B</strong></p>
24234 # T8200: <blockquote> should behave like <div> with respect to line breaks
24236 T8200: paragraphs inside blockquotes (no extra line breaks)
24238 <blockquote>Line one
24240 Line two</blockquote>
24242 <blockquote>Line one
24243 Line two</blockquote>
24246 <blockquote><p>Line one
24247 Line two</p></blockquote>
24251 T8200: paragraphs inside blockquotes (extra line break on open)
24256 Line two</blockquote>
24261 Line two</blockquote>
24267 Line two</p></blockquote>
24271 T8200: paragraphs inside blockquotes (extra line break on close)
24273 <blockquote>Line one
24278 <blockquote>Line one
24284 <blockquote><p>Line one
24291 T8200: paragraphs inside blockquotes (extra line break on open and close)
24307 ## This is a corner case interaction between the paragraph wrapping in the
24308 ## php parser's BlockLevelPass and Remex. `doBlockLevels` has a notion of
24309 ## some tags which close paragraphs (and thus prevent wrapping on their line),
24310 ## of which "div" is one, but do p-wrapping inside them. These are referred
24311 ## to as "never suppressing". Remex, for its part, doesn't traverse into
24312 ## "div"s to p-wrap. Hence, we only get this partial wrapping.
24314 Paragraphs inside blockquotes/divs (no extra line breaks)
24316 <blockquote><div>Line one
24318 Line two</div></blockquote>
24320 <blockquote><div>Line one
24321 Line two</div></blockquote>
24326 Paragraphs inside blockquotes/divs (extra line break on open)
24331 Line two</div></blockquote>
24336 Line two</div></blockquote>
24341 Paragraphs inside blockquotes/divs (extra line break on close)
24343 <blockquote><div>Line one
24346 </div></blockquote>
24348 <blockquote><div>Line one
24351 </div></blockquote>
24356 Paragraphs inside blockquotes/divs (extra line break on open and close)
24362 </div></blockquote>
24368 </div></blockquote>
24373 Interwiki links trounced by replaceExternalLinks after early LinkHolderArray expansion
24375 wgLinkHolderBatchSize=0
24381 <p><a href="http://www.usemod.com/cgi-bin/mb.pl?1" class="extiw" title="meatball:1">meatball:1</a>
24382 <a href="http://www.usemod.com/cgi-bin/mb.pl?2" class="extiw" title="meatball:2">meatball:2</a>
24383 <a href="http://www.usemod.com/cgi-bin/mb.pl?3" class="extiw" title="meatball:3">meatball:3</a>
24388 Free external link invading image caption
24390 [[Image:Foobar.jpg|thumb|http://x|hello]]
24392 <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>
24395 <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>
24399 T17196: localised external link numbers
24403 [http://en.wikipedia.org/]
24405 <p><a rel="nofollow" class="external autonumber" href="http://en.wikipedia.org/">[۱]</a>
24408 <p><a rel="mw:ExtLink" class="external autonumber" href="http://en.wikipedia.org/"></a></p>
24412 Multibyte character in padleft
24414 {{padleft:-Hello|7|Æ}}
24419 <p typeof="mw:Transclusion" data-mw='{"parts":[{"template":{"target":{"wt":"padleft:-Hello","function":"padleft"},"params":{"1":{"wt":"7"},"2":{"wt":"Æ"}},"i":0}}]}'>Æ-Hello</p>
24423 Multibyte character in padright
24425 {{padright:Hello-|7|Æ}}
24430 <p typeof="mw:Transclusion" data-mw='{"parts":[{"template":{"target":{"wt":"padright:Hello-","function":"padright"},"params":{"1":{"wt":"7"},"2":{"wt":"Æ"}},"i":0}}]}'>Hello-Æ</p>
24434 formatdate parser function
24436 {{#formatdate:2009-03-24}}
24438 <p><span class="mw-formatted-date" title="2009-03-24">2009-03-24</span>
24443 formatdate parser function, with default format
24445 {{#formatdate:2009-03-24|mdy}}
24447 <p><span class="mw-formatted-date" title="2009-03-24">March 24, 2009</span>
24452 Spacing of numbers in formatted dates
24454 {{#formatdate:January 15}}
24456 <p><span class="mw-formatted-date" title="01-15">January 15</span>
24461 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
24463 language=nl title=[[MediaWiki:Common.css]]
24465 {{#formatdate:2009-03-24|dmy}}
24467 <p><span class="mw-formatted-date" title="2009-03-24">24 March 2009</span>
24480 Edit comment with link
24484 I like the [[Main Page]] a lot
24486 I like the <a href="/wiki/Main_Page" title="Main Page">Main Page</a> a lot
24490 Edit comment with link and link text
24494 I like the [[Main Page|best pages]] a lot
24496 I like the <a href="/wiki/Main_Page" title="Main Page">best pages</a> a lot
24500 Edit comment with link and link text with suffix
24504 I like the [[Main Page|best page]]s a lot
24506 I like the <a href="/wiki/Main_Page" title="Main Page">best pages</a> a lot
24510 Edit comment with section link (non-local, eg in history list)
24512 comment title=[[Main Page]]
24514 /* External links */ removed bogus entries
24516 <span dir="auto"><span class="autocomment"><a href="/wiki/Main_Page#External_links" title="Main Page">→External links</a>: </span> removed bogus entries</span>
24520 Edit comment with section link and text before it (non-local, eg in history list)
24522 comment title=[[Main Page]]
24524 pre-comment text /* External links */ removed bogus entries
24526 pre-comment text <span dir="auto"><span class="autocomment"><a href="/wiki/Main_Page#External_links" title="Main Page">→External links</a>: </span> removed bogus entries</span>
24530 Edit comment with section link (local, eg in diff view)
24532 comment local title=[[Main Page]]
24534 /* External links */ removed bogus entries
24536 <span dir="auto"><span class="autocomment"><a href="#External_links">→External links</a>: </span> removed bogus entries</span>
24540 Edit comment with section link that has a link in it
24542 comment local title=[[Main Page]]
24546 <span dir="auto"><span class="autocomment"><a href="#A_link">→[[A link]]</a></span></span>
24550 Edit comment with section link that has a template in it
24552 comment local title=[[Main Page]]
24554 /* {{foobar|param}} */
24556 <span dir="auto"><span class="autocomment"><a href="#.7B.7Bfoobar.7Cparam.7D.7D">→{{foobar|param}}</a></span></span>
24560 Edit comment with subpage link (T16080)
24564 title=[[Subpage test]]
24566 Poked at a [[/subpage]] here...
24568 Poked at a <a href="/wiki/Subpage_test/subpage" title="Subpage test/subpage">/subpage</a> here...
24572 Edit comment with subpage link and link text (T16080)
24576 title=[[Subpage test]]
24578 Poked at a [[/subpage|neat little page]] here...
24580 Poked at a <a href="/wiki/Subpage_test/subpage" title="Subpage test/subpage">neat little page</a> here...
24584 Edit comment with bogus subpage link in non-subpage NS (T16080)
24587 title=[[Subpage test]]
24589 Poked at a [[/subpage]] here...
24591 Poked at a <a href="/index.php?title=/subpage&action=edit&redlink=1" class="new" title="/subpage (page does not exist)">/subpage</a> here...
24595 Edit comment with bare anchor link (local, as on diff)
24599 title=[[Main Page]]
24603 <a href="#section">#section</a>
24607 Edit comment with bare anchor link (non-local, as on history)
24610 title=[[Main Page]]
24614 <a href="/wiki/Main_Page#section" title="Main Page">#section</a>
24618 Anchor starting with underscore
24624 <p><a href="#_ref">One</a>
24627 <p><a rel="mw:WikiLink" href="./Foo#_ref" data-parsoid='{"stx":"piped","a":{"href":"./Foo#_ref"},"sa":{"href":"#_ref"}}'>One</a></p>
24631 Id starting with underscore
24633 <div id="_ref"></div>
24635 <div id="_ref"></div>
24640 Edit comment with link with more than one pipe (T99346)
24644 [[Main Page|Many|pipes]]
24646 <a href="/wiki/Main_Page" title="Main Page">Many|pipes</a>
24650 Complex edit comment with link with more than one pipe (T99346)
24654 Created page with "<noinclude>[[Category:Requests for permissions/Bot|{{subst:#titleparts:{{subst:PAGENAME}}|1|3}}]]</noinclude> === [[User:MineoBot|]] 8=== {{Request for permissions/links|Mineo..."
24656 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..."
24660 Space normalisation on autocomment (T24784)
24663 title=[[Main Page]]
24665 /* __hello__world__ */
24667 <span dir="auto"><span class="autocomment"><a href="/wiki/Main_Page#hello_world" title="Main Page">→__hello__world__</a></span></span>
24671 percent-encoding and + signs in comments (T28410)
24675 [[ABC%33D% ++]] [[ABC%33D% ++|+%20]]
24677 <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>
24680 # Parsoid doesn't support this yet: see T75581
24681 # but it *should* omit the 'src' attribute if the image is bad.
24682 # PHP side of tests was disabled in
24683 # mediawiki/core:6bd31e7d95161a6e88fa86df60871051da997c3c
24684 # because of issues in the PHP parserTests infrastructure
24685 # (but the output below is indeed what the PHP side emits)
24687 Bad images - basic functionality
24690 !! html/php+disabled
24692 <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>
24696 Bad images - T18039: text after bad image disappears
24701 !! html/php+disabled
24707 <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>
24712 Verify that displaytitle works (T24501) no displaytitle
24716 wgAllowDisplayTitle=true
24717 wgRestrictDisplayTitle=false
24719 this is not the the title
24722 <p>this is not the the title
24727 Verify that displaytitle works (T24501) RestrictDisplayTitle=false
24732 wgAllowDisplayTitle=true
24733 wgRestrictDisplayTitle=false
24735 this is not the the title
24736 {{DISPLAYTITLE:whatever}}
24739 <p>this is not the the title
24744 Verify that displaytitle works (T24501) RestrictDisplayTitle=true mismatch
24749 wgAllowDisplayTitle=true
24750 wgRestrictDisplayTitle=true
24752 this is not the the title
24753 {{DISPLAYTITLE:whatever}}
24756 <p>this is not the the title
24761 Verify that displaytitle works (T24501) RestrictDisplayTitle=true matching
24766 wgAllowDisplayTitle=true
24767 wgRestrictDisplayTitle=true
24769 this is not the the title
24770 {{DISPLAYTITLE:screen}}
24773 <p>this is not the the title
24778 Verify that displaytitle works (T24501) AllowDisplayTitle=false
24783 wgAllowDisplayTitle=false
24785 this is not the the title
24786 {{DISPLAYTITLE:screen}}
24789 <p>this is not the the title
24790 <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>
24795 Verify that displaytitle works (T24501) AllowDisplayTitle=false no DISPLAYTITLE
24800 wgAllowDisplayTitle=false
24802 this is not the the title
24805 <p>this is not the the title
24810 Verify that displaytitle handles inline CSS styles (T28547) - rejected value
24815 wgAllowDisplayTitle=true
24816 wgRestrictDisplayTitle=true
24818 this is not the the title
24819 {{DISPLAYTITLE:<span style="display: none;">s</span>creen}}
24821 <span style="/* attempt to bypass $wgRestrictDisplayTitle */">s</span>creen
24822 <p>this is not the the title
24827 Verify that displaytitle handles inline CSS styles (T28547) - accepted value
24832 wgAllowDisplayTitle=true
24833 wgRestrictDisplayTitle=true
24835 this is not the the title
24836 {{DISPLAYTITLE:<span style="color: red;">s</span>creen}}
24838 <span style="color: red;">s</span>creen
24839 <p>this is not the the title
24844 Page status indicators: Empty name is invalid
24848 <indicator name=" "></indicator>
24849 <indicator></indicator>
24851 <p><span class="error"><strong>Error:</strong> Page status indicators' <code>name</code> attribute must not be empty.</span>
24852 <span class="error"><strong>Error:</strong> Page status indicators' <code>name</code> attribute must not be empty.</span>
24857 Page status indicators: Weird syntaxes that are okay
24861 <indicator name="empty" />
24862 <indicator name="name"></indicator>
24871 Page status indicators: Torture test
24875 <indicator name="01">hello world</indicator>
24876 <indicator name="02">[[Main Page]]</indicator>
24877 <indicator name="03">[[File:Foobar.jpg|25px|link=]]</indicator>
24878 <indicator name="04">[[File:Foobar.jpg|25px]]</indicator>
24879 <indicator name="05">*foo
24881 <indicator name="06"><nowiki>foo</nowiki></indicator>
24882 <indicator name="07"> Preformatted</indicator>
24883 <indicator name="08"><div>Broken tag</indicator>
24884 <indicator name="09">{| class=wikitable
24887 <indicator name="10">Two
24889 paragraphs</indicator>
24892 02=<a href="/wiki/Main_Page" title="Main Page">Main Page</a>
24893 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" />
24894 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>
24895 05=<ul><li>foo</li>
24899 07=<pre>Preformatted
24901 08=<div>Broken tag</div>
24903 09=<table class="wikitable">
24920 preload: check <noinclude> and <includeonly>
24924 Hello <noinclude>cruel</noinclude><includeonly>kind</includeonly> world.
24930 preload: check <onlyinclude>
24934 Goodbye <onlyinclude>Hello world</onlyinclude>
24940 preload: can pass tags through if we want to
24944 <includeonly><</includeonly>includeonly>Hello world<includeonly><</includeonly>/includeonly>
24946 <includeonly>Hello world</includeonly>
24950 preload: check that it doesn't try to do tricks
24954 * <!-- Hello --> ''{{world}}'' {{<includeonly>subst:</includeonly>How are you}}{{ {{{|safesubst:}}} #if:1|2|3}}
24956 * <!-- Hello --> ''{{world}}'' {{subst:How are you}}{{ {{{|safesubst:}}} #if:1|2|3}}
24960 Play a bit with r67090 and T5158
24962 <div style="width:50% !important"> </div>
24963 <div style="width:50% !important"> </div>
24964 <div style="width:50% !important"> </div>
24965 <div style="border : solid;"> </div>
24967 <div style="width:50% !important"> </div>
24968 <div style="width:50% !important"> </div>
24969 <div style="width:50% !important"> </div>
24970 <div style="border : solid;"> </div>
24973 <div style="width:50% !important" data-parsoid='{"stx":"html"}'><span typeof="mw:Entity" data-parsoid='{"srcContent":" "}'> </span></div>
24974 <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>
24975 <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>
24976 <div style="border : solid;" data-parsoid='{"stx":"html"}'><span typeof="mw:Entity" data-parsoid='{"srcContent":" "}'> </span></div>
24981 French spaces in wikitext
24983 foo ! bar ? bat 50 % is less than 75 %.
24985 Hello : this ; is « something ‹ else › again »
24987 <p>foo ! bar ? bat 50 % is less than 75 %.
24988 </p><p>Hello : this ; is « something ‹ else › again »
24992 # It would be reasonable for Parsoid and PHP to differ here.
24993 # The PHP behavior is arguably a bug.
24995 Corner case: french spaces in definition list
24999 <dl><dt>foo </dt>
25004 T5158: Test for French spaces in attributes
25006 <br style=" clear : both ; " />
25008 <p><br style="clear : both ;" />
25013 HTML5 data attributes
25015 <span data-foo="bar">Baz</span>
25016 <p data-abc-def_hij="">Quuz</p>
25018 <p><span data-foo="bar">Baz</span>
25020 <p data-abc-def_hij="">Quuz</p>
25023 <p><span data-foo="bar" data-parsoid='{"stx":"html"}'>Baz</span></p>
25024 <p data-abc-def_hij="" data-parsoid='{"stx":"html"}'>Quuz</p>
25028 Strip reserved data attributes
25030 <div data-mw="foo" data-parsoid="bar" data-mw-someext="baz" data-ok="fred" data-ooui="xyzzy" data-bad:ns="ns">d</div>
25032 <div data-ok="fred">d</div>
25035 <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>
25039 percent-encoding and + signs in internal links (T28410)
25041 [[User:+%]] [[Page+title%]]
25042 [[%+]] [[%+|%20]] [[%+ ]] [[%+r]]
25043 [[%]] [[+]] [[File:%+abc%39|foo|[[bar]]]]
25044 [[%33%45]] [[%33%45+]]
25046 <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>
25047 <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>
25048 <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>
25049 <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>
25052 <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>
25053 <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>
25054 <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>
25055 <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>
25059 Special characters in embedded file links (T29679)
25061 [[File:Contains & ampersand.jpg]]
25062 [[File:Does not exist.jpg|Title with & ampersand]]
25064 <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>
25065 <a href="/index.php?title=Special:Upload&wpDestFile=Does_not_exist.jpg" class="new" title="File:Does not exist.jpg">Title with & ampersand</a>
25068 <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>
25069 <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>
25073 Confirm that 'apos' named character reference doesn't make it to output (not legal in HTML 4)
25075 Text's been normalized?
25077 <p>Text's been normalized?
25082 T21052 U+3000 IDEOGRAPHIC SPACE should terminate free external links
25084 http://www.example.org/ <-- U+3000 (vim: ^Vu3000)
25086 <p><a rel="nofollow" class="external free" href="http://www.example.org/">http://www.example.org/</a> <-- U+3000 (vim: ^Vu3000)
25091 T21052 U+3000 IDEOGRAPHIC SPACE should terminate bracketed external links
25093 [http://www.example.org/ ideograms]
25095 <p><a rel="nofollow" class="external text" href="http://www.example.org/">ideograms</a>
25100 T21052 U+3000 IDEOGRAPHIC SPACE should terminate external images links
25102 http://www.example.org/pic.png <-- U+3000 (vim: ^Vu3000)
25104 <p><img src="http://www.example.org/pic.png" alt="pic.png"/> <-- U+3000 (vim: ^Vu3000)
25128 T33098 Template which includes system messages which includes the template
25132 <p><span class="error">Template loop detected: <a href="/wiki/Template:Identical" title="Template:Identical">Template:Identical</a></span>
25133 <span class="error">Template loop detected: <a href="/wiki/Template:Identical" title="Template:Identical">Template:Identical</a></span>
25138 T33490 Turkish: ucfirst 'blah'
25149 T33490 Turkish: ucfirst 'ix'
25160 T33490 Turkish: lcfirst 'BLAH'
25171 T33490 Turkish: ucfırst (with a dotless i)
25177 <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>
25182 T33490 ucfırst (with a dotless i) with English language
25188 <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>
25192 # Note that Parsoid doesn't emit an explicit TOC.
25193 # Note also that the html2wt direction tends to emit an extra newline
25194 # between the __TOC__ magicword and the first heading unless *both*
25195 # the <meta> and the <h2> have a data-parsoid attribute set (even if
25199 T28375: TOC with italics
25201 title=[[Main Page]]
25204 ==''Lost'' episodes==
25206 <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>
25208 <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>
25212 <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>
25215 <meta property="mw:PageProp/toc" data-parsoid='{}'/>
25216 <h2 id="Lost_episodes" data-parsoid='{}'><i>Lost</i> episodes</h2>
25220 T28375: TOC with bold
25222 title=[[Main Page]]
25225 =='''should be bold''' then normal text==
25227 <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>
25229 <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>
25233 <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>
25236 <meta property="mw:PageProp/toc" data-parsoid='{}'/>
25237 <h2 id="should_be_bold_then_normal_text" data-parsoid='{}'><b>should be bold</b> then normal text</h2>
25241 T35845: Headings become cursive in TOC when they contain an image
25243 title=[[Main Page]]
25246 ==Image [[Image:foobar.jpg]]==
25248 <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>
25250 <li class="toclevel-1 tocsection-1"><a href="#Image"><span class="tocnumber">1</span> <span class="toctext">Image</span></a></li>
25254 <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>
25257 <meta property="mw:PageProp/toc" data-parsoid='{}'/>
25258 <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>
25262 T35845 (2): Headings become bold in TOC when they contain a blockquote
25264 title=[[Main Page]]
25267 ==<blockquote>Quote</blockquote>==
25269 <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>
25271 <li class="toclevel-1 tocsection-1"><a href="#Quote"><span class="tocnumber">1</span> <span class="toctext">Quote</span></a></li>
25275 <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>
25278 <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>
25280 <li class="toclevel-1 tocsection-1"><a href="#Quote"><span class="tocnumber">1</span> <span class="toctext">Quote</span></a></li>
25284 <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>
25286 <meta property="mw:PageProp/toc" data-parsoid='{}'/>
25287 <h2 id="Quote" data-parsoid='{}'><blockquote><p>Quote</p></blockquote></h2>
25291 Unclosed tags in TOC
25293 wgFragmentMode=[ 'html5', 'legacy' ]
25295 title=[[Main Page]]
25299 <small>Hanc marginis exiguitas non caperet.</small>
25302 <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>
25304 <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>
25308 <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>
25309 <p><small>Hanc marginis exiguitas non caperet.</small>
25313 <meta property="mw:PageProp/toc" data-parsoid='{}'/>
25314 <h2 id="Proof:_2_<_3" data-parsoid='{}'><span id="Proof:_2_.3C_3" typeof="mw:FallbackId"></span>Proof: 2 < 3</h2>
25315 <p><small>Hanc marginis exiguitas non caperet.</small>
25320 Multiple tags in TOC
25323 ==<i>Foo</i> <b>Bar</b>==
25325 ==<i>Foo</i> <blockquote>Bar</blockquote>==
25327 <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>
25329 <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>
25330 <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>
25334 <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>
25335 <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>
25338 <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>
25340 <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>
25341 <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>
25345 <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>
25346 <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>
25348 <meta property="mw:PageProp/toc" data-parsoid='{}'/>
25349 <h2 id="Foo_Bar" data-parsoid='{}'><i data-parsoid='{"stx":"html"}'>Foo</i> <b data-parsoid='{"stx":"html"}'>Bar</b></h2>
25351 <h2 id="Foo_Bar_2" data-parsoid='{}'><i data-parsoid='{"stx":"html"}'>Foo</i> <blockquote><p>Bar</p></blockquote></h2>
25354 # Don't expect Parsoid to roundtrip this until the php parser comes closer to
25355 # html5 tag parsing.
25357 Tags with parameters in TOC
25362 ==<sup class="in-h2">Hello</sup>==
25364 ==<sup class="a > b">Evilbye</sup>==
25366 <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>
25368 <li class="toclevel-1 tocsection-1"><a href="#Hello"><span class="tocnumber">1</span> <span class="toctext"><sup>Hello</sup></span></a></li>
25369 <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>
25373 <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>
25374 <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>
25377 <meta property="mw:PageProp/toc" />
25378 <h2 id="Hello"><sup class="in-h2" data-parsoid='{"stx":"html"}'>Hello</sup></h2>
25380 <h2 id='b">Evilbye'><span id="b.22.3EEvilbye" typeof="mw:FallbackId"></span><sup class="a " data-parsoid='{"stx":"html"}'> b">Evilbye</sup></h2>
25384 span tags with directionality in TOC
25387 ==<span dir="ltr">C++</span>==
25389 ==<span dir="rtl">זבנג!</span>==
25391 ==<span style="font-style: italic">The attributes on these span tags must be deleted from the TOC</span>==
25393 ==<span style="font-style: italic" dir="ltr">All attributes on these span tags must be deleted from the TOC</span>==
25395 ==<span dir="ltr" style="font-style: italic">Attributes after dir on these span tags must be deleted from the TOC</span>==
25397 <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>
25399 <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>
25400 <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>
25401 <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>
25402 <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>
25403 <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>
25407 <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>
25408 <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>
25409 <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>
25410 <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>
25411 <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>
25414 <meta property="mw:PageProp/toc" data-parsoid='{}'/>
25415 <h2 id="C++" data-parsoid='{}'><span id="C.2B.2B" typeof="mw:FallbackId"></span><span dir="ltr">C++</span></h2>
25416 <h2 id="זבנג!"><span id=".D7.96.D7.91.D7.A0.D7.92.21" typeof="mw:FallbackId"></span><span dir="rtl">זבנג!</span></h2>
25417 <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>
25418 <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>
25419 <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>
25423 T74884: bdi element in ToC
25426 ==<bdi>test</bdi>==
25428 <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>
25430 <li class="toclevel-1 tocsection-1"><a href="#test"><span class="tocnumber">1</span> <span class="toctext"><bdi>test</bdi></span></a></li>
25434 <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>
25437 <meta property="mw:PageProp/toc" data-parsoid='{}'/>
25438 <h2 id="test" data-parsoid='{}'><bdi>test</bdi></h2>
25442 T35715: s/strike element in ToC
25445 ==<s>test</s> test <strike>test</strike>==
25447 <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>
25449 <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>
25453 <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>
25456 <meta property="mw:PageProp/toc" data-parsoid='{}'/>
25457 <h2 id="test_test_test" data-parsoid='{}'><s>test</s> test <strike>test</strike></h2>
25461 T198618: style element in ToC
25466 ==<style>.foo {}</style>Style<style>.bar {}</style>==
25468 <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>
25470 <li class="toclevel-1 tocsection-1"><a href="#Style"><span class="tocnumber">1</span> <span class="toctext">Style</span></a></li>
25474 <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>
25477 <meta property="mw:PageProp/toc" data-parsoid="{}"/>
25478 <h2 id="Style" data-parsoid="{}"><style typeof="mw:Extension/style" data-mw='{"name":"style","attrs":{},"body":{"extsrc":".foo {}"}}'>.foo {}</style>Style<style typeof="mw:Extension/style" data-mw='{"name":"style","attrs":{},"body":{"extsrc":".bar {}"}}'>.bar {}</style></h2>
25482 T198618: script element in ToC
25487 ==<html><script>alert(1);</script></html>Script<html><script>alert(1);</script></html>==
25489 <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>
25491 <li class="toclevel-1 tocsection-1"><a href="#Script"><span class="tocnumber">1</span> <span class="toctext">Script</span></a></li>
25495 <h2><span class="mw-headline" id="Script"><script>alert(1);</script>Script<script>alert(1);</script></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: Script">edit</a><span class="mw-editsection-bracket">]</span></span></h2>
25498 <meta property="mw:PageProp/toc" data-parsoid='{}'/>
25499 <h2 id="Script" data-parsoid='{}'><script typeof="mw:Extension/html" about="#mwt4" data-mw='{"name":"html","attrs":{},"body":{"extsrc":"<script>alert(1);</script>"}}'>alert(1);</script>Script<script typeof="mw:Extension/html" about="#mwt6" data-mw='{"name":"html","attrs":{},"body":{"extsrc":"<script>alert(1);</script>"}}'>alert(1);</script></h2>
25503 Empty <p> tag in TOC, removed by Sanitizer (T92892)
25508 <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>
25510 <li class="toclevel-1 tocsection-1"><a href="#x"><span class="tocnumber">1</span> <span class="toctext">x</span></a></li>
25514 <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>
25517 <meta property="mw:PageProp/toc" data-parsoid='{}'/>
25518 <h2 id="x" data-parsoid='{}'>x</h2>
25524 == {{int:headline_sample}} ==
25528 T34057: Title needed when expanding <h> nodes.
25530 title=[[Main Page]]
25534 <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>
25539 Strip marker in urlencode
25541 {{urlencode:x<nowiki/>y}}
25542 {{urlencode:x<nowiki/>y|wiki}}
25543 {{urlencode:x<nowiki/>y|path}}
25544 {{urlencode:x<pre id="one">two</pre>y}}
25572 Strip marker in formatNum
25574 {{formatnum:1<nowiki/>2}}
25575 {{formatnum:1<nowiki/>2|R}}
25583 Check noCommafy in formatNum
25587 {{formatnum:123456.78}}
25588 {{formatnum:123456.78|NOSEP}}
25596 Wrong option for formatNum (T58199)
25598 {{formatnum:1,234.56|Random}}
25599 {{formatnum:1,234.56|EVERYTHING}}
25600 {{formatnum:1234.56|any argument that has the string 'NOSEP'}}
25609 Strip marker in grammar
25613 {{grammar:elative|foo<nowiki/>bar}}
25620 Strip marker in padleft
25622 {{padleft:|2|x<nowiki/>y}}
25629 Strip marker in padright
25631 {{padright:|2|x<nowiki/>y}}
25638 Strip marker in anchorencode
25640 {{anchorencode:x<nowiki/>y}}
25645 <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>
25649 nowiki inside link inside heading (T20295)
25651 ==[[foo|x<nowiki>y</nowiki>z]]==
25653 <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>
25658 new support for bdi element (T33817)
25660 <p dir="rtl" lang="he">ולדימיר לנין (ברוסית: <bdi lang="ru">Владимир Ленин</bdi>, 24 באפריל 1870–22 בינואר 1924) הוא מנהיג פוליטי קומוניסטי רוסי.</p>
25662 <p dir="rtl" lang="he">ולדימיר לנין (ברוסית: <bdi lang="ru">Владимир Ленин</bdi>, 24 באפריל 1870–22 בינואר 1924) הוא מנהיג פוליטי קומוניסטי רוסי.</p>
25667 Ignore pipe between table row attributes
25671 |- id=foo | style='color: red'
25679 <tr id="foo" style="color: red">
25686 Language parser function
25695 Padleft and padright (default 0-padding)
25704 <p><span typeof="mw:Transclusion" data-mw='{"parts":[{"template":{"target":{"wt":"padleft:xyz","function":"padleft"},"params":{"1":{"wt":"5"}},"i":0}}]}'>00xyz</span>
25705 <span typeof="mw:Transclusion" data-mw='{"parts":[{"template":{"target":{"wt":"padright:xyz","function":"padright"},"params":{"1":{"wt":"5"}},"i":0}}]}'>xyz00</span></p>
25709 Padleft and padright (partial fill)
25711 {{padleft:xyz|6|ab}}
25712 {{padright:xyz|6|ab}}
25718 <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>
25719 <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>
25723 Padleft and padright as substr
25725 {{padleft:|3|abcde}}
25726 {{padright:|3|abcde}}
25732 <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>
25733 <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>
25737 Padleft and padright with non-numerical length (T180403)
25739 {{padleft:abcdef|junk}}
25740 {{padright:abcdef|junk}}
25748 Special parser function
25750 {{#special:RandomPage}}
25751 {{#special:BaDtItLe}}
25752 {{#special:Foobar}}
25761 T36939 - Case insensitive link parsing ([HttP://])
25763 [HttP://MediaWiki.Org/]
25765 <p><a rel="nofollow" class="external autonumber" href="HttP://MediaWiki.Org/">[1]</a>
25768 <p><a rel="mw:ExtLink" class="external autonumber" href="HttP://MediaWiki.Org/"></a></p>
25772 T36939 - Case insensitive link parsing ([HttP:// title])
25774 [HttP://MediaWiki.Org/ MediaWiki]
25776 <p><a rel="nofollow" class="external text" href="HttP://MediaWiki.Org/">MediaWiki</a>
25781 T36939 - Case insensitive link parsing (HttP://)
25783 HttP://MediaWiki.Org/
25785 <p><a rel="nofollow" class="external free" href="HttP://MediaWiki.Org/">HttP://MediaWiki.Org/</a>
25788 <p><a rel="mw:ExtLink" class="external free" href="HttP://MediaWiki.Org/">HttP://MediaWiki.Org/</a></p>
25806 <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>
25807 <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>
25808 <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>
25809 <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>
25810 <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>
25816 ### Parsoid-specific tests
25817 ### Parsoid-PHP parser incompatibilities
25820 1. SOL-sensitive wikitext tokens as template-args
25822 parsoid=wt2html,wt2wt
25828 <ul><li>a</li></ul>
25829 <ol><li>a</li></ol>
25830 <dl><dd>a</dd></dl>
25832 <span about="#mwt1" typeof="mw:Transclusion">
25833 </span><ul about="#mwt1"><li>a</li>
25835 <span about="#mwt2" typeof="mw:Transclusion">
25836 </span><ol about="#mwt2"><li>a</li>
25838 <span about="#mwt3" typeof="mw:Transclusion">
25839 </span><dl about="#mwt3"><dd>a</dd>
25843 #### -----------------------------------------------------------------
25844 #### Parsoid-specific functionality tests
25845 #### -----------------------------------------------------------------
25847 # T65642/T68749: Formatting elt fixup around images.
25848 # We know wt2wt will fail, but we expect selser to pass.
25849 # Due to the nature of our testing, wt2wt and selser tests will enter the
25850 # blacklist and we'll catch selser regressions based on changes to the
25851 # blacklist entries for selser tests.
25853 1. Treebuilder fixup of formatting elt
25855 parsoid=wt2html,wt2wt
25860 [[Image:Foobar.jpg|right|Test]]
25868 </small></p><small>
25869 <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>
25870 </small><p><small></small>
25872 </td></tr></tbody></table>
25876 <p><small data-parsoid='{"stx":"html","autoInsertedEnd":true}'></small></p><small data-parsoid='{"stx":"html","autoInsertedEnd":true,"autoInsertedStart":true}'>
25877 <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>
25878 <p><small data-parsoid='{"stx":"html","autoInsertedStart":true}'></small></p></td></tr>
25883 2. Treebuilder fixup of formatting elt
25885 parsoid=wt2html,wt2wt
25887 '''foo[[File:Foobar.jpg|thumb|caption]]bar'''
25889 <small>[[Image:Foobar.jpg|right|300px]]</small>
25891 <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>
25892 </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>
25894 <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>
25896 <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>
25900 3. Treebuilder fixup of formatting elt
25902 parsoid=wt2html,wt2wt
25904 <small>'''foo[[File:Foobar.jpg|thumb|caption]]bar'''</small>
25906 <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>
25909 <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>
25913 4. Treebuilder fixup of formatting elt: formatting tags around captionless images
25915 parsoid=wt2html,wt2wt
25917 '''<small>[[Image:Foobar.jpg|right|300px]]</small>'''
25919 <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>
25921 <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>
25924 #### ----------------------------------------------------------------
25925 #### Parsoid-only testing of Parsoid's impl of LST
25926 #### Not implemented yet, see
25927 #### https://www.mediawiki.org/wiki/Parsoid/HTML_based_LST
25928 #### ----------------------------------------------------------------
25930 ## We still need to support serializing the older format while content is stored.
25932 LST Sections: Backwards compatibility
25935 "suppressErrors": true,
25936 "modes": ["html2wt"]
25939 <section begin="2011-05-16" />
25940 <section end="2014-04-10 (MW 1.23wmf22)" />
25942 <p><meta typeof="mw:Extension/LabeledSectionTransclusion/begin" content="2011-05-16"/>
25943 <meta typeof="mw:Extension/LabeledSectionTransclusion/end" content="2014-04-10 (MW 1.23wmf22)"/></p>
25947 LST Sections: Newfangled approach
25949 <section begin="2011-05-16" />
25950 <section end="2014-04-10 (MW 1.23wmf22)" />
25952 <p><span typeof="mw:Extension/section" about="#mwt4" data-mw='{"name":"section","attrs":{"begin":"2011-05-16"}}'>
25954 <span typeof="mw:Extension/section" about="#mwt6" data-mw='{"name":"section","attrs":{"end":"2014-04-10 (MW 1.23wmf22)"}}'>
25958 #--------- Test stripping of empty nodes in template content ----------
25961 Empty LI and TR nodes should be stripped from template content
25966 <ul about="#mwt1" typeof="mw:Transclusion" data-mw='{"parts":[{"template":{"target":{"wt":"EmptyLITest","href":"./Template:EmptyLITest"},"params":{},"i":0}}]}'>
25970 <table about="#mwt2" typeof="mw:Transclusion" data-mw='{"parts":[{"template":{"target":{"wt":"EmptyTRTest","href":"./Template:EmptyTRTest"},"params":{},"i":0}}]}'>
25983 Empty LI and TR nodes should not be stripped from top-level content
25997 <li class='mw-empty-elt'></li>
26002 <tr class='mw-empty-elt'></tr>
26011 Empty TR nodes should not be stripped if they have any attributes set
26013 {{EmptyTRWithHTMLAttrTest}}
26015 <table about="#mwt1" typeof="mw:Transclusion" data-mw='{"parts":[{"template":{"target":{"wt":"EmptyTRWithHTMLAttrTest","href":"./Template:EmptyTRWithHTMLAttrTest"},"params":{},"i":0}}]}'>
26016 <tr align='center'></tr>
26017 <tr><td>foo</td></tr>
26018 <tr align='center'></tr>
26019 <tr><td>bar</td></tr>
26023 #### ----------------------------------------------------------------
26024 #### The following section of tests are primarily to test
26025 #### wikitext escaping capabilities of Parsoid. Given that
26026 #### escaping can be done any number of ways, the wikitext (input)
26027 #### is always adjusted to reflect how Parsoid adds nowiki
26030 #### We are marking several tests as parsoid-only since the
26031 #### HTML in the result section is different from what the
26032 #### PHP parser generates for it.
26033 #### ----------------------------------------------------------------
26036 #### --------------- Headings ---------------
26038 #### 1. Nested inside html <h1>=foo=</h1>
26039 #### 2. Outside heading nest on a single line <h1>foo</h1>*bar
26040 #### 3. Nested inside html with wikitext split by html tags
26041 #### 4. No escape needed
26042 #### 5. Empty headings <h1></h1>
26043 #### 6. Heading chars in SOL context
26044 #### ----------------------------------------
26046 Headings: 0. Unnested
26056 <p>=foo<i>a</i>=</p>
26058 <nowiki>=foo=</nowiki>
26060 <nowiki> </nowiki>=foo=
26062 <nowiki>=foo=</nowiki>
26064 =foo''a''<nowiki>=</nowiki>
26067 # New headings and existing headings are handled differently
26069 Headings: 1. Nested inside html
26077 <h1 data-parsoid=''>=foo=</h1>
26078 <h2 data-parsoid=''>=foo=</h2>
26079 <h3 data-parsoid=''>=foo=</h3>
26080 <h4 data-parsoid=''>=foo=</h4>
26081 <h5 data-parsoid=''>=foo=</h5>
26082 <h6 data-parsoid=''>=foo=</h6>
26090 =<nowiki>=foo=</nowiki>=
26091 ==<nowiki>=foo=</nowiki>==
26092 ===<nowiki>=foo=</nowiki>===
26093 ====<nowiki>=foo=</nowiki>====
26094 =====<nowiki>=foo=</nowiki>=====
26095 ======<nowiki>=foo=</nowiki>======
26100 Headings: 2. Outside heading nest on a single line <h1>foo</h1>*bar
26109 <nowiki>*</nowiki>bar
26115 <nowiki>=bar=</nowiki>
26119 Headings: 3. Nested inside html with wikitext split by html tags
26123 <h1>=<b>bold</b>foo=</h1>
26125 = ='''bold'''foo= =
26129 Headings: 4a. No escaping needed (testing just h1 and h2)
26140 <h1><i>=</i>foo=</h1>
26160 Headings: 4b. No escaping needed (inside p-tags)
26177 Headings: 4c. Short headings (1)
26184 <nowiki>===</nowiki>
26190 # in the html2wt direction we emit '= = =' or '=<nowiki>=</nowiki>='
26192 Headings: 4d. Short headings (2)
26194 parsoid=wt2html,html2html
26205 <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>
26206 <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>
26207 <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>
26212 <h1 id="="><span id=".3D" typeof="mw:FallbackId"></span>=</h1>
26213 <h1 id="=="><span id=".3D.3D" typeof="mw:FallbackId"></span>==</h1>
26214 <h2 id="=_2"><span id=".3D_2" typeof="mw:FallbackId"></span>=</h2>
26218 Headings: 5. Empty headings
26222 <h1 data-parsoid='{}'></h1>
26224 <h2 data-parsoid='{}'></h2>
26226 <h3 data-parsoid='{}'></h3>
26228 <h4 data-parsoid='{}'></h4>
26230 <h5 data-parsoid='{}'></h5>
26232 <h6 data-parsoid='{}'></h6>
26242 =====<nowiki/>=====
26244 ======<nowiki/>======
26248 Headings: 6a. Heading chars in SOL context (with trailing spaces)
26258 <nowiki>=a=</nowiki>
26260 <nowiki>=a=</nowiki>
26262 <nowiki>=a=</nowiki>
26266 Headings: 6b. Heading chars in SOL context (with trailing newlines)
26279 <nowiki>=a=</nowiki>
26282 <nowiki>=a=</nowiki>
26285 <nowiki>=a=</nowiki>
26290 Headings: 6c. Heading chars in SOL context (leading newline break)
26298 <nowiki>=b=</nowiki>
26302 Headings: 6d. Heading chars in SOL context (with interspersed comments)
26306 <!--c0--><p>=a=</p>
26308 <!--c1--><p>=a=</p> <!--c2--> <!--c3-->
26310 <!--c0--><nowiki>=a=</nowiki>
26312 <!--c1--><nowiki>=a=</nowiki> <!--c2--> <!--c3-->
26316 Headings: 6d. Heading chars in SOL context (No escaping needed)
26326 Headings: 7. Insert a newline between new content and headings
26332 <h2 data-parsoid='{}'>A</h2>
26333 <p data-parsoid='{}'>a</p>
26344 Headings: Used as horizontal rule
26346 wgFragmentMode=[ 'html5', 'legacy' ]
26352 <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>
26355 <h6 id="==="><span id=".3D.3D.3D" typeof="mw:FallbackId"></span>===</h6>
26358 #### --------------- Lists ---------------
26359 #### 0. Outside nests (*foo, etc.)
26360 #### 1. Nested inside html <ul><li>*foo</li></ul>
26361 #### 2. Inside definition lists
26362 #### 3. Only bullets at start should be escaped
26363 #### 4. No escapes needed
26364 #### 5. No unnecessary escapes
26365 #### 6. Escape bullets in SOL position
26366 #### 7. Escape bullets in a multi-line context
26367 #### ----------------------------------------
26370 Lists: 0. Outside nests
26380 <nowiki>*</nowiki>foo
26382 <nowiki>#</nowiki>foo
26384 <nowiki>;</nowiki>Foo<nowiki>:</nowiki>bar
26387 ## Making these next 3 tests Parsoid-only since they are html2wt tests
26388 ## to test wikitext escaping, and insignificant whitespace diffs
26389 ## cause PHP parser tests to barf
26391 Lists: 1. Nested inside html (No unnecessary escapes)
26400 <li data-parsoid='{}'>*foo</li>
26401 <li data-parsoid='{}'>#foo</li>
26402 <li data-parsoid='{}'>:foo</li>
26403 <li data-parsoid='{}'>;foo</li>
26411 <li data-parsoid='{}'>*foo</li>
26412 <li data-parsoid='{}'>#foo</li>
26413 <li data-parsoid='{}'>:foo</li>
26414 <li data-parsoid='{}'>;foo</li>
26421 *<nowiki>*foo</nowiki>
26422 *<nowiki>#foo</nowiki>
26423 *<nowiki>:foo</nowiki>
26424 *<nowiki>;foo</nowiki>
26430 #<nowiki>*foo</nowiki>
26431 #<nowiki>#foo</nowiki>
26432 #<nowiki>:foo</nowiki>
26433 #<nowiki>;foo</nowiki>
26437 Lists: 2. Inside definition lists
26441 <dl><dt>;foo</dt></dl>
26442 <dl><dt>:foo</dt></dl>
26445 <dl><dd>:foo</dd></dl>
26449 ; <nowiki>:foo</nowiki>
26451 ; <nowiki>:foo</nowiki>
26458 Lists: 3. Only bullets at start of text in wikitext-generated HTML should be escaped
26464 <li data-parsoid='{}'>*foo<i>it</i>*bar</li>
26468 *<nowiki>*foo</nowiki>''it''*bar
26472 Lists: 4. No escapes needed
26485 <li><a rel="mw:WikiLink" href="Foo" title="Foo">Foo</a>: bar
26489 <li><a rel="mw:WikiLink" href="Foo" title="Foo">Foo</a>*bar
26503 Lists: 5. No unnecessary escapes
26507 <ul><li> bar <span>[[foo]]</span></li></ul>
26508 <ul><li> =bar <span>[[foo]]</span></li></ul>
26509 <ul><li> [[bar <span>[[foo]]</span></li></ul>
26510 <ul><li> ]]bar <span>[[foo]]</span></li></ul>
26511 <ul><li> =bar <span>foo]]</span>=</li></ul>
26512 <ul><li> <s></s>: a</li></ul>
26513 <ul><li> <i>* foo</i></li></ul>
26516 * bar <span><nowiki>[[foo]]</nowiki></span>
26518 * =bar <span><nowiki>[[foo]]</nowiki></span>
26520 * [[bar <span><nowiki>[[foo]]</nowiki></span>
26522 * ]]bar <span><nowiki>[[foo]]</nowiki></span>
26524 * =bar <span>foo]]</span>=
26532 Lists: 6. Escape bullets in SOL position
26536 <p><!--cmt-->*foo</p>
26538 <!--cmt--><nowiki>*</nowiki>foo
26542 Lists: 7. Escape bullets in a multi-line context
26551 <nowiki>*</nowiki>b
26555 Lists: 8. Escape colons only if not present in tags
26559 <dl><dt>a:b<i>c:d</i></dt></dl>
26561 ; <nowiki>a:b</nowiki>''c:d''
26564 #### --------------- HRs ---------------
26565 #### 1. Single line
26566 #### -----------------------------------
26569 HRs: 1. Single line
26577 ----<nowiki>----</nowiki>
26582 #### --------------- Tables ---------------
26583 #### 1a. Simple example
26584 #### 1b. No escaping needed (!foo)
26585 #### 1c. No escaping needed (|foo)
26586 #### 1d. No escaping needed (|}foo)
26588 #### 2a. Nested in td (<td>foo|bar</td>)
26589 #### 2b. Nested in td (<td>foo||bar</td>)
26590 #### 2c. Nested in td -- no escaping needed(<td>foo!!bar</td>)
26592 #### 3a. Nested in th (<th>foo!bar</th>)
26593 #### 3b. Nested in th (<th>foo!!bar</th>)
26594 #### 3c. Nested in th -- no escaping needed(<th>foo||bar</th>)
26598 #### 4c. No escaping needed
26599 #### --------------------------------------
26602 Tables: 1a. Simple example
26610 <nowiki>{|</nowiki>
26615 Tables: 1b. No escaping needed
26626 Tables: 1c. No escaping needed
26637 Tables: 1d. No escaping needed
26648 Tables: 2a. Nested in td
26653 <td>foo|bar</td></tr>
26654 <tr><td>x<div>a|b</div></td>
26658 |<nowiki>foo|bar</nowiki>
26660 |x<div><nowiki>a|b</nowiki></div>
26668 <td>x<div>a|b</div>
26669 </td></tr></tbody></table>
26673 Tables: 2b. Nested in td
26679 <td>a<i>b||c</i></td>
26680 <td>a<i><div>b||c</div></i></td>
26681 </tr></tbody></table>
26684 |<nowiki>foo||bar</nowiki>
26685 |a''<nowiki>b||c</nowiki>''
26686 |a''<div><nowiki>b||c</nowiki></div>''
26695 <td>a<i><div>b||c</div></i>
26701 Tables: 2c. Nested in td -- no escaping needed
26717 Tables: 3a. Nested in th
26733 Tables: 3b. Nested in th
26738 <tr><th>foo!!bar</th>
26739 <th><i>foo|bar</i></th>
26740 <th><i>foo!!bar</i></th>
26741 <th><i><span>foo!!bar</span></i></th>
26742 </tr></tbody></table>
26745 !<nowiki>foo!!bar</nowiki>
26746 !''<nowiki>foo|bar</nowiki>''
26747 !''<nowiki>foo!!bar</nowiki>''
26748 !''<span><nowiki>foo!!bar</nowiki></span>''
26757 <th><i>foo!!bar</i>
26759 <th><i><span>foo!!bar</span></i>
26765 Tables: 3c. Nested in th
26770 <tr><th>foo||bar</th>
26771 <th><span typeof="mw:Nowiki">foo||bar</span></th>
26772 </tr></tbody></table>
26775 !<nowiki>foo||bar</nowiki>
26776 !<nowiki>foo||bar</nowiki>
26789 Tables: 4a. Escape -
26805 |<nowiki>-bar</nowiki>
26810 Tables: 4b. Escape +
26826 |<nowiki>+bar</nowiki>
26831 Tables: 4c. No escaping needed
26836 <tr><td>foo-bar</td><td>foo+bar</td></tr>
26837 <tr><td><i>foo</i>-bar</td><td><i>foo</i>+bar</td></tr>
26843 <div>a|b</div></td>
26888 Tables: 4d. No escaping needed
26893 <tbody><tr><td><a rel="mw:WikiLink" href="./Foo" title="Foo">Foo</a>-bar</td>
26894 <td data-parsoid='{"startTagSrc":"|","attrSepSrc":"|"}'>+1</td>
26895 <td data-parsoid='{"startTagSrc":"|","attrSepSrc":"|"}'>-2</td></tr>
26906 <td><a href="/wiki/Foo" title="Foo">Foo</a>-bar
26916 Tables: 4e. Escape }
26921 <tr><td>}</td></tr>
26922 <tr><td>x</td><td data-parsoid='{"stx":"row"}'>}</td></tr></table>
26926 |<nowiki>}</nowiki>
26943 Tables: 5. Empty table cells should get whitespace to avoid need for nowikis
26947 <table><tr><td></td><td align="center" data-parsoid='{"stx":"row"}'></td><td data-parsoid='{"stx":"row"}'></td></tr></table>
26949 <table><tr><td></td><td align="center"></td><td></td></tr></table>
26951 <table><tr><td></td><td align="center" data-parsoid='{"stx":"row", "startTagSrc":"{{!}}{{!}}"}'></td><td data-parsoid='{"stx":"row"}'></td></tr></table>
26953 <table><tr><th></th><th align="center" data-parsoid='{"stx":"row"}'></th><th data-parsoid='{"stx":"row"}'></th></tr></table>
26956 | || align="center" | ||
26966 | {{!}}{{!}} align="center" | ||
26970 ! !! align="center" | !!
26976 <td align="center"></td>
26978 </td></tr></tbody></table>
26983 <td align="center">
26986 </td></tr></tbody></table>
26990 <td align="center"></td>
26992 </td></tr></tbody></table>
26996 <th align="center"></th>
26998 </th></tr></tbody></table>
27002 T97430: Don't emit empty nowiki pairs around marker meta tags
27006 <p>*This is a long sentence here that will make the nowiki algo split up the nowikis into multiple pairs
27007 |** Make this another long long long sentence forcing the nowiki algo to split up the nowikis.</p>
27009 <nowiki>*</nowiki>This is a long sentence here that will make the nowiki algo split up the nowikis into multiple pairs
27010 |** Make this another long long long sentence forcing the nowiki algo to split up the nowikis.
27014 Unclosed xmlish element in table line shouldn't eat end delimiters
27019 <tbody><tr><td> <foo</td>
27020 <td> bar></td></tr>
27037 #### --------------- Links ----------------
27038 #### 1. Quote marks in link text
27039 #### 2. Wikilinks: Escapes needed
27040 #### 3. Wikilinks: No escapes needed
27041 #### 4. Extlinks: Escapes needed
27042 #### 5. Extlinks: No escapes needed
27043 #### --------------------------------------
27045 Links 1. WikiLinks: No escapes needed
27049 <p><a rel="mw:WikiLink" href="Foo" title="Foo">Foo<i>boo</i></a>
27050 <a rel="mw:WikiLink" href="Foo" title="Foo">[Foobar]</a>
27051 <a rel="mw:WikiLink" href="Foo" title="Foo">x [Foobar] x</a></p>
27055 [[Foo|x [Foobar] x]]
27057 <p><a href="/wiki/Foo" title="Foo">Foo<i>boo</i></a>
27058 <a href="/wiki/Foo" title="Foo">[Foobar]</a>
27059 <a href="/wiki/Foo" title="Foo">x [Foobar] x</a>
27064 Links 2. WikiLinks: Escapes needed
27068 <a href="Foo" rel="mw:WikiLink">Foobar]</a>
27069 <a href="Foo" rel="mw:WikiLink">x [http://google.com g] x</a>
27070 <a href="Foo" rel="mw:WikiLink">[[Bar]]</a>
27071 <a href="Foo" rel="mw:WikiLink">x [[Bar]] x</a>
27072 <a href="Foo" rel="mw:WikiLink">|Bar</a>
27073 <a href="Foo" rel="mw:WikiLink">]]bar</a>
27074 <a href="Foo" rel="mw:WikiLink">[[bar</a>
27075 <a href="Foo" rel="mw:WikiLink">x [[ y</a>
27076 <a href="Foo" rel="mw:WikiLink">x ]] y</a>
27077 <a href="Foo" rel="mw:WikiLink">x ]] y [[ z</a>
27079 [[Foo|<nowiki>Foobar]</nowiki>]]
27080 [[Foo|x <nowiki>[http://google.com g]</nowiki> x]]
27081 [[Foo|<nowiki>[[Bar]]</nowiki>]]
27082 [[Foo|<nowiki>x [[Bar]] x</nowiki>]]
27083 [[Foo|<nowiki>|Bar</nowiki>]]
27084 [[Foo|<nowiki>]]bar</nowiki>]]
27085 [[Foo|<nowiki>[[bar</nowiki>]]
27086 [[Foo|<nowiki>x [[ y</nowiki>]]
27087 [[Foo|<nowiki>x ]] y</nowiki>]]
27088 [[Foo|<nowiki>x ]] y [[ z</nowiki>]]
27090 <p><a href="/wiki/Foo" title="Foo">Foobar]</a>
27091 <a href="/wiki/Foo" title="Foo">x [http://google.com g] x</a>
27092 <a href="/wiki/Foo" title="Foo">[[Bar]]</a>
27093 <a href="/wiki/Foo" title="Foo">x [[Bar]] x</a>
27094 <a href="/wiki/Foo" title="Foo">|Bar</a>
27095 <a href="/wiki/Foo" title="Foo">]]bar</a>
27096 <a href="/wiki/Foo" title="Foo">[[bar</a>
27097 <a href="/wiki/Foo" title="Foo">x [[ y</a>
27098 <a href="/wiki/Foo" title="Foo">x ]] y</a>
27099 <a href="/wiki/Foo" title="Foo">x ]] y [[ z</a>
27104 Links 3. WikiLinks: No escapes needed
27108 <p><a rel="mw:WikiLink" href="Foo">[Foobar</a>
27109 <a rel="mw:WikiLink" href="Foo" title="Foo">foo|bar</a></p>
27114 <p><a href="/wiki/Foo" title="Foo">[Foobar</a>
27115 <a href="/wiki/Foo" title="Foo">foo|bar</a>
27120 Links 4. ExtLinks: Escapes needed
27124 <p><a rel="mw:ExtLink" href="http://google.com">[google]</a>
27125 <a rel="mw:ExtLink" href="http://google.com">google]</a>
27126 <a rel="mw:ExtLink" href="http://google.com">goog] le</a></p>
27127 <p>[http://google.com]</p>
27128 <p>[http://google.com google]</p>
27129 <p>[<a rel="mw:ExtLink" href="http://google.com">http://google.com</a>]</p>
27130 <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>
27132 [http://google.com <nowiki>[google]</nowiki>]
27133 [http://google.com <nowiki>google]</nowiki>]
27134 [http://google.com <nowiki>goog] le</nowiki>]
27136 <nowiki>[http://google.com]</nowiki>
27138 <nowiki>[http://google.com google]</nowiki>
27140 [http://google.com<nowiki>]</nowiki>
27142 [{{echo|http://google.com}}<nowiki>]</nowiki>
27144 <p><a rel="nofollow" class="external text" href="http://google.com">[google]</a>
27145 <a rel="nofollow" class="external text" href="http://google.com">google]</a>
27146 <a rel="nofollow" class="external text" href="http://google.com">goog] le</a>
27147 </p><p>[http://google.com]
27148 </p><p>[http://google.com google]
27149 </p><p>[<a rel="nofollow" class="external free" href="http://google.com">http://google.com</a>]
27150 </p><p>[<a rel="nofollow" class="external free" href="http://google.com">http://google.com</a>]
27155 Links 5. ExtLinks: No escapes needed
27159 <p><a rel="mw:ExtLink" href="http://google.com">[google</a></p>
27160 <p>[<a ref="mw:ExtLink" href="http://google.com"></a>]</p>
27162 [http://google.com [google]
27164 [[http://google.com]]
27166 <p><a rel="nofollow" class="external text" href="http://google.com">[google</a>
27167 </p><p>[<a rel="nofollow" class="external autonumber" href="http://google.com">[1]</a>]
27172 Links 6. Add <nowiki/>s between text-nodes and url-links when required (T66300)
27176 <p>x<a rel="mw:ExtLink" href="http://example.com" data-parsoid='{"stx":"url"}'>http://example.com</a>y
27177 <a rel="mw:ExtLink" href="http://example.com" data-parsoid='{"stx":"url"}'>http://example.com</a>?x
27178 <a rel="mw:ExtLink" href="http://example.com" data-parsoid='{"stx":"url"}'>http://example.com</a>&x
27179 <a rel="mw:ExtLink" href="http://example.com" data-parsoid='{"stx":"url"}'>http://example.com</a>'x
27180 <a rel="mw:ExtLink" href="http://example.com" data-parsoid='{"stx":"url"}'>http://example.com</a>,x
27181 <a rel="mw:ExtLink" href="http://example.com" data-parsoid='{"stx":"url"}'>http://example.com</a>.x
27182 <a rel="mw:ExtLink" href="http://example.com" data-parsoid='{"stx":"url"}'>http://example.com</a>;x
27183 <a rel="mw:ExtLink" href="http://example.com" data-parsoid='{"stx":"url"}'>http://example.com</a>:x
27184 <a rel="mw:ExtLink" href="http://example.com" data-parsoid='{"stx":"url"}'>http://example.com</a>;x
27185 <a rel="mw:ExtLink" href="http://example.com" data-parsoid='{"stx":"url"}'>http://example.com</a>!x
27186 <a rel="mw:ExtLink" href="http://example.com" data-parsoid='{"stx":"url"}'>http://example.com</a>=x
27187 <a rel="mw:ExtLink" href="http://example.com" data-parsoid='{"stx":"url"}'>http://example.com</a>(x)
27188 <a rel="mw:ExtLink" href="http://example.com(x" data-parsoid='{"stx":"url"}'>http://example.com(x</a>)
27191 x<nowiki/>http://example.com<nowiki/>y
27192 http://example.com<nowiki/>?x
27193 http://example.com<nowiki/>&x
27194 http://example.com<nowiki/>'x
27195 http://example.com<nowiki/>,x
27196 http://example.com<nowiki/>.x
27197 http://example.com<nowiki/>;x
27198 http://example.com<nowiki/>:x
27199 http://example.com<nowiki/>;x
27200 http://example.com<nowiki/>!x
27201 http://example.com<nowiki/>=x
27202 http://example.com<nowiki/>(x)
27203 http://example.com(x<nowiki/>)
27207 Links 7a. Don't add spurious <nowiki/>s between text-nodes and url-links (T66300)
27212 <a rel="mw:ExtLink" href="http://example.com" data-parsoid='{"stx":"url"}'>http://example.com</a>
27214 "<a rel="mw:ExtLink" href="http://example.com" data-parsoid='{"stx":"url"}'>http://example.com</a>"
27215 (<a rel="mw:ExtLink" href="http://example.com" data-parsoid='{"stx":"url"}'>http://example.com</a>)
27216 (<a rel="mw:ExtLink" href="http://example.com" data-parsoid='{"stx":"url"}'>http://example.com</a>) foo
27217 <a rel="mw:ExtLink" href="http://example.com" data-parsoid='{"stx":"url"}'>http://example.com</a>,
27218 <a rel="mw:ExtLink" href="http://example.com" data-parsoid='{"stx":"url"}'>http://example.com</a>, foo
27224 "http://example.com"
27225 (http://example.com)
27226 (http://example.com) foo
27227 http://example.com,
27228 http://example.com, foo
27231 <a rel="nofollow" class="external free" href="http://example.com">http://example.com</a>
27233 "<a rel="nofollow" class="external free" href="http://example.com">http://example.com</a>"
27234 (<a rel="nofollow" class="external free" href="http://example.com">http://example.com</a>)
27235 (<a rel="nofollow" class="external free" href="http://example.com">http://example.com</a>) foo
27236 <a rel="nofollow" class="external free" href="http://example.com">http://example.com</a>,
27237 <a rel="nofollow" class="external free" href="http://example.com">http://example.com</a>, foo
27242 Links 7b. Don't add spurious <nowiki/>s between text-nodes and url-links (T66300)
27246 <p><a rel="mw:ExtLink" href="http://example.com" data-parsoid='{"stx":"url"}'>http://example.com</a>.,;:!?\
27247 -<a rel="mw:ExtLink" href="http://example.com">http://example.com</a>:</p>
27249 http://example.com.,;:!?\
27250 -http://example.com:
27252 <p><a rel="nofollow" class="external free" href="http://example.com">http://example.com</a>.,;:!?\
27253 -<a rel="nofollow" class="external free" href="http://example.com">http://example.com</a>:
27258 Links 8. Add <nowiki/>s between text-nodes and RFC-links when required (T66300)
27262 <p><a href="https://tools.ietf.org/html/rfc123" rel="mw:ExtLink" data-parsoid='{"stx":"magiclink"}'>RFC 123</a>4
27263 <a href="https://tools.ietf.org/html/rfc123" rel="mw:ExtLink" data-parsoid='{"stx":"magiclink"}'>RFC 123</a>y
27264 X<a href="https://tools.ietf.org/html/rfc123" rel="mw:ExtLink" data-parsoid='{"stx":"magiclink"}'>RFC 123</a>y</p>
27268 X<nowiki/>RFC 123<nowiki/>y
27272 Links 9. Don't add spurious <nowiki/>s between text-nodes and RFC-links (T66300)
27276 <p><a href="https://tools.ietf.org/html/rfc123" rel="mw:ExtLink" data-parsoid='{"stx":"magiclink"}'>RFC 123</a>?foo
27277 <a href="https://tools.ietf.org/html/rfc123" rel="mw:ExtLink" data-parsoid='{"stx":"magiclink"}'>RFC 123</a>&foo
27278 -<a href="https://tools.ietf.org/html/rfc123" rel="mw:ExtLink" data-parsoid='{"stx":"magiclink"}'>RFC 123</a>-
27285 <p><a class="external mw-magiclink-rfc" rel="nofollow" href="https://tools.ietf.org/html/rfc123">RFC 123</a>?foo
27286 <a class="external mw-magiclink-rfc" rel="nofollow" href="https://tools.ietf.org/html/rfc123">RFC 123</a>&foo
27287 -<a class="external mw-magiclink-rfc" rel="nofollow" href="https://tools.ietf.org/html/rfc123">RFC 123</a>-
27292 Links 10. Add <nowiki/>s between text-nodes and PMID-links when required (T66300)
27296 <p><a href="//www.ncbi.nlm.nih.gov/pubmed/123?dopt=Abstract" rel="mw:ExtLink" data-parsoid='{"stx":"magiclink"}'>PMID 123</a>4
27297 <a href="//www.ncbi.nlm.nih.gov/pubmed/123?dopt=Abstract" rel="mw:ExtLink" data-parsoid='{"stx":"magiclink"}'>PMID 123</a>y
27298 X<a href="//www.ncbi.nlm.nih.gov/pubmed/123?dopt=Abstract" rel="mw:ExtLink" data-parsoid='{"stx":"magiclink"}'>PMID 123</a>y
27302 X<nowiki/>PMID 123<nowiki/>y
27306 Links 11. Don't add spurious <nowiki/>s between text-nodes and PMID-links (T66300)
27310 <p><a href="//www.ncbi.nlm.nih.gov/pubmed/123?dopt=Abstract" rel="mw:ExtLink" data-parsoid='{"stx":"magiclink"}'>PMID 123</a>?foo
27311 <a href="//www.ncbi.nlm.nih.gov/pubmed/123?dopt=Abstract" rel="mw:ExtLink" data-parsoid='{"stx":"magiclink"}'>PMID 123</a>&foo
27312 -<a href="//www.ncbi.nlm.nih.gov/pubmed/123?dopt=Abstract" rel="mw:ExtLink" data-parsoid='{"stx":"magiclink"}'>PMID 123</a>-
27319 <p><a class="external mw-magiclink-pmid" rel="nofollow" href="//www.ncbi.nlm.nih.gov/pubmed/123?dopt=Abstract">PMID 123</a>?foo
27320 <a class="external mw-magiclink-pmid" rel="nofollow" href="//www.ncbi.nlm.nih.gov/pubmed/123?dopt=Abstract">PMID 123</a>&foo
27321 -<a class="external mw-magiclink-pmid" rel="nofollow" href="//www.ncbi.nlm.nih.gov/pubmed/123?dopt=Abstract">PMID 123</a>-
27326 Links 12. Add <nowiki/>s between text-nodes and ISBN-links when required (T66300)
27330 <p><a href="./Special:BookSources/1234567890" rel="mw:WikiLink" data-parsoid='{"stx":"magiclink"}'>ISBN 1234567890</a>1
27331 <a href="./Special:BookSources/1234567890" rel="mw:WikiLink" data-parsoid='{"stx":"magiclink"}'>ISBN 1234567890</a>x
27332 a<a href="./Special:BookSources/1234567890" rel="mw:WikiLink" data-parsoid='{"stx":"magiclink"}'>ISBN 1234567890</a>b
27335 ISBN 1234567890<nowiki/>1
27336 ISBN 1234567890<nowiki/>x
27337 a<nowiki/>ISBN 1234567890<nowiki/>b
27341 Links 13. Don't add spurious <nowiki/>s between text-nodes and ISBN-links (T66300)
27345 <p>-<a href="./Special:BookSources/1234567890" rel="mw:WikiLink" data-parsoid='{"stx":"magiclink"}'>ISBN 1234567890</a>'s
27349 <p>-<a href="/wiki/Special:BookSources/1234567890" class="internal mw-magiclink-isbn">ISBN 1234567890</a>'s
27354 Links 14. Protect link-like plain text. (Parsoid bug T78425)
27358 <p>this is not a link: http://example.com
27361 this is not a link: <nowiki>http://example.com</nowiki>
27365 Links 15. Link trails can't become link prefixes.
27370 <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>
27372 [[Söfnuður]]-[[00]]
27374 <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>
27378 #### --------------- Quotes ---------------
27379 #### 1. Quotes inside <b> and <i>
27380 #### 2. Link fragments separated by <i> and <b> tags
27381 #### 3. Link fragments inside <i> and <b>
27382 #### 4. No escaping needed
27383 #### --------------------------------------
27385 1a. Quotes inside <b> and <i>
27396 <b>foo'<i>bar'</i>baz</b>
27405 <i>fools'<span> errand</span></i>
27406 <i><span>fool</span>'s errand</i>
27407 '<i>foo</i> bar '<i>baz</i>
27408 a|!*#-:;+-~[]{}b'<i>x</i>
27412 ''<nowiki>''foo''</nowiki>''
27413 ''<nowiki>'''foo'''</nowiki>''
27415 '''<nowiki/>'foo''''
27416 '''<nowiki>''foo''</nowiki>'''
27417 '''<nowiki>'''foo'''</nowiki>'''
27418 '''foo'<nowiki/>''bar'<nowiki/>''baz'''
27419 '''foo'''<nowiki/>'s
27425 '''foo'''<nowiki/>'
27426 ''''foo'''<nowiki/>'
27427 ''fools'<span> errand</span>''
27428 ''<span>fool</span>'s errand''
27429 '<nowiki/>''foo'' bar '''baz''
27430 a|!*#-:;+-~[]{}b'''x''
27434 1b. Quotes inside <b> and <i> with other tags on same line
27438 '<i>a</i> foo <i><a rel="mw:WikiLink" href="Bar" title="Bar">bar</a></i>
27439 <i>a'</i> foo <i><a rel="mw:WikiLink" href="Bar" title="Bar">bar</a></i>
27440 <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>
27441 <a rel="mw:WikiLink" href="Foo" title="Foo">foo</a> x'<i><a href="Bar" rel="mw:WikiLink" title="Bar">bar</a></i>
27442 '<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>
27443 '<i>foo</i> <div title="name">test</div>
27444 '<i>foo</i> and <br data-parsoid='{"stx":"html","noClose":true}'/> bar
27445 <ol class="mw-references references" typeof="mw:Extension/references" about="#mwt5" data-mw='{"name":"references","attrs":{}}'>
27446 <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>
27449 '''a'' foo ''[[bar]]''
27450 ''a''' foo ''[[bar]]''
27451 ''a''' foo '''{{echo|[[bar]]}}'''
27452 [[foo]] x'''[[bar]]''
27453 '''foo'' <ref>test</ref>
27454 '''foo'' <div title="name">test</div>
27455 '''foo'' and <br> bar
27460 2. Link fragments separated by <i> and <b> tags
27464 <p>[[<i>foo</i>hello]]</p>
27465 <p>[[<b>foo</b>hello]]</p>
27467 [[''foo''<nowiki>hello]]</nowiki>
27469 [['''foo'''<nowiki>hello]]</nowiki>
27472 # FIXME: Escaping one or both of [[ and ]] is also acceptable --
27473 # this is one of the shortcomings of this format
27475 3. Link fragments inside <i> and <b>
27479 <p><i>[[foo</i>]]</p>
27480 <p><b>[[foo</b>]]</p>
27482 ''[[foo''<nowiki>]]</nowiki>
27484 '''[[foo'''<nowiki>]]</nowiki>
27488 4. No escaping needed
27492 <p>'<span><i>bar</i></span>'
27493 '<span><b>bar</b></span>'
27497 '<span>''bar''</span>'
27498 '<span>'''bar'''</span>'
27502 #### ----------- Paragraphs ---------------
27503 #### 1. No unnecessary escapes
27504 #### --------------------------------------
27507 1. No unnecessary escapes
27511 <p>bar <span>[[foo]]</span>
27512 </p><p>=bar <span>[[foo]]</span>
27513 </p><p>[[bar <span>[[foo]]</span>
27514 </p><p>]]bar <span>[[foo]]</span>
27515 </p><p>=bar <span>foo]]</span>=
27518 bar <span><nowiki>[[foo]]</nowiki></span>
27520 =bar <span><nowiki>[[foo]]</nowiki></span>
27522 [[bar <span><nowiki>[[foo]]</nowiki></span>
27524 ]]bar <span><nowiki>[[foo]]</nowiki></span>
27526 =bar <span>foo]]</span><nowiki>=</nowiki>
27529 #### ----------------------- PRE --------------------------
27531 1. Leading whitespace in SOL context should be escaped
27554 <nowiki> </nowiki>a
27556 <nowiki> </nowiki> a
27560 <nowiki> </nowiki> a
27562 <nowiki> </nowiki>a
27565 <nowiki> </nowiki>b
27588 2. Leading whitespace in non-indent-pre contexts should not be escaped
27592 <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>
27593 <ol class="mw-references references" typeof="mw:Extension/references" about="#mwt4" data-mw='{"name":"references","attrs":{}}'>
27594 <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>
27604 3. Leading whitespace in indent-pre suppressing contexts should not be escaped
27623 4. Leading whitespace in indent-pre suppressing contexts should not be escaped
27627 <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>
27629 [[File:Foobar.jpg|thumb|caption]]
27633 5. Nowiki escaping should account for indent-pres
27643 T95794: nowiki escaping should account for leading space at start-of-line in an indent-pre block
27657 Whitespace scrubbing in SOL position should account for SOL-sensitive wikitext markup
27660 "modes": ["html2wt"],
27661 "scrubWikitext": true
27669 <p><link rel="mw:PageProp/Category" href="./Category:Foo" data-parsoid="{}"> *foo</p>
27670 <p> <link rel="mw:PageProp/Category" href="./Category:Foo" data-parsoid="{}">*foo</p>
27671 <p> <!--boo-->*foo</p>
27672 <p><!--boo--> *foo</p>
27673 <p><!--a--> <!--b--> <!--c--> <!--d--> <!--e--> foo</p>
27674 <p><!--a--> <!--b--> <!--c--> <!--d--> <!--e--> *foo</p>
27690 <nowiki>*</nowiki>foo
27692 <nowiki/><!--boo-->*foo
27694 <!--boo--><nowiki/>*foo
27696 <!--a--><!--b--><!--c--><!--d--><!--e-->foo
27698 <!--a--><nowiki/><!--b--><!--c--><!--d--><!--e-->*foo
27701 #### --------------- Behavior Switches --------------------
27704 1. Valid behavior switches should be escaped
27711 <nowiki>__TOC__</nowiki>
27712 ''<nowiki>__TOC__</nowiki>''
27716 2. Invalid behavior switches should not be escaped
27727 # We use indent-pre as an indirect way to test for sol-transparent behavior.
27729 Behavior switches should be SOL-transparent
27733 <meta property="mw:PageProp/toc" />
27735 <!-- this one's bogus -->
27738 <pre data-parsoid='{}'><meta property="mw:PageProp/toc" data-parsoid='{"src":"__TOC__","magicSrc":"__TOC__"}'/> foo</pre>
27740 <meta property="mw:PageProp/toc" data-parsoid='{"src":"__TOC__","magicSrc":"__TOC__"}'/><pre data-parsoid='{}'>bar</pre>
27744 <!-- this one's bogus -->
27753 #### --------------- HTML tags ---------------
27756 #### 3. multi-line html tag
27757 #### 4. extension tags
27758 #### -----------------------------------------
27764 <a href="http://google.com">google</a>
27766 <a href="http://google.com">google</a>
27774 <ul><li> <div>foo</div></li>
27775 <li> <div style="color:red">foo</div></li>
27776 <li> <td></li></ul>
27779 * <nowiki><div>foo</div></nowiki>
27780 * <nowiki><div style="color:red">foo</div></nowiki>
27781 * <nowiki><td></nowiki>
27785 3. multi-line html tag
27804 <p><ref>foo</ref>
27805 </p><p><ref>bar
27806 </p><p>baz</ref>
27809 <nowiki><ref>foo</ref></nowiki>
27811 <nowiki><ref>bar</nowiki>
27813 baz<nowiki></ref></nowiki>
27817 Parsoid: newline inducing block nodes don't suppress <nowiki>
27823 <nowiki> </nowiki>a
27828 #### --------------- Others ---------------
27834 <p><nowiki>foo</nowiki>
27837 <nowiki>foo</nowiki>
27840 ## The quote-char in the input is necessary for triggering the bug
27842 (T54035) Nowiki-escaping should not get tripped by " :" in text
27851 #----------- End of wikitext escaping tests --------------
27855 Tag-like HTML structures are passed through as text
27877 </p><p>1<d e>f
27882 HTML tag with necessary entities in attributes
27884 <span title="&amp;">foo</span>
27886 <p><span title="&amp;">foo</span>
27891 HTML tag with 'unnecessary' entity encoding in attributes
27893 <span title="&">foo</span>
27895 <p><span title="&">foo</span>
27900 HTML tag with broken attribute value quoting
27902 parsoid=wt2html,html2html
27904 <span title="Hello world>Foo</span>
27906 <p><span title="Hello world">Foo</span>
27909 <p><span title="Hello world">Foo</span></p>
27913 Self-closed tag with broken attribute value quoting
27915 parsoid=wt2html,html2html
27917 <div title="Hello world />Foo
27919 <div title="Hello world"></div><p>Foo
27922 <div title="Hello world " data-parsoid='{"stx":"html","selfClose":true}'></div><p>Foo</p>
27926 Table with broken attribute value quoting
27928 parsoid=wt2html,html2html
27931 | title="Hello world|Foo
27936 <td title="Hello world">Foo
27942 <td title="Hello world">Foo
27948 Table with broken attribute value quoting on consecutive lines
27950 parsoid=wt2html,html2html
27953 | title="Hello world|Foo
27954 | style="color:red|Bar
27959 <td title="Hello world">Foo
27961 <td style="color:red">Bar
27967 <td title="Hello world">Foo
27968 </td><td style="color: red">Bar
27969 </td></tr></tbody></table>
27974 Accept empty td cell attribute
27977 | align="center" |foo|| |
27982 <td align="center">foo</td>
27989 Non-empty attributes in th-cells
27992 !Foo!! style="color: red" |Bar
27998 <th style="color: red">Bar
28004 Accept empty attributes in th-cells
28019 Empty table rows go away
28040 ### Parsoid-centric tests for testing RTing of inter-element separators
28041 ### Edge cases not tested by existing parser tests and specific to
28042 ### Parsoid-specific serialization strategies.
28046 RT-ed inter-element separators should be valid separators
28058 <tbody><tr class='mw-empty-elt' data-parsoid='{"startTagSrc":"|-","a":{"[[foo]]":null},"sa":{"[[foo]]":""},"autoInsertedEnd":true}'></tr>
28062 # Parsoid-only test of a DOM pass
28064 Trailing newlines in a deep dom-subtree that ends a wikitext line should be migrated out
28076 <tbody><tr data-parsoid='{"autoInsertedEnd":true,"autoInsertedStart":true}'><td data-parsoid='{"autoInsertedEnd":true}'><small data-parsoid='{"stx":"html","autoInsertedEnd":true}'>foo
28077 <p>bar</p></small></td></tr>
28081 <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>
28085 # Note that the "style" attribute is really a template parameter here.
28086 # The = would have to be {{=}} if you wanted the literal.
28088 Empty TD followed by TD with tpl-generated attribute
28093 |{{echo|style='color:red'}}|foo
28107 Indented table with an empty td
28126 Indented table with blank lines in between (T85627)
28145 <br /></p></td></tr>
28150 Indented block & table
28164 <div data-parsoid='{"stx":"html"}'>foo</div>
28166 <tr data-parsoid='{"autoInsertedEnd":true,"autoInsertedStart":true}'><td data-parsoid='{"autoInsertedEnd":true}'>foo</td></tr>
28171 Indent and comment before table row
28186 <!--hi--><tbody><tr data-parsoid='{"startTagSrc":"|-","autoInsertedEnd":true}'>
28187 <td data-parsoid='{"autoInsertedEnd":true}'> there</td></tr>
28191 # PHP parser omits empty TR
28193 Empty TR followed by a template-generated TR
28197 {{echo|<tr><td>foo</td></tr>}}
28202 <tbody><tr><td>foo</td></tr>
28207 <tr class='mw-empty-elt'></tr>
28208 <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}}]}'>
28213 ## PHP and parsoid output differ for this; as usual PHP omits empty
28214 ## elements, and since it strips the comments the TR is empty.
28216 Empty TR followed by mixed-ws-comment line should RT correctly
28232 <tr class='mw-empty-elt'></tr>
28235 <!--c--> </tr><!--d-->
28241 Multi-line image caption generated by templates with/without trailing newlines
28243 [[File:Foobar.jpg|thumb|300x300px|foo\n{{echo|A}}\n{{echo|B}}\n{{echo|C}}]]
28244 [[File:Foobar.jpg|thumb|300x300px|foo\n{{echo|A}}\n{{echo|B}}\n{{echo|C}}\n\n]]
28246 <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>
28247 <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>
28251 New element inserted (without intervening newlines) after an old sol-transparent node should serialize correctly
28255 <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>
28257 <link rel="mw:PageProp/Category" href="./Category:Foo" data-parsoid='{}'/><h1>new heading</h1>
28259 <includeonly>foo</includeonly>
28267 ## PHP emits broken html for this, and since this is primarily
28268 ## a Parsoid serializer test, marking this Parsoid only
28270 Improperly nested inline or quotes tags with whitespace in between
28272 <span> <s>x</span> </s>
28275 <p><span> <s>x</s></span><s> </s>
28276 <b> <i>x</i></b><i> </i>
28281 Encapsulate protected attributes from wt
28283 <div typeof="mw:placeholder stuff" data-mw="whoo" data-parsoid="weird" data-parsoid-other="no" about="time" rel="mw:true">foo</div>
28285 {| typeof="mw:placeholder stuff" data-mw="whoo" data-parsoid="weird" data-parsoid-other="no" about="time" rel="mw:true"
28289 <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>
28291 <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">
28292 <tbody><tr><td data-parsoid='{"autoInsertedEnd":true}'>ok</td></tr>
28296 ## Currently the p-wrapper is fragile in how it adds / removes transformations.
28297 ## Having nested or stray pre tags results in the attempt to add duplicates,
28298 ## causing an assertion fail. This test tries to prevent that situation.
28300 Ensure ParagraphWrapper can deal with stray closing pre tags
28309 ## Remex doesn't account for fostered content.
28311 1. Ensure fostered text content is wrapped in element nodes
28315 <table>hi</table><table>ho</table>
28317 hi<table></table>ho<table></table>
28319 <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>
28322 ## Remex doesn't account for fostered content.
28324 2. Ensure fostered text content is wrapped in element nodes (traps regressions around fostered marker on the element getting lost)
28326 parsoid=wt2html,wt2wt
28336 </td></tr></tbody></table>
28338 <p data-parsoid='{"fostered":true,"autoInsertedEnd":true,"autoInsertedStart":true}'> || ||</p>
28339 <table data-parsoid='{"stx":"html"}'>
28340 <tbody><tr data-parsoid='{"stx":"html","autoInsertedEnd":true}'><td data-parsoid='{"stx":"html","autoInsertedEnd":true}'> a
28341 </td></tr></tbody></table>
28344 ## Remex doesn't account for fostered content.
28346 Encapsulation properly handles null DSR information from foster box
28348 parsoid=wt2html,wt2wt
28350 {{echo|<table>foo<tr><td>bar</td></tr></table>}}
28352 <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>
28355 ## Remex doesn't account for fostered content.
28357 1. Encapsulate foster-parented transclusion content
28359 parsoid=wt2wt,wt2html
28361 <table>{{echo|foo<tr><td>bar</td></tr>}}</table>
28363 foo<table><tbody><tr><td>bar</td></tr></tbody></table>
28365 <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>
28369 2. Encapsulate foster-parented transclusion content
28371 parsoid=wt2wt,wt2html
28373 <table><div>{{echo|foo}}</div><tr><td>bar</td></tr></table>
28375 <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>
28386 3. Encapsulate foster-parented transclusion content
28388 parsoid=wt2wt,wt2html
28390 <table><div><p>{{echo|foo</p></div><tr><td>}}bar</td></tr></table>
28392 <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>"]}">
28405 4. Encapsulate foster-parented transclusion content
28407 parsoid=wt2wt,wt2html
28409 <table><div><p>{{echo|foo</p></div><tr><td>}}bar</td></tr></table>
28411 <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>"]}">
28423 ## Remex doesn't account for fostered content.
28425 5. Encapsulate foster-parented transclusion content
28427 parsoid=wt2wt,wt2html
28429 <table><tr><td><div><p>{{echo|foo</p></div></td>foo}}</tr></table>
28431 foo<table><tbody><tr><td><div><p>foo</p></div></td></tr></tbody></table>
28433 <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>
28436 ## Remex doesn't account for fostered content.
28438 6. Encapsulate foster-parented transclusion content
28440 parsoid=wt2wt,wt2html
28442 <table><tr><td><div><p>{{echo|foo</p></div></td>foo</tr></table>}}<p>ok</p>
28444 foo<table><tbody><tr><td><div><p>foo</p></div></td></tr></tbody></table><p>ok</p>
28446 <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>
28450 7. Encapsulate foster-parented transclusion content
28452 parsoid=wt2wt,wt2html
28454 <table>{{echo|<p>foo</p>}}<td>bar</td></table>
28456 <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>
28466 ## Remex doesn't account for fostered content.
28467 # Note that the wt is broken on purpose: the = should be {{=}} if you
28468 # don't want it to be a template parameter key.
28470 8. Encapsulate foster-parented transclusion content
28472 parsoid=wt2wt,wt2html
28475 }}{|{{echo|style='color:red'}}
28486 </td></tr></tbody></table>
28488 <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">
28489 </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">
28492 </td></tr></tbody></table>
28495 ## Remex doesn't account for fostered content.
28497 9. Encapsulate foster-parented transclusion content
28499 parsoid=wt2wt,wt2html
28501 <table>{{echo|hi</table>hello}}
28503 hi<table></table><p>hello
28506 <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>
28510 Table in fosterable position
28521 <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">
28523 <table about="#mwt1" data-parsoid='{"autoInsertedEnd":true}'></table>
28529 # Parsoid only for T66747
28531 Properly encapsulate empty-content transclusions in fosterable positions
28539 <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"}]]}'>
28544 ## No longer captures its original intention
28546 Always encapsulate foster box when template range is expanded to table
28560 T115289: Unclosed table
28562 {{echo|<table>}}<!--c-->[[Category:Two]]
28564 <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>
28568 T115289: Don't migrate newlines out of tables with fostered content
28570 <table><td></td>{{echo|<tr>[[Category:One]]}}<!--c-->[[Category:Two]]
28572 <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>
28576 T73074: More fostering fun
28578 <table><td></td>{{echo|<tr>}}<!--c-->[[Category:Two]]
28580 <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>
28584 Support <object> element with .data attribute
28588 <object data="test.swf"></object>
28590 <object data="test.swf"></object>
28594 Don't block XML namespace declaration
28596 <span xmlns:dct="http://purl.org/dc/terms/" property="dct:title">MediaWiki</span>
28598 <p><span xmlns:dct="http://purl.org/dc/terms/" property="dct:title">MediaWiki</span>
28601 <p><span xmlns:dct="http://purl.org/dc/terms/" data-x-property="dct:title" data-parsoid='{"stx":"html"}'>MediaWiki</span></p>
28604 # -----------------------------------------------------------------
28605 # The following section of tests are primarily to spec requirements
28606 # around Parsoid's serialization (old, new, edited content)
28608 # All these tests are marked Parsoid html2wt and html2html only
28609 # ----------------------------------------------------------------
28612 Ignore rel attribute in a-tags during serialization to url-links
28616 <a href='http://en.wikipedia.org/wiki/Foobar'>http://en.wikipedia.org/wiki/Foobar</a>
28617 <a href='http://en.wikipedia.org/wiki/Foobar' rel='mw:ExtLink'>http://en.wikipedia.org/wiki/Foobar</a>
28618 <a href='http://en.wikipedia.org/wiki/Foobar' rel='mw:WikiLink'>http://en.wikipedia.org/wiki/Foobar</a>
28620 http://en.wikipedia.org/wiki/Foobar
28621 http://en.wikipedia.org/wiki/Foobar
28622 http://en.wikipedia.org/wiki/Foobar
28625 # 'mi' is a localinterwiki prefix as well as a language
28627 Serialize interwiki links pointing to the current wiki as plain wiki links (T67869)
28631 <p><a rel="mw:ExtLink" href="http://mi.wikipedia.org/wiki/Foo">Foo</a></p>
28637 Parsoid should accept interwiki shortcuts
28641 <p><a rel='mw:WikiLink' href='./fr:Foo'>Foo</a>
28642 <a rel='mw:ExtLink' href='./fr:Foo'>Foo</a>
28643 <a href='./fr:Foo'>Foo</a></p>
28644 <p><a rel='mw:WikiLink' href='fr%3AFoo'>Foo</a>
28645 <a rel='mw:ExtLink' href='fr%3AFoo'>Foo</a>
28646 <a href='fr%3AFoo'>Foo</a></p>
28647 <p><a href='FR%3AFoo'>Foo</a>
28648 <a href='./FR:Foo'>Foo</a></p>
28663 Parsoid should not accept invalid interwiki shortcuts
28667 <p><a rel='mw:WikiLink' href='news:Foo'>Foo</a>
28668 <a rel='mw:ExtLink' href='news:Foo'>Foo</a>
28669 <a href='news:Foo'>Foo</a></p>
28678 New wikilinks should be serialized properly
28682 <a rel="mw:WikiLink" href="./Foo" title="Foo" data-parsoid='{}'>Foo</a>
28683 <a rel="mw:WikiLink" href="./Foo" title="Foo">Foo</a>
28684 <a href="//en.wikipedia.org/wiki/Foo">//en.wikipedia.org/wiki/Foo</a>
28685 <a href="http://en.wikipedia.org/wiki/Foo">http://en.wikipedia.org/wiki/Foo</a>
28686 <a href="//en.wikipedia.org/wiki/Foo_bar">//en.wikipedia.org/wiki/Foo bar</a>
28690 [[:en:Foo|//en.wikipedia.org/wiki/Foo]]
28691 http://en.wikipedia.org/wiki/Foo
28692 [[:en:Foo_bar|//en.wikipedia.org/wiki/Foo bar]]
28696 New wiki links (href variations)
28700 <a rel="mw:WikiLink" href="./Foo_bar">Foo_bar</a>
28701 <a rel="mw:WikiLink" href="Foo_bar">Foo_bar</a>
28702 <a rel="mw:WikiLink" href="Foo bar">Foo_bar</a>
28703 <a rel="mw:WikiLink" href="./Toxine_bact%C3%A9rienne">Toxine bactérienne</a>
28708 [[Toxine bactérienne]]
28712 New wiki links (content string variations)
28716 <a rel="mw:WikiLink" href="./Foo_bar">Foo_bar</a>
28717 <a rel="mw:WikiLink" href="./Foo_bar">Foo bar</a>
28718 <a rel="mw:WikiLink" href="./Foo_bar">./Foo_bar</a>
28722 [[Foo_bar|./Foo_bar]]
28726 New category links (href variations)
28730 <link rel="mw:PageProp/Category" href="./Category:Toxine_bactérienne" />
28731 <link rel="mw:PageProp/Category" href="./Category:Toxine_bact%C3%A9rienne" />
28732 <link rel="mw:PageProp/Category" href="Category:Toxine_bact%C3%A9rienne" />
28734 [[Category:Toxine bactérienne]]
28735 [[Category:Toxine bactérienne]]
28736 [[Category:Toxine bactérienne]]
28740 New sol transparent links don't need indent-pre nowiki protection
28745 <link rel="mw:PageProp/redirect" href="./Main_Page">
28746 <!-- this is good --> <link rel="mw:PageProp/Category" href="./Category:Good" />
28747 <!-- this is great --> <link rel="mw:PageProp/Category" href="./Kategorie:Great" />
28749 #WEITERLEITUNG [[Main Page]]
28750 <!-- this is good --> [[Category:Good]]
28751 <!-- this is great --> [[Kategorie:Great]]
28755 New interlanguage links (href variations)
28759 <link rel="mw:PageProp/Language" href="http://es.wikipedia.org/wiki/Toxine bactérienne" />
28760 <link rel="mw:PageProp/Language" href="http://es.wikipedia.org/wiki/Toxine_bactérienne" />
28761 <link rel="mw:PageProp/Language" href="http://es.wikipedia.org/wiki/Toxine_bact%C3%A9rienne" />
28763 [[es:Toxine bactérienne]]
28764 [[es:Toxine_bactérienne]]
28765 [[es:Toxine_bactérienne]]
28769 Image: Modifying size of an image (1)
28772 "modes": ["wt2wt"],
28774 ["img[height]", "attr", "height", "22"],
28775 ["img[width]", "attr", "width", "200"]
28779 [[Image:Foobar.jpg|230x230px]]
28781 [[Image:Foobar.jpg|200x200px]]
28785 Image: Modifying size of an image (2)
28788 "modes": ["wt2wt"],
28790 ["img[height]", "attr", "height", "100"],
28791 ["img[width]", "attr", "width", "500"]
28795 [[Image:Foobar.jpg|230x230px]]
28797 [[Image:Foobar.jpg|500x500px]]
28800 # Change in size is ignored so long as class='mw-default-size'
28802 Image: Modifying size of an image (3)
28805 "modes": ["wt2wt"],
28807 ["figure[class]", "removeClass", "mw-default-size"],
28808 ["figure img", "attr", "height", "19"],
28809 ["figure img", "attr", "width", "170"]
28813 [[Image:Foobar.jpg|thumb]]
28815 [[Image:Foobar.jpg|thumb|170x170px]]
28819 Image: Modifying alignment of an image (T50665)
28822 "modes": ["wt2wt"],
28824 ["figure[class]", "removeClass", "mw-halign-right"],
28825 ["figure[class]", "addClass", "mw-halign-left"]
28829 [[Image:Foobar.jpg|thumb|caption|right]]
28831 [[Image:Foobar.jpg|thumb|caption|left]]
28835 Image: Modifying mw-default-size of an frameless image (T64805)
28838 "modes": ["wt2wt"],
28840 ["figure.mw-default-size", "removeClass", "mw-default-size"]
28844 [[Image:Foobar.jpg|frameless|right]]
28846 [[Image:Foobar.jpg|frameless|right|220x220px]]
28850 Image: Modifying valign of an image (T51221)
28853 "modes": ["wt2wt"],
28855 ["*[typeof=\"mw:Image\"]", "removeClass", "mw-valign-middle"],
28856 ["*[typeof=\"mw:Image\"]", "addClass", "mw-valign-text-top"]
28860 [[File:Foobar.jpg|20px|middle]]
28862 [[File:Foobar.jpg|20px|text-top]]
28866 Image: Modifying alt attribute of an image (T58400)
28869 "modes": ["wt2wt"],
28871 ["img[alt]", "attr", "alt", "some alternate edited text"]
28875 [[File:Foobar.jpg|thumb|some caption|alt=some alternate text]]
28877 [[File:Foobar.jpg|thumb|some caption|alt=some alternate edited text]]
28881 Image: Modifying caption of an image
28884 "modes": ["wt2wt"],
28886 ["figcaption", "text", "new caption"]
28890 [[Image:Foobar.jpg|thumb|original caption]]
28892 [[Image:Foobar.jpg|thumb|new caption]]
28896 Image: empty alt attribute (T50924)
28898 [[File:Foobar.jpg|thumb|alt=|bar]]
28900 <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>
28902 <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>
28906 Image: new attributes should be serialized in wiki's language for RTL languages (T53852)
28912 <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>
28914 [[Imagen:Foobar.jpg|derecha|miniaturadeimagen]]
28918 Image: Block level image should have \n before and after
28921 [[File:Foobar.jpg|right|thumb|150x150px]]
28925 <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>
28930 Image: New block level image should have \n before and after (existing content)
28933 [[File:Foobar.jpg|right|thumb|150x150px]]
28937 <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>
28942 Image: upright option (parsoid)
28944 [[File:Foobar.jpg|thumb|upright|caption]]
28945 [[File:Foobar.jpg|thumb|upright=0.5|caption]]
28946 [[File:Foobar.jpg|thumb|500x500px|upright=0.5|caption]]
28948 <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>
28949 <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>
28950 <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>
28954 Image: upright option is ignored on inline and frame images (parsoid)
28956 [[File:Foobar.jpg|500x500px|upright=0.5|caption]]
28958 <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>
28962 Image: in template parameter with empty parameter
28964 {{echo|[[File:Foobar.jpg|link=]]}}
28966 <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>
28970 Image: from basic HTML (1)
28974 <span typeof="mw:Image">
28975 <img src="./File:Foobar.jpg" width=100 height=100 alt="Alt">
28978 [[File:Foobar.jpg|link=|alt=Alt|100x100px]]
28982 Image: from basic HTML (2)
28986 <img src="./File:Foobar.jpg" width=100 height=100 alt="Alt">
28988 [[File:Foobar.jpg|link=|alt=Alt|100x100px]]
28992 Image: from basic HTML (3)
28996 <a href="Main"><img src="./File:Foobar.jpg" width=100 height=100 alt="Alt"></a>
28998 [[File:Foobar.jpg|link=Main|alt=Alt|100x100px]]
29002 Image: from basic HTML (4)
29006 <img src="./File:Foobar.jpg">
29008 [[File:Foobar.jpg|link=]]
29012 Image: Invalid title as link
29014 [[File:Foobar.jpg|link=<]]
29016 <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>
29019 <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>
29023 Various link types in alt and link options
29025 [[File:Foobar.jpg|link=[[Main Page]]|alt=[[Main Page]]|caption]]
29027 [[File:Foobar.jpg|link=[[Media:Thumb.png]]|alt=[[Media:Thumb.png]]|caption]]
29029 [[File:Foobar.jpg|link=[[wikipedia:Foo]]|alt=[[wikipedia:Foo]]|caption]]
29031 <p><a href="/wiki/Main_Page" title="caption"><img alt="Main Page" src="http://example.com/images/3/3a/Foobar.jpg" width="1941" height="220" /></a>
29032 </p><p><a href="/wiki/Media:Thumb.png" title="caption"><img alt="Media:Thumb.png" src="http://example.com/images/3/3a/Foobar.jpg" width="1941" height="220" /></a>
29033 </p><p><a href="http://en.wikipedia.org/wiki/Foo" title="caption"><img alt="wikipedia:Foo" src="http://example.com/images/3/3a/Foobar.jpg" width="1941" height="220" /></a>
29036 <p><figure-inline class="mw-default-size" typeof="mw:Image" data-mw='{"caption":"caption"}'><a href="./Main_Page" data-parsoid='{"a":{"href":"./Main_Page"},"sa":{"href":"link=[[Main Page]]"}}'><img alt="Main Page" resource="./File:Foobar.jpg" 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":"Main Page","resource":"./File:Foobar.jpg","height":"220","width":"1941"},"sa":{"alt":"alt=[[Main Page]]","resource":"File:Foobar.jpg"}}'/></a></figure-inline></p>
29038 <p><figure-inline class="mw-default-size" typeof="mw:Image" data-mw='{"caption":"caption"}'><a href="./Media:Thumb.png" data-parsoid='{"a":{"href":"./Media:Thumb.png"},"sa":{"href":"link=[[Media:Thumb.png]]"}}'><img alt="Media:Thumb.png" resource="./File:Foobar.jpg" 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":"Media:Thumb.png","resource":"./File:Foobar.jpg","height":"220","width":"1941"},"sa":{"alt":"alt=[[Media:Thumb.png]]","resource":"File:Foobar.jpg"}}'/></a></figure-inline></p>
29040 <p><figure-inline class="mw-default-size" typeof="mw:Image" data-mw='{"caption":"caption"}'><a href="http://en.wikipedia.org/wiki/Foo" data-parsoid='{"a":{"href":"http://en.wikipedia.org/wiki/Foo"},"sa":{"href":"link=[[wikipedia:Foo]]"}}'><img alt="wikipedia:Foo" resource="./File:Foobar.jpg" 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":"wikipedia:Foo","resource":"./File:Foobar.jpg","height":"220","width":"1941"},"sa":{"alt":"alt=[[wikipedia:Foo]]","resource":"File:Foobar.jpg"}}'/></a></figure-inline></p>
29044 Lists: Serialize correctly even when list content is wrapped in p-tags (like VE does)
29049 <li><p>foo</p></li>
29056 Lists: Serialize correctly even when list tags has unneeded whitespace between tags
29060 <ul> <li>foo</li></ul>
29066 Don't strip leading whitespace when handling indent-pre suppressing tags
29071 <tr><td> indented row</td></tr>
29074 <b>This is very bold of you!</b>
29077 indented cell (no pre-wrapping!)
29087 '''This is very bold of you!'''
29091 indented cell (no pre-wrapping!)
29099 Nowiki-wrap leading whitespace when handling indent-pre inducing tags
29121 <nowiki> </nowiki></span>bar2
29124 <nowiki> </nowiki><span>bar</span>
29127 <nowiki> </nowiki><span>foo</span>
29132 Lists: Dont insert newlines in a serialized list item.
29136 <ul><li>a<br>b</li><li>c</li></ul>
29143 1. Headings: Force sol-transparent links and behavior switches to serialize before/after
29146 "modes": ["html2wt"],
29147 "scrubWikitext": false
29150 <h2>hello there<link href="./Category:A1" rel="mw:PageProp/Category" /></h2>
29151 <h2><link href="./Category:A2" rel="mw:PageProp/Category" />hi pal</h2>
29153 <h2><!--foo--> <link href="./Category:A3" rel="mw:PageProp/Category" /> how goes it</h2>
29154 <h2>it goes well <link href="./Category:A4" rel="mw:PageProp/Category" /> <!--bar--></h2>
29156 <h2 data-parsoid='{}'>howdy<link href="./Category:A5" rel="mw:PageProp/Category" /></h2>
29158 <h2><meta property="mw:PageProp/toc" /> ok</h2>
29160 == hello there [[Category:A1]] ==
29162 == [[Category:A2]] hi pal ==
29164 == <!--foo--> [[Category:A3]] how goes it ==
29166 == it goes well [[Category:A4]] <!--bar--> ==
29168 ==howdy [[Category:A5]]==
29174 2. Headings: Force sol-transparent links and behavior switches to serialize before/after
29177 "modes": ["html2wt"],
29178 "scrubWikitext": true
29181 <h2>hello there<link href="./Category:A1" rel="mw:PageProp/Category" /></h2>
29182 <h2><link href="./Category:A2" rel="mw:PageProp/Category" />hi pal</h2>
29184 <h2><!--foo--> <link href="./Category:A3" rel="mw:PageProp/Category" /> how goes it</h2>
29185 <h2>it goes well <link href="./Category:A4" rel="mw:PageProp/Category" /> <!--bar--></h2>
29187 <h2><meta property="mw:PageProp/toc" /> ok</h2>
29195 <!--foo-->[[Category:A3]]
29200 [[Category:A4]] <!--bar-->
29208 Headings: Don't hoist metas that come from templates
29211 "modes": ["html2wt"],
29212 "scrubWikitext": true
29215 <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>
29217 == {{echo|foo [[Category:Foo]]}} ==
29221 Headings: Category in ref isn't hoisted
29224 "modes": ["html2wt"],
29225 "scrubWikitext": true
29228 <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>
29230 <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>
29233 [[Category:Baz]] </ref> ==
29239 Parsoid: Serialize positional parameters with = in them as named parameter
29243 <p about="#mwt1" typeof="mw:Transclusion"
29244 data-mw='{"parts":[{"template":{"target":{"wt":"echo","href":"./Template:Echo"},"params":{"1":{"wt":"f=oo"}},"i":0}}]}'>foo</p>
29246 <p about="#mwt1" typeof="mw:Transclusion"
29247 data-mw='{"parts":[{"template":{"target":{"wt":"echo","href":"./Template:Echo"},"params":{"1":{"wt":"f=oo"}, "2":{"wt":"bar"}},"i":0}}]}'>foo</p>
29249 <!--Orig params with data-parsoid has heuristics for handling = chars-->
29250 <!--FIXME: But maybe the heuristic needs fixing to apply to new params as well-->
29251 <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>
29255 {{echo|1=f=oo|2=bar}}
29257 <!--Orig params with data-parsoid has heuristics for handling = chars-->
29258 <!--FIXME: But maybe the heuristic needs fixing to apply to new params as well-->
29259 {{echo|<nowiki>f=oo</nowiki>|bar}}
29263 Parsoid: Serialize positional parameters with = in extlink as named parameter
29267 <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>
29269 {{echo|1=http://stuff?is=ok}}
29273 Parsoid: Correctly serialize block-node children when they are a combination of text and p-nodes
29277 <div>a<p>b</p></div>
29298 Substrings resembling wikitext in hrefs should not get nowiki escapes
29302 <a rel="mw:WikiLink" href="./Foo''bar''baz">Foo''bar''baz</a>
29308 Enforce single-line context in the serializer
29315 <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">
29316 </span><span about="#mwt1">you</span> </h2>
29318 <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>
29320 <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
29321 there</span></li></ol>
29333 ho </dt><dd data-parsoid='{"stx":"row"}'> hi
29340 </tbody></table></dd></dl>
29344 == hi {{bogus|there
29355 * foo '''bar''' baz
29367 Serialize new placeholder space without spans
29371 <p>foo<span typeof="mw:Placeholder"> </span>: bar</p>
29373 <p>foo<span typeof="mw:DisplaySpace mw:Placeholder" data-parsoid='{"src":" ","isDisplayHack":true}'> </span>: bar</p>
29375 <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>
29381 <ref>foo : bar</ref>ok
29385 #-----------------------
29386 # Tag minimization tests
29387 #-----------------------
29390 1. I/B quote minimization: wikitext-only tags should be combined
29394 <p><i>A</i><i>B</i></p>
29395 <p><b>A</b><b>B</b></p>
29396 <p><i>A</i><b><i>B</i></b></p>
29397 <p><b>A</b><i><b>B</b></i></p>
29398 <p><b>A</b><i><b>B</b><b>C</b></i><b>D</b></p>
29399 <p><i><b>A</b></i><i><b>B</b></i></p>
29400 <p><i><b>A</b></i><b><i>B</i></b></p>
29401 <p><b><i>A</i></b><i><b>B</b></i></p>
29421 2. I/B quote minimization: wikitext and html tags should not be combined
29425 <p><i>A</i><i data-parsoid='{"stx":"html"}'>B</i></p>
29426 <p><i>A</i><b><i data-parsoid='{"stx":"html"}'>B</i></b></p>
29430 ''A''<nowiki/>'''<i>B</i>'''
29434 3. I/B quote minimization: templated content stops minimization
29438 <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>
29439 <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>
29441 ''A''{{echo|''B''}}
29443 ''A''{{echo|'''''B'''''}}
29447 4. I/B quote minimization: new content should be mimimized with adjacent old content
29451 <p><i>A</i><i>B</i></p>
29452 <p><b>A</b><b>B</b></p>
29453 <p><i>A</i><b><i>B</i></b></p>
29463 5a. Merge adjacent quote nodes if they've been edited
29466 "modes": ["wt2wt", "selser"],
29468 ["p", "contents", "remove", ":contains('b')"]
29478 5b. Merge adjacent quote nodes if they've been edited
29481 "modes": ["wt2wt", "selser"],
29487 ''a''<span id="x">b</span>''c''
29493 1. Merge adjacent link nodes as long as at least one element is new
29496 "modes": ["html2wt"],
29497 "scrubWikitext": true
29500 <a rel="mw:WikiLink" href="./Football">Foot</a><a rel="mw:WikiLink" href="./Football">ball</a>
29501 <a data-parsoid="{}" rel="mw:WikiLink" href="./Football">Foot</a><a rel="mw:WikiLink" href="./Football">ball</a>
29502 <a data-parsoid="{}" rel="mw:WikiLink" href="./Football">Foot</a><a data-parsoid="{}" rel="mw:WikiLink" href="./Football">ball</a>
29506 [[Football|Foot]][[Football|ball]]
29510 2. Merge adjacent link nodes and enable additional normalizations
29513 "modes": ["html2wt"],
29514 "scrubWikitext": true
29517 <a rel="mw:WikiLink" href="./Football"><i>Foot</i></a><a rel="mw:WikiLink" href="./Football"><i>ball</i></a>
29523 3. Don't merge adjacent link nodes if scrubWikitext is false
29526 "modes": ["html2wt"],
29527 "scrubWikitext": false
29530 <a rel="mw:WikiLink" href="./Football">Foot</a><a rel="mw:WikiLink" href="./Football">ball</a>
29532 [[Football|Foot]][[Football|ball]]
29536 1. Move format tags outside of WikiLink
29539 "modes": ["html2wt"],
29540 "scrubWikitext": true
29543 <a rel="mw:WikiLink" href="./Football"><i>Football</i></a>
29544 <a rel="mw:WikiLink" href="./Football"><i><b>Football</b></i></a>
29545 <a rel="mw:WikiLink" href="./Football"><u><i><b>Football</b></i></u></a>
29548 '''''[[Football]]'''''
29549 <u>'''''[[Football]]'''''</u>
29553 2. Move format tags outside of WikiLink with mergable A tags
29556 "modes": ["html2wt"],
29557 "scrubWikitext": true
29560 <a rel="mw:WikiLink" href="./Football"><i><b>Foot</b></i></a><a rel="mw:WikiLink" href="./Football"><i><b>ball</b></i></a>
29562 '''''[[Football]]'''''
29566 3. Move format tags outside of WikiLink while preserving formats already outside WikiLink
29569 "modes": ["html2wt"],
29570 "scrubWikitext": true
29573 <font color="red"><a rel="mw:WikiLink" href="./Foo" title="Foo" class="mw-redirect"><u><b>Foo</b></u></a></font>
29575 <font color="red"><u>'''[[Foo]]'''</u></font>
29579 4. Do not move format tags outside of WikiLink which includes attributes color, style and class
29582 "modes": ["html2wt"],
29583 "scrubWikitext": true
29586 <a rel="mw:WikiLink" href="./Foo" title="Foo" class="mw-redirect"><font color="red">Foo</font></a>
29587 <a rel="mw:WikiLink" href="./Foo" title="Foo" class="mw-redirect"><span style="color: blue; font-size: 46px;">Foo></span></a>
29588 <a rel="mw:WikiLink" href="./Foo" title="Foo" class="mw-redirect"><span class="Bar">Foo</span></a>
29590 [[Foo|<font color="red">Foo</font>]]
29591 [[Foo|<span style="color: blue; font-size: 46px;">Foo></span>]]
29592 [[Foo|<span class="Bar">Foo</span>]]
29596 5. T194083 Regression test: Manual edit test that also enables scrubWikitext to move format tags outside wikilinks
29599 "modes": ["selser"],
29600 "scrubWikitext": true,
29602 ["a", "html", "<i>Foo</i>"]
29612 6. Regression test: Manual edit test to ensure diff markers are not lost
29615 "modes": ["selser"],
29616 "scrubWikitext": true,
29618 ["i", "wrap", "<a href='./Foo' rel='mw:WikiLink'></a>"]
29628 7. T194083 Regression test: Manual edit test to ensure nested diff markers aren't inserted
29631 "modes": ["selser"],
29632 "scrubWikitext": true,
29634 ["div", "after", "\n<p><a href='./Foo' rel='mw:WikiLink'>Foo </a>, placeholder</p>"]
29638 <div>placeholder</div>
29640 <div>placeholder</div>
29641 [[Foo]] , placeholder
29644 #------------------------------
29645 # End of tag minimization tests
29646 #------------------------------
29649 T56262: New entities
29653 <span typeof="mw:Entity"> </span>
29658 ## Note that there is no wikitext output for 'unknownproperty' ##
29659 ## Unknown magic words are silently dropped ##
29666 <meta property='mw:PageProp/toc' />
29667 <meta property='mw:PageProp/notoc' />
29668 <meta property='mw:PageProp/forcetoc' />
29669 <meta property='mw:PageProp/index' />
29670 <meta property='mw:PageProp/noindex' />
29671 <meta property='mw:PageProp/nogallery' />
29672 <meta property='mw:PageProp/noeditsection' />
29673 <meta property='mw:PageProp/notitleconvert' />
29674 <meta property='mw:PageProp/nocontentconvert' />
29675 <meta property='mw:PageProp/unknownproperty' />
29685 __NOCONTENTCONVERT__
29689 Consecutive <pre>s should not get merged
29691 parsoid=html2wt,html2html
29693 <pre>a</pre><pre>b</pre>
29721 Edited ISBN links not serializable as ISBN links should serialize as wikilinks
29725 <a href="./Special:BookSources/1234567890" rel="mw:ExtLink">ISBN 1234567895</a>
29727 [[Special:BookSources/1234567890|ISBN 1234567895]]
29731 Edited RFC links not serializable as RFC links should serialize as extlinks
29735 <a href="https://tools.ietf.org/html/rfc123" rel="mw:ExtLink">New RFC</a>
29737 [https://tools.ietf.org/html/rfc123 New RFC]
29741 Edited PMID links not serializable as PMID links should serialize as extlinks
29745 <a href="//www.ncbi.nlm.nih.gov/pubmed/123?dopt=Abstract" rel="mw:ExtLink">New PMID</a>
29747 [//www.ncbi.nlm.nih.gov/pubmed/123?dopt=Abstract New PMID]
29751 WTS of autolinks with trailing/surrounding context
29755 <p><a href="http://cscott.net">http://cscott.net</a><b>foo</b></p>
29756 <p><a href="http://cscott.net">http://cscott.net</a><b data-parsoid='{"stx":"html"}'>foo</b></p>
29757 <p><b><a href="http://cscott.net">http://cscott.net</a></b></p>
29758 <p><b><a href="http://cscott.net">http://cscott.net</a> </b></p>
29759 <p><b><a href="http://cscott.net">http://cscott.net</a>x</b></p>
29760 <p><a href="http://cscott.net">http://cscott.net</a>x</p>
29762 http://cscott.net'''foo'''
29764 http://cscott.net<b>foo</b>
29766 '''http://cscott.net'''
29768 '''http://cscott.net '''
29770 '''http://cscott.net<nowiki/>x'''
29772 http://cscott.net<nowiki/>x
29776 WTS of autolinks with nowikis (round-trip)
29778 x<nowiki/>http://cscott.net<nowiki/>x
29780 <p>x<a rel="mw:ExtLink" class="external free" href="http://cscott.net">http://cscott.net</a>x</p>
29783 # this is the "easy" test because it leaves in place all the
29784 # data-parsoid information indicating this is an autolink
29786 WTS of autolinks with escapes (editing)
29789 "modes": ["wt2wt"],
29791 [ "span", "remove" ]
29795 x<nowiki/>http://cscott.net<nowiki/>x
29797 x<nowiki/>http://cscott.net<nowiki/>x
29801 WTS of edited autolink-like text (T103364)
29804 "modes": ["wt2wt"],
29806 [ "span[typeof]", "removeAttr", "typeof" ]
29810 Not a link: <nowiki>http://example.com</nowiki>.
29812 Not a link: <span><nowiki>http://example.com</nowiki></span>.
29816 WTS of newly-authored autolink-like text (T103364)
29820 <p>http://example.com is not a link.</p>
29822 <nowiki>http://example.com</nowiki> is not a link.
29826 WTS of autolink-like text after an autolink (T108563)
29830 <p><a rel="mw:ExtLink" href="http://example.com">http://example.com</a> http://example.com is not a link.</p>
29832 http://example.com <nowiki>http://example.com</nowiki> is not a link.
29836 Magic links inside links (not autolinked)
29838 [[Foo|http://example.com]]
29841 [[Foo|ISBN 123456789x]]
29843 [http://foo.com http://example.com]
29844 [http://foo.com RFC 1234]
29845 [http://foo.com PMID 1234]
29846 [http://foo.com ISBN 123456789x]
29848 <p><a href="/wiki/Foo" title="Foo">http://example.com</a>
29849 <a href="/wiki/Foo" title="Foo">RFC 1234</a>
29850 <a href="/wiki/Foo" title="Foo">PMID 1234</a>
29851 <a href="/wiki/Foo" title="Foo">ISBN 123456789x</a>
29852 </p><p><a rel="nofollow" class="external text" href="http://foo.com">http://example.com</a>
29853 <a rel="nofollow" class="external text" href="http://foo.com">RFC 1234</a>
29854 <a rel="nofollow" class="external text" href="http://foo.com">PMID 1234</a>
29855 <a rel="nofollow" class="external text" href="http://foo.com">ISBN 123456789x</a>
29858 <p><a rel="mw:WikiLink" href="./Foo" title="Foo">http://example.com</a>
29859 <a rel="mw:WikiLink" href="./Foo" title="Foo">RFC 1234</a>
29860 <a rel="mw:WikiLink" href="./Foo" title="Foo">PMID 1234</a>
29861 <a rel="mw:WikiLink" href="./Foo" title="Foo">ISBN 123456789x</a></p>
29863 <p><a rel="mw:ExtLink" class="external text" href="http://foo.com">http://example.com</a>
29864 <a rel="mw:ExtLink" class="external text" href="http://foo.com">RFC 1234</a>
29865 <a rel="mw:ExtLink" class="external text" href="http://foo.com">PMID 1234</a>
29866 <a rel="mw:ExtLink" class="external text" href="http://foo.com">ISBN 123456789x</a></p>
29870 Magic links inside image captions (autolinked)
29872 [[File:Foobar.jpg|thumb|http://example.com]]
29873 [[File:Foobar.jpg|thumb|RFC 1234]]
29874 [[File:Foobar.jpg|thumb|PMID 1234]]
29875 [[File:Foobar.jpg|thumb|ISBN 123456789x]]
29877 <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>
29878 <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>
29879 <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>
29880 <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>
29882 <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>
29883 <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>
29884 <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>
29885 <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>
29889 WTS of magic word text (T109371)
29894 <p><a href="http://foo.com" rel="mw:ExtLink">RFC 1234</a></p>
29895 <p><a href="./Foo" rel="mw:WikiLink">RFC 1234</a></p>
29897 <nowiki>RFC 1234</nowiki>
29899 [http://foo.com RFC 1234]
29905 Edited Redirect link should emit a non-piped wikitext link
29909 <link rel="mw:PageProp/redirect" href="Bar" data-parsoid='{"a":{"href":"./Foo"},"sa":{"href":"Foo"}}'>
29915 T75121: Infer extension name from typeOf if data-mw is not present
29917 parsoid={ "modes": ["html2wt"], "suppressErrors": true }
29919 <div typeOf="mw:Extension/foo"></div>
29924 # Note that the <p> wrapping isn't present in PHP parser output
29925 # The important thing for this test is that P-wrapping doesn't
29926 # interfere with the <nowiki> protection for leading - in <td>
29927 # (which isn't necessary for <th>).
29929 T88318: p-wrapped dash in table.
29931 parsoid=html2wt,wt2wt
29934 <tr><th><p>-</p></th><th><p>- </p></th></tr>
29935 <tr><td><p>-</p></td><td><p>- </p></td></tr>
29936 <tr><td><small>-</small></td><td><br/><p>-</p></td><td><br/>-</td></tr>
29943 |<nowiki>-</nowiki>
29944 |<nowiki>- </nowiki>
29964 <td><small>-</small>
29971 </td></tr></tbody></table>
29975 T149209: WTS: Handle newlines in table cells properly
29983 </td><td data-parsoid='{"stx":"row"}'>c</td></tr>
29985 </td><td data-parsoid='{"stx":"row", "startTagSrc": "{{!}}{{!}}"}'>y</td></tr>
29991 </th><th data-parsoid='{"stx":"row"}'>c</th></tr>
29993 </th><th data-parsoid='{"stx":"row"}'>y</th></tr>
30015 T149209: Selser: Handle newlines in table cells properly
30018 "modes": ["selser"],
30020 [ "#h1", "html", "a\nb\n" ],
30021 [ "#h2", "html", "a\nb\n" ],
30022 [ "#c1", "html", "a\nb\n" ],
30023 [ "#c2", "html", "<p>a</p>" ],
30024 [ "#c3", "html", "<p>a</p>" ],
30025 [ "#c4", "html", "edit-me<p>a</p>" ]
30030 ! id="h1" |edit-me!!1
30032 ! id="h2" |edit-me||2
30034 | id="c1" |edit-me||3
30036 | id="c2" |edit-me||4
30038 | id="c3" |edit-me||p||q||r
30040 | id="c4" |edit-me||p||q||r
30069 HTML id attribute with Parsoid-like element ids should not be serialized to wikitext
30074 <td id='mwAc'>foo</td>
30075 <td id='serialize-this'>bar</td>
30080 | id="serialize-this" |bar
30085 Parsoid-like element ids should not be serialized to wikitext unless shadowed
30089 <div id="mwAQ" data-parsoid='{"stx":"html","a":{"id":"mwAQ"},"sa":{"id":"hello"}}'>ok</div>
30091 <div id="hello">ok</div>
30095 Testing serialization after deletion in references
30098 "modes": ["wt2wt"],
30104 hi <ref><div id="x">ho</div></ref>
30114 Testing serialization after deletion of table cells
30117 "modes": ["wt2wt", "selser"],
30125 | id="x" |c1 {{!}}{{!}}{{!}}c2 |||c3
30135 Testing selser after addition of new row before first row (T125419)
30138 "modes": ["wt2wt", "selser"],
30140 [ "tr", "before", "<tr><td>X</td></tr>" ]
30156 Serialize new table rows in a HTML table using HTML tags
30159 "modes": ["wt2wt", "selser"],
30161 [ "tr", "before", "<tr><td>X</td></tr>" ]
30165 <table><tr><td>a</td></tr></table>
30167 <table><tr><td>X</td></tr><tr><td>a</td></tr></table>
30171 Serialize new table cells in a HTML row using HTML tags
30174 "modes": ["wt2wt", "selser"],
30176 [ "td", "before", "<td>X</td>" ]
30180 <table><tr><td>a</td></tr></table>
30182 <table><tr><td>X</td><td>a</td></tr></table>
30186 Serialize wikitext list items as HTML list items when embedded in a HTML list
30190 <ul data-parsoid='{"stx": "html"}'>
30191 <li data-parsoid='{}'>a</li>
30206 # Nested list should be inside <li>, that is
30207 # <ul><li>foo<ul>..</ul></li></ul> instead of
30208 # <ul><li>foo</li><ul>..</ul></ul>
30209 # See https://stackoverflow.com/questions/5899337/proper-way-to-make-html-nested-list
30211 Wikitext lists can be nested inside HTML lists
30215 <ul data-parsoid='{"stx": "html"}'>
30216 <li data-parsoid='{"stx": "html"}'>a
30217 <ul><li>b</li></ul>
30221 <ul data-parsoid='{"stx": "html"}'>
30223 <ul><li>y</li></ul>
30241 <ul><li>b</li></ul>
30246 <ul><li>y</li></ul>
30255 "modes": ["wt2wt"],
30257 [ "#xyz", "before", "<b>before</b> stuff " ],
30258 [ "#xyz", "after", " stuff <i>after</i>" ],
30259 [ "#xyz", "html", "x <b>y</b> z" ]
30263 <span id="xyz">hello</span>
30265 '''before''' stuff <span id="xyz">x '''y''' z</span> stuff ''after''
30269 Never serialize a-tag as html, regardless of what data-parsoid has to say
30271 parsoid={ "modes": ["html2wt"], "suppressErrors": true }
30273 <a rel="mw:WikiLink" href="./Foo" title="Foo" data-parsoid='{"stx":"html"}'>Foo</a>
30278 ## SSS FIXME: This is broken output nevertheless.
30279 ## What might be a reasonable non-broken output for this?
30280 ## This is an edge case unlikely to be seen in production
30281 ## that I am not wasting more time on this right now.
30283 Never serialize a-tag as html, no matter what attributes it has
30285 parsoid={ "modes": ["html2wt"], "suppressErrors": true }
30287 <a bad='true' href='http://boo.org'><img src='http://boohoo.org' /></a>
30289 [http://boo.org http://boohoo.org]
30292 # Misnested is an indication that selser can reuse the source but these have
30293 # shown to sneak through on occasion. See T101768.
30294 # The original wikitext here is: [http://test.com [[one]] two three]
30296 Strip span tags added to mark misnested links
30300 <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>
30302 [http://test.com][[one]] two three
30306 Catch regression when unpacking misnested links
30310 {{echo|hi}}[http://example.com [[ho]]]
30312 <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>
30316 Catch regression when unpacking with trailing content
30318 {{echo|Foo <references/> bar}}
30320 <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>
30324 Use data-parsoid.firstWikitextNode to compute newline constraints for template content
30328 <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|}"]}'>
30340 ## This test verifies the presence and computation of this attribute indirectly
30341 ## by making an edit and ensuring that the serialization is correct (which it would be
30342 ## only if firstWikitextNode is properly set).
30344 data-parsoid.firstWikitextNode should be computed properly in the presence of fostered content
30347 "modes": ["wt2wt"],
30349 [ "div#x", "remove" ],
30350 [ "div", "before", "<div>new</div>" ]
30354 <div id="x">foo</div>
30356 {{echo|<div>boo</div>
30364 {{echo|<div>boo</div>
30370 # --------------------------------------------
30371 # Tests spec'ing wikitext serialization norms |
30372 # --------------------------------------------
30375 Serialize multi-line indent-pre starting with wikitext syntax
30389 1. Categories should always be serialized on their own line
30393 foo<link rel="mw:PageProp/Category" href="./Category:Foo">bar
30401 2. Categories that are part of templates should not introduce a line break
30403 foo {{echo|<span>bar</span> [[Category:baz]]}} bar
30405 <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>
30408 # Careful while editing these next 2 tests. There are \u200f characters
30409 # before and after the <link> tags in the HTML and following some
30410 # of the categories in wikitext
30411 # Do not remove these characters in edits.
30413 # As part of the serialization, these bidi characters will get stripped.
30415 RTL (\u200f) and LTR (\u200e) markers around category tags should be stripped
30418 "modes": ["html2wt"],
30419 "scrubWikitext": true
30422 <p><link rel="mw:PageProp/Category" href="./קטגוריה:טקסים" />
30423 <link rel="mw:PageProp/Category" href="./קטגוריה:_שיטות_משפט" /></p>
30426 [[קטגוריה: שיטות משפט]]
30430 RTL (\u200f) and LTR (\u200e) markers should not be stripped if followed by a text node
30433 "modes": ["html2wt"],
30434 "scrubWikitext": true
30437 <p><link rel="mw:PageProp/Category" href="./קטגוריה:טקסים" />y</p>
30444 Lists: Add space after bullets
30451 <li><span> baz</span></li>
30456 * <span> baz</span>
30460 1. Headings: Add space before/after == (T53744)
30467 <h2><span> baz</span></h2>
30475 == <span> baz</span> ==
30479 2. Headings: Add space before/after == even after hoisted content
30482 "modes": ["html2wt"],
30483 "scrubWikitext": true
30486 <h2> <link href="./Category:A2" rel="mw:PageProp/Category" />ok</h2>
30494 1. Headings: suppress newly created empty headings
30497 "modes": ["html2wt"],
30498 "scrubWikitext": true
30506 2. Headings: don't suppress empty headings if scrubWikitext is false
30516 3. Headings: suppress empty headings on edits
30519 "modes": ["selser"],
30520 "scrubWikitext": true,
30526 ==<span id="x">foo</span>==
30531 Headings: Replace <br/> with a single whitespace char (when scrubWikitext = true)
30534 "modes": ["html2wt"],
30535 "scrubWikitext": true
30538 <h2>foo<br/>bar</h2>
30539 <h2>foo <span><br/>bar</span> baz</h2>
30543 == foo <span> bar</span> baz ==
30547 Headings: Replace <br/> with a single whitespace char (when scrubWikitext = false)
30550 "modes": ["html2wt"],
30551 "scrubWikitext": false
30554 <h2>foo<br/>bar</h2>
30560 1. WT Quote Tags: suppress newly created empty style tags
30563 "modes": ["html2wt"],
30564 "scrubWikitext": true
30572 2. WT Quote Tags: don't suppress empty style tags if scrubWikitext is false
30578 ''<nowiki/>'''''<nowiki/>'''
30582 3. WT Quote Tags: suppress empty style tags on edits
30585 "modes": ["selser"],
30586 "scrubWikitext": true,
30592 '''<span id="x">foo</span>'''
30597 1. Anchors: suppress newly created empty anchors
30600 "modes": ["html2wt"],
30601 "scrubWikitext": true
30604 <a rel="mw:WikiLink" href="./Test" title="Test"></a>
30609 2. Anchors: don't suppress empty anchors if scrubWikitext is false
30612 "modes": ["html2wt"],
30613 "scrubWikitext": false
30616 <a rel="mw:WikiLink" href="./Test" title="Test"></a>
30622 3. Anchors: suppress empty anchors on edits
30625 "modes": ["selser"],
30626 "scrubWikitext": true,
30632 [[Test|<span id="x">foo</span>]]
30637 3a. Anchors: do not suppress numbered extlinks
30640 "modes": ["wt2wt"],
30641 "scrubWikitext": true
30646 <a rel="mw:ExtLink" href="http://foo.com"></a>
30650 3b. Anchors: do not suppress numbered extlinks
30653 "modes": ["wt2wt"],
30654 "scrubWikitext": true,
30660 [http://foo.com <span id="x">foo</span>]
30666 Normalizations should be restricted to edited content
30669 "modes": ["selser"],
30670 "scrubWikitext": true,
30672 [ "h1", "before", "<i></i>"]
30686 1. Multiple normalizations (html2wt)
30689 "modes": ["html2wt"],
30690 "scrubWikitext": true
30694 <p><a href='Foo' rel='mw:WikiLink'>foo<i></i>
30695 </a><b><i></i></b>x</p>
30704 2. Multiple normalizations (selser)
30707 "modes": ["selser"],
30708 "scrubWikitext": true,
30710 [ "#x", "after", "<h1><i></i></h1>\n<p> bar<b></b></p>"]
30714 <div id="x">foo</div>
30716 <div id="x">foo</div>
30721 1. Indent Pre Nowiki: suppress whitespace at the start of new paragraph
30724 "modes": ["html2wt"],
30725 "scrubWikitext": true
30737 2. Indent Pre Nowiki: don't suppress whitespace at the start of new paragraph if scrubWikitext is false
30744 <nowiki> </nowiki>hi
30746 <nowiki> </nowiki> hello
30750 3. Indent Pre Nowiki: suppress whitespace after newlines in new paragraph or table cell
30753 "modes": ["html2wt"],
30754 "scrubWikitext": true
30763 baz bang</td></tr></table>
30769 bar<span>boo</span></p>
30785 bar<span>boo</span>
30789 4. Indent Pre Nowiki: suppress leading whitespace in edited paragraphs
30792 "modes": ["selser"],
30793 "scrubWikitext": true,
30795 [ "p", "html", " a\n b" ]
30806 1. New links that end in spaces
30809 "modes": ["html2wt"],
30810 "scrubWikitext": false
30813 <p><a rel="mw:WikiLink" href="./Berlin" title="Berlin">Berlin </a>is the capital of Germany.</p>
30814 <p><a rel="mw:WikiLink" href="./Foo" title="Foo">Foo </a><b>bar</b></p>
30815 <p><a rel="mw:WikiLink" href="./Boston" title="Boston">Boston </a> is a city.</p>
30817 [[Berlin ]]<nowiki/>is the capital of Germany.
30821 [[Boston ]] is a city.
30825 2. New links that end in spaces
30828 "modes": ["html2wt"],
30829 "scrubWikitext": true
30832 <p><a rel="mw:WikiLink" href="./Berlin" title="Berlin">Berlin </a>is the capital of Germany.</p>
30833 <p><a rel="mw:WikiLink" href="./Foo" title="Foo">Foo </a><b>bar</b></p>
30834 <p><a rel="mw:WikiLink" href="./Boston" title="Boston">Boston </a> is a city.</p>
30836 [[Berlin]] is the capital of Germany.
30840 [[Boston]] is a city.
30844 1. Table cells with escapable prefixes
30847 "modes": ["html2wt"],
30848 "scrubWikitext": false
30852 <tr><td>a</td></tr>
30853 <tr><td>-</td></tr>
30854 <tr><td>+</td></tr>
30855 <tr><td>}</td></tr>
30861 |<nowiki>-</nowiki>
30863 |<nowiki>+</nowiki>
30865 |<nowiki>}</nowiki>
30870 2. Table cells with escapable prefixes
30873 "modes": ["html2wt"],
30874 "scrubWikitext": true
30878 <tr><td>a</td></tr>
30879 <tr><td>-</td></tr>
30880 <tr><td>+</td></tr>
30881 <tr><td>}</td></tr>
30896 3a. Table cells with escapable prefixes after edits
30899 "modes": ["selser"],
30900 "scrubWikitext": true,
30902 [ "table tbody tr:first-child td:first-child", "remove"]
30916 3b. Table cells with escapable prefixes after edits
30919 "modes": ["selser"],
30920 "scrubWikitext": true,
30922 [ "table tbody tr:first-child td:first-child", "html", "-" ],
30929 |<span id="x">foo</span>+
30938 # FIXME: This test will fail because
30939 # normalization doesn't realize that the id attribute
30940 # will eliminate the escapable scenario
30942 4a. Table cells without escapable prefixes after edits
30945 "modes": ["selser"],
30946 "scrubWikitext": true,
30948 [ "#x", "html", "-" ]
30961 ## This tests normalizer's ability to discriminate between
30962 ## cells having identical content.
30964 4b. Table cells without escapable prefixes after edits
30967 "modes": ["selser"],
30968 "scrubWikitext": true,
30970 [ "td", "html", "-" ]
30983 ## This tests normalizer's ability to not be tripped by
30984 ## comments (and whitespace)
30986 4c. Table cells without escapable prefixes after edits
30989 "modes": ["selser"],
30990 "scrubWikitext": true,
30992 [ "table tbody tr td:first-child", "remove" ]
31007 ## This tests normalizer's ability to handle HTML cells
31009 4d. Table cells without escapable prefixes after edits
31012 "modes": ["selser"],
31013 "scrubWikitext": true,
31015 [ "td", "html", "-" ]
31020 <tr><td>a</td></tr>
31024 <tr><td>-</td></tr>
31028 ## T111151 Remove font elements without attributes
31030 5a. font tags without attributes should be dropped in scrubWikitext mode
31033 "modes": ["html2wt"],
31034 "scrubWikitext": true
31038 <font><font>bar</font></font>
31039 <font class="x">boo</font>
31043 <font class="x">boo</font>
31047 5b. font tags should not be dropped without scrubWikitext being enabled
31050 "modes": ["html2wt"],
31051 "scrubWikitext": false
31060 Ignore empty <p></p> when scrubWikitext is false
31063 "modes": ["html2wt"],
31064 "scrubWikitext": false
31068 <p>a</p><p></p><p>b</p>
31109 Normalize empty paragraphs to HTML form that html2wt expects
31112 "modes": ["html2wt"],
31113 "scrubWikitext": true
31117 <p>a</p><p></p><p>b</p>
31182 Empty paragraphs (marked with mw-empty-elt) found in source should not be normalized away
31185 "modes": ["html2wt"],
31186 "scrubWikitext": true
31194 <p class="mw-empty-elt"></p>
31198 <caption></caption>
31209 Templated content should be skipped over by normalization
31212 "modes": ["html2wt"],
31213 "scrubWikitext": true
31216 <p about="#mwt1" typeof="mw:Transclusion" data-mw='{"parts":[{"template":{"target":{"wt":"SomeTemplate1","href":"./Template:SomeTemplate1"},"params":{"1":{"wt":"boo"}},"i":0}}]}'>foobar</p><p about="#mwt2" typeof="mw:Transclusion" data-mw='{"parts":[{"template":{"target":{"wt":"SomeTemplate2","href":"./Template:SomeTemplate2"},"params":{"1":{"wt":"booboo"}},"i":0}}]}'>foobar</p><span about="#mwt2">
31217 </span><p about="#mwt2"></p><span about="#mwt2">
31220 {{SomeTemplate1|boo}}{{SomeTemplate2|booboo}}
31224 Escape nowiki DOM elements
31228 <nowiki><i>foo</i></nowiki>
31230 <nowiki>''foo''</nowiki>
31233 # This is meant to be an interim fix while we go about figuring out
31234 # how to not introduce these trailing <nowiki/>s in the first place.
31236 T115717: Strip trailing <nowiki/>s (without affecting valid uses)
31240 <p>x<meta typeof="mw:Placeholder" data-parsoid='{"src":"<nowiki/>"}'/><meta typeof="mw:Placeholder" data-parsoid='{"src":"<nowiki/>"}'/>
31242 <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>
31243 <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>
31257 New list is serialized on newlines
31261 <p>The quick brown fox jumps over the lazy dog.</p><ul>
31265 </ul><p>The quick onyx goblin jumps over the lazy dwarf.</p>
31267 The quick brown fox jumps over the lazy dog.
31273 The quick onyx goblin jumps over the lazy dwarf.
31277 New lists in formatting elements serialized w/o newlines
31289 <small><ul><li>hi</li></ul></small>
31301 New list in table doesn't need newlines
31305 <table><tr><td><ul><li>test</li><li>123</li></td></tr></table>
31314 # ---------------------------------------------------
31315 # End of tests spec'ing wikitext serialization norms |
31316 # ---------------------------------------------------
31320 Bare inline nodes not wrapped inside p-tags should be treated as p-wrapped
31328 <td><b>c</b><p>d</p></td>
31347 Anchor without href scenarios
31349 parsoid={ "modes": ["html2wt"], "suppressErrors": true }
31352 <a class="no">dice</a>
31357 <span name="foo"></span>
31361 New transclusion added after a list should be serialized after the list
31365 <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>
31371 # -----------------------------------------------------------------
31372 # End of section for Parsoid-only html2wt tests for serialization
31374 # -----------------------------------------------------------------
31376 # -----------------------------------------------------------------
31377 # The following section of tests are primarily to spec behavior of
31378 # the selective serializer. All these tests have manual selser
31379 # changes. The automated selser changes for all tests handle the
31380 # wide variation of changes, but these tests here capture specs
31381 # deterministically.
31382 # ----------------------------------------------------------------
31386 Selser: New comments should not be lost
31389 "modes": ["selser"],
31391 [ "#a", "after", "<!--c1-->" ],
31392 [ "#b", "before", "<!--c2-->" ]
31396 <span id="a">a</span>
31398 <span id="b">b</span>
31400 <span id="a">a</span><!--c1-->
31402 <!--c2--><span id="b">b</span>
31407 Selser: Check for validity of DSR before using it
31410 "modes": ["selser"],
31412 [ "#a", "before", "<meta property='mw:PageProp/displaytitle' content='foo'>" ]
31416 <span id="a">a</span>
31418 {{DISPLAYTITLE:foo}}
31419 <span id="a">a</span>
31423 1. DOMDiff: Changes to <ref> content should be looked up using id
31426 "modes": ["selser"],
31428 ["#X", "after", "bar"],
31429 ["#Y", "after", "baz"]
31433 X <ref><span id="X">foo</span></ref>
31436 <ref name="a"><span id="Y">foo</span></ref>
31439 X <ref><span id="X">foo</span>bar</ref>
31442 <ref name="a"><span id="Y">foo</span>baz</ref>
31447 2. DOMDiff: Changes to <ref> content should be looked up using id
31450 "modes": ["selser"],
31452 ["#Z", "after", "bar"]
31456 A <ref>foo bar for a</ref>
31457 B <ref group="X" name="b" />
31461 <references group="X">
31462 <ref name="b"><span id="Z">foo</span></ref>
31465 A <ref>foo bar for a</ref>
31466 B <ref group="X" name="b" />
31470 <references group="X">
31471 <ref name="b"><span id="Z">foo</span>bar</ref>
31476 DOMDiff: Edits to content nested in elements with templated attributes should not be lost (T139388)
31479 "modes": ["selser"],
31481 [ "div:first-child", "text", "bar" ]
31485 <div style="{{1x|color:red;}}%">foo</div>
31487 <div style="{{1x|color:red;}}%">bar</div>
31499 <li class="mw-empty-elt"></li>
31500 <li class="mw-empty-elt"></li>
31507 [[File:Thumb.png|thumb]]
31509 <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>
31511 <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>
31515 unclosed internal link XSS (T137264)
31517 [[#%3Cscript%3Ealert(1)%3C/script%3E|
31519 <p>[[#<script>alert(1)</script>|
31522 <p>[[#%3Cscript%3Ealert(1)%3C/script%3E|</p>
31526 Validating that <style> isn't eaten by tidy (T167349)
31531 <style>.foo::before { content: "<foo>"; }</style>
31532 <style data-mw-foobar="baz">.foo::after { content: "<bar>"; }</style>
31536 <style>.foo::before { content: "<foo>"; }</style>
31537 <style data-mw-foobar="baz">.foo::after { content: "<bar>"; }</style>
31541 <style typeof="mw:Extension/style" data-mw='{"name":"style","attrs":{},"body":{"extsrc":".foo::before { content: \"<foo>\"; }"}}'>.foo::before { content: "<foo>"; }</style>
31542 <style data-x-data-mw-foobar="baz" typeof="mw:Extension/style" data-mw='{"name":"style","attrs":{"data-x-data-mw-foobar":"baz"},"body":{"extsrc":".foo::after { content: \"<bar>\"; }"}}'>.foo::after { content: "<bar>"; }</style>
31546 ## Right now, Parsoid doesn't de-duplicate style tags.
31547 ## So, we shouldn't see link tags that need to bypass the sanitizer.
31548 ## In a followup patch, when we de-duplicate style tags and
31549 ## introduce link tags, we'll add a hook for link tags in
31550 ## the parser test runner script.
31552 Validating that <style> isn't wrapped in a paragraph (T186965)
31556 A style tag, by itself or with other style/link tags, shouldn't be wrapped in a paragraph
31558 <style>.foo::before { content: "<foo>"; }</style>
31560 <style>.foo::before { content: "<foo>"; }</style> <link rel="foo" href="bar"/><style>.foo::before { content: "<foo>"; }</style>
31562 But if it's on a line with other content, let it be wrapped.
31564 <style>.foo::before { content: "<foo>"; }</style> bar
31566 foo <style>.foo::before { content: "<foo>"; }</style>
31568 foo <style>.foo::before { content: "<foo>"; }</style> bar
31570 And the same if we have non-paragraph-breaking whitespace
31573 <style>.foo::before { content: "<foo>"; }</style>
31576 <p>A style tag, by itself or with other style/link tags, shouldn't be wrapped in a paragraph
31578 <style>.foo::before { content: "<foo>"; }</style>
31579 <style>.foo::before { content: "<foo>"; }</style> <link rel="foo" href="bar"/><style>.foo::before { content: "<foo>"; }</style>
31580 <p>But if it's on a line with other content, let it be wrapped.
31581 </p><p><style>.foo::before { content: "<foo>"; }</style> bar
31582 </p><p>foo <style>.foo::before { content: "<foo>"; }</style>
31583 </p><p>foo <style>.foo::before { content: "<foo>"; }</style> bar
31584 </p><p>And the same if we have non-paragraph-breaking whitespace
31586 <style>.foo::before { content: "<foo>"; }</style>
31590 <p>A style tag, by itself or with other style/link tags, shouldn't be wrapped in a paragraph</p>
31592 <style typeof="mw:Extension/style" data-mw='{"name":"style","attrs":{},"body":{"extsrc":".foo::before { content: \"<foo>\"; }"}}'>.foo::before { content: "<foo>"; }</style>
31594 <p><style typeof="mw:Extension/style" data-mw='{"name":"style","attrs":{},"body":{"extsrc":".foo::before { content: \"<foo>\"; }"}}'>.foo::before { content: "<foo>"; }</style> <link rel="foo" href="bar"/><style typeof="mw:Extension/style" data-mw='{"name":"style","attrs":{},"body":{"extsrc":".foo::before { content: \"<foo>\"; }"}}'>.foo::before { content: "<foo>"; }</style></p>
31596 <p>But if it's on a line with other content, let it be wrapped.</p>
31598 <p><style typeof="mw:Extension/style" data-mw='{"name":"style","attrs":{},"body":{"extsrc":".foo::before { content: \"<foo>\"; }"}}'>.foo::before { content: "<foo>"; }</style> bar</p>
31600 <p>foo <style typeof="mw:Extension/style" data-mw='{"name":"style","attrs":{},"body":{"extsrc":".foo::before { content: \"<foo>\"; }"}}'>.foo::before { content: "<foo>"; }</style></p>
31602 <p>foo <style typeof="mw:Extension/style" data-mw='{"name":"style","attrs":{},"body":{"extsrc":".foo::before { content: \"<foo>\"; }"}}'>.foo::before { content: "<foo>"; }</style> bar</p>
31604 <p>And the same if we have non-paragraph-breaking whitespace</p>
31607 <style typeof="mw:Extension/style" data-mw='{"name":"style","attrs":{},"body":{"extsrc":".foo::before { content: \"<foo>\"; }"}}'>.foo::before { content: "<foo>"; }</style>
31612 Validating that <link> isn't wrapped in a paragraph (T186965)
31616 A link tag, by itself or with other style/link tags, shouldn't be wrapped in a paragraph
31618 <link rel="foo" href="bar"/>
31620 <link rel="foo" href="bar"/> <style>.foo::before { content: "<foo>"; }</style><link rel="foo" href="bar"/>
31622 But if it's on a line with other content, let it be wrapped.
31624 <link rel="foo" href="bar"/> bar
31626 foo <link rel="foo" href="bar"/>
31628 foo <link rel="foo" href="bar"/> bar
31630 And the same if we have non-paragraph-breaking whitespace
31633 <link rel="foo" href="bar"/>
31636 <p>A link tag, by itself or with other style/link tags, shouldn't be wrapped in a paragraph
31638 <link rel="foo" href="bar"/>
31639 <link rel="foo" href="bar"/> <style>.foo::before { content: "<foo>"; }</style><link rel="foo" href="bar"/>
31640 <p>But if it's on a line with other content, let it be wrapped.
31641 </p><p><link rel="foo" href="bar"/> bar
31642 </p><p>foo <link rel="foo" href="bar"/>
31643 </p><p>foo <link rel="foo" href="bar"/> bar
31644 </p><p>And the same if we have non-paragraph-breaking whitespace
31646 <link rel="foo" href="bar"/>
31652 Extension returning multiple nodes starting with a style tag roundtrips
31657 {{echo|<html><style>.hi { color: red; }</style>
31659 <tr><td class="hi">ho</td></tr>
31662 <p about="#mwt5" typeof="mw:Transclusion" data-parsoid='{"fostered":true,"autoInsertedEnd":true,"autoInsertedStart":true,"firstWikitextNode":"TABLE_html","pi":[[{"k":"1"}]]}' data-mw='{"parts":["<table>\n",{"template":{"target":{"wt":"echo","href":"./Template:Echo"},"params":{"1":{"wt":"<html><style>.hi { color: red; }</style>\n</html>"}},"i":0}},"\n<tr><td class=\"hi\">ho</td></tr>\n</table>"]}'><style typeof="mw:Extension/html" about="#mwt4" data-mw='{"name":"html","attrs":{},"body":{"extsrc":"<style>.hi { color: red; }</style>\n"}}'>.hi { color: red; }</style><span about="#mwt4">
31663 </span></p><table about="#mwt5" data-parsoid='{"stx":"html"}'>
31665 <tbody><tr><td class="hi">ho</td></tr>
31670 Decoding of HTML entities in headings and links for IDs and link fragments (T103714)
31672 wgFragmentMode=[ 'html5', 'legacy' ]
31674 ==A&B&C&amp;D&amp;amp;E==
31675 [[#A&B&C&amp;D&amp;amp;E]]
31677 <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>
31678 <p><a href="#A&B&C&amp;D&amp;amp;E">#A&B&C&amp;D&amp;amp;E</a>
31681 <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>
31682 <p><a rel="mw:WikiLink" href="./Parser_test#A&B&C&amp;D&amp;amp;E" data-parsoid='{"stx":"simple","a":{"href":"./Parser_test#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>
31686 Decoding of HTML entities in headings and links for IDs and link fragments (T103714) (legacy)
31688 wgFragmentMode=[ 'legacy' ]
31690 ==A&B&C&amp;D&amp;amp;E==
31691 [[#A&B&C&amp;D&amp;amp;E]]
31693 <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>
31694 <p><a href="#A.26B.26C.26amp.3BD.26amp.3Bamp.3BE">#A&B&C&amp;D&amp;amp;E</a>
31699 Decoding of HTML entities in embedded HTML tags
31701 <table class="1&2&3&amp;4&amp;amp;5"><tr><td>x</td></tr></table>
31703 <table class="1&2&3&amp;4&amp;amp;5"><tr><td>x</td></tr></table>
31706 <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>
31710 Decoding of HTML entities in indicator names for IDs (T104196)
31712 parsoid=wt2html,html2html
31715 <indicator name="1&2&3&amp;4&amp;amp;5">Indicator</indicator>
31717 1&2&3&4&amp;5=Indicator
31720 <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>
31723 # this version of the test strips out the ambiguity so Parsoid rts cleanly
31725 Decoding of HTML entities in indicator names for IDs (unambiguous) (T104196)
31729 <indicator name="1&2&3&amp;4&amp;amp;5">Indicator</indicator>
31731 1&2&3&4&amp;5=Indicator
31734 <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>
31737 # This fragment mode is what Parsoid supports.
31739 HTML5 ids: fallback to legacy
31741 wgFragmentMode=[ 'html5', 'legacy' ]
31753 ==Hey < # " > % : '==
31754 [[#Foo bar]] [[#foo Bar]] [[#Тест]] [[#тест]] [[#Hey < # " > % : ']]
31756 {{anchorencode:💩}} <span id="{{anchorencode:💩}}"></span>
31758 <!-- These two links should produce identical HTML -->
31759 [[#啤酒]] [[#%E5%95%A4%E9%85%92]]
31762 <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>
31764 <li class="toclevel-1 tocsection-1"><a href="#Foo_bar"><span class="tocnumber">1</span> <span class="toctext">Foo bar</span></a></li>
31765 <li class="toclevel-1 tocsection-2"><a href="#foo_Bar_2"><span class="tocnumber">2</span> <span class="toctext">foo Bar</span></a></li>
31766 <li class="toclevel-1 tocsection-3"><a href="#Тест"><span class="tocnumber">3</span> <span class="toctext">Тест</span></a></li>
31767 <li class="toclevel-1 tocsection-4"><a href="#Тест_2"><span class="tocnumber">4</span> <span class="toctext">Тест</span></a></li>
31768 <li class="toclevel-1 tocsection-5"><a href="#тест"><span class="tocnumber">5</span> <span class="toctext">тест</span></a></li>
31769 <li class="toclevel-1 tocsection-6"><a href="#Hey_<_#_"_>_%_:_'"><span class="tocnumber">6</span> <span class="toctext">Hey < # " > % : '</span></a></li>
31773 <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>
31774 <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>
31775 <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>
31776 <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>
31777 <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>
31778 <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>
31779 <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>
31780 </p><p>💩 <span id="💩"></span>
31781 </p><p><a href="#啤酒">#啤酒</a> <a href="#啤酒">#啤酒</a>
31784 <h2 id="Foo_bar">Foo bar</h2>
31786 <h2 id="foo_Bar_2">foo Bar</h2>
31788 <h2 id="Тест"><span id=".D0.A2.D0.B5.D1.81.D1.82" typeof="mw:FallbackId"></span>Тест</h2>
31790 <h2 id="Тест_2"><span id=".D0.A2.D0.B5.D1.81.D1.82_2" typeof="mw:FallbackId"></span>Тест</h2>
31792 <h2 id="тест"><span id=".D1.82.D0.B5.D1.81.D1.82" typeof="mw:FallbackId"></span>тест</h2>
31794 <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>
31795 <p><a rel="mw:WikiLink" href="./Parser_test#Foo_bar">#Foo bar</a> <a rel="mw:WikiLink" href="./Parser_test#foo_Bar">#foo Bar</a> <a rel="mw:WikiLink" href="./Parser_test#Тест">#Тест</a> <a rel="mw:WikiLink" href="./Parser_test#тест">#тест</a> <a rel="mw:WikiLink" href="./Parser_test#Hey_<_#_"_>_%_:_'" data-parsoid='{"stx":"simple","a":{"href":"./Parser_test#Hey_<_#_\"_>_%_:_'"},"sa":{"href":"#Hey < # \" > % : '"}}'>#Hey < # " > % : '</a></p>
31797 <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>
31799 <!-- These two links should produce identical HTML -->
31800 <p><a rel="mw:WikiLink" href="./Parser_test#啤酒">#啤酒</a> <a rel="mw:WikiLink" href="./Parser_test#啤酒" data-parsoid='{"stx":"simple","a":{"href":"./Parser_test#啤酒"},"sa":{"href":"#%E5%95%A4%E9%85%92"}}'>#啤酒</a></p>
31803 # Parsoid doesn't support this mode
31805 HTML5 ids: legacy with a fallback to modern
31807 wgFragmentMode=[ 'legacy', 'html5' ]
31819 ==Hey < # " > % : '==
31820 [[#Foo bar]] [[#foo Bar]] [[#Тест]] [[#тест]] [[#Hey < # " > % : ']]
31822 {{anchorencode:💩}} <span id="{{anchorencode:💩}}"></span>
31824 <!-- These two links should produce identical HTML -->
31825 [[#啤酒]] [[#%E5%95%A4%E9%85%92]]
31828 <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>
31830 <li class="toclevel-1 tocsection-1"><a href="#Foo_bar"><span class="tocnumber">1</span> <span class="toctext">Foo bar</span></a></li>
31831 <li class="toclevel-1 tocsection-2"><a href="#foo_Bar_2"><span class="tocnumber">2</span> <span class="toctext">foo Bar</span></a></li>
31832 <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>
31833 <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>
31834 <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>
31835 <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>
31839 <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>
31840 <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>
31841 <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>
31842 <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>
31843 <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>
31844 <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>
31845 <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>
31846 </p><p>.F0.9F.92.A9 <span id=".F0.9F.92.A9"></span>
31847 </p><p><a href="#.E5.95.A4.E9.85.92">#啤酒</a> <a href="#.E5.95.A4.E9.85.92">#啤酒</a>
31851 # Parsoid doesn't support this mode.
31853 HTML5 ids: no legacy
31855 wgFragmentMode=[ 'html5' ]
31867 ==Hey < # " > % : '==
31868 [[#Foo bar]] [[#foo Bar]] [[#Тест]] [[#тест]] [[#Hey < # " > % : ']]
31870 {{anchorencode:💩}} <span id="{{anchorencode:💩}}"></span>
31872 <!-- These two links should produce identical HTML -->
31873 [[#啤酒]] [[#%E5%95%A4%E9%85%92]]
31876 <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>
31878 <li class="toclevel-1 tocsection-1"><a href="#Foo_bar"><span class="tocnumber">1</span> <span class="toctext">Foo bar</span></a></li>
31879 <li class="toclevel-1 tocsection-2"><a href="#foo_Bar_2"><span class="tocnumber">2</span> <span class="toctext">foo Bar</span></a></li>
31880 <li class="toclevel-1 tocsection-3"><a href="#Тест"><span class="tocnumber">3</span> <span class="toctext">Тест</span></a></li>
31881 <li class="toclevel-1 tocsection-4"><a href="#Тест_2"><span class="tocnumber">4</span> <span class="toctext">Тест</span></a></li>
31882 <li class="toclevel-1 tocsection-5"><a href="#тест"><span class="tocnumber">5</span> <span class="toctext">тест</span></a></li>
31883 <li class="toclevel-1 tocsection-6"><a href="#Hey_<_#_"_>_%_:_'"><span class="tocnumber">6</span> <span class="toctext">Hey < # " > % : '</span></a></li>
31887 <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>
31888 <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>
31889 <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>
31890 <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>
31891 <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>
31892 <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>
31893 <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>
31894 </p><p>💩 <span id="💩"></span>
31895 </p><p><a href="#啤酒">#啤酒</a> <a href="#啤酒">#啤酒</a>
31900 T90902: Normalize weird characters in section IDs
31902 wgFragmentMode=[ 'html5', 'legacy' ]
31908 <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>
31909 <p><a href="#Foo_bar">#Foo bar</a>
31912 <h2 id="Foo_bar"> Foo<span typeof="mw:Entity" data-parsoid='{"src":"&nbsp;","srcContent":" "}'> </span>bar </h2>
31913 <p><a rel="mw:WikiLink" href="./Parser_test#Foo_bar" data-parsoid='{"stx":"simple","a":{"href":"./Parser_test#Foo_bar"},"sa":{"href":"#Foo&nbsp;bar"}}'>#Foo bar</a></p>
31917 T51672: Test for brackets in attributes of elements in external link texts
31919 [http://example.com/ link <span title="title with [brackets]">span</span>]
31920 [http://example.com/ link <span title="title with [brackets]">span</span>]
31923 <p><a rel="nofollow" class="external text" href="http://example.com/">link <span title="title with [brackets]">span</span></a>
31924 <a rel="nofollow" class="external text" href="http://example.com/">link <span title="title with [brackets]">span</span></a>
31927 <p><a rel="mw:ExtLink" class="external text" href="http://example.com/">link <span title="title with [brackets]">span</span></a>
31928 <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>
31932 T72875: Test for brackets in attributes of elements in internal link texts
31934 [[Foo|link <span title="title with [[double brackets]]">span</span>]]
31935 [[Foo|link <span title="title with [[double brackets]]">span</span>]]
31938 <p><a href="/wiki/Foo" title="Foo">link <span title="title with [[double brackets]]">span</span></a>
31939 <a href="/wiki/Foo" title="Foo">link <span title="title with [[double brackets]]">span</span></a>
31942 <p><a rel="mw:WikiLink" href="./Foo" title="Foo">link <span title="title with [[double brackets]]">span</span></a>
31943 <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>
31947 T199926: html arrow wt: Parsoid sometimes trips up on verticalbar chars in hrefs
31950 "modes": ["html2wt"]
31953 <a href="https://stats.wikimedia.org/v2/#/fr.wikipedia.org/reading/page-views-by-country/normal|map|2-Year~2016060100~2018071100|~total">9</a>
31954 <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>
31956 [https://stats.wikimedia.org/v2/#/fr.wikipedia.org/reading/page-views-by-country/normal|map|2-Year~2016060100~2018071100|~total 9]
31957 [[stats:v2/#/fr.wikipedia.org/reading/page-views-by-country/normal%7Cmap%7C2-Year~2016060100~2018071100%7C~total|10]]
31961 T179544: {{anchorencode:}} output should be always usable in links
31963 wgFragmentMode=[ 'html5' ]
31965 <span id="{{anchorencode:[foo]}}"></span>[[#{{anchorencode:[foo]}}]]
31967 <p><span id="[foo]"></span><a href="#[foo]">#[foo]</a>
31970 <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="./Parser_test#[foo]" data-parsoid='{"stx":"simple","a":{"href":"./Parser_test#[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>
31973 ## ------------------------------
31974 ## Parsoid section-wrapping tests
31975 ## ------------------------------
31977 Section wrapping for well-nested sections (no leading content)
31980 "wrapSections": true
32001 <section data-mw-section-id="0"></section><section data-mw-section-id="1"><h1 id="1">1</h1>
32004 </section><section data-mw-section-id="2"><h1 id="2">2</h1>
32007 <section data-mw-section-id="3"><h2 id="2.1">2.1</h2>
32010 </section><section data-mw-section-id="4"><h2 id="2.2">2.2</h2>
32013 <section data-mw-section-id="5"><h3 id="2.2.1">2.2.1</h3>
32016 </section></section></section><section data-mw-section-id="6"><h1 id="3">3</h1>
32023 Section wrapping for well-nested sections (with leading content)
32026 "wrapSections": true
32031 Para 2 with a <div>nested in it</div>
32044 <section data-mw-section-id="0"><p>Para 1.</p>
32046 <p>Para 2 with a </p><div>nested in it</div>
32050 </section><section data-mw-section-id="1"><h1 id="1">1</h1>
32053 </section><section data-mw-section-id="2"><h1 id="2">2</h1>
32056 <section data-mw-section-id="3"><h2 id="2.1">2.1</h2>
32059 </section></section>
32063 Section wrapping with template-generated sections (good nesting 1)
32066 "wrapSections": true
32083 <section data-mw-section-id="0"></section><section data-mw-section-id="1"><h1 id="1">1</h1>
32086 <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">
32087 </span><p about="#mwt1">b</p>
32088 </section><section data-mw-section-id="3"><h2 id="1.2">1.2</h2>
32091 </section></section><section data-mw-section-id="4"><h1 id="2">2</h1>
32095 # In this example, the template scope is mildly expanded to incorporate the
32096 # trailing newline after the transclusion since that is part of section 1.1.1
32098 Section wrapping with template-generated sections (good nesting 2)
32101 "wrapSections": true,
32102 "modes": ["wt2html", "wt2wt"]
32117 <section data-mw-section-id="0"></section><section data-mw-section-id="1"><h1 id="1">1</h1>
32120 <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">
32121 </span><p about="#mwt1">b</p><span about="#mwt1">
32122 </span><section data-mw-section-id="-1" about="#mwt1"><h3 about="#mwt1" id="1.1.1">1.1.1</h3><span about="#mwt1">
32123 </span><p about="#mwt1">d</p><span about="#mwt1">
32124 </span></section></section></section><section data-mw-section-id="4" data-parsoid="{}"><h1 id="2">2</h1>
32128 # In this example, the template scope is mildly expanded to incorporate the
32129 # trailing newline after the transclusion since that is part of section 1.2.1
32131 Section wrapping with template-generated sections (good nesting 3)
32134 "wrapSections": true,
32135 "modes": ["wt2html", "wt2wt"]
32153 <section data-mw-section-id="0"></section><section data-mw-section-id="1" data-parsoid="{}"><h1 id="1"> 1 </h1>
32156 <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">
32157 </span><section data-mw-section-id="-1" about="#mwt1"><h2 about="#mwt1" id="1.1">1.1</h2><span about="#mwt1">
32158 </span><p about="#mwt1">b</p><span about="#mwt1">
32159 </span></section><section data-mw-section-id="-1" about="#mwt1"><h2 about="#mwt1" id="1.2">1.2</h2><span about="#mwt1">
32160 </span><p about="#mwt1">c</p><span about="#mwt1">
32161 </span><section data-mw-section-id="-1" about="#mwt1"><h3 about="#mwt1" id="1.2.1">1.2.1</h3><span about="#mwt1">
32162 </span><p about="#mwt1">d</p><span about="#mwt1">
32163 </span></section></section></section><section data-mw-section-id="5"><h1 id="2">2</h1>
32167 # Because of section-wrapping and template-wrapping interactions,
32168 # the scope of the template is expanded so that the template markup
32169 # is valid in the presence of <section> tags.
32170 # This exercises the s1 is null scenario in the wrapSections code
32172 Section wrapping with template-generated sections (bad nesting 1)
32175 "wrapSections": true
32189 <section data-mw-section-id="-1"></section><section data-mw-section-id="-2"><div data-parsoid='{"stx":"html"}'>
32192 <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"]}'>
32193 </span><section data-mw-section-id="-1" about="#mwt1"><h1 about="#mwt1" id="1">1</h1><span about="#mwt1">
32194 </span><p about="#mwt1">b
32195 </p><span about="#mwt1">
32197 </span><p about="#mwt1">c</p><span about="#mwt1">
32198 </span></section></div></section>
32201 # Because of section-wrapping and template-wrapping interactions,
32202 # the scope of the template is expanded so that the template markup
32203 # is valid in the presence of <section> tags.
32204 # This exercises the s1 is ancestor of s2 scenario in the wrapSections code
32206 Section wrapping with template-generated sections (bad nesting 2)
32209 "wrapSections": true
32227 <section data-mw-section-id="0"></section><section data-mw-section-id="1"><h1 id="1">1</h1>
32230 </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">
32231 </span><p about="#mwt1">b</p><span about="#mwt1">
32232 </span><section data-mw-section-id="-1" about="#mwt1"><h2 about="#mwt1" id="2.1">2.1</h2><span about="#mwt1">
32233 </span><p about="#mwt1">c</p><span about="#mwt1">
32235 </span><p about="#mwt1">d</p><span about="#mwt1">
32237 </span></section></section><section data-mw-section-id="4"><h1 id="3">3</h1>
32241 # Because of section-wrapping and template-wrapping interactions,
32242 # additional template wrappers are added to <section> tags
32243 # so that template wrapping semantics are valid whether section
32244 # tags are retained or stripped. But, the template scope can expand
32245 # greatly when accounting for section tags.
32246 # This exercises the s1 and s2 are in different subtrees scenario
32248 Section wrapping with template-generated sections (bad nesting 3)
32251 "wrapSections": true,
32252 "modes": ["wt2html", "wt2wt"]
32270 <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>
32273 <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">
32274 </span><p about="#mwt1">b</p><span about="#mwt1">
32275 </span></section></section><section data-mw-section-id="-1" about="#mwt1"><h1 about="#mwt1" id="2">2</h1><span about="#mwt1">
32276 </span><p about="#mwt1">c</p>
32279 </section><section data-mw-section-id="4" data-parsoid="{}"><h1 id="3">3</h1>
32284 Section wrapping with uneditable lead section + div wrapping multiple sections
32287 "wrapSections": true
32292 <div style="border:1px solid red;">
32309 <section data-mw-section-id="-1"><p>foo</p>
32311 </section><section data-mw-section-id="-2"><div style="border:1px solid red;">
32312 <section data-mw-section-id="1"><h1 id="1">1</h1>
32315 <section data-mw-section-id="2"><h2 id="1.1">1.1</h2>
32318 </section></section><section data-mw-section-id="-1"><h1 id="2">2</h1>
32322 </section><section data-mw-section-id="4"><h1 id="3">3</h1>
32325 <section data-mw-section-id="5"><h2 id="3.1">3.1</h2>
32327 </section></section>
32331 Section wrapping with editable lead section + div overlapping multiple sections
32334 "wrapSections": true
32341 <div style="border:1px solid red;">
32358 <section data-mw-section-id="0"><p>foo</p>
32360 </section><section data-mw-section-id="-1"><h1 id="1">1</h1>
32362 </section><section data-mw-section-id="-2"><div style="border:1px solid red;">
32365 <section data-mw-section-id="2"><h2 id="1.1">1.1</h2>
32368 </section><section data-mw-section-id="-1"><h1 id="2">2</h1>
32373 </section><section data-mw-section-id="4"><h1 id="3">3</h1>
32376 <section data-mw-section-id="5"><h2 id="3.1">3.1</h2>
32378 </section></section>
32382 HTML header tags should not be wrapped in section tags
32385 "wrapSections": true
32398 <section data-mw-section-id="0"><p>foo</p>
32400 <h1 id="a" data-parsoid='{"stx":"html"}'>a</h1>
32402 </section><section data-mw-section-id="1"><h1 id="b">b</h1>
32404 <h1 id="c" data-parsoid='{"stx":"html"}'>c</h1>
32406 </section><section data-mw-section-id="2"><h1 id="d">d</h1></section>
32410 Lead section containing only whitespace and comments.
32413 "wrapSections": true
32417 <!-- this is a comment, presumably significant to editors -->
32424 <section data-mw-section-id="0" data-parsoid="{}">
32425 <!-- this is a comment, presumably significant to editors -->
32426 </section><section data-mw-section-id="1"><h1 id="1">1</h1>
32429 </section><section data-mw-section-id="2"><h1 id="2">2</h1>
32434 Pseudo-sections emitted by templates should have id -2
32437 "wrapSections": true
32447 <section data-mw-section-id="-1"><p>foo</p>
32448 </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}}]}'>
32449 <section data-mw-section-id="-1"><h2 id="a">a</h2>
32450 </section><section data-mw-section-id="-1"><h2 id="b">b</h2>
32451 </section></div><span about="#mwt1">
32455 ##########################################################################
32456 Tests demonstrating white-space insensitivity in input wikitext
32457 for wikitext headings, wikitext list items, and wikitext table captions,
32458 headings, and cells. HTML versions of the same should preserve whitespace.
32459 ##########################################################################
32461 Trim whitespace in wikitext headings, list items, table captions, headings, and cells
32464 "modes": ["wt2html"],
32465 "preserveIEW": true
32469 == <!--c1--> <!--c2--> Spaces <!--c3--> <!--c4--> ==
32470 == <!--c1--> <!--c2--> Tabs <!--c3--><!--c4--> ==
32471 == <!--Headings with fallback ids--> Личная жизнь ==
32472 * <!--c1--> <!--c2--> List item <!--c3--> <!--c4-->
32473 ; <!--term to define--> term : <!--term's definition--> definition
32475 |+ <!--c1--> <!--c2--> Table Caption <!--c3--> <!--c4-->
32477 ! <!--c1--> <!--c2--> Table Heading 1 <!--c3--> <!--c4--> !! Table Heading 2 <!--c5-->
32479 | <!--c1--> <!--c2--> Table Cell 1 <!--c3--> <!--c4--> || Table Cell 2 <!--c5-->
32481 | class="foo" || <!--c1--> <!--c2--> Table Cell 3 <!--c3--> <!--c4-->
32483 | <!--c1--> testing [[one|two]] <!--c2--> | <!--c3--> some content
32486 | <!--c1--> <!--c2--> Table Cell 1 <!--c3--> <!--c4--> || Table Cell 2 <!--c5-->
32489 <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>
32490 <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>
32491 <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>
32492 <ul><li>List item</li></ul>
32493 <dl><dt>term </dt>
32494 <dd>definition</dd></dl>
32496 <caption>Table Caption
32499 <th>Table Heading 1</th>
32500 <th>Table Heading 2
32503 <td>Table Cell 1</td>
32507 <td>class="foo"</td>
32511 <td>testing <a href="/index.php?title=One&action=edit&redlink=1" class="new" title="One (page does not exist)">two</a> | some content
32512 </td></tr></tbody></table>
32515 <td>Table Cell 1</td>
32517 </td></tr></tbody></table> foo</dd></dl>
32519 <meta property="mw:PageProp/notoc">
32520 <h2 id="Spaces"><!--c1--><!--c2-->Spaces<!--c3--><!--c4--></h2>
32521 <h2 id="Tabs"><!--c1--><!--c2-->Tabs<!--c3--><!--c4--></h2>
32522 <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>
32523 <ul><li><!--c1--><!--c2-->List item<!--c3--><!--c4--></li></ul>
32524 <dl><dt><!--term to define-->term </dt><dd><!--term's definition-->definition</dd></dl>
32526 <caption><!--c1--><!--c2-->Table Caption<!--c3--><!--c4--></caption>
32528 <th><!--c1--><!--c2-->Table Heading 1<!--c3--><!--c4--></th><th>Table Heading 2<!--c5--></th></tr>
32530 <td><!--c1--><!--c2-->Table Cell 1<!--c3--><!--c4--></td><td>Table Cell 2<!--c5--></td></tr>
32532 <td>class="foo"</td><td><!--c1--><!--c2-->Table Cell 3<!--c3--><!--c4--></td></tr>
32534 <td><!--c1-->testing <a rel="mw:WikiLink" href="./One" title="One">two</a> <!--c2--> | <!--c3--> some content</td></tr>
32537 <tbody><tr><td><!--c1--><!--c2-->Table Cell 1<!--c3--><!--c4--></td><td>Table Cell 2<!--c5--></td></tr>
32538 </tbody></table> foo<!--c1--></dd></dl>
32541 # Looks like <caption> is not accepted in HTML
32543 Do not trim whitespace in HTML headings, list items, table captions, headings, and cells
32546 "modes": ["wt2html"],
32547 "preserveIEW": true
32551 <h2> <!--c1--> <!--c2--> Heading <!--c3--> <!--c4--> </h2>
32552 <ul><li> <!--c1--> <!--c2--> List item <!--c3--> <!--c4--> </li></ul>
32554 <tr><th> <!--c1--> <!--c2--> Table Heading <!--c3--> <!--c4--> <th></tr>
32555 <tr><td> <!--c1--> <!--c2--> Table Cell <!--c3--> <!--c4--> <th></tr>
32558 <h2><span class="mw-headline" id="Heading"> Heading </span></h2>
32559 <ul><li> List item </li></ul>
32561 <tbody><tr><th> Table Heading </th><th></th></tr>
32562 <tr><td> Table Cell </td><th></th></tr>
32565 <meta property="mw:PageProp/notoc"/>
32566 <h2 id="Heading"> <!--c1--> <!--c2--> Heading <!--c3--> <!--c4--> </h2>
32567 <ul><li> <!--c1--> <!--c2--> List item <!--c3--> <!--c4--> </li></ul>
32569 <tbody><tr><th> <!--c1--> <!--c2--> Table Heading <!--c3--> <!--c4--> </th><th></th></tr>
32570 <tr><td> <!--c1--> <!--c2--> Table Cell <!--c3--> <!--c4--> </td><th></th></tr>
32575 Do not trim whitespace in links and quotes
32578 "modes": ["wt2html"],
32579 "preserveIEW": true
32582 foo '' <!--c1--> italic <!--c2--> '' and ''' <!--c3--> bold <!--c4--> '''
32583 [[Foo| some text ]]
32585 <p>foo <i> italic </i> and <b> bold </b>
32586 <a href="/wiki/Foo" title="Foo"> some text </a>
32589 <p>foo <i> <!--c1--> italic <!--c2--> </i> and <b> <!--c3--> bold <!--c4--> </b>
32590 <a rel="mw:WikiLink" href="./Foo" title="Foo"> some text </a></p>
32594 Remove p tags surrounding a single element in a figcaption
32598 [[File:Foobar.jpg|right|200x200px|Caption]]
32600 <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>
32604 Selser preserves lack of newline before list and allows newline after the list
32607 "modes": ["selser"],
32608 "scrubWikitext": true,
32610 [ "ul", "after", "<p>footer</p>" ]
32627 Selser does not introduce newlines between unedited paragraph preceding the list
32630 "modes": ["selser"],
32632 [ "table tbody tr td p:last-child", "empty" ]
32654 Selser does not introduce newlines between unedited paragraph following the list
32657 "modes": ["selser"],
32659 [ "table tbody tr td p:first-child", "empty" ]
32681 Remove a list item but do not insert newline above list
32684 "modes": ["selser"],
32686 [ "ul li:last-child", "remove" ]