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 ### Preformatted text
2373 And a [[Main Page|link]]
2379 And a <a href="/wiki/Main_Page" title="Main Page">link</a>
2384 Tabs don't trigger preformatted text
2388 This is preformatted text.
2394 <pre>This is preformatted text.
2399 preformatted text.</p>
2400 <pre>This is preformatted text.
2405 Space before tab needs nowiki pre protection
2411 <nowiki> </nowiki> a
2415 Ident preformatting with inline content
2426 <pre> with <nowiki> inside (compatibility with 1.6 and earlier)
2443 Regression with preformatted in <center>
2457 T54763: Preformatted in <blockquote>
2463 indented cell (no pre-wrapping!)
2473 <p> indented cell (no pre-wrapping!)
2481 T53086: Double newlines in blockquotes should be turned into paragraphs
2498 T17491: <ins>/<del> in blockquote
2501 Foo <del>bar</del> <ins>baz</ins> quux
2505 <p>Foo <del>bar</del> <ins>baz</ins> quux
2511 <p>Foo <del>bar</del> <ins>baz</ins> quux
2517 T17491: <ins>/<del> in blockquote (2)
2519 <blockquote>Foo <del>bar</del> <ins>baz</ins> quux
2522 <blockquote>Foo <del>bar</del> <ins>baz</ins> quux
2526 <blockquote><p>Foo <del>bar</del> <ins>baz</ins> quux
2531 <pre> with attributes (T5202)
2533 <pre style="background: blue; color:white">Bluescreen of WikiDeath</pre>
2535 <pre style="background: blue; color:white">Bluescreen of WikiDeath</pre>
2540 <pre> with width attribute (T5202)
2542 <pre width="8">Narrow screen goodies</pre>
2544 <pre width="8">Narrow screen goodies</pre>
2549 <pre> with forbidden attribute (T5202)
2551 <pre width="8" onmouseover="alert(document.cookie)">Narrow screen goodies</pre>
2553 <pre width="8">Narrow screen goodies</pre>
2558 Entities inside <pre>
2567 <pre> with forbidden attribute values (T5202)
2569 <pre width="8" style="border-width: expression(alert(document.cookie))">Narrow screen goodies</pre>
2571 <pre width="8" style="/* insecure input */">Narrow screen goodies</pre>
2576 <nowiki> inside <pre> (T15238)
2584 <pre><nowiki><nowiki></nowiki>Foo<nowiki></nowiki></nowiki></pre>
2592 <pre><nowiki>Foo</nowiki></pre>
2597 <nowiki> inside of #tag:pre
2599 {{#tag:pre|Foo <nowiki>→bar</nowiki>}}
2601 <pre>Foo →bar</pre>
2604 <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>
2607 ## Don't expect this to rt, Parsoid drops the unmatched closing pre tags that
2608 ## aren't enclosed in nowikis.
2610 <nowiki> and <pre> preference (first one wins)
2641 <pre typeof="mw:Extension/pre" about="#mwt2" data-mw='{"name":"pre","attrs":{},"body":{"extsrc":"\n<nowiki>\n"}}'><nowiki>
2646 <p><span typeof="mw:Nowiki">
2654 </pre> inside nowiki
2656 <nowiki></pre></nowiki>
2663 Empty pre; pre inside other HTML tags (T56946)
2680 <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
2682 <pre typeof="mw:Extension/pre" about="#mwt4" data-parsoid='{"stx":"html"}' data-mw='{"name":"pre","attrs":{},"body":{"extsrc":""}}'></pre>
2686 HTML pre followed by indent-pre
2699 <p><pre>foo</pre></p>
2701 <p class="mw-empty-elt"></p><pre>foo</pre><p class="mw-empty-elt"></p>
2703 <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>
2707 Templates: Indent-Pre: 1a. Templates that break a line should suppress <pre>
2715 Templates: Indent-Pre: 1b. Templates that break a line should suppress <pre>
2725 Templates: Indent-Pre: 1c: Wrapping should be based on expanded content
2737 Templates: Indent-Pre: 1d: Wrapping should be based on expanded content
2758 Templates: Indent-Pre: 1e. Wrapping should be based on expanded content
2762 {{echo| foo}}{{echo| bar}}
2767 {{echo|<!--cmt--> foo}}
2769 <!--cmt-->{{echo| foo}}
2771 {{echo|{{echo| }}bar}}
2789 Templates: Indent-Pre: 1f: Wrapping should be based on expanded content
2825 ## Hmm, should Parsoid rt this?
2827 Pres with newline attributes
2829 parsoid=wt2html,html2html
2834 <pre class="one two">hi</pre>
2837 <pre class="one two" typeof="mw:Extension/pre" about="#mwt2" data-mw='{"name":"pre","attrs":{"class":"one two"},"body":{"extsrc":"hi"}}'>hi</pre>
2841 Things that look like <pre> tags aren't treated as such
2843 Barack Obama <President> of the United States
2844 <President></President>
2846 <p>Barack Obama <President> of the United States
2847 <President></President>
2851 ## Remex doesn't account for fostered content.
2852 ## The difference between Parsoid and the PHP parser can be attributed to core
2853 ## commit 674e8388cba and 710618f89af in Parsoid's repo. Parsoid doesn't
2854 ## tokenize unmatched extension tags that shadow html tags as strings to ease
2855 ## an escaping mechanism. See the comment in `maybeExtensionTag`.
2857 Handle broken pre-like tags (T66025)
2861 {{echo|<pre <pre>x</pre>}}
2863 <table><pre </table>
2866 <table><pre </table>
2870 <pre <table></table>
2872 <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>
2874 <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>
2877 ## Similar to the above, but shows the difference between extension and html tags
2879 Less than in attribute position
2886 <div </p><div>123</div>
2888 <pre typeof="mw:Extension/pre" about="#mwt2" data-mw='{"name":"pre","attrs":{"<pre":""},"body":{"extsrc":"123"}}'>123</pre><p>
2890 <div </p><div>123</div>
2894 Parsoid: handle pre with space after attribute
2898 <pre style="width:50%;" >{{echo|foo}}</pre>
2900 <pre style="width:50%;">{{echo|foo}}</pre>
2903 <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>
2914 <pre typeof="mw:Extension/pre" about="#mwt2" data-mw='{"name":"pre","attrs":{}}'></pre>
2918 Newline before table-close generates empty table row: T208619
2926 <tbody><tr><td></td></tr></tbody></table>
2928 <table data-parsoid='{}'>
2933 # PHP has one more row in the output than Parsoid does: T208619
2935 Parsoid: Don't paragraph-wrap fosterable content even if table syntax is unbalanced
2955 </tr><tr><td></td></tr></tbody></table>
2972 #--------------------------------------------------------------------
2973 # Transclusion parameter whitespace stripping tests
2974 # Behavior is different for positional and named parameters
2975 #--------------------------------------------------------------------
2977 Templates: Strip leading and trailing whitespace from named-param values
2981 {{echo|1= {{echo|b}} }}
2999 Templates: Don't strip whitespace from positional-param values
3003 {{echo|{{echo|b}} }}
3043 Templates: Don't recognize targets split by newlines
3059 Templates: Recognize targets when newlines and comments don't split the target
3064 <!--X--> ech<!--X-->o<!--X-->
3072 <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>
3076 Templates: Handle empty comment-and-ws-only lines correctly
3079 <!--should be ignored-->
3080 <!--should be ignored as well-->
3087 <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>
3091 Templates: Handle comments in the target
3094 <!-- should be ignored -->
3098 <!-- should be ignored and spaces on next line should not trip us up (T147742) -->
3101 {{echo<!-- should be ignored -->
3104 {{echo<!-- should be ignored -->|foo}}
3106 {{<!-- should be ignored -->echo|foo}}
3115 <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>
3117 <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>
3119 <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>
3121 <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>
3123 <p typeof="mw:Transclusion" data-mw='{"parts":[{"template":{"target":{"wt":"echo","href":"./Template:Echo"},"params":{"1":{"wt":"foo"}},"i":0}}]}'>foo</p>
3127 Templates: Handle comments in parameter names (T69657)
3130 <!-- should be ignored -->
3134 <!-- should be ignored -->
3137 {{echo|1<!-- should be ignored -->=foo}}
3139 {{echo|<!-- should be ignored -->1=foo}}
3147 <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>
3149 <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>
3151 <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>
3153 <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>
3157 Templates: Other wikitext in parameter names (T69657)
3164 <p typeof="mw:Transclusion" data-mw='{"parts":[{"template":{"target":{"wt":"echo","href":"./Template:Echo"},"params":{"''1''":{"wt":"foo"}},"i":0}}]}'>{{{1}}}</p>
3168 Templates: With colons
3172 <p>Template with colon
3175 <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>
3178 #--------------------------------------------------------------------
3179 # Transclusion parameter escaping tests
3180 #--------------------------------------------------------------------
3183 Templates: Parsoid parameter escaping test 1
3185 {{echo|[foo]|{{echo|[bar]}}}}
3190 <p about="#mwt1" typeof="mw:Transclusion"
3191 data-mw='{"parts":[{"template":{"target":{"wt":"echo","href":"./Template:Echo"},"params":{"1":{"wt":"[foo]"},"2":{"wt":"{{echo|[bar]}}"}},"i":0}}]}'>[foo]</p>
3195 Parsoid: Pipes in external links in template parameter
3197 {{echo|[{{echo|http://example.com}} link]}}
3199 <p><a rel="nofollow" class="external text" href="http://example.com">link</a>
3202 <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>
3206 Parsoid: pipe in transclusion parameter
3208 {{echo|http://foo.com/a|b}}
3210 <p><a rel="nofollow" class="external free" href="http://foo.com/a%7Cb">http://foo.com/a%7Cb</a>
3213 <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>
3217 Parsoid: Pipe in external link target and content in template parameter
3219 parsoid=html2wt,wt2wt
3221 {{echo|[http://foo.com/a|b a|b]}}
3223 <p><a rel="nofollow" class="external text" href="http://foo.com/a%7Cb">a|b</a>
3226 <p><a rel="mw:ExtLink" href="http://foo.com/a|b" about="#mwt1"
3227 typeof="mw:Transclusion"
3228 data-mw='{"parts":[{"template":{"target":{"wt":"echo","href":"./Template:Echo"},
3229 "params":{"1":{"wt":"[http://foo.com/a|b a|b]"}},"i":0}}]}'>a|b</a></p>
3233 Parsoid: Pipe in template with nested template in external link target in template parameter (seriously)
3235 {{echo|[{{fullurl:{{FULLPAGENAME}}|action=edit}} bar]}}
3237 <p><a rel="nofollow" class="external text" href="http://example.org/index.php?title=Parser_test&action=edit">bar</a>
3240 <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>
3244 Templates: Don't escape already nowiki-escaped text in template parameters
3246 parsoid=html2wt,wt2wt
3248 {{echo|foo<nowiki>|</nowiki>bar}}
3249 {{echo|<nowiki><div></nowiki>}}
3250 {{echo|<nowiki></nowiki>}}
3257 <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>
3258 <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>
3259 <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>
3265 Templates: '=' char in nested transclusions should not trigger nowiki escapes or conversion to named param
3267 parsoid=html2wt,wt2wt
3269 {{echo|{{echo|1=bar}}}}
3274 <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>
3279 Templates parameters with special tokenizing behavior dont get modified because of arg escaping
3286 <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>
3291 Templates: Preserve blank parameter names
3298 <p about="#mwt1" typeof="mw:Transclusion" data-mw='{"parts":[{"template":{"target":{"wt":"echo","href":"./Template:Echo"},"params":{"":{"wt":"foo"}},"i":0}}]}'>{{{1}}}</p>
3302 Templates: Preserve blank parameter names in other positions
3304 {{blank_param|bar|=foo}}
3310 <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
3315 ### Parsoid-centric tests for testing RT edge cases for pre
3319 1a. Indent-Pre and Comments
3332 1b. Indent-Pre and Comments
3345 1c. Indent-Pre and Comments
3358 1d. Indent-Pre and Comments
3359 (Pre-handler currently cannot distinguish between comment/ws order and normalizes them to [comment,ws] order)
3372 2a. Indent-Pre and tables
3393 2b. Indent-Pre and tables
3409 2c. Indent-Pre and tables (T44252)
3426 2d. Indent-Pre and tables
3443 <tbody><tr><td> b</td></tr>
3448 2e. Indent-Pre and table-line syntax
3461 2f. Indent-pre started by table-line syntax
3480 2g. Indented table markup mixed with indented pre content (proposed in T8200)
3485 Text that should be rendered preformatted
3493 <pre>Text that should be rendered preformatted
3502 2h. Indent pre in tables
3504 parsoid=wt2html,html2html
3547 </td><td data-parsoid='{"startTagSrc":"{{!}}"}'>
3549 </td></tr></tbody></table>
3553 3a. Indent-Pre and block tags (single-line html)
3557 c <blockquote> foo </blockquote>
3562 c <blockquote> foo </blockquote>
3563 <pre><span> foo </span>
3566 <p> a </p><p> foo </p><p>
3567 b </p><div> foo </div><p>
3568 c </p><blockquote><p> foo </p></blockquote>
3569 <pre><span> foo </span>
3572 <p> a </p><p data-parsoid='{"stx":"html"}'> foo </p><p>
3573 b </p><div data-parsoid='{"stx":"html"}'> foo </div><p>
3574 c </p><blockquote data-parsoid='{"stx":"html"}'><p> foo </p></blockquote>
3575 <pre><span data-parsoid='{"stx":"html"}'> foo </span></pre>
3579 3b. Indent-Pre and block tags (multi-line html)
3582 <!-- comment --> b <div> foo </div>
3584 <pre>a <span>foo</span>
3589 <pre>a <span data-parsoid='{"stx":"html"}'>foo</span></pre>
3590 <!-- comment --> <p>b </p><div data-parsoid='{"stx":"html"}'> foo </div>
3592 <pre>a <span>foo</span>
3594 b </p><div> foo </div>
3598 3c. Indent-Pre and block tags (pre-content on separate line)
3662 4. Indent-Pre and extension tags
3664 parsoid=wt2html,html2html
3673 <p> a </p><pre typeof="mw:Extension/tag" about="#mwt2" data-mw='{"name":"tag","attrs":{}}'></pre>
3677 5. Indent-Pre and html pre
3679 <pre class="123">hi</pre>
3681 <pre class="123">hi</pre>
3684 <pre class="123" typeof="mw:Extension/pre" about="#mwt2" data-mw='{"name":"pre","attrs":{"class":"123"},"body":{"extsrc":"hi"}}'>hi</pre>
3688 Render paragraphs when indent-pre is suppressed in blocklevels
3705 4. Multiple spaces at start-of-line
3723 ## NOTE: the leading white-space chars on empty line are significant
3725 5a. White-space in indent-pre
3737 ## NOTE: the leading white-space chars on empty line are significant
3739 5b. White-space in indent-pre
3758 5c. White-space in indent-pre
3771 6. Pre-blocks should extend across lines with leading WS even when there is no wrappable content
3794 7a. Indent-pre and category links
3796 parsoid=wt2html,wt2wt
3798 [[Category:foo]] <!-- No pre-wrapping -->
3799 {{echo| [[Category:foo]]}} <!-- No pre-wrapping -->
3802 <link rel="mw:PageProp/Category" href="./Category:Foo"> <!-- No pre-wrapping -->
3803 <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 -->
3806 ## We used to, but no longer wt2wt this test since the default serializer
3807 ## will normalize all categories to serialize on their own line.
3808 ## This wikitext usage is going to be fairly uncommon in production and
3809 ## selser will take care of preserving formatting in those scenarios.
3811 7b. Indent-pre and category links
3816 [[Category:foo]] {{echo|b}}
3818 <pre><link rel="mw:PageProp/Category" href="./Category:Foo"> a
3819 <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>
3823 Indent-Pre: Newlines in comments shouldn't affect sol state
3838 ### HTML-pre (some to spec PHP parser behavior and some Parsoid-RT-centric)
3842 HTML-pre: 1. embedded newlines
3874 <pre typeof="mw:Extension/pre" about="#mwt2" data-mw='{"name":"pre","attrs":{},"body":{"extsrc":"foo"}}'>foo</pre>
3876 <pre typeof="mw:Extension/pre" about="#mwt4" data-mw='{"name":"pre","attrs":{},"body":{"extsrc":"\nfoo\n"}}'>foo
3879 <pre typeof="mw:Extension/pre" about="#mwt6" data-mw='{"name":"pre","attrs":{},"body":{"extsrc":"\n\nfoo\n"}}'>
3884 <pre typeof="mw:Extension/pre" about="#mwt8" data-mw='{"name":"pre","attrs":{},"body":{"extsrc":"\n\n\nfoo\n"}}'>
3892 HTML-pre: big spaces
3928 <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"}}'>
3947 HTML-pre: 2: indented text
3960 HTML-pre: 3: other wikitext
3979 <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
3988 ### Definition lists
3996 <dd>Definition</dd></dl>
4001 Definition list for indentation only
4005 <dl><dd>Indented text</dd></dl>
4010 Definition list with no space
4015 <dd>Definition</dd></dl>
4020 Definition list with URL link
4022 ;http://example.com/ :definition
4024 <dl><dt><a rel="nofollow" class="external free" href="http://example.com/">http://example.com/</a></dt>
4025 <dd>definition</dd></dl>
4030 Definition list with bracketed URL link
4032 ;[http://www.example.com/ Example]:Something about it
4034 <dl><dt><a rel="nofollow" class="external text" href="http://www.example.com/">Example</a></dt>
4035 <dd>Something about it</dd></dl>
4040 Definition list with wikilink containing colon
4042 ;[[Help:FAQ]]:The least-read page on Wikipedia
4044 <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>
4045 <dd>The least-read page on Wikipedia</dd></dl>
4049 # At Brion's and JeLuF's insistence... :)
4051 Definition list with news link containing colon
4053 ;news:alt.wikipedia.rox :This isn't even a real newsgroup!
4055 <dl><dt><a rel="nofollow" class="external free" href="news:alt.wikipedia.rox">news:alt.wikipedia.rox</a></dt>
4056 <dd>This isn't even a real newsgroup!</dd></dl>
4059 <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>
4063 Malformed definition list with colon
4065 ;news:alt.wikipedia.rox -- don't crash or enter an infinite loop
4067 <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>
4072 Definition lists: colon in external link text
4074 ;[http://www.wikipedia2.org/ Wikipedia :The Next Generation] :OK, I made that up
4076 <dl><dt><a rel="nofollow" class="external text" href="http://www.wikipedia2.org/">Wikipedia :The Next Generation</a></dt>
4077 <dd>OK, I made that up</dd></dl>
4082 Definition lists: colon in HTML attribute
4084 ;<b style="display: inline">bold</b>
4086 <dl><dt><b style="display: inline">bold</b></dt></dl>
4091 Definition lists: self-closed tag
4093 ;one<br/>two :two-line fun
4095 <dl><dt>one<br />two</dt>
4096 <dd>two-line fun</dd></dl>
4101 Definition lists: ignore colons inside tags
4103 ;one <b>two : tag <i>fun:</i>:</b>:def
4105 <dl><dt>one <b>two : tag <i>fun:</i>:</b></dt>
4111 Definition lists: excess closed tags
4113 ;one</b>two :bad tag fun
4116 <dd>bad tag fun</dd></dl>
4120 <dd>bad tag fun</dd>
4125 T13748: Literal closing tags
4129 <dd>test test test test test</dd>
4131 <dd>test test test test test</dd>
4136 <dd>test test test test test</dd>
4138 <dd>test test test test test</dd>
4144 Definition and unordered list using wiki syntax nested in unordered list using html tags.
4153 <dd>description</dd></dl>
4154 <ul><li>unordered</li></ul>
4160 Definition list with empty definition and following paragraph
4173 Nested definition lists using html syntax
4186 Definition Lists: No nesting: Multiple dd's
4199 Definition Lists: Indentation: Regular
4207 <dl><dd>i3</dd></dl></dd></dl></dd></dl>
4212 Definition Lists: Indentation: Missing 1st level
4218 <dl><dd>i3</dd></dl></dd></dl></dd></dl>
4223 Definition Lists: Indentation: Multi-level indent
4227 <dl><dd><dl><dd><dl><dd>i3</dd></dl></dd></dl></dd></dl>
4232 Definition Lists: Hacky use to indent tables
4239 should be left alone
4241 <dl><dd><dl><dd><table>
4246 </td></tr></table></dd></dl></dd></dl>
4248 should be left alone
4253 Definition Lists: Hacky use to indent tables (with content following table)
4258 |} <!--c1--> this text should be part of the dl
4265 </td></tr></tbody></table> this text should be part of the dl</dd></dl>
4272 </td></tr></tbody></table> <!--c1--> this text should be part of the dl</dd></dl>
4276 Definition Lists: Hacky use to indent tables, with comments (T65979)
4284 should be left alone
4287 <dl><dd><dl><dd><table><tr>
4290 </tr></table><!-- bar --></dd></dl></dd></dl>
4292 should be left alone</p>
4296 Definition Lists: Hacky use to indent tables, with comment before table
4304 <dl><dd><dl><dd><!-- foo --><table><tr>
4306 </tr></table></dd></dl></dd></dl>
4309 # The trailing whitespace in this test is to catch a regression in
4310 # Parsoid after T54473.
4312 Definition Lists: Hacky use to indent tables (WS-insensitive)
4321 </td></tr></table></dd></dl>
4325 <tbody><tr><td>a</td></tr>
4326 </tbody></table></dd></dl>
4329 ## The PHP parser treats : items (dd) without a corresponding ; item (dt)
4330 ## as an empty dt item. It also ignores all but the last ";" when followed
4331 ## by ":" later on. So, ";" are not ignored in ";;;t3" but are ignored in
4332 ## ";;;t3 :d1". So, PHP parser behavior is a little inconsistent wrt multiple
4335 ## Ex: ";;t2 ::d2" is transformed into:
4347 ## But, Parsoid treats "; :" as a tight atomic unit and excess ":" as plain text
4348 ## So, the same wikitext above (;;t2 ::d2) is transformed into:
4359 ## All Parsoid only definition list tests have this difference.
4361 ## See also: https://phabricator.wikimedia.org/T8569
4362 ## and https://lists.wikimedia.org/pipermail/wikitext-l/2011-November/000483.html
4365 Table / list interaction: indented table with lists in table contents
4387 </td></tr></table></dd></dl>
4392 Table / list interaction: lists nested in tables nested in indented lists
4415 </td></tr></table></dd></dl>
4422 Definition Lists: Nesting: Multi-level (Parsoid only)
4450 Definition Lists: Nesting: Test 2
4457 <dl><dd>d2</dd></dl></dd></dl>
4462 Definition Lists: Nesting: Test 3
4467 <dl><dd><dl><dt>t1</dt>
4469 <dl><dd><dl><dd>d2</dd></dl></dd></dl></dd></dl></dd></dl>
4474 Definition Lists: Nesting: Test 4
4479 <dl><dd><dl><dd><dl><dt>t3</dt>
4480 <dd>d3</dd></dl></dd></dl></dd></dl>
4485 ## The Parsoid team believes the following three test exposes a
4486 ## bug in the PHP parser. (Parsoid team thinks the PHP parser is
4487 ## wrong to close the <dl> after the <dt> containing the <ul>.)
4488 ## It also exposes a "misfeature" in tidy, which doesn't like
4489 ## <dl> tags with a single <dt> child; it converts the <dt> into
4490 ## a <dd> in that case. (Parsoid leaves the <dt> alone!)
4492 Definition Lists: Mixed Lists: Test 1
4498 <dl><dd><dl><dt><ul><li>foo</li>
4499 <li>bar</li></ul></dt></dl>
4500 <dl><dt>baz</dt></dl></dd></dl>
4503 <dl><dd><dl><dt><ul><li>foo</li>
4504 <li>bar</li></ul></dt></dl>
4505 <dl><dt>baz</dt></dl></dd></dl>
4523 Definition Lists: Mixed Lists: Test 2
4528 <ul><li><dl><dd>d1</dd>
4529 <dd>d2</dd></dl></li></ul>
4535 Definition Lists: Mixed Lists: Test 3
4540 <ul><li><dl><dd><dl><dd><dl><dd>d1</dd>
4541 <dd>d2</dd></dl></dd></dl></dd></dl></li></ul>
4547 Definition Lists: Mixed Lists: Test 4
4552 <ul><li><dl><dt>d1</dt>
4555 <dd>d4</dd></dl></li></ul>
4561 Definition Lists: Mixed Lists: Test 5
4567 <dl><dd>d2</dd></dl></dd></dl></li></ul>
4573 Definition Lists: Mixed Lists: Test 6
4578 <ol><li><ul><li><dl><dd>d1
4579 <dl><dd><dl><dd>d3</dd></dl></dd></dl></dd></dl></li></ul></li></ol>
4585 Definition Lists: Mixed Lists: Test 7
4590 <dl><dd><ul><li>d1</li>
4591 <li>d2</li></ul></dd></dl>
4597 Definition Lists: Mixed Lists: Test 8
4602 <dl><dd><ul><li>d1</li></ul>
4603 <dl><dd><ul><li>d2</li></ul></dd></dl></dd></dl>
4609 Definition Lists: Mixed Lists: Test 9
4613 <ul><li><dl><dt>foo</dt>
4614 <dd>bar</dd></dl></li></ul>
4620 Definition Lists: Mixed Lists: Test 10
4624 <ul><li><ol><li><dl><dt>foo</dt>
4625 <dd>bar</dd></dl></li></ol></li></ul>
4629 # The Parsoid team disagrees with the PHP parser's seemingly-random
4630 # rules regarding dd/dt on the next few tests. Parsoid is more
4631 # consistent, and recognizes the shared nesting and keeps the
4632 # still-open tags around until the nesting is complete.
4634 # This is a regression test for T175099
4636 Definition Lists: Mixed Lists: Test 11
4643 <ul><li>b</li></ul></dd></dl>
4647 <dd><ul><li>b</li></ul></dd></dl>
4650 # FIXME: Maybe get rid of this test?
4652 Definition Lists: Mixed Lists: Test 12
4657 <ul><li><ol><li><ul><li><ol><li><dl><dt>foo</dt>
4658 <dd><ul><li><dl><dt><dl><dt>bar</dt></dl></dd></dl></li></ul></dd></dl>
4660 <dd>baz</dd></dl></li></ol></li></ul></li></ol></li></ul>
4663 <ul><li><ol><li><ul><li><ol><li><dl><dt>foo</dt>
4664 <dd><ul><li><dl><dt><dl><dt>bar</dt></dl></dt></dl></li></ul></dd></dl></li></ol></li></ul>
4666 <dd>baz</dd></dl></li></ol></li></ul>
4684 <dd data-parsoid='{"stx":"row"}'>bar</dd>
4689 <dd data-parsoid='{"stx":"row"}'>baz</dd>
4698 Definition Lists: Mixed Lists: Test 13
4703 <ul><li><ol><li><ul><li><ol><li><dl><dt>foo </dt>
4704 <dd><ul><li><dl><dt><dl><dt>bar</dt></dl></dt></dl></li></ul></dd></dl></li></ol></li></ul>
4705 <dl><dt>boo </dt>
4706 <dd>baz</dd></dl></li></ol></li></ul>
4709 # FIXME: Maybe get rid of this test?
4711 # * The test is wrong, there are two colons where there should be :;
4712 # * The PHP parser is wrong to close the <dl> after the <dt> containing the <ul>.
4714 Definition Lists: Weird Ones: Test 1
4716 *#;*::;;foo :bar (who uses this?)
4718 <ul><li><ol><li><dl><dt>foo</dt>
4719 <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>
4737 <dd data-parsoid='{"stx":"row"}'>bar (who uses this?)</dd>
4749 Definition Lists: colons occurring in tags
4766 <dt><span>a:b</span></dt>
4767 <dt><div>a:b</div></dt>
4768 <dt><div>a</div></dt>
4772 <dt><i>a:b</i></dt></dl>
4773 <dl><dt><dl><dt><dl><dt><i>a:b</i></dt></dl></dt></dl></dt></dl>
4775 <dl><dt>a</dt><dd data-parsoid='{"stx":"row"}'>b</dd>
4777 <dt><i data-parsoid='{"stx":"html"}'>a:b</i></dt>
4778 <dt><span data-parsoid='{"stx":"html"}'>a:b</span></dt>
4779 <dt><div data-parsoid='{"stx":"html"}'>a:b</div></dt>
4780 <dt><div data-parsoid='{"stx":"html","autoInsertedEnd":true}'>a</div></dt>
4782 <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>
4783 <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>
4784 <dl><dt><dl><dt><i>a:b</i></dt></dl></dt></dl></dt></dl>
4787 # Parsoid's output differs here again because it shares
4788 # nesting between the two lists unlike the PHP parser.
4789 # Unsure which is more desirable.
4791 Definition Lists: colons and tables 1
4803 </td></tr></table></dd></dl>
4807 </td></tr></table></dd></dl>
4813 </td></tr></table></dd>
4817 </td></tr></table></dd></dl>
4820 # FIXME: Does this need a html/php section?
4822 Definition Lists: template interaction
4824 ::{{definition_list}}
4827 ::{{definition_list}}
4832 <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">
4833 </span><dd about="#mwt1">two</dd></dl></dd></dl>
4835 <dl><dd data-parsoid='{}'>one
4836 <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">
4837 </span><dd about="#mwt2">two
4839 <dd>three</dd></dl></dd>
4840 <dd data-parsoid='{}'>four</dd></dl></dd></dl>
4848 External links: non-bracketed
4850 Non-bracketed: http://example.com
4852 <p>Non-bracketed: <a rel="nofollow" class="external free" href="http://example.com">http://example.com</a>
4856 # parsoid doesn't explicitly mark autonumbered links, see T55505
4858 External links: numbered
4860 Numbered: [http://example.com]
4861 Numbered: [http://example.net]
4862 Numbered: [http://example.com]
4864 <p>Numbered: <a rel="nofollow" class="external autonumber" href="http://example.com">[1]</a>
4865 Numbered: <a rel="nofollow" class="external autonumber" href="http://example.net">[2]</a>
4866 Numbered: <a rel="nofollow" class="external autonumber" href="http://example.com">[3]</a>
4869 <p>Numbered: <a rel="mw:ExtLink" class="external autonumber" href="http://example.com"></a>
4870 Numbered: <a rel="mw:ExtLink" class="external autonumber" href="http://example.net"></a>
4871 Numbered: <a rel="mw:ExtLink" class="external autonumber" href="http://example.com"></a></p>
4875 External links: specified text
4877 Specified text: [http://example.com link]
4879 <p>Specified text: <a rel="nofollow" class="external text" href="http://example.com">link</a>
4884 External links: trail
4886 Linktrails should not work for external links: [http://example.com link]s
4888 <p>Linktrails should not work for external links: <a rel="nofollow" class="external text" href="http://example.com">link</a>s
4893 External links: dollar sign in URL
4895 http://example.com/1$2345
4897 <p><a rel="nofollow" class="external free" href="http://example.com/1$2345">http://example.com/1$2345</a>
4901 # parsoid doesn't explicitly mark autonumbered links, see T55505
4903 External links: dollar sign in URL (autonumber)
4905 [http://example.com/1$2345]
4907 <p><a rel="nofollow" class="external autonumber" href="http://example.com/1$2345">[1]</a>
4910 <p><a rel="mw:ExtLink" class="external autonumber" href="http://example.com/1$2345"></a></p>
4914 External links: open square bracket forbidden in URL (T6377)
4916 parsoid=wt2html,wt2wt,html2html
4918 http://example.com/1[2345
4920 <p><a rel="nofollow" class="external free" href="http://example.com/1">http://example.com/1</a>[2345
4923 <p><a rel="mw:ExtLink" class="external free" href="http://example.com/1">http://example.com/1</a>[2345</p>
4927 External links: open square bracket forbidden in URL (named) (T6377)
4929 parsoid=wt2html,html2html
4931 [http://example.com/1[2345]
4933 <p><a rel="nofollow" class="external text" href="http://example.com/1">[2345</a>
4936 <p><a rel="mw:ExtLink" class="external text" href="http://example.com/1">[2345</a></p>
4939 # parsoid adds a space before the link name
4941 External links: open square bracket forbidden in URL (named) (T6377)
4944 [http://example.com/1 [2345]
4946 <p><a rel="nofollow" class="external text" href="http://example.com/1">[2345</a>
4951 External links: nowiki in URL link text (T8230)
4953 [http://example.com/ <nowiki>''example site''</nowiki>]
4955 <p><a rel="nofollow" class="external text" href="http://example.com/">''example site''</a>
4960 External links: newline forbidden in text (T8230 regression check)
4962 [http://example.com/ first
4965 <p>[<a rel="nofollow" class="external free" href="http://example.com/">http://example.com/</a> first
4971 External links: Pipe char between url and text
4973 [http://example.com | link]
4975 <p><a rel="nofollow" class="external text" href="http://example.com">| link</a>
4980 External links: protocol-relative URL in brackets
4982 [//example.com/ Test]
4984 <p><a rel="nofollow" class="external text" href="//example.com/">Test</a>
4988 # parsoid doesn't explicitly mark autonumbered links, see T55505
4990 External links: protocol-relative URL in brackets without text
4994 <p><a rel="nofollow" class="external autonumber" href="//example.com">[1]</a>
4997 <p><a rel="mw:ExtLink" class="external autonumber" href="//example.com"></a></p>
5001 External links: protocol-relative URL in free text is left alone
5005 <p>//example.com/Foo
5010 External links: protocol-relative URL in the middle of a word is left alone (T32269)
5012 foo//example.com/Foo
5014 <p>foo//example.com/Foo
5018 ## html2wt and html2html will fail because we will prefer the :en: interwiki prefix over wikipedia:
5020 External links: with no contents
5022 parsoid=wt2html,wt2wt
5024 [http://en.wikipedia.org/wiki/Foo]
5026 [[wikipedia:Foo|Bar]]
5028 [[wikipedia:Foo|<span>Bar</span>]]
5030 <p><a rel="nofollow" class="external autonumber" href="http://en.wikipedia.org/wiki/Foo">[1]</a>
5031 </p><p><a href="http://en.wikipedia.org/wiki/Foo" class="extiw" title="wikipedia:Foo">Bar</a>
5032 </p><p><a href="http://en.wikipedia.org/wiki/Foo" class="extiw" title="wikipedia:Foo"><span>Bar</span></a>
5035 <p><a rel="mw:ExtLink" class="external autonumber" href="http://en.wikipedia.org/wiki/Foo"></a></p>
5036 <p><a rel="mw:WikiLink/Interwiki" href="http://en.wikipedia.org/wiki/Foo" title="wikipedia:Foo">Bar</a></p>
5037 <p><a rel="mw:WikiLink/Interwiki" href="http://en.wikipedia.org/wiki/Foo" title="wikipedia:Foo"><span>Bar</span></a></p>
5041 External links: Free with trailing punctuation
5051 http://example.com/url_with_(brackets)
5052 (http://example.com/url_without_brackets)
5053 http://example.com/url_with_entity&
5054 http://example.com/url_with_entity&
5055 http://example.com/url_with_entity&
5056 http://example.com/url_with_entity
5057 http://example.com/url_with_entity 
5058 http://example.com/url_with_entity 
5059 http://example.com/url_with_entity<
5060 http://example.com/url_with_entity<
5061 http://example.com/url_with_entity<
5063 <p><a rel="nofollow" class="external free" href="http://example.com">http://example.com</a>,
5064 <a rel="nofollow" class="external free" href="http://example.com">http://example.com</a>;
5065 <a rel="nofollow" class="external free" href="http://example.com">http://example.com</a>\
5066 <a rel="nofollow" class="external free" href="http://example.com">http://example.com</a>.
5067 <a rel="nofollow" class="external free" href="http://example.com">http://example.com</a>:
5068 <a rel="nofollow" class="external free" href="http://example.com">http://example.com</a>!
5069 <a rel="nofollow" class="external free" href="http://example.com">http://example.com</a>?
5070 <a rel="nofollow" class="external free" href="http://example.com">http://example.com</a>)
5071 <a rel="nofollow" class="external free" href="http://example.com/url_with_(brackets)">http://example.com/url_with_(brackets)</a>
5072 (<a rel="nofollow" class="external free" href="http://example.com/url_without_brackets">http://example.com/url_without_brackets</a>)
5073 <a rel="nofollow" class="external free" href="http://example.com/url_with_entity&">http://example.com/url_with_entity&</a>
5074 <a rel="nofollow" class="external free" href="http://example.com/url_with_entity&">http://example.com/url_with_entity&</a>
5075 <a rel="nofollow" class="external free" href="http://example.com/url_with_entity&">http://example.com/url_with_entity&</a>
5076 <a rel="nofollow" class="external free" href="http://example.com/url_with_entity">http://example.com/url_with_entity</a> 
5077 <a rel="nofollow" class="external free" href="http://example.com/url_with_entity">http://example.com/url_with_entity</a> 
5078 <a rel="nofollow" class="external free" href="http://example.com/url_with_entity">http://example.com/url_with_entity</a> 
5079 <a rel="nofollow" class="external free" href="http://example.com/url_with_entity">http://example.com/url_with_entity</a><
5080 <a rel="nofollow" class="external free" href="http://example.com/url_with_entity">http://example.com/url_with_entity</a><
5081 <a rel="nofollow" class="external free" href="http://example.com/url_with_entity">http://example.com/url_with_entity</a><
5084 <p><a rel="mw:ExtLink" class="external free" href="http://example.com">http://example.com</a>,
5085 <a rel="mw:ExtLink" class="external free" href="http://example.com">http://example.com</a>;
5086 <a rel="mw:ExtLink" class="external free" href="http://example.com">http://example.com</a>\
5087 <a rel="mw:ExtLink" class="external free" href="http://example.com">http://example.com</a>.
5088 <a rel="mw:ExtLink" class="external free" href="http://example.com">http://example.com</a>:
5089 <a rel="mw:ExtLink" class="external free" href="http://example.com">http://example.com</a>!
5090 <a rel="mw:ExtLink" class="external free" href="http://example.com">http://example.com</a>?
5091 <a rel="mw:ExtLink" class="external free" href="http://example.com">http://example.com</a>)
5092 <a rel="mw:ExtLink" class="external free" href="http://example.com/url_with_(brackets)">http://example.com/url_with_(brackets)</a>
5093 (<a rel="mw:ExtLink" class="external free" href="http://example.com/url_without_brackets">http://example.com/url_without_brackets</a>)
5094 <a rel="mw:ExtLink" class="external free" href="http://example.com/url_with_entity&">http://example.com/url_with_entity&</a>
5095 <a rel="mw:ExtLink" class="external free" href="http://example.com/url_with_entity&">http://example.com/url_with_entity&</a>
5096 <a rel="mw:ExtLink" class="external free" href="http://example.com/url_with_entity&">http://example.com/url_with_entity&</a>
5097 <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>
5098 <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>
5099 <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>
5100 <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>
5101 <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>
5102 <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>
5106 External links: tricky Parsoid html2html case
5108 parsoid=wt2html,wt2wt,html2html
5110 http://example.com/url_with_entity&amp;
5112 <p><a rel="nofollow" class="external free" href="http://example.com/url_with_entity&amp">http://example.com/url_with_entity&amp</a>;
5115 <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>
5119 External links: Free with trailing quotes (T113666)
5121 '''News:''' Stuff here
5125 <p><b>News:</b> Stuff here
5126 </p><p><a rel="nofollow" class="external free" href="news:'a'b">news:'a'b</a><i>c</i>d e
5129 <p><b>News:</b> Stuff here</p>
5130 <p><a rel="mw:ExtLink" class="external free" href="news:'a'b">news:'a'b</a><i>c</i>d e</p>
5134 External links: with entity
5136 [http:// www.librarieswithoutborders.org Libraries without borders]
5138 <p><a rel="nofollow" class="external text" href="http://+www.librarieswithoutborders.org">Libraries without borders</a>
5141 <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>
5145 External links: Lone protocols are never linked (T105697)
5164 External links: No preceding word characters allowed (T67278)
5166 NOPEhttp://example.com
5167 N0http://example.com
5168 ok:http://example.com
5169 ok-http://example.com
5171 <p>NOPEhttp://example.com
5172 N0http://example.com
5173 ok:<a rel="nofollow" class="external free" href="http://example.com">http://example.com</a>
5174 ok-<a rel="nofollow" class="external free" href="http://example.com">http://example.com</a>
5179 External links: nofollow domain exception
5181 A [https://no-nofollow.org/foobar link], and another [https://example.org link].
5183 <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>.
5190 External image: http://meta.wikimedia.org/upload/f/f1/Ncwikicol.png
5192 <p>External image: <img src="http://meta.wikimedia.org/upload/f/f1/Ncwikicol.png" alt="Ncwikicol.png"/>
5197 External image from https
5199 External image from https: https://meta.wikimedia.org/upload/f/f1/Ncwikicol.png
5201 <p>External image from https: <img src="https://meta.wikimedia.org/upload/f/f1/Ncwikicol.png" alt="Ncwikicol.png"/>
5206 External image (when not allowed)
5208 wgAllowExternalImages=0
5210 External image: http://meta.wikimedia.org/upload/f/f1/Ncwikicol.png
5212 <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>
5217 Link to non-http image, no img tag
5219 Link to non-http image, no img tag: ftp://example.com/test.jpg
5221 <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>
5226 External links: terminating separator
5228 Terminating separator: http://example.com/thing,
5230 <p>Terminating separator: <a rel="nofollow" class="external free" href="http://example.com/thing">http://example.com/thing</a>,
5235 External links: intervening separator
5237 Intervening separator: http://example.com/1,2,3
5239 <p>Intervening separator: <a rel="nofollow" class="external free" href="http://example.com/1,2,3">http://example.com/1,2,3</a>
5244 External links: old bug with URL in query
5246 Old bug with URL in query: [http://example.com/thing?url=http://example.com link]
5248 <p>Old bug with URL in query: <a rel="nofollow" class="external text" href="http://example.com/thing?url=http://example.com">link</a>
5253 External links: old URL-in-URL bug, mixed protocols
5255 And again with mixed protocols: [ftp://example.com?url=http://example.com link]
5257 <p>And again with mixed protocols: <a rel="nofollow" class="external text" href="ftp://example.com?url=http://example.com">link</a>
5261 # Since Parsoid is starting to emit canonical wikitext for links,
5262 # [http://example.com http://example.com] will not RT back to that
5265 External links: URL in text
5269 URL in text: [http://example.com http://example.com]
5271 <p>URL in text: <a rel="nofollow" class="external text" href="http://example.com">http://example.com</a>
5274 <p>URL in text: <a rel="mw:ExtLink" class="external text" href="http://example.com">http://example.com</a></p>
5278 External links: Clickable images
5280 ja-style clickable images: [http://example.com http://meta.wikimedia.org/upload/f/f1/Ncwikicol.png]
5282 <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>
5285 <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>
5289 External links: raw ampersand
5291 Old & use: http://x&y
5293 <p>Old & use: <a rel="nofollow" class="external free" href="http://x&y">http://x&y</a>
5298 External links: encoded ampersand
5300 Old & use: http://x&y
5302 <p>Old & use: <a rel="nofollow" class="external free" href="http://x&y">http://x&y</a>
5305 <p>Old <span typeof="mw:Entity">&</span> use: <a rel="mw:ExtLink" class="external free" href="http://x&y">http://x&y</a></p>
5309 External links: encoded equals (T8102)
5311 http://example.com/?foo=bar
5313 <p><a rel="nofollow" class="external free" href="http://example.com/?foo=bar">http://example.com/?foo=bar</a>
5316 <p><a rel="mw:ExtLink" class="external free" href="http://example.com/?foo=bar">http://example.com/?foo=bar</a></p>
5320 ## Note that parsoid doesn't explicit mark autonumbered links, nor
5321 ## does it number them. As discussed in T55505, we can identify
5322 ## autonumbered links via CSS.
5326 External links: [raw ampersand]
5328 Old & use: [http://x&y]
5330 <p>Old & use: <a rel="nofollow" class="external autonumber" href="http://x&y">[1]</a>
5333 <p>Old <span typeof="mw:Entity">&</span> use: <a rel="mw:ExtLink" class="external autonumber" href="http://x&y"></a></p>
5336 # note that parsoid html is identical to [raw ampersand] case; so html2wt
5337 # mode will return the [raw ampersand] wikitext
5339 External links: [encoded ampersand]
5341 parsoid=wt2html,wt2wt,html2html
5343 Old & use: [http://x&y]
5345 <p>Old & use: <a rel="nofollow" class="external autonumber" href="http://x&y">[1]</a>
5348 <p>Old <span typeof="mw:Entity">&</span> use: <a rel="mw:ExtLink" class="external autonumber" href="http://x&y"></a></p>
5352 External links: [raw equals]
5354 [http://example.com/?foo=bar]
5356 <p><a rel="nofollow" class="external autonumber" href="http://example.com/?foo=bar">[1]</a>
5359 <p><a rel="mw:ExtLink" class="external autonumber" href="http://example.com/?foo=bar"></a></p>
5362 # note that parsoid html is identical to [raw equals] case; so html2wt
5363 # mode will return the [raw equals] wikitext
5365 External links: [encoded equals] (T8102)
5367 parsoid=wt2html,wt2wt,html2html
5369 [http://example.com/?foo=bar]
5371 <p><a rel="nofollow" class="external autonumber" href="http://example.com/?foo=bar">[1]</a>
5374 <p><a rel="mw:ExtLink" class="external autonumber" href="http://example.com/?foo=bar"></a></p>
5377 # xxx parsoid strips the IDN character, so the round-trip tests will
5378 # obviously fail and are disabled. --cscott
5380 External links: [IDN ignored character reference in hostname; strip it right off]
5382 parsoid=wt2html,wt2wt,html2html
5384 [http://e‌xample.com/]
5386 <p><a rel="nofollow" class="external autonumber" href="http://example.com/">[1]</a>
5389 <p><a rel="mw:ExtLink" class="external autonumber" href="http://example.com/"></a></p>
5392 # FIXME: This test (the IDN characters in the text of a link) is an inconsistency.
5393 # Where an external link could easily circumvent the sanitization of the text of
5394 # a link like this (where an IDN-ignore character is in the URL somewhere), this
5395 # test demands a higher standard. That's a bit strange.
5399 # http://example.com -> [http://example.com|http://example.com]
5400 # [http://example.com|http://example.com] -> [http://example.com|http://example.com]
5402 # The first example is sanitized, but the second is not. Any security benefits
5403 # from this production are trivial to circumvent. Either remove this test and
5404 # let the parser(s) do their thing unaccosted, or fix the inconsistency and change
5405 # the test accordingly.
5409 # xxx parsoid strips the IDN character, so the round-trip tests will
5410 # obviously fail and are disabled. --cscott
5412 External links: IDN ignored character reference in hostname; strip it right off
5414 parsoid=wt2html,html2html
5416 http://e‌xample.com/
5418 <p><a rel="nofollow" class="external free" href="http://example.com/">http://example.com/</a>
5421 <p><a rel="mw:ExtLink" class="external free" href="http://example.com/">http://example.com/</a></p>
5425 External links: www.jpeg.org (T2554)
5429 <p><a rel="nofollow" class="external free" href="http://www.jpeg.org">http://www.jpeg.org</a>
5433 # parsoid doesn't explicitly mark autonumbered links, see T55505
5435 External links: URL within URL (T2002)
5437 [http://www.unausa.org/newindex.asp?place=http://www.unausa.org/programs/mun.asp]
5439 <p><a rel="nofollow" class="external autonumber" href="http://www.unausa.org/newindex.asp?place=http://www.unausa.org/programs/mun.asp">[1]</a>
5442 <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>
5446 T2361: URL inside bracketed URL
5448 [http://www.example.com/foo http://www.example.com/bar]
5450 <p><a rel="nofollow" class="external text" href="http://www.example.com/foo">http://www.example.com/bar</a>
5455 T2361: URL within URL, not bracketed
5457 http://www.example.com/foo?=http://www.example.com/bar
5459 <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>
5464 T2289: ">"-token in URL-tail
5466 http://www.example.com/<hello>
5468 <p><a rel="nofollow" class="external free" href="http://www.example.com/">http://www.example.com/</a><hello>
5473 T2289: literal ">"-token in URL-tail
5475 http://www.example.com/<b>html</b>
5477 <p><a rel="nofollow" class="external free" href="http://www.example.com/">http://www.example.com/</a><b>html</b>
5480 <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>
5484 T2289: ">"-token in bracketed URL
5486 [http://www.example.com/<hello> stuff]
5488 <p><a rel="nofollow" class="external text" href="http://www.example.com/"><hello> stuff</a>
5493 T2289: literal ">"-token in bracketed URL
5495 [http://www.example.com/<b>html</b> stuff]
5497 <p><a rel="nofollow" class="external text" href="http://www.example.com/"><b>html</b> stuff</a>
5502 T2289: literal double quote at end of URL
5504 http://www.example.com/"hello"
5506 <p><a rel="nofollow" class="external free" href="http://www.example.com/">http://www.example.com/</a>"hello"
5511 T2289: literal double quote in bracketed URL
5513 [http://www.example.com/"hello" stuff]
5515 <p><a rel="nofollow" class="external text" href="http://www.example.com/">"hello" stuff</a>
5520 External links: multiple legal whitespace is fine, Magnus. Don't break it please. (T7081)
5522 [http://www.example.com test]
5524 <p><a rel="nofollow" class="external text" href="http://www.example.com">test</a>
5529 External links: link text with spaces
5531 [http://www.example.com a b c]
5532 [http://www.example.com ''a'' ''b'']
5534 <p><a rel="nofollow" class="external text" href="http://www.example.com">a b c</a>
5535 <a rel="nofollow" class="external text" href="http://www.example.com"><i>a</i> <i>b</i></a>
5539 # Note edge case difference between PHP and Parsoid here.
5541 External links: wiki links within external link (T5695)
5543 parsoid=wt2html,html2html
5545 [http://example.com [[wikilink]] embedded in ext link]
5547 [http://example.com test [[wikilink]] embedded in ext link]
5549 <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>
5550 </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>
5553 <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>
5554 <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>
5558 T2787: Links with one slash after the url protocol are invalid
5562 [http:/example.com title]
5564 <p>http:/example.com
5565 </p><p>[http:/example.com title]
5570 Bracketed external links with template-generated invalid target
5572 [{{echo|http:/example.com}} title]
5574 <p>[http:/example.com title]
5578 # wt2html only because Parsoid would want to add <nowiki>s coming from html
5580 Broken wikilinks (but not external links) prevent templates from closing
5584 [http://example.com x
5586 {{echo|[http://example.com x}}
5592 <p>[<a rel="nofollow" class="external free" href="http://example.com">http://example.com</a> x
5593 </p><p>[<a rel="nofollow" class="external free" href="http://example.com">http://example.com</a> x
5595 </p><p>{{echo|[[Foo}}
5598 <p>[<a rel="mw:ExtLink" class="external free" href="http://example.com">http://example.com</a> x</p>
5599 <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>
5601 <p>{{echo|[[Foo}}</p>
5605 Wikilinks with embedded newlines are not broken
5616 <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>
5628 <p>{{echo|<a href="/wiki/Foo" title="Foo">}}</a>
5632 <p>{{echo|<a rel="mw:WikiLink" href="./Foo" title="Foo">}}</a></p>
5633 <p>[[Foo|<span typeof="mw:Transclusion" data-mw='{"parts":[{"template":{"target":{"wt":"echo","href":"./Template:Echo"},"params":{"1":{"wt":"]]"}},"i":0}}]}'>]]</span></p>
5637 T4702: Mismatched <i>, <b> and <a> tags are invalid
5639 ''[http://example.com text'']
5640 [http://example.com '''text]'''
5641 ''Something [http://example.com in italic'']
5642 ''Something [http://example.com mixed''''', even bold]'''
5643 '''''Now [http://example.com both''''']
5645 <p><a rel="nofollow" class="external text" href="http://example.com"><i>text</i></a>
5646 <a rel="nofollow" class="external text" href="http://example.com"><b>text</b></a>
5647 <i>Something </i><a rel="nofollow" class="external text" href="http://example.com"><i>in italic</i></a>
5648 <i>Something </i><a rel="nofollow" class="external text" href="http://example.com"><i>mixed</i><b>, even bold</b></a>
5649 <i><b>Now </b></i><a rel="nofollow" class="external text" href="http://example.com"><i><b>both</b></i></a>
5657 http://www.example.com/?title=AT%26T
5659 <p><a rel="nofollow" class="external free" href="http://www.example.com/?title=AT%26T">http://www.example.com/?title=AT%26T</a>
5662 <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>
5665 # According to https://www.w3.org/TR/2011/WD-html5-20110525/Overview.html#parsing-urls a plain
5666 # % is actually legal in HTML5. Any change in output would need testing though.
5668 T6781, T7267: %25 in URL
5670 http://www.example.com/?title=100%25_Bran
5672 <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>
5675 <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>
5679 T6781, T7267: %28, %29 in URL
5681 http://www.example.com/?title=Ben-Hur_%281959_film%29
5683 <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>
5686 <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>
5691 T6781: %26 in autonumber URL
5693 [http://www.example.com/?title=AT%26T]
5695 <p><a rel="nofollow" class="external autonumber" href="http://www.example.com/?title=AT%26T">[1]</a>
5698 <p><a rel="mw:ExtLink" class="external autonumber" href="http://www.example.com/?title=AT%26T"></a></p>
5702 T6781, T7267: %26 in autonumber URL
5704 [http://www.example.com/?title=100%25_Bran]
5706 <p><a rel="nofollow" class="external autonumber" href="http://www.example.com/?title=100%25_Bran">[1]</a>
5709 <p><a rel="mw:ExtLink" class="external autonumber" href="http://www.example.com/?title=100%25_Bran"></a></p>
5713 T6781, T7267: %28, %29 in autonumber URL
5715 [http://www.example.com/?title=Ben-Hur_%281959_film%29]
5717 <p><a rel="nofollow" class="external autonumber" href="http://www.example.com/?title=Ben-Hur_%281959_film%29">[1]</a>
5720 <p><a rel="mw:ExtLink" class="external autonumber" href="http://www.example.com/?title=Ben-Hur_%281959_film%29"></a></p>
5725 T6781: %26 in bracketed URL
5727 [http://www.example.com/?title=AT%26T link]
5729 <p><a rel="nofollow" class="external text" href="http://www.example.com/?title=AT%26T">link</a>
5732 <p><a rel="mw:ExtLink" class="external text" href="http://www.example.com/?title=AT%26T">link</a></p>
5736 T6781, T7267: %25 in bracketed URL
5738 [http://www.example.com/?title=100%25_Bran link]
5740 <p><a rel="nofollow" class="external text" href="http://www.example.com/?title=100%25_Bran">link</a>
5745 T6781, T7267: %28, %29 in bracketed URL
5747 [http://www.example.com/?title=Ben-Hur_%281959_film%29 link]
5749 <p><a rel="nofollow" class="external text" href="http://www.example.com/?title=Ben-Hur_%281959_film%29">link</a>
5752 <p><a rel="mw:ExtLink" class="external text" href="http://www.example.com/?title=Ben-Hur_%281959_film%29">link</a></p>
5756 External link containing a period in the anchor. (T65947)
5758 [//foo.org/bar#baz. bang]
5760 [//foo.org/bar. bang]
5762 <p><a rel="nofollow" class="external text" href="//foo.org/bar#baz.">bang</a>
5763 </p><p><a rel="nofollow" class="external text" href="//foo.org/bar.">bang</a>
5766 <p><a rel="mw:ExtLink" class="external text" href="//foo.org/bar#baz.">bang</a></p>
5767 <p><a rel="mw:ExtLink" class="external text" href="//foo.org/bar.">bang</a></p>
5771 External link containing a single quote. (T65947)
5775 [//foo.org/bar'baz bang]
5777 <p><a rel="nofollow" class="external autonumber" href="//foo.org/bar'baz">[1]</a>
5778 </p><p><a rel="nofollow" class="external text" href="//foo.org/bar'baz">bang</a>
5781 <p><a rel="mw:ExtLink" class="external autonumber" href="//foo.org/bar'baz"></a></p>
5782 <p><a rel="mw:ExtLink" class="external text" href="//foo.org/bar'baz">bang</a></p>
5786 External link containing double-single-quotes in text '' (T6598 sanity check)
5788 Some [http://example.com/ pretty ''italics'' and stuff]!
5790 <p>Some <a rel="nofollow" class="external text" href="http://example.com/">pretty <i>italics</i> and stuff</a>!
5795 External link containing double-single-quotes in text embedded in italics (T6598 sanity check)
5797 ''Some [http://example.com/ pretty ''italics'' and stuff]!''
5799 <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>
5803 # Don't add the html/php section since the output is broken and there isn't any reason to spec it
5805 External link containing double-single-quotes with no space separating the url from text in italics
5807 [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]].]
5809 <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>.
5812 <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>
5816 External link with comments in link text
5818 [http://www.google.com Google <!-- comment -->]
5820 <p><a rel="nofollow" class="external text" href="http://www.google.com">Google </a>
5823 <p><a rel="mw:ExtLink" class="external text" href="http://www.google.com">Google <!-- comment --></a></p>
5827 External link to bare IPv4 address
5829 [http://192.168.0.1 Link]
5831 <p><a rel="nofollow" class="external text" href="http://192.168.0.1">Link</a>
5834 <p><a rel="mw:ExtLink" class="external text" href="http://192.168.0.1">Link</a></p>
5838 URL-encoding in URL functions (single parameter)
5840 {{localurl:Some page|amp=&}}
5842 <p>/index.php?title=Some_page&amp=&
5847 URL-encoding in URL functions (multiple parameters)
5849 {{localurl:Some page|q=?&=&}}
5851 <p>/index.php?title=Some_page&q=?&amp=&
5858 http://example.com/index.php?foozoid%5B%5D=bar
5860 http://example.com/index.php?foozoid[]=bar
5862 <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>
5863 </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>
5866 <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>
5868 <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>
5872 IPv6 urls, autolink format (T23261)
5874 http://[2404:130:0:1000::187:2]/index.php
5876 Examples from RFC 2373, section 2.2:
5878 *http://[1080::8:800:200C:417A]/unicast
5879 *http://[FF01::101]/multicast
5880 *http://[::1]/loopback
5881 *http://[::]/unspecified
5882 *http://[::13.1.68.3]/ipv4compat
5883 *http://[::FFFF:129.144.52.38]/ipv4compat
5885 Examples from RFC 2732, section 2:
5887 *http://[FEDC:BA98:7654:3210:FEDC:BA98:7654:3210]:80/index.html
5888 *http://[1080:0:0:0:8:800:200C:417A]/index.html
5889 *http://[3ffe:2a00:100:7031::1]
5890 *http://[1080::8:800:200C:417A]/foo
5891 *http://[::192.9.5.5]/ipng
5892 *http://[::FFFF:129.144.52.38]:80/index.html
5893 *http://[2010:836B:4179::836B:4179]
5895 <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>
5896 </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:
5898 <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>
5899 <li><a rel="nofollow" class="external free" href="http://[FF01::101]/multicast">http://[FF01::101]/multicast</a></li>
5900 <li><a rel="nofollow" class="external free" href="http://[::1]/loopback">http://[::1]/loopback</a></li>
5901 <li><a rel="nofollow" class="external free" href="http://[::]/unspecified">http://[::]/unspecified</a></li>
5902 <li><a rel="nofollow" class="external free" href="http://[::13.1.68.3]/ipv4compat">http://[::13.1.68.3]/ipv4compat</a></li>
5903 <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>
5904 <p>Examples from <a class="external mw-magiclink-rfc" rel="nofollow" href="https://tools.ietf.org/html/rfc2732">RFC 2732</a>, section 2:
5906 <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>
5907 <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>
5908 <li><a rel="nofollow" class="external free" href="http://[3ffe:2a00:100:7031::1]">http://[3ffe:2a00:100:7031::1]</a></li>
5909 <li><a rel="nofollow" class="external free" href="http://[1080::8:800:200C:417A]/foo">http://[1080::8:800:200C:417A]/foo</a></li>
5910 <li><a rel="nofollow" class="external free" href="http://[::192.9.5.5]/ipng">http://[::192.9.5.5]/ipng</a></li>
5911 <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>
5912 <li><a rel="nofollow" class="external free" href="http://[2010:836B:4179::836B:4179]">http://[2010:836B:4179::836B:4179]</a></li></ul>
5915 <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>
5917 <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>
5918 <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>
5919 <li><a rel="mw:ExtLink" class="external free" href="http://[FF01::101]/multicast">http://[FF01::101]/multicast</a></li>
5920 <li><a rel="mw:ExtLink" class="external free" href="http://[::1]/loopback">http://[::1]/loopback</a></li>
5921 <li><a rel="mw:ExtLink" class="external free" href="http://[::]/unspecified">http://[::]/unspecified</a></li>
5922 <li><a rel="mw:ExtLink" class="external free" href="http://[::13.1.68.3]/ipv4compat">http://[::13.1.68.3]/ipv4compat</a></li>
5923 <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>
5925 <p>Examples from <a href="https://tools.ietf.org/html/rfc2732" rel="mw:ExtLink" class="external mw-magiclink">RFC 2732</a>, section 2:</p>
5926 <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>
5927 <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>
5928 <li><a rel="mw:ExtLink" class="external free" href="http://[3ffe:2a00:100:7031::1]">http://[3ffe:2a00:100:7031::1]</a></li>
5929 <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>
5930 <li><a rel="mw:ExtLink" class="external free" href="http://[::192.9.5.5]/ipng">http://[::192.9.5.5]/ipng</a></li>
5931 <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>
5932 <li><a rel="mw:ExtLink" class="external free" href="http://[2010:836B:4179::836B:4179]">http://[2010:836B:4179::836B:4179]</a></li></ul>
5936 IPv6 urls, bracketed format (T23261)
5938 [http://[2404:130:0:1000::187:2]/index.php test]
5940 Examples from RFC 2373, section 2.2:
5942 *[http://[1080::8:800:200C:417A] unicast]
5943 *[http://[FF01::101] multicast]
5944 *[http://[::1]/ loopback]
5945 *[http://[::] unspecified]
5946 *[http://[::13.1.68.3] ipv4compat]
5947 *[http://[::FFFF:129.144.52.38] ipv4compat]
5949 Examples from RFC 2732, section 2:
5951 *[http://[FEDC:BA98:7654:3210:FEDC:BA98:7654:3210]:80/index.html 1]
5952 *[http://[1080:0:0:0:8:800:200C:417A]/index.html 2]
5953 *[http://[3ffe:2a00:100:7031::1] 3]
5954 *[http://[1080::8:800:200C:417A]/foo 4]
5955 *[http://[::192.9.5.5]/ipng 5]
5956 *[http://[::FFFF:129.144.52.38]:80/index.html 6]
5957 *[http://[2010:836B:4179::836B:4179] 7]
5959 <p><a rel="nofollow" class="external text" href="http://[2404:130:0:1000::187:2]/index.php">test</a>
5960 </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:
5962 <ul><li><a rel="nofollow" class="external text" href="http://[1080::8:800:200C:417A]">unicast</a></li>
5963 <li><a rel="nofollow" class="external text" href="http://[FF01::101]">multicast</a></li>
5964 <li><a rel="nofollow" class="external text" href="http://[::1]/">loopback</a></li>
5965 <li><a rel="nofollow" class="external text" href="http://[::]">unspecified</a></li>
5966 <li><a rel="nofollow" class="external text" href="http://[::13.1.68.3]">ipv4compat</a></li>
5967 <li><a rel="nofollow" class="external text" href="http://[::FFFF:129.144.52.38]">ipv4compat</a></li></ul>
5968 <p>Examples from <a class="external mw-magiclink-rfc" rel="nofollow" href="https://tools.ietf.org/html/rfc2732">RFC 2732</a>, section 2:
5970 <ul><li><a rel="nofollow" class="external text" href="http://[FEDC:BA98:7654:3210:FEDC:BA98:7654:3210]:80/index.html">1</a></li>
5971 <li><a rel="nofollow" class="external text" href="http://[1080:0:0:0:8:800:200C:417A]/index.html">2</a></li>
5972 <li><a rel="nofollow" class="external text" href="http://[3ffe:2a00:100:7031::1]">3</a></li>
5973 <li><a rel="nofollow" class="external text" href="http://[1080::8:800:200C:417A]/foo">4</a></li>
5974 <li><a rel="nofollow" class="external text" href="http://[::192.9.5.5]/ipng">5</a></li>
5975 <li><a rel="nofollow" class="external text" href="http://[::FFFF:129.144.52.38]:80/index.html">6</a></li>
5976 <li><a rel="nofollow" class="external text" href="http://[2010:836B:4179::836B:4179]">7</a></li></ul>
5979 <p><a rel="mw:ExtLink" class="external text" href="http://[2404:130:0:1000::187:2]/index.php">test</a></p>
5981 <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>
5982 <ul><li><a rel="mw:ExtLink" class="external text" href="http://[1080::8:800:200C:417A]">unicast</a></li>
5983 <li><a rel="mw:ExtLink" class="external text" href="http://[FF01::101]">multicast</a></li>
5984 <li><a rel="mw:ExtLink" class="external text" href="http://[::1]/">loopback</a></li>
5985 <li><a rel="mw:ExtLink" class="external text" href="http://[::]">unspecified</a></li>
5986 <li><a rel="mw:ExtLink" class="external text" href="http://[::13.1.68.3]">ipv4compat</a></li>
5987 <li><a rel="mw:ExtLink" class="external text" href="http://[::FFFF:129.144.52.38]">ipv4compat</a></li></ul>
5989 <p>Examples from <a href="https://tools.ietf.org/html/rfc2732" rel="mw:ExtLink" class="external mw-magiclink">RFC 2732</a>, section 2:</p>
5990 <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>
5991 <li><a rel="mw:ExtLink" class="external text" href="http://[1080:0:0:0:8:800:200C:417A]/index.html">2</a></li>
5992 <li><a rel="mw:ExtLink" class="external text" href="http://[3ffe:2a00:100:7031::1]">3</a></li>
5993 <li><a rel="mw:ExtLink" class="external text" href="http://[1080::8:800:200C:417A]/foo">4</a></li>
5994 <li><a rel="mw:ExtLink" class="external text" href="http://[::192.9.5.5]/ipng">5</a></li>
5995 <li><a rel="mw:ExtLink" class="external text" href="http://[::FFFF:129.144.52.38]:80/index.html">6</a></li>
5996 <li><a rel="mw:ExtLink" class="external text" href="http://[2010:836B:4179::836B:4179]">7</a></li></ul>
6000 Non-extlinks in brackets
6009 [{{echo|foo}} ''bar'']
6010 [{{echo|foo}}l's] errand
6011 [{{echo|foo}}l's errand]
6013 [url=http://example.com]
6014 [http:// bare protocols don't count]
6027 [url=<a rel="nofollow" class="external free" href="http://example.com">http://example.com</a>]
6028 [http:// bare protocols don't count]
6036 [<span about="#mwt19" typeof="mw:Transclusion" data-mw='{"parts":[{"template":{"target":{"wt":"echo","href":"./Template:Echo"},"params":{"1":{"wt":"foo"}},"i":0}}]}'>foo</span>]
6037 [<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]
6038 [<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>]
6039 [<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
6040 [<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]
6041 [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>]
6042 [url=<a rel="mw:ExtLink" class="external free" href="http://example.com">http://example.com</a>]
6043 [http:// bare protocols don't count]</p>
6047 Percent encoding in external links
6049 [https://github.com/search?l=&q=ResourceLoader+%40wikimedia Search]
6051 <p><a rel="nofollow" class="external text" href="https://github.com/search?l=&q=ResourceLoader+%40wikimedia">Search</a>
6054 <p><a rel="mw:ExtLink" class="external text" href="https://github.com/search?l=&q=ResourceLoader+%40wikimedia">Search</a></p>
6058 Use url link syntax for links where the content is equal the link target
6062 <p><a rel="nofollow" class="external free" href="http://example.com">http://example.com</a>
6065 <p><a rel="mw:ExtLink" class="external free" href="http://example.com">http://example.com</a></p>
6069 Parenthesis in external links, especially URL links
6073 http://example.com/test)
6075 http://example.com/(test)
6077 http://example.com/((test)
6079 (http://example.com/(test))
6081 (http://example.com/(test)))))
6083 http://example.com/a)b
6085 [http://example.com) foo]
6087 <p><a rel="nofollow" class="external free" href="http://example.com">http://example.com</a>)
6088 </p><p><a rel="nofollow" class="external free" href="http://example.com/test">http://example.com/test</a>)
6089 </p><p><a rel="nofollow" class="external free" href="http://example.com/(test)">http://example.com/(test)</a>
6090 </p><p><a rel="nofollow" class="external free" href="http://example.com/((test)">http://example.com/((test)</a>
6091 </p><p>(<a rel="nofollow" class="external free" href="http://example.com/(test))">http://example.com/(test))</a>
6092 </p><p>(<a rel="nofollow" class="external free" href="http://example.com/(test)))))">http://example.com/(test)))))</a>
6093 </p><p><a rel="nofollow" class="external free" href="http://example.com/a)b">http://example.com/a)b</a>
6094 </p><p><a rel="nofollow" class="external text" href="http://example.com)">foo</a>
6097 <p><a rel="mw:ExtLink" class="external free" href="http://example.com">http://example.com</a>)</p>
6098 <p><a rel="mw:ExtLink" class="external free" href="http://example.com/test">http://example.com/test</a>)</p>
6099 <p><a rel="mw:ExtLink" class="external free" href="http://example.com/(test)">http://example.com/(test)</a></p>
6100 <p><a rel="mw:ExtLink" class="external free" href="http://example.com/((test)">http://example.com/((test)</a></p>
6101 <p>(<a rel="mw:ExtLink" class="external free" href="http://example.com/(test))">http://example.com/(test))</a></p>
6102 <p>(<a rel="mw:ExtLink" class="external free" href="http://example.com/(test)))))">http://example.com/(test)))))</a></p>
6103 <p><a rel="mw:ExtLink" class="external free" href="http://example.com/a)b">http://example.com/a)b</a></p>
6104 <p><a rel="mw:ExtLink" class="external text" href="http://example.com)">foo</a></p>
6108 Parenthesis in external links, w/ transclusion or comment
6110 (http://example.com/{{echo|hi}})
6112 (http://example.com<!-- hi -->)
6114 <p>(<a rel="nofollow" class="external free" href="http://example.com/hi">http://example.com/hi</a>)
6115 </p><p>(<a rel="nofollow" class="external free" href="http://example.com">http://example.com</a>)
6118 <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>
6120 <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>
6124 Serialize <a> tags with invalid link targets as plain text
6126 parsoid={ "modes": ["html2wt"], "suppressErrors": true }
6128 <a rel="mw:WikiLink" href="[[foo]]">text</a>
6129 <a rel="mw:WikiLink" href="[[foo]]">*text</a>
6130 <a rel="mw:WikiLink" href="[[foo]]">[[foo]]</a>
6131 <a rel="mw:WikiLink" href="[[foo]]">*a [[foo]]</a>
6134 <nowiki>*</nowiki>text
6135 <nowiki>[[foo]]</nowiki>
6136 <nowiki>*</nowiki>a <nowiki>[[foo]]</nowiki>
6140 mw:ExtLink -vs- mw:WikiLink (T94723)
6144 <a rel="mw:WikiLink" href="./Foo" title="Foo" data-parsoid='{"stx":"piped","a":{"href":"./Foo"},"sa":{"href":"Foo"}}'>Bar</a>
6145 <a rel="mw:WikiLink" href="./Foo" title="Foo">Bar</a>
6146 <a rel="mw:WikiLink" href="http://en.wikipedia.org/wiki/Foo" title="Foo">Bar</a>
6147 <a rel="mw:ExtLink" href="http://en.wikipedia.org/wiki/Foo" title="Foo">Bar</a>
6149 <a rel="mw:ExtLink" href="http://en.wikipedia.org/wiki/European_Robin">European Robin</a>
6150 <a rel="mw:WikiLink" href="http://en.wikipedia.org/wiki/European_Robin">European Robin</a>
6158 [[:en:European_Robin|European Robin]]
6159 [[:en:European_Robin|European Robin]]
6163 mw:ExtLink linking to a interwiki URL can be round-tripped losslessly (T94723)
6167 [http://en.wikipedia.org/wiki/European_Robin European Robin]
6169 THIS SECTION IS NOT USED (but Parsoid won't run the test without it)
6180 Normal text. '''Bold text.''' Normal text. ''Italic text.''
6182 Normal text. '''''Bold italic text.''''' Normal text.
6184 <p>Normal text. <b>Bold text.</b> Normal text. <i>Italic text.</i>
6185 </p><p>Normal text. <i><b>Bold italic text.</b></i> Normal text.
6190 Quotes wrapping HTML table
6192 '''<table><tr><td>hi</td></tr></table>'''
6194 <b><table><tbody><tr><td>hi</td></tr></tbody></table></b>
6196 <b><table data-parsoid='{"stx":"html"}'><tbody><tr data-parsoid='{"stx":"html"}'><td data-parsoid='{"stx":"html"}'>hi</td></tr></tbody></table></b>
6199 # Parsoid inserts an empty bold tag pair at the end of the line, that the PHP
6200 # parser strips. The wikitext contains just the first half of the bold
6203 Unclosed and unmatched quotes
6205 '''''Bold italic text '''with bold deactivated''' in between.'''''
6207 '''''Bold italic text ''with italic deactivated'' in between.'''''
6211 ..spanning two paragraphs (should not work).'''
6213 '''Bold tag left open
6215 ''Italic tag left open
6219 <!-- Unmatching number of opening, closing tags: -->
6220 '''This year''''s election ''should'' beat '''last year''''s.
6222 ''Tom'''s car is bigger than ''Susan'''s.
6224 Plain ''italic'''s plain
6226 <p><i><b>Bold italic text </b>with bold deactivated<b> in between.</b></i>
6227 </p><p><b><i>Bold italic text </i>with italic deactivated<i> in between.</i></b>
6228 </p><p><b>Bold text..</b>
6229 </p><p>..spanning two paragraphs (should not work).
6230 </p><p><b>Bold tag left open</b>
6231 </p><p><i>Italic tag left open</i>
6233 </p><p><b>This year'</b>s election <i>should</i> beat <b>last year'</b>s.
6234 </p><p><i>Tom<b>s car is bigger than </b></i><b>Susan</b>s.
6235 </p><p>Plain <i>italic'</i>s plain
6238 <p><i><b>Bold italic text </b>with bold deactivated<b> in between.</b></i>
6239 </p><p><b><i>Bold italic text </i>with italic deactivated<i> in between.</i></b>
6240 </p><p><b>Bold text..</b>
6241 </p><p>..spanning two paragraphs (should not work).<b></b>
6242 </p><p><b>Bold tag left open</b>
6243 </p><p><i>Italic tag left open</i>
6246 <!-- Unmatching number of opening, closing tags: -->
6247 <p><b>This year'</b>s election <i>should</i> beat <b>last year'</b>s.
6248 </p><p><i>Tom<b>s car is bigger than </b></i><b>Susan</b>s.
6249 </p><p>Plain <i>italic'</i>s plain
6256 ### some content taken from http://meta.wikimedia.org/wiki/MediaWiki_User%27s_Guide:_Using_tables
6259 # This should not produce <table></table> as <table><tr><td></td></tr></table>
6260 # is the bare minimum required by the spec, see:
6261 # https://www.w3.org/TR/xhtml-modularization/dtd_module_defs.html#a_module_Basic_Tables
6262 # Parsoid team replies: empty table tags are legal in HTML5
6264 A table with no data.
6276 # Note that the PHP parser output appears to be broken when the table
6277 # end tag is not separated by a space from the style attribute
6279 A table with stray table end tags on start tag line (wt2html)
6283 {|style="color: red;"|}
6285 {|style="color: red;" |}
6289 {|style="color: red;"|} id="foo"
6293 {|style="color: red;" |} id="foo"
6297 <table style=""color:">
6299 </table><table style="color: red;">
6302 </td></tr></tbody></table>
6303 <table style=""color:" id="foo">
6306 </td></tr></tbody></table>
6307 <table style="color: red;" id="foo">
6310 </td></tr></tbody></table>
6312 <table style="color: red;"></table>
6314 <table style="color: red;">
6320 <table style="color: red;" id="foo">
6326 <table style="color: red;" id="foo">
6335 A table with no data (take 2)
6343 # A table with nothing but a caption is invalid XHTML, we might want to render
6344 # this as <p>caption</p>
6345 # Parsoid team replies: table with only a caption is legal in HTML5
6347 A table with nothing but a caption
6355 </caption><tr><td></td></tr></table>
6358 <table><caption>caption</caption></table>
6362 A table with caption with default-spaced attributes and a table row
6365 |+ style="color: red;" |caption1
6371 <caption style="color: red;">caption1
6380 A table with captions with non-default spaced attributes and a table row
6383 |+style="color: red;"|caption2
6384 |+ style="color: red;"|caption3
6390 <caption style="color: red;">caption2
6392 <caption style="color: red;">caption3
6401 Table td-cell syntax variations
6406 |style='color:red;'|baz
6407 |style='color:red;'||baz
6414 <td>foo bar foo</td>
6417 <td style="color:red;">baz
6419 <td>style='color:red;'</td>
6447 Simple table but with multiple dashes for row wikitext
6466 Multiplication table
6468 {| border="1" cellpadding="2"
6469 |+Multiplication table
6489 <table border="1" cellpadding="2">
6490 <caption>Multiplication table
6537 Accept "||" in table headings
6552 Accept "!!" in table data
6566 <tbody><tr data-parsoid='{"autoInsertedEnd":true,"autoInsertedStart":true}'><td data-parsoid='{"autoInsertedEnd":true}'> Foo!! </td><td data-parsoid='{"stx":"row","autoInsertedEnd":true}'></td></tr>
6571 Accept "||" in indented table headings
6581 </th></tr></table></dd></dl>
6586 Accept "!!" in templates
6600 <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>
6604 Accept "!!" in table headings after newline
6621 <p>b!!c</p></th></tr>
6626 Accept "!!" in table data of mixed wikitext / html syntax
6630 <tr><td>b!!c</td></tr>
6636 </th></tr><tr><td>b!!c</td></tr>
6640 <tbody><tr><th>a</th></tr>
6641 <tr data-parsoid='{"stx":"html"}'><td data-parsoid='{"stx":"html"}'>b!!c</td></tr>
6646 Accept empty attributes in td/th cells (td/th cells starting with leading ||)
6663 Accept "| !" at start of line in tables (ignore !-attribute)
6667 |!style="color:red"|bar
6679 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 +/-
6683 |style='color:red;'|+1
6684 |style='color:blue;'|-1
6696 <td style="color:red;">+1
6698 <td style="color:blue;">-1
6722 |rowspan=2|Cell 2, row 1 (and 2)
6733 <td rowspan="2">Cell 2, row 1 (and 2)
6751 {| bgcolor=#ABCDEF border=2
6756 |the original table again
6764 <table bgcolor="#ABCDEF" border="2">
6772 <td>the original table again
6778 Invalid attributes in table cell (T3830)
6792 Table cell attributes: Pipes protected by nowikis should be treated as a plain character
6796 |title="foo<nowiki>|</nowiki>" |bar
6797 |title="foo<nowiki>|</nowiki>" bar
6804 <td title="foo|">bar
6806 <td>title="foo|" bar
6811 <tbody><tr><td title="foo">bar</td>
6812 <td title="foo|" data-parsoid='{"a":{"title":"foo|"},"sa":{"title":"foo<nowiki>|</nowiki>"},"autoInsertedEnd":true}'>bar</td>
6813 <td> title="foo<span typeof="mw:Nowiki">|</span>" bar</td></tr>
6817 # See: http://lists.wikimedia.org/mailman/htdig/wikitech-l/2006-April/022293.html
6818 # N.B. The "|}" to close the table is missing from the input, so parsoid's
6819 # *2wt modes will fail.
6821 Table security: embedded pipes
6823 parsoid=wt2html,html2html
6826 | |[ftp://|x||]" onmouseover="alert(document.cookie)">test
6830 <td>[<a rel="nofollow" class="external free" href="ftp://%7Cx">ftp://%7Cx</a></td>
6831 <td>]" onmouseover="alert(document.cookie)">test
6839 <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>
6843 Element attributes with double ! should not be broken up by <th>
6846 !hi <div class="!!">ha</div> ho
6851 <th>hi <div class="!!">ha</div> ho
6856 <tbody><tr><th>hi <div class="!!" data-parsoid='{"stx":"html"}'>ha</div> ho</th></tr>
6861 ! and || in element attributes should not be parsed as <th>/<td>
6864 |<div style="color: red !important;" data-contrived="put this here ||">hi</div>
6869 <td><div style="color: red !important;" data-contrived="put this here ||">hi</div>
6874 <tbody><tr><td><div style="color: red !important;" data-contrived="put this here ||" data-parsoid='{"stx":"html"}'>hi</div></td></tr>
6878 # FIXME: The output seems broken. Filed as T110268.
6880 ! and || in td attributes should not be parsed as <th>/<td>
6885 |style="color: red !important;" data-contrived="put this here ||"|foo
6890 <td>style="color: red !important;" data-contrived="put this here</td>
6896 <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>
6901 Break on | in element attribute in template
6903 parsoid=wt2html,html2html
6905 {{echo|1=<div class="hi|ho">ha</div>}}
6907 <p>ho">ha</div>
6910 <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>
6914 Break on | in element attribute name in template
6916 {{echo|<div cla|ss="hiho">ha</div>}}
6918 <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>
6922 Don't break on | in extension attribute in template
6924 {{echo|<ref name="hi|ho">ha</ref>}}
6928 <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>
6930 <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>
6933 ## We don't support roundtripping of these attributes in Parsoid.
6934 ## Selective serialization takes care of preventing dirty diffs.
6935 ## But, on edits, we dirty-diff the invalid attribute text.
6937 Invalid text in table attributes should be discarded
6941 {| <span>boo</span> style='border:1px solid black'
6942 | <span>boo</span> style='color:blue' |1
6943 |<span>boo</span> style='color:blue'|2
6946 <table style="border:1px solid black">
6948 <td style="color:blue">1
6950 <td style="color:blue">2
6954 <table style="border:1px solid black">
6956 <td style="color:blue">1</td>
6957 <td style="color:blue">2</td>
6963 Invalid text in table attributes should be preserved by selective serializer
6966 "modes": ["selser"],
6968 ["td:first-child", "text", "abc"],
6969 ["td + td", "text", "xyz"]
6973 {| <span>boo</span> style='border:1px solid black'
6974 | <span>boo</span> style='color:blue' | 1
6975 |<span>boo</span> style='color:blue'| 2
6978 {| <span>boo</span> style='border:1px solid black'
6979 | <span>boo</span> style='color:blue' | abc
6980 |<span>boo</span> style='color:blue'| xyz
6985 1. Template-generated table cell attributes and cell content
6990 || {{table_attribs_5}}
6991 | <!--foo--> <!--bar--> <!--baz--> {{table_attribs}}
6992 |align=center {{table_attribs}}
6993 | <!--foo--> align=center <!--bar--> {{table_attribs}}
6998 <td style="color:red;">Foo
7000 <td style="color:red;">Foo
7002 <td>style="color:red;"</td>
7005 <td style="color:red;">Foo
7007 <td align="center" style="color:red;">Foo
7009 <td align="center" style="color:red;">Foo
7015 2. Template-generated table cell attributes and cell content
7018 |{{table_attribs_2}}
7023 <td style="color:red;">Foo
7031 <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>
7032 <td about="#mwt1">Bar</td><td about="#mwt1">Baz</td></tr>
7037 3. Template-generated table cell attributes and cell content
7040 !align=center {{table_header_cells}}
7042 |align=center {{table_cells}}
7047 <th align="center" style="color:red;">Foo</th>
7048 <th style="color:red;"><i>Bar</i></th>
7049 <th style="color:brown;"><i>Foo</i> and Baz
7052 <td align="center" style="color:red;">Foo</td>
7053 <td style="color:red;"><i>Bar</i></td>
7054 <td style="color:brown;"><i>Foo</i> and Baz
7059 <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>
7060 <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>
7065 4. Template-generated table cell attributes and cell content inside a templated table
7068 !align=center {{table_header_cells}}
7070 |align=center {{table_cells}}
7075 <th align="center" style="color:red;">Foo</th>
7076 <th style="color:red;"><i>Bar</i></th>
7077 <th style="color:brown;"><i>Foo</i> and Baz
7080 <td align="center" style="color:red;">Foo</td>
7081 <td style="color:red;"><i>Bar</i></td>
7082 <td style="color:brown;"><i>Foo</i> and Baz
7086 <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}}]}'>
7087 <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>
7089 <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>
7093 ## Edge case fix to prevent future regressions
7095 T107652: <ref>s in templates that also generate table cell attributes should be rendered properly
7098 |{{table_attribs_7}}
7103 <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>
7105 <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>
7109 Table with row followed by newlines and table heading
7111 parsoid=wt2html,html2html
7129 Table with empty line following the start tag
7131 parsoid=wt2html,html2html
7149 Table attributes with empty value
7151 parsoid=wt2html,html2html
7164 <tbody><tr><td style="">hello</td></tr>
7169 Wikitext table with a lot of comments
7192 Wikitext table comments represented in parsoid dom
7194 {|<!--c1--><!--c2-->
7203 </td></tr></tbody></table>
7205 <table><!--c1--><!--c2-->
7206 <tbody><tr data-parsoid='{"startTagSrc":"|-","autoInsertedEnd":true}'><!--c3-->
7207 <td data-parsoid='{"autoInsertedEnd":true}'>x</td></tr>
7212 Wikitext table with double-line table cell
7229 Table cell with a single comment
7246 Table-cell after a comment-only-empty-line
7263 <tbody><tr data-parsoid='{"autoInsertedEnd":true,"autoInsertedStart":true}'><td data-parsoid='{"autoInsertedEnd":true}'>a</td>
7265 <!--c2--><td data-parsoid='{"autoInsertedEnd":true}'>b</td></tr>
7271 Build table with {{!}}
7273 {{{!}} class="wikitable"
7276 {{!}}- style="color:red;"
7277 {{!}}data{{!}}{{!}} style="color:red;" {{!}}second data
7280 <table class="wikitable">
7286 <tr style="color:red;">
7288 <td style="color:red;">second data
7294 Build table with pipe as data
7296 {| class="wikitable"
7299 |- style="color:red;"
7300 |data|| style="color:red;" |second data
7302 | style="color:red;" |data with | || style="color:red;" | second data with |
7304 ||data with | |||second data with |
7307 <table class="wikitable">
7313 <tr style="color:red;">
7315 <td style="color:red;">second data
7318 <td style="color:red;">data with |</td>
7319 <td style="color:red;">second data with |
7322 <td>data with |</td>
7323 <td>second data with |
7329 Build table with wikilink
7331 {| class="wikitable"
7332 !header||second header
7333 |- style="color:red;"
7334 |data [[Main Page|linktext]]||second data [[Main Page|linktext]]
7336 |data||second data [[Main Page|link|text with pipe]]
7339 <table class="wikitable">
7344 <tr style="color:red;">
7345 <td>data <a href="/wiki/Main_Page" title="Main Page">linktext</a></td>
7346 <td>second data <a href="/wiki/Main_Page" title="Main Page">linktext</a>
7350 <td>second data <a href="/wiki/Main_Page" title="Main Page">link|text with pipe</a>
7355 # The expected HTML structure in this test is debatable. The PHP parser does
7356 # not parse this kind of table at all. The main focus for Parsoid is on
7357 # round-tripping, so this output is ok for now. TODO: revisit!
7359 Wikitext table with html-syntax row
7369 <td>foo</td></tr></tbody></table>
7372 ## Remex doesn't account for fostered content.
7374 Fostered content in tables: Plain text
7394 <p data-parsoid='{"fostered":true,"autoInsertedEnd":true,"autoInsertedStart":true}'>
7397 <tbody><tr class="mw-empty-elt" data-parsoid='{"startTagSrc":"|-"}'></tr></tbody></table>
7401 Fostered content in tables: Lists
7403 parsoid=wt2html,html2html
7416 <ul><li>a</li></ul><table>
7421 <ul data-parsoid='{"fostered":true,"autoInsertedEnd":true}'><li>a</li></ul><table>
7422 <tbody><tr data-parsoid='{"startTagSrc":"|-","autoInsertedEnd":true}'>
7424 </tr></tbody></table>
7428 Template generated table cell with attributes
7432 {{table_attribs_4}} ||a||b
7438 <td style="background-color:#DC241f;" width="10px"></td>
7441 </td></tr></tbody></table>
7444 <tbody><tr data-parsoid='{"startTagSrc":"|-","autoInsertedEnd":true}'>
7445 <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>
7449 Parsoid: Round-trip tables directly followed by content (T53219)
7451 parsoid=wt2html,wt2wt
7464 </td></tr></tbody></table><p> bar
7468 </td></tr></tbody></table><p><b>quux</b>
7473 Parsoid: Default to a newline after tables in new content (T53219)
7478 <tr><td>foo</td></tr></tbody></table> bar
7480 <tr><td>baz</td></tr></tbody></table><b>quux</b>
7485 <nowiki> </nowiki>bar
7493 Parsoid: Row-syntax table headings followed by comment & table cells
7495 parsoid=wt2html,wt2wt
7499 <!-- foo --> ||baz||quux
7513 <tbody><tr><th>foo</th><th>bar
7514 <!-- foo --></th><td> baz </td><td>quux</td></tr>
7519 Parsoid: Recover better from broken table attributes
7533 </td></tr></tbody></table>
7538 <p>foo</p></td></tr>
7542 # Note: PHP parser omits empty rows
7544 Tables: Digest broken attributes on table and tr tag
7560 <tr class='mw-empty-elt'></tr>
7561 <tr class='mw-empty-elt'></tr>
7566 Table with missing opening <tr> tag
7568 parsoid=wt2html,wt2wt
7576 <tbody><tr><td>foo</td>
7581 # T137406: Whitespace in the HTML
7583 1. Generate correct wikitext for tables with thead/tbody/tfoot
7588 <caption>Test</caption>
7650 </td></tr></tbody></table>
7653 # T137406: No whitespace in the HTML
7655 2. Generate correct wikitext for tables with thead/tbody/tfoot
7659 <table><thead><tr><th>heading</th></tr></thead><tbody><tr><td>foo</td></tr></tbody></table>
7669 Wikitext tables can be nested inside HTML tables
7673 <table data-parsoid='{"stx":"html"}'>
7676 <tr><td>foo</td></tr>
7694 </td></tr></tbody></table>
7703 Plain link, capitalized
7707 <p><a href="/wiki/Main_Page" title="Main Page">Main Page</a>
7712 Plain link, uncapitalized
7716 <p><a href="/wiki/Main_Page" title="Main Page">main Page</a>
7723 [[Main Page|The Main Page]]
7725 <p><a href="/wiki/Main_Page" title="Main Page">The Main Page</a>
7730 Piped link with comment in link text
7732 [[Main Page|The Main<!--front--> Page]]
7734 <p><a href="/wiki/Main_Page" title="Main Page">The Main Page</a>
7739 Piped link with multiple pipe characters in link text
7741 [[Main Page||The|Main|Page|]]
7743 <p><a href="/wiki/Main_Page" title="Main Page">|The|Main|Page|</a>
7746 <p><a rel="mw:WikiLink" href="./Main_Page" title="Main Page">|The|Main|Page|</a></p>
7750 Piped link with no link text
7752 [[Thomas Bek (bishop of St David's)|]]
7754 <p>[[Thomas Bek (bishop of St David's)|]]
7757 <p>[[Thomas Bek (bishop of St David's)|]]</p>
7761 Piped link with empty link text
7763 [[Main Page|<nowiki/>]] - empty nowiki
7764 [[Main Page| ]] - empty space
7765 [[Main Page| ]] - empty non breaking space
7767 <p><a href="/wiki/Main_Page" title="Main Page"></a> - empty nowiki
7768 <a href="/wiki/Main_Page" title="Main Page"> </a> - empty space
7769 <a href="/wiki/Main_Page" title="Main Page"> </a> - empty non breaking space
7772 <p><a rel="mw:WikiLink" href="./Main_Page" title="Main Page"><span typeof="mw:Nowiki"></span></a> - empty nowiki
7773 <a rel="mw:WikiLink" href="./Main_Page" title="Main Page"> </a> - empty space
7774 <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>
7782 <p><a href="/index.php?title=Zigzagzogzagzig&action=edit&redlink=1" class="new" title="Zigzagzogzagzig (page does not exist)">Zigzagzogzagzig</a>
7787 Broken link with fragment
7789 [[Zigzagzogzagzig#zug]]
7791 <p><a href="/index.php?title=Zigzagzogzagzig&action=edit&redlink=1" class="new" title="Zigzagzogzagzig (page does not exist)">Zigzagzogzagzig#zug</a>
7796 Special page link with fragment
7798 [[Special:Version#anchor]]
7800 <p><a href="/wiki/Special:Version#anchor" title="Special:Version">Special:Version#anchor</a>
7805 Nonexistent special page link with fragment
7807 [[Special:ThisNameWillHopefullyNeverBeUsed#anchor]]
7809 <p><a href="/wiki/Special:ThisNameWillHopefullyNeverBeUsed" class="new" title="Special:ThisNameWillHopefullyNeverBeUsed (page does not exist)">Special:ThisNameWillHopefullyNeverBeUsed#anchor</a>
7816 xxx[[main Page]], xxx[[Main Page]], Xxx[[main Page]] XXX[[main Page]], XXX[[Main Page]]
7818 <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>
7825 [[Main Page]]xxx, [[Main Page]]XXX, [[Main Page]]!!!
7827 <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>!!!
7838 T45661: Piped links with identical prefixes
7840 [[prefixed article|prefixed articles with spaces]]
7842 [[prefixed article|prefixed articlesaoeu]]
7844 [[Main Page|Main Page test]]
7846 <p><a href="/wiki/Prefixed_article" title="Prefixed article">prefixed articles with spaces</a>
7847 </p><p><a href="/wiki/Prefixed_article" title="Prefixed article">prefixed articlesaoeu</a>
7848 </p><p><a href="/wiki/Main_Page" title="Main Page">Main Page test</a>
7854 Link with HTML entity in suffix / tail
7856 [[Main Page]]", [[Main Page]]a
7858 <p><a href="/wiki/Main_Page" title="Main Page">Main Page</a>", <a href="/wiki/Main_Page" title="Main Page">Main Page</a>a
7861 <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>
7865 Link with 3 brackets
7876 Link with 4 brackets
7880 <p>[[<a href="/wiki/Main_Page" title="Main Page">Main Page</a>]]
7885 Piped link with 3 brackets
7887 [[[main page|the main page]]]
7889 <p>[[[main page|the main page]]]
7894 Piped link with extlink-like text
7897 [[Main Page|This is a [bar]]]
7900 <p><a href="/wiki/Main_Page" title="Main Page">[bar]</a>
7901 <a href="/wiki/Main_Page" title="Main Page">This is a [bar]</a>
7902 <a href="/wiki/Main_Page" title="Main Page">[bar</a>
7905 <p><a rel="mw:WikiLink" href="./Main_Page" title="Main Page" data-parsoid='{"stx":"piped"}'>[bar]</a>
7906 <a rel="mw:WikiLink" href="./Main_Page" title="Main Page" data-parsoid='{"stx":"piped"}'>This is a [bar]</a>
7907 <a rel="mw:WikiLink" href="./Main_Page" title="Main Page" data-parsoid='{"stx":"piped"}'>[bar</a></p>
7911 Link with multiple pipes
7913 [[Main Page|The|Main|Page]]
7915 <p><a href="/wiki/Main_Page" title="Main Page">The|Main|Page</a>
7920 Anchor containing a #. (T65430)
7922 wgFragmentMode=[ 'html5', 'legacy' ]
7924 [[Main Page#And#Link]]
7926 <p><a href="/wiki/Main_Page#And#Link" title="Main Page">Main Page#And#Link</a>
7929 <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>
7935 [[Talk:Parser testing]], [[Meta:Disclaimers]]
7937 <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>
7942 Link with space in namespace
7944 [[User talk:Foo bar]]
7946 <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>
7951 MemoryAlpha:AlphaTest
7953 This is an article in the MemoryAlpha namespace
7954 (which shadows the memoryalpha interwiki link).
7958 Namespace takes precedence over interwiki link (T53680)
7960 [[MemoryAlpha:AlphaTest]]
7962 <p><a href="/wiki/MemoryAlpha:AlphaTest" title="MemoryAlpha:AlphaTest">MemoryAlpha:AlphaTest</a>
7966 # The previous test doesn't work correctly in html2*, due to not recognizing the
7967 # link as an internal one. This one checks for the correct behavior.
7969 Link to namespace preferred over interwiki with correct rel attribute
7971 parsoid=html2wt,html2html
7973 <p><a rel="mw:WikiLink" href="./MemoryAlpha:AlphaTest" title="MemoryAlpha:AlphaTest">MemoryAlpha:AlphaTest</a></p>
7975 [[MemoryAlpha:AlphaTest]]
7979 Piped link to namespace
7981 [[Meta:Disclaimers|The disclaimers]]
7983 <p><a href="/index.php?title=Meta:Disclaimers&action=edit&redlink=1" class="new" title="Meta:Disclaimers (page does not exist)">The disclaimers</a>
7990 [[Usually caused by a typo (oops}]]
7992 <p>[[Usually caused by a typo (oops}]]
7999 Just a test of an article title containing a percent.
8003 Link containing % (not as a hex sequence)
8006 [[7% Solution|7%25 Solution]]
8008 <p><a href="/wiki/7%25_Solution" title="7% Solution">7% Solution</a>
8009 <a href="/wiki/7%25_Solution" title="7% Solution">7%25 Solution</a>
8012 <p><a rel="mw:WikiLink" href="./7%25_Solution" title="7% Solution">7% Solution</a>
8013 <a rel="mw:WikiLink" href="./7%25_Solution" title="7% Solution">7%25 Solution</a></p>
8016 # note that the parsoid HTML is identical to the previous test output,
8017 # so the previous test ensures that the html2wt mode will generate the
8018 # "not as a hex sequence" wikitext.
8020 Link containing % as a single hex sequence interpreted to char
8022 parsoid=wt2wt,wt2html,html2html
8025 [[7%25 Solution|7%25 Solution]]
8027 <p><a href="/wiki/7%25_Solution" title="7% Solution">7% Solution</a>
8028 <a href="/wiki/7%25_Solution" title="7% Solution">7%25 Solution</a>
8031 <p><a rel="mw:WikiLink" href="./7%25_Solution" title="7% Solution">7% Solution</a>
8032 <a rel="mw:WikiLink" href="./7%25_Solution" title="7% Solution">7%25 Solution</a></p>
8036 Link containing % as a double hex sequence interpreted to hex sequence
8040 <p>[[7%2525 Solution]]
8044 ## Example for such a section: == < ==
8046 Link containing "#<" and "#>" % as a hex sequences- these are valid section anchors
8050 wgFragmentMode=[ 'html5', 'legacy' ]
8052 [[%23%3c]][[%23%3e]]
8054 <p><a href="#<">#<</a><a href="#>">#></a>
8057 <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>
8060 ## Example for such a section: == < ==
8062 Link containing "#<" and "#>" % as a hex sequences- these are valid section anchors (legacy)
8064 wgFragmentMode=[ 'legacy' ]
8066 [[%23%3c]][[%23%3e]]
8068 <p><a href="#.3C">#<</a><a href="#.3E">#></a>
8073 Link containing "<#" and ">#" as a hex sequences
8075 [[%3c%23]][[%3e%23]]
8077 <p>[[%3c%23]][[%3e%23]]
8082 Link containing an equals sign
8084 [[Special:BookSources/isbn=4-00-026157-6]]
8086 <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>
8089 <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>
8095 Just a test of an article title containing an ampersand
8099 Link containing an ampersand
8105 [[Foo &amp; bar]]
8107 <p><a href="/wiki/Foo_%26_bar" title="Foo & bar">Foo & bar</a>
8108 </p><p><a href="/wiki/Foo_%26_bar" title="Foo & bar">Foo & bar</a>
8109 </p><p>[[Foo &amp; bar]]
8112 <p><a rel="mw:WikiLink" href="./Foo_&_bar" title="Foo & bar">Foo & bar</a></p>
8113 <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>
8114 <p>[[Foo <span typeof="mw:Entity" data-parsoid='{"src":"&amp;","srcContent":"&"}'>&</span>amp; bar]]</p>
8120 Just a test of an article title containing a tilde.
8123 # note that links containing signatures, like [[Foo~~~~]], are
8124 # massaged by the pre-save transform (PST) and so the tildes are never
8125 # seen by the parser.
8127 Link containing a tilde
8131 <p><a href="/wiki/Foo~bar" title="Foo~bar">Foo~bar</a>
8134 <p><a rel="mw:WikiLink" href="./Foo~bar" title="Foo~bar">Foo~bar</a></p>
8138 Link containing double-single-quotes '' (T6598)
8140 [[Lista d''e paise d''o munno]]
8142 <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>
8145 <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>
8149 Link containing double quotes and spaces
8153 <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>
8156 <p><a rel="mw:WikiLink" href='./Cool_"Gator"' title='Cool "Gator"'>Cool "Gator"</a></p>
8160 File containing double quotes and spaces
8162 [[File:Cool "Gator".png]]
8164 <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>
8168 Redirect containing double quotes and spaces
8170 #REDIRECT [[Cool "Gator"]]
8172 <link rel="mw:PageProp/redirect" href="./Cool_%22Gator%22" data-parsoid='{"src":"#REDIRECT ","a":{"href":"./Cool_%22Gator%22"},"sa":{"href":"Cool \"Gator\""}}'/>
8176 Link containing double-single-quotes '' in text (T6598 sanity check)
8178 Some [[Link|pretty ''italics'' and stuff]]!
8180 <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>!
8183 <p>Some <a rel="mw:WikiLink" href="./Link" title="Link">pretty <i>italics</i> and stuff</a>!</p>
8187 Link containing double-single-quotes '' in text embedded in italics (T6598 sanity check)
8189 ''Some [[Link|pretty ''italics'' and stuff]]!''
8191 <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>
8196 Link with double quotes in title part (literal) and alternate part (interpreted)
8198 [[File:Denys_Savchenko_''Pentecoste''.jpg]]
8202 [[''Pentecoste''|Pentecoste]]
8204 [[''Pentecoste''|''Pentecoste'']]
8206 <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>
8207 </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>
8208 </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>
8209 </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>
8212 <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>
8213 <p><a rel="mw:WikiLink" href="./''Pentecoste''" title="''Pentecoste''">''Pentecoste''</a></p>
8214 <p><a rel="mw:WikiLink" href="./''Pentecoste''" title="''Pentecoste''">Pentecoste</a></p>
8215 <p><a rel="mw:WikiLink" href="./''Pentecoste''" title="''Pentecoste''"><i>Pentecoste</i></a></p>
8219 Broken image links with HTML captions (T41700)
8221 [[File:Nonexistent|<script></script>]]
8222 [[File:Nonexistent|100x100px|<script></script>]]
8223 [[File:Nonexistent|<]]
8224 [[File:Nonexistent|a<i>b</i>c]]
8226 <p><a href="/index.php?title=Special:Upload&wpDestFile=Nonexistent" class="new" title="File:Nonexistent"><script></script></a>
8227 <a href="/index.php?title=Special:Upload&wpDestFile=Nonexistent" class="new" title="File:Nonexistent"><script></script></a>
8228 <a href="/index.php?title=Special:Upload&wpDestFile=Nonexistent" class="new" title="File:Nonexistent"><</a>
8229 <a href="/index.php?title=Special:Upload&wpDestFile=Nonexistent" class="new" title="File:Nonexistent">abc</a>
8232 <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>
8233 <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>
8234 <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>
8235 <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>
8241 [[http://www.example.com]]
8243 <p>[<a rel="nofollow" class="external autonumber" href="http://www.example.com">[1]</a>]
8246 <p>[<a rel="mw:ExtLink" class="external autonumber" href="http://www.example.com"></a>]</p>
8250 Plain link to URL with link text
8252 [[http://www.example.com Link text]]
8254 <p>[<a rel="nofollow" class="external text" href="http://www.example.com">Link text</a>]
8259 Plain link to protocol-relative URL
8261 [[//www.example.com]]
8263 <p>[<a rel="nofollow" class="external autonumber" href="//www.example.com">[1]</a>]
8266 <p>[<a rel="mw:ExtLink" class="external autonumber" href="//www.example.com"></a>]</p>
8270 Plain link to protocol-relative URL with link text
8272 [[//www.example.com Link text]]
8274 <p>[<a rel="nofollow" class="external text" href="//www.example.com">Link text</a>]
8279 Plain link to page with question mark in title
8285 <p><a href="/wiki/A%3Fb" title="A?b">A?b</a>
8286 </p><p><a href="/wiki/A%3Fb" title="A?b">Baz</a>
8290 # I'm fairly sure the expected result here is wrong.
8291 # We want these to be URL links, not pseudo-pages with URLs for titles....
8292 # However the current output is also pretty screwy.
8295 # I'm changing it to match the current output--it arguably makes more
8296 # sense in the light of the test above. Old expected result was:
8297 #<p>Piped link to URL: <a href="/index.php?title=Http://www.example.com&action=edit" class="new">an example URL</a>
8299 # But I think this test is bordering on "garbage in, garbage out" anyway.
8304 Piped link to URL: [[http://www.example.com|an example URL]]
8306 <p>Piped link to URL: [<a rel="nofollow" class="external text" href="http://www.example.com%7Can">example URL</a>]
8309 <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>
8313 Plain link in template argument
8317 {{echo|[http://www.example.com |123]}}
8319 {{echo|[[http://www.example.com |123]]}}
8321 {{echo|[[http://www.example.com |123]}}
8323 {{echo|[http://www.example.com |123]]}}
8325 <p>[<a rel="nofollow" class="external free" href="http://www.example.com">http://www.example.com</a>
8326 </p><p>[<a rel="nofollow" class="external text" href="http://www.example.com">|123</a>]
8327 </p><p>{{echo|[<a rel="nofollow" class="external text" href="http://www.example.com">|123</a>}}
8328 </p><p>[<a rel="nofollow" class="external free" href="http://www.example.com">http://www.example.com</a>
8331 <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>
8333 <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>
8335 <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>
8337 <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>
8341 T2002: [[page|http://url/]] should link to page, not http://url/
8343 [[Main Page|http://url/]]
8345 <p><a href="/wiki/Main_Page" title="Main Page">http://url/</a>
8348 <p><a rel="mw:WikiLink" href="./Main_Page" title="Main Page">http://url/</a></p>
8351 # Parsoid does not mark self-links, by design.
8353 T2337: Escaped self-links should be bold
8357 [[Bug462]] [[Bug462]]
8359 <p><a class="mw-selflink selflink">Bug462</a> <a class="mw-selflink selflink">Bug462</a>
8362 <p><a rel="mw:WikiLink" href="./Bug462" title="Bug462">Bug462</a> <a rel="mw:WikiLink" href="./Bug462" title="Bug462">Bug462</a></p>
8366 Self-link to section should not be bold
8370 [[Main Page#section]]
8372 <p><a href="/wiki/Main_Page#section" title="Main Page">Main Page#section</a>
8383 Self-link to numeric title
8389 <p><a class="mw-selflink selflink">0</a>
8394 Link to numeric-equivalent title
8400 <p><a href="/wiki/00" title="00">00</a>
8405 <nowiki> inside a link
8407 [[Main<nowiki> Page</nowiki>]] [[Main Page|the main page <nowiki>[it's not very good]</nowiki>]]
8409 <p>[[Main Page]] <a href="/wiki/Main_Page" title="Main Page">the main page [it's not very good]</a>
8414 Non-breaking spaces in title
8416 [[ Main Page ]]
8418 <p><a href="/wiki/Main_Page" title="Main Page">  Main   Page  </a>
8422 # Add new article for the test below so that it doesn't red-link
8430 Multiple spaces in titles should normalize to a single underscore
8432 parsoid=wt2html,wt2wt
8438 <p><a href="/wiki/Foo_bar_baz" title="Foo bar baz">x</a>
8439 <a href="/wiki/Foo_bar_baz" title="Foo bar baz">x</a>
8440 <a href="/wiki/Foo_bar_baz" title="Foo bar baz">x</a>
8443 <p><a rel="mw:WikiLink" href="./Foo_bar_baz" title="Foo bar baz">x</a>
8444 <a rel="mw:WikiLink" href="./Foo_bar_baz" title="Foo bar baz">x</a>
8445 <a rel="mw:WikiLink" href="./Foo_bar_baz" title="Foo bar baz">x</a>
8450 Internal link with ca linktrail, surrounded by bold apostrophes (T29473 primary issue)
8456 <p><b><a href="/wiki/Main_Page" title="Main Page">Main Page</a></b>
8461 Internal link with ca linktrail, surrounded by italic apostrophes (T29473 primary issue)
8467 <p><i><a href="/wiki/Main_Page" title="Main Page">Main Page</a></i>
8472 Internal link with en linktrail: no apostrophes (T29473)
8478 <p><a href="/index.php?title=Something&action=edit&redlink=1" class="new" title="Something (page does not exist)">Something</a>'nice
8483 Internal link with ca linktrail with apostrophes (T29473)
8489 <p><a href="/index.php?title=Something&action=edit&redlink=1" class="new" title="Something (encara no existeix)">Something'nice</a>
8494 Internal link with kaa linktrail with apostrophes (T29473)
8500 <p><a href="/index.php?title=Something&action=edit&redlink=1" class="new" title="Something (bet ele jaratılmag'an)">Something'nice</a>
8505 Link with multiple ":" in a subpage-supporting namespace (T65636)
8507 [[User:Foo/Test/63636:Bar|Test]]
8509 <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>
8512 <p><a rel="mw:WikiLink" href="./User:Foo/Test/63636:Bar" title="User:Foo/Test/63636:Bar">Test</a></p>
8515 ## Mainly a sanity check for Parsoid
8517 Handle title parsing for subpages
8537 Link to a subpage from a namespace other than main
8544 <p><a href="/wiki/User:Test/123" title="User:Test/123">/123</a>
8547 <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>
8551 Ensure that transclusion titles are not url-decoded
8553 subpage title=[[Test]]
8556 {{Bar%C3%A9}} {{/Bar%C3%A9}}
8558 <p>{{Bar%C3%A9}} {{/Bar%C3%A9}}
8561 <p>{{Bar%C3%A9}} {{/Bar%C3%A9}}</p>
8565 Purely hash wikilink
8567 title=[[User:Test/123]]
8572 <p><a href="#a">b</a>
8575 <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>
8579 Serialization of purely hash wikilink
8581 title=[[User:Test/123]]
8585 <p><a href="#a">[[</a></p>
8587 [[#a|<nowiki>[[</nowiki>]]
8589 <p><a href="#a">[[</a>
8594 1. Interaction of linktrail and template encapsulation
8598 <p><a href="/wiki/Foo" title="Foo">Fool</a>
8601 <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>
8605 2. Interaction of linktrail and template encapsulation
8607 {{echo|Some [[Fool]]}}s
8609 <p>Some <a href="/index.php?title=Fool&action=edit&redlink=1" class="new" title="Fool (page does not exist)">Fools</a>
8612 <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>
8616 3. Interaction of linktrail and template encapsulation
8618 {{echo|Some [[Fool]]s are '''bold and foolish'''}}
8620 <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>
8623 <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>
8633 Internal link with is link prefix
8637 Aðrir mótmælenda[[söfnuður|söfnuðir]] og
8639 <p>Aðrir <a href="/wiki/S%C3%B6fnu%C3%B0ur" title="Söfnuður">mótmælendasöfnuðir</a> og
8650 Internal link with is link trail and link prefix
8654 [[mótmælendatrú|xxx]]ar
8656 mótmælenda[[söfnuður]]
8657 mótmælenda[[söfnuður|söfnuðir]]
8658 mótmælenda[[söfnuður|söfnuðir]]xxx
8660 <p><a href="/wiki/M%C3%B3tm%C3%A6lendatr%C3%BA" title="Mótmælendatrú">xxxar</a>
8661 <a href="/wiki/M%C3%B3tm%C3%A6lendatr%C3%BA" title="Mótmælendatrú">mótmælendatrúar</a>
8662 <a href="/wiki/S%C3%B6fnu%C3%B0ur" title="Söfnuður">mótmælendasöfnuður</a>
8663 <a href="/wiki/S%C3%B6fnu%C3%B0ur" title="Söfnuður">mótmælendasöfnuðir</a>
8664 <a href="/wiki/S%C3%B6fnu%C3%B0ur" title="Söfnuður">mótmælendasöfnuðirxxx</a>
8669 Parsoid link trail escaping
8671 parsoid=html2wt,html2html
8673 <p><a rel="mw:WikiLink" href="./Apple" title="Apple">apple</a>s</p>
8679 Parsoid link prefix escaping
8682 parsoid=html2wt,html2html
8684 <p>Aðrir mótmælenda<a rel="mw:WikiLink" href="./Söfnuður" title="Söfnuður">söfnuður</a></p>
8686 Aðrir mótmælenda<nowiki/>[[söfnuður]]
8690 Parsoid link bracket escaping
8692 parsoid=html2wt,html2html
8694 <p><a rel="mw:WikiLink" href="./Test" title="Test">Test</a></p>
8695 <p>[<a rel="mw:WikiLink" href="./Test" title="Test">Test</a>]</p>
8696 <p>[[<a rel="mw:WikiLink" href="./Test" title="Test">Test</a>]]</p>
8697 <p>[[[<a rel="mw:WikiLink" href="./Test" title="Test">Test</a>]]]</p>
8698 <p>[[[[<a rel="mw:WikiLink" href="./Test" title="Test">Test</a>]]]]</p>
8699 <p>[[[[[<a rel="mw:WikiLink" href="./Test" title="Test">Test</a>]]]]]</p>
8707 [[[<nowiki/>[[Test]]]]]
8711 [[[[[<nowiki/>[[Test]]]]]]]
8715 Parsoid-centric test: Whitespace in ext- and wiki-links should be preserved
8723 [http://wp.org ''foo'']
8725 <p><a href="/wiki/Foo" title="Foo"> bar</a>
8726 </p><p><a href="/wiki/Foo" title="Foo"> <i>bar</i></a>
8727 </p><p><a rel="nofollow" class="external text" href="http://wp.org">foo</a>
8728 </p><p><a rel="nofollow" class="external text" href="http://wp.org"><i>foo</i></a>
8733 Parsoid: Scoped parsing should handle mixed transclusions and plain text
8735 [[Foo|{{echo|a}} b {{echo|c}}]]
8737 <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>
8741 Link with angle bracket after anchor
8743 wgFragmentMode=[ 'html5', 'legacy' ]
8747 <p><a href="/wiki/Foo#<bar>" title="Foo">Foo#<bar></a>
8750 <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>
8754 Link with angle bracket after anchor (legacy)
8756 wgFragmentMode=[ 'legacy' ]
8760 <p><a href="/wiki/Foo#.3Cbar.3E" title="Foo">Foo#<bar></a>
8765 ### Interwiki links (see maintenance/interwiki.sql)
8769 Inline interwiki link
8771 parsoid=wt2html,wt2wt,html2html
8773 [[MeatBall:SoftSecurity]]
8775 <p><a href="http://www.usemod.com/cgi-bin/mb.pl?SoftSecurity" class="extiw" title="meatball:SoftSecurity">MeatBall:SoftSecurity</a>
8778 <p><a rel="mw:WikiLink/Interwiki" href="http://www.usemod.com/cgi-bin/mb.pl?SoftSecurity" title="meatball:SoftSecurity">MeatBall:SoftSecurity</a></p>
8782 Inline interwiki link with empty title (T4372)
8784 parsoid=wt2html,wt2wt,html2html
8788 <p><a href="http://www.usemod.com/cgi-bin/mb.pl" class="extiw" title="meatball:">MeatBall:</a>
8791 <p><a rel="mw:WikiLink/Interwiki" href="http://www.usemod.com/cgi-bin/mb.pl?" title="meatball:">MeatBall:</a></p>
8794 ## html2wt and html2html will fail because we will prefer the :en: interwiki prefix over wikipedia:
8796 Interwiki link encoding conversion (T3636)
8798 parsoid=wt2html,wt2wt
8800 *[[Wikipedia:ro:Olteniţa]]
8801 *[[Wikipedia:ro:Olteniţa]]
8803 <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>
8804 <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>
8807 <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>
8808 <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>
8811 <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>
8812 <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>
8817 Interwiki link with fragment (T4130)
8819 [[MeatBall:SoftSecurity#foo]]
8821 <p><a href="http://www.usemod.com/cgi-bin/mb.pl?SoftSecurity#foo" class="extiw" title="meatball:SoftSecurity">MeatBall:SoftSecurity#foo</a>
8826 Link scenarios with escaped fragments
8830 wgFragmentMode=[ 'html5', 'legacy' ]
8833 [[Foo#Is this great?]]
8834 [[meatball:Foo#Is this great?]]
8836 <p><a href="#Is_this_great?">#Is this great?</a>
8837 <a href="/wiki/Foo#Is_this_great?" title="Foo">Foo#Is this great?</a>
8838 <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>
8841 <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>
8842 <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>
8843 <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>
8847 Link scenarios with escaped fragments (legacy)
8849 wgFragmentMode=[ 'legacy' ]
8852 [[Foo#Is this great?]]
8853 [[meatball:Foo#Is this great?]]
8855 <p><a href="#Is_this_great.3F">#Is this great?</a>
8856 <a href="/wiki/Foo#Is_this_great.3F" title="Foo">Foo#Is this great?</a>
8857 <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>
8861 # Ideally the wikipedia: prefix here should be proto-relative too
8862 # [CSA]: this is kind of a bogus test, as the PHP parser test doesn't
8863 # define the 'en' prefix, and originally the test used 'wikipedia',
8864 # which isn't a localinterwiki prefix hence the links to the 'en:Foo'
8867 Different interwiki prefixes mapping to the same URL
8875 [[:wikipedia:Foo|Foo]]
8877 [[wikipedia:en:Foo]]
8879 [[:wikipedia:en:Foo]]
8883 <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>
8885 <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>
8887 <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>
8889 <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>
8891 <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>
8893 <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>
8895 <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>
8899 Interwiki links that cannot be represented in wiki syntax
8902 [[meatball:ok#foo|ok with fragment]]
8903 [[meatball:ok_as_well?|ok ending with ? mark]]
8904 [http://de.wikipedia.org/wiki/Foo?action=history has query]
8905 [http://de.wikipedia.org/wiki/#foo is just fragment]
8908 <p><a href="http://www.usemod.com/cgi-bin/mb.pl?ok" class="extiw" title="meatball:ok">meatball:ok</a>
8909 <a href="http://www.usemod.com/cgi-bin/mb.pl?ok#foo" class="extiw" title="meatball:ok">ok with fragment</a>
8910 <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>
8911 <a rel="nofollow" class="external text" href="http://de.wikipedia.org/wiki/Foo?action=history">has query</a>
8912 <a rel="nofollow" class="external text" href="http://de.wikipedia.org/wiki/#foo">is just fragment</a>
8915 <p><a rel="mw:WikiLink/Interwiki" href="http://www.usemod.com/cgi-bin/mb.pl?ok" title="meatball:ok">meatball:ok</a>
8916 <a rel="mw:WikiLink/Interwiki" href="http://www.usemod.com/cgi-bin/mb.pl?ok#foo" title="meatball:ok">ok with fragment</a>
8917 <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>
8918 <a rel="mw:ExtLink" class="external text" href="http://de.wikipedia.org/wiki/Foo?action=history">has query</a>
8919 <a rel="mw:ExtLink" class="external text" href="http://de.wikipedia.org/wiki/#foo">is just fragment</a></p>
8923 Interwiki links: trail
8925 [[wikipedia:Foo|Ba]]r
8927 <p><a href="http://en.wikipedia.org/wiki/Foo" class="extiw" title="wikipedia:Foo">Bar</a>
8930 <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>
8934 Local interwiki link
8936 parsoid=wt2html,wt2wt,html2html
8938 [[local:Template:Foo]]
8940 <p><a href="/wiki/Template:Foo" title="Template:Foo">local:Template:Foo</a>
8943 <p><a rel="mw:WikiLink" href="./Template:Foo" title="Template:Foo">local:Template:Foo</a></p>
8946 # Parsoid does not mark self-links, by design.
8948 Local interwiki link: self-link to current page
8951 parsoid=wt2html,wt2wt,html2html
8955 <p><a class="mw-selflink selflink">local:Main Page</a>
8958 <p><a rel="mw:WikiLink" href="./Main_Page" title="Main Page">local:Main Page</a></p>
8962 Local interwiki link: prefix only (T66167)
8964 parsoid=wt2html,wt2wt,html2html
8968 <p><a href="/wiki/Main_Page" title="Main Page">local:</a>
8971 <p><a rel="mw:WikiLink" href="./Main_Page" title="Main Page">local:</a></p>
8975 Local interwiki link: with additional interwiki prefix (T63357)
8977 parsoid=wt2html,wt2wt,html2html
8979 [[local:meatball:Hello]]
8981 <p><a href="http://www.usemod.com/cgi-bin/mb.pl?Hello" class="extiw" title="meatball:Hello">local:meatball:Hello</a>
8984 <p><a rel="mw:WikiLink/Interwiki" href="http://www.usemod.com/cgi-bin/mb.pl?Hello" title="meatball:Hello">local:meatball:Hello</a></p>
8988 Multiple local interwiki link prefixes
8990 [[local:local:local:local:mi:local:Foo]]
8992 parsoid=wt2html,wt2wt,html2html
8994 <p><a href="/wiki/Foo" title="Foo">local:local:local:local:mi:local:Foo</a>
8997 <p><a rel="mw:WikiLink" href="./Foo" title="Foo">local:local:local:local:mi:local:Foo</a></p>
9001 Interwiki link with percent encoded target
9003 [[:es:Nueva Guip%C3%BAzcoa|Nueva Guipúzcoa]]
9005 <p><a href="http://es.wikipedia.org/wiki/Nueva_Guip%C3%BAzcoa" class="extiw" title="es:Nueva Guipúzcoa">Nueva Guipúzcoa</a>
9008 <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>
9012 ### Interlanguage links
9013 ### Language links (so that searching for '### language' matches..)
9025 <p>Blah blah blah</p>
9026 <link rel="mw:PageProp/Language" href="http://zh.wikipedia.org/wiki/Chinese"/>
9029 ## parsoid html2wt will lose the space variations
9031 Interlanguage link with spacing
9033 parsoid=wt2html,wt2wt,html2html
9041 <p>Blah blah blah</p>
9042 <link rel="mw:PageProp/Language" href="http://zh.wikipedia.org/wiki/Chinese"/>
9046 Double interlanguage link
9055 <p>Blah blah blah</p>
9056 <link rel="mw:PageProp/Language" href="http://es.wikipedia.org/wiki/Spanish"/>
9057 <link rel="mw:PageProp/Language" href="http://zh.wikipedia.org/wiki/Chinese"/>
9060 ## parsoid html2wt will lose the space variations
9062 Interlanguage link variations
9064 parsoid=wt2html,wt2wt,html2html
9074 <p>Blah blah blah</p>
9075 <link rel="mw:PageProp/Language" href="http://es.wikipedia.org/wiki/Spanish" />
9076 <link rel="mw:PageProp/Language" href="http://zh.wikipedia.org/wiki/Chinese" />
9077 <link rel="mw:PageProp/Language" href="http://es.wikipedia.org/wiki/Foo_bar" />
9081 Escaping of interlanguage links (T129218, T156308)
9085 [[ : zh : Chinese ]]
9088 <a href="http://es.wikipedia.org/wiki/Spanish" class="extiw" title="es:Spanish">es:Spanish</a>
9089 <a href="http://zh.wikipedia.org/wiki/Chinese" class="extiw" title="zh:Chinese"> zh : Chinese </a>
9093 <a rel="mw:WikiLink/Interwiki" href="http://es.wikipedia.org/wiki/Spanish" title="es:Spanish">es:Spanish</a>
9094 <a rel="mw:WikiLink/Interwiki" href="http://zh.wikipedia.org/wiki/Chinese" title="zh:Chinese"> zh : Chinese </a></p>
9098 Multiple colons escaping interlanguage links
9106 <p><a href="http://es.wikipedia.org/wiki/Spanish" class="extiw" title="es:Spanish">es:Spanish</a>
9111 <p><a rel="mw:WikiLink/Interwiki" href="http://es.wikipedia.org/wiki/Spanish" title="es:Spanish">es:Spanish</a>
9113 [[:::es:Spanish]]</p>
9116 ## parsoid html2wt will normalize the space to _
9118 Space and question mark encoding in interlanguage links (T95473)
9120 parsoid=wt2html,wt2wt,html2html
9128 <p>Blah blah blah</p>
9129 <link rel="mw:PageProp/Language" href="http://es.wikipedia.org/wiki/Foo_bar%3F" />
9133 Interlanguage link, with prefix links
9143 <p>Blah blah blah</p>
9144 <link rel="mw:PageProp/Language" href="http://zh.wikipedia.org/wiki/Chinese"/>
9148 Double interlanguage link, with prefix links (T10897)
9159 <p>Blah blah blah</p>
9160 <link rel="mw:PageProp/Language" href="http://es.wikipedia.org/wiki/Spanish"/>
9161 <link rel="mw:PageProp/Language" href="http://zh.wikipedia.org/wiki/Chinese"/>
9165 "Extra" interlanguage links (T34189 / gerrit 111390)
9173 <p>Blah blah blah</p>
9174 <link rel="mw:PageProp/Language" title="Multilingual" href="http://wikisource.org/wiki/Article"/>
9177 ## PHP parser tests script needs an update
9178 ## Parsoid html2wt will normalize output to [[:zh:Chinese]]
9180 Language links render as inline links if $wgInterwikiMagic=false
9182 wgInterwikiMagic=false
9183 parsoid=wt2html,wt2wt,html2html
9188 <p>Blah blah blah <a rel="mw:WikiLink/Interwiki" href="http://zh.wikipedia.org/wiki/Chinese" title="zh:Chinese">zh:Chinese</a></p>
9191 ## PHP parser tests script needs an update
9192 ## Parsoid html2wt will normalize output to [[:zh:Chinese]]
9194 Language links render as inline links in the Talk namespace
9197 parsoid=wt2html,wt2wt,html2html
9202 <p>Blah blah blah <a rel="mw:WikiLink/Interwiki" href="http://zh.wikipedia.org/wiki/Chinese" title="zh:Chinese">zh:Chinese</a></p>
9206 Parsoid-specific test: Wikilinks with should RT properly
9212 <p><a href="/index.php?title=WW_II&action=edit&redlink=1" class="new" title="WW II (lonkásá ezalí tɛ̂)">WW II</a>
9217 Parsoid T55221: Wikilinks should be properly entity-escaped
9219 parsoid={ "modes": ["html2wt"], "suppressErrors": true }
9221 <p>He&nbsp;llo <a href="./Foo" rel="mw:WikiLink">He&nbsp;llo</a></p>
9222 <p>He&nbsp;llo <a href="./He&nbsp;llo" rel="mw:WikiLink">He&nbsp;llo</a></p>
9224 He&nbsp;llo [[Foo|He&nbsp;llo]]
9226 He&nbsp;llo He&nbsp;llo
9228 <p>He&nbsp;llo <a href="/wiki/Foo" title="Foo">He&nbsp;llo</a>
9229 </p><p>He&nbsp;llo He&nbsp;llo
9233 # html2wt will fail because of title normalization without data-parsoid
9235 Parsoid: handle constructor well
9237 parsoid=wt2html,wt2wt
9243 <p><a href="/index.php?title=Constructor&action=edit&redlink=1" class="new" title="Constructor (page does not exist)">constructor</a>
9244 </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>
9247 <p><a rel="mw:WikiLink" href="./Constructor" title="Constructor" data-parsoid='{"stx":"simple","a":{"href":"./Constructor"},"sa":{"href":"constructor"}}'>constructor</a></p>
9249 <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>
9253 Template parameter named "constructor"
9255 {{echo| constructor = |hi}}
9257 <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>
9266 # Note that `ko` isn't a known interlanguage prefix
9268 Parsoid: recognize interlanguage links without a target page
9278 <link rel="mw:PageProp/Language" href="http://es.wikipedia.org/wiki/"/>
9280 <p><a rel="mw:WikiLink" href="./Ko:" title="Ko:">ko:</a></p>
9283 # Note that `ko` isn't a known interwiki prefix
9285 Parsoid: recognize interwiki links without a target page
9287 parsoid=wt2html,wt2wt,html2html
9293 <p><a href="http://es.wikipedia.org/wiki/" class="extiw" title="es:">es:</a>
9294 </p><p><a href="/wiki/Ko:" title="Ko:">ko:</a>
9297 <p><a rel="mw:WikiLink/Interwiki" href="http://es.wikipedia.org/wiki/" title="es:">es:</a></p>
9298 <p><a rel="mw:WikiLink" href="./Ko:" title="Ko:">ko:</a></p>
9302 Handle interwiki links pointing to the current wiki as plain wiki links (T47209)
9306 <p><a href="/wiki/Foo" title="Foo">mi:Foo</a>
9309 <p><a rel="mw:WikiLink" href="./Foo" title="Foo" data-parsoid='{"stx":"simple","a":{"href":"./Foo"},"sa":{"href":"mi:Foo"}}'>mi:Foo</a></p>
9313 Interlanguage link with preceding local interwiki link (T70085)
9315 parsoid=wt2html,wt2wt,html2html
9318 [[local:es:Spanish]]
9321 <a href="http://es.wikipedia.org/wiki/Spanish" class="extiw" title="es:Spanish">local:es:Spanish</a>
9325 <a rel="mw:WikiLink/Interwiki" href="http://es.wikipedia.org/wiki/Spanish" title="es:Spanish">local:es:Spanish</a></p>
9329 Looks like an interlanguage link, but is actually a local interwiki
9331 parsoid=wt2html,wt2wt,html2html
9337 <a href="/wiki/Template:Foo" title="Template:Foo">mi:Template:Foo</a>
9341 <a rel="mw:WikiLink" href="./Template:Foo" title="Template:Foo">mi:Template:Foo</a></p>
9345 ### Redirects, Parsoid-only
9349 1. Simple redirect to page
9351 #REDIRECT [[Main Page]]
9353 <link rel="mw:PageProp/redirect" href="./Main_Page"/>
9357 2. Other redirect variants
9359 #REDIRECT [[Main_Page]]
9361 <link rel="mw:PageProp/redirect" href="./Main_Page" data-parsoid='{"src":"#REDIRECT ","a":{"href":"./Main_Page"},"sa":{"href":"Main_Page"}}'/>
9364 # Not a valid redirect in PHP (although perhaps it was, once upon a time)
9365 # This tests the Parsoid bail-out code.
9367 3. Other redirect variants
9371 #REDIRECT [[<nowiki>[[Bar]]</nowiki>]]
9373 <ol><li>REDIRECT [[<span typeof="mw:Nowiki">[[Bar]]</span>]]</li></ol>
9377 4. Redirect to a templated destination
9379 #REDIRECT [[{{echo|Foo}}bar]]
9381 <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"}]]}'/>
9387 parsoid=wt2html,wt2wt
9392 <li>REDIRECT [[]]</li></ol>
9396 Optional colon in #REDIRECT
9398 # the colon is archaic syntax. we support it for wt2html, but we
9399 # don't care that it roundtrips back to the modern syntax.
9400 parsoid=wt2html,html2html
9402 #REDIRECT:[[Main Page]]
9404 <link rel="mw:PageProp/redirect" href="./Main_Page"/>
9408 Whitespace in #REDIRECT with optional colon
9410 # the colon and gratuitous whitespace is archaic syntax. we support
9411 # it for wt2html, but we don't care that it roundtrips back to the
9412 # modern syntax (without extra whitespace)
9413 parsoid=wt2html,html2html
9420 <link rel="mw:PageProp/redirect" href="./Main_Page"/>
9424 Piped link in #REDIRECT
9426 # content after piped link is ignored. we support this syntax,
9427 # but don't care that the piped link is lost when we roundtrip this.
9430 #REDIRECT [[Main Page|bar]]
9432 <link rel="mw:PageProp/redirect" href="./Main_Page"/>
9436 Redirect to category (T104502)
9438 parsoid=wt2html,wt2wt
9440 #REDIRECT [[Category:Foo]]
9442 <link rel="mw:PageProp/redirect" href="./Category:Foo"/>
9446 Redirect to category with URL encoding (T104502)
9450 #REDIRECT [[Category%3AFoo]]
9452 <link rel="mw:PageProp/redirect" href="./Category:Foo"/>
9456 Redirect to category page
9458 #REDIRECT [[:Category:Foo]]
9460 <link rel="mw:PageProp/redirect" href="./Category:Foo"/>
9464 Redirect to image page (1)
9466 #REDIRECT [[File:Wiki.png]]
9468 <link rel="mw:PageProp/redirect" href="./File:Wiki.png"/>
9472 Redirect to image page (2)
9474 #REDIRECT [[Image:Wiki.png]]
9476 <link rel="mw:PageProp/redirect" href="./File:Wiki.png" data-parsoid='{"src":"#REDIRECT ","a":{"href":"./File:Wiki.png"},"sa":{"href":"Image:Wiki.png"}}'/>
9479 # html2wt disabled because wts serializes as "#REDIRECT [[:en:File:Wiki.png]]"
9480 # Next test confirms this.
9482 Redirect to language (1) (T104918)
9484 parsoid=wt2html,wt2wt,html2html
9486 #REDIRECT [[en:File:Wiki.png]]
9488 <link rel="mw:PageProp/redirect" href="//en.wikipedia.org/wiki/File:Wiki.png"/>
9492 Redirect to language (2) (T104918)
9494 #REDIRECT [[:en:File:Wiki.png]]
9496 <link rel="mw:PageProp/redirect" href="//en.wikipedia.org/wiki/File:Wiki.png"/>
9500 Redirect to interwiki (T104918)
9502 #REDIRECT [[meatball:File:Wiki.png]]
9504 <link rel="mw:PageProp/redirect" href="http://www.usemod.com/cgi-bin/mb.pl?File:Wiki.png"/>
9508 Non-English #REDIRECT
9512 #TILVÍSUN [[Main Page]]
9514 <link rel="mw:PageProp/redirect" href="./Main_Page" data-parsoid='{"src":"#TILVÍSUN ","a":{"href":"./Main_Page"},"sa":{"href":"Main Page"}}'/>
9518 Redirect syntax under text isn't considered a redirect
9522 #redirect [[Main Page]]
9525 <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>
9533 <p>Foo<link rel="mw:PageProp/redirect" href="./Foo"/></p>
9540 Redirect followed by block on the same line
9544 #REDIRECT [[Main Page]]<!-- haha -->==hi==
9546 <link rel="mw:PageProp/redirect" href="./Main_Page"/><!-- haha --><h2 id="hi">hi</h2>
9550 Redirect followed by a newline
9552 #REDIRECT [[Main Page]]
9555 <link rel="mw:PageProp/redirect" href="./Main_Page"/>
9560 Redirect followed by multiple newlines
9562 #REDIRECT [[Main Page]]
9567 <link rel="mw:PageProp/redirect" href="./Main_Page"/>
9574 Drop duplicate redirects
9578 <link rel="mw:PageProp/redirect" href="./Foo"/>
9579 <link rel="mw:PageProp/redirect" href="./Bar"/>
9580 <link rel="mw:PageProp/redirect" href="./Baz"/>
9599 Broken br tag sanitization
9607 # TODO: Fix html2html mode (T53055)!
9609 Parsoid: Broken br tag recognition
9623 Incorrecly removing closing slashes from correctly formed XHTML
9625 <br style="clear:both;" />
9627 <p><br style="clear:both;" />
9632 Failing to transform badly formed HTML into correct XHTML
9634 <br style="clear: left;">
9635 <br style="clear: right;">
9636 <br style="clear: both;">
9638 <p><br style="clear: left;" />
9639 <br style="clear: right;" />
9640 <br style="clear: both;" />
9644 ## FIXME: Is Parsoid's acceptance of self-closing html-tags
9645 ## a feature or a bug? See https://phabricator.wikimedia.org/T76962
9647 Handling html with a div self-closing tag
9656 <p><div title />
9660 <p><div title=bar />
9661 <div title=bar/>
9663 <div title="bar/"></div>
9667 <div title="" data-parsoid='{"stx":"html","selfClose":true}'></div>
9668 <div title="" data-parsoid='{"stx":"html","selfClose":true}'></div>
9669 <div title="" data-parsoid='{"stx":"html","autoInsertedEnd":true}'>
9670 <div title="bar" data-parsoid='{"stx":"html","selfClose":true}'></div>
9671 <div title="bar" data-parsoid='{"stx":"html","selfClose":true}'></div>
9672 <div title="bar/" data-parsoid='{"stx":"html","autoInsertedEnd":true}'></div></div>
9676 Elements with solidus in various attribute positions
9678 parsoid=wt2html,html2html
9680 <div cla/ss="123">ha</div>
9682 <div / class="123">ha</div>
9684 <div class= / "123">ha</div>
9687 <div class="123">ha</div>
9688 <div class="/">ha</div>
9690 <div data-parsoid='{"stx":"html","a":{"cla":null,"ss":null},"sa":{"cla":"","ss":"123"}}'>ha</div>
9692 <div class="123" data-parsoid='{"stx":"html"}'>ha</div>
9694 <div class="/" data-parsoid='{"stx":"html","a":{"\"123\"":null},"sa":{"\"123\"":""}}'>ha</div>
9698 Handling html with a br self-closing tag
9725 Horizontal ruler (should it add that extra space?)
9734 foo </p><hr /><p> bar
9739 Horizontal ruler -- 4+ dashes render hr
9748 Horizontal ruler -- eats additional dashes on the same line
9757 Horizontal ruler -- does not collapse dashes on consecutive lines
9768 Horizontal ruler -- <4 dashes render as plain text
9777 Horizontal ruler -- Supports content following dashes on same line
9789 ### Block-level elements
9798 <ul><li>Common list</li>
9800 <li>item 3</li></ul>
9811 <ol><li>Numbered list</li>
9813 <li>item 3</li></ol>
9817 # the switch from level 3 to ordered should not introduce a newline between
9828 ***#Number on level 4
9830 **#Number on level 3
9831 **#Number on level 3
9835 #**Level 3, but ordered
9838 <ol><li>with numbers</li></ol>
9839 <ul><li>and bullets</li></ul>
9840 <ol><li>and numbers</li></ol></li>
9842 <ul><li>bullet level 2
9843 <ul><li>bullet level 3
9844 <ol><li>Number on level 4</li></ol></li></ul></li>
9846 <ol><li>Number on level 3</li>
9847 <li>Number on level 3</li></ol></li></ul>
9848 <ol><li>number level 2</li></ol></li>
9850 <ul><li><ul><li>Level 3</li></ul></li></ul></li></ul>
9851 <ol><li><ul><li><ul><li>Level 3, but ordered</li></ul></li></ul></li></ol>
9856 1. Nested mixed wikitext and html list
9859 *<ul><li>ho</li></ul>
9864 <li><ul><li>ho</li></ul></li>
9866 <ul><li>ho</li></ul></li></ul>
9870 <li><ul data-parsoid='{"stx":"html"}'><li data-parsoid='{"stx":"html"}'>ho</li></ul></li>
9872 <ul><li>ho</li></ul></li></ul>
9876 2. Nested mixed wikitext and html list (incompatible)
9879 :{{echo|<li>ho</li>}}
9882 <dd><li>ho</li></dd></dl>
9886 <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>
9896 <ul><li>bar</li></ul></li></ul>
9906 <ul><li><ul><li>foo</li></ul></li>
9912 Nested lists 3 (first element empty)
9918 <ul><li>bar</li></ul></li></ul>
9923 Nested lists 4 (first element empty)
9928 <ul><li><ul><li></li></ul></li>
9934 Nested lists 5 (both elements empty)
9939 <ul><li><ul><li></li></ul></li>
9945 Nested lists 6 (both elements empty)
9951 <ul><li></li></ul></li></ul>
9956 Nested lists 7 (skip initial nesting levels)
9960 <ul><li><ul><li><ul><li>foo</li></ul></li></ul></li></ul>
9965 Nested lists 8 (multiple nesting transitions)
9973 <ul><li><ul><li>bar</li></ul></li>
9974 <li>baz</li></ul></li>
9979 # XXX this test should be moved to citeParserTests, since it depends
9980 # on the Cite extension, which is "built in" to Parsoid.
9982 Nested lists 9 (extension interaction)
9985 !! html/php+tidy-DISABLED
9986 <ul><li class="mw-empty-elt"></li></ul>
9988 <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>
9992 1. Lists with start-of-line-transparent tokens before bullets: Comments
10005 Nested lists 10 (list and span siblings: wt2wt regression)
10010 <ul><li>a <span>x</span>
10011 <ul><li>b <span>y</span></li></ul></li></ul>
10015 2. Lists with start-of-line-transparent tokens before bullets: Template close
10020 <ul><li>foo bar</li>
10026 List items are not parsed correctly following a <pre> block (T2785)
10032 <ul><li><pre>foo</pre></li>
10033 <li><pre>bar</pre></li>
10037 <ul><li><pre typeof="mw:Extension/pre" about="#mwt2" data-mw='{"name":"pre","attrs":{},"body":{"extsrc":"foo"}}'>foo</pre></li>
10038 <li><pre typeof="mw:Extension/pre" about="#mwt4" data-mw='{"name":"pre","attrs":{},"body":{"extsrc":"bar"}}'>bar</pre></li>
10042 # FIXME: Might benefit from a html/parsoid since this has a template
10044 List items from template
10055 *notSOL{{inner list}}
10058 <ul><li>item 1</li>
10059 <li>item 2</li></ul>
10060 <ul><li>item 0</li>
10062 <li>item 2</li></ul>
10063 <ul><li>item 0</li>
10066 <li>item 2</li></ul>
10071 List interrupted by empty line or heading
10079 <ul><li>foo</li></ul>
10080 <ul><li><ul><li>bar</li></ul></li></ul>
10081 <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>
10082 <ul><li>Another list item</li></ul>
10087 Multiple list tags generated by templates
10106 <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>
10107 <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>
10108 <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>
10112 Multiple newlines in between HTML list items don't induce paragraph wrapping
10125 <dd>ho<div>123</div>
10141 <dd>ho<div>123</div>
10149 Single-comment whitespace lines dont break lists, and neither do multi-comment whitespace lines
10152 <!--This line will NOT split the list-->
10154 <!--This line will NOT split the list either-->
10156 <!--foo--> <!----> <!--This line NOT split the list either-->
10167 Replacing whitespace with tabs still doesn't break the list (gerrit 78327)
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
10185 # FIXME: Parsoid has a dedicated DOM pass to mimic this Tidy-specific li-hack
10186 # That pass could possibly be removed.
10188 Test the li-hack (a hack from Tidy days, but doesn't work as advertised with Remex)
10190 parsoid=wt2html,wt2wt
10194 *{{echo|<li>templated li-hack}}
10195 *<!--foo--><li> unsupported li-hack with preceding comments
10198 <li><li>not a li-hack
10203 <li class="mw-empty-elt"></li><li>li-hack</li>
10204 <li class="mw-empty-elt"></li><li>templated li-hack</li>
10205 <li class="mw-empty-elt"></li><li> unsupported li-hack with preceding comments</li></ul>
10207 <li class="mw-empty-elt"></li><li>not a li-hack
10212 <li data-parsoid='{"stx":"html","autoInsertedEnd":true,"liHackSrc":"*"}'>li-hack</li>
10213 <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>
10214 <li data-parsoid='{"autoInsertedEnd":true}'><!--foo--></li><li data-parsoid='{"stx":"html","autoInsertedEnd":true}'>unsupported li-hack with preceding comments</li></ul>
10216 <ul data-parsoid='{"stx":"html"}'>
10217 <li class="mw-empty-elt" data-parsoid='{"stx":"html","autoInsertedEnd":true}'></li><li data-parsoid='{"stx":"html"}'>not a li-hack
10224 Parsoid: Make sure nested lists are serialized on their own line even if HTML contains no newlines
10236 <ol><li>bar</li></ol></li></ol>
10238 <ul><li>bar</li></ul></li></ul>
10240 <dl><dd>bar</dd></dl></dd></dl>
10258 Parsoid: Test of whitespace serialization with Templated bullets
10265 <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>
10269 # ------------------------------------------------------------------------
10270 # The next set of tests are about Parsoid's ability to handle badly nested
10271 # tags (parse, minimize scope of fixup, and roundtrip back)
10272 # ------------------------------------------------------------------------
10274 # Remex and Parsoid output stems from list handling diffs because Parsoid & PHP parser.
10275 # Parsoid's list handling is more aware of block structure.
10277 Unbalanced closing block tags break a list
10284 <ul><li>a</li></ul></div><div>
10296 Unbalanced closing non-block tags don't break a list
10298 parsoid=wt2html,html2html
10306 <ul><li>a<span></span></li>
10309 <p><span data-parsoid='{"stx":"html","autoInsertedEnd":true}'></span></p>
10310 <ul><li>a<span data-parsoid='{"stx":"html","autoInsertedEnd":true}'></span></li>
10314 # Parsoid does some post-dom-building cleanup
10315 # which is why its output differs from Remex.
10317 Unclosed formatting tags that straddle lists are closed and reopened
10319 parsoid=wt2html,wt2wt,html2html
10324 <ol><li><s> a</s></li><s>
10325 </s><li><s>b </s></li></ol>
10327 <ol><li><s> a</s></li>
10328 <li><s>b </s></li></ol>
10331 # Output is ugly because of all the misnested tag fixups.
10333 1. List embedded in a formatting tag
10340 </small></p><small><ul><li>foo</li></ul></small><small></small><p><small></small>
10343 <p><small data-parsoid='{"stx":"html","autoInsertedEnd":true}'></small></p><small data-parsoid='{"stx":"html","autoInsertedEnd":true,"autoInsertedStart":true}'>
10344 <ul><li data-parsoid='{}'>foo</li></ul></small>
10345 <p><small data-parsoid='{"stx":"html","autoInsertedStart":true}'></small></p>
10348 # Output is ugly because of all the misnested tag fixups.
10350 2. List embedded in a formatting tag in a misnested way
10357 </small></p><small></small><ul><small><li>a</li>
10358 </small><li><small>b</small></li></ul>
10360 <p><small data-parsoid='{"stx":"html","autoInsertedEnd":true}'></small></p>
10361 <ul><small data-parsoid='{"stx":"html","autoInsertedEnd":true,"autoInsertedStart":true}'><li>a</li></small>
10362 <li><small data-parsoid='{"stx":"html","autoInsertedStart":true}'>b</small></li></ul>
10365 # Output is ugly because of all the misnested tag fixups.
10367 3. List embedded in a formatting tag in a misnested way
10374 </small></p><small></small><ul><small></small><li><small></small><ul><small></small><li><small>123</small></li></ul></li></ul>
10376 <p><small data-parsoid='{"stx":"html","autoInsertedEnd":true}'></small></p>
10378 <ul><li><ul><li data-parsoid='{}'><small data-parsoid='{"stx":"html","autoInsertedStart":true}'> 123</small></li></ul></li></ul>
10385 # Note that the current date is hard-coded as
10386 # 1970-01-01T00:02:03Z (a Thursday)
10387 # when running parser tests. The timezone is also fixed to GMT, so
10388 # local date will be identical to current date.
10391 Magic Word: {{CURRENTDAY}}
10400 Magic Word: {{CURRENTDAY2}}
10409 Magic Word: {{CURRENTDAYNAME}}
10418 Magic Word: {{CURRENTDOW}}
10427 Magic Word: {{CURRENTMONTH}}
10436 Magic Word: {{CURRENTMONTH1}}
10445 Magic Word: {{CURRENTMONTHABBREV}}
10447 {{CURRENTMONTHABBREV}}
10454 Magic Word: {{CURRENTMONTHNAME}}
10456 {{CURRENTMONTHNAME}}
10463 Magic Word: {{CURRENTMONTHNAMEGEN}}
10465 {{CURRENTMONTHNAMEGEN}}
10472 Magic Word: {{CURRENTTIME}}
10481 Magic Word: {{CURRENTHOUR}}
10490 Magic Word: {{CURRENTWEEK}} (T6594)
10499 Magic Word: {{CURRENTYEAR}}
10508 Magic Word: {{CURRENTTIMESTAMP}}
10510 {{CURRENTTIMESTAMP}}
10517 Magic Words LOCAL (UTC)
10521 *{{LOCALMONTHNAME}}
10522 *{{LOCALMONTHNAMEGEN}}
10523 *{{LOCALMONTHABBREV}}
10532 *{{LOCALTIMESTAMP}}
10547 <li>19700101000203</li></ul>
10552 Magic Word: {{FULLPAGENAME}}
10554 title=[[User:Ævar Arnfjörð Bjarmason]]
10555 parsoid={ "modes": ["wt2html","wt2wt"], "normalizePhp": true }
10559 <p>User:Ævar Arnfjörð Bjarmason
10564 Magic Word: {{FULLPAGENAMEE}}
10566 title=[[User:Ævar Arnfjörð Bjarmason]]
10567 parsoid={ "modes": ["wt2html","wt2wt"], "normalizePhp": true }
10571 <p>User:%C3%86var_Arnfj%C3%B6r%C3%B0_Bjarmason
10576 Magic Word: {{TALKSPACE}}
10578 title=[[User:Ævar Arnfjörð Bjarmason]]
10579 parsoid={ "modes": ["wt2html","wt2wt"], "normalizePhp": true }
10588 Magic Word: {{TALKSPACE}}, same namespace
10590 title=[[User talk:Ævar Arnfjörð Bjarmason]]
10591 parsoid={ "modes": ["wt2html","wt2wt"], "normalizePhp": true }
10600 Magic Word: {{TALKSPACE}}, main namespace
10602 title=[[Parser Test]]
10603 parsoid={ "modes": ["wt2html","wt2wt"], "normalizePhp": true }
10612 Magic Word: {{TALKSPACEE}}
10614 title=[[User:Ævar Arnfjörð Bjarmason]]
10615 parsoid={ "modes": ["wt2html","wt2wt"], "normalizePhp": true }
10624 Magic Word: {{SUBJECTSPACE}}
10626 title=[[User talk:Ævar Arnfjörð Bjarmason]]
10627 parsoid={ "modes": ["wt2html","wt2wt"], "normalizePhp": true }
10636 Magic Word: {{SUBJECTSPACE}}, same namespace
10638 title=[[User:Ævar Arnfjörð Bjarmason]]
10639 parsoid={ "modes": ["wt2html","wt2wt"], "normalizePhp": true }
10648 Magic Word: {{SUBJECTSPACE}}, main namespace
10650 title=[[Parser Test]]
10651 parsoid={ "modes": ["wt2html","wt2wt"], "normalizePhp": true }
10659 Magic Word: {{SUBJECTSPACEE}}
10661 title=[[User talk:Ævar Arnfjörð Bjarmason]]
10662 parsoid={ "modes": ["wt2html","wt2wt"], "normalizePhp": true }
10671 Magic Word: {{NAMESPACE}}
10673 title=[[User:Ævar Arnfjörð Bjarmason]]
10674 parsoid={ "modes": ["wt2html","wt2wt"], "normalizePhp": true }
10683 Magic Word: {{NAMESPACEE}}
10685 title=[[User:Ævar Arnfjörð Bjarmason]]
10686 parsoid={ "modes": ["wt2html","wt2wt"], "normalizePhp": true }
10695 Magic Word: {{NAMESPACENUMBER}}
10697 title=[[User:Ævar Arnfjörð Bjarmason]]
10698 parsoid={ "modes": ["wt2html","wt2wt"], "normalizePhp": true }
10700 {{NAMESPACENUMBER}}
10707 Magic Word: {{SUBPAGENAME}}
10709 title=[[Ævar Arnfjörð Bjarmason/sub ö]] subpage
10710 parsoid={ "modes": ["wt2html","wt2wt"], "normalizePhp": true }
10719 Magic Word: {{SUBPAGENAMEE}}
10721 title=[[Ævar Arnfjörð Bjarmason/sub ö]] subpage
10722 parsoid={ "modes": ["wt2html","wt2wt"], "normalizePhp": true }
10731 Magic Word: {{ROOTPAGENAME}}
10733 title=[[Ævar Arnfjörð Bjarmason/sub/sub2]] subpage
10734 parsoid={ "modes": ["wt2html","wt2wt"], "normalizePhp": true }
10738 <p>Ævar Arnfjörð Bjarmason
10743 Magic Word: {{ROOTPAGENAMEE}}
10745 title=[[Ævar Arnfjörð Bjarmason/sub/sub2]] subpage
10746 parsoid={ "modes": ["wt2html","wt2wt"], "normalizePhp": true }
10750 <p>%C3%86var_Arnfj%C3%B6r%C3%B0_Bjarmason
10755 Magic Word: {{BASEPAGENAME}}
10757 title=[[Ævar Arnfjörð Bjarmason/sub]] subpage
10758 parsoid={ "modes": ["wt2html","wt2wt"], "normalizePhp": true }
10762 <p>Ævar Arnfjörð Bjarmason
10767 Magic Word: {{BASEPAGENAMEE}}
10769 title=[[Ævar Arnfjörð Bjarmason/sub]] subpage
10770 parsoid={ "modes": ["wt2html","wt2wt"], "normalizePhp": true }
10774 <p>%C3%86var_Arnfj%C3%B6r%C3%B0_Bjarmason
10779 Magic Word: {{TALKPAGENAME}}
10781 title=[[User:Ævar Arnfjörð Bjarmason]]
10782 parsoid={ "modes": ["wt2html","wt2wt"], "normalizePhp": true }
10786 <p>User talk:Ævar Arnfjörð Bjarmason
10791 Magic Word: {{TALKPAGENAMEE}}
10793 title=[[User:Ævar Arnfjörð Bjarmason]]
10794 parsoid={ "modes": ["wt2html","wt2wt"], "normalizePhp": true }
10798 <p>User_talk:%C3%86var_Arnfj%C3%B6r%C3%B0_Bjarmason
10803 Magic Word: {{SUBJECTPAGENAME}}
10805 title=[[User talk:Ævar Arnfjörð Bjarmason]]
10806 parsoid={ "modes": ["wt2html","wt2wt"], "normalizePhp": true }
10808 {{SUBJECTPAGENAME}}
10810 <p>User:Ævar Arnfjörð Bjarmason
10815 Magic Word: {{SUBJECTPAGENAMEE}}
10817 title=[[User talk:Ævar Arnfjörð Bjarmason]]
10818 parsoid={ "modes": ["wt2html","wt2wt"], "normalizePhp": true }
10820 {{SUBJECTPAGENAMEE}}
10822 <p>User:%C3%86var_Arnfj%C3%B6r%C3%B0_Bjarmason
10827 Magic Word: {{NUMBEROFFILES}}
10829 parsoid={ "modes": ["wt2html","wt2wt"], "normalizePhp": true }
10838 Magic Word: {{PAGENAME}}
10840 title=[[User:Ævar Arnfjörð Bjarmason]]
10841 parsoid={ "modes": ["wt2html","wt2wt"], "normalizePhp": true }
10845 <p>Ævar Arnfjörð Bjarmason
10850 Magic Word: {{PAGENAME}} with metacharacters
10852 title=[['foo & bar = baz']]
10853 parsoid={ "modes": ["wt2html","wt2wt"], "normalizePhp": true }
10857 <p><i>'foo & bar = baz'</i>
10862 Magic Word: {{PAGENAME}} with metacharacters (T28781)
10864 title=[[*RFC 1234 http://example.com/]]
10865 parsoid={ "modes": ["wt2html","wt2wt"], "normalizePhp": true }
10869 <p>*RFC 1234 http://example.com/
10874 Magic Word: {{PAGENAMEE}}
10876 title=[[User:Ævar Arnfjörð Bjarmason]]
10877 parsoid={ "modes": ["wt2html","wt2wt"], "normalizePhp": true }
10881 <p>%C3%86var_Arnfj%C3%B6r%C3%B0_Bjarmason
10886 Magic Word: {{PAGENAMEE}} with metacharacters (T28781)
10888 title=[[*RFC 1234 http://example.com/]]
10889 parsoid={ "modes": ["wt2html","wt2wt"], "normalizePhp": true }
10893 <p>*RFC_1234_http://example.com/
10898 Magic Word: {{REVISIONID}}
10900 parsoid={ "modes": ["wt2html","wt2wt"], "normalizePhp": true }
10907 flags=vary-revision-id
10911 Magic Word: {{SCRIPTPATH}}
10913 parsoid={ "modes": ["wt2html","wt2wt"], "normalizePhp": true }
10921 Magic Word: {{STYLEPATH}}
10923 parsoid={ "modes": ["wt2html","wt2wt"], "normalizePhp": true }
10932 Magic Word: {{SERVER}}
10934 parsoid={ "modes": ["wt2html","wt2wt"], "normalizePhp": true }
10938 <p><a rel="nofollow" class="external free" href="http://example.org">http://example.org</a>
10943 Magic Word: {{SERVERNAME}}
10945 parsoid={ "modes": ["wt2html","wt2wt"], "normalizePhp": true }
10954 Magic Word: {{SITENAME}}
10956 parsoid={ "modes": ["wt2html","wt2wt"], "normalizePhp": true }
10965 Magic Word: {{PAGELANGUAGE}}
10968 parsoid={ "modes": ["wt2html","wt2wt"], "normalizePhp": true }
10977 Magic Word: {{PAGELANGUAGE}} on a page with no explicitly set language
10979 parsoid={ "modes": ["wt2html","wt2wt"], "normalizePhp": true }
10988 Case-sensitive magic words, when cased differently, should just be template transclusions
10995 <p><a href="/index.php?title=Template:CurrentMonth&action=edit&redlink=1" class="new" title="Template:CurrentMonth (page does not exist)">Template:CurrentMonth</a>
10996 <a href="/index.php?title=Template:Currentday&action=edit&redlink=1" class="new" title="Template:Currentday (page does not exist)">Template:Currentday</a>
10997 <a href="/index.php?title=Template:CURreNTweEK&action=edit&redlink=1" class="new" title="Template:CURreNTweEK (page does not exist)">Template:CURreNTweEK</a>
10998 <a href="/index.php?title=Template:CurrentHour&action=edit&redlink=1" class="new" title="Template:CurrentHour (page does not exist)">Template:CurrentHour</a>
11003 Case-insensitive magic words should still work with weird casing.
11013 <a rel="nofollow" class="external free" href="http://example.org">http://example.org</a>
11017 # From plwiki:PLOS_ONE
11019 Parsoid: Page property magic word with magic word contents
11023 wgAllowDisplayTitle=true
11024 wgRestrictDisplayTitle=false
11026 {{DISPLAYTITLE:''{{PAGENAME}}''}}
11031 <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>"}]]}'/>
11034 # NOTE: mw:ExpandedAttrs is not the best typeof here. mw:Transclusion is better.
11035 # But, this is a limitation of our representation and is documented in
11036 # TemplateHandler.js in processSpecialMagicWord
11038 Parsoid: Template-generated DISPLAYTITLE
11040 {{{{echo|DISPLAYTITLE}}:Foo}}
11044 wgAllowDisplayTitle=true
11045 wgRestrictDisplayTitle=false
11050 <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"}]]}'/>
11054 Namespace 1 {{ns:1}}
11063 Namespace 1 {{ns:01}}
11072 Namespace 0 {{ns:0}} (T6783)
11080 Namespace 0 {{ns:00}} (T6783)
11088 Namespace -1 {{ns:-1}}
11097 Namespace User {{ns:User}}
11106 Namespace User talk {{ns:User_talk}}
11115 Namespace User talk {{ns:uSeR tAlK}}
11124 Namespace File {{ns:File}}
11133 Namespace File {{ns:Image}}
11142 Namespace (lang=de) Benutzer {{ns:User}}
11153 Namespace (lang=de) Benutzer Diskussion {{ns:3}}
11159 <p>Benutzer Diskussion
11166 {{urlencode:hi world?!}}
11167 {{urlencode:hi world?!|WIKI}}
11168 {{urlencode:hi world?!|PATH}}
11169 {{urlencode:hi world?!|QUERY}}
11179 Magic Word: prioritize type info over data-parsoid
11183 <meta property="mw:PageProp/forcetoc" data-parsoid='{"magicSrc":"__NOTOC__"}'/>
11189 Magic Word: serialize on separate line (parsoid)
11191 parsoid=wt2wt,html2wt
11197 foo<meta property="mw:PageProp/notoc"/>bar
11201 Magic Word: rt non-english wikis
11208 <meta property="mw:PageProp/noeditsection" data-parsoid='{"magicSrc":"__NOEDITSECTION__"}'/>
11212 __proto__ is treated as normal wikitext (T105997)
11224 Magic links: internal link to RFC (T2479)
11228 <p><a href="/index.php?title=RFC_123&action=edit&redlink=1" class="new" title="RFC 123 (page does not exist)">RFC 123</a>
11231 <p><a rel="mw:WikiLink" href="./RFC_123" title="RFC 123">RFC 123</a></p>
11235 Magic links: RFC (T2479)
11239 <p><a class="external mw-magiclink-rfc" rel="nofollow" href="https://tools.ietf.org/html/rfc822">RFC 822</a>
11242 <p><a href="https://tools.ietf.org/html/rfc822" rel="mw:ExtLink" class="external mw-magiclink">RFC 822</a></p>
11246 Magic links: RFC (T67278)
11248 This is RFC 822 but thisRFC 822 is not RFC 822linked.
11250 <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.
11253 <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>
11257 Magic links: RFC (w/ non-newline whitespace, T30950/T31025)
11259 RFC      822
11263 <p><a class="external mw-magiclink-rfc" rel="nofollow" href="https://tools.ietf.org/html/rfc822">RFC 822</a>
11268 <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>
11274 Magic links: ISBN (T3937)
11278 <p><a href="/wiki/Special:BookSources/0306406152" class="internal mw-magiclink-isbn">ISBN 0-306-40615-2</a>
11281 <p><a href="./Special:BookSources/0306406152" rel="mw:WikiLink">ISBN 0-306-40615-2</a></p>
11285 Magic links: ISBN (T67278)
11287 This is ISBN 978-0-316-09811-3 but thisISBN 978-0-316-09811-3 is not ISBN 978-0-316-09811-3linked.
11289 <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.
11292 <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>
11296 Magic links: ISBN (w/ non-newline whitespace, T30950/T31025)
11298 ISBN      978 0 316 09811 3
11304 <p><a href="/wiki/Special:BookSources/9780316098113" class="internal mw-magiclink-isbn">ISBN 978 0 316 09811 3</a>
11311 <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>
11319 Magic links: PMID incorrectly converts space to underscore
11323 <p><a class="external mw-magiclink-pmid" rel="nofollow" href="//www.ncbi.nlm.nih.gov/pubmed/1234?dopt=Abstract">PMID 1234</a>
11326 <p><a href="//www.ncbi.nlm.nih.gov/pubmed/1234?dopt=Abstract" rel="mw:ExtLink" class="external mw-magiclink">PMID 1234</a></p>
11330 Magic links: PMID (T67278)
11332 This is PMID 1234 but thisPMID 1234 is not PMID 1234linked.
11334 <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.
11337 <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>
11341 Magic links: PMID (w/ non-newline whitespace, T30950/T31025)
11343 PMID      1234
11347 <p><a class="external mw-magiclink-pmid" rel="nofollow" href="//www.ncbi.nlm.nih.gov/pubmed/1234?dopt=Abstract">PMID 1234</a>
11352 <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>
11357 # <nowiki> nodes shouldn't be inserted during html2wt by Parsoid,
11358 # since these are ExtLinkText, not MagicLinkText
11360 Magic links: use appropriate serialization for "almost" magic links.
11362 X[[Special:BookSources/0978739256|foo]]
11364 X[https://tools.ietf.org/html/rfc1234 foo]
11366 <p>X<a href="/wiki/Special:BookSources/0978739256" title="Special:BookSources/0978739256">foo</a>
11367 </p><p>X<a rel="nofollow" class="external text" href="https://tools.ietf.org/html/rfc1234">foo</a>
11370 <p>X<a rel="mw:WikiLink" href="./Special:BookSources/0978739256" title="Special:BookSources/0978739256">foo</a></p>
11371 <p>X<a rel="mw:ExtLink" class="external text" href="https://tools.ietf.org/html/rfc1234">foo</a></p>
11375 Magic links: All disabled (T47942)
11377 wgEnableMagicLinks={"ISBN":false, "PMID":false, "RFC":false}
11383 <p>ISBN 0-306-40615-2
11394 Nonexistent template
11396 {{thistemplatedoesnotexist}}
11398 <p><a href="/index.php?title=Template:Thistemplatedoesnotexist&action=edit&redlink=1" class="new" title="Template:Thistemplatedoesnotexist (page does not exist)">Template:Thistemplatedoesnotexist</a>
11403 Template with invalid target containing tags
11405 {{a<b>b</b>|{{echo|foo}}|{{echo|a}}={{echo|b}}|a = b}}
11407 <p>{{a<b>b</b>|foo|a=b|a = b}}
11412 Template with invalid target containing unclosed tag
11414 {{a<b>|{{echo|foo}}|{{echo|a}}={{echo|b}}|a = b}}
11416 <p>{{a<b>|foo|a=b|a = b}}</b>
11421 Template with invalid target containing wikilink
11425 <p>{{<a href="/wiki/Main_Page" title="Main Page">Main Page</a>}}
11428 <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>
11432 Template with just whitespace in it, T70421
11436 <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>
11442 This is a test template
11450 <p>This is a test template
11455 Template with explicit namespace
11459 <p>This is a test template
11467 This is a test template with parameter {{{param}}}
11473 {{paramtest|param=foo}}
11475 <p>This is a test template with parameter foo
11480 Template:paramtestnum
11482 [[{{{1}}}|{{{2}}}]]
11486 Template unnamed parameter
11488 {{paramtestnum|Main Page|the main page}}
11490 <p><a href="/wiki/Main_Page" title="Main Page">the main page</a>
11495 Template:templatesimple
11501 Template:templateredirect
11503 #redirect [[Template:templatesimple]]
11507 Template:templateasargtestnum
11513 Template:templateasargtest
11515 {{template{{{templ}}}}}
11519 Template:templateasargtest2
11525 Template with template name as unnamed argument
11527 {{templateasargtestnum|templatesimple}}
11534 Template with template name as argument
11536 {{templateasargtest|templ=simple}}
11543 Template with template name as argument (2)
11545 {{templateasargtest2|templ=templatesimple}}
11552 Template:templateasargtestdefault
11554 {{{{{templ|templatesimple}}}}}
11564 Template with default value
11566 {{templateasargtestdefault}}
11573 Template with default value (value set)
11575 {{templateasargtestdefault|templ=templa}}
11584 {{templateredirect}}
11589 <link rel="mw:PageProp/redirect" href="./Template:Templatesimple" typeof="mw:Transclusion" data-mw='{"parts":[{"template":{"target":{"wt":"templateredirect","href":"./Template:Templateredirect"},"params":{},"i":0}}]}'/>
11593 Template with argument in separate line
11595 {{ templateasargtest |
11603 Template with complex template as argument
11606 param ={{ templateasargtest |
11607 templ = simple }}}}
11609 <p>This is a test template with parameter (test)
11614 Templates with templated name
11616 {{{{echo|echo}}|foo}}
11617 {{{{echo|inner list}} }}
11621 <ul><li>item 1</li></ul>
11624 <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>
11625 <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>
11628 ## Regression test; the output here isn't really that interesting.
11630 Templates with templated name and top level template args
11632 {{1{{2{{{3}}}|4=5}}}}
11634 <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>
11637 # Parsoid markup is deliberate "broken". This is an edge case.
11638 # See long comment in TemplateHandler.js:convertAttribsToString.
11640 Templates with invalid templated targets
11651 <p typeof="mw:Transclusion" data-mw='{"parts":[{"template":{"target":{"wt":"echo\n{{echo|foo}}\n"},"params":{},"i":0}}]}'>{{echo
11656 Template with thumb image (with link in description)
11658 {{paramtest|param=[[Image:noimage.png|thumb|[[no link|link]] [[no link|caption]]]]}}
11660 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>
11663 <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>
11665 <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>
11669 Template:complextemplate
11671 {{{1}}} {{paramtest|
11672 param ={{{param}}}}}
11676 Template with complex arguments
11679 param ={{ templateasargtest |
11680 templ = simple }}|[[Template:complextemplate|link]]}}
11682 <p><a href="/wiki/Template:Complextemplate" title="Template:Complextemplate">link</a> This is a test template with parameter (test)
11687 T2553: link with two variables in a piped link
11690 |[[{{{1}}}|{{{2}}}]]
11695 <td>[[{{{1}}}|{{{2}}}]]
11700 <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>
11706 Abort table cell attribute parsing on wikilink
11709 |testing [[one|two]] |three||four
11710 |testing one two |three||four
11711 |testing="[[one|two]]" |three||four
11716 <td>testing <a href="/index.php?title=One&action=edit&redlink=1" class="new" title="One (page does not exist)">two</a> |three</td>
11722 <td>testing="<a href="/index.php?title=One&action=edit&redlink=1" class="new" title="One (page does not exist)">two</a>" |three</td>
11728 <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>
11729 <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>
11730 <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>
11735 Don't abort table cell attribute parsing if wikilink is found in template arg
11738 |Test {{#tag:ref|One two "[[three]]" four}}
11742 <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>
11747 Magic variable as template parameter
11749 {{paramtest|param={{SITENAME}}}}
11751 <p>This is a test template with parameter MediaWiki
11758 [[{{{param}}}|link]]
11762 Template parameter as link source
11764 {{linktest|param=Main Page}}
11766 <p><a href="/wiki/Main_Page" title="Main Page">link</a>
11771 Template:paramtest2
11773 including another template, {{paramtest|param={{{arg}}}}}
11777 Template passing argument to another template
11779 {{paramtest2|arg='hmm'}}
11781 <p>including another template, This is a test template with parameter 'hmm'
11792 Template as link source
11796 [[{{linktest2}}|Main Page]]
11798 [[{{linktest2}}]]Page
11800 <p><a href="/wiki/Main_Page" title="Main Page">Main Page</a>
11801 </p><p><a href="/wiki/Main_Page" title="Main Page">Main Page</a>
11802 </p><p><a href="/wiki/Main_Page" title="Main Page">Main Page</a>Page
11820 Template infinite loop
11824 <p><span class="error">Template loop detected: <a href="/wiki/Template:Loop1" title="Template:Loop1">Template:Loop1</a></span>
11829 Template from main namespace
11838 Template from non-includable namespace
11840 wgNonincludableNamespaces=10
11844 <p><a href="/wiki/Template:Echo" title="Template:Echo">Template:Echo</a>
11859 T2529: Template with table, not included at beginning of line
11878 T2523: Template shouldn't eat newline (or add an extra one before table)
11898 T2041: Template parameters shown as broken links
11907 Template with targets containing wikilinks
11913 {{[[{{echo|foo}}]]}}
11915 {{{{echo|[[foo}}]]}}
11917 <p>{{<a href="/wiki/Foo" title="Foo">foo</a>}}
11918 </p><p>{{<a href="/wiki/Foo" title="Foo">foo</a>}}
11922 <p>{{<a rel="mw:WikiLink" href="./Foo" title="Foo">foo</a>}}</p>
11923 <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>
11924 <p>{{<span typeof="mw:Transclusion" data-mw='{"parts":[{"template":{"target":{"wt":"echo","href":"./Template:Echo"},"params":{"1":{"wt":"[[foo}}]]"}},"i":0}}]}'>[[foo}}]]</span></p>
11934 Templates: Double quotes as template target
11941 <p>foo <span about="#mwt1" typeof="mw:Transclusion" data-mw='{"parts":[{"template":{"target":{"wt":"''","href":"./Template:''"},"params":{},"i":0}}]}'>bar</span> baz
11945 ## This test is about making sure Parsoid's data-mw is well formed in the
11946 ## face of multiple templates with intersecting and overlapping ranges. The
11947 ## wikitext itself is wretched.
11949 Templates with intersecting and overlapping ranges
11960 </table><p>ho</p><table>
11964 </td></tr></tbody></table>
11966 <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":""}]]}'>
11968 </table><p about="#mwt1">ho</p><table about="#mwt1" typeof="mw:ExpandedAttrs" data-mw='{"attribs":[[{"txt":"","html":""},{"html":""}]]}'>
11970 <tbody><tr><td>hi</td></tr>
11975 Template:MSGNW test
11977 ''None'' of '''this''' should be
11979 but rather passed unmodified
11987 # hmm, fix this or just deprecate msgnw and document its behavior?
11991 {{msgnw:MSGNW test}}
11993 <p>''None'' of '''this''' should be
11995  but rather passed unmodified
11996 {{test}}
12000 <!-- comment -->
12007 {{int:youhavenewmessages|lots of money|not!}}
12009 <p>You have lots of money (not!).
12014 int keyword - non-existing message
12025 Foo<noinclude>zar</noinclude><includeonly>bar</includeonly>
12029 <includeonly> and <noinclude> being included
12040 <onlyinclude>Foo</onlyinclude>bar
12044 <onlyinclude> being included
12056 <onlyinclude>Foo</onlyinclude>bar<includeonly>zar</includeonly>
12060 <onlyinclude> and <includeonly> being included
12069 <includeonly> and <noinclude> on a page
12071 Foo<noinclude>zar</noinclude><includeonly>bar</includeonly>
12078 Un-closed <noinclude>
12085 <onlyinclude> on a page
12087 <onlyinclude>Foo</onlyinclude>bar
12094 Un-closed <onlyinclude>
12101 Self-closed noinclude, includeonly, onlyinclude tags
12112 Unbalanced includeonly and noinclude tags
12116 |b</noinclude></noinclude>
12117 |c</noinclude></includeonly>
12118 |d</includeonly></includeonly>
12127 <td>c</includeonly>
12129 <td>d</includeonly></includeonly>
12135 Template:Includeonly section
12138 ==Includeonly section==
12144 T8563: Edit link generation for section shown by <includeonly>
12146 {{includeonly section}}
12148 <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>
12149 <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>
12153 # Uses same input as the contents of [[Template:Includeonly section]]
12155 T8563: Section extraction for section shown by <includeonly>
12160 ==Includeonly section==
12168 T8563: Edit link generation for section suppressed by <includeonly>
12171 ==Includeonly section==
12175 <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>
12180 T8563: Section extraction for section suppressed by <includeonly>
12185 ==Includeonly section==
12193 Un-closed <includeonly>
12198 <meta typeof="mw:Includes/IncludeOnly" data-parsoid='{"src":"<includeonly>"}' data-mw='{"src":"<includeonly>"}'/>
12201 ## We used to, but no longer wt2wt this test since the default serializer
12202 ## will normalize the include directives to serialize on their own line.
12203 ## Selser will take care of preserving formatting in scenarios where they
12204 ## intermingled with other wikitext.
12206 Includes and comments at SOL
12208 parsoid=wt2html,html2html
12210 <!-- comment --><noinclude><!-- comment --></noinclude><!-- comment -->==hu==
12218 some</noinclude>* stuff
12221 <includeonly>can have stuff</includeonly>===here===
12224 <h2><span class="mw-headline" id="hu">hu</span></h2>
12232 <ul><li>here</li></ul>
12233 <h3><span class="mw-headline" id="here">here</span></h3>
12236 <!-- 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>
12238 <meta typeof="mw:Includes/NoInclude" data-parsoid='{"src":"<noinclude>"}'/>
12240 <meta typeof="mw:Includes/NoInclude/End" data-parsoid='{"src":"</noinclude>"}'/><ul><li>stuff</li>
12243 <meta typeof="mw:Includes/NoInclude" data-parsoid='{"src":"<noinclude>"}'/>
12244 <p>some<meta typeof="mw:Includes/NoInclude/End" data-parsoid='{"src":"</noinclude>"}'/>* stuff</p>
12245 <ul><li>here</li></ul>
12247 <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>
12251 # TODO: test with DOM fragment reuse!
12253 Parsoid: DOM fragment reuse
12255 parsoid=wt2wt,wt2html
12257 a{{echo|b<table></table>c}}d
12269 <p>ab</p><table></table><p>cd
12280 <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>
12282 <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">
12283 </span><table about="#mwt2" data-parsoid='{"stx":"html"}'></table><span about="#mwt2">
12284 </span><p about="#mwt2">cd</p>
12286 <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">
12288 </span><table about="#mwt3" data-parsoid='{"stx":"html"}'></table><span about="#mwt3">
12290 </span><p about="#mwt3">b</p>
12294 Parsoid: Merge double tds (T52603)
12297 |{{echo|{{!}} foo}}
12303 </td></tr></tbody></table>
12306 <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>
12311 Parsoid: Merge double tds in nested transclusion content (T52603)
12315 |{{echo|{{!}} foo}}
12323 </td></tr></tbody></table>
12326 <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}}]}'>
12328 <tr><td data-mw='{"parts":["|"]}'> foo</td></tr>
12334 ### <includeonly> and <noinclude> in attributes
12337 0. includeonly around the entire attribute
12339 <span <includeonly>id="v1"</includeonly><noinclude>id="v2"</noinclude>>bar</span>
12341 <p><span id="v2">bar</span>
12346 1. includeonly in html attr key
12348 <span <noinclude>id</noinclude><includeonly>about</includeonly>="foo">bar</span>
12350 <p><span id="foo">bar</span>
12355 2. includeonly in html attr value
12357 <span id="<noinclude>v1</noinclude><includeonly>v2</includeonly>">bar</span>
12358 <span id=<noinclude>"v1"</noinclude><includeonly>"v2"</includeonly>>bar</span>
12360 <p><span id="v1">bar</span>
12361 <span id="v1">bar</span>
12366 3. includeonly in part of an attr value
12368 <span style="color:<noinclude>red</noinclude><includeonly>blue</includeonly>;">bar</span>
12370 <p><span style="color:red;">bar</span>
12375 4. includeonly in table attributes
12399 ### Preprocessor precedence tests
12400 ### See: https://www.mediawiki.org/wiki/Preprocessor_ABNF
12402 ##{{[[-{{{{{{[[Foo|bar}}]]}-}}}}}]]
12404 Preprocessor precedence 1: link is rightmost opening
12410 But close-brace is not a valid character in a link title:
12413 However, we can still tell this was handled as a link in the preprocessor:
12414 {{echo|[[Foo}}|bar]]|bat}}
12416 <p>{{<a href="/wiki/Foo" title="Foo">bar}}</a>
12417 </p><p>But close-brace is not a valid character in a link title:
12419 </p><p>However, we can still tell this was handled as a link in the preprocessor:
12423 <p>{{<a rel="mw:WikiLink" href="./Foo" title="Foo">bar}}</a></p>
12424 <p>But close-brace is not a valid character in a link title: {{[[Foo}}|bar]]</p>
12425 <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>
12429 Preprocessor precedence 2: template is rightmost opening
12438 <p>-<span typeof="mw:Transclusion" data-mw='{"parts":[{"template":{"target":{"wt":"echo","href":"./Template:Echo"},"params":{"1":{"wt":"foo}-"}},"i":0}}]}'>foo}-</span>-</p>
12442 Preprocessor precedence 3: language converter is rightmost opening
12458 <p typeof="mw:Transclusion" data-mw='{"parts":[{"template":{"target":{"wt":"echo","href":"./Template:Echo"},"params":{"1":{"wt":"hi"}},"i":0}}]}'>hi</p>
12459 <p>{{<span typeof="mw:LanguageVariant" data-mw-variant='{"disabled":{"t":"echo|hi}}"}}'></span></p>
12460 <p>[[<span typeof="mw:LanguageVariant" data-mw-variant='{"disabled":{"t":"raw]]"}}'></span></p>
12464 Preprocessor precedence 4: left-most angle bracket
12475 Template:Precedence5
12481 Preprocessor precedence 5: tplarg takes precedence over template
12483 {{Precedence5|Bullet}}
12485 <ul><li>Bar</li></ul>
12488 <ul typeof="mw:Transclusion" data-mw='{"parts":[{"template":{"target":{"wt":"Precedence5","href":"./Template:Precedence5"},"params":{"1":{"wt":"Bullet"}},"i":0}}]}'><li>Bar</li></ul>
12492 Preprocessor precedence 6: broken link is rightmost opening
12498 {{echo|[[Foo|bar|bat=baz}}
12501 </p><p>{{echo|[[Foo|bar|bat=baz}}
12504 <p>{{echo|[[Foo}}</p>
12505 <p>{{echo|[[Foo|bar|bat=baz}}</p>
12508 # This next test exposes a difference between PHP and Parsoid:
12509 # Given [[Foo|{{echo|Bar]]x}}y]]z:
12510 # 1) Both PHP and Parsoid ignore the `]]` inside the `echo` in the
12511 # "preprocessor" stage. The `{{echo` extends until the `x}}`, and the
12512 # outer `[[Foo` extends until the `y]]`
12513 # 2a) But then the PHP preprocessor emits `[[Foo|Bar]]xy]]z` as an
12514 # intermediate result (after template expansion), and link processing
12515 # happens on this intermediate result, which moves the wikilink
12516 # boundary leftward to `[[Foo|Bar]]`
12517 # 2b) Parsoid works in a single step, so it's going to keep the
12518 # wikilink as extending to the `y]]`
12519 # 3a) Then PHP does linktrail processing which slurps up the trailing
12520 # `xy` inside the link.
12521 # 3b) Parsoid will do linktrail processing to slurp up the trailing
12522 # `z` inside the link.
12523 # This is "correct" behavior. Parsoid's basic worldview is that the
12524 # `]]` inside the template shouldn't be allowed to leak out to affect
12525 # the surrounding wikilink. PHP may match Parsoid (in the future)
12526 # if you use {{#balance}} (T114445).
12529 Preprocessor precedence 7: broken template is rightmost opening
12535 [[Foo|{{echo|Bar]]-x}}-y]]-z
12537 Careful: linktrails can move the end of the wikilink:
12538 [[Foo|{{echo|y']]a}}l]]l
12540 <p><a href="/wiki/Foo" title="Foo">{{echo|Bar</a>
12541 </p><p><a href="/wiki/Foo" title="Foo">Bar</a>-x-y]]-z
12542 </p><p>Careful: linktrails can move the end of the wikilink:
12543 <a href="/wiki/Foo" title="Foo">y'al</a>]]l
12546 <p>[[Foo|{{echo|Bar]]</p>
12547 <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>
12548 <p>Careful: linktrails can move the end of the wikilink:
12549 <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>
12553 Preprocessor precedence 8: broken language converter is rightmost opening
12564 Template:Preprocessor_precedence_9
12569 ;7: {{{{{{{4}}}}}}}
12573 Preprocessor precedence 9: groups of braces
12575 {{Preprocessor precedence 9|Four|Bullet|1|2}}
12581 <ul><li>Bar</li></ul>
12585 <dd>{Bullet}</dd></dl>
12588 <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}}]}'>
12593 </dl><ul about="#mwt1">
12595 </ul><span about="#mwt1"> </span><dl about="#mwt1">
12604 Template:Preprocessor_precedence_10
12611 ;6: -{{{{{{4}}}}}}-
12612 ;7: -{{{{{{{5}}}}}}}-
12616 Preprocessor precedence 10: groups of braces with leading dash
12620 {{Preprocessor precedence 10|Three|raw2|Bullet|1|2}}
12626 <ul><li>Bar-</li></ul>
12633 <ul><li>Bar-</li></ul>
12640 <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}}]}'>
12642 <dd><span typeof="mw:LanguageVariant" data-mw-variant='{"disabled":{"t":"raw"}}'></span></dd>
12645 </dl><ul about="#mwt1">
12647 </ul><span about="#mwt1"> </span><dl about="#mwt1">
12651 <dd><span typeof="mw:LanguageVariant" data-mw-variant='{"disabled":{"t":"raw2"}}'></span></dd>
12654 </dl><ul about="#mwt1">
12656 </ul><span about="#mwt1"> </span><dl about="#mwt1">
12660 <dd><span typeof="mw:LanguageVariant" data-mw-variant='{"disabled":{"t":"raw2"}}'></span></dd>
12665 Preprocessor precedence 11: found during visual diff testing
12667 {{#tag:span|-{{#tag:span|-{{echo|x}}}}}}
12669 {{echo|-{{echo|-{{echo|x}}}}}}
12671 {{echo|-{{echo|x}}}}
12673 <p><span>-<span>-x</span></span>
12678 <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>
12680 <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>
12682 <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>
12686 Preprocessor precedence 12: broken language converter closed by brace.
12690 This form breaks the template, which is unfortunate:
12691 *{{echo|foo-{bar}bat}}
12693 But if the broken language converter markup is inside an extension
12694 tag, nothing bad happens:
12695 *<nowiki>foo-{bar}bat</nowiki>
12696 *{{echo|<nowiki>foo-{bar}bat</nowiki>}}
12697 *<pre>foo-{bar}bat</pre>
12698 *{{echo|<pre>foo-{bar}bat</pre>}}
12700 <tag>foo-{bar}bat</tag>
12701 {{echo|<tag>foo-{bar}bat</tag>}}
12704 <p>This form breaks the template, which is unfortunate:
12706 <ul><li>{{echo|foo-{bar}bat}}</li></ul>
12707 <p>But if the broken language converter markup is inside an extension
12708 tag, nothing bad happens:
12710 <ul><li>foo-{bar}bat</li>
12711 <li>foo-{bar}bat</li>
12712 <li><pre>foo-{bar}bat</pre></li>
12713 <li><pre>foo-{bar}bat</pre></li></ul>
12714 <pre>'foo-{bar}bat'
12718 <pre>'foo-{bar}bat'
12723 <p>This form breaks the template, which is unfortunate:</p>
12725 <li>{{echo|foo-{bar}bat}}</li>
12727 <p>But if the broken language converter markup is inside an extension tag, nothing bad happens:</p>
12729 <li><span typeof="mw:Nowiki">foo-{bar}bat</span></li>
12730 <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>
12731 <li><pre typeof="mw:Extension/pre" data-mw='{"name":"pre","attrs":{},"body":{"extsrc":"foo-{bar}bat"}}'>foo-{bar}bat</pre></li>
12732 <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>
12734 <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>
12738 Preprocessor precedence 13: broken language converter in external link
12742 *[http://example.com/-{foo Example in URL]
12743 *[http://example.com Example in -{link} description]
12744 *{{echo|[http://example.com/-{foo Breaks template, however]}}
12746 <ul><li><a rel="nofollow" class="external text" href="http://example.com/-{foo">Example in URL</a></li>
12747 <li><a rel="nofollow" class="external text" href="http://example.com">Example in -{link} description</a></li>
12748 <li>{{echo|<a rel="nofollow" class="external text" href="http://example.com/-{foo">Breaks template, however</a>}}</li></ul>
12751 <li><a rel="mw:ExtLink" class="external text" href="http://example.com/-{foo">Example in URL</a></li>
12752 <li><a rel="mw:ExtLink" class="external text" href="http://example.com">Example in -{link} description</a></li>
12753 <li>{{echo|<a rel="mw:ExtLink" class="external text" href="http://example.com/-{foo">Breaks template, however</a>}}</li>
12758 Preprocessor precedence 14: broken language converter in comment
12760 *<!--{{foo}}-->...should be ok
12761 *<!---{{foo}}-->...extra dashes
12762 *{{echo|foo<!-- -{bar} -->bat}}...should be ok
12764 <ul><li>...should be ok</li>
12765 <li>...extra dashes</li>
12766 <li>foobat...should be ok</li></ul>
12769 <li><!--{{foo}}-->...should be ok</li>
12770 <li><!---{{foo}}-->...extra dashes</li>
12771 <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>
12776 Preprocessor precedence 15: broken brace markup in headings
12778 wgFragmentMode=[ 'html5', 'legacy' ]
12782 __NOTOC__ __NOEDITSECTION__
12791 ===5 foo{{{bar 5===
12796 <h3><span id="1_foo.5Bbar_1"></span><span class="mw-headline" id="1_foo[bar_1">1 foo[bar 1</span></h3>
12799 <h3><span id="2_foo.5B.5Bbar_2"></span><span class="mw-headline" id="2_foo[[bar_2">2 foo[[bar 2</span></h3>
12802 <h3><span id="3_foo.7Bbar_3"></span><span class="mw-headline" id="3_foo{bar_3">3 foo{bar 3</span></h3>
12805 <h3><span id="4_foo.7B.7Bbar_4"></span><span class="mw-headline" id="4_foo{{bar_4">4 foo{{bar 4</span></h3>
12808 <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>
12811 <h3><span id="6_foo-.7Bbar_6"></span><span class="mw-headline" id="6_foo-{bar_6">6 foo-{bar 6</span></h3>
12815 <meta property="mw:PageProp/notoc"/> <meta property="mw:PageProp/noeditsection"/>
12816 <h3 id="1_foo[bar_1"><span id="1_foo.5Bbar_1" typeof="mw:FallbackId"></span>1 foo[bar 1</h3>
12818 <h3 id="2_foo[[bar_2"><span id="2_foo.5B.5Bbar_2" typeof="mw:FallbackId"></span>2 foo[[bar 2</h3>
12820 <h3 id="3_foo{bar_3"><span id="3_foo.7Bbar_3" typeof="mw:FallbackId"></span>3 foo{bar 3</h3>
12822 <h3 id="4_foo{{bar_4"><span id="4_foo.7B.7Bbar_4" typeof="mw:FallbackId"></span>4 foo{{bar 4</h3>
12824 <h3 id="5_foo{{{bar_5"><span id="5_foo.7B.7B.7Bbar_5" typeof="mw:FallbackId"></span>5 foo{{{bar 5</h3>
12826 <h3 id="6_foo-{bar_6"><span id="6_foo-.7Bbar_6" typeof="mw:FallbackId"></span>6 foo-{bar 6</h3>
12831 Preprocessor precedence 16: matching closing braces to opening braces
12836 -{{{echo|foo}}bar}-
12841 <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>
12845 Preprocessor precedence 17: template w/o target shouldn't prevent closing
12854 <p about="#mwt1" typeof="mw:Transclusion" data-mw='{"parts":[{"template":{"target":{"wt":"echo","href":"./Template:Echo"},"params":{"1":{"wt":"hi {{}}"}},"i":0}}]}'>hi {{}}</p>
12857 # Ensure we're using a language without variants for this test; even
12858 # if $wgUsePigLatinVariant is true. We've picked `de` arbitrarily.
12860 Preprocessor precedence 18: another rightmost wins scenario
12865 {{ -{{{{1|tplarg}}} }} }-
12867 <p>{{ -{tplarg }} }-
12870 <p>{{ -{<span about="#mwt1" typeof="mw:Param" data-mw='{"parts":[{"templatearg":{"target":{"wt":"1"},"params":{"1":{"wt":"tplarg"}},"i":0}}]}'>tplarg</span> }} }-</p>
12874 Preprocessor precedence 19: break syntax
12887 ### Token Stream Patcher tests
12889 ### These tests won't always pass wt2wt and other modes because
12890 ### on serialization, the table will be output on a new line.
12891 ### For now, we are blacklisting them, and using this to test selser.
12895 1. Table tag in SOL posn. should get reparsed correctly with valid TSR
12897 parsoid=wt2html,wt2wt
12899 {{echo|}}{| width = '100%'
12903 <span typeof="mw:Transclusion" data-mw='{"parts":[{"template":{"target":{"wt":"echo","href":"./Template:Echo"},"params":{"1":{"wt":""}},"i":0}}]}'></span><table width="100%">
12904 <tbody><tr><td>foo</td></tr>
12908 ## We used to, but no longer wt2wt this test since the default serializer
12909 ## will normalize the include directives to serialize on their own line.
12910 ## Selser will take care of preserving formatting in scenarios where they
12911 ## intermingled with other wikitext.
12913 2. Table tag in SOL posn. should get reparsed correctly with valid TSR
12917 <includeonly>a</includeonly>{| {{{b}}}
12921 <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":""}]]}'>
12922 <tbody><tr><td>c</td></tr>
12927 Table wikitext syntax outside wiki-tables
12931 ! not a table heading
12934 | class="foo bar" | baz
12942 ! not a table heading
12945 | class="foo bar" | baz
12954 ### Testing parsing of templates where a template arg
12955 ### has the same name as the template itself.
12961 {{{quote|{{{1}}}}}}
12965 Templates: Template Name/Arg clash: 1. Use of positional param
12974 Templates: Template Name/Arg clash: 2. Use of named param
12976 {{quote|quote=foo}}
12983 Templates: Template Name/Arg clash: 3. Use of named param with empty input
12992 ### Parsoid-centric tests to stress Parsoid's ability to RT them unchanged
12996 Templates: 1. Simple use
13005 Templates: 2. Inside a block tag
13007 <div>{{echo|Foo}}</div>
13008 <blockquote>{{echo|Foo}}</blockquote>
13011 <blockquote>Foo</blockquote>
13015 <blockquote><p>Foo</p></blockquote>
13019 Templates: P-wrapping: 1a. Templates on consecutive lines
13030 Templates: P-wrapping: 1b. Templates on consecutive lines
13044 Templates: P-wrapping: 1c. Templates on consecutive lines
13047 {{echo|bar}} <div>baz</div>
13056 bar </p><div>baz</div>
13060 Templates: P-wrapping: 1d. Template preceded by comment-only line
13070 <p about="#mwt223" typeof="mw:Transclusion" data-mw='{"parts":[{"template":{"target":{"wt":"echo","href":"./Template:Echo"},"params":{"1":{"wt":"Bar"}},"i":0}}]}'>Bar</p>
13074 Templates: Scopes should not be expanded unnecessarily
13076 parsoid=wt2html,wt2wt
13078 {{echo|<div>a</div>}}b{{echo|
13084 <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}}]}'>
13085 </span><div about="#mwt2">c</div>
13089 Templates: Inline Text: 1. Multiple template uses
13091 {{echo|Foo}}bar{{echo|baz}}
13098 Templates: Inline Text: 2. Back-to-back template uses
13100 {{echo|Foo}}{{echo|bar}}
13107 Templates: Block Tags: 1. Multiple template uses
13109 {{echo|<div>Foo</div>}}<div>bar</div>{{echo|<div>baz</div>}}
13111 <div>Foo</div><div>bar</div><div>baz</div>
13116 Templates: Block Tags: 2. Back-to-back template uses
13118 {{echo|<div>Foo</div>}}{{echo|<div>bar</div>}}
13120 <div>Foo</div><div>bar</div>
13124 ## Parsoid drops empty elements in templates.
13126 Templates: Correctly encapsulate templates producing </p> tag without a corresponding <p> tag
13133 b</p><p class="mw-empty-elt"></p>
13135 <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">
13136 </span><p about="#mwt1">b</p>
13140 Templates: Links: 1. Simple example
13142 {{echo|[[Foo|bar]]}}
13144 <p><a href="/wiki/Foo" title="Foo">bar</a>
13149 Templates: Links: 2. Generation of link href
13151 [[{{echo|Foo}}|bar]]
13153 <p><a href="/wiki/Foo" title="Foo">bar</a>
13158 Templates: Links: 3. Generation of part of a link href
13160 [[Fo{{echo|o}}|bar]]
13162 [[Foo{{echo|bar}}]]
13164 [[Foo{{echo|bar}}baz]]
13166 [[Foo{{echo|bar}}|bar]]
13168 [[:Foo{{echo|bar}}]]
13170 [[:Foo{{echo|bar}}|bar]]
13172 <p><a href="/wiki/Foo" title="Foo">bar</a>
13173 </p><p><a href="/index.php?title=Foobar&action=edit&redlink=1" class="new" title="Foobar (page does not exist)">Foobar</a>
13174 </p><p><a href="/index.php?title=Foobarbaz&action=edit&redlink=1" class="new" title="Foobarbaz (page does not exist)">Foobarbaz</a>
13175 </p><p><a href="/index.php?title=Foobar&action=edit&redlink=1" class="new" title="Foobar (page does not exist)">bar</a>
13176 </p><p><a href="/index.php?title=Foobar&action=edit&redlink=1" class="new" title="Foobar (page does not exist)">Foobar</a>
13177 </p><p><a href="/index.php?title=Foobar&action=edit&redlink=1" class="new" title="Foobar (page does not exist)">bar</a>
13182 Templates: Links: 4. Multiple templates generating link href
13184 [[{{echo|F}}{{echo|o}}ob{{echo|ar}}]]
13186 <p><a href="/index.php?title=Foobar&action=edit&redlink=1" class="new" title="Foobar (page does not exist)">Foobar</a>
13191 Templates: Links: 5. Generation of link text
13193 [[Foo|{{echo|bar}}]]
13195 <p><a href="/wiki/Foo" title="Foo">bar</a>
13200 Templates: Links: 5. Nested templates (only outermost template should be marked)
13202 {{echo|[[{{echo|Foo}}|bar]]}}
13204 <p><a href="/wiki/Foo" title="Foo">bar</a>
13209 Templates: HTML Tag: 1. Generation of HTML attr. key
13211 <div {{echo|style}}="color:red;">foo</div>
13213 <div style="color:red;">foo</div>
13218 Templates: HTML Tag: 2. Generation of HTML attr. value
13220 <div style={{echo|'color:red;'}}>foo</div>
13222 <div style="color:red;">foo</div>
13227 Templates: HTML Tag: 3. Generation of HTML attr key and value
13229 <div {{echo|style}}={{echo|'color:red;'}}>foo</div>
13231 <div style="color:red;">foo</div>
13236 Templates: HTML Tag: 4. Generation of starting piece of HTML attr value
13238 <div title="{{echo|This is a long title}} with just one piece templated">foo</div>
13240 <div title="This is a long title with just one piece templated">foo</div>
13245 Templates: HTML Tag: 5. Generation of middle piece of HTML attr value
13247 <div title="This is a long title with just {{echo|one piece}} templated">foo</div>
13249 <div title="This is a long title with just one piece templated">foo</div>
13254 Templates: HTML Tag: 6. Generation of end piece of HTML attr value
13256 <div title="This is a long title with just one piece {{echo|templated}}">foo</div>
13258 <div title="This is a long title with just one piece templated">foo</div>
13262 # SSS FIXME: While it is great we added support for all this,
13263 # do we want to make this part of the spec? Maybe we want to
13264 # deprecate this kind of usage in the future?
13266 Templates: HTML Tag: 7. Generation of partial attribute key string
13268 <div st{{echo|yle}}="color:red;">foo</div>
13270 <div style="color:red;">foo</div>
13275 Templates: HTML Tag: 8. Template-generated attribute (k=v)
13277 <div {{echo|1=id="v1"}}>bar</div>
13279 <div id="v1">bar</div>
13284 Templates: HTML Tag: 9. Multiple template-generated attributes
13286 <div {{echo|1=id="v1" title="foo"}}>bar</div>
13288 <div id="v1" title="foo">bar</div>
13293 Templates: Support for templates generating attributes and content
13295 {| {{mixed_attr_content_template}}
13300 <table style="color:red;" title="T48811">
13310 <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|}"]}'>
13319 Template:attribute_from_template
13325 Table cell with attribute before expanded attribute
13328 | align="center" {{attribute_from_template}} |456
13332 <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>
13337 1. Entities and nowikis inside templated attributes should be handled correctly
13339 <div {{echo|style{{=}}"background:#f9f9f9;"}}>foo</div>
13341 <div style="background:#f9f9f9;">foo</div>
13344 <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>
13348 2. Entities and nowikis inside templated attributes should be handled correctly
13351 |{{table_attribs_3}}
13356 <td style="background:#f9f9f9;">Foo
13361 <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>
13366 3. Entities and nowikis inside templated attributes should be handled correctly inside templated tables
13369 |{{table_attribs_3}}
13374 <td style="background:#f9f9f9;">Foo
13378 <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}}]}'>
13379 <tbody><tr><td style="background:#f9f9f9;">Foo</td></tr>
13385 4. Entities and nowikis inside templated attributes should be handled correctly inside templated tables
13388 |{{table_attribs_6}} hi
13393 <td style="background: red;">hi
13398 <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>
13403 Templates: HTML Tables: 1. Generating start of a HTML table
13405 {{echo|<table><tr><td>foo</td>}}</tr></table>
13407 <table><tr><td>foo</td></tr></table>
13412 Templates: HTML Tables: 2a. Generating middle of a HTML table
13414 <table><tr>{{echo|<td>foo</td>}}</tr></table>
13416 <table><tr><td>foo</td></tr></table>
13421 Templates: HTML Tables: 2b. Generating middle of a HTML table
13423 <table>{{echo|<tr><td>foo</td></tr>}}</table>
13425 <table><tr><td>foo</td></tr></table>
13430 Templates: HTML Tables: 3. Generating end 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: 4a. Generating a single tag of a HTML table
13441 {{echo|<table>}}<tr><td>foo</td></tr></table>
13443 <table><tr><td>foo</td></tr></table>
13448 Templates: HTML Tables: 4b. Generating a single tag of a HTML table
13450 <table>{{echo|<tr>}}<td>foo</td></tr></table>
13452 <table><tr><td>foo</td></tr></table>
13457 Templates: HTML Tables: 4c. Generating a single tag of a HTML table
13459 <table><tr>{{echo|<td>}}foo</td></tr></table>
13461 <table><tr><td>foo</td></tr></table>
13466 Templates: HTML Tables: 4d. Generating a single tag of a HTML table
13468 <table><tr><td>foo{{echo|</td>}}</tr></table>
13470 <table><tr><td>foo</td></tr></table>
13475 Templates: HTML Tables: 4e. Generating a single tag of a HTML table
13477 <table><tr><td>foo</td>{{echo|</tr>}}</table>
13479 <table><tr><td>foo</td></tr></table>
13484 Templates: HTML Tables: 4f. Generating a single tag of a HTML table
13486 <table><tr><td>foo</td></tr>{{echo|</table>}}
13488 <table><tr><td>foo</td></tr></table>
13493 Templates: HTML Tables: 5. Proper fostering of categories from inside
13495 parsoid=wt2html,wt2wt
13497 <table>[[Category:foo1]]<tr><td>foo</td></tr></table>
13498 <!--Two categories (T52330)-->
13499 <table>[[Category:bar1]][[Category:bar2]]<tr><td>foo</td></tr></table>
13501 <table><tbody><tr><td>foo</td></tr></tbody></table>
13502 <table><tbody><tr><td>foo</td></tr></tbody></table>
13504 <link rel="mw:PageProp/Category" href="./Category:Foo1"><table><tbody><tr><td>foo</td></tr></tbody></table>
13505 <!--Two categories (T52330)-->
13506 <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>
13509 ## Remex doesn't account for fostered content.
13511 Templates: Wiki Tables: 1a. Fostering of entire template content
13519 <tr><td></td></tr></table>
13524 <table><tbody><tr><td></td></tr></tbody></table>
13526 <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">
13532 Templates: Wiki Tables: 1b. Fostering of entire template content
13545 <tr><td></td></tr></table>
13553 <tbody><tr><td></td></tr></tbody></table>
13555 <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|}"]}'>
13557 </div><table about="#mwt3">
13562 ## Remex doesn't account for fostered content.
13564 Templates: Wiki Tables: 2. Fostering of partial template content
13574 <tr><td></td></tr></table>
13579 <div>b</div><table>
13580 <tbody><tr><td></td></tr></tbody></table>
13582 <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">
13589 Templates: Wiki Tables: 3. td-content via multiple templates
13592 {{echo|{{pipe}}a}}{{echo|b}}
13603 Templates: Wiki Tables: 4. Templated tags, no content
13609 <tr><td></td></tr></table>
13614 Templates: Wiki Tables: 5. Templated tags, regular td-tags
13628 Templates: Wiki Tables: 6. Templated tags, templated td-tags
13641 ## This test case is very specific to Parsoid's internals
13642 ## and is hence only tested for Parsoid's code. Parsoid uses
13643 ## a <meta> marker tag for <ref> tags and they are expanded
13644 ## much later. We are verifying that this <meta> tag usage
13645 ## doesn't prevent foster parenting.
13647 Templates: Wiki Tables: 7. Fosterable <ref>s should get fostered
13649 {{PartialTable}}<ref>foo</ref>
13654 <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">
13658 <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>
13662 Templates: Wiki Tables: 8. Fosterable meta-tags should get fostered
13672 <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{{!}}}"]}'>
13673 </span><meta typeof="mw:Includes/OnlyInclude" about="#mwt1"/><table about="#mwt1">
13677 <meta typeof="mw:Includes/OnlyInclude/End"/></td></tr>
13682 Templates: Lists: Multi-line list-items via templates
13684 *{{echo|a {{nonexistent|
13686 *{{echo|b {{nonexistent|
13689 <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>
13690 <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>
13695 Templates: Ugly nesting: 1. Quotes opened/closed across templates (echo)
13697 {{echo|''a}}{{echo|b''c''d}}{{echo|''e}}
13699 <p><i>ab</i>c<i>d</i>e
13704 Templates: Ugly nesting: 2. Quotes opened/closed across templates (echo_with_span)
13705 (PHP parser generates misnested html)
13707 {{echo_with_span|''a}}{{echo_with_span|b''c''d}}{{echo_with_span|''e}}
13709 <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>
13713 Templates: Ugly nesting: 3. Quotes opened/closed across templates (echo_with_div)
13714 (PHP parser generates misnested html; Parsoid html2wt mode adds newlines between {{echo}}s)
13716 parsoid=wt2html,wt2wt
13718 {{echo_with_div|''a}}{{echo_with_div|b''c''d}}{{echo_with_div|''e}}
13720 <div><i>a</i></div><div><i>b</i>c<i>d</i></div><div>e</div>
13722 <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>
13723 <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>
13724 <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>
13728 Templates: Ugly nesting: 4. Divs opened/closed across templates
13730 a<div>b{{echo|c</div>d}}e
13735 <p>a</p><div>bc</div><p>de
13740 Templates: Ugly templates: 3. newline-only template parameter
13749 # This looks like a bug: a single newline triggers p/br for some reason.
13751 Templates: Ugly templates: 4. newline-only template parameter inconsistency
13760 # T66017 -- ugly wikitext with fostered content generates two template ranges that
13761 # have a true overlap (T1-start - T2-start - T1-end - T2-end).
13763 Templates: Ugly templates: 5. Template encapsulation test: Non-trivial overlap of template ranges is properly handled
13769 <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">
13770 </span><table about="#mwt1">
13774 # T66017 -- ugly wikitext with fostered content generates two template ranges
13775 # that are "identical" and generate nesting cycles in the algorithm
13777 Templates: Ugly templates: 6. Template encapsulation test: Cyclical nesting of template ranges is properly handled
13779 {{echo|<table><tr><td><table>}}
13783 <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"}'>
13784 </div><table about="#mwt1" data-parsoid='{"stx":"html"}'>
13785 </table></td></tr></tbody></table>
13789 Templates: Parameters substituted at the top-level
13791 {{{foo|''who'' {{echo|me}}? '''never!'''}}}
13795 <p><i>who</i> me? <b>never!</b>
13799 <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>
13801 <p about="#mwt3" typeof="mw:Param" data-mw='{"parts":[{"templatearg":{"target":{"wt":"foo"},"params":{"1":{"wt":"bar"},"2":{"wt":"baz"}},"i":0}}]}'>bar</p>
13805 Templates: Param with empty arg in the final position
13809 <span about="#mwt1" typeof="mw:Param" data-mw='{"parts":[{"templatearg":{"target":{"wt":"hi"},"params":{"1":{"wt":""}},"i":0}}]}'></span>
13813 Parser Functions: 1. Simple example
13822 Parser Functions: 2. Nested use (only outermost should be marked up)
13830 ## Note that the templates inside the references are not wrapped
13832 Template nested in extension tag in template
13834 title=[[Main Page]]
13837 {{echo|hi<ref>[[ho|{{echo|hi}}]]</ref>}}
13838 {{echo|hi<ref>[http://test.com?q={{echo|ho}}]</ref>}}
13839 {{echo|hi<ref>-{ho|{{echo|hi}}}-</ref>}}
13842 <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>
13843 <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>
13844 <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>
13845 <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>
13849 ### Pre-save transform tests
13853 pre-save transform: subst:
13859 This is a test template
13863 pre-save transform: normal template
13873 pre-save transform: nonexistent template
13877 {{thistemplatedoesnotexist}}
13879 {{thistemplatedoesnotexist}}
13883 pre-save transform: subst magic variables
13892 # This is T2089, which I fixed. -- wtm
13894 pre-save transform: subst: templates with parameters
13898 {{subst:paramtest|param="something else"}}
13900 This is a test template with parameter "something else"
13904 Template:nowikitest
13906 <nowiki>'''not wiki'''</nowiki>
13910 pre-save transform: nowiki in subst (T3188)
13914 {{subst:nowikitest}}
13916 <nowiki>'''not wiki'''</nowiki>
13920 Template:commenttest
13922 This template has <!-- a comment --> in it.
13926 pre-save transform: comment in subst (T3936)
13930 {{subst:commenttest}}
13932 This template has <!-- a comment --> in it.
13936 pre-save transform: unclosed tag
13940 <nowiki>'''not wiki'''
13942 <nowiki>'''not wiki'''
13946 pre-save transform: mixed tag case
13950 <NOwiki>'''not wiki'''</noWIKI>
13952 <NOwiki>'''not wiki'''</noWIKI>
13956 pre-save transform: unclosed comment in <nowiki>
13960 wiki<nowiki>nowiki<!--nowiki</nowiki>wiki
13962 wiki<nowiki>nowiki<!--nowiki</nowiki>wiki
13965 # Leading @ in this template definition works around a limitation
13966 # in parsoid's parserTests which otherwise strips the <span> from the
13967 # result (confusing it for a template wrapper)
13971 @<span onmouseover="alert('crap')">Oh no</span>
13975 (confirming safety of fix for subst T3936)
13977 {{Template:dangerous}}
13979 <p>@<span>Oh no</span>
13984 pre-save transform: comment containing gallery (T7024)
13988 <!-- <gallery>data</gallery> -->
13990 <!-- <gallery>data</gallery> -->
13994 pre-save transform: comment containing extension
13998 <!-- <tag>data</tag> -->
14000 <!-- <tag>data</tag> -->
14004 pre-save transform: comment containing nowiki
14008 <!-- <nowiki>data</nowiki> -->
14010 <!-- <nowiki>data</nowiki> -->
14014 pre-save transform: <noinclude> in subst (T5298)
14024 pre-save transform: <onlyinclude> in subst (T5298)
14028 {{subst:Includes2}}
14036 {{<includeonly>subst:</includeonly>Includes}}
14040 Template:SafeSubstTest
14042 {{<includeonly>safesubst:</includeonly>Includes}}
14046 T24297: safesubst: works during PST
14050 {{subst:SafeSubstTest}}{{safesubst:SubstTest}}
14056 T24297: safesubst: works during normal parse
14065 subst: does not work during normal parse
14069 <p>{{subst:Includes}}
14074 pre-save transform: context links ("pipe trick")
14078 [[Article (context)|]]
14081 [[Bar:Article (context)|]]
14082 [[:Bar:Article (context)|]]
14084 [[|Article (context)]]
14088 [[Article (context)|Article]]
14089 [[Bar:Article|Article]]
14090 [[:Bar:Article|Article]]
14091 [[Bar:Article (context)|Article]]
14092 [[:Bar:Article (context)|Article]]
14094 [[Article (context)]]
14095 [[Bar:X (Y) Z|X (Y) Z]]
14096 [[:Bar:X (Y) Z|X (Y) Z]]
14100 pre-save transform: context links ("pipe trick") with interwiki prefix
14104 [[interwiki:Article|]]
14105 [[:interwiki:Article|]]
14106 [[interwiki:Bar:Article|]]
14107 [[:interwiki:Bar:Article|]]
14109 [[interwiki:Article|Article]]
14110 [[:interwiki:Article|Article]]
14111 [[interwiki:Bar:Article|Bar:Article]]
14112 [[:interwiki:Bar:Article|Bar:Article]]
14116 pre-save transform: context links ("pipe trick") with parens in title
14118 pst title=[[Somearticle (context)]]
14122 [[Article (context)|Article]]
14126 pre-save transform: context links ("pipe trick") with comma in title
14128 pst title=[[Someplace, Somewhere]]
14131 [[Otherplace, Elsewhere|]]
14132 [[Otherplace, Elsewhere, Anywhere|]]
14134 [[Otherplace, Somewhere|Otherplace]]
14135 [[Otherplace, Elsewhere|Otherplace]]
14136 [[Otherplace, Elsewhere, Anywhere|Otherplace]]
14140 pre-save transform: context links ("pipe trick") with parens and comma
14142 pst title=[[Someplace (IGNORED), Somewhere]]
14145 [[Otherplace (place), Elsewhere|]]
14147 [[Otherplace, Somewhere|Otherplace]]
14148 [[Otherplace (place), Elsewhere|Otherplace]]
14152 pre-save transform: context links ("pipe trick") with comma and parens
14154 pst title=[[Who, me? (context)]]
14157 [[Me, Myself, and I (1937 song)|]]
14159 [[Yes, you. (context)|Yes, you.]]
14160 [[Me, Myself, and I (1937 song)|Me, Myself, and I]]
14164 pre-save transform: context links ("pipe trick") with namespace
14166 pst title=[[Ns:Somearticle]]
14170 [[Ns:Article|Article]]
14174 pre-save transform: context links ("pipe trick") with namespace and parens
14176 pst title=[[Ns:Somearticle (context)]]
14180 [[Ns:Article (context)|Article]]
14184 pre-save transform: context links ("pipe trick") with namespace and comma
14186 pst title=[[Ns:Somearticle, Context, Whatever]]
14190 [[Ns:Article, Context, Whatever|Article]]
14194 pre-save transform: context links ("pipe trick") with namespace, comma and parens
14196 pst title=[[Ns:Somearticle, Context (context)]]
14200 [[Ns:Article (context)|Article]]
14204 pre-save transform: context links ("pipe trick") with namespace, parens and comma
14206 pst title=[[Ns:Somearticle (IGNORED), Context]]
14210 [[Ns:Article, Context|Article]]
14214 pre-save transform: context links ("pipe trick") with full-width parens and no space (Japanese and Chinese style, T32149)
14218 [[Article(context)|]]
14219 [[Bar:Article(context)|]]
14220 [[:Bar:Article(context)|]]
14221 [[|Article(context)]]
14225 [[Article(context)|Article]]
14226 [[Bar:Article(context)|Article]]
14227 [[:Bar:Article(context)|Article]]
14228 [[Article(context)]]
14229 [[Bar:X(Y)Z|X(Y)Z]]
14230 [[:Bar:X(Y)Z|X(Y)Z]]
14234 pre-save transform: context links ("pipe trick") with full-width parens and space (Japanese and Chinese style, T32149)
14238 [[Article (context)|]]
14239 [[Bar:Article (context)|]]
14240 [[:Bar:Article (context)|]]
14241 [[|Article (context)]]
14245 [[Article (context)|Article]]
14246 [[Bar:Article (context)|Article]]
14247 [[:Bar:Article (context)|Article]]
14248 [[Article (context)]]
14249 [[Bar:X (Y) Z|X (Y) Z]]
14250 [[:Bar:X (Y) Z|X (Y) Z]]
14254 pre-save transform: context links ("pipe trick") with parens and no space (Korean style, T32149)
14258 [[Article(context)|]]
14259 [[Bar:Article(context)|]]
14260 [[:Bar:Article(context)|]]
14261 [[|Article(context)]]
14265 [[Article(context)|Article]]
14266 [[Bar:Article(context)|Article]]
14267 [[:Bar:Article(context)|Article]]
14268 [[Article(context)]]
14269 [[Bar:X(Y)Z|X(Y)Z]]
14270 [[:Bar:X(Y)Z|X(Y)Z]]
14274 pre-save transform: context links ("pipe trick") with commas (T23660)
14278 [[Article (context), context|]]
14279 [[Article (context),context|]]
14280 [[Bar:Article (context), context|]]
14281 [[Bar:Article (context),context|]]
14282 [[:Bar:Article (context), context|]]
14283 [[:Bar:Article (context),context|]]
14285 [[Article (context), context|Article]]
14286 [[Article (context),context|Article]]
14287 [[Bar:Article (context), context|Article]]
14288 [[Bar:Article (context),context|Article]]
14289 [[:Bar:Article (context), context|Article]]
14290 [[:Bar:Article (context),context|Article]]
14294 Parsoid: backwards pipe trick
14301 <p>[[|<b>bar</b>]]</p>
14305 pre-save transform: trim trailing empty lines
14309 Empty lines are trimmed
14315 Empty lines are trimmed
14319 pre-save transform: Signature expansion
14326 * <noinclude>~~~</noinclude>
14327 * <includeonly>~~~</includeonly>
14328 * <onlyinclude>~~~</onlyinclude>
14330 * [[Special:Contributions/127.0.0.1|127.0.0.1]]
14331 * [[Special:Contributions/127.0.0.1|127.0.0.1]] 00:02, 1 January 1970 (UTC)
14332 * 00:02, 1 January 1970 (UTC)
14333 * <noinclude>[[Special:Contributions/127.0.0.1|127.0.0.1]]</noinclude>
14334 * <includeonly>[[Special:Contributions/127.0.0.1|127.0.0.1]]</includeonly>
14335 * <onlyinclude>[[Special:Contributions/127.0.0.1|127.0.0.1]]</onlyinclude>
14340 ParserOutput flags from signature expansion (T84843)
14347 [[Special:Contributions/127.0.0.1|127.0.0.1]] 00:02, 1 January 1970 (UTC)
14348 flags=user-signature
14353 pre-save transform: Signature expansion in nowiki tags (T2093)
14359 <nowiki>~~~~</nowiki>
14361 <includeonly><nowiki>~~~~</nowiki></includeonly>
14363 <noinclude><nowiki>~~~~</nowiki></noinclude>
14365 <onlyinclude><nowiki>~~~~</nowiki></onlyinclude>
14367 {{subst:Foo}} shall be converted to FOO
14369 As well as inside noinclude/onlyinclude
14370 <noinclude>{{subst:Foo}}</noinclude>
14371 <onlyinclude>{{subst:Foo}}</onlyinclude>
14373 But not inside includeonly
14374 <includeonly>{{subst:Foo}}</includeonly>
14378 <nowiki>~~~~</nowiki>
14380 <includeonly><nowiki>~~~~</nowiki></includeonly>
14382 <noinclude><nowiki>~~~~</nowiki></noinclude>
14384 <onlyinclude><nowiki>~~~~</nowiki></onlyinclude>
14386 FOO shall be converted to FOO
14388 As well as inside noinclude/onlyinclude
14389 <noinclude>FOO</noinclude>
14390 <onlyinclude>FOO</onlyinclude>
14392 But not inside includeonly
14393 <includeonly>{{subst:Foo}}</includeonly>
14397 Parsoid: Recognize nowiki with trailing space in tags
14401 <nowiki ><div>[[foo]]</nowiki >
14409 <p><div>[[foo]]
14410 </p><p>a<nowiki / >b
14412 </p><p>e<nowiki/ >f
14415 <p><span typeof="mw:Nowiki"><div>[[foo]]</span></p>
14417 <p>a<nowiki / >b</p>
14419 <p>c<span typeof="mw:Nowiki"></span>d</p>
14421 <p>e<nowiki/ >f</p>
14425 Parsoid: Recognize nowiki with odd capitalization
14429 <noWikI ><div>[[foo]]</Nowiki >
14431 <p><div>[[foo]]
14434 <p><span typeof="mw:Nowiki"><div>[[foo]]</span></p>
14439 Parsoid: Escape nowiki with trailing space in tags
14443 <p><nowiki > foo </nowiki ></p>
14444 <p>a<nowiki />b</p>
14445 <p>c<nowiki/ >d</p>
14447 <nowiki > foo </nowiki >
14455 Parsoid: Escape weird noWikI capitalizations
14459 <p><noWikI > foo </NoWikI ></p>
14461 <noWikI > foo </NoWikI >
14465 ### Message transform tests
14468 message transform: magic variables
14478 message transform: should not transform wiki markup
14488 message transform: <noinclude> in transcluded template (T6926)
14498 message transform: <onlyinclude> in transcluded template (T6926)
14508 {{#special:}} page name, known
14512 {{#special:Recentchanges}}
14514 Special:RecentChanges
14518 {{#special:}} page name with subpage, known
14522 {{#special:Recentchanges/param}}
14524 Special:RecentChanges/param
14528 {{#special:}} page name, unknown
14532 {{#special:foobar nonexistent}}
14534 Special:Foobar nonexistent
14538 {{#speciale:}} page name, known
14542 {{#speciale:Recentchanges}}
14544 Special:RecentChanges
14548 {{#speciale:}} page name with subpage, known
14552 {{#speciale:Recentchanges/param}}
14554 Special:RecentChanges/param
14558 {{#speciale:}} page name, unknown
14562 {{#speciale:foobar nonexistent}}
14564 Special:Foobar_nonexistent
14570 ### For Parsoid-specific tests, see
14571 #### https://www.mediawiki.org/wiki/Parsoid/MediaWiki_DOM_spec#Images
14576 parsoid=wt2html,wt2wt,html2html
14578 [[Image:foobar.jpg]]
14580 <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>
14583 <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>
14587 Serialize simple image with span wrapper
14591 <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>
14593 [[File:Foobar.jpg]]
14597 Simple image (using File: namespace, now canonical)
14599 [[File:Foobar.jpg]]
14601 <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>
14604 <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>
14608 Right-aligned image
14610 [[File:Foobar.jpg|right]]
14612 <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>
14615 <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>
14621 [[File:Foobar.jpg|right|Caption text]]
14623 <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>
14626 <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>
14630 Image with caption, T55312 #1
14632 [[File:Foobar.jpg|right|Caption page stuff]]
14634 <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>
14637 <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>
14641 Image with caption, T55312 #2
14643 [[File:Foobar.jpg|right|Caption page=]]
14645 <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>
14648 <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>
14652 Image with caption, T55312 #3
14654 [[File:Foobar.jpg|right|Caption page=stuff]]
14656 <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>
14659 <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>
14663 Image caption with pipe entity
14665 [[File:Foobar.jpg|thumb|one | two]]
14666 [[File:Foobar.jpg|thumb|one ''two'' | three]]
14668 <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>
14669 <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>
14672 <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>
14673 <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>
14677 Allow empty links in image captions (T62753)
14681 [[File:Foobar.jpg|thumb|Caption [[Link1]]
14686 <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>
14689 <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>
14691 <a rel="mw:WikiLink" href="./Link2" title="Link2" data-parsoid='{"stx":"simple","a":{"href":"./Link2"},"sa":{"href":"Link2"}}'>Link2</a>
14692 </figcaption></figure>
14696 Titles in unlinked images (T23454)
14698 [[File:Foobar.jpg|link=|stuff]]
14700 <p><img alt="stuff" src="http://example.com/images/3/3a/Foobar.jpg" title="stuff" width="1941" height="220" />
14703 <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>
14707 Link with empty target
14716 Image with link trail
14718 Linktrails should not work for images: [[File:Foobar.jpg]]s
14720 <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
14723 <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>
14727 Image with empty attribute
14729 parsoid=wt2html,wt2wt,html2html
14731 [[File:Foobar.jpg|right||Caption text]]
14733 <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>
14736 <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>
14740 1. Block image with individual attributes from templates
14742 [[File:Foobar.jpg|thumb|{{echo|137px}}|This is a caption]]
14744 <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>
14747 <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>
14751 2. Block Image with individual attributes from templates
14753 [[File:Foobar.jpg|{{echo|thumb}}|{{echo|137px}}|This is a caption]]
14755 <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>
14758 <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>
14762 3. Inline image with individual attributes from templates
14764 [[File:Foobar.jpg|{{echo|50px}}]]
14766 <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>
14769 <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>
14772 ## Parsoid does not provide editing support for images where templates produce multiple image attributes.
14773 ## To signal this, we add a 'mw:Placeholder' type to such images. This could change in the future.
14775 Image with multiple attributes from the same template
14777 [[File:Foobar.jpg|{{image_attribs}}]]
14779 <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>
14782 <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>
14786 Image with link tails
14790 123[[File:Foobar.jpg]]456
14791 123[[File:Foobar.jpg|right]]456
14792 123[[File:Foobar.jpg|thumb]]456
14794 <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
14796 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
14797 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
14800 <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
14802 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
14803 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
14806 <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>
14807 <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
14808 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>
14812 Image with multiple captions -- only last one is accepted
14814 [[File:Foobar.jpg|right|Caption1 - ignored|[[Caption2]] - ignored|Caption3 - accepted]]
14816 <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>
14819 <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>
14823 Image with multiple widths -- use last
14825 [[File:Foobar.jpg|200px|300px|caption]]
14827 <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>
14830 <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>
14834 Image with multiple alignments -- use first (T50664)
14838 [[File:Foobar.jpg|thumb|left|right|center|caption]]
14840 [[File:Foobar.jpg|middle|text-top|caption]]
14842 <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>
14843 <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>
14846 <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>
14847 <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>
14851 Image with width attribute at different positions
14853 [[File:Foobar.jpg|200px|right|Caption]]
14854 [[File:Foobar.jpg|right|200px|Caption]]
14855 [[File:Foobar.jpg|right|Caption|200px]]
14857 <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>
14858 <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>
14859 <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>
14862 <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>
14863 <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>
14864 <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>
14867 # a sad bit of backward-compatibility
14869 Image with size specified with pxpx (T15500, T53628)
14871 parsoid=wt2html,wt2wt,html2html
14873 [[File:Foobar.jpg|20pxpx]]
14874 [[File:Foobar.jpg|200x20pxpx]]
14876 <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>
14877 <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>
14880 <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>
14884 Image with link parameter, wiki target
14886 [[File:Foobar.jpg|link=Main Page]]
14888 <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>
14891 <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>
14894 # parsoid T51293 (part 1)
14896 Image with link parameter, URL target
14898 [[File:Foobar.jpg|link=http://example.com/]]
14900 <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>
14903 <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>
14906 # parsoid T51293 (part 2)
14908 Image with link parameter, protocol-less URL target
14910 [[File:Foobar.jpg|link=//example.com/]]
14912 <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>
14915 <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>
14919 Escaping non-block captions (T107435)
14922 "modes": ["wt2wt"],
14924 ["[typeof~='mw:Image']", "attr", "data-mw", "{\"caption\": \"|\"}"]
14928 [[Image:Foobar.jpg|caption]]
14930 [[Image:Foobar.jpg|<nowiki>|</nowiki>]]
14933 # wgExternalLinkTarget not supported by Parsoid
14935 Image with link parameter, wgExternalLinkTarget
14937 [[Image:foobar.jpg|link=http://example.com/]]
14939 wgExternalLinkTarget='foobar'
14941 <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>
14946 Image with link parameter, wgNoFollowLinks set to false
14948 [[Image:foobar.jpg|link=http://example.com/]]
14950 wgNoFollowLinks=false
14952 <p><a href="http://example.com/"><img alt="Foobar.jpg" src="http://example.com/images/3/3a/Foobar.jpg" width="1941" height="220" /></a>
14957 Image with link parameter, wgNoFollowDomainExceptions
14959 [[Image:foobar.jpg|link=http://example.com/]]
14961 wgNoFollowDomainExceptions='example.com'
14963 <p><a href="http://example.com/"><img alt="Foobar.jpg" src="http://example.com/images/3/3a/Foobar.jpg" width="1941" height="220" /></a>
14967 # wgExternalLinkTarget not supported by Parsoid
14969 Image with link parameter, wgExternalLinkTarget, unnamed parameter
14971 [[Image:foobar.jpg|link=http://example.com/|Title]]
14973 wgExternalLinkTarget='foobar'
14975 <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>
14980 Image with empty link parameter
14982 [[File:Foobar.jpg|link=]]
14984 <p><img alt="Foobar.jpg" src="http://example.com/images/3/3a/Foobar.jpg" width="1941" height="220" />
14987 <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>
14991 Image with link parameter (wiki target) and unnamed parameter
14993 [[File:Foobar.jpg|link=Main_Page|Title]]
14995 <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>
14998 <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>
15002 Image with link parameter (URL target) and unnamed parameter
15004 [[File:Foobar.jpg|link=http://example.com/|Title]]
15006 <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>
15009 <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>
15013 Thumbnail image with link parameter
15016 parsoid=wt2html,wt2wt,html2html
15018 [[File:Foobar.jpg|thumb|link=http://example.com/|Title]]
15020 <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>
15023 <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>
15027 Manually-specified thumbnail image
15031 [[File:Foobar.jpg|thumbnail=Thumb.png|Title]]
15033 <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>
15036 <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>
15040 Manually-specified thumbnail image with explicit link to wiki page
15043 parsoid=wt2html,wt2wt,html2html
15045 [[File:Foobar.jpg|thumb=Thumb.png|link=Main_Page|Title]]
15047 <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>
15050 <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>
15054 Manually-specified thumbnail image with explicit link to url
15057 parsoid=wt2html,wt2wt,html2html
15059 [[File:Foobar.jpg|thumb=Thumb.png|link=http://example.com|Title]]
15061 <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>
15064 <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>
15068 Manually-specified thumbnail image with explicit no link
15071 parsoid=wt2html,wt2wt,html2html
15073 [[File:Foobar.jpg|thumb=Thumb.png|link=|Title]]
15075 <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>
15078 <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>
15082 Manually-specified thumbnail image with explicit link and alt text
15085 parsoid=wt2html,wt2wt,html2html
15087 [[File:Foobar.jpg|thumb=Thumb.png|link=Main_Page|alt=alttext|Title]]
15089 <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>
15092 <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>
15096 Image with frame and link
15098 parsoid=wt2html,wt2wt,html2html
15100 [[File:Foobar.jpg|frame|left|This is a test image [[Main Page]]]]
15102 <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>
15105 <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>
15109 Image with frame and link and explicit alt
15111 parsoid=wt2html,wt2wt,html2html
15113 [[Image:Foobar.jpg|frame|left|This is a test image [[Main Page]]|alt=Altitude]]
15115 <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>
15118 <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>
15122 Image with wiki markup in implicit alt
15124 [[Image:Foobar.jpg|testing '''bold''' in alt]]
15126 [[Image:Foobar.jpg|alt=testing '''bold''' in alt]]
15128 <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>
15129 </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>
15132 <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>
15134 <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>
15138 Alt image option should handle most kinds of wikitext without barfing
15140 [[Image:Foobar.jpg|thumb|This is the image caption|alt=This is a [[link]] and a {{echo|''bold template''}}.]]
15142 <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>
15145 <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>
15149 Ampersand in alt attribute (T206940)
15152 "nativeGallery": true
15155 [[File:Foobar.jpg|alt=&amp;]]
15157 <!-- consistency with gallery extension -->
15159 File:Foobar.jpg|alt=&amp;
15162 <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>
15164 <ul class="gallery mw-gallery-traditional">
15165 <li class="gallerybox" style="width: 155px"><div style="width: 155px">
15166 <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>
15167 <div class="gallerytext">
15172 <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>
15174 <!-- consistency with gallery extension -->
15175 <ul class="gallery mw-gallery-traditional" typeof="mw:Extension/gallery" data-mw='{"name":"gallery","attrs":{},"body":{}}'>
15176 <li class="gallerybox">
15177 <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>
15178 <div class="gallerytext"></div>
15184 Italics markup in alt attribute (T206940)
15186 [[File:Foobar.jpg|alt=''x''|caption]]
15188 <!-- consistency with gallery extension -->
15190 File:Foobar.jpg|alt=''x''|caption
15193 <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>
15195 <ul class="gallery mw-gallery-traditional">
15196 <li class="gallerybox" style="width: 155px"><div style="width: 155px">
15197 <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>
15198 <div class="gallerytext">
15205 <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>
15207 <!-- consistency with gallery extension -->
15208 <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"}}'>
15209 <li class="gallerybox">
15210 <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>
15211 <div class="gallerytext">caption</div>
15217 Nowiki markup in alt attribute (T206940)
15219 [[File:Foobar.jpg|alt=<nowiki>''</nowiki>x<nowiki>''</nowiki>|caption]]
15221 <!-- consistency with gallery extension -->
15223 File:Foobar.jpg|alt=<nowiki>''</nowiki>x<nowiki>''</nowiki>|caption
15226 <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>
15228 <ul class="gallery mw-gallery-traditional">
15229 <li class="gallerybox" style="width: 155px"><div style="width: 155px">
15230 <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>
15231 <div class="gallerytext">
15238 <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>
15240 <!-- consistency with gallery extension -->
15241 <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"}}'>
15242 <li class="gallerybox">
15243 <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>
15244 <div class="gallerytext">caption</div>
15250 Nowiki markup in alt attribute (edited html, no data-parsoid) (T206940)
15253 "nativeGallery": true
15256 [[File:Foobar.jpg|alt=<nowiki>''x''</nowiki>|caption]]
15258 <!-- consistency with gallery extension -->
15260 File:Foobar.jpg|alt=<nowiki>''x''</nowiki>|caption
15263 <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>
15265 <ul class="gallery mw-gallery-traditional">
15266 <li class="gallerybox" style="width: 155px"><div style="width: 155px">
15267 <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>
15268 <div class="gallerytext">
15275 <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>
15277 <!-- consistency with gallery extension -->
15278 <ul class="gallery mw-gallery-traditional" typeof="mw:Extension/gallery" data-mw='{"name":"gallery","attrs":{},"body":{}}'>
15279 <li class="gallerybox">
15280 <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>
15281 <div class="gallerytext">caption</div>
15287 Ampersand in link attribute (T206940)
15289 [[File:Foobar.jpg|link=Foo & bar]]
15291 <!-- consistency with gallery extension -->
15293 File:Foobar.jpg|link=Foo & bar
15296 <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>
15298 <ul class="gallery mw-gallery-traditional">
15299 <li class="gallerybox" style="width: 155px"><div style="width: 155px">
15300 <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>
15301 <div class="gallerytext">
15306 <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>
15308 <!-- consistency with gallery extension -->
15309 <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"}}'>
15310 <li class="gallerybox">
15311 <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>
15312 <div class="gallerytext"></div>
15318 Ampersand in link attribute (edited html, no data-parsoid) (T206940)
15321 "nativeGallery": true
15324 [[File:Foobar.jpg|link=Foo_&_bar]]
15326 <!-- consistency with gallery extension -->
15328 File:Foobar.jpg|link=Foo_&_bar
15331 <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>
15333 <ul class="gallery mw-gallery-traditional">
15334 <li class="gallerybox" style="width: 155px"><div style="width: 155px">
15335 <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>
15336 <div class="gallerytext">
15341 <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>
15343 <!-- consistency with gallery extension -->
15344 <ul class="gallery mw-gallery-traditional" typeof="mw:Extension/gallery" data-mw='{"name":"gallery","attrs":{},"body":{}}'>
15345 <li class="gallerybox">
15346 <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>
15347 <div class="gallerytext"></div>
15353 Italics markup in link attribute (T206940)
15357 <!-- Note that "italics" are stripped, even though this is a valid page title -->
15358 [[File:Foobar.jpg|link=Foo''s bar''s|caption1]]
15360 [[File:Foobar.jpg|link=''Main Page''|caption2]]
15362 <!-- consistency with gallery extension -->
15364 File:Foobar.jpg|link=Foo''s bar''s|caption1
15365 File:Foobar.jpg|link=''Main Page''|caption2
15368 <p><a href="/wiki/Foo%27%27s_bar%27%27s" title="Foo''s bar''s">Foo''s bar''s</a>
15369 </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>
15370 </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>
15372 <ul class="gallery mw-gallery-traditional">
15373 <li class="gallerybox" style="width: 155px"><div style="width: 155px">
15374 <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>
15375 <div class="gallerytext">
15380 <li class="gallerybox" style="width: 155px"><div style="width: 155px">
15381 <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>
15382 <div class="gallerytext">
15389 <p><a rel="mw:WikiLink" href="./Foo''s_bar''s" title="Foo''s bar''s">Foo''s bar''s</a></p>
15391 <!-- Note that "italics" are stripped, even though this is a valid page title -->
15392 <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>
15394 <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>
15396 <!-- consistency with gallery extension -->
15397 <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"}}'>
15398 <li class="gallerybox">
15399 <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>
15400 <div class="gallerytext">caption1</div>
15402 <li class="gallerybox">
15403 <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>
15404 <div class="gallerytext">caption2</div>
15410 Nowiki markup in link attribute (T206940)
15412 [[File:Foobar.jpg|link=Foo<nowiki>''</nowiki>s_bar<nowiki>''</nowiki>s|caption]]
15414 <!-- consistency with gallery extension -->
15416 File:Foobar.jpg|link=Foo<nowiki>''</nowiki>s_bar<nowiki>''</nowiki>s|caption
15419 <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>
15421 <ul class="gallery mw-gallery-traditional">
15422 <li class="gallerybox" style="width: 155px"><div style="width: 155px">
15423 <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>
15424 <div class="gallerytext">
15431 <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>
15433 <!-- consistency with gallery extension -->
15434 <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"}}'>
15435 <li class="gallerybox">
15436 <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>
15437 <div class="gallerytext">caption</div>
15443 Nowiki markup in link attribute (edited html, no data-parsoid) (T206940)
15446 "nativeGallery": true
15449 [[File:Foobar.jpg|link=Foo<nowiki>''s_bar''</nowiki>s|caption]]
15451 <!-- consistency with gallery extension -->
15453 File:Foobar.jpg|link=Foo<nowiki>''s_bar''</nowiki>s|caption
15456 <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>
15458 <ul class="gallery mw-gallery-traditional">
15459 <li class="gallerybox" style="width: 155px"><div style="width: 155px">
15460 <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>
15461 <div class="gallerytext">
15468 <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>
15470 <!-- consistency with gallery extension -->
15471 <ul class="gallery mw-gallery-traditional" typeof="mw:Extension/gallery" data-mw='{"name":"gallery","attrs":{},"body":{}}'>
15472 <li class="gallerybox">
15473 <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>
15474 <div class="gallerytext">caption</div>
15480 HTML entity prefix in link markup (T209236)
15482 [[File:Foobar.jpg|link=https://example.com?foo¶ms=bar]]
15484 <!-- consistency with gallery extension -->
15486 File:Foobar.jpg|link=https://example.com?foo¶ms=bar
15489 <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>
15491 <ul class="gallery mw-gallery-traditional">
15492 <li class="gallerybox" style="width: 155px"><div style="width: 155px">
15493 <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>
15494 <div class="gallerytext">
15499 <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>
15501 <!-- consistency with gallery extension -->
15502 <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"}}'>
15503 <li class="gallerybox">
15504 <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>
15505 <div class="gallerytext"></div>
15511 Image with table with attributes in caption
15513 parsoid=wt2html,html2html
15515 [[File:Foobar.jpg|thumb|
15522 <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>
15523 <table class="123">
15524 <tbody><tr class="456" data-parsoid='{"startTagSrc":"|-"}'>
15527 </figcaption></figure>
15531 Image with table with rows from templates in caption
15533 [[File:Foobar.jpg|thumb|
15539 <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>
15541 <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>
15543 </figcaption></figure>
15547 Image with nested tables in caption
15549 [[File:Foobar.jpg|thumb|Foo<br />
15558 <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}'/>
15562 <tbody><tr><td>z</td></tr>
15563 </tbody></table></td></tr>
15565 </figcaption></figure>
15569 Image with heading and horizontal rule in caption
15571 [[File:Foobar.jpg|thumb|
15577 <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>
15580 <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>
15581 <h3 id="Testing">Testing</h3>
15583 <hr data-parsoid='{"extra_dashes":10}'/>
15584 </figcaption></figure>
15587 ###################
15588 # Conflicting image format options.
15589 # First option specified should 'win'.
15590 # All three cases in each test should be identical.
15593 Image with 'frameless' first.
15595 parsoid=wt2html,wt2wt,html2html
15597 [[File:Foobar.jpg|frameless|caption]]
15599 [[File:Foobar.jpg|frameless|frame|caption]]
15601 [[File:Foobar.jpg|frameless|thumb|caption]]
15603 <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>
15604 </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>
15605 </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>
15608 <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>
15609 <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>
15610 <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>
15614 Image with 'frame' first.
15616 parsoid=wt2html,wt2wt,html2html
15618 [[File:Foobar.jpg|frame|caption]]
15619 [[File:Foobar.jpg|frame|frameless|caption]]
15620 [[File:Foobar.jpg|frame|thumb|caption]]
15622 <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>
15623 <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>
15624 <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>
15627 <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>
15628 <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>
15629 <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>
15633 Image with 'thumb' first.
15635 parsoid=wt2html,wt2wt,html2html
15637 [[File:Foobar.jpg|thumb|caption]]
15638 [[File:Foobar.jpg|thumb|frameless|caption]]
15639 [[File:Foobar.jpg|thumb|frame|caption]]
15641 <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>
15642 <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>
15643 <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>
15646 <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>
15647 <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>
15648 <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>
15651 ###################
15653 # See https://www.mediawiki.org/wiki/Help:Images#Size_and_frame
15654 # and https://phabricator.wikimedia.org/T64258
15655 # Foobar has actual size of 1941x220
15656 # 1. Thumbs & frameless always reduce, can't be enlarged unless it's
15657 # a scalable format.
15658 # 2. Framed images always ignore size options; always render at default size.
15659 # 3. "Unspecified format" and border are the only types which can be
15663 Image: unspecified format and border enlarge
15665 parsoid=wt2html,wt2wt,html2html
15667 [[File:Foobar.jpg|2000px]]
15669 [[File:Foobar.jpg|border|2000px]]
15671 <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>
15672 </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>
15675 <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>
15676 <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>
15680 Image: "unspecified format" and border reduce
15682 parsoid=wt2html,wt2wt,html2html
15684 [[File:Foobar.jpg|1000px]]
15686 [[File:Foobar.jpg|border|1000px]]
15688 <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>
15689 </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>
15692 <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>
15693 <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>
15697 Image: thumbs reduce
15699 parsoid=wt2html,wt2wt,html2html
15701 [[File:Foobar.jpg|thumb|50px]]
15703 <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>
15706 <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>
15710 Image: bitmap thumbs can't be enlarged past original size, but vector can.
15712 parsoid=wt2html,wt2wt,html2html
15714 [[File:Foobar.jpg|thumb|2000px]]
15716 [[File:Foobar.svg|thumb|2000px]]
15718 <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>
15719 <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>
15722 <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>
15723 <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>
15727 Image: frameless can reduce in size
15729 parsoid=wt2html,wt2wt,html2html
15731 [[File:Foobar.jpg|frameless|50px]]
15733 <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>
15736 <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>
15740 Image: bitmap frameless can't be enlarged past original size, but vector can
15742 parsoid=wt2html,wt2wt,html2html
15744 [[File:Foobar.jpg|frameless|2000px]]
15746 [[File:Foobar.svg|frameless|2000px]]
15748 <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>
15749 </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>
15752 <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>
15753 <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>
15757 Image: framed images are always unscaled.
15759 parsoid=wt2html,wt2wt,html2html
15761 [[File:Foobar.jpg|frame]]
15763 [[File:Foobar.jpg|frame|50px]]
15765 [[File:Foobar.jpg|frame|50x50px]]
15767 [[File:Foobar.jpg|frame|2000px]]
15769 <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>
15770 <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>
15771 <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>
15772 <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>
15775 <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>
15776 <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>
15777 <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>
15778 <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>
15781 ###################
15784 Link to image page- image page normally doesn't exists, hence edit link
15785 Add test with existing image page
15786 #<p><a href="/wiki/File:Test" title="Image:Test">Image:test</a>
15790 <p><a href="/index.php?title=File:Test&action=edit&redlink=1" class="new" title="File:Test (page does not exist)">Image:test</a>
15795 T20784 Link to non-existent image page with caption should use caption as link text
15797 [[:Image:test|caption]]
15799 <p><a href="/index.php?title=File:Test&action=edit&redlink=1" class="new" title="File:Test (page does not exist)">caption</a>
15804 Frameless image caption with a free URL
15806 [[File:Foobar.jpg|http://example.com]]
15808 <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>
15811 <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>
15815 Thumbnail image caption with a free URL
15819 [[File:Foobar.jpg|thumb|http://example.com]]
15821 <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>
15824 <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>
15828 Thumbnail image caption with a free URL and explicit alt
15831 parsoid=wt2html,wt2wt,html2html
15833 [[File:Foobar.jpg|thumb|http://example.com|alt=Alteration]]
15835 <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>
15838 <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>
15842 SVG thumbnails with no language set
15845 [[File:Foobar.svg|thumb|caption]]
15847 <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>
15850 <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>
15854 SVG thumbnails with language de
15856 parsoid=wt2html,wt2wt,html2html
15858 [[File:Foobar.svg|thumb|caption|lang=de]]
15860 <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>
15863 <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>
15867 SVG thumbnails with invalid language code
15869 parsoid=wt2html,wt2wt,html2html
15871 [[File:Foobar.svg|thumb|caption|lang=invalid:language:code]]
15873 <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>
15876 <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>
15880 SVG thumbnails in page language
15883 wgMediaInTargetLanguage = true
15885 [[File:Foobar.svg]] [[File:Foobar.svg|lang=en]]
15887 <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>
15892 SVG thumbnails in page language not present in the file
15895 wgMediaInTargetLanguage = true
15897 [[File:Foobar.svg]] [[File:Foobar.svg|lang=ru]]
15899 <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>
15904 T3887: A ISBN with a thumbnail
15906 [[File:Foobar.jpg|thumb|ISBN 1235467890]]
15908 <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>
15911 <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>
15915 T3887: A RFC with a thumbnail
15917 [[File:Foobar.jpg|thumb|This is RFC 12354]]
15919 <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>
15922 <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>
15926 T3887: A mailto link with a thumbnail
15928 [[File:Foobar.jpg|thumb|Please mailto:nobody@example.com]]
15930 <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>
15933 <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>
15936 # Pending resolution to T2368
15938 T2648: Frameless image caption with a link
15940 [[File:Foobar.jpg|text with a [[link]] in it]]
15942 <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>
15945 <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>
15949 T2648: Frameless image caption with a link (suffix)
15951 [[File:Foobar.jpg|text with a [[link]]foo in it]]
15953 <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>
15956 <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>
15960 T2648: Frameless image caption with an interwiki link
15962 [[File:Foobar.jpg|text with a [[MeatBall:Link]] in it]]
15964 <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>
15967 <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>
15971 T2648: Frameless image caption with a piped interwiki link
15973 [[File:Foobar.jpg|text with a [[MeatBall:Link|link]] in it]]
15975 <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>
15978 <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>
15982 T107474: Frameless image caption with <nowiki>
15984 [[File:Foobar.jpg|<nowiki>text with a [[MeatBall:Link|link]] in it</nowiki>]]
15986 <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>
15990 Escape HTML special chars in image alt text
15992 [[File:Foobar.jpg|& < > "]]
15994 <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>
15997 <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>
16001 Escape HTML special chars in image alt text with LanguageConverter
16005 [[File:Foobar.jpg|& < > "]]
16007 <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>
16010 <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>
16014 Entities in file name and attributes
16016 [[File:7%25 solution.gif|manualthumb=7%25 solution.gif|link=7%25 solution|[[7%25 solution]]]]
16018 <p><a href="/index.php?title=Special:Upload&wpDestFile=7%25_solution.gif" class="new" title="File:7% solution.gif">7% solution</a>
16021 <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>
16025 T2499: Alt text should have Ӓ, not &1234;
16027 [[File:Foobar.jpg|♀]]
16029 <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>
16032 <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>
16036 Broken image caption with link
16038 parsoid=wt2html,wt2wt,html2html
16040 [[Image:Foobar.jpg|thumb|This is a broken caption. But [[Main Page|this]] is just an ordinary link.
16042 <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.
16045 <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>
16049 Image caption containing another image
16051 [[File:Foobar.jpg|thumb|This is a caption with another [[File:Thumb.png|image]] inside it!]]
16053 <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>
16056 <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>
16060 Image: caption containing a newline
16062 [[File:Foobar.jpg|This
16065 <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>
16068 <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>
16072 Image: caption containing leading space
16073 (The leading space should not trigger nowiki escaping in wt2wt mode)
16075 [[File:Foobar.jpg|thumb| bar]]
16077 <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>
16080 <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>
16083 # html/php output not have newlines after table, td, th, etc. because
16084 # Linker::makeThumbLink2() replaces the newlines with spaces since
16085 # the table is inside a caption.
16086 # FIXME: Verify if that circa 2004 fix is still required.
16088 Image: caption containing a table
16090 parsoid=wt2html,wt2wt,html2html
16092 [[Image:Foobar.jpg|thumb|200px|This is an example image thumbnail caption with a table
16098 and some more text.]]
16100 <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>
16103 <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
16106 <tr><th>Foo</th><th>Bar</th></tr>
16109 <td>Bar1</td></tr></tbody></table>and some more text.</figcaption></figure>
16113 T5090: External links other than http: in image captions
16115 [[File:Foobar.jpg|thumb|200x200px|This caption has [irc://example.net irc] and [https://example.com Secure] ext links in it.]]
16117 <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>
16120 <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>
16126 parsoid=wt2html,wt2wt,html2html
16128 [[Image:foobar.jpg|a|class=b]]
16130 <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>
16133 <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>
16137 Localized image handling (1).
16139 parsoid=wt2html,wt2wt,html2html
16142 [[Archivo:Foobar.jpg|izquierda|enlace=foo|caption]]
16144 <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>
16147 <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>
16151 Localized image handling (2).
16154 parsoid=wt2html,wt2wt,html2html
16157 [[Archivo:Foobar.jpg|miniatura|izquierda|enlace=foo|caption]]
16159 <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>
16162 <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>
16166 Localized image handling (3).
16171 <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>
16173 [[File:Foobar.jpg|بندانگشتی]]
16177 "border", "frameless" and "class" attributes on an image.
16180 parsoid=wt2html,wt2wt,html2html
16182 [[File:Foobar.jpg|frameless|border|class=extra|caption]]
16184 <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>
16187 <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>
16190 # Note that 'right' is the default alignment, despite the misspelled 'righ' below
16192 Invalid image attributes (T64500)
16195 parsoid=wt2html,wt2wt,html2html
16197 [[File:Foobar.jpg|thumb|float|left|caption]]
16199 [[File:Foobar.jpg|thumb|righ|caption]]
16201 [[File:Foobar.jpg|bogus1|thumb|bogus2|left|bogus3|caption]]
16203 <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>
16204 <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>
16205 <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>
16208 <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>
16209 <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>
16210 <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>
16216 #REDIRECT [[File:Barfoo.jpg]]
16219 # FIXME: Parsoid should run this test -- but we'd need to teach the
16220 # mockAPI about the redirected Barfoo.jpg image.
16224 [[Image:Barfoo.jpg]]
16226 <p><a href="/wiki/File:Barfoo.jpg" class="mw-redirect" title="File:Barfoo.jpg">File:Barfoo.jpg</a>
16231 Missing image with uploads disabled
16235 [[File:Foobaz.jpg]]
16237 <p><a href="/wiki/File:Foobaz.jpg" title="File:Foobaz.jpg">File:Foobaz.jpg</a>
16240 <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>
16243 # Parsoid-specific testing for images
16244 # https://www.mediawiki.org/wiki/Parsoid/MediaWiki_DOM_spec#Images
16245 # Currently imperfect due to a flaw in the Parsoid testrunner
16247 # THESE TESTS SHOULD BE MOVED UP and merged with the php-specific
16251 Parsoid-specific image handling - simple image with size and middle alignment
16253 [[File:Foobar.jpg|middle|50px]]
16255 <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>
16259 Parsoid-specific image handling - simple image with size, middle alignment, non-standard namespace alias
16261 parsoid=wt2wt,wt2html,html2html
16263 [[Image:Foobar.jpg|middle|50px]]
16265 <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>
16269 Parsoid-specific image handling - simple image with size and middle alignment (existing content)
16271 [[File:Foobar.jpg|50px|middle]]
16273 <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>
16277 Parsoid-specific image handling - simple image with size and middle alignment and non-standard namespace name
16279 parsoid=wt2html,wt2wt,html2html
16281 [[Image:Foobar.jpg|50px|middle]]
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 both sizes, a baseline alignment, and a caption
16289 [[File:Foobar.jpg|500x10px|baseline|caption]]
16291 <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>
16295 Parsoid-specific image handling - simple image with border and size spec
16297 [[File:Foobar.jpg|50px|border|caption]]
16299 <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>
16303 Parsoid-specific image handling - thumbnail with halign, valign, and caption
16305 parsoid=wt2html,html2html
16307 [[File:Foobar.jpg|left|baseline|thumb|caption content]]
16309 <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>
16313 Parsoid-specific image handling - thumbnail with halign, valign, and caption (existing content)
16315 parsoid=wt2html,html2html
16317 [[File:Foobar.jpg|thumb|left|baseline|caption content]]
16319 <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>
16323 Parsoid-specific image handling - thumbnail with specific size, halign, valign, and caption
16325 parsoid=wt2html,html2html
16327 [[Image:Foobar.jpg|right|middle|thumb|50x50px|caption]]
16329 <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>
16333 Parsoid-specific image handling - thumbnail with specific size, halign, valign, and caption (existing content)
16335 parsoid=wt2html,html2html
16337 [[File:Foobar.jpg|thumb|50x50px|right|middle|caption]]
16339 <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>
16343 Parsoid-specific image handling - framed image with specific size and caption (size is ignored)
16345 parsoid=wt2html,wt2wt,html2html
16347 [[File:Foobar.jpg|frame|500x50px|caption]]
16349 <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>
16353 Parsoid-specific image handling - framed image with specific size, halign, valign, and caption (size is ignored)
16355 parsoid=wt2html,html2html
16357 [[File:Foobar.jpg|left|baseline|frame|500x50px|caption]]
16359 <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>
16363 Parsoid-specific image handling - frameless image with specific size, border, and caption
16365 [[File:Foobar.jpg|frameless|442x50px|border|caption]]
16367 <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>
16371 Parsoid-specific image handling - simple image with a formatted caption
16373 [[File:Foobar.jpg|<table><tr><td>a</td><td>b</td></tr><tr><td>c</td></tr></table>]]
16375 <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>
16379 Parsoid-specific image handling - caption with a template in it
16381 [[File:Foobar.jpg|thumb|200x23px|This caption has a {{echo|transclusion}} in it.]]
16383 <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>
16387 Parsoid-specific image handling - caption with unbalanced tags in it
16389 parsoid=wt2html,wt2wt,html2html
16392 [[File:Foobar.jpg|thumb|200x200px|This caption has a <center>unbalanced tag in it.]]
16396 <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>
16401 Parsoid-specific image handling - empty caption (1)
16403 parsoid=wt2html,wt2wt
16405 [[File:Foobar.jpg|thumb|]]
16407 <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>
16410 # empty captions don't get serialized unless we're in the "round trip" case
16412 Parsoid-specific image handling - empty caption (2)
16416 <figure class="mw-default-size" typeof="mw:Image/Thumb">
16417 <a href="./File:Foobar.jpg">
16418 <img resource="./File:Foobar.jpg"
16419 src="//example.com/images/3/3a/Foobar.jpg"
16420 data-file-width="1941" data-file-height="220" data-file-type="bitmap"
16421 height="25" width="220"/>
16423 <figcaption></figcaption>
16426 [[File:Foobar.jpg|thumb]]
16430 Parsoid-specific image handling - whitespace caption
16432 [[File:Foobar.jpg|thumb| ]]
16434 <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>
16438 Parsoid-specific image handling - lang option
16441 [[File:Foobar.svg|lang=de|caption]]
16445 <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>
16449 ## Edge case bugs in Parsoid from T93580
16451 T93580: 1. Templated <ref> inside block images
16453 [[File:Foobar.jpg|thumb|Caption with templated ref: {{echo|<ref>foo</ref>}}]]
16457 <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>
16459 <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>
16463 T93580: 2. <ref> inside inline images
16465 [[File:Foobar.jpg|Undisplayed caption in inline image with ref: <ref>foo</ref>]]
16469 <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>
16471 <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>
16475 T93580: 3. Templated <ref> inside inline images
16477 [[File:Foobar.jpg|Undisplayed caption in inline image with ref: {{echo|<ref>{{echo|foo}}</ref>}}]]
16481 <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>
16483 <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>
16490 Subpage test/subpage
16498 subpage title=[[Subpage test]]
16502 <p><a href="/wiki/Subpage_test/subpage" title="Subpage test/subpage">/subpage</a>
16507 Subpage noslash link
16509 subpage title=[[Subpage test]]
16513 <p><a href="/wiki/Subpage_test/subpage" title="Subpage test/subpage">subpage</a>
16518 Subpage test/1/2/subpage
16524 Relative subpage noslash link
16526 parsoid=wt2wt,wt2html,html2html
16527 subpage title=[[Subpage test/1/2/3/4]]
16533 <p><a href="/wiki/Subpage_test/1/2/subpage" title="Subpage test/1/2/subpage">subpage</a>
16534 </p><p><a href="/wiki/Subpage_test/1/2/subpage" title="Subpage test/1/2/subpage">Subpage test/1/2/subpage</a>
16537 <p><a rel="mw:WikiLink" href="./Subpage_test/1/2/subpage" title="Subpage test/1/2/subpage">subpage</a></p>
16538 <p><a rel="mw:WikiLink" href="./Subpage_test/1/2/subpage" title="Subpage test/1/2/subpage">Subpage_test/1/2/subpage</a></p>
16542 Parsoid: dot-slash prefixed wikilinks
16552 </p><p>[[././baz/]]
16557 </p><p>[[././baz/]]
16562 Render invalid page names as plain text (T53090)
16574 [[foo[http://example.com]xyz]]
16576 [[{{echo|./../foo}}|bar]]
16577 [[{{echo|foo/.}}|bar]]
16578 [[{{echo|foo/..}}|bar]]
16579 [[{{echo|foo~~~~bar}}]]
16580 [[{{echo|foo>bar}}]]
16581 [[{{echo|foo././bar}}]]
16582 [[{{echo|foo{bar}}]]
16583 [[{{echo|foo}bar}}]]
16584 [[{{echo|foo[bar}}]]
16585 [[{{echo|foo]bar}}]]
16586 [[{{echo|foo<bar}}]]
16588 <p>[[./../foo|bar]]
16598 [[foo<a rel="nofollow" class="external autonumber" href="http://example.com">[1]</a>xyz]]
16599 </p><p>[[./../foo|bar]]
16612 <p>[[./../foo|bar]]
16622 [[foo<a rel="mw:ExtLink" class="external autonumber" href="http://example.com"></a>xyz]]</p>
16624 <p>[[<span typeof="mw:Transclusion" data-mw='{"parts":[{"template":{"target":{"wt":"echo","href":"./Template:Echo"},"params":{"1":{"wt":"./../foo"}},"i":0}}]}'>./../foo</span>|bar]]
16625 [[<span typeof="mw:Transclusion" data-mw='{"parts":[{"template":{"target":{"wt":"echo","href":"./Template:Echo"},"params":{"1":{"wt":"foo/."}},"i":0}}]}'>foo/.</span>|bar]]
16626 [[<span typeof="mw:Transclusion" data-mw='{"parts":[{"template":{"target":{"wt":"echo","href":"./Template:Echo"},"params":{"1":{"wt":"foo/.."}},"i":0}}]}'>foo/..</span>|bar]]
16627 [[<span typeof="mw:Transclusion" data-mw='{"parts":[{"template":{"target":{"wt":"echo","href":"./Template:Echo"},"params":{"1":{"wt":"foo~~~~bar"}},"i":0}}]}'>foo~~~~bar</span>]]
16628 [[<span typeof="mw:Transclusion" data-mw='{"parts":[{"template":{"target":{"wt":"echo","href":"./Template:Echo"},"params":{"1":{"wt":"foo>bar"}},"i":0}}]}'>foo>bar</span>]]
16629 [[<span typeof="mw:Transclusion" data-mw='{"parts":[{"template":{"target":{"wt":"echo","href":"./Template:Echo"},"params":{"1":{"wt":"foo././bar"}},"i":0}}]}'>foo././bar</span>]]
16630 [[<span typeof="mw:Transclusion" data-mw='{"parts":[{"template":{"target":{"wt":"echo","href":"./Template:Echo"},"params":{"1":{"wt":"foo{bar"}},"i":0}}]}'>foo{bar</span>]]
16631 [[<span typeof="mw:Transclusion" data-mw='{"parts":[{"template":{"target":{"wt":"echo","href":"./Template:Echo"},"params":{"1":{"wt":"foo}bar"}},"i":0}}]}'>foo}bar</span>]]
16632 [[<span typeof="mw:Transclusion" data-mw='{"parts":[{"template":{"target":{"wt":"echo","href":"./Template:Echo"},"params":{"1":{"wt":"foo[bar"}},"i":0}}]}'>foo[bar</span>]]
16633 [[<span typeof="mw:Transclusion" data-mw='{"parts":[{"template":{"target":{"wt":"echo","href":"./Template:Echo"},"params":{"1":{"wt":"foo]bar"}},"i":0}}]}'>foo]bar</span>]]
16634 [[<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>
16642 <p><a href="/index.php?title=/subpage&action=edit&redlink=1" class="new" title="/subpage (page does not exist)">/subpage</a>
16647 T2561: {{/Subpage}}
16649 subpage title=[[Page]]
16653 <p><a href="/index.php?title=Page/Subpage&action=edit&redlink=1" class="new" title="Page/Subpage (page does not exist)">Page/Subpage</a>
16661 Category:MediaWiki User's Guide
16669 [[:Category:MediaWiki User's Guide]]
16671 <p><a href="/wiki/Category:MediaWiki_User%27s_Guide" title="Category:MediaWiki User's Guide">Category:MediaWiki User's Guide</a>
16680 [[Category:MediaWiki User's Guide]]
16682 cat=MediaWiki_User's_Guide sort=
16684 <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"}}'/>
16688 PAGESINCATEGORY invalid title fatal (r33546 fix)
16690 {{PAGESINCATEGORY:<bogus>}}
16697 Category with different sort key
16701 [[Category:MediaWiki User's Guide|Foo]]
16703 cat=MediaWiki_User's_Guide sort=Foo
16705 <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"}}'/>
16709 Category with identical sort key
16713 [[Category:MediaWiki User's Guide|MediaWiki User's Guide]]
16715 cat=MediaWiki_User's_Guide sort=MediaWiki User's Guide
16717 <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"}}'/>
16721 Category with empty sort key
16726 [[Category:MediaWiki User's Guide|]]
16728 [[Category:MediaWiki User's Guide|MediaWiki User's Guide]]
16732 Category with empty sort key and parentheses
16737 [[Category:Foo (bar)|]]
16739 [[Category:Foo (bar)|Foo]]
16743 Category with link tail
16748 123[[Category:Foo]]456
16750 123[[Category:Foo]]456
16754 Category with template
16759 [[Category:{{echo|Foo}}]]
16761 [[Category:{{echo|Foo}}]]
16765 Category with template in sort key
16770 [[Category:Foo|{{echo|Bar}}]]
16772 [[Category:Foo|{{echo|Bar}}]]
16776 Category with template in sort key and title
16781 [[Category:{{echo|Foo}}|{{echo|Bar}}]]
16783 [[Category:{{echo|Foo}}|{{echo|Bar}}]]
16786 ## We used to, but no longer wt2wt this test since the default serializer
16787 ## will normalize all categories to serialize on their own line.
16788 ## This wikitext usage is going to be fairly uncommon in production and
16789 ## selser will take care of preserving formatting in those scenarios.
16791 Category / paragraph interactions
16795 Foo [[Category:Baz]] Bar
16797 Foo [[Category:Baz]]
16805 [[Category:Baz]] Bar
16818 {{echo|[[Category:Baz]]}}
16831 <p>Foo <link rel="mw:PageProp/Category" href="./Category:Baz"/> Bar</p>
16832 <p>Foo <link rel="mw:PageProp/Category" href="./Category:Baz"/> Bar</p>
16833 <p>Foo <link rel="mw:PageProp/Category" href="./Category:Baz"/> Bar</p>
16834 <p>Foo <link rel="mw:PageProp/Category" href="./Category:Baz"/> Bar</p>
16835 <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>
16836 <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}}]}'/>
16837 <link rel="mw:PageProp/Category" href="./Category:Baz"/>
16840 ## We used to, but no longer wt2wt this test since the default serializer
16841 ## will normalize all categories to serialize on their own line.
16842 ## This wikitext usage is going to be fairly uncommon in production and
16843 ## selser will take care of preserving formatting in those scenarios.
16845 ## The whitespace on the empty line is part of the test. Please do not delete
16847 1. Categories and newlines: All preceding newlines should be suppressed (courtesy T2087)
16853 [[Category:Foo]] and this should be part of same paragraph (not an indent-pre)
16855 {{echo|[[Category:Foo]] and so should this!}}
16857 <p>This and this should be part of same paragraph (not an indent-pre) and so should this!
16862 <link rel="mw:PageProp/Category" href="./Category:Foo"/> and this should be part of same paragraph (not an indent-pre)
16864 <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>
16867 ## Parsoid will not try to wt2wt this while preserving newlines because
16868 ## it suppresses excess newlines within list items -- and we don't want to
16869 ## introduce a special case just for categories, which is, in reality somewhat
16870 ## odd behavior -- categories are unlikely to be used in list items like this
16871 ## in top-level pages and are only likely to show up in template-generated
16872 ## list items where this RT-ing is a non-issue.
16874 ## The whitespace on the empty line is part of the test. Please do not delete
16876 2. Categories and newlines: All preceding newlines should be suppressed (courtesy T2087)
16882 [[Category:Foo]] and this should be part of the same list item
16885 {{echo|[[Category:Foo]] and this should be part of the same list item}}
16887 <ul><li>This and this should be part of the same list item</li>
16888 <li>So should this and this should be part of the same list item</li></ul>
16891 <li>This <link rel="mw:PageProp/Category" href="./Category:Foo"/> and this should be part of the same list item</li>
16892 <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>
16896 ## Newlines and categories that follow the last item of a list
16897 ## are treated differently because this (list followed by categories)
16898 ## is an extremely common pattern on wikis.
16900 3. Categories and newlines: newline suppression for last list item should RT properly
16921 <link rel="mw:PageProp/Category" href="./Category:Foo"/>
16923 <link rel="mw:PageProp/Category" href="./Category:Bar"/>
16924 <link rel="mw:PageProp/Category" href="./Category:Baz"/>
16926 <dl><dd>c</dd></dl>
16928 <link rel="mw:PageProp/Category" href="./Category:C"/>
16930 <dl><dt>d</dt></dl>
16932 <link rel="mw:PageProp/Category" href="./Category:D"/>
16936 4. Categories and newlines: newline suppression for last list item should RT properly
16944 <ul><li><ul><li><ul><li>b</li></ul></li></ul></li></ul></li></ul>
16946 <link rel="mw:PageProp/Category" href="./Category:Foo" data-parsoid='{"stx":"simple","a":{"href":"./Category:Foo"},"sa":{"href":"Category:Foo"}}'/>
16949 ## only wt2html for this to make sure the algo only applies to the rightmost path
16951 5. Categories and newlines: migrateTrailingCategories dom pass should only run on the rightmost path of nested lists
16964 <link rel="mw:PageProp/Category" href="./Category:Foo" data-parsoid='{"stx":"simple","a":{"href":"./Category:Foo"},"sa":{"href":"Category:Foo"}}'/></li></ul></li>
16966 <ul><li>d</li></ul></li></ul>
16967 <link rel="mw:PageProp/Category" href="./Category:Foo" data-parsoid='{"stx":"simple","a":{"href":"./Category:Foo"},"sa":{"href":"Category:Foo"}}'/>
16970 ## We used to, but no longer wt2wt this test since the default serializer
16971 ## will normalize all categories to serialize on their own line.
16972 ## This wikitext usage is going to be fairly uncommon in production and
16973 ## selser will take care of preserving formatting in those scenarios.
16975 6. Categories and newlines: migrateTrailingCategories dom pass should not migrate categories not preceded by newlines
16979 *a [[Category:Foo]]
16981 <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>
16984 # This test also demonstrates because of newline+category tunneling
16985 # through the list hander, template wrapping doesn't expand to the
16986 # containing list when the list item swallows the category.
16988 7. Categories and newlines: migrateTrailingCategories dom pass should leave template content alone
16993 <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
16994 </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>
16998 8. Categories and newlines: migrateTrailingCategories dom pass should not get tripped by intervening templates
17002 {{echo|[[Category:Foo]]
17006 <ul><li>a</li></ul>
17008 <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">
17009 </span><link rel="mw:PageProp/Category" href="./Category:Bar" about="#mwt1" data-parsoid='{"stx":"simple","a":{"href":"./Category:Bar"},"sa":{"href":"Category:Bar"}}'/>
17010 <link rel="mw:PageProp/Category" href="./Category:Baz" data-parsoid='{"stx":"simple","a":{"href":"./Category:Baz"},"sa":{"href":"Category:Baz"}}'/>
17014 Categories and newlines: migrateTrailingCategories dom pass should not get tripped by comments and whitespace
17018 [[Category:Bar]]<!--boo1--> <!--boo2-->
17019 [[Category:Baz]]<!--boo3--> <!--boo4-->
17021 <ul><li>a</li></ul>
17023 <link rel="mw:PageProp/Category" href="./Category:Bar"/><!--boo1--> <!--boo2-->
17024 <link rel="mw:PageProp/Category" href="./Category:Baz"/><!--boo3--> <!--boo4-->
17028 Categories and newlines: should behave properly with linkprefix (T87753)
17043 <link rel="mw:PageProp/Category" href="./تصنيف:Foo"/>
17044 <link rel="mw:PageProp/Category" href="./تصنيف:Bar"/>
17048 No regressions on internal links following category (T174639)
17050 parsoid=wt2html,html2html
17052 [[Category:Foo]]<div>a
17057 <a href="/wiki/Foo" title="Foo">Foo</a></div>
17060 <link rel="mw:PageProp/Category" href="./Category:Foo"/><div>a
17062 <a rel="mw:WikiLink" href="./Foo" title="Foo">Foo</a></div>
17065 # Note that Parsoid differs slightly from PHP due to T175421
17067 11. Special case where only newlines separate links (T175416)
17069 parsoid=wt2html,html2html
17073 [[Foo]][[es:Alimento]]
17078 <a href="/wiki/Foo" title="Foo">Foo</a>
17079 </p><p><a href="/wiki/Foo" title="Foo">Foo</a>
17082 <link rel="mw:PageProp/Category" href="./Category:Foo"/>
17084 <p><a rel="mw:WikiLink" href="./Foo" title="Foo">Foo</a></p><link rel="mw:PageProp/Language" href="http://es.wikipedia.org/wiki/Alimento"/>
17086 <p><a rel="mw:WikiLink" href="./Foo" title="Foo">Foo</a></p>
17090 Category links with multiple namespaces
17092 [[Category:Project:Foo]]
17094 <link rel="mw:PageProp/Category" href="./Category:Project:Foo" />
17098 Parsoid: Serialize link to category page with colon escape
17102 [[:Category:Foo|Bar]]
17104 <p><a href="/index.php?title=Category:Foo&action=edit&redlink=1" class="new" title="Category:Foo (page does not exist)">Category:Foo</a>
17105 <a href="/index.php?title=Category:Foo&action=edit&redlink=1" class="new" title="Category:Foo (page does not exist)">Bar</a>
17109 <a rel="mw:WikiLink" href="./Category:Foo" title="Category:Foo">Category:Foo</a>
17110 <a rel="mw:WikiLink" href="./Category:Foo" title="Category:Foo">Bar</a>
17114 # We used to, but no longer wt2wt this test since the default serializer
17115 # will normalize all categories to serialize on their own line.
17116 # This wikitext usage is going to be fairly uncommon in production and
17117 # selser will take care of preventing whitespace insertion if this
17118 # occurs in an article.
17120 # html2html disabled for the same reason (whitespace insertion between
17123 # html2wt disabled because it localizes the "Category" namespace.
17125 Link prefix/suffixes aren't applied to category links
17135 <p>x<link rel="mw:PageProp/Category" href="./Flokkur:Foo" data-parsoid=""/>y</p>
17139 Link prefix/suffixes aren't applied to language links
17149 <p>x<link rel="mw:PageProp/Language" href="http://es.wikipedia.org/wiki/Foo" data-parsoid=""/>y</p>
17153 Parsoid: Serialize link to file page with colon escape
17157 [[:File:Foo.png|Bar]]
17159 <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>
17160 <a href="/index.php?title=File:Foo.png&action=edit&redlink=1" class="new" title="File:Foo.png (page does not exist)">Bar</a>
17164 <a rel="mw:WikiLink" href="./File:Foo.png" title="File:Foo.png">File:Foo.png</a>
17165 <a rel="mw:WikiLink" href="./File:Foo.png" title="File:Foo.png">Bar</a>
17170 Parsoid: Serialize a genuine category link without colon escape
17173 [[Category:Foo|Bar]]
17176 <link rel="mw:PageProp/Category" href="./Category:Foo">
17177 <link rel="mw:PageProp/Category" href="./Category:Foo#Bar">
17181 Normalize hrefs properly before testing for invalid link targets (T72894)
17185 <link rel="mw:PageProp/Category" href="./Category:Toxine_bactérienne"/>
17187 [[Category:Toxine bactérienne]]
17191 Parsoid: Defaultsort
17193 {{DEFAULTSORT:Foo}}
17195 <meta property="mw:PageProp/categorydefaultsort" content="Foo"/>
17198 # NOTE: mw:ExpandedAttrs is not the best typeof here. mw:Transclusion is better.
17199 # But, this is a limitation of our representation and is documented in
17200 # TemplateHandler.js in processSpecialMagicWord
17202 Parsoid: Defaultsort (template-generated)
17204 {{{{echo|DEFAULTSORT}}:Foo}}
17206 <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"}]]}'/>
17210 ### Inter-language links
17213 Interlanguage links
17221 es:Alimento fr:Nourriture zh:食品
17223 <link rel="mw:PageProp/Language" href="http://es.wikipedia.org/wiki/Alimento"/>
17224 <link rel="mw:PageProp/Language" href="http://fr.wikipedia.org/wiki/Nourriture"/>
17225 <link rel="mw:PageProp/Language" href="http://zh.wikipedia.org/wiki/食品"/>
17229 Duplicate interlanguage links (T26502)
17240 <link rel="mw:PageProp/Language" href="http://es.wikipedia.org/wiki/1"/>
17241 <link rel="mw:PageProp/Language" href="http://es.wikipedia.org/wiki/2"/>
17242 <link rel="mw:PageProp/Language" href="http://fr.wikipedia.org/wiki/1"/>
17243 <link rel="mw:PageProp/Language" href="http://fr.wikipedia.org/wiki/2"/>
17250 Basic section headings
17257 ===Smaller headline===
17260 <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>
17263 <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>
17266 <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>
17272 Section headings with TOC
17275 ===Subheadline 1===
17276 =====Skipping a level=====
17277 ======Skipping a level======
17281 ===Another headline===
17283 <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>
17285 <li class="toclevel-1 tocsection-1"><a href="#Headline_1"><span class="tocnumber">1</span> <span class="toctext">Headline 1</span></a>
17287 <li class="toclevel-2 tocsection-2"><a href="#Subheadline_1"><span class="tocnumber">1.1</span> <span class="toctext">Subheadline 1</span></a>
17289 <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>
17291 <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>
17298 <li class="toclevel-1 tocsection-5"><a href="#Headline_2"><span class="tocnumber">2</span> <span class="toctext">Headline 2</span></a>
17300 <li class="toclevel-2 tocsection-6"><a href="#Another_headline"><span class="tocnumber">2.1</span> <span class="toctext">Another headline</span></a></li>
17306 <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>
17307 <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>
17308 <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>
17309 <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>
17310 <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>
17313 <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>
17318 TOC anchors don't collide
17326 <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>
17328 <li class="toclevel-1 tocsection-1"><a href="#Headline_2"><span class="tocnumber">1</span> <span class="toctext">Headline 2</span></a></li>
17329 <li class="toclevel-1 tocsection-2"><a href="#Headline"><span class="tocnumber">2</span> <span class="toctext">Headline</span></a></li>
17330 <li class="toclevel-1 tocsection-3"><a href="#Headline_2_2"><span class="tocnumber">3</span> <span class="toctext">Headline 2</span></a></li>
17331 <li class="toclevel-1 tocsection-4"><a href="#Headline_3"><span class="tocnumber">4</span> <span class="toctext">Headline</span></a></li>
17335 <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>
17336 <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>
17337 <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>
17338 <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>
17342 # perl -e 'print "="x$_," Level $_ heading","="x$_,"\n" for 1..10'
17343 # Parsoid html2wt direction adds <nowiki> for level 7 and up.
17345 Handling of sections up to level 6 and beyond
17350 ==Level 2 Heading==
17351 ===Level 3 Heading===
17352 ====Level 4 Heading====
17353 =====Level 5 Heading=====
17354 ======Level 6 Heading======
17355 =======Level 7 Heading=======
17356 ========Level 8 Heading========
17357 =========Level 9 Heading=========
17358 ==========Level 10 Heading==========
17360 <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>
17362 <li class="toclevel-1 tocsection-1"><a href="#Level_1_Heading"><span class="tocnumber">1</span> <span class="toctext">Level 1 Heading</span></a>
17364 <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>
17366 <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>
17368 <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>
17370 <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>
17372 <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>
17373 <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>
17374 <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>
17375 <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>
17376 <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>
17390 <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>
17391 <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>
17392 <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>
17393 <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>
17394 <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>
17395 <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>
17396 <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>
17397 <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>
17398 <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>
17399 <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>
17402 <h1 id="Level_1_Heading" data-parsoid='{}'>Level 1 Heading</h1>
17403 <h2 id="Level_2_Heading" data-parsoid='{}'>Level 2 Heading</h2>
17404 <h3 id="Level_3_Heading" data-parsoid='{}'>Level 3 Heading</h3>
17405 <h4 id="Level_4_Heading" data-parsoid='{}'>Level 4 Heading</h4>
17406 <h5 id="Level_5_Heading" data-parsoid='{}'>Level 5 Heading</h5>
17407 <h6 id="Level_6_Heading" data-parsoid='{}'>Level 6 Heading</h6>
17408 <h6 id="=Level_7_Heading=" data-parsoid='{}'><span id=".3DLevel_7_Heading.3D" typeof="mw:FallbackId"></span>=Level 7 Heading=</h6>
17409 <h6 id="==Level_8_Heading==" data-parsoid='{}'><span id=".3D.3DLevel_8_Heading.3D.3D" typeof="mw:FallbackId"></span>==Level 8 Heading==</h6>
17410 <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>
17411 <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>
17415 TOC regression (T11764)
17419 ====title 1.1.1====
17424 <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>
17426 <li class="toclevel-1 tocsection-1"><a href="#title_1"><span class="tocnumber">1</span> <span class="toctext">title 1</span></a>
17428 <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>
17430 <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>
17433 <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>
17436 <li class="toclevel-1 tocsection-5"><a href="#title_2"><span class="tocnumber">2</span> <span class="toctext">title 2</span></a>
17438 <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>
17444 <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>
17445 <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>
17446 <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>
17447 <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>
17448 <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>
17449 <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>
17454 TOC for heading containing <span id="..."></span> (T96153)
17457 ==<span id="old-anchor"></span>New title==
17459 <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>
17461 <li class="toclevel-1 tocsection-1"><a href="#New_title"><span class="tocnumber">1</span> <span class="toctext">New title</span></a></li>
17465 <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>
17470 TOC with wgMaxTocLevel=3 (T8204)
17476 ====title 1.1.1====
17481 <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>
17483 <li class="toclevel-1 tocsection-1"><a href="#title_1"><span class="tocnumber">1</span> <span class="toctext">title 1</span></a>
17485 <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>
17486 <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>
17489 <li class="toclevel-1 tocsection-5"><a href="#title_2"><span class="tocnumber">2</span> <span class="toctext">title 2</span></a>
17491 <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>
17497 <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>
17498 <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>
17499 <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>
17500 <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>
17501 <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>
17502 <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>
17507 TOC with wgMaxTocLevel=3 and two level four headings (T8204)
17513 ====Section 1.1.1====
17514 ====Section 1.1.1.1====
17517 <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>
17519 <li class="toclevel-1 tocsection-1"><a href="#Section_1"><span class="tocnumber">1</span> <span class="toctext">Section 1</span></a>
17521 <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>
17524 <li class="toclevel-1 tocsection-5"><a href="#Section_2"><span class="tocnumber">2</span> <span class="toctext">Section 2</span></a></li>
17528 <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>
17529 <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>
17530 <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>
17531 <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>
17532 <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>
17538 Resolving duplicate section names
17543 <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>
17544 <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>
17549 Resolving duplicate section names with differing case (T12721)
17554 <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>
17555 <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 Template with sections, __NOTOC__
17574 <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>
17575 <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>
17576 <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>
17577 <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>
17582 __NOEDITSECTION__ keyword
17588 <h2><span class="mw-headline" id="Section_1">Section 1</span></h2>
17589 <h2><span class="mw-headline" id="Section_2">Section 2</span></h2>
17594 Link inside a section heading
17596 ==Section with a [[Main Page|link]] in it==
17598 <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>
17603 TOC regression (T14077)
17610 <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>
17612 <li class="toclevel-1 tocsection-1"><a href="#title_1"><span class="tocnumber">1</span> <span class="toctext">title 1</span></a>
17614 <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>
17617 <li class="toclevel-1 tocsection-3"><a href="#title_2"><span class="tocnumber">2</span> <span class="toctext">title 2</span></a></li>
17621 <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>
17622 <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>
17623 <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>
17628 T3219 URL next to image (good)
17630 http://example.com [[File:Foobar.jpg]]
17632 <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>
17635 <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>
17638 # Parsoid doesn't wt2wt this cleanly because it adds <nowiki>s.
17640 Short headings with trailing space should match behavior of Parser::doHeadings (T21910)
17642 parsoid=wt2html,html2html
17645 The line above must have a trailing space!
17648 But just in case it doesn't...
17650 <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>
17651 <p>The line above must have a trailing space!
17653 <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>
17654 <p>But just in case it doesn't...
17657 <h1 id="="><span id=".3D" typeof="mw:FallbackId"></span>=</h1>
17658 <p>The line above must have a trailing space!</p>
17659 <h1 id="=_2"><span id=".3D_2" typeof="mw:FallbackId"></span>=</h1> <!--
17661 <p>But just in case it doesn't...</p>
17665 Header with special characters (T27462)
17667 The tooltips shall not show entities to the user (ie. be double escaped)
17684 <p>The tooltips shall not show entities to the user (ie. be double escaped)
17686 <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>
17688 <li class="toclevel-1 tocsection-1"><a href="#text_.3E_text"><span class="tocnumber">1</span> <span class="toctext">text > text</span></a></li>
17689 <li class="toclevel-1 tocsection-2"><a href="#text_.3C_text"><span class="tocnumber">2</span> <span class="toctext">text < text</span></a></li>
17690 <li class="toclevel-1 tocsection-3"><a href="#text_.26_text"><span class="tocnumber">3</span> <span class="toctext">text & text</span></a></li>
17691 <li class="toclevel-1 tocsection-4"><a href="#text_.27_text"><span class="tocnumber">4</span> <span class="toctext">text ' text</span></a></li>
17692 <li class="toclevel-1 tocsection-5"><a href="#text_.22_text"><span class="tocnumber">5</span> <span class="toctext">text " text</span></a></li>
17696 <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>
17699 <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>
17702 <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>
17705 <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>
17708 <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>
17712 <p>The tooltips shall not show entities to the user (ie. be double escaped)</p>
17714 <h2 id="text_>_text"><span id="text_.3E_text" typeof="mw:FallbackId"></span>text > text</h2>
17717 <h2 id="text_<_text"><span id="text_.3C_text" typeof="mw:FallbackId"></span>text < text</h2>
17720 <h2 id="text_&_text"><span id="text_.26_text" typeof="mw:FallbackId"></span>text & text</h2>
17723 <h2 id="text_'_text"><span id="text_.27_text" typeof="mw:FallbackId"></span>text ' text</h2>
17726 <h2 id='text_"_text'><span id="text_.22_text" typeof="mw:FallbackId"></span>text " text</h2>
17731 Header with space, plus and underscore as entity
17733 Id should not contain + for spaces
17735 ==Space between Text==
17738 ==Space-Entity between Text==
17741 ==Plus+between+Text==
17744 ==Plus-Entity+between+Text==
17747 ==Underscore_between_Text==
17750 ==Underscore-Entity_between_Text==
17753 [[#Space between Text]]
17754 [[#Space-Entity between Text]]
17755 [[#Plus+between+Text]]
17756 [[#Plus-Entity+between+Text]]
17757 [[#Underscore_between_Text]]
17758 [[#Underscore-Entity_between_Text]]
17760 <p>Id should not contain + for spaces
17762 <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>
17764 <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>
17765 <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>
17766 <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>
17767 <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>
17768 <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>
17769 <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>
17773 <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>
17776 <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>
17779 <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>
17782 <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>
17785 <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>
17788 <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>
17790 </p><p><a href="#Space_between_Text">#Space between Text</a>
17791 <a href="#Space-Entity_between_Text">#Space-Entity between Text</a>
17792 <a href="#Plus.2Bbetween.2BText">#Plus+between+Text</a>
17793 <a href="#Plus-Entity.2Bbetween.2BText">#Plus-Entity+between+Text</a>
17794 <a href="#Underscore_between_Text">#Underscore_between_Text</a>
17795 <a href="#Underscore-Entity_between_Text">#Underscore-Entity_between_Text</a>
17798 <p>Id should not contain + for spaces</p>
17800 <h2 id="Space_between_Text">Space between Text</h2>
17803 <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>
17806 <h2 id="Plus+between+Text"><span id="Plus.2Bbetween.2BText" typeof="mw:FallbackId"></span>Plus+between+Text</h2>
17809 <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>
17812 <h2 id="Underscore_between_Text">Underscore_between_Text</h2>
17815 <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>
17818 <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>
17819 <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>
17820 <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>
17821 <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>
17822 <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>
17823 <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>
17826 # Parsoid html2wt disabled because it adds padding spaces around =
17828 Headers with excess '=' characters
17829 (Are similar tests necessary beyond the 1st level?)
17831 parsoid=wt2html,wt2wt,html2html
17835 =''italic'' heading==
17836 ==''italic'' heading=
17838 <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>
17840 <li class="toclevel-1 tocsection-1"><a href="#foo.3D"><span class="tocnumber">1</span> <span class="toctext">foo=</span></a></li>
17841 <li class="toclevel-1 tocsection-2"><a href="#.3Dfoo"><span class="tocnumber">2</span> <span class="toctext">=foo</span></a></li>
17842 <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>
17843 <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>
17847 <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>
17848 <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>
17849 <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>
17850 <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>
17853 <h1 id="foo="><span id="foo.3D" typeof="mw:FallbackId"></span>foo=</h1>
17854 <h1 id="=foo"><span id=".3Dfoo" typeof="mw:FallbackId"></span>=foo</h1>
17855 <h1 id="italic_heading="><span id="italic_heading.3D" typeof="mw:FallbackId"></span><i>italic</i> heading=</h1>
17856 <h1 id="=italic_heading"><span id=".3Ditalic_heading" typeof="mw:FallbackId"></span>=<i>italic</i> heading</h1>
17860 HTML headers vs TOC (T25393)
17861 (__NOEDITSECTION__ for clearer output, doesn't matter here)
17873 <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>
17875 <li class="toclevel-1"><a href="#Header_1"><span class="tocnumber">1</span> <span class="toctext">Header 1</span></a>
17877 <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>
17878 <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>
17881 <li class="toclevel-1"><a href="#Header_2"><span class="tocnumber">2</span> <span class="toctext">Header 2</span></a>
17883 <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>
17884 <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>
17890 <h1><span class="mw-headline" id="Header_1">Header 1</span></h1>
17891 <h2><span class="mw-headline" id="Header_1.1">Header 1.1</span></h2>
17892 <h2><span class="mw-headline" id="Header_1.2">Header 1.2</span></h2>
17893 <h1><span class="mw-headline" id="Header_2">Header 2
17895 <h2><span class="mw-headline" id="Header_2.1">Header 2.1</span></h2>
17896 <h2><span class="mw-headline" id="Header_2.2">Header 2.2</span></h2>
17899 <h1 id="Header_1" data-parsoid='{"stx":"html"}'>Header 1</h1>
17900 <h2 id="Header_1.1" data-parsoid='{}'>Header 1.1</h2>
17901 <h2 id="Header_1.2" data-parsoid='{}'>Header 1.2</h2>
17903 <h1 id="Header_2" data-parsoid='{"stx":"html"}'>Header 2
17905 <h2 id="Header_2.1" data-parsoid='{}'>Header 2.1</h2>
17906 <h2 id="Header_2.2" data-parsoid='{}'>Header 2.2</h2>
17907 <meta property="mw:PageProp/noeditsection"/>
17911 Single-line or multiline-comments can follow headings
17913 parsoid=wt2html,wt2wt
17921 <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>
17922 <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>
17923 <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>
17926 <h2 id="foo">foo</h2><!---->
17927 <h2 id="bar">bar</h2><!--c1-->
17928 <h2 id="baz">baz</h2><!--
17934 T3219 URL next to image (broken)
17936 http://example.com[[File:Foobar.jpg]]
17938 <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>
17941 <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>
17945 T3186 news: in the middle of text
17947 http://en.wikinews.org/wiki/Wikinews:Workplace
17949 <p><a rel="nofollow" class="external free" href="http://en.wikinews.org/wiki/Wikinews:Workplace">http://en.wikinews.org/wiki/Wikinews:Workplace</a>
17955 Namespaced link must have a title
17964 Namespaced link must have a title (bad fragment version)
17966 [[Project:#fragment]]
17968 <p>[[Project:#fragment]]
17974 ### HTML tags and HTML attributes
17978 div with no attributes
17980 <div>HTML rocks</div>
17982 <div>HTML rocks</div>
17987 div with double-quoted attribute
17989 <div id="rock">HTML rocks</div>
17991 <div id="rock">HTML rocks</div>
17996 div with single-quoted attribute
17998 <div id='rock'>HTML rocks</div>
18000 <div id="rock">HTML rocks</div>
18005 div with unquoted attribute
18007 <div id=rock>HTML rocks</div>
18009 <div id="rock">HTML rocks</div>
18014 div with illegal double attributes
18016 <div id="a" id="b">HTML rocks</div>
18018 <div id="b">HTML rocks</div>
18023 div with empty attribute value, space before equals
18025 parsoid=wt2html,html2html
18027 <div class =>HTML rocks</div>
18029 <div class="">HTML rocks</div>
18032 <div class="" data-parsoid='{"stx":"html"}'>HTML rocks</div>
18036 div with multiple empty attribute values
18038 wgFragmentMode=[ 'html5', 'legacy' ]
18040 parsoid=wt2html,html2html
18042 <div id= title=>HTML rocks</div>
18044 <div id="title=">HTML rocks</div>
18047 <div id="title=" data-parsoid='{"stx":"html"}'>HTML rocks</div>
18050 # FIXME Parsoid doesn't actually match PHP here.
18051 # Probably we should use the synthetic <foo /> or <indicator>
18052 # extensions for this test, which are enabled when running parser tests.
18054 Extension tag in attribute value
18056 <span title="<translate>123</translate>">ok</span>
18057 !! html/php+disabled
18058 <p><span title="<translate>123</translate>">ok</span>
18061 <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>
18065 table with multiple empty attribute values
18067 parsoid=wt2html,html2html
18073 <table title="id=">
18079 <table title="id=">
18080 <tbody><tr><td>hi</td></tr>
18085 div with braces in attribute value
18087 <div title="{}">Foo</div>
18089 <div title="{}">Foo</div>
18092 <div title="{}">Foo</div>
18096 div with empty attribute value, no space before equals
18098 parsoid=wt2html,html2html
18100 <div class=>HTML rocks</div>
18102 <div class="">HTML rocks</div>
18105 <div class="">HTML rocks</div>
18109 HTML multiple attributes correction
18111 <p class="error" class="awesome">Awesome!</p>
18113 <p class="awesome">Awesome!</p>
18118 Table multiple attributes correction
18121 !+ class="error" class="awesome"|status
18126 <th class="awesome">status
18134 <DIV ID="x">HTML ROCKS</DIV>
18136 <div id="x">HTML ROCKS</div>
18141 Non-ASCII pseudo-tags are rendered as text
18150 Pseudo-tag with URL 'name' renders as url link
18152 <http://example.com/>
18154 <p><<a rel="nofollow" class="external free" href="http://example.com/">http://example.com/</a>>
18159 text with amp in the middle of nowhere
18163 <p>Remember AT&T?
18168 text with character entity: eacute
18170 I always thought é was a cute letter.
18172 <p>I always thought é was a cute letter.
18177 text with entity-escaped character entity-like string: eacute
18179 I always thought &eacute; was a cute letter.
18181 <p>I always thought &eacute; was a cute letter.
18186 text with undefined character entity: xacute
18188 I always thought &xacute; was a cute letter.
18190 <p>I always thought &xacute; was a cute letter.
18197 <data value="5">five</data>
18198 <time datetime="2000-01-01T00:00Z">The new millenium started</time>
18199 <mark>This highlighted text</mark>
18201 <p><data value="5">five</data>
18202 <time datetime="2000-01-01T00:00Z">The new millenium started</time>
18203 <mark>This highlighted text</mark>
18208 HTML tag with leading space is parsed as text
18212 <p>< div>foo< /div>
18216 ## Don't expect Parsoid and PHP to match, since PHP isn't exactly following
18217 ## the HTML5 parsing spec.
18219 Element with broken attribute syntax
18223 <div style=" style="123">hi</div>
18226 <div style="123">hi</div>
18230 <div style=" style=" data-parsoid='{"stx":"html","a":{"123\"":null},"sa":{"123\"":""}}'>hi</div>
18231 <div data-parsoid='{"stx":"html","a":{"=":null},"sa":{"=":""}}'>ho</div>
18235 ### Nesting tests (see T43545, T52604, T53081)
18238 # This test case is fixed in Parsoid by domino 1.0.12. (T52604)
18239 # Note that html2wt is considerably more difficult if we use <b> in
18240 # the test case, instead of <small>
18242 Ensure that HTML adoption agency algorithm is properly implemented.
18244 <small>X<small>Y</small>Z</small>
18246 <p><small>X<small>Y</small>Z</small>
18250 # This was T43545 in the PHP parser.
18254 <kbd>X<kbd>Y</kbd>Z</kbd>
18256 <p><kbd>X<kbd>Y</kbd>Z</kbd>
18260 # The following cases were T53081 in the PHP parser.
18261 # Note that there are some other nestable tags (b, i, etc) which are
18262 # not covered; see T53081 for discussion.
18267 <em>X<em>Y</em>Z</em>
18269 <p><em>X<em>Y</em>Z</em>
18274 Nesting of <strong>
18276 <strong>X<strong>Y</strong>Z</strong>
18278 <p><strong>X<strong>Y</strong>Z</strong>
18287 <p><q>X<q>Y</q>Z</q>
18294 <ruby>X<ruby>Y</ruby>Z</ruby>
18296 <p><ruby>X<ruby>Y</ruby>Z</ruby>
18303 <bdo>X<bdo>Y</bdo>Z</bdo>
18305 <p><bdo>X<bdo>Y</bdo>Z</bdo>
18317 [[Media:Foobar.jpg]]
18318 [[Media:Video.ogv]]
18319 [[:Media:Video.ogv]]
18321 <p><a href="http://example.com/images/3/3a/Foobar.jpg" class="internal" title="Foobar.jpg">Media:Foobar.jpg</a>
18322 <a href="http://example.com/images/0/00/Video.ogv" class="internal" title="Video.ogv">Media:Video.ogv</a>
18323 <a href="http://example.com/images/0/00/Video.ogv" class="internal" title="Video.ogv">Media:Video.ogv</a>
18326 <p><a rel="mw:MediaLink" href="//example.com/images/3/3a/Foobar.jpg" resource="./Media:Foobar.jpg" title="Foobar.jpg">Media:Foobar.jpg</a>
18327 <a rel="mw:MediaLink" href="//example.com/images/0/00/Video.ogv" resource="./Media:Video.ogv" title="Video.ogv">Media:Video.ogv</a>
18328 <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>
18332 Media link with text
18334 [[Media:Foobar.jpg|A neat file to look at]]
18336 <p><a href="http://example.com/images/3/3a/Foobar.jpg" class="internal" title="Foobar.jpg">A neat file to look at</a>
18339 <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>
18343 Localized media link
18347 [[Miðill:Foobar.jpg]]
18349 [[Miðill:Foobar.jpg|Icelandic]]
18351 <p><a href="http://example.com/images/3/3a/Foobar.jpg" class="internal" title="Foobar.jpg">Miðill:Foobar.jpg</a>
18352 </p><p><a href="http://example.com/images/3/3a/Foobar.jpg" class="internal" title="Foobar.jpg">Icelandic</a>
18355 <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>
18356 <p><a rel="mw:MediaLink" href="//example.com/images/3/3a/Foobar.jpg" resource="./Miðill:Foobar.jpg" title="Foobar.jpg">Icelandic</a></p>
18359 # FIXME: this is still bad HTML tag nesting
18360 # FIXME: doBlockLevels won't wrap this in a paragraph because it contains a div
18361 # Parsoid & Remex fix the p-wrapping since they operate on the DOM.
18363 Media link with nasty text
18365 parsoid=wt2html,html2html
18367 [[Media:Foobar.jpg|Safe Link<div style=display:none>" onmouseover="alert(document.cookie)" onfoo="</div>]]
18369 <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>
18372 <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>
18374 <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>
18378 Media link from missing resource (parsoid-only)
18382 <a rel="mw:MediaLink" href="http://example.com/images/3/3a/Foobar.jpg">Bat!</a>
18384 [[Media:Foobar.jpg|Bat!]]
18388 Media link from missing resource, localized (parsoid-only)
18393 <a rel="mw:MediaLink" href="http://example.com/images/3/3a/Foobar.jpg">Bat!</a>
18395 [[Miðill:Foobar.jpg|Bat!]]
18398 # This is a sanity test to ensure we don't crash or choke when given
18399 # old cached 1.7.0 HTML for media links; we don't require that the
18400 # result be "valid" because wt2wt was completely broken in 1.7.0
18402 Media link from old 1.7.0 DOM spec (crash test, parsoid-only) T198511
18406 <p>This is what Parsoid would emit (and we still handle this HTML fine):</p>
18407 <p><a rel="mw:MediaLink" href="//example.com/images/3/3a/Foobar.jpg" title="Foobar.jpg">A neat file to look at</a></p>
18408 <p>But VisualEditor would mangle the rel attribute, and give us back this:</p>
18409 <p><a rel="mw:ExtLink" href="//example.com/images/3/3a/Foobar.jpg" title="Foobar.jpg">A neat file to look at</a></p>
18410 <p>But at least we don't crash when trying to handle the mangled HTML!</p>
18412 This is what Parsoid would emit (and we still handle this HTML fine):
18414 [[Media:Foobar.jpg|A neat file to look at]]
18416 But VisualEditor would mangle the rel attribute, and give us back this:
18418 [//example.com/images/3/3a/Foobar.jpg A neat file to look at]
18420 But at least we don't crash when trying to handle the mangled HTML!
18424 Media link to nonexistent file (T3702)
18426 [[Media:No such.jpg]]
18427 [[Media:No_such file.jpg]]
18429 <p><a href="/index.php?title=Special:Upload&wpDestFile=No_such.jpg" class="new" title="No such.jpg">Media:No such.jpg</a>
18430 <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>
18433 <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>
18434 <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>
18438 Image link to nonexistent file (T3850 - good)
18440 [[File:No_such.jpg]]
18442 <p><a href="/index.php?title=Special:Upload&wpDestFile=No_such.jpg" class="new" title="File:No such.jpg">File:No such.jpg</a>
18445 <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>
18449 :Image link to nonexistent file (T3850 - bad)
18451 [[:Image:No such.jpg]]
18453 <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>
18456 <p><a rel="mw:WikiLink" href="./File:No_such.jpg" title="File:No such.jpg">Image:No such.jpg</a></p>
18460 Character reference normalization in link text (T3938)
18462 [[Main Page|this&that]]
18464 <p><a href="/wiki/Main_Page" title="Main Page">this&that</a>
18471 Test for unicode normalization
18473 The page's name is U+05d0 U+05b7, with non-canonical form U+FB2E
18477 (T21451) Links should refer to the normalized form.
18485 <p><a href="/wiki/%D7%90%D6%B7" title="אַ">אַ</a>
18486 <a href="/wiki/%D7%90%D6%B7" title="אַ">אַ</a>
18487 <a href="/wiki/%D7%90%D6%B7" title="אַ">אַ</a>
18488 <a href="/wiki/%D7%90%D6%B7" title="אַ">אַ</a>
18489 <a href="/wiki/%D7%90%D6%B7" title="אַ">אַ</a>
18494 Empty attribute crash test (T4067)
18496 <font color="">foo</font>
18498 <p><font color="">foo</font>
18503 Empty attribute crash test single-quotes (T4067)
18505 <font color=''>foo</font>
18507 <p><font color="">foo</font>
18512 Attribute test: equals, then nothing
18514 parsoid=wt2html,html2html
18516 <font color=>foo</font>
18518 <p><font color="">foo</font>
18521 <p><font color="" data-parsoid='{"stx":"html"}'>foo</font></p>
18525 Attribute test: unquoted value
18527 parsoid=wt2html,html2html
18529 <font color=x>foo</font>
18531 <p><font color="x">foo</font>
18534 <p><font color="x" data-parsoid='{"stx":"html"}'>foo</font></p>
18538 Attribute test: unquoted but illegal value (hash)
18540 <font color=#x>foo</font>
18542 <p><font color="#x">foo</font>
18546 # Parsoid does not serialize to empty attribute syntax,
18547 # so wt2wt and html2wt cases are skipped
18549 Attribute test: no value (T54330)
18551 parsoid=wt2html,html2html
18553 <font color>foo</font>
18555 <p><font color="">foo</font>
18558 <p><font color="">foo</font></p>
18562 T4095: link with three closing brackets
18566 <p><a href="/wiki/Main_Page" title="Main Page">Main Page</a>]
18569 <p><a rel="mw:WikiLink" href="./Main_Page" title="Main Page">Main Page</a>]</p>
18573 T4095: link with pipe and three closing brackets
18575 [[Main Page|link]]]
18577 <p><a href="/wiki/Main_Page" title="Main Page">link</a>]
18580 <p><a rel="mw:WikiLink" href="./Main_Page" title="Main Page">link</a>]</p>
18584 T4095: link with pipe and three closing brackets, version 2
18586 [[Main Page|[http://example.com/]]]
18588 <p><a href="/wiki/Main_Page" title="Main Page">[http://example.com/]</a>
18591 <p><a rel="mw:WikiLink" href="./Main_Page" title="Main Page">[http://example.com/]</a></p>
18600 Template:Dangerous attribute
18602 " onmouseover="alert(document.cookie)
18606 Template:Dangerous style attribute
18608 border-size: expression(alert(document.cookie))
18614 <div style="float: right; {{{1}}}">Magic div</div>
18618 T4304: HTML attribute safety (safe template; regression T4309)
18620 <div title="{{test}}"></div>
18622 <div title="This is a test template"></div>
18625 <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>
18628 # Parsoid has enough context to handle this case
18630 T4304: HTML attribute safety (dangerous template; 2309)
18632 <div title="{{dangerous attribute}}"></div>
18634 <div title=""></div>
18637 <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>
18641 T4304: HTML attribute safety (dangerous style template; 2309)
18643 <div style="{{dangerous style attribute}}"></div>
18645 <div style="/* insecure input */"></div>
18648 <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>
18652 T4304: HTML attribute safety (safe parameter; 2309)
18654 {{div style|width: 200px}}
18656 <div style="float: right; width: 200px">Magic div</div>
18659 <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>
18663 T4304: HTML attribute safety (unsafe parameter; 2309)
18665 {{div style|width: expression(alert(document.cookie))}}
18667 <div style="/* insecure input */">Magic div</div>
18670 <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>
18673 ## Parsoid output here differs; needs investigation.
18675 T4304: HTML attribute safety (unsafe breakout parameter; 2309)
18677 {{div style|"><script>alert(document.cookie)</script>}}
18679 <div style="float: right;"><script>alert(document.cookie)</script>">Magic div</div>
18683 ## Parsoid output here differs; needs investigation.
18685 T4304: HTML attribute safety (unsafe breakout parameter 2; 2309)
18687 {{div style|" ><script>alert(document.cookie)</script>}}
18689 <div style="float: right;"><script>alert(document.cookie)</script>">Magic div</div>
18694 T4304: HTML attribute safety (link)
18696 <div title="[[Main Page]]"></div>
18698 <div title="[[Main Page]]"></div>
18701 <div title="[[Main Page]]"></div>
18705 T4304: HTML attribute safety (italics)
18707 <div title="''foobar''"></div>
18709 <div title="''foobar''"></div>
18714 T4304: HTML attribute safety (bold)
18716 <div title="'''foobar'''"></div>
18718 <div title="'''foobar'''"></div>
18723 T4304: HTML attribute safety (ISBN)
18725 <div title="ISBN 1234567890"></div>
18727 <div title="ISBN 1234567890"></div>
18732 T4304: HTML attribute safety (RFC)
18734 <div title="RFC 1234"></div>
18736 <div title="RFC 1234"></div>
18741 T4304: HTML attribute safety (PMID)
18743 <div title="PMID 1234567890"></div>
18745 <div title="PMID 1234567890"></div>
18750 T4304: HTML attribute safety (web link)
18752 <div title="http://example.com/"></div>
18754 <div title="http://example.com/"></div>
18759 T4304: HTML attribute safety (named web link)
18761 <div title="[http://example.com/ link]"></div>
18763 <div title="[http://example.com/ link]"></div>
18766 <div title="[http://example.com/ link]"></div>
18770 T5244: HTML attribute safety (extension; safe)
18772 <div style="<nowiki>background:blue</nowiki>"></div>
18774 <div style="background:blue"></div>
18777 <div style="background:blue" data-parsoid='{"stx":"html","a":{"style":"background:blue"},"sa":{"style":"<nowiki>background:blue</nowiki>"}}'></div>
18781 T5244: HTML attribute safety (extension; unsafe)
18783 <div style="<nowiki>border-left:expression(alert(document.cookie))</nowiki>"></div>
18785 <div style="/* insecure input */"></div>
18788 <div style="/* insecure input */" data-parsoid='{"stx":"html","a":{"style":"/* insecure input */"},"sa":{"style":"<nowiki>border-left:expression(alert(document.cookie))</nowiki>"}}'></div>
18791 # More MSIE fun discovered by Tom Gilder
18794 MSIE CSS safety test: spurious slash
18796 <div style="background-image:u\rl(javascript:alert('boo'))">evil</div>
18798 <div style="/* insecure input */">evil</div>
18801 <div style="/* insecure input */" data-parsoid='{"stx":"html","a":{"style":"/* insecure input */"},"sa":{"style":"background-image:u\\rl(javascript:alert('boo'))"}}'>evil</div>
18805 MSIE CSS safety test: hex code
18807 <div style="background-image:u\72l(javascript:alert('boo'))">evil</div>
18809 <div style="/* insecure input */">evil</div>
18812 <div style="/* insecure input */" data-parsoid='{"stx":"html","a":{"style":"/* insecure input */"},"sa":{"style":"background-image:u\\72l(javascript:alert('boo'))"}}'>evil</div>
18816 MSIE CSS safety test: comment in url
18818 <div style="background-image:u/**/rl(javascript:alert('boo'))">evil</div>
18820 <div style="background-image:u rl(javascript:alert('boo'))">evil</div>
18823 <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>
18827 MSIE CSS safety test: comment in expression
18829 <div style="background-image:expres/**/sion(alert('boo4'))">evil4</div>
18831 <div style="background-image:expres sion(alert('boo4'))">evil4</div>
18834 <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>
18838 CSS safety test (all browsers): vertical tab (T57332 / CVE-2013-4567)
18840 <p style="font-size: 100px; background-image:url\b(https://www.google.com/images/srpr/logo6w.png)">A</p>
18842 <p style="/* invalid control char */">A</p>
18845 <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>
18849 MSIE 6 CSS safety test: Fullwidth (T57332)
18851 <p style="font-size: 100px; color: expression((title='XSSed'),'red')">A</p>
18852 <div style="top:EXPRESSION(alert())">B</div>
18854 <p style="/* insecure input */">A</p>
18855 <div style="/* insecure input */">B</div>
18858 <p style="/* insecure input */" data-parsoid='{"stx":"html","a":{"style":"/* insecure input */"},"sa":{"style":"font-size: 100px; color: expression((title='XSSed'),'red')"}}'>A</p>
18859 <div style="/* insecure input */" data-parsoid='{"stx":"html","a":{"style":"/* insecure input */"},"sa":{"style":"top:EXPRESSION(alert())"}}'>B</div>
18863 MSIE 6 CSS safety test: IPA extensions (T57332)
18865 <div style="background-image:uʀʟ(javascript:alert())">A</div>
18866 <p style="font-size: 100px; color: expʀessɪoɴ((title='XSSed'),'red')">B</p>
18868 <div style="/* insecure input */">A</div>
18869 <p style="/* insecure input */">B</p>
18872 <div style="/* insecure input */" data-parsoid='{"stx":"html","a":{"style":"/* insecure input */"},"sa":{"style":"background-image:uʀʟ(javascript:alert())"}}'>A</div>
18873 <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>
18877 MSIE 6 CSS safety test: sup/sub script (T57332)
18879 <div style="background-image:url⁽javascript:alert())">A</div>
18880 <div style="background-image:url₍javascript:alert())">B</div>
18881 <p style="font-size: 100px; color: expressioⁿ((title='XSSed'),'red')">C</p>
18883 <div style="/* insecure input */">A</div>
18884 <div style="/* insecure input */">B</div>
18885 <p style="/* insecure input */">C</p>
18888 <div style="/* insecure input */" data-parsoid='{"stx":"html","a":{"style":"/* insecure input */"},"sa":{"style":"background-image:url⁽javascript:alert())"}}'>A</div>
18889 <div style="/* insecure input */" data-parsoid='{"stx":"html","a":{"style":"/* insecure input */"},"sa":{"style":"background-image:url₍javascript:alert())"}}'>B</div>
18890 <p style="/* insecure input */" data-parsoid='{"stx":"html","a":{"style":"/* insecure input */"},"sa":{"style":"font-size: 100px; color: expressioⁿ((title='XSSed'),'red')"}}'>C</p>
18896 parsoid=wt2html,html2html
18899 title="data:text/html,<img src=1 onerror=alert(1)>"
18900 style="-o-link:attr(title);-o-link-source:current">X</div>
18902 <div title="data:text/html,<img src=1 onerror=alert(1)>" style="/* insecure input */">X</div>
18905 <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>
18909 MSIE 6 CSS safety test: Repetition markers (T57332)
18911 <p style="font-size: 100px; color: expres〱ion((title='XSSed'),'red')">A</p>
18912 <p style="font-size: 100px; color: expresゝion((title='XSSed'),'red')">B</p>
18913 <p style="font-size: 100px; color: expresーion((title='XSSed'),'red')">C</p>
18914 <p style="font-size: 100px; color: expresヽion((title='XSSed'),'red')">D</p>
18915 <p style="font-size: 100px; color: expresﹽion((title='XSSed'),'red')">E</p>
18916 <p style="font-size: 100px; color: expresﹼion((title='XSSed'),'red')">F</p>
18917 <p style="font-size: 100px; color: expresーion((title='XSSed'),'red')">G</p>
18919 <p style="/* insecure input */">A</p>
18920 <p style="/* insecure input */">B</p>
18921 <p style="/* insecure input */">C</p>
18922 <p style="/* insecure input */">D</p>
18923 <p style="/* insecure input */">E</p>
18924 <p style="/* insecure input */">F</p>
18925 <p style="/* insecure input */">G</p>
18928 <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>
18929 <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>
18930 <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>
18931 <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>
18932 <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>
18933 <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>
18934 <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>
18938 Table attribute legitimate extension
18941 !+ style="<nowiki>color:blue</nowiki>"|status
18946 <th style="color:blue">status
18952 Table attribute safety
18955 !+ style="<nowiki>border-width:expression(0+alert(document.cookie))</nowiki>"|status
18960 <th style="/* insecure input */">status
18966 CSS line continuation 1
18968 <div style="background-image: u\ rl(test.jpg);"></div>
18970 <div style="/* insecure input */"></div>
18975 CSS line continuation 2
18977 <div style="background-image: u\ rl(test.jpg); "></div>
18979 <div style="/* invalid control char */"></div>
18990 Expansion of multi-line templates in attribute values (T8255)
18992 <div style="background: {{identity|#00FF00}}">-</div>
18994 <div style="background: #00FF00">-</div>
18999 Expansion of multi-line templates in attribute values (T8255 sanity check)
19001 <div style="background:
19004 <div style="background: #00FF00">-</div>
19007 <div style="background:
19012 Expansion of multi-line templates in attribute values (T8255 sanity check 2)
19014 <div style="background: #00FF00">-</div>
19016 <div style="background: #00FF00">-</div>
19021 Tags which are hidden from tidiers cannot pass through the Sanitizer
19023 <mw:toc><script>alert();</script></mw:toc>
19025 <p><mw:toc><script>alert();</script></mw:toc>
19030 ### Parser hooks (see tests/parser/ParserTestParserHook.php for the <tag> extension)
19034 Parser hook: empty input
19045 <pre typeof="mw:Extension/tag" data-mw='{"name":"tag","attrs":{},"body":{"extsrc":""}}' data-parsoid='{}' about="#mwt2"></pre>
19048 ## Don't expect parsoid to rt this form.
19050 Parser hook: empty input using terminated empty elements
19052 parsoid=wt2html,html2html
19063 <pre typeof="mw:Extension/tag" data-mw='{"name":"tag","attrs":{}}' data-parsoid='{}' about="#mwt2"></pre>
19067 Parser hook: empty input using terminated empty elements (space before)
19078 <pre typeof="mw:Extension/tag" data-mw='{"name":"tag","attrs":{}}' data-parsoid='{}' about="#mwt2"></pre>
19082 Parser hook: basic input
19093 <pre typeof="mw:Extension/tag" data-mw='{"name":"tag","attrs":{},"body":{"extsrc":"input"}}' data-parsoid='{}' about="#mwt2"></pre>
19096 ## Don't expect parsoid to rt this form.
19098 Parser hook: case insensitive
19100 parsoid=wt2html,html2html
19111 <pre typeof="mw:Extension/tag" data-mw='{"name":"tag","attrs":{},"body":{"extsrc":"input"}}' data-parsoid='{}' about="#mwt2"></pre>
19114 ## Don't expect parsoid to rt this form.
19116 Parser hook: case insensitive, redux
19118 parsoid=wt2html,html2html
19129 <pre typeof="mw:Extension/tag" data-mw='{"name":"tag","attrs":{},"body":{"extsrc":"input"}}' data-parsoid='{}' about="#mwt2"></pre>
19133 Parser hook: nested tags
19137 <tag><tag></tag></tag>
19149 </tag></pre><p></tag>
19152 <pre typeof="mw:Extension/tag" about="#mwt2" data-mw='{"name":"tag","attrs":{},"body":{"extsrc":"<tag>"}}'></pre><p></tag></p>
19156 Parser hook: basic arguments
19158 <tag width="200" height="100" depth="50" square=""></tag>
19171 <pre typeof="mw:Extension/tag" data-mw='{"name":"tag","attrs":{"width":"200","height":"100","depth":"50","square":""},"body":{"extsrc":""}}' data-parsoid='{}' about="#mwt2"></pre>
19174 ## Don't expect parsoid to rt this form.
19176 Parser hook: basic arguments, variations
19178 parsoid=wt2html,html2html
19180 <tag width=200 height = "100" depth = '50' square></tag>
19193 <pre typeof="mw:Extension/tag" data-mw='{"name":"tag","attrs":{"width":"200","height":"100","depth":"50","square":""},"body":{"extsrc":""}}' data-parsoid='{}' about="#mwt2"></pre>
19197 Parser hook: argument containing a forward slash (T7344)
19199 <tag filename="/tmp/bla"></tag>
19204 'filename' => '/tmp/bla',
19209 <pre typeof="mw:Extension/tag" data-mw='{"name":"tag","attrs":{"filename":"/tmp/bla"},"body":{"extsrc":""}}' data-parsoid='{}' about="#mwt2"></pre>
19212 ## Don't expect parsoid to rt this form.
19214 Parser hook: empty input using terminated empty elements (T4374)
19216 parsoid=wt2html,html2html
19228 <pre typeof="mw:Extension/tag" about="#mwt2" data-mw='{"name":"tag","attrs":{"foo":"bar"}}'></pre><p>text</p>
19231 ## </tag> should be output literally since there is no matching tag that begins it
19232 ## Don't expect parsoid to rt this form.
19234 Parser hook: basic arguments using terminated empty elements (T4374)
19238 <tag width=200 height = "100" depth = '50' square/>
19255 <pre typeof="mw:Extension/tag" data-mw='{"name":"tag","attrs":{"width":"200","height":"100","depth":"50","square":""}}' about="#mwt2"></pre><p>other stuff
19259 ## Don't expect parsoid to rt this form.
19261 Parser hook: Don't allow unclosed extension tags
19267 this is a '''test'''
19269 <p>test <tag>123
19270 </p><p>this is a <b>test</b>
19273 <p>test <tag>123</p>
19275 <p>this is a <b>test</b></p>
19279 Parser hook: horizontal rule inside extension tag that outputs <pre>
19300 ### (see tests/parser/ParserTestParserHook.php for the <statictag> extension)
19304 Parser hook: static parser hook not inside a comment
19306 <statictag>hello, world</statictag>
19308 <statictag action="flush" />
19314 <p><span typeof="mw:Extension/statictag" data-mw='{"name":"statictag","attrs":{},"body":{"extsrc":"hello, world"}}' about="#mwt2"></span></p>
19315 <p><span typeof="mw:Extension/statictag" data-mw='{"name":"statictag","attrs":{"action":"flush"}}' about="#mwt4">hello, world</span></p>
19319 Parser hook: static parser hook inside a comment
19321 <!-- <statictag>hello, world</statictag> -->
19322 <statictag action="flush" />
19327 <!-- <statictag>hello, world</statictag> -->
19328 <p><span typeof='mw:Extension/statictag' data-mw='{"name":"statictag","attrs":{"action":"flush"}}' data-parsoid='{}' about='#mwt2'></span></p>
19331 # Nested template calls; this case was broken by Parser.php rev 1.506,
19335 Template:One-parameter
19337 (My parameter is: {{{1}}})
19341 Template:Map-one-parameter
19343 {{{{{1}}}|{{{2}}}}}
19347 Nested template calls
19349 {{Map-one-parameter|One-parameter|param}}
19351 <p>(My parameter is: param)
19361 Sanitizer: Closing of open tags
19363 <s></s><table></table>
19365 <p><s></s></p><table></table>
19367 <p><s data-parsoid='{"stx":"html"}'></s></p><table data-parsoid='{"stx":"html"}'></table>
19371 Sanitizer: Closing of open but not closed tags
19380 Sanitizer: Closing of closed but not open tags
19386 <p class="mw-empty-elt">
19391 Sanitizer: Closing of closed but not open table tags
19395 Table not started</td></tr></table>
19397 <p>Table not started
19402 Sanitizer: Escaping of spaces, multibyte characters, colons & other stuff in id=""
19404 title=[[Main Page]]
19406 wgFragmentMode=[ 'html5', 'legacy' ]
19408 <span id="æ: v">byte</span>[[#æ: v|backlink]]
19410 <p><span id="æ:_v">byte</span><a href="#æ:_v">backlink</a>
19413 <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>
19417 Sanitizer: Escaping of spaces, multibyte characters, colons & other stuff in id="" (legacy)
19419 wgFragmentMode=[ 'legacy' ]
19421 <span id="æ: v">byte</span>[[#æ: v|backlink]]
19423 <p><span id=".C3.A6:_v">byte</span><a href="#.C3.A6:_v">backlink</a>
19427 # In HTML5, the restrictions are that id must contain at least one character,
19428 # and must not contain any space characters.
19430 Sanitizer: Validating the contents of the id attribute (T6515)
19434 <br id="" /><br id="a space" />
19439 # In HTML5, id must be unique amongst all the ids in the element's home subtree.
19441 Sanitizer: Validating id attribute uniqueness (T6515, T8301)
19445 <br id="foo" /><br id="foo" />
19447 Something need to be done. foo-2 ?
19451 Sanitizer: Validating that <meta> and <link> work, but only for Microdata
19454 <meta itemprop="hello" content="world">
19455 <meta http-equiv="refresh" content="5">
19456 <meta itemprop="hello" http-equiv="refresh" content="5">
19457 <link itemprop="hello" href="{{SERVER}}">
19458 <link rel="stylesheet" href="{{SERVER}}">
19459 <link rel="stylesheet" itemprop="hello" href="{{SERVER}}">
19463 <p> <meta itemprop="hello" content="world" />
19464 <meta http-equiv="refresh" content="5">
19465 <meta itemprop="hello" content="5" />
19466 <link itemprop="hello" href="http://example.org" />
19467 <link rel="stylesheet" href="<a rel="nofollow" class="external free" href="http://example.org">http://example.org</a>">
19468 <link itemprop="hello" href="http://example.org" />
19475 Sanitizer: Strip comments from CSS attributes
19477 parsoid=wt2html,wt2wt
19479 <span style="margin:/*negate mbox-text padding */-0.125em -0.45em; /*rainbow*/rgba(255, 0, 0, 0.3)">2013</span>
19481 <p><span style="margin: -0.125em -0.45em; rgba(255, 0, 0, 0.3)">2013</span>
19484 <p><span style="margin: -0.125em -0.45em; rgba(255, 0, 0, 0.3)">2013</span></p>
19488 Sanitizer: Avoid unnecessary percent encoded characters in interwiki links
19490 [[meatball:Soft"Security]]
19492 <p><a href="http://www.usemod.com/cgi-bin/mb.pl?Soft%22Security" class="extiw" title="meatball:Soft"Security">meatball:Soft"Security</a>
19495 <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>
19499 Sanitizer: angle brackets are invalid, even in interwiki links (T182338)
19501 [[meatball:Foo<Bar]]
19502 [[meatball:Foo>Bar]]
19503 [[meatball:Foo<bar]]
19504 [[meatball:Foo>bar]]
19506 <p>[[meatball:Foo<Bar]]
19507 [[meatball:Foo>Bar]]
19508 [[meatball:Foo<bar]]
19509 [[meatball:Foo>bar]]
19512 <p>[[meatball:Foo<Bar]]
19513 [[meatball:Foo>Bar]]
19514 [[meatball:Foo<span typeof="mw:Entity" data-parsoid='{"src":"&lt;","srcContent":"<"}'><</span>bar]]
19515 [[meatball:Foo<span typeof="mw:Entity" data-parsoid='{"src":"&gt;","srcContent":">"}'>></span>bar]]</p>
19519 Language converter: output gets cut off unexpectedly (T7757)
19523 this bit is safe: }-
19525 but if we add a conversion instance: -{zh-cn:xxx;zh-tw:yyy}-
19527 then we get cut off here: }-
19529 all additional text is vanished
19531 <p>this bit is safe: }-
19532 </p><p>but if we add a conversion instance: xxx
19533 </p><p>then we get cut off here: }-
19534 </p><p>all additional text is vanished
19537 <p>this bit is safe: }-</p>
19538 <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>
19539 <p>then we get cut off here: }-</p>
19540 <p>all additional text is vanished</p>
19544 Language converter glossary rules inside attributes (T119158)
19546 language=sr variant=sr-el
19548 -{H|foAjrjvi=>sr-el:" onload="alert(1)" data-foo="}-
19550 [[File:Foobar.jpg|alt=-{}-foAjrjvi-{}-]]
19553 </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>
19556 <p><meta typeof="mw:LanguageVariant" data-mw-variant='{"add":true,"oneway":[{"f":"foAjrjvi","l":"sr-el","t":"\" onload=\"alert(1)\" data-foo=\""}]}'/></p>
19558 <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>
19562 Self closed html pairs (T7487)
19564 <center><font id="bug" />Centered text</center>
19565 <div><font id="bug2" />In div text</div>
19567 <center><font id="bug"></font>Centered text</center>
19568 <div><font id="bug2"></font>In div text</div>
19572 Punctuation: nbsp before exclamation
19576 <p>C'est grave !
19581 Punctuation: CSS !important (T13874)
19583 <div style="width:50% !important">important</div>
19585 <div style="width:50% !important">important</div>
19590 Punctuation: CSS ! important (T13874; with space after)
19592 <div style="width:50% ! important">important</div>
19594 <div style="width:50% ! important">important</div>
19599 HTML bullet list, closed tags (T7497)
19612 <ul data-parsoid='{"stx":"html"}'>
19613 <li data-parsoid='{"stx":"html"}'>One</li>
19614 <li data-parsoid='{"stx":"html"}'>Two</li>
19620 HTML bullet list, unclosed tags (T7497)
19632 <ul data-parsoid='{"stx":"html"}'>
19633 <li data-parsoid='{"stx":"html","autoInsertedEnd":true}'>One</li>
19634 <li data-parsoid='{"stx":"html","autoInsertedEnd":true}'>Two</li>
19640 HTML ordered list, closed tags (T7497)
19653 <ol data-parsoid='{"stx":"html"}'>
19654 <li data-parsoid='{"stx":"html"}'>One</li>
19655 <li data-parsoid='{"stx":"html"}'>Two</li>
19661 HTML ordered list, unclosed tags (T7497)
19674 <ol data-parsoid='{"stx":"html"}'>
19675 <li data-parsoid='{"stx":"html","autoInsertedEnd":true}'>One</li>
19676 <li data-parsoid='{"stx":"html","autoInsertedEnd":true}'>Two</li>
19682 HTML nested bullet list, closed tags (T7497)
19705 <ul data-parsoid='{"stx":"html"}'>
19706 <li data-parsoid='{"stx":"html"}'>One</li>
19707 <li data-parsoid='{"stx":"html"}'>Two:
19708 <ul data-parsoid='{"stx":"html"}'>
19709 <li data-parsoid='{"stx":"html"}'>Sub-one</li>
19710 <li data-parsoid='{"stx":"html"}'>Sub-two</li>
19717 HTML nested bullet list, open tags (T7497)
19739 HTML nested ordered list, closed tags (T7497)
19764 HTML nested ordered list, open tags (T7497)
19801 HTML ordered list item with parameters oddity
19803 <ol><li id="fragment">One</li>
19806 <ol><li id="fragment">One</li>
19811 # parsoid doesn't explicitly mark autonumbered links, see T55505
19813 T7918: autonumbering
19815 [http://first/] [http://second] [ftp://ftp]
19819 [mailto:enclosed@mail.tld With target]
19821 [mailto:enclosed@mail.tld]
19823 mailto:inline@mail.tld
19825 <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>
19826 </p><p><a rel="nofollow" class="external free" href="ftp://inlineftp">ftp://inlineftp</a>
19827 </p><p><a rel="nofollow" class="external text" href="mailto:enclosed@mail.tld">With target</a>
19828 </p><p><a rel="nofollow" class="external autonumber" href="mailto:enclosed@mail.tld">[4]</a>
19829 </p><p><a rel="nofollow" class="external free" href="mailto:inline@mail.tld">mailto:inline@mail.tld</a>
19832 <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>
19833 <p><a rel="mw:ExtLink" class="external free" href="ftp://inlineftp">ftp://inlineftp</a></p>
19834 <p><a rel="mw:ExtLink" class="external text" href="mailto:enclosed@mail.tld">With target</a></p>
19835 <p><a rel="mw:ExtLink" class="external autonumber" href="mailto:enclosed@mail.tld"></a></p>
19836 <p><a rel="mw:ExtLink" class="external free" href="mailto:inline@mail.tld">mailto:inline@mail.tld</a></p>
19841 # Security and HTML correctness
19842 # From Nick Jenkins' fuzz testing
19846 Fuzz testing: Parser13
19860 # Note that Parsoid output differs from the PHP parser here: the PHP
19861 # parser breaks the URL for the magic word, while in Parsoid the URL
19862 # production takes precedence.
19864 Fuzz testing: Parser14
19869 <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>
19870 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>
19872 <li class="toclevel-1 tocsection-1"><a href="#onmouseover.3D"><span class="tocnumber">1</span> <span class="toctext">onmouseover=</span></a></li>
19878 <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>
19879 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>
19881 <li class="toclevel-1 tocsection-1"><a href="#onmouseover.3D"><span class="tocnumber">1</span> <span class="toctext">onmouseover=</span></a></li>
19885 <h2 id="onmouseover="><span id="onmouseover.3D" typeof="mw:FallbackId"></span>onmouseover=</h2>
19886 <p><a rel="mw:ExtLink" class="external free" href="http://__TOC__" data-parsoid='{"stx":"url"}'>http://__TOC__</a></p>
19890 Fuzz testing: Parser14-table
19892 parsoid=wt2html,html2html
19897 <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>
19898 <table style="__TOC__">
19903 <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>
19904 <table style="__TOC__">
19905 <tbody><tr><td></td></tr>
19909 <table style="__TOC__"></table>
19912 # Known to produce bogus xml (extra </td>)
19913 # Don't add the html/php section since it generates broken HTML
19915 Fuzz testing: Parser16
19932 Fuzz testing: Parser21
19935 !irc://{{ftp://a" onmouseover="alert('hello world');"
19940 <th><a rel="nofollow" class="external free" href="irc://{{ftp://a">irc://{{ftp://a</a>" onmouseover="alert('hello world');"
19950 Fuzz testing: Parser22
19952 http://===r:::https://b
19956 <p><a rel="nofollow" class="external free" href="http://===r:::https://b">http://===r:::https://b</a>
19964 ## Remex doesn't account for fostered content.
19965 ## Known to produce bad XML for now
19967 Fuzz testing: Parser24
19974 | {{{{SSSll!!!!!!!VVVV)]]][[Special:*xxxxxxx--><noinclude>}}}} >
19975 <br style="onmouseover='alert(document.cookie);' " />
19977 MOVE YOUR MOUSE CURSOR OVER THIS TEXT
19982 <u class="|">}}}} >
19983 <br style="onmouseover='alert(document.cookie);'" />
19985 MOVE YOUR MOUSE CURSOR OVER THIS TEXT
19995 <u class="|">}}}} >
19996 <br style="onmouseover='alert(document.cookie);'" />
19998 MOVE YOUR MOUSE CURSOR OVER THIS TEXT
19999 </u><table><tbody><tr>
20003 </tbody></table><p><u class="|">
20006 <p data-parsoid='{"fostered":true,"autoInsertedEnd":true,"autoInsertedStart":true}'>
20008 <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>"}'/>}}}} >
20009 <br style="onmouseover='alert(document.cookie);' " data-parsoid='{"stx":"html","selfClose":true}'/>
20011 MOVE YOUR MOUSE CURSOR OVER THIS TEXT</u></p>
20012 <table data-parsoid='{"autoInsertedEnd":true}'><tbody><tr data-parsoid='{"autoInsertedStart":true}'><td></td></tr></tbody></table>
20015 # Note: the current result listed for this is not what the original one was,
20016 # but the original bug was JavaScript injection, which is fixed in any case.
20017 # It's not clear that the original result listed was any more correct than the
20018 # current one. Original result:
20021 # <li class="||">
20022 # }}}blah" onmouseover="alert('hello world');" align="left"<b>MOVE MOUSE CURSOR OVER HERE</b>
20024 Fuzz testing: Parser25 (T8055)
20030 }}}blah" onmouseover="alert('hello world');" align="left"'''MOVE MOUSE CURSOR OVER HERE
20032 <p><LI CLASS=blah" onmouseover="alert('hello world');" align="left"<b>MOVE MOUSE CURSOR OVER HERE</b>
20035 <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"]}'>
20036 </span><p about="#mwt1"><LI CLASS=blah" onmouseover="alert('hello world');" align="left"<b>MOVE MOUSE CURSOR OVER HERE</b></p>
20040 Fuzz testing: URL adjacent extension (with space, clean)
20042 http://example.com <nowiki>junk</nowiki>
20044 <p><a rel="nofollow" class="external free" href="http://example.com">http://example.com</a> junk
20047 <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>
20051 Fuzz testing: URL adjacent extension (no space, dirty; nowiki)
20053 http://example.com<nowiki>junk</nowiki>
20055 <p><a rel="nofollow" class="external free" href="http://example.com">http://example.com</a>junk
20058 <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>
20062 Fuzz testing: URL adjacent extension (no space, dirty; pre)
20064 http://example.com<pre>junk</pre>
20066 <a rel="nofollow" class="external free" href="http://example.com">http://example.com</a><pre>junk</pre>
20069 <p><a rel="nofollow" class="external free" href="http://example.com">http://example.com</a></p><pre>junk</pre>
20071 <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>
20075 Fuzz testing: image with bogus manual thumbnail
20077 [[Image:foobar.jpg|thumbnail= ]]
20079 <div class="thumb tright"><div class="thumbinner" style="width:182px;">Error creating thumbnail: <div class="thumbcaption"></div></div></div>
20082 <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>
20085 # Parsoid will emit the newline literally in wt2wt; see next test case.
20087 Fuzz testing: encoded newline in generated HTML replacements (T8577)
20091 <pre dir=" "></pre>
20093 <pre dir=" "></pre>
20097 " typeof="mw:Extension/pre" about="#mwt2"data-mw='{"name":"pre","attrs":{"dir":"\n"},"body":{"extsrc":""}}'></pre>
20101 Fuzz testing: encoded newline in generated HTML replacements, html2wt (T8577)
20105 <pre typeof="mw:Extension/pre" about="#mwt2" dir="
20106 " data-mw='{"name":"pre","attrs":{"dir":"\n"},"body":{"extsrc":""}}'></pre>
20116 Templates in extension attributes are not expanded
20118 <pre dir="{{echo|ltr}}"></pre>
20120 <pre dir="{{echo|ltr}}"></pre>
20123 <pre dir="{{echo|ltr}}" typeof="mw:Extension/pre" about="#mwt2" data-mw='{"name":"pre","attrs":{"dir":"{{echo|ltr}}"},"body":{"extsrc":""}}'></pre>
20127 Parsing optional HTML elements (T8171)
20132 <td> Some tabular data</td>
20133 <td> More tabular data ...
20134 <td> And yet som tabular data</td>
20140 <td> Some tabular data</td>
20141 <td> More tabular data ...
20142 </td><td> And yet som tabular data</td>
20149 Correct handling of <td>, <tr> (T8171)
20154 <td> Some tabular data</td>
20155 <td> More tabular data ...</td>
20156 <td> And yet som tabular data</td>
20162 <td> Some tabular data</td>
20163 <td> More tabular data ...</td>
20164 <td> And yet som tabular data</td>
20172 Parsing crashing regression (fr:JavaScript)
20176 <p></body></x>
20181 Inline wiki vs wiki block nesting
20187 <p><b>Bold paragraph</b>
20188 </p><p>New wiki paragraph
20192 # FIXME: The current php output is documented
20193 # and desired output is the parsoid target.
20195 Inline HTML vs wiki block nesting
20201 <p><b>Bold paragraph
20202 </p><p>New wiki paragraph</b>
20205 <p><b>Bold paragraph
20206 </b></p><p><b>New wiki paragraph
20209 <p><b>Bold paragraph</b>
20210 </p><p>New wiki paragraph
20214 # Original result was this:
20215 # <p><b>bold</b><b>bold<i>bolditalics</i></b>
20217 # While that might be marginally more intuitive, maybe, the six-apostrophe
20218 # construct is clearly pathological and the result stated here (which is what
20219 # the parser actually does) is about as reasonable as anything.
20221 Mixing markup for italics and bold
20224 '''bold''''''bold''bolditalics'''''
20226 <p>'<i>bold'</i><b>bold<i>bolditalics</i></b>
20234 Article for special page transclusion test
20238 Special page transclusion
20241 {{Special:Prefixindex/Xyzzyx}}
20243 <ul class="mw-prefixindex-list"><li><a href="/wiki/Xyzzyx" title="Xyzzyx">Xyzzyx</a></li>
20249 Special page transclusion twice (T7021)
20252 {{Special:Prefixindex/Xyzzyx}}
20253 {{Special:Prefixindex/Xyzzyx}}
20255 <ul class="mw-prefixindex-list"><li><a href="/wiki/Xyzzyx" title="Xyzzyx">Xyzzyx</a></li>
20257 <ul class="mw-prefixindex-list"><li><a href="/wiki/Xyzzyx" title="Xyzzyx">Xyzzyx</a></li>
20263 Transclusion of default MediaWiki message
20265 {{MediaWiki:Mainpage}}
20272 Transclusion of nonexistent MediaWiki message
20274 {{MediaWiki:Mainpagexxx}}
20276 <p><a href="/index.php?title=MediaWiki:Mainpagexxx&action=edit&redlink=1" class="new" title="MediaWiki:Mainpagexxx (page does not exist)">MediaWiki:Mainpagexxx</a>
20281 Transclusion of MediaWiki message with underscore
20283 {{MediaWiki:history_short}}
20290 Transclusion of MediaWiki message with space
20292 {{MediaWiki:history short}}
20299 Invalid header with following text
20309 Section extraction test (section 0)
20329 Section extraction test (section 1)
20351 Section extraction test (section 2)
20372 Section extraction test (section 3)
20392 Section extraction test (section 4)
20416 Section extraction test (section 5)
20436 Section extraction test (section 6)
20457 Section extraction test (section 7)
20477 Section extraction test (section 8)
20497 Section extraction test (section 9)
20518 Section extraction test (section 10)
20538 Section extraction test (nonexistent section 11)
20557 Section extraction test with bogus heading (section 1)
20562 ==bogus== not a legal section
20566 ==bogus== not a legal section
20570 Section extraction test with bogus heading (section 2)
20575 ==bogus== not a legal section
20582 Section extraction test with comment after heading (section 1)
20594 Section extraction test with comment after heading (section 2)
20606 Section extraction test with bogus <nowiki> heading (section 1)
20611 ==bogus== <nowiki>not a legal section</nowiki>
20615 ==bogus== <nowiki>not a legal section</nowiki>
20619 Section extraction test with bogus <nowiki> heading (section 2)
20624 ==bogus== <nowiki>not a legal section</nowiki>
20630 # Formerly testing for T4587, now resolved by the use of unmarked sections
20631 # instead of respecting commented sections
20633 Section extraction prefixed by comment (section 1)
20644 Section extraction prefixed by comment (section 2)
20654 # Formerly testing for T4607, now resolved by the use of unmarked sections
20655 # instead of respecting HTML-style headings
20657 Section extraction, mixed wiki and html (section 1)
20673 Section extraction, mixed wiki and html (section 2)
20689 # Formerly testing for T5342
20691 Section extraction, heading surrounded by <noinclude>
20695 <noinclude>==unmarked==</noinclude>
20701 # Test behavior of T21910
20703 Sectiion with all-equals
20708 The line above must have a trailing space
20711 But just in case it doesn't...
20715 But just in case it doesn't...
20719 Section replacement test (section 0)
20750 Section replacement test (section 1)
20779 Section replacement test (section 2)
20809 Section replacement test (section 3)
20840 Section replacement test (section 4)
20867 Section replacement test (section 5)
20898 Section replacement test (section 6)
20928 Section replacement test (section 7)
20959 Section replacement test (section 8)
20990 Section replacement test (section 9)
21019 Section replacement test (section 10)
21049 Section replacement test with initial whitespace (T15728)
21053 Preformatted initial line
21057 Preformatted initial line
21064 Section extraction, heading followed by pre with 20 spaces (T8398)
21076 Section extraction, heading followed by pre with 19 spaces (T8398 sanity check)
21089 Section extraction, <pre> around bogus header (T12309)
21106 Section replacement, <pre> around bogus header (T12309)
21127 Handling of 
 in URLs
21131 <ul><li><a rel="nofollow" class="external free" href="irc://%0Aa">irc://%0Aa</a></li></ul>
21134 <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>
21138 Handling of %0A in URLs
21142 <ul><li><a rel="nofollow" class="external free" href="irc://%0Aa">irc://%0Aa</a></li></ul>
21145 <ul><li><a rel="mw:ExtLink" class="external free" href="irc://%0Aa">irc://%0Aa</a></li></ul>
21148 # The PHP parser strips the empty tags out for giggles; parsoid doesn't.
21150 5 quotes, code coverage +1 line
21157 <p><b><i></i></b></p>
21160 # same html as previous, but wikitext adjusted to match parsoid html2wt
21161 # note that wt2html and html2html will put the <i> before the <b>
21163 5 quotes, code coverage +1 line w/ nowiki (1)
21165 parsoid=wt2wt,html2wt
21167 '''''<nowiki/>'''''
21172 <p><b><i></i></b></p>
21175 # same as previous, just swapping the <i> and <b>
21177 5 quotes, code coverage +1 line w/ nowiki (2)
21179 '''''<nowiki/>'''''
21184 <p><i><b></b></i></p>
21188 Special:Search page linking.
21192 <p><a href="/wiki/Special:Search" title="Special:Search">Special:Search</a>
21197 {{!}} is a magic word
21199 {{!}} is a magic word there and {{!}} is still a magic word here
21200 | is not a magic word here but {{!}} is still a magic word here
21202 <p>| is a magic word there and | is still a magic word here
21203 | is not a magic word here but | is still a magic word here
21206 <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
21207 | 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>
21213 title=[[Parser test]]
21227 *{{SUBJECTPAGENAME}}
21228 *{{SUBJECTPAGENAMEE}}
21231 *{{NAMESPACENUMBER}}
21236 *{{Dynamic|{{NUMBEROFUSERS}}|{{NUMBEROFPAGES}}|{{CURRENTVERSION}}|{{CONTENTLANGUAGE}}|{{DIRECTIONMARK}}|{{CURRENTTIMESTAMP}}|{{NUMBEROFARTICLES}}}}
21238 <ul><li>Parser test</li>
21239 <li>Parser_test</li>
21240 <li>Parser test</li>
21241 <li>Parser_test</li>
21242 <li>Parser test</li>
21243 <li>Parser_test</li>
21244 <li>Parser test</li>
21245 <li>Parser_test</li>
21246 <li>Parser test</li>
21247 <li>Parser_test</li>
21248 <li>Talk:Parser test</li>
21249 <li>Talk:Parser_test</li>
21250 <li>Parser test</li>
21251 <li>Parser_test</li>
21259 <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>
21262 ### Note: Above tests excludes the "{{NUMBEROFADMINS}}" magic word because it generates a MySQL error when included.
21265 Gallery with valid attributes
21267 <gallery type="123" summary="345">
21268 File:File:Foobar.jpg
21271 <ul class="gallery mw-gallery-traditional" type="123">
21272 <li class="gallerybox" style="width: 155px"><div style="width: 155px">
21273 <div class="thumb" style="height: 150px;">File:Foobar.jpg</div>
21274 <div class="gallerytext">
21280 <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"}}'>
21281 <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>
21285 ## Parsoid thinks the "centre" here is a property, not a caption.
21290 "modes": ["wt2html"],
21291 "nativeGallery": true
21299 image4 |300px| centre
21300 image5.svg| http://///////
21305 <ul class="gallery mw-gallery-traditional">
21306 <li class="gallerybox" style="width: 155px"><div style="width: 155px">
21307 <div class="thumb" style="height: 150px;">Image1.png</div>
21308 <div class="gallerytext">
21311 <li class="gallerybox" style="width: 155px"><div style="width: 155px">
21312 <div class="thumb" style="height: 150px;">Image2.gif</div>
21313 <div class="gallerytext">
21316 <li class="gallerybox" style="width: 155px"><div style="width: 155px">
21317 <div class="thumb" style="height: 150px;">Image3</div>
21318 <div class="gallerytext">
21321 <li class="gallerybox" style="width: 155px"><div style="width: 155px">
21322 <div class="thumb" style="height: 150px;">Image4</div>
21323 <div class="gallerytext">
21328 <li class="gallerybox" style="width: 155px"><div style="width: 155px">
21329 <div class="thumb" style="height: 150px;">Image5.svg</div>
21330 <div class="gallerytext">
21331 <p><a rel="nofollow" class="external free" href="http://///////">http://///////</a>
21335 <li class="gallerybox" style="width: 155px"><div style="width: 155px">
21336 <div class="thumb" style="height: 150px;">* image6</div>
21337 <div class="gallerytext">
21343 <ul class="gallery mw-gallery-traditional" typeof="mw:Extension/gallery" about="#mwt3" data-mw='{"name":"gallery","attrs":{},"body":{}}'>
21344 <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>
21345 <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>
21346 <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>
21347 <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>
21348 <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>
21349 <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>
21354 Gallery (with options, html)
21357 "modes": ["wt2html", "html2html"],
21358 "nativeGallery": true
21361 <gallery widths="70px" heights="40px" perrow="2" caption="Foo [[Main Page]]">
21362 File:Nonexistent.jpg|caption
21363 File:Nonexistent.jpg
21364 image:foobar.jpg|some '''caption''' [[Main Page]]
21366 image:foobar.jpg|Blabla|alt=This is a foo-bar.|blabla.
21369 <ul class="gallery mw-gallery-traditional" style="max-width: 226px;_width: 226px;">
21370 <li class='gallerycaption'>Foo <a href="/wiki/Main_Page" title="Main Page">Main Page</a></li>
21371 <li class="gallerybox" style="width: 105px"><div style="width: 105px">
21372 <div class="thumb" style="height: 70px;">Nonexistent.jpg</div>
21373 <div class="gallerytext">
21378 <li class="gallerybox" style="width: 105px"><div style="width: 105px">
21379 <div class="thumb" style="height: 70px;">Nonexistent.jpg</div>
21380 <div class="gallerytext">
21383 <li class="gallerybox" style="width: 105px"><div style="width: 105px">
21384 <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>
21385 <div class="gallerytext">
21386 <p>some <b>caption</b> <a href="/wiki/Main_Page" title="Main Page">Main Page</a>
21390 <li class="gallerybox" style="width: 105px"><div style="width: 105px">
21391 <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>
21392 <div class="gallerytext">
21395 <li class="gallerybox" style="width: 105px"><div style="width: 105px">
21396 <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>
21397 <div class="gallerytext">
21405 <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":{}}'>
21406 <li class="gallerycaption">Foo <a rel="mw:WikiLink" href="./Main_Page" title="Main Page">Main Page</a></li>
21407 <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>
21408 <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>
21409 <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>
21410 <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>
21411 <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>
21416 Gallery (with options, extsrc)
21419 "nativeGallery": false
21422 <gallery widths="70px" heights="40px" perrow="2" caption="Foo [[Main Page]]">
21423 File:Nonexistent.jpg|caption
21424 File:Nonexistent.jpg
21425 image:foobar.jpg|some '''caption''' [[Main Page]]
21427 image:foobar.jpg|Blabla|alt=This is a foo-bar.|blabla.
21430 <ul class="gallery mw-gallery-traditional" style="max-width: 226px;_width: 226px;">
21431 <li class='gallerycaption'>Foo <a href="/wiki/Main_Page" title="Main Page">Main Page</a></li>
21432 <li class="gallerybox" style="width: 105px"><div style="width: 105px">
21433 <div class="thumb" style="height: 70px;">Nonexistent.jpg</div>
21434 <div class="gallerytext">
21439 <li class="gallerybox" style="width: 105px"><div style="width: 105px">
21440 <div class="thumb" style="height: 70px;">Nonexistent.jpg</div>
21441 <div class="gallerytext">
21444 <li class="gallerybox" style="width: 105px"><div style="width: 105px">
21445 <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>
21446 <div class="gallerytext">
21447 <p>some <b>caption</b> <a href="/wiki/Main_Page" title="Main Page">Main Page</a>
21451 <li class="gallerybox" style="width: 105px"><div style="width: 105px">
21452 <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>
21453 <div class="gallerytext">
21456 <li class="gallerybox" style="width: 105px"><div style="width: 105px">
21457 <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>
21458 <div class="gallerytext">
21466 <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"}}'>
21467 <li class="gallerycaption">Foo <a rel="mw:WikiLink" href="./Main_Page" title="Main Page">Main Page</a></li>
21468 <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>
21469 <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>
21470 <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>
21471 <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>
21472 <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>
21477 Gallery (without px units)
21479 <gallery widths="70" heights="40">
21483 <ul class="gallery mw-gallery-traditional">
21484 <li class="gallerybox" style="width: 105px"><div style="width: 105px">
21485 <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>
21486 <div class="gallerytext">
21492 <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"}}'>
21493 <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>
21498 Gallery (with invalid units)
21500 <gallery widths="70em" heights="40em">
21504 <ul class="gallery mw-gallery-traditional">
21505 <li class="gallerybox" style="width: 155px"><div style="width: 155px">
21506 <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>
21507 <div class="gallerytext">
21513 <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"}}'>
21514 <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>
21519 Gallery with link that has fragment
21522 "modes": ["wt2html", "html2html"],
21523 "nativeGallery": true
21527 image:foobar.jpg|link=Main_Page
21528 image:foobar.jpg|link=Main_Page#section
21529 image:foobar.jpg|link=Main Page#section|caption
21532 <ul class="gallery mw-gallery-traditional">
21533 <li class="gallerybox" style="width: 155px"><div style="width: 155px">
21534 <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>
21535 <div class="gallerytext">
21538 <li class="gallerybox" style="width: 155px"><div style="width: 155px">
21539 <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>
21540 <div class="gallerytext">
21543 <li class="gallerybox" style="width: 155px"><div style="width: 155px">
21544 <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>
21545 <div class="gallerytext">
21553 <ul class="gallery mw-gallery-traditional" typeof="mw:Extension/gallery" about="#mwt2" data-mw='{"name":"gallery","attrs":{},"body":{}}'>
21554 <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>
21555 <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>
21556 <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>
21561 Gallery with template inside caption
21564 "nativeGallery": true
21567 <gallery caption="{{echo|hi}}">
21568 File:Foobar.jpg|{{echo|ho}}
21571 <ul class="gallery mw-gallery-traditional">
21572 <li class='gallerycaption'>hi</li>
21573 <li class="gallerybox" style="width: 155px"><div style="width: 155px">
21574 <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>
21575 <div class="gallerytext">
21583 <ul class="gallery mw-gallery-traditional" typeof="mw:Extension/gallery" about="#mwt6" data-mw='{"name":"gallery","attrs":{},"body":{}}'>
21584 <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>
21585 <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>
21590 Gallery with wikitext inside gallery caption
21592 <gallery caption="# List item
21594 Text '''bold''' [[link]] {{ns:-1}}
21596 [[File:Foobar.jpg|thumb|File in gallery caption]]">
21597 File:Foobar.jpg|Image caption
21600 <ul class="gallery mw-gallery-traditional">
21601 <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>
21602 <li class="gallerybox" style="width: 155px"><div style="width: 155px">
21603 <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>
21604 <div class="gallerytext">
21614 Gallery with wikitext inside caption
21617 "nativeGallery": true
21621 File:Foobar.jpg|alt=galleryalt|[[File:Foobar.jpg|alt=inneralt|20x20px|desc]]
21622 File:Foobar.jpg|alt=galleryalt|{{Test|unamedParam|alt=param}}
21625 <ul class="gallery mw-gallery-traditional">
21626 <li class="gallerybox" style="width: 155px"><div style="width: 155px">
21627 <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>
21628 <div class="gallerytext">
21629 <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>
21633 <li class="gallerybox" style="width: 155px"><div style="width: 155px">
21634 <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>
21635 <div class="gallerytext">
21636 <p>This is a test template
21643 <ul class="gallery mw-gallery-traditional" typeof="mw:Extension/gallery" about="#mwt6" data-mw='{"name":"gallery","attrs":{},"body":{}}'>
21644 <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>
21645 <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>
21650 Gallery (with showfilename option)
21653 "nativeGallery": true
21656 <gallery showfilename="">
21657 File:Nonexistent.jpg|caption
21658 File:Nonexistent.jpg
21659 File:Foobar.jpg|some '''caption''' [[Main Page]]
21663 <ul class="gallery mw-gallery-traditional">
21664 <li class="gallerybox" style="width: 155px"><div style="width: 155px">
21665 <div class="thumb" style="height: 150px;">Nonexistent.jpg</div>
21666 <div class="gallerytext">
21667 <p><a href="/wiki/File:Nonexistent.jpg" class="galleryfilename galleryfilename-truncate" title="File:Nonexistent.jpg">Nonexistent.jpg</a>
21672 <li class="gallerybox" style="width: 155px"><div style="width: 155px">
21673 <div class="thumb" style="height: 150px;">Nonexistent.jpg</div>
21674 <div class="gallerytext">
21675 <p><a href="/wiki/File:Nonexistent.jpg" class="galleryfilename galleryfilename-truncate" title="File:Nonexistent.jpg">Nonexistent.jpg</a>
21679 <li class="gallerybox" style="width: 155px"><div style="width: 155px">
21680 <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>
21681 <div class="gallerytext">
21682 <p><a href="/wiki/File:Foobar.jpg" class="galleryfilename galleryfilename-truncate" title="File:Foobar.jpg">Foobar.jpg</a>
21683 some <b>caption</b> <a href="/wiki/Main_Page" title="Main Page">Main Page</a>
21687 <li class="gallerybox" style="width: 155px"><div style="width: 155px">
21688 <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>
21689 <div class="gallerytext">
21690 <p><a href="/wiki/File:Foobar.jpg" class="galleryfilename galleryfilename-truncate" title="File:Foobar.jpg">Foobar.jpg</a>
21697 <ul class="gallery mw-gallery-traditional" typeof="mw:Extension/gallery" about="#mwt3" data-mw='{"name":"gallery","attrs":{"showfilename":""},"body":{}}'>
21698 <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>
21699 <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>
21700 <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>
21701 <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>
21705 ## Should Parsoid be preserving these variations? See T151367
21707 Gallery (with namespace-less filenames)
21710 "modes": ["wt2html", "html2html"],
21711 "nativeGallery": true
21715 File:Nonexistent.jpg
21721 <ul class="gallery mw-gallery-traditional">
21722 <li class="gallerybox" style="width: 155px"><div style="width: 155px">
21723 <div class="thumb" style="height: 150px;">Nonexistent.jpg</div>
21724 <div class="gallerytext">
21727 <li class="gallerybox" style="width: 155px"><div style="width: 155px">
21728 <div class="thumb" style="height: 150px;">Nonexistent.jpg</div>
21729 <div class="gallerytext">
21732 <li class="gallerybox" style="width: 155px"><div style="width: 155px">
21733 <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>
21734 <div class="gallerytext">
21737 <li class="gallerybox" style="width: 155px"><div style="width: 155px">
21738 <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>
21739 <div class="gallerytext">
21745 <ul class="gallery mw-gallery-traditional" typeof="mw:Extension/gallery" about="#mwt2" data-mw='{"name":"gallery","attrs":{},"body":{}}'>
21746 <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>
21747 <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>
21748 <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>
21749 <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>
21754 Gallery override link with wikilink (T36852)
21757 "nativeGallery": true
21761 File:Foobar.jpg|alt=galleryalt|link=Wikilink
21764 <ul class="gallery mw-gallery-traditional">
21765 <li class="gallerybox" style="width: 155px"><div style="width: 155px">
21766 <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>
21767 <div class="gallerytext">
21773 <ul class="gallery mw-gallery-traditional" typeof="mw:Extension/gallery" about="#mwt2" data-mw='{"name":"gallery","attrs":{},"body":{}}'>
21774 <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>
21779 Gallery override link with absolute external link (T36852)
21782 "nativeGallery": true
21786 File:Foobar.jpg|alt=galleryalt|link=http://www.example.org
21789 <ul class="gallery mw-gallery-traditional">
21790 <li class="gallerybox" style="width: 155px"><div style="width: 155px">
21791 <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>
21792 <div class="gallerytext">
21798 <ul class="gallery mw-gallery-traditional" typeof="mw:Extension/gallery" about="#mwt2" data-mw='{"name":"gallery","attrs":{},"body":{}}'>
21799 <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>
21804 Gallery override link with absolute external link with LanguageConverter
21809 File:foobar.jpg|caption|alt=galleryalt|link=http://www.example.org
21812 <ul class="gallery mw-gallery-traditional">
21813 <li class="gallerybox" style="width: 155px"><div style="width: 155px">
21814 <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>
21815 <div class="gallerytext">
21823 <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"}}'>
21824 <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>
21829 Gallery override link with malicious javascript (T36852)
21832 "modes": ["wt2html", "html2html"],
21833 "nativeGallery": true
21837 File:Foobar.jpg|alt=galleryalt|link=" onclick="alert('malicious javascript code!');
21840 <ul class="gallery mw-gallery-traditional">
21841 <li class="gallerybox" style="width: 155px"><div style="width: 155px">
21842 <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>
21843 <div class="gallerytext">
21849 <ul class="gallery mw-gallery-traditional" typeof="mw:Extension/gallery" about="#mwt2" data-mw='{"name":"gallery","attrs":{},"body":{}}'>
21850 <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>
21854 # Note that parsoid uses the invalid link as a caption, PHP does not.
21856 Gallery with invalid title as link (T45964)
21859 "modes": ["wt2html", "html2html"],
21860 "nativeGallery": true
21864 File:Foobar.jpg|link=<
21867 <ul class="gallery mw-gallery-traditional">
21868 <li class="gallerybox" style="width: 155px"><div style="width: 155px">
21869 <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>
21870 <div class="gallerytext">
21876 <ul class="gallery mw-gallery-traditional" typeof="mw:Extension/gallery" about="#mwt2" data-mw='{"name":"gallery","attrs":{},"body":{}}'>
21877 <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>
21882 Serialize gallery without attrs in data-mw
21885 "modes": ["html2wt"],
21886 "nativeGallery": true
21889 <ul class="gallery mw-gallery-traditional" typeof="mw:Extension/gallery" about="#mwt2" data-mw='{"name":"gallery","body":{}}'>
21890 <li class="gallerycaption">123</li>
21891 <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>
21894 <gallery caption="123">
21900 Gallery with class and style attributes
21903 "nativeGallery": true
21906 <gallery class="center" style="text-align: center;">
21910 <ul class="gallery mw-gallery-traditional center" style="text-align: center;">
21911 <li class="gallerybox" style="width: 155px"><div style="width: 155px">
21912 <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>
21913 <div class="gallerytext">
21919 <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":{}}'>
21920 <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>
21925 Gallery in slideshow mode
21928 "nativeGallery": true
21931 <gallery mode="slideshow" showthumbnails="">
21935 <ul class="gallery mw-gallery-slideshow" data-showthumbnails="1">
21936 <li class="gallerybox" style="width: 155px"><div style="width: 155px">
21937 <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>
21938 <div class="gallerytext">
21944 <ul class="gallery mw-gallery-slideshow" data-showthumbnails="1" typeof="mw:Extension/gallery" about="#mwt2" data-mw='{"name":"gallery","attrs":{"mode":"slideshow","showthumbnails":""},"body":{}}'>
21945 <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>
21950 Serialize gallery image captions on a line
21953 "modes": ["html2wt"],
21954 "nativeGallery": true
21957 <ul class="gallery mw-gallery-traditional" typeof="mw:Extension/gallery" about="#mwt2" data-mw='{"name":"gallery","attrs":{},"body":{}}'>
21958 <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>
21959 <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>
21963 File:Foobar.jpg| hi ho
21964 File:Foobar.jpg|hi<br />ho
21969 HTML Hex character encoding (spells the word "JavaScript")
21971 parsoid=wt2html,wt2wt,html2html
21973 JavaScript
21975 <p>JavaScript
21978 <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>
21982 HTML Hex character encoding bogus encoding (T28437 regression check)
21986 <p>&#xsee;&#XSEE;
21991 HTML Hex character encoding mixed case
21993 parsoid=wt2html,wt2wt,html2html
22000 <p><span typeof="mw:Entity">î</span><span typeof="mw:Entity">î</span></p>
22003 # See: https://www.w3.org/TR/html5/syntax.html#character-references
22004 # Note that U+000C (form feed) is not a valid XML character, so
22005 # it is banned even though allowed in HTML5.
22007 Illegal character references (T106578)
22012 ; Control (low): 
22013 ; Control (high):  Ÿ
22014 ; Surrogate: ��
22015 ; This is an okay astral character: 💩
22023 <dt>Control (low)</dt>
22025 <dt>Control (high)</dt>
22026 <dd>&#x7F; &#x9F;</dd>
22028 <dd>&#xD83D;&#xDCA9;</dd>
22029 <dt>This is an okay astral character</dt>
22030 <dd>💩</dd></dl>
22034 __FORCETOC__ override
22046 ISBN 978-0-1234-56 789
22048 <p><a href="/wiki/Special:BookSources/9780123456" class="internal mw-magiclink-isbn">ISBN 978-0-1234-56</a> 789
22051 <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>
22055 ISBN followed by 5 spaces
22066 ISBN ISBN 1234567890
22068 <p>ISBN <a href="/wiki/Special:BookSources/1234567890" class="internal mw-magiclink-isbn">ISBN 1234567890</a>
22071 <p>ISBN <a href="./Special:BookSources/1234567890" rel="mw:WikiLink" data-parsoid='{"stx":"magiclink"}'>ISBN 1234567890</a></p>
22074 # Uppercase X and lowercase x as well
22085 <p><a href="/wiki/Special:BookSources/346204561X" class="internal mw-magiclink-isbn">ISBN 3-462-04561-X</a>
22086 <a href="/wiki/Special:BookSources/346204561X" class="internal mw-magiclink-isbn">ISBN 3-462-04561-x</a>
22087 <a href="/wiki/Special:BookSources/080442957X" class="internal mw-magiclink-isbn">ISBN 080442957X</a>
22088 <a href="/wiki/Special:BookSources/080442957X" class="internal mw-magiclink-isbn">ISBN 080442957x</a>
22089 <a href="/wiki/Special:BookSources/978080442957X" class="internal mw-magiclink-isbn">ISBN 978080442957X</a>
22090 <a href="/wiki/Special:BookSources/978080442957X" class="internal mw-magiclink-isbn">ISBN 978080442957x</a>
22093 <p><a href="./Special:BookSources/346204561X" rel="mw:WikiLink" data-parsoid='{"stx":"magiclink"}'>ISBN 3-462-04561-X</a>
22094 <a href="./Special:BookSources/346204561X" rel="mw:WikiLink" data-parsoid='{"stx":"magiclink"}'>ISBN 3-462-04561-x</a>
22095 <a href="./Special:BookSources/080442957X" rel="mw:WikiLink" data-parsoid='{"stx":"magiclink"}'>ISBN 080442957X</a>
22096 <a href="./Special:BookSources/080442957X" rel="mw:WikiLink" data-parsoid='{"stx":"magiclink"}'>ISBN 080442957x</a>
22097 <a href="./Special:BookSources/978080442957X" rel="mw:WikiLink" data-parsoid='{"stx":"magiclink"}'>ISBN 978080442957X</a>
22098 <a href="./Special:BookSources/978080442957X" rel="mw:WikiLink" data-parsoid='{"stx":"magiclink"}'>ISBN 978080442957x</a></p>
22102 ISBN with empty prefix (parsoid test)
22106 <p><a href="/wiki/Special:BookSources/1234567890" class="internal mw-magiclink-isbn">ISBN 1234567890</a>
22109 <p><a href="./Special:BookSources/1234567890" rel="mw:WikiLink">ISBN 1234567890</a></p>
22113 T24905: <abbr> followed by ISBN followed by </a>
22115 <abbr>(fr)</abbr> ISBN 2753300917 [http://www.example.com example.com]
22117 <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>
22120 <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>
22128 <p>RFC <a class="external mw-magiclink-rfc" rel="nofollow" href="https://tools.ietf.org/html/rfc1234">RFC 1234</a>
22131 <p>RFC <a href="https://tools.ietf.org/html/rfc1234" rel="mw:ExtLink" class="external mw-magiclink">RFC 1234</a></p>
22135 Double RFC with a wiki link
22139 <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>
22142 <p>RFC <a rel="mw:WikiLink" href="./RFC_1234" title="RFC 1234">RFC 1234</a></p>
22150 <p><a class="external mw-magiclink-rfc" rel="nofollow" href="https://tools.ietf.org/html/rfc983">RFC 983</a> 987
22153 <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>
22157 Centre-aligned image
22159 [[Image:foobar.jpg|centre]]
22161 <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>
22164 <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>
22170 [[Image:foobar.jpg|none]]
22172 <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>
22175 <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>
22179 Width + Height sized image (using px) (height is ignored)
22181 [[Image:foobar.jpg|640x480px]]
22183 <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>
22186 <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>
22190 Width-sized image (using px, no following whitespace)
22192 [[Image:foobar.jpg|640px]]
22194 <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>
22197 <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>
22201 Width-sized image (using px, with following whitespace - test regression from r39467)
22203 [[Image:foobar.jpg|640px ]]
22205 <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>
22208 <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>
22212 Width-sized image (using px, with preceding whitespace - test regression from r39467)
22214 [[Image:foobar.jpg| 640px]]
22216 <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>
22219 <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>
22223 Image with page parameter
22227 [[File:LoremIpsum.djvu|page=2]]
22229 <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>
22232 <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>
22236 Another italics / bold test
22244 # FIXME: The php output seems broken. It's interleaving some open/close tags.
22250 <dl><dd><dl><dt><dl><dt><dl><dt><dl><dd><dl><dd></dt></dl></dd></dl></dd></dl></dd></dl></dd></dl></dd></dl>
22253 <dl><dd><dl><dt><dl><dt><dl><dt><dl><dd><dl><dd></dd></dl></dd></dl></dt></dl></dt></dl></dt></dl></dd></dl>
22257 # Images with the "|" character in external URLs in comment tags; Eats half the comment, leaves unmatched "</a>" tag.
22259 Images with the "|" character in the comment
22261 [[File:Foobar.jpg|thumb|An [http://test/?param1=|left|¶m2=|x external] URL]]
22263 <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>
22266 <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>
22270 [Before] HTML without raw HTML enabled ($wgRawHtml==false)
22272 <html><script>alert(1);</script></html>
22274 <p><html><script>alert(1);</script></html>
22279 HTML with raw HTML ($wgRawHtml==true)
22283 <html><script>alert(1);</script></html>
22285 <p><script>alert(1);</script>
22288 <p><script typeof="mw:Extension/html" about="#mwt3" data-mw='{"name":"html","attrs":{},"body":{"extsrc":"<script>alert(1);</script>"}}'>alert(1);</script></p>
22292 Parents of subpages, one level up
22294 subpage title=[[Subpage test/L1/L2/L3]]
22298 <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>
22304 Parents of subpages, one level up, not named
22306 subpage title=[[Subpage test/L1/L2/L3]]
22310 <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>
22317 Parents of subpages, two levels up
22319 subpage title=[[Subpage test/L1/L2/L3]]
22325 <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
22326 </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>
22331 Parents of subpages, two levels up, without trailing slash or name.
22333 subpage title=[[Subpage test/L1/L2/L3]]
22342 Parents of subpages, two levels up, with lots of extra trailing slashes.
22344 subpage title=[[Subpage test/L1/L2/L3]]
22348 <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>
22353 Subpage test/L1/L2/L3Sibling
22359 Transclusion of a sibling page (one level up)
22361 subpage title=[[Subpage test/L1/L2/L3]]
22370 Transclusion of a child page
22372 subpage title=[[Subpage test/L1/L2]]
22380 # This is wt2html only in Parsoid because we add <nowiki>
22381 # because of {{..}} and we don't expect to fix that to
22382 # eliminate the nowikis selective for {{..}} markup.
22384 Non-transclusion because of too many up levels
22386 subpage title=[[Subpage test/L1/L2/L3]]
22389 {{../../../../More than parent}}
22391 <p>{{../../../../More than parent}}
22394 <p>{{../../../../More than parent}}</p>
22398 Definition list code coverage
22412 <dl><dt>title </dt><dd>def</dd>
22413 <dt>title </dt><dd>def</dd>
22414 <dt>title</dt><dd>def</dd></dl>
22418 Don't fall for the self-closing div
22420 <div>hello world</div/>
22422 <div>hello world</div>
22431 <p>[[:Template:Msg]]
22440 <p><a href="/index.php?title=Template:QUERTY&action=edit&redlink=1" class="new" title="Template:QUERTY (page does not exist)">Template:QUERTY</a>
22444 # This isn't needed for XHTML conformance, but would be handy as a fallback security measure
22446 Always escape literal '>' in output, not just after '<'
22460 <p>This is a test template
22461 This is a test template
22473 Inclusion of !userCanEdit() content
22477 <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>
22483 Out-of-order TOC heading levels
22492 <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>
22494 <li class="toclevel-1 tocsection-1"><a href="#2"><span class="tocnumber">1</span> <span class="toctext">2</span></a>
22496 <li class="toclevel-2 tocsection-2"><a href="#6"><span class="tocnumber">1.1</span> <span class="toctext">6</span></a></li>
22497 <li class="toclevel-2 tocsection-3"><a href="#3"><span class="tocnumber">1.2</span> <span class="toctext">3</span></a></li>
22500 <li class="toclevel-1 tocsection-4"><a href="#1"><span class="tocnumber">2</span> <span class="toctext">1</span></a>
22502 <li class="toclevel-2 tocsection-5"><a href="#5"><span class="tocnumber">2.1</span> <span class="toctext">5</span></a></li>
22503 <li class="toclevel-2 tocsection-6"><a href="#2_2"><span class="tocnumber">2.2</span> <span class="toctext">2</span></a></li>
22509 <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>
22510 <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>
22511 <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>
22512 <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>
22513 <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>
22514 <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>
22520 ISBN with a dummy number
22530 ISBN with space-delimited number
22534 <p><a href="/wiki/Special:BookSources/9290170328" class="internal mw-magiclink-isbn">ISBN 92 9017 032 8</a>
22537 <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>
22542 ISBN with multiple spaces, no number
22561 </p><p><a href="/wiki/Special:BookSources/1234567890" class="internal mw-magiclink-isbn">ISBN 1234567890</a>
22562 </p><p>ISBN 12345678901
22565 <p>ISBN 123456789</p>
22567 <p><a href="./Special:BookSources/1234567890" rel="mw:WikiLink" data-parsoid='{"stx":"magiclink"}'>ISBN 1234567890</a></p>
22569 <p>ISBN 12345678901</p>
22574 ISBN with trailing year (T9110)
22576 ISBN 1-234-56789-0 - 2006
22578 ISBN 1 234 56789 0 - 2006
22580 <p><a href="/wiki/Special:BookSources/1234567890" class="internal mw-magiclink-isbn">ISBN 1-234-56789-0</a> - 2006
22581 </p><p><a href="/wiki/Special:BookSources/1234567890" class="internal mw-magiclink-isbn">ISBN 1 234 56789 0</a> - 2006
22584 <p><a href="./Special:BookSources/1234567890" rel="mw:WikiLink" data-parsoid='{"stx":"magiclink"}'>ISBN 1-234-56789-0</a> - 2006</p>
22586 <p><a href="./Special:BookSources/1234567890" rel="mw:WikiLink" data-parsoid='{"stx":"magiclink"}'>ISBN 1 234 56789 0</a> - 2006</p>
22593 wgFragmentMode=[ 'html5', 'legacy' ]
22595 {{anchorencode:foo bar©#%n}}
22600 <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>
22604 anchorencode (legacy)
22606 wgFragmentMode=[ 'legacy' ]
22608 {{anchorencode:foo bar©#%n}}
22610 <p>foo_bar.C2.A9.23.25n
22615 anchorencode trims spaces
22617 wgFragmentMode=[ 'html5', 'legacy' ]
22619 {{anchorencode: __pretty__please__}}
22624 <p about="#mwt1" typeof="mw:Transclusion" data-mw='{"parts":[{"template":{"target":{"wt":"anchorencode: __pretty__please__","function":"anchorencode"},"params":{},"i":0}}]}'>pretty_please</p>
22628 anchorencode deals with links
22630 wgFragmentMode=[ 'html5', 'legacy' ]
22632 {{anchorencode: [[hello|world]] [[hi]]}}
22637 <p about="#mwt1" typeof="mw:Transclusion" data-mw='{"parts":[{"template":{"target":{"wt":"anchorencode: [[hello|world]] [[hi]]","function":"anchorencode"},"params":{},"i":0}}]}'>world_hi</p>
22641 anchorencode deals with templates
22643 wgFragmentMode=[ 'html5', 'legacy' ]
22645 {{anchorencode: {{Foo}} x}}
22650 <p about="#mwt2" typeof="mw:Transclusion" data-mw='{"parts":[{"template":{"target":{"wt":"anchorencode: {{Foo}} x","function":"anchorencode"},"params":{},"i":0}}]}'>FOO_x</p>
22654 anchorencode encodes like the TOC generator: (T20431)
22656 wgFragmentMode=[ 'html5', 'legacy' ]
22658 ===_ +:.3A%3A _ &&]] x===
22659 {{anchorencode: _ +:.3A%3A _ &&]] x}}
22662 <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>
22663 <p>+:.3A%3A_&&]]_x
22666 <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>
22667 <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>
22668 <meta property="mw:PageProp/noeditsection"/>
22672 anchorencode encodes like the TOC generator: (T20431) (legacy)
22674 wgFragmentMode=[ 'legacy' ]
22676 ===_ +:.3A%3A&&]]===
22677 {{anchorencode: _ +:.3A%3A&&]] }}
22680 <h3><span class="mw-headline" id=".2B:.3A.253A.26.26.5D.5D">_ +:.3A%3A&&]]</span></h3>
22681 <p>.2B:.3A.253A.26.26.5D.5D
22686 T8200: blockquotes and paragraph formatting
22707 T10293: Use of center tag ruins paragraph formatting
22728 Parsing of overlapping (improperly nested) inline html tags
22730 <span><s>x</span></s>
22732 <p><span><s>x</span></s></span>
22735 <p><span><s>x</s></span>
22740 ### Language variants related tests
22743 # Parsoid does not mark self-links.
22744 # Parsoid does not convert links; PHP will do any necessary redirects.
22747 Self-link in language variants
22749 title=[[Dunav]] language=sr
22751 Both [[Dunav]] and [[Дунав]] are names for this river.
22753 <p>Both <a class="mw-selflink selflink">Dunav</a> and <a class="mw-selflink selflink">Дунав</a> are names for this river.
22756 <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>
22766 Link to another existing title shouldn't be parsed as self-link even if it's a variant of this title
22768 title=[[Duna]] language=sr
22770 [[Дуна]] is not a self-link while [[Duna]] and [[Dуна]] are still self-links.
22772 <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.
22775 <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>
22779 Link to a section of a variant of this title shouldn't be parsed as self-link
22781 title=[[Duna]] language=sr
22783 [[Dуна]] is a self-link while [[Dunа#Foo]] and [[Dуна#Foo]] are not self-links.
22785 <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.
22788 <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>
22792 Link to pages in language variants
22796 Main Page can be written as [[Маин Паге]]
22798 <p>Main Page can be written as <a href="/wiki/Main_Page" title="Main Page">Маин Паге</a>
22801 <p>Main Page can be written as <a rel="mw:WikiLink" href="./Маин_Паге" title="Маин Паге">Маин Паге</a></p>
22806 Multiple links to pages in language variants
22810 [[Main Page]] can be written as [[Маин Паге]] same as [[Маин Паге]].
22812 <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>.
22815 <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>
22820 Simple template in language variants
22826 <p>This is a test template
22832 Template with explicit namespace in language variants
22838 <p>This is a test template
22844 Basic test for template parameter in language variants
22848 {{парамтест|param=foo}}
22850 <p>This is a test template with parameter foo
22855 Simple category in language variants
22859 [[Category:МедиаWики Усер'с Гуиде]]
22861 cat=МедиаWики_Усер'с_Гуиде sort=
22863 <link rel="mw:PageProp/Category" href="./Категорија:МедиаWики_Усер'с_Гуиде" data-parsoid='{"stx":"simple","a":{"href":"./Категорија:МедиаWики_Усер'с_Гуиде"},"sa":{"href":"Category:МедиаWики Усер'с Гуиде"}}'/>
22878 ## We used to, but no longer wt2wt this test since the default serializer
22879 ## will normalize all categories to serialize on their own line.
22880 ## This wikitext usage is going to be fairly uncommon in production and
22881 ## selser will take care of preserving formatting in those scenarios.
22883 Don't convert blue categorylinks to another variant (T35210)
22889 [[A]][[Category:分类]]
22893 <p><a rel="mw:WikiLink" href="./A" title="A">A</a></p>
22894 <link rel="mw:PageProp/Category" href="./Category:分类"/>
22898 Stripping -{}- tags (language variants)
22902 Latin proverb: -{Ne nuntium necare}-
22904 <p>Latin proverb: Ne nuntium necare
22907 <p>Latin proverb: <span typeof="mw:LanguageVariant" data-mw-variant='{"disabled":{"t":"Ne nuntium necare"}}'></span></p>
22912 Prevent conversion with -{}- tags (language variants)
22914 language=sr variant=sr-ec
22916 Latinski: -{Ne nuntium necare}-
22918 <p>Латински: Ne nuntium necare
22921 <p>Latinski: <span typeof="mw:LanguageVariant" data-mw-variant='{"disabled":{"t":"Ne nuntium necare"}}'></span></p>
22926 Prevent conversion of text with -{}- tags (language variants)
22928 language=sr variant=sr-ec
22930 Latinski: -{Ne nuntium necare}-
22932 <p>Латински: Ne nuntium necare
22935 <p>Latinski: <span typeof="mw:LanguageVariant" data-mw-variant='{"disabled":{"t":"Ne nuntium necare"}}'></span></p>
22940 Prevent conversion of links with -{}- tags (language variants)
22942 language=sr variant=sr-ec
22946 <p><a href="/wiki/Main_Page" title="Main Page">Main Page</a>
22949 <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>
22954 -{}- tags within headlines (within html for parserConvert())
22956 wgFragmentMode=[ 'html5', 'legacy' ]
22958 language=sr variant=sr-ec
22962 Note that even an unprotected headline ID is not affected by language
22967 <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>
22968 <p>Ноте тхат евен ан унпротецтед хеадлине ИД ис нот аффецтед бy лангуаге
22971 <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>
22974 <h2 id="-{Naslov}-"><span id="-.7BNaslov.7D-" typeof="mw:FallbackId"></span><span typeof="mw:LanguageVariant" data-mw-variant='{"disabled":{"t":"Naslov"}}'></span></h2>
22976 <p>Note that even an unprotected headline ID is not affected by language
22979 <h2 id="Latinski">Latinski</h2>
22983 Explicit definition of language variant alternatives
22985 language=zh variant=zh-tw
22987 -{zh:China;zh-tw:Taiwan}-, not China
22989 <p>Taiwan, not China
22992 <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>
22996 Filter syntax for language variants
22998 language=zh variant=zh-tw
23000 foo-{zh;zh-hans;zh-hant|blog, WEBJOURNAL, WEBLOG}-quux
23002 <p>fooblog, WEBJOURNAL, WEBLOGquux
23005 <p>foo<span typeof="mw:LanguageVariant" data-mw-variant='{"filter":{"l":["zh","zh-hans","zh-hant"],"t":"blog, WEBJOURNAL, WEBLOG"}}'></span>quux</p>
23008 # Note that Parsoid post-processing for language variants needs to
23009 # update the `title` attribute here, based on the mw:ExpandedAttrs property
23011 Conversion around HTML tags
23013 language=sr variant=sr-ec
23015 -{H|span=>sr-ec:script;title=>sr-ec:src}-
23016 <span title="La-{sr-el:L;sr-ec:C}-tin">ski</span>
23019 <span title="ЛаCтин">ски</span>
23022 <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"}]}'/>
23023 <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>
23027 Explicit session-wise two-way language variant mapping (A flag and - flag)
23029 language=zh variant=zh-tw
23031 This is -{zh:China; zh-tw:Taiwan}-, but we'll forget that now.
23033 Taiwan is not China.
23035 But -{A|zh:China; zh-tw:Taiwan}- is China,
23037 (This-{-|zh:China; zh-tw:Taiwan}- should be stripped!)
23039 and -{China}- is China.
23041 <p>This is Taiwan, but we'll forget that now.
23042 </p><p>Taiwan is not China.
23043 </p><p>But Taiwan is Taiwan,
23044 </p><p>(This should be stripped!)
23045 </p><p>and China is China.
23048 <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>
23049 <p>Taiwan is not China.</p>
23050 <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>
23051 <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>
23052 <p>and <span typeof="mw:LanguageVariant" data-mw-variant='{"disabled":{"t":"China"}}'></span> is China.</p>
23056 Explicit session-wise one-way language variant mapping (A flag and - flag)
23058 language=zh variant=zh-tw
23060 This is -{COUNTRY=>zh:China;COUNTRY=>zh-tw:Taiwan}-, but we'll forget that now.
23062 COUNTRY is China or Taiwan.
23064 But -{A|COUNTRY=>zh:China;COUNTRY=>zh-tw:Taiwan}- is COUNTRY,
23066 (This-{-|COUNTRY=>zh:China;COUNTRY=>zh-tw:Taiwan}- should be stripped!)
23068 and -{COUNTRY}- is COUNTRY.
23070 <p>This is Taiwan, but we'll forget that now.
23071 </p><p>COUNTRY is China or Taiwan.
23072 </p><p>But Taiwan is Taiwan,
23073 </p><p>(This should be stripped!)
23074 </p><p>and COUNTRY is COUNTRY.
23077 <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>
23078 <p>COUNTRY is China or Taiwan.</p>
23079 <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>
23080 <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>
23081 <p>and <span typeof="mw:LanguageVariant" data-mw-variant='{"disabled":{"t":"COUNTRY"}}'></span> is COUNTRY.</p>
23085 Explicit session-wise two-way language variant mapping (H flag for hide)
23087 language=zh variant=zh-tw
23089 (This-{H|zh:China;zh-tw:Taiwan}- should be stripped!)
23093 <p>(This should be stripped!)
23094 </p><p>Taiwan is Taiwan.
23097 <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>
23098 <p>Taiwan is China.</p>
23102 Explicit session-wise one-way language variant mapping (H flag for hide)
23104 language=zh variant=zh-tw
23106 (This-{H|COUNTRY=>zh:China;COUNTRY=>zh-tw:Taiwan}- should be stripped!)
23108 COUNTRY is Taiwan or China.
23110 <p>(This should be stripped!)
23111 </p><p>Taiwan is Taiwan or China.
23114 <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>
23115 <p>COUNTRY is Taiwan or China.</p>
23118 ## Note that parsoid test runner does not support 'showtitle' option.
23120 Adding explicit conversion rule for title (T flag)
23122 language=zh variant=zh-tw showtitle
23124 Should be stripped-{T|zh:China;zh-tw:Taiwan}-!
23129 <p>Should be stripped!
23130 </p><p>Taiwan is China.
23133 <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>
23134 <p>Taiwan is China.</p>
23138 Code coverage: T combined with H flag
23140 language=zh variant=zh-tw showtitle
23142 Should be stripped-{T;H|zh:China; zh-tw:Taiwan}-!
23147 <p>Should be stripped!
23148 </p><p>Taiwan is Taiwan.
23151 <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>
23152 <p>Taiwan is China.</p>
23156 Code coverage: T with no variants
23158 language=zh variant=zh-tw showtitle
23160 -{H|zh:China; zh-tw:Taiwan}-
23161 Taiwan is China.-{T|Taiwan is China}-
23168 <p><meta typeof="mw:LanguageVariant" data-mw-variant='{"add":true,"twoway":[{"l":"zh","t":"China"},{"l":"zh-tw","t":"Taiwan"}]}'/>
23169 Taiwan is China.<meta typeof="mw:LanguageVariant" data-mw-variant='{"disabled":{"t":"Taiwan is China"},"title":true}'/></p>
23173 Code coverage: rules with no variants
23175 language=zh variant=zh-tw
23177 -{H|zh:China; zh-tw:Taiwan}-
23188 <p><meta typeof="mw:LanguageVariant" data-mw-variant='{"add":true,"twoway":[{"l":"zh","t":"China"},{"l":"zh-tw","t":"Taiwan"}]}'/>
23190 <meta typeof="mw:LanguageVariant" data-mw-variant='{"add":true,"twoway":[{"l":"*","t":"China"}]}'/>
23191 Taiwan is China.</p>
23196 Code coverage: D flag for conversion rule
23198 language=zh variant=zh-tw
23200 -{D|zh-cn:XA; zh-tw:YA}-
23201 -{A;D|zh-cn:XB; zh-tw:YB}-
23202 -{D;H|zh-cn:XC; zh-tw:YC}-
23204 -{D;H|FOO=>zh-tw:BAR;FOO=>zh-cn:BAT}-
23210 XA XB XC YA YB YC FOO BAR BAT 012345
23215 </p><p>FOO⇒台灣:BAR;FOO⇒大陆:BAT;
23219 </p><p>XA YB YC YA YB YC BAR BAR BAT 013355
23222 <p><span typeof="mw:LanguageVariant" data-mw-variant='{"describe":true,"twoway":[{"l":"zh-cn","t":"XA"},{"l":"zh-tw","t":"YA"}]}'></span>
23223 <meta typeof="mw:LanguageVariant" data-mw-variant='{"add":true,"describe":true,"twoway":[{"l":"zh-cn","t":"XB"},{"l":"zh-tw","t":"YB"}]}'/>
23224 <span typeof="mw:LanguageVariant" data-mw-variant='{"add":true,"describe":true,"twoway":[{"l":"zh-cn","t":"XC"},{"l":"zh-tw","t":"YC"}]}'></span></p>
23225 <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>
23226 <p><span typeof="mw:LanguageVariant" data-mw-variant='{"describe":true,"oneway":[{"f":"0","l":"zh-tw","t":"1"}]}'></span>
23227 <meta typeof="mw:LanguageVariant" data-mw-variant='{"add":true,"describe":true,"oneway":[{"f":"2","l":"zh-tw","t":"3"}]}'/>
23228 <span typeof="mw:LanguageVariant" data-mw-variant='{"add":true,"describe":true,"oneway":[{"f":"4","l":"zh-tw","t":"5"}]}'></span></p>
23229 <p>XA XB XC YA YB YC FOO BAR BAT 012345</p>
23233 Code coverage: N flag for conversion rule
23235 language=zh variant=zh-cn
23245 </p><p>српски (ћирилица)
23248 <p><span typeof="mw:LanguageVariant" data-mw-variant='{"name":{"t":"zh-cn"}}'></span></p>
23249 <p><span typeof="mw:LanguageVariant" data-mw-variant='{"name":{"t":"zh-tw"}}'></span></p>
23250 <p><span typeof="mw:LanguageVariant" data-mw-variant='{"name":{"t":"sr-ec"}}'></span></p>
23253 # html2wt suppresses the bogus 'D' flag, so this is wt2html only
23255 Code coverage: N flag for conversion rule (wt2html only)
23257 language=zh variant=zh-cn
23258 parsoid=wt2html,html2html
23265 <p><span typeof="mw:LanguageVariant" data-mw-variant='{"name":{"t":"en"}}' data-parsoid='{"fl":["D","N"]}'></span></p>
23269 Testing that changing the language variant here in the tests actually works
23271 language=zh variant=zh showtitle
23273 Should be stripped-{T|zh:China; zh-tw:Taiwan}-!
23276 <p>Should be stripped!
23279 <p>Should be stripped<meta typeof="mw:LanguageVariant" data-mw-variant='{"title":true,"twoway":[{"l":"zh","t":"China"},{"l":"zh-tw","t":"Taiwan"}]}'/>!</p>
23283 Recursive conversion of alt and title attrs shouldn't clear converter state
23285 language=zh variant=zh-cn
23288 -{H|zh-cn:Exclamation; zh-tw:exclamation}-
23289 Should be stripped-{T|zh-cn:China; zh-tw:Taiwan}-<span title="exclamation">!</span>
23293 Should be stripped<span title="Exclamation">!</span>
23296 <p><meta typeof="mw:LanguageVariant" data-mw-variant='{"add":true,"twoway":[{"l":"zh-cn","t":"Exclamation"},{"l":"zh-tw","t":"exclamation"}]}'/>
23297 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>
23301 T26072: more test on conversion rule for title
23303 language=zh variant=zh-tw showtitle
23305 This should be stripped-{T|zh:China; zh-tw:Taiwan}-!
23307 This won't take interferes with the title rule-{H|zh:Beijing; zh-tw:Taipei}-.
23310 <p>This should be stripped!
23311 </p><p>This won't take interferes with the title rule.
23314 <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>
23315 <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>
23319 Partly disable title conversion if variant == main language code
23321 language=zh variant=zh title=[[ZH]] showtitle
23323 -{T|zh-cn:CN;zh-tw:TW}-
23329 <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>
23333 Partly disable title conversion if variant == main language code, more
23335 language=zh variant=zh title=[[ZH]] showtitle
23343 <p><meta typeof="mw:LanguageVariant" data-mw-variant='{"disabled":{"t":"TW"},"title":true}'/></p>
23347 Raw output of variant escape tags (R flag)
23349 language=zh variant=zh-tw
23351 Raw: -{R|zh:China;zh-tw:Taiwan}-
23353 <p>Raw: zh:China;zh-tw:Taiwan
23356 <p>Raw: <span typeof="mw:LanguageVariant" data-mw-variant='{"disabled":{"t":"zh:China;zh-tw:Taiwan"}}'></span></p>
23359 # html2wt suppresses the bogus 'D' flags, so this is wt2html only
23361 Raw output of variant escape tags (R flag) (wt2html only)
23363 language=zh variant=zh-tw
23364 parsoid=wt2html,html2html
23366 -{Variant}- -{D|syntax}- -{D;R|options}-
23368 <p>Variant syntax options
23371 <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>
23375 Nested markup inside raw output of variant escape tags (R flag)
23377 language=zh variant=zh-tw
23379 Nested raw: -{R|nested -{zh:China;zh-tw:Taiwan}- nested}-
23381 <p>Nested raw: nested Taiwan nested
23384 <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>
23388 Nested markup and spaces inside raw output of variant escape tags (R flag)
23390 language=zh variant=zh-tw
23392 X-{ outer -{ inner }- outer }-X
23394 <p>X outer inner outer X
23397 <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>
23401 Templates inside raw output of variant escape tags (R flag)
23403 language=zh variant=zh-tw
23405 Nested raw: -{R|nested {{echo|hi}} templates}-
23407 <p>Nested raw: nested hi templates
23410 <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>
23414 Strings evaluating false shouldn't be ignored by Language converter (T51072)
23416 language=zh variant=zh-cn
23418 -{zh-cn:0;zh-sg:1;zh-tw:2;zh-hk:3}-
23423 <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>
23427 Conversion rules from [numeric-only string] to [something else] (T48634)
23429 language=zh variant=zh-cn
23431 -{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
23436 <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>
23440 Two-way converter rule entries with an empty value should be ignored (T53551)
23442 language=zh variant=zh-cn
23444 -{H|zh-cn:foo;zh-tw:;}-foobar
23449 <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>
23453 One-way converter rule entries with an empty "from" string should be ignored (T53551)
23455 language=zh variant=zh-cn
23457 -{H|=>zh-cn:foo;}-foobar
23462 <p><meta typeof="mw:LanguageVariant" data-parsoid='{"tSp":[5]}' data-mw-variant='{"add":true,"oneway":[{"f":"","l":"zh-cn","t":"foo"}]}'/>foobar</p>
23466 Empty converter rule entries shouldn't be inserted into the conversion table (T53551)
23468 language=zh variant=zh-cn
23475 <p><meta typeof="mw:LanguageVariant" data-mw-variant='{"add":true,"twoway":[{"l":"*","t":""}]}'/>foobar</p>
23479 Nested using of manual convert syntax
23481 language=zh variant=zh-hk
23483 Nested: -{zh-hans:Hi -{zh-cn:China;zh-sg:Singapore;}-;zh-hant:Hello -{zh-tw:Taiwan;zh-hk:H-{ong}- K-{}-ong;}-;}-!
23485 <p>Nested: Hello Hong Kong!
23488 <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>
23492 HTML markups with conversion syntax in attribs, nested in other conversion blocks
23494 language=zh variant=zh-cn
23496 -{zh;zh-hans;zh-hant|<span title="-{X}-">A</span>}-
23498 <p><span title="X">A</span>
23501 <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>
23505 HTML markups with conversion syntax in attribs, nested in other conversion blocks (not working yet in PHP parser)
23507 language=zh variant=zh-cn
23509 -{<span title="-{X}-">A</span>}-
23510 !! html/php+disabled
23511 <p><span title="X">A</span>
23514 <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>
23517 # Parsoid and PHP disagree on how to parse this example: Parsoid
23518 # insists that the content of a language converter element be a valid
23519 # DOM fragment or attribute string
23521 Language converter markup with block content
23523 language=zh variant=zh-cn
23525 <span>a-{b<div>c}-d
23527 <span>a-{zh;zh-hans;zh-hant|b<div>c}-d
23529 <span>a-{H|0=>zh-cn:x<span>y;0=>zh-tw:b<div>c}-d
23534 </span></div></span></div></span>
23536 <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
23538 <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
23540 <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>
23544 LanguageConverter selser (1)
23546 language=zh variant=zh-cn
23548 "modes": ["wt2wt", "selser"],
23550 ["span[typeof]", "attr", "data-mw-variant", "{\"disabled\":{\"t\":\"edited\"}}"]
23560 LanguageConverter selser (2)
23562 language=zh variant=zh-cn
23564 "modes": ["wt2wt", "selser"],
23566 ["span[class='x']", "contents", "text", "-{foo}-"],
23567 ["a", "contents", "text", "-{"],
23568 ["span[typeof]", "attr", "data-mw", "{\"parts\":[{\"template\":{\"target\":{\"wt\":\"1x\",\"href\":\"./Template:1x\"},\"params\":{\"1\":{\"wt\":\"-{\"}},\"i\":0}}]}"]
23572 <span class="x">TEXT1</span>
23573 [http://example.com TEXT2]
23577 <span class="x"><nowiki>-{foo}-</nowiki></span>
23578 [http://example.com -{]
23579 [[Foo|<nowiki>-{</nowiki>]]
23580 {{1x|<nowiki>-{</nowiki>}}
23583 # Tests LanguageVariantText in ConstrainedText
23585 LanguageConverter selser (3)
23587 language=zh variant=zh-cn
23589 "modes": ["wt2wt", "selser"],
23591 ["td > span", "attr", "typeof", "mw:LanguageVariant"],
23592 ["td > span", "attr", "data-mw-variant", "{\"disabled\":{\"t\":\"edited\"}}"]
23603 |<nowiki/>-{edited}-
23607 # Tests LanguageVariantText._fromSelSer
23609 LanguageConverter selser (4)
23611 language=zh variant=zh-cn
23613 "modes": ["wt2wt", "selser"],
23615 ["td > span.x", "remove"]
23621 |<span class="x">Foo</span>-{Bar}-
23622 ||<span class="x">Foo</span>-{Bar}-
23632 # Since Parsoid is starting to emit canonical wikitext for links,
23633 # [http://example.com http://example.com] will not RT back to that
23635 # Parsoid does not language-convert links (it is done in a
23636 # post-processing step)
23638 Proper conversion of text in external links
23640 language=sr variant=sr-ec
23643 http://www.google.com
23644 gopher://www.google.com
23645 [http://www.google.com http://www.google.com]
23646 [gopher://www.google.com gopher://www.google.com]
23647 [https://www.google.com irc://www.google.com]
23648 [ftp://www.google.com www.google.com/ftp://dir]
23649 [//www.google.com www.google.com]
23651 <p><a rel="nofollow" class="external free" href="http://www.google.com">http://www.google.com</a>
23652 <a rel="nofollow" class="external free" href="gopher://www.google.com">gopher://www.google.com</a>
23653 <a rel="nofollow" class="external text" href="http://www.google.com">http://www.google.com</a>
23654 <a rel="nofollow" class="external text" href="gopher://www.google.com">gopher://www.google.com</a>
23655 <a rel="nofollow" class="external text" href="https://www.google.com">irc://www.google.com</a>
23656 <a rel="nofollow" class="external text" href="ftp://www.google.com">www.гоогле.цом/фтп://дир</a>
23657 <a rel="nofollow" class="external text" href="//www.google.com">www.гоогле.цом</a>
23660 <p><a rel="mw:ExtLink" class="external free" href="http://www.google.com">http://www.google.com</a>
23661 <a rel="mw:ExtLink" class="external free" href="gopher://www.google.com">gopher://www.google.com</a>
23662 <a rel="mw:ExtLink" class="external text" href="http://www.google.com">http://www.google.com</a>
23663 <a rel="mw:ExtLink" class="external text" href="gopher://www.google.com">gopher://www.google.com</a>
23664 <a rel="mw:ExtLink" class="external text" href="https://www.google.com">irc://www.google.com</a>
23665 <a rel="mw:ExtLink" class="external text" href="ftp://www.google.com">www.google.com/ftp://dir</a>
23666 <a rel="mw:ExtLink" class="external text" href="//www.google.com">www.google.com</a></p>
23670 Do not convert roman numbers to language variants
23672 language=sr variant=sr-ec
23676 <p>Фридрих IV је цар.
23679 <p>Fridrih IV je car.</p>
23683 Unclosed language converter markup "-{"
23694 Don't convert raw rule "-{R|=>}-" to "=>"
23703 <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>
23707 Don't break link parsing if language converter markup is in the caption.
23709 language=sr variant=sr-ec
23711 [[Main Page|-{R|main page}-]]
23713 <p><a href="/wiki/Main_Page" title="Маин Паге">main page</a>
23716 <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>
23720 T146304: Don't break template parsing if language converter markup is in the parameter.
23722 language=sr variant=sr-ec
23729 <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>
23733 T146305: Don't break image parsing if language converter markup is in the caption.
23737 [[Датотека:Foobar.jpg|thumb|-{R|caption:}-]]
23739 <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>
23742 <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>
23746 T146305: Don't break image parsing if nested language converter markup is in the caption.
23748 language=zh variant=zh-cn
23750 [[File:Foobar.jpg|thumb|-{|zh-cn:blog (hk: -{zh-hans|WEBJOURNAL}-, tw: -{zh-hans|WEBLOG}-)}-]]
23752 <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>
23755 <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>
23758 # XXX html2wt disabled because rich markup in alt is not preserved.
23760 Don't break gallery if language converter markup is inside.
23765 File:foobar.jpg|[[File:foobar.jpg|20px|desc|alt=-{R|foo}-|-{R|bar}-]]|alt=-{R|bat}-
23766 File:foobar.jpg|{{Test|unamedParam|alt=-{R|param}-}}|alt=galleryalt
23769 <ul class="gallery mw-gallery-traditional">
23770 <li class="gallerybox" style="width: 155px"><div style="width: 155px">
23771 <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>
23772 <div class="gallerytext">
23773 <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>
23777 <li class="gallerybox" style="width: 155px"><div style="width: 155px">
23778 <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>
23779 <div class="gallerytext">
23780 <p>This is a test template
23787 <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"}}'>
23788 <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>
23789 <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>
23794 T153135: Don't break list handling if language converter markup is in the item.
23796 language=zh variant=zh-cn
23798 ;-{zh-cn:AAA;zh-tw:BBB}-
23802 <dt>foo:bar</dt></dl>
23805 <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>
23806 <dt data-parsoid='{"dsr":[25,39,1,0]}'><span typeof="mw:LanguageVariant" data-mw-variant='{"disabled":{"t":"foo:bar"}}'></span></dt>
23810 // Note that parsoid does not protect colons unless language converter
23811 // markup is properly nested, because it is a backtracking parser.
23813 T153135: Unclosed markup in definition list (code coverage)
23815 language=zh variant=zh-cn
23820 <dl><dt><b>foo:bar</b></dt><b>
23821 <dt>-{zh-cn:AAA</dt></b></dl><p><b>
23824 <dl><dt data-parsoid='{}'><b data-parsoid='{"stx":"html","autoInsertedEnd":true}'>foo:bar</b></dt><b data-parsoid='{"stx":"html","autoInsertedEnd":true,"autoInsertedStart":true}'>
23825 <dt data-parsoid='{}'>-{zh-cn</dt><dd data-parsoid='{"stx":"row"}'>AAA</dd></b></dl>
23829 T153135: Nested language converter markup in definition list (code coverage)
23831 language=zh variant=zh-cn
23833 ;-{|zh-cn:AAA -{zh-hans|foo:bar}- -{R|bat:baz}-}-:def
23835 <dl><dt>AAA foo:bar bat:baz</dt>
23839 <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>
23840 <dd data-parsoid='{"stx":"row","dsr":[49,53,1,0]}'>def</dd>
23844 # html2wt mode disabled due to <nowiki> insertion.
23846 T153140: Don't break table handling if language converter markup is in the cell.
23848 language=sr variant=sr-ec
23849 parsoid=wt2html,wt2wt,html2html
23866 <td><span typeof="mw:LanguageVariant" data-mw-variant='{"disabled":{"t":"B"}}'></span></td>
23873 Language converter tricky html2wt cases (1)
23876 parsoid=html2wt,wt2wt
23878 <p><span typeof="mw:LanguageVariant" data-mw-variant='{"disabled":{"t":"}-"}}'></span></p>
23880 -{<nowiki>}-</nowiki>}-
23887 Language converter tricky html2wt cases (2)
23890 parsoid=html2wt,wt2wt
23894 <nowiki>-{foo}-</nowiki>
23896 <p>-{foo}-
23901 Language converter tricky html2wt cases (3)
23904 parsoid=html2wt,wt2wt
23906 <p><span typeof="mw:LanguageVariant" data-mw-variant='{"disabled":{"t":"|"}}'></span></p>
23907 <p><span typeof="mw:LanguageVariant" data-mw-variant='{"disabled":{"t":"R|raw"}}'></span></p>
23908 <p><span typeof="mw:LanguageVariant" data-mw-variant='{"disabled":{"t":"-{foo}-"}}'></span></p>
23914 -{<nowiki>-{foo}-</nowiki>}-
23918 </p><p>-{foo}-
23923 Language converter tricky html2wt cases (4)
23926 parsoid=html2wt,wt2wt
23928 <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>
23936 # Note that the <nowiki> escaping added by parsoid for source text,
23937 # destination text, and language names only works on the PHP side
23938 # for *destination text*. (HTML entity escaping wouldn't work
23939 # any better.) This is probably a bug, at least for source texts.
23940 # (For language names PHP uses a precise regexp based on the languages
23941 # it currently knows have variants, which is fragile since this set
23942 # can grow/shrink over time.)
23944 Language converter tricky html2wt cases (5)
23946 language=zh variant=zh-cn
23948 <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>
23949 <p><meta typeof="mw:LanguageVariant" data-mw-variant='{"add":true,"oneway":[{"f":"A","l":"bo:g;us","t":"B"}]}'/></p>
23950 <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>
23951 <p><span typeof="mw:LanguageVariant" data-mw-variant='{"twoway":[{"l":"bo:g;us","t":"xyz"},{"l":"zh-cn","t":"abc"}]}'></span></p>
23954 -{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
23956 -{H|A=><nowiki>bo:g;us</nowiki>:B}-
23958 -{A|zh-tw:xyz; zh-cn:<nowiki>0;zh-tw:bar</nowiki>}-
23960 -{<nowiki>bo:g;us</nowiki>:xyz; zh-cn:abc}-
23963 !! html/php+disabled
23964 <p>foobat;xyz=>zh-cn:abc
23968 </p><p>a:b=>c 0;zh-tw:bar
23973 T179579: Nowiki and lc interaction
23980 -{123<nowiki>|</nowiki>456}-
23982 <p><span typeof="mw:LanguageVariant" data-mw-variant='{"disabled":{"t":"&lt;/nowiki>123"}}' data-parsoid='{"fl":[],"src":"-{</nowiki>123}-"}'></span></p>
23984 <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>
23988 T2529: Uncovered bullet
23998 T2529: Uncovered bullet in a deeply nested list
24000 *******Foo {{bullet}}
24002 <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>
24008 T2529: Uncovered table already at line-start
24031 T2529: Uncovered bullet in parser function result
24033 *Foo {{lc:{{bullet}} }}
24041 T7678: Double-parsed template argument
24043 {{lc:{{{1}}}|hello}}
24050 T7678: Double-parsed template invocation
24052 {{lc:{{paramtest {{!}} param = hello }} }}
24054 <p>{{paramtest | param = hello }}
24059 Case insensitivity of parser functions for non-ASCII characters (T10143)
24062 title=[[Main Page]]
24064 {{PRVNÍVELKÉ:ěščř}}
24065 {{prvnívelké:ěščř}}
24085 Morwen/13: Unclosed link followed by heading
24092 <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>
24097 HHP2.1: Heuristics for headings in preprocessor parenthetical structures
24104 <h1><span class="mw-headline" id="heading">heading</span></h1>
24109 HHP2.2: Heuristics for headings in preprocessor parenthetical structures
24116 <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>
24131 Paragraphs inside divs (no extra line breaks)
24143 Paragraphs inside divs (extra line break on open)
24158 Paragraphs inside divs (extra line break on close)
24173 Paragraphs inside divs (extra line break on open and close)
24189 # doBlockLevels screws up this output and Remex cleans up as much as it can.
24191 Nesting tags, paragraphs on lines which begin with <div>
24193 <div></div><strong>A
24196 <div></div><p><strong>A
24197 </strong></p><strong></strong><p><strong>B</strong>
24200 <div data-parsoid='{"stx":"html"}'></div><p><strong data-parsoid='{"stx":"html","autoInsertedEnd":true}'>A</strong></p>
24201 <p><strong data-parsoid='{"stx":"html","autoInsertedStart":true}'>B</strong></p>
24204 # T8200: <blockquote> should behave like <div> with respect to line breaks
24206 T8200: paragraphs inside blockquotes (no extra line breaks)
24208 <blockquote>Line one
24210 Line two</blockquote>
24212 <blockquote>Line one
24213 Line two</blockquote>
24216 <blockquote><p>Line one
24217 Line two</p></blockquote>
24221 T8200: paragraphs inside blockquotes (extra line break on open)
24226 Line two</blockquote>
24231 Line two</blockquote>
24237 Line two</p></blockquote>
24241 T8200: paragraphs inside blockquotes (extra line break on close)
24243 <blockquote>Line one
24248 <blockquote>Line one
24254 <blockquote><p>Line one
24261 T8200: paragraphs inside blockquotes (extra line break on open and close)
24277 ## This is a corner case interaction between the paragraph wrapping in the
24278 ## php parser's BlockLevelPass and Remex. `doBlockLevels` has a notion of
24279 ## some tags which close paragraphs (and thus prevent wrapping on their line),
24280 ## of which "div" is one, but do p-wrapping inside them. These are referred
24281 ## to as "never suppressing". Remex, for its part, doesn't traverse into
24282 ## "div"s to p-wrap. Hence, we only get this partial wrapping.
24284 Paragraphs inside blockquotes/divs (no extra line breaks)
24286 <blockquote><div>Line one
24288 Line two</div></blockquote>
24290 <blockquote><div>Line one
24291 Line two</div></blockquote>
24296 Paragraphs inside blockquotes/divs (extra line break on open)
24301 Line two</div></blockquote>
24306 Line two</div></blockquote>
24311 Paragraphs inside blockquotes/divs (extra line break on close)
24313 <blockquote><div>Line one
24316 </div></blockquote>
24318 <blockquote><div>Line one
24321 </div></blockquote>
24326 Paragraphs inside blockquotes/divs (extra line break on open and close)
24332 </div></blockquote>
24338 </div></blockquote>
24343 Interwiki links trounced by replaceExternalLinks after early LinkHolderArray expansion
24345 wgLinkHolderBatchSize=0
24351 <p><a href="http://www.usemod.com/cgi-bin/mb.pl?1" class="extiw" title="meatball:1">meatball:1</a>
24352 <a href="http://www.usemod.com/cgi-bin/mb.pl?2" class="extiw" title="meatball:2">meatball:2</a>
24353 <a href="http://www.usemod.com/cgi-bin/mb.pl?3" class="extiw" title="meatball:3">meatball:3</a>
24358 Free external link invading image caption
24360 [[Image:Foobar.jpg|thumb|http://x|hello]]
24362 <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>
24365 <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>
24369 T17196: localised external link numbers
24373 [http://en.wikipedia.org/]
24375 <p><a rel="nofollow" class="external autonumber" href="http://en.wikipedia.org/">[۱]</a>
24378 <p><a rel="mw:ExtLink" class="external autonumber" href="http://en.wikipedia.org/"></a></p>
24382 Multibyte character in padleft
24384 {{padleft:-Hello|7|Æ}}
24389 <p typeof="mw:Transclusion" data-mw='{"parts":[{"template":{"target":{"wt":"padleft:-Hello","function":"padleft"},"params":{"1":{"wt":"7"},"2":{"wt":"Æ"}},"i":0}}]}'>Æ-Hello</p>
24393 Multibyte character in padright
24395 {{padright:Hello-|7|Æ}}
24400 <p typeof="mw:Transclusion" data-mw='{"parts":[{"template":{"target":{"wt":"padright:Hello-","function":"padright"},"params":{"1":{"wt":"7"},"2":{"wt":"Æ"}},"i":0}}]}'>Hello-Æ</p>
24404 formatdate parser function
24406 {{#formatdate:2009-03-24}}
24408 <p><span class="mw-formatted-date" title="2009-03-24">2009-03-24</span>
24413 formatdate parser function, with default format
24415 {{#formatdate:2009-03-24|mdy}}
24417 <p><span class="mw-formatted-date" title="2009-03-24">March 24, 2009</span>
24422 Spacing of numbers in formatted dates
24424 {{#formatdate:January 15}}
24426 <p><span class="mw-formatted-date" title="01-15">January 15</span>
24431 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
24433 language=nl title=[[MediaWiki:Common.css]]
24435 {{#formatdate:2009-03-24|dmy}}
24437 <p><span class="mw-formatted-date" title="2009-03-24">24 March 2009</span>
24450 Edit comment with link
24454 I like the [[Main Page]] a lot
24456 I like the <a href="/wiki/Main_Page" title="Main Page">Main Page</a> a lot
24460 Edit comment with link and link text
24464 I like the [[Main Page|best pages]] a lot
24466 I like the <a href="/wiki/Main_Page" title="Main Page">best pages</a> a lot
24470 Edit comment with link and link text with suffix
24474 I like the [[Main Page|best page]]s a lot
24476 I like the <a href="/wiki/Main_Page" title="Main Page">best pages</a> a lot
24480 Edit comment with section link (non-local, eg in history list)
24482 comment title=[[Main Page]]
24484 /* External links */ removed bogus entries
24486 <a href="/wiki/Main_Page#External_links" title="Main Page">→External links</a><span dir="auto"><span class="autocomment">: </span> removed bogus entries</span>
24490 Edit comment with section link and text before it (non-local, eg in history list)
24492 comment title=[[Main Page]]
24494 pre-comment text /* External links */ removed bogus entries
24496 pre-comment text <a href="/wiki/Main_Page#External_links" title="Main Page">→External links</a><span dir="auto"><span class="autocomment">: </span> removed bogus entries</span>
24500 Edit comment with section link (local, eg in diff view)
24502 comment local title=[[Main Page]]
24504 /* External links */ removed bogus entries
24506 <a href="#External_links">→External links</a><span dir="auto"><span class="autocomment">: </span> removed bogus entries</span>
24510 Edit comment with subpage link (T16080)
24514 title=[[Subpage test]]
24516 Poked at a [[/subpage]] here...
24518 Poked at a <a href="/wiki/Subpage_test/subpage" title="Subpage test/subpage">/subpage</a> here...
24522 Edit comment with subpage link and link text (T16080)
24526 title=[[Subpage test]]
24528 Poked at a [[/subpage|neat little page]] here...
24530 Poked at a <a href="/wiki/Subpage_test/subpage" title="Subpage test/subpage">neat little page</a> here...
24534 Edit comment with bogus subpage link in non-subpage NS (T16080)
24537 title=[[Subpage test]]
24539 Poked at a [[/subpage]] here...
24541 Poked at a <a href="/index.php?title=/subpage&action=edit&redlink=1" class="new" title="/subpage (page does not exist)">/subpage</a> here...
24545 Edit comment with bare anchor link (local, as on diff)
24549 title=[[Main Page]]
24553 <a href="#section">#section</a>
24557 Edit comment with bare anchor link (non-local, as on history)
24560 title=[[Main Page]]
24564 <a href="/wiki/Main_Page#section" title="Main Page">#section</a>
24568 Anchor starting with underscore
24574 <p><a href="#_ref">One</a>
24577 <p><a rel="mw:WikiLink" href="./Foo#_ref" data-parsoid='{"stx":"piped","a":{"href":"./Foo#_ref"},"sa":{"href":"#_ref"}}'>One</a></p>
24581 Id starting with underscore
24583 <div id="_ref"></div>
24585 <div id="_ref"></div>
24590 Edit comment with link with more than one pipe (T99346)
24594 [[Main Page|Many|pipes]]
24596 <a href="/wiki/Main_Page" title="Main Page">Many|pipes</a>
24600 Complex edit comment with link with more than one pipe (T99346)
24604 Created page with "<noinclude>[[Category:Requests for permissions/Bot|{{subst:#titleparts:{{subst:PAGENAME}}|1|3}}]]</noinclude> === [[User:MineoBot|]] 8=== {{Request for permissions/links|Mineo..."
24606 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..."
24610 Space normalisation on autocomment (T24784)
24613 title=[[Main Page]]
24615 /* __hello__world__ */
24617 <a href="/wiki/Main_Page#hello_world" title="Main Page">→__hello__world__</a>
24621 percent-encoding and + signs in comments (T28410)
24625 [[ABC%33D% ++]] [[ABC%33D% ++|+%20]]
24627 <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>
24630 # Parsoid doesn't support this yet: see T75581
24631 # but it *should* omit the 'src' attribute if the image is bad.
24632 # PHP side of tests was disabled in
24633 # mediawiki/core:6bd31e7d95161a6e88fa86df60871051da997c3c
24634 # because of issues in the PHP parserTests infrastructure
24635 # (but the output below is indeed what the PHP side emits)
24637 Bad images - basic functionality
24640 !! html/php+disabled
24642 <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>
24646 Bad images - T18039: text after bad image disappears
24651 !! html/php+disabled
24657 <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>
24662 Verify that displaytitle works (T24501) no displaytitle
24666 wgAllowDisplayTitle=true
24667 wgRestrictDisplayTitle=false
24669 this is not the the title
24672 <p>this is not the the title
24677 Verify that displaytitle works (T24501) RestrictDisplayTitle=false
24682 wgAllowDisplayTitle=true
24683 wgRestrictDisplayTitle=false
24685 this is not the the title
24686 {{DISPLAYTITLE:whatever}}
24689 <p>this is not the the title
24694 Verify that displaytitle works (T24501) RestrictDisplayTitle=true mismatch
24699 wgAllowDisplayTitle=true
24700 wgRestrictDisplayTitle=true
24702 this is not the the title
24703 {{DISPLAYTITLE:whatever}}
24706 <p>this is not the the title
24711 Verify that displaytitle works (T24501) RestrictDisplayTitle=true matching
24716 wgAllowDisplayTitle=true
24717 wgRestrictDisplayTitle=true
24719 this is not the the title
24720 {{DISPLAYTITLE:screen}}
24723 <p>this is not the the title
24728 Verify that displaytitle works (T24501) AllowDisplayTitle=false
24733 wgAllowDisplayTitle=false
24735 this is not the the title
24736 {{DISPLAYTITLE:screen}}
24739 <p>this is not the the title
24740 <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>
24745 Verify that displaytitle works (T24501) AllowDisplayTitle=false no DISPLAYTITLE
24750 wgAllowDisplayTitle=false
24752 this is not the the title
24755 <p>this is not the the title
24760 Verify that displaytitle handles inline CSS styles (T28547) - rejected value
24765 wgAllowDisplayTitle=true
24766 wgRestrictDisplayTitle=true
24768 this is not the the title
24769 {{DISPLAYTITLE:<span style="display: none;">s</span>creen}}
24771 <span style="/* attempt to bypass $wgRestrictDisplayTitle */">s</span>creen
24772 <p>this is not the the title
24777 Verify that displaytitle handles inline CSS styles (T28547) - accepted value
24782 wgAllowDisplayTitle=true
24783 wgRestrictDisplayTitle=true
24785 this is not the the title
24786 {{DISPLAYTITLE:<span style="color: red;">s</span>creen}}
24788 <span style="color: red;">s</span>creen
24789 <p>this is not the the title
24794 Page status indicators: Empty name is invalid
24798 <indicator name=" "></indicator>
24799 <indicator></indicator>
24801 <p><span class="error"><strong>Error:</strong> Page status indicators' <code>name</code> attribute must not be empty.</span>
24802 <span class="error"><strong>Error:</strong> Page status indicators' <code>name</code> attribute must not be empty.</span>
24807 Page status indicators: Weird syntaxes that are okay
24811 <indicator name="empty" />
24812 <indicator name="name"></indicator>
24821 Page status indicators: Torture test
24825 <indicator name="01">hello world</indicator>
24826 <indicator name="02">[[Main Page]]</indicator>
24827 <indicator name="03">[[File:Foobar.jpg|25px|link=]]</indicator>
24828 <indicator name="04">[[File:Foobar.jpg|25px]]</indicator>
24829 <indicator name="05">*foo
24831 <indicator name="06"><nowiki>foo</nowiki></indicator>
24832 <indicator name="07"> Preformatted</indicator>
24833 <indicator name="08"><div>Broken tag</indicator>
24834 <indicator name="09">{| class=wikitable
24837 <indicator name="10">Two
24839 paragraphs</indicator>
24842 02=<a href="/wiki/Main_Page" title="Main Page">Main Page</a>
24843 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" />
24844 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>
24845 05=<ul><li>foo</li>
24849 07=<pre>Preformatted
24851 08=<div>Broken tag</div>
24853 09=<table class="wikitable">
24870 preload: check <noinclude> and <includeonly>
24874 Hello <noinclude>cruel</noinclude><includeonly>kind</includeonly> world.
24880 preload: check <onlyinclude>
24884 Goodbye <onlyinclude>Hello world</onlyinclude>
24890 preload: can pass tags through if we want to
24894 <includeonly><</includeonly>includeonly>Hello world<includeonly><</includeonly>/includeonly>
24896 <includeonly>Hello world</includeonly>
24900 preload: check that it doesn't try to do tricks
24904 * <!-- Hello --> ''{{world}}'' {{<includeonly>subst:</includeonly>How are you}}{{ {{{|safesubst:}}} #if:1|2|3}}
24906 * <!-- Hello --> ''{{world}}'' {{subst:How are you}}{{ {{{|safesubst:}}} #if:1|2|3}}
24910 Play a bit with r67090 and T5158
24912 <div style="width:50% !important"> </div>
24913 <div style="width:50% !important"> </div>
24914 <div style="width:50% !important"> </div>
24915 <div style="border : solid;"> </div>
24917 <div style="width:50% !important"> </div>
24918 <div style="width:50% !important"> </div>
24919 <div style="width:50% !important"> </div>
24920 <div style="border : solid;"> </div>
24923 <div style="width:50% !important" data-parsoid='{"stx":"html"}'><span typeof="mw:Entity" data-parsoid='{"srcContent":" "}'> </span></div>
24924 <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>
24925 <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>
24926 <div style="border : solid;" data-parsoid='{"stx":"html"}'><span typeof="mw:Entity" data-parsoid='{"srcContent":" "}'> </span></div>
24931 French spaces in wikitext
24933 foo ! bar ? bat 50 % is less than 75 %.
24935 Hello : this ; is « something ‹ else › again »
24937 <p>foo ! bar ? bat 50 % is less than 75 %.
24938 </p><p>Hello : this ; is « something ‹ else › again »
24942 # It would be reasonable for Parsoid and PHP to differ here.
24943 # The PHP behavior is arguably a bug.
24945 Corner case: french spaces in definition list
24949 <dl><dt>foo </dt>
24954 T5158: Test for French spaces in attributes
24956 <br style=" clear : both ; " />
24958 <p><br style="clear : both ;" />
24963 HTML5 data attributes
24965 <span data-foo="bar">Baz</span>
24966 <p data-abc-def_hij="">Quuz</p>
24968 <p><span data-foo="bar">Baz</span>
24970 <p data-abc-def_hij="">Quuz</p>
24973 <p><span data-foo="bar" data-parsoid='{"stx":"html"}'>Baz</span></p>
24974 <p data-abc-def_hij="" data-parsoid='{"stx":"html"}'>Quuz</p>
24978 Strip reserved data attributes
24980 <div data-mw="foo" data-parsoid="bar" data-mw-someext="baz" data-ok="fred" data-ooui="xyzzy" data-bad:ns="ns">d</div>
24982 <div data-ok="fred">d</div>
24985 <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>
24989 percent-encoding and + signs in internal links (T28410)
24991 [[User:+%]] [[Page+title%]]
24992 [[%+]] [[%+|%20]] [[%+ ]] [[%+r]]
24993 [[%]] [[+]] [[File:%+abc%39|foo|[[bar]]]]
24994 [[%33%45]] [[%33%45+]]
24996 <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>
24997 <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>
24998 <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>
24999 <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>
25002 <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>
25003 <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>
25004 <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>
25005 <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>
25009 Special characters in embedded file links (T29679)
25011 [[File:Contains & ampersand.jpg]]
25012 [[File:Does not exist.jpg|Title with & ampersand]]
25014 <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>
25015 <a href="/index.php?title=Special:Upload&wpDestFile=Does_not_exist.jpg" class="new" title="File:Does not exist.jpg">Title with & ampersand</a>
25018 <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>
25019 <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>
25023 Confirm that 'apos' named character reference doesn't make it to output (not legal in HTML 4)
25025 Text's been normalized?
25027 <p>Text's been normalized?
25032 T21052 U+3000 IDEOGRAPHIC SPACE should terminate free external links
25034 http://www.example.org/ <-- U+3000 (vim: ^Vu3000)
25036 <p><a rel="nofollow" class="external free" href="http://www.example.org/">http://www.example.org/</a> <-- U+3000 (vim: ^Vu3000)
25041 T21052 U+3000 IDEOGRAPHIC SPACE should terminate bracketed external links
25043 [http://www.example.org/ ideograms]
25045 <p><a rel="nofollow" class="external text" href="http://www.example.org/">ideograms</a>
25050 T21052 U+3000 IDEOGRAPHIC SPACE should terminate external images links
25052 http://www.example.org/pic.png <-- U+3000 (vim: ^Vu3000)
25054 <p><img src="http://www.example.org/pic.png" alt="pic.png"/> <-- U+3000 (vim: ^Vu3000)
25078 T33098 Template which includes system messages which includes the template
25082 <p><span class="error">Template loop detected: <a href="/wiki/Template:Identical" title="Template:Identical">Template:Identical</a></span>
25083 <span class="error">Template loop detected: <a href="/wiki/Template:Identical" title="Template:Identical">Template:Identical</a></span>
25088 T33490 Turkish: ucfirst 'blah'
25099 T33490 Turkish: ucfirst 'ix'
25110 T33490 Turkish: lcfirst 'BLAH'
25121 T33490 Turkish: ucfırst (with a dotless i)
25127 <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>
25132 T33490 ucfırst (with a dotless i) with English language
25138 <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>
25142 # Note that Parsoid doesn't emit an explicit TOC.
25143 # Note also that the html2wt direction tends to emit an extra newline
25144 # between the __TOC__ magicword and the first heading unless *both*
25145 # the <meta> and the <h2> have a data-parsoid attribute set (even if
25149 T28375: TOC with italics
25151 title=[[Main Page]]
25154 ==''Lost'' episodes==
25156 <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>
25158 <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>
25162 <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>
25165 <meta property="mw:PageProp/toc" data-parsoid='{}'/>
25166 <h2 id="Lost_episodes" data-parsoid='{}'><i>Lost</i> episodes</h2>
25170 T28375: TOC with bold
25172 title=[[Main Page]]
25175 =='''should be bold''' then normal text==
25177 <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>
25179 <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>
25183 <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>
25186 <meta property="mw:PageProp/toc" data-parsoid='{}'/>
25187 <h2 id="should_be_bold_then_normal_text" data-parsoid='{}'><b>should be bold</b> then normal text</h2>
25191 T35845: Headings become cursive in TOC when they contain an image
25193 title=[[Main Page]]
25196 ==Image [[Image:foobar.jpg]]==
25198 <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>
25200 <li class="toclevel-1 tocsection-1"><a href="#Image"><span class="tocnumber">1</span> <span class="toctext">Image</span></a></li>
25204 <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>
25207 <meta property="mw:PageProp/toc" data-parsoid='{}'/>
25208 <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>
25212 T35845 (2): Headings become bold in TOC when they contain a blockquote
25214 title=[[Main Page]]
25217 ==<blockquote>Quote</blockquote>==
25219 <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>
25221 <li class="toclevel-1 tocsection-1"><a href="#Quote"><span class="tocnumber">1</span> <span class="toctext">Quote</span></a></li>
25225 <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>
25228 <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>
25230 <li class="toclevel-1 tocsection-1"><a href="#Quote"><span class="tocnumber">1</span> <span class="toctext">Quote</span></a></li>
25234 <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>
25236 <meta property="mw:PageProp/toc" data-parsoid='{}'/>
25237 <h2 id="Quote" data-parsoid='{}'><blockquote><p>Quote</p></blockquote></h2>
25241 Unclosed tags in TOC
25243 wgFragmentMode=[ 'html5', 'legacy' ]
25245 title=[[Main Page]]
25249 <small>Hanc marginis exiguitas non caperet.</small>
25252 <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>
25254 <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>
25258 <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>
25259 <p><small>Hanc marginis exiguitas non caperet.</small>
25263 <meta property="mw:PageProp/toc" data-parsoid='{}'/>
25264 <h2 id="Proof:_2_<_3" data-parsoid='{}'><span id="Proof:_2_.3C_3" typeof="mw:FallbackId"></span>Proof: 2 < 3</h2>
25265 <p><small>Hanc marginis exiguitas non caperet.</small>
25270 Multiple tags in TOC
25273 ==<i>Foo</i> <b>Bar</b>==
25275 ==<i>Foo</i> <blockquote>Bar</blockquote>==
25277 <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>
25279 <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>
25280 <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>
25284 <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>
25285 <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>
25288 <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>
25290 <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>
25291 <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>
25295 <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>
25296 <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>
25298 <meta property="mw:PageProp/toc" data-parsoid='{}'/>
25299 <h2 id="Foo_Bar" data-parsoid='{}'><i data-parsoid='{"stx":"html"}'>Foo</i> <b data-parsoid='{"stx":"html"}'>Bar</b></h2>
25301 <h2 id="Foo_Bar_2" data-parsoid='{}'><i data-parsoid='{"stx":"html"}'>Foo</i> <blockquote><p>Bar</p></blockquote></h2>
25304 # Don't expect Parsoid to roundtrip this until the php parser comes closer to
25305 # html5 tag parsing.
25307 Tags with parameters in TOC
25312 ==<sup class="in-h2">Hello</sup>==
25314 ==<sup class="a > b">Evilbye</sup>==
25316 <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>
25318 <li class="toclevel-1 tocsection-1"><a href="#Hello"><span class="tocnumber">1</span> <span class="toctext"><sup>Hello</sup></span></a></li>
25319 <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>
25323 <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>
25324 <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>
25327 <meta property="mw:PageProp/toc" />
25328 <h2 id="Hello"><sup class="in-h2" data-parsoid='{"stx":"html"}'>Hello</sup></h2>
25330 <h2 id='b">Evilbye'><span id="b.22.3EEvilbye" typeof="mw:FallbackId"></span><sup class="a " data-parsoid='{"stx":"html"}'> b">Evilbye</sup></h2>
25334 span tags with directionality in TOC
25337 ==<span dir="ltr">C++</span>==
25339 ==<span dir="rtl">זבנג!</span>==
25341 ==<span style="font-style: italic">The attributes on these span tags must be deleted from the TOC</span>==
25343 ==<span style="font-style: italic" dir="ltr">All attributes on these span tags must be deleted from the TOC</span>==
25345 ==<span dir="ltr" style="font-style: italic">Attributes after dir on these span tags must be deleted from the TOC</span>==
25347 <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>
25349 <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>
25350 <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>
25351 <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>
25352 <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>
25353 <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>
25357 <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>
25358 <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>
25359 <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>
25360 <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>
25361 <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>
25364 <meta property="mw:PageProp/toc" data-parsoid='{}'/>
25365 <h2 id="C++" data-parsoid='{}'><span id="C.2B.2B" typeof="mw:FallbackId"></span><span dir="ltr">C++</span></h2>
25366 <h2 id="זבנג!"><span id=".D7.96.D7.91.D7.A0.D7.92.21" typeof="mw:FallbackId"></span><span dir="rtl">זבנג!</span></h2>
25367 <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>
25368 <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>
25369 <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>
25373 T74884: bdi element in ToC
25376 ==<bdi>test</bdi>==
25378 <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>
25380 <li class="toclevel-1 tocsection-1"><a href="#test"><span class="tocnumber">1</span> <span class="toctext"><bdi>test</bdi></span></a></li>
25384 <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>
25387 <meta property="mw:PageProp/toc" data-parsoid='{}'/>
25388 <h2 id="test" data-parsoid='{}'><bdi>test</bdi></h2>
25392 T35715: s/strike element in ToC
25395 ==<s>test</s> test <strike>test</strike>==
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="#test_test_test"><span class="tocnumber">1</span> <span class="toctext"><s>test</s> test <strike>test</strike></span></a></li>
25403 <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>
25406 <meta property="mw:PageProp/toc" data-parsoid='{}'/>
25407 <h2 id="test_test_test" data-parsoid='{}'><s>test</s> test <strike>test</strike></h2>
25411 T198618: style element in ToC
25416 ==<style>.foo {}</style>Style<style>.bar {}</style>==
25418 <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>
25420 <li class="toclevel-1 tocsection-1"><a href="#Style"><span class="tocnumber">1</span> <span class="toctext">Style</span></a></li>
25424 <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>
25427 <meta property="mw:PageProp/toc" data-parsoid="{}"/>
25428 <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>
25432 T198618: script element in ToC
25437 ==<html><script>alert(1);</script></html>Script<html><script>alert(1);</script></html>==
25439 <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>
25441 <li class="toclevel-1 tocsection-1"><a href="#Script"><span class="tocnumber">1</span> <span class="toctext">Script</span></a></li>
25445 <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>
25448 <meta property="mw:PageProp/toc" data-parsoid='{}'/>
25449 <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>
25453 Empty <p> tag in TOC, removed by Sanitizer (T92892)
25458 <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>
25460 <li class="toclevel-1 tocsection-1"><a href="#x"><span class="tocnumber">1</span> <span class="toctext">x</span></a></li>
25464 <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>
25467 <meta property="mw:PageProp/toc" data-parsoid='{}'/>
25468 <h2 id="x" data-parsoid='{}'>x</h2>
25474 == {{int:headline_sample}} ==
25478 T34057: Title needed when expanding <h> nodes.
25480 title=[[Main Page]]
25484 <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>
25489 Strip marker in urlencode
25491 {{urlencode:x<nowiki/>y}}
25492 {{urlencode:x<nowiki/>y|wiki}}
25493 {{urlencode:x<nowiki/>y|path}}
25494 {{urlencode:x<pre id="one">two</pre>y}}
25522 Strip marker in formatNum
25524 {{formatnum:1<nowiki/>2}}
25525 {{formatnum:1<nowiki/>2|R}}
25533 Check noCommafy in formatNum
25537 {{formatnum:123456.78}}
25538 {{formatnum:123456.78|NOSEP}}
25546 Wrong option for formatNum (T58199)
25548 {{formatnum:1,234.56|Random}}
25549 {{formatnum:1,234.56|EVERYTHING}}
25550 {{formatnum:1234.56|any argument that has the string 'NOSEP'}}
25559 Strip marker in grammar
25563 {{grammar:elative|foo<nowiki/>bar}}
25570 Strip marker in padleft
25572 {{padleft:|2|x<nowiki/>y}}
25579 Strip marker in padright
25581 {{padright:|2|x<nowiki/>y}}
25588 Strip marker in anchorencode
25590 {{anchorencode:x<nowiki/>y}}
25595 <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>
25599 nowiki inside link inside heading (T20295)
25601 ==[[foo|x<nowiki>y</nowiki>z]]==
25603 <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>
25608 new support for bdi element (T33817)
25610 <p dir="rtl" lang="he">ולדימיר לנין (ברוסית: <bdi lang="ru">Владимир Ленин</bdi>, 24 באפריל 1870–22 בינואר 1924) הוא מנהיג פוליטי קומוניסטי רוסי.</p>
25612 <p dir="rtl" lang="he">ולדימיר לנין (ברוסית: <bdi lang="ru">Владимир Ленин</bdi>, 24 באפריל 1870–22 בינואר 1924) הוא מנהיג פוליטי קומוניסטי רוסי.</p>
25617 Ignore pipe between table row attributes
25621 |- id=foo | style='color: red'
25629 <tr id="foo" style="color: red">
25636 Language parser function
25645 Padleft and padright (default 0-padding)
25654 <p><span typeof="mw:Transclusion" data-mw='{"parts":[{"template":{"target":{"wt":"padleft:xyz","function":"padleft"},"params":{"1":{"wt":"5"}},"i":0}}]}'>00xyz</span>
25655 <span typeof="mw:Transclusion" data-mw='{"parts":[{"template":{"target":{"wt":"padright:xyz","function":"padright"},"params":{"1":{"wt":"5"}},"i":0}}]}'>xyz00</span></p>
25659 Padleft and padright (partial fill)
25661 {{padleft:xyz|6|ab}}
25662 {{padright:xyz|6|ab}}
25668 <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>
25669 <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>
25673 Padleft and padright as substr
25675 {{padleft:|3|abcde}}
25676 {{padright:|3|abcde}}
25682 <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>
25683 <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>
25687 Padleft and padright with non-numerical length (T180403)
25689 {{padleft:abcdef|junk}}
25690 {{padright:abcdef|junk}}
25698 Special parser function
25700 {{#special:RandomPage}}
25701 {{#special:BaDtItLe}}
25702 {{#special:Foobar}}
25711 T36939 - Case insensitive link parsing ([HttP://])
25713 [HttP://MediaWiki.Org/]
25715 <p><a rel="nofollow" class="external autonumber" href="HttP://MediaWiki.Org/">[1]</a>
25718 <p><a rel="mw:ExtLink" class="external autonumber" href="HttP://MediaWiki.Org/"></a></p>
25722 T36939 - Case insensitive link parsing ([HttP:// title])
25724 [HttP://MediaWiki.Org/ MediaWiki]
25726 <p><a rel="nofollow" class="external text" href="HttP://MediaWiki.Org/">MediaWiki</a>
25731 T36939 - Case insensitive link parsing (HttP://)
25733 HttP://MediaWiki.Org/
25735 <p><a rel="nofollow" class="external free" href="HttP://MediaWiki.Org/">HttP://MediaWiki.Org/</a>
25738 <p><a rel="mw:ExtLink" class="external free" href="HttP://MediaWiki.Org/">HttP://MediaWiki.Org/</a></p>
25756 <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>
25757 <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>
25758 <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>
25759 <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>
25760 <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>
25766 ### Parsoid-specific tests
25767 ### Parsoid-PHP parser incompatibilities
25770 1. SOL-sensitive wikitext tokens as template-args
25772 parsoid=wt2html,wt2wt
25778 <ul><li>a</li></ul>
25779 <ol><li>a</li></ol>
25780 <dl><dd>a</dd></dl>
25782 <span about="#mwt1" typeof="mw:Transclusion">
25783 </span><ul about="#mwt1"><li>a</li>
25785 <span about="#mwt2" typeof="mw:Transclusion">
25786 </span><ol about="#mwt2"><li>a</li>
25788 <span about="#mwt3" typeof="mw:Transclusion">
25789 </span><dl about="#mwt3"><dd>a</dd>
25793 #### -----------------------------------------------------------------
25794 #### Parsoid-specific functionality tests
25795 #### -----------------------------------------------------------------
25797 # T65642/T68749: Formatting elt fixup around images.
25798 # We know wt2wt will fail, but we expect selser to pass.
25799 # Due to the nature of our testing, wt2wt and selser tests will enter the
25800 # blacklist and we'll catch selser regressions based on changes to the
25801 # blacklist entries for selser tests.
25803 1. Treebuilder fixup of formatting elt
25805 parsoid=wt2html,wt2wt
25810 [[Image:Foobar.jpg|right|Test]]
25818 </small></p><small>
25819 <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>
25820 </small><p><small></small>
25822 </td></tr></tbody></table>
25826 <p><small data-parsoid='{"stx":"html","autoInsertedEnd":true}'></small></p><small data-parsoid='{"stx":"html","autoInsertedEnd":true,"autoInsertedStart":true}'>
25827 <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>
25828 <p><small data-parsoid='{"stx":"html","autoInsertedStart":true}'></small></p></td></tr>
25833 2. Treebuilder fixup of formatting elt
25835 parsoid=wt2html,wt2wt
25837 '''foo[[File:Foobar.jpg|thumb|caption]]bar'''
25839 <small>[[Image:Foobar.jpg|right|300px]]</small>
25841 <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>
25842 </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>
25844 <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>
25846 <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>
25850 3. Treebuilder fixup of formatting elt
25852 parsoid=wt2html,wt2wt
25854 <small>'''foo[[File:Foobar.jpg|thumb|caption]]bar'''</small>
25856 <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>
25859 <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>
25863 4. Treebuilder fixup of formatting elt: formatting tags around captionless images
25865 parsoid=wt2html,wt2wt
25867 '''<small>[[Image:Foobar.jpg|right|300px]]</small>'''
25869 <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>
25871 <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>
25874 #### ----------------------------------------------------------------
25875 #### Parsoid-only testing of Parsoid's impl of LST
25876 #### Not implemented yet, see
25877 #### https://www.mediawiki.org/wiki/Parsoid/HTML_based_LST
25878 #### ----------------------------------------------------------------
25880 ## We still need to support serializing the older format while content is stored.
25882 LST Sections: Backwards compatibility
25885 "suppressErrors": true,
25886 "modes": ["html2wt"]
25889 <section begin="2011-05-16" />
25890 <section end="2014-04-10 (MW 1.23wmf22)" />
25892 <p><meta typeof="mw:Extension/LabeledSectionTransclusion/begin" content="2011-05-16"/>
25893 <meta typeof="mw:Extension/LabeledSectionTransclusion/end" content="2014-04-10 (MW 1.23wmf22)"/></p>
25897 LST Sections: Newfangled approach
25899 <section begin="2011-05-16" />
25900 <section end="2014-04-10 (MW 1.23wmf22)" />
25902 <p><span typeof="mw:Extension/section" about="#mwt4" data-mw='{"name":"section","attrs":{"begin":"2011-05-16"}}'>
25904 <span typeof="mw:Extension/section" about="#mwt6" data-mw='{"name":"section","attrs":{"end":"2014-04-10 (MW 1.23wmf22)"}}'>
25908 #--------- Test stripping of empty nodes in template content ----------
25911 Empty LI and TR nodes should be stripped from template content
25916 <ul about="#mwt1" typeof="mw:Transclusion" data-mw='{"parts":[{"template":{"target":{"wt":"EmptyLITest","href":"./Template:EmptyLITest"},"params":{},"i":0}}]}'>
25920 <table about="#mwt2" typeof="mw:Transclusion" data-mw='{"parts":[{"template":{"target":{"wt":"EmptyTRTest","href":"./Template:EmptyTRTest"},"params":{},"i":0}}]}'>
25933 Empty LI and TR nodes should not be stripped from top-level content
25947 <li class='mw-empty-elt'></li>
25952 <tr class='mw-empty-elt'></tr>
25961 Empty TR nodes should not be stripped if they have any attributes set
25963 {{EmptyTRWithHTMLAttrTest}}
25965 <table about="#mwt1" typeof="mw:Transclusion" data-mw='{"parts":[{"template":{"target":{"wt":"EmptyTRWithHTMLAttrTest","href":"./Template:EmptyTRWithHTMLAttrTest"},"params":{},"i":0}}]}'>
25966 <tr align='center'></tr>
25967 <tr><td>foo</td></tr>
25968 <tr align='center'></tr>
25969 <tr><td>bar</td></tr>
25973 #### ----------------------------------------------------------------
25974 #### The following section of tests are primarily to test
25975 #### wikitext escaping capabilities of Parsoid. Given that
25976 #### escaping can be done any number of ways, the wikitext (input)
25977 #### is always adjusted to reflect how Parsoid adds nowiki
25980 #### We are marking several tests as parsoid-only since the
25981 #### HTML in the result section is different from what the
25982 #### PHP parser generates for it.
25983 #### ----------------------------------------------------------------
25986 #### --------------- Headings ---------------
25988 #### 1. Nested inside html <h1>=foo=</h1>
25989 #### 2. Outside heading nest on a single line <h1>foo</h1>*bar
25990 #### 3. Nested inside html with wikitext split by html tags
25991 #### 4. No escape needed
25992 #### 5. Empty headings <h1></h1>
25993 #### 6. Heading chars in SOL context
25994 #### ----------------------------------------
25996 Headings: 0. Unnested
26006 <p>=foo<i>a</i>=</p>
26008 <nowiki>=foo=</nowiki>
26010 <nowiki> </nowiki>=foo=
26012 <nowiki>=foo=</nowiki>
26014 =foo''a''<nowiki>=</nowiki>
26017 # New headings and existing headings are handled differently
26019 Headings: 1. Nested inside html
26027 <h1 data-parsoid=''>=foo=</h1>
26028 <h2 data-parsoid=''>=foo=</h2>
26029 <h3 data-parsoid=''>=foo=</h3>
26030 <h4 data-parsoid=''>=foo=</h4>
26031 <h5 data-parsoid=''>=foo=</h5>
26032 <h6 data-parsoid=''>=foo=</h6>
26040 =<nowiki>=foo=</nowiki>=
26041 ==<nowiki>=foo=</nowiki>==
26042 ===<nowiki>=foo=</nowiki>===
26043 ====<nowiki>=foo=</nowiki>====
26044 =====<nowiki>=foo=</nowiki>=====
26045 ======<nowiki>=foo=</nowiki>======
26050 Headings: 2. Outside heading nest on a single line <h1>foo</h1>*bar
26059 <nowiki>*</nowiki>bar
26065 <nowiki>=bar=</nowiki>
26069 Headings: 3. Nested inside html with wikitext split by html tags
26073 <h1>=<b>bold</b>foo=</h1>
26075 = ='''bold'''foo= =
26079 Headings: 4a. No escaping needed (testing just h1 and h2)
26090 <h1><i>=</i>foo=</h1>
26110 Headings: 4b. No escaping needed (inside p-tags)
26127 Headings: 4c. Short headings (1)
26134 <nowiki>===</nowiki>
26140 # in the html2wt direction we emit '= = =' or '=<nowiki>=</nowiki>='
26142 Headings: 4d. Short headings (2)
26144 parsoid=wt2html,html2html
26155 <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>
26156 <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>
26157 <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>
26162 <h1 id="="><span id=".3D" typeof="mw:FallbackId"></span>=</h1>
26163 <h1 id="=="><span id=".3D.3D" typeof="mw:FallbackId"></span>==</h1>
26164 <h2 id="=_2"><span id=".3D_2" typeof="mw:FallbackId"></span>=</h2>
26168 Headings: 5. Empty headings
26172 <h1 data-parsoid='{}'></h1>
26174 <h2 data-parsoid='{}'></h2>
26176 <h3 data-parsoid='{}'></h3>
26178 <h4 data-parsoid='{}'></h4>
26180 <h5 data-parsoid='{}'></h5>
26182 <h6 data-parsoid='{}'></h6>
26192 =====<nowiki/>=====
26194 ======<nowiki/>======
26198 Headings: 6a. Heading chars in SOL context (with trailing spaces)
26208 <nowiki>=a=</nowiki>
26210 <nowiki>=a=</nowiki>
26212 <nowiki>=a=</nowiki>
26216 Headings: 6b. Heading chars in SOL context (with trailing newlines)
26229 <nowiki>=a=</nowiki>
26232 <nowiki>=a=</nowiki>
26235 <nowiki>=a=</nowiki>
26240 Headings: 6c. Heading chars in SOL context (leading newline break)
26248 <nowiki>=b=</nowiki>
26252 Headings: 6d. Heading chars in SOL context (with interspersed comments)
26256 <!--c0--><p>=a=</p>
26258 <!--c1--><p>=a=</p> <!--c2--> <!--c3-->
26260 <!--c0--><nowiki>=a=</nowiki>
26262 <!--c1--><nowiki>=a=</nowiki> <!--c2--> <!--c3-->
26266 Headings: 6d. Heading chars in SOL context (No escaping needed)
26276 Headings: 7. Insert a newline between new content and headings
26282 <h2 data-parsoid='{}'>A</h2>
26283 <p data-parsoid='{}'>a</p>
26294 Headings: Used as horizontal rule
26296 wgFragmentMode=[ 'html5', 'legacy' ]
26302 <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>
26305 <h6 id="==="><span id=".3D.3D.3D" typeof="mw:FallbackId"></span>===</h6>
26308 #### --------------- Lists ---------------
26309 #### 0. Outside nests (*foo, etc.)
26310 #### 1. Nested inside html <ul><li>*foo</li></ul>
26311 #### 2. Inside definition lists
26312 #### 3. Only bullets at start should be escaped
26313 #### 4. No escapes needed
26314 #### 5. No unnecessary escapes
26315 #### 6. Escape bullets in SOL position
26316 #### 7. Escape bullets in a multi-line context
26317 #### ----------------------------------------
26320 Lists: 0. Outside nests
26330 <nowiki>*</nowiki>foo
26332 <nowiki>#</nowiki>foo
26334 <nowiki>;</nowiki>Foo<nowiki>:</nowiki>bar
26337 ## Making these next 3 tests Parsoid-only since they are html2wt tests
26338 ## to test wikitext escaping, and insignificant whitespace diffs
26339 ## cause PHP parser tests to barf
26341 Lists: 1. Nested inside html (No unnecessary escapes)
26350 <li data-parsoid='{}'>*foo</li>
26351 <li data-parsoid='{}'>#foo</li>
26352 <li data-parsoid='{}'>:foo</li>
26353 <li data-parsoid='{}'>;foo</li>
26361 <li data-parsoid='{}'>*foo</li>
26362 <li data-parsoid='{}'>#foo</li>
26363 <li data-parsoid='{}'>:foo</li>
26364 <li data-parsoid='{}'>;foo</li>
26371 *<nowiki>*foo</nowiki>
26372 *<nowiki>#foo</nowiki>
26373 *<nowiki>:foo</nowiki>
26374 *<nowiki>;foo</nowiki>
26380 #<nowiki>*foo</nowiki>
26381 #<nowiki>#foo</nowiki>
26382 #<nowiki>:foo</nowiki>
26383 #<nowiki>;foo</nowiki>
26387 Lists: 2. Inside definition lists
26391 <dl><dt>;foo</dt></dl>
26392 <dl><dt>:foo</dt></dl>
26395 <dl><dd>:foo</dd></dl>
26399 ; <nowiki>:foo</nowiki>
26401 ; <nowiki>:foo</nowiki>
26408 Lists: 3. Only bullets at start of text in wikitext-generated HTML should be escaped
26414 <li data-parsoid='{}'>*foo<i>it</i>*bar</li>
26418 *<nowiki>*foo</nowiki>''it''*bar
26422 Lists: 4. No escapes needed
26435 <li><a rel="mw:WikiLink" href="Foo" title="Foo">Foo</a>: bar
26439 <li><a rel="mw:WikiLink" href="Foo" title="Foo">Foo</a>*bar
26453 Lists: 5. No unnecessary escapes
26457 <ul><li> bar <span>[[foo]]</span></li></ul>
26458 <ul><li> =bar <span>[[foo]]</span></li></ul>
26459 <ul><li> [[bar <span>[[foo]]</span></li></ul>
26460 <ul><li> ]]bar <span>[[foo]]</span></li></ul>
26461 <ul><li> =bar <span>foo]]</span>=</li></ul>
26462 <ul><li> <s></s>: a</li></ul>
26463 <ul><li> <i>* foo</i></li></ul>
26466 * bar <span><nowiki>[[foo]]</nowiki></span>
26468 * =bar <span><nowiki>[[foo]]</nowiki></span>
26470 * [[bar <span><nowiki>[[foo]]</nowiki></span>
26472 * ]]bar <span><nowiki>[[foo]]</nowiki></span>
26474 * =bar <span>foo]]</span>=
26482 Lists: 6. Escape bullets in SOL position
26486 <p><!--cmt-->*foo</p>
26488 <!--cmt--><nowiki>*</nowiki>foo
26492 Lists: 7. Escape bullets in a multi-line context
26501 <nowiki>*</nowiki>b
26505 Lists: 8. Escape colons only if not present in tags
26509 <dl><dt>a:b<i>c:d</i></dt></dl>
26511 ; <nowiki>a:b</nowiki>''c:d''
26514 #### --------------- HRs ---------------
26515 #### 1. Single line
26516 #### -----------------------------------
26519 HRs: 1. Single line
26527 ----<nowiki>----</nowiki>
26532 #### --------------- Tables ---------------
26533 #### 1a. Simple example
26534 #### 1b. No escaping needed (!foo)
26535 #### 1c. No escaping needed (|foo)
26536 #### 1d. No escaping needed (|}foo)
26538 #### 2a. Nested in td (<td>foo|bar</td>)
26539 #### 2b. Nested in td (<td>foo||bar</td>)
26540 #### 2c. Nested in td -- no escaping needed(<td>foo!!bar</td>)
26542 #### 3a. Nested in th (<th>foo!bar</th>)
26543 #### 3b. Nested in th (<th>foo!!bar</th>)
26544 #### 3c. Nested in th -- no escaping needed(<th>foo||bar</th>)
26548 #### 4c. No escaping needed
26549 #### --------------------------------------
26552 Tables: 1a. Simple example
26560 <nowiki>{|</nowiki>
26565 Tables: 1b. No escaping needed
26576 Tables: 1c. No escaping needed
26587 Tables: 1d. No escaping needed
26598 Tables: 2a. Nested in td
26603 <td>foo|bar</td></tr>
26604 <tr><td>x<div>a|b</div></td>
26608 |<nowiki>foo|bar</nowiki>
26610 |x<div><nowiki>a|b</nowiki></div>
26618 <td>x<div>a|b</div>
26619 </td></tr></tbody></table>
26623 Tables: 2b. Nested in td
26629 <td>a<i>b||c</i></td>
26630 <td>a<i><div>b||c</div></i></td>
26631 </tr></tbody></table>
26634 |<nowiki>foo||bar</nowiki>
26635 |a''<nowiki>b||c</nowiki>''
26636 |a''<div><nowiki>b||c</nowiki></div>''
26645 <td>a<i><div>b||c</div></i>
26651 Tables: 2c. Nested in td -- no escaping needed
26667 Tables: 3a. Nested in th
26683 Tables: 3b. Nested in th
26688 <tr><th>foo!!bar</th>
26689 <th><i>foo|bar</i></th>
26690 <th><i>foo!!bar</i></th>
26691 <th><i><span>foo!!bar</span></i></th>
26692 </tr></tbody></table>
26695 !<nowiki>foo!!bar</nowiki>
26696 !''<nowiki>foo|bar</nowiki>''
26697 !''<nowiki>foo!!bar</nowiki>''
26698 !''<span><nowiki>foo!!bar</nowiki></span>''
26707 <th><i>foo!!bar</i>
26709 <th><i><span>foo!!bar</span></i>
26715 Tables: 3c. Nested in th
26720 <tr><th>foo||bar</th>
26721 <th><span typeof="mw:Nowiki">foo||bar</span></th>
26722 </tr></tbody></table>
26725 !<nowiki>foo||bar</nowiki>
26726 !<nowiki>foo||bar</nowiki>
26739 Tables: 4a. Escape -
26755 |<nowiki>-bar</nowiki>
26760 Tables: 4b. Escape +
26776 |<nowiki>+bar</nowiki>
26781 Tables: 4c. No escaping needed
26786 <tr><td>foo-bar</td><td>foo+bar</td></tr>
26787 <tr><td><i>foo</i>-bar</td><td><i>foo</i>+bar</td></tr>
26793 <div>a|b</div></td>
26838 Tables: 4d. No escaping needed
26843 <tbody><tr><td><a rel="mw:WikiLink" href="./Foo" title="Foo">Foo</a>-bar</td>
26844 <td data-parsoid='{"startTagSrc":"|","attrSepSrc":"|"}'>+1</td>
26845 <td data-parsoid='{"startTagSrc":"|","attrSepSrc":"|"}'>-2</td></tr>
26856 <td><a href="/wiki/Foo" title="Foo">Foo</a>-bar
26866 Tables: 4e. Escape }
26871 <tr><td>}</td></tr>
26872 <tr><td>x</td><td data-parsoid='{"stx":"row"}'>}</td></tr></table>
26876 |<nowiki>}</nowiki>
26893 Tables: 5. Empty table cells should get whitespace to avoid need for nowikis
26897 <table><tr><td></td><td align="center" data-parsoid='{"stx":"row"}'></td><td data-parsoid='{"stx":"row"}'></td></tr></table>
26899 <table><tr><td></td><td align="center"></td><td></td></tr></table>
26901 <table><tr><td></td><td align="center" data-parsoid='{"stx":"row", "startTagSrc":"{{!}}{{!}}"}'></td><td data-parsoid='{"stx":"row"}'></td></tr></table>
26903 <table><tr><th></th><th align="center" data-parsoid='{"stx":"row"}'></th><th data-parsoid='{"stx":"row"}'></th></tr></table>
26906 | || align="center" | ||
26916 | {{!}}{{!}} align="center" | ||
26920 ! !! align="center" | !!
26926 <td align="center"></td>
26928 </td></tr></tbody></table>
26933 <td align="center">
26936 </td></tr></tbody></table>
26940 <td align="center"></td>
26942 </td></tr></tbody></table>
26946 <th align="center"></th>
26948 </th></tr></tbody></table>
26952 T97430: Don't emit empty nowiki pairs around marker meta tags
26956 <p>*This is a long sentence here that will make the nowiki algo split up the nowikis into multiple pairs
26957 |** Make this another long long long sentence forcing the nowiki algo to split up the nowikis.</p>
26959 <nowiki>*</nowiki>This is a long sentence here that will make the nowiki algo split up the nowikis into multiple pairs
26960 |** Make this another long long long sentence forcing the nowiki algo to split up the nowikis.
26964 Unclosed xmlish element in table line shouldn't eat end delimiters
26969 <tbody><tr><td> <foo</td>
26970 <td> bar></td></tr>
26987 #### --------------- Links ----------------
26988 #### 1. Quote marks in link text
26989 #### 2. Wikilinks: Escapes needed
26990 #### 3. Wikilinks: No escapes needed
26991 #### 4. Extlinks: Escapes needed
26992 #### 5. Extlinks: No escapes needed
26993 #### --------------------------------------
26995 Links 1. WikiLinks: No escapes needed
26999 <p><a rel="mw:WikiLink" href="Foo" title="Foo">Foo<i>boo</i></a>
27000 <a rel="mw:WikiLink" href="Foo" title="Foo">[Foobar]</a>
27001 <a rel="mw:WikiLink" href="Foo" title="Foo">x [Foobar] x</a></p>
27005 [[Foo|x [Foobar] x]]
27007 <p><a href="/wiki/Foo" title="Foo">Foo<i>boo</i></a>
27008 <a href="/wiki/Foo" title="Foo">[Foobar]</a>
27009 <a href="/wiki/Foo" title="Foo">x [Foobar] x</a>
27014 Links 2. WikiLinks: Escapes needed
27018 <a href="Foo" rel="mw:WikiLink">Foobar]</a>
27019 <a href="Foo" rel="mw:WikiLink">x [http://google.com g] x</a>
27020 <a href="Foo" rel="mw:WikiLink">[[Bar]]</a>
27021 <a href="Foo" rel="mw:WikiLink">x [[Bar]] x</a>
27022 <a href="Foo" rel="mw:WikiLink">|Bar</a>
27023 <a href="Foo" rel="mw:WikiLink">]]bar</a>
27024 <a href="Foo" rel="mw:WikiLink">[[bar</a>
27025 <a href="Foo" rel="mw:WikiLink">x [[ y</a>
27026 <a href="Foo" rel="mw:WikiLink">x ]] y</a>
27027 <a href="Foo" rel="mw:WikiLink">x ]] y [[ z</a>
27029 [[Foo|<nowiki>Foobar]</nowiki>]]
27030 [[Foo|x <nowiki>[http://google.com g]</nowiki> x]]
27031 [[Foo|<nowiki>[[Bar]]</nowiki>]]
27032 [[Foo|<nowiki>x [[Bar]] x</nowiki>]]
27033 [[Foo|<nowiki>|Bar</nowiki>]]
27034 [[Foo|<nowiki>]]bar</nowiki>]]
27035 [[Foo|<nowiki>[[bar</nowiki>]]
27036 [[Foo|<nowiki>x [[ y</nowiki>]]
27037 [[Foo|<nowiki>x ]] y</nowiki>]]
27038 [[Foo|<nowiki>x ]] y [[ z</nowiki>]]
27040 <p><a href="/wiki/Foo" title="Foo">Foobar]</a>
27041 <a href="/wiki/Foo" title="Foo">x [http://google.com g] x</a>
27042 <a href="/wiki/Foo" title="Foo">[[Bar]]</a>
27043 <a href="/wiki/Foo" title="Foo">x [[Bar]] x</a>
27044 <a href="/wiki/Foo" title="Foo">|Bar</a>
27045 <a href="/wiki/Foo" title="Foo">]]bar</a>
27046 <a href="/wiki/Foo" title="Foo">[[bar</a>
27047 <a href="/wiki/Foo" title="Foo">x [[ y</a>
27048 <a href="/wiki/Foo" title="Foo">x ]] y</a>
27049 <a href="/wiki/Foo" title="Foo">x ]] y [[ z</a>
27054 Links 3. WikiLinks: No escapes needed
27058 <p><a rel="mw:WikiLink" href="Foo">[Foobar</a>
27059 <a rel="mw:WikiLink" href="Foo" title="Foo">foo|bar</a></p>
27064 <p><a href="/wiki/Foo" title="Foo">[Foobar</a>
27065 <a href="/wiki/Foo" title="Foo">foo|bar</a>
27070 Links 4. ExtLinks: Escapes needed
27074 <p><a rel="mw:ExtLink" href="http://google.com">[google]</a>
27075 <a rel="mw:ExtLink" href="http://google.com">google]</a>
27076 <a rel="mw:ExtLink" href="http://google.com">goog] le</a></p>
27077 <p>[http://google.com]</p>
27078 <p>[http://google.com google]</p>
27079 <p>[<a rel="mw:ExtLink" href="http://google.com">http://google.com</a>]</p>
27080 <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>
27082 [http://google.com <nowiki>[google]</nowiki>]
27083 [http://google.com <nowiki>google]</nowiki>]
27084 [http://google.com <nowiki>goog] le</nowiki>]
27086 <nowiki>[http://google.com]</nowiki>
27088 <nowiki>[http://google.com google]</nowiki>
27090 [http://google.com<nowiki>]</nowiki>
27092 [{{echo|http://google.com}}<nowiki>]</nowiki>
27094 <p><a rel="nofollow" class="external text" href="http://google.com">[google]</a>
27095 <a rel="nofollow" class="external text" href="http://google.com">google]</a>
27096 <a rel="nofollow" class="external text" href="http://google.com">goog] le</a>
27097 </p><p>[http://google.com]
27098 </p><p>[http://google.com google]
27099 </p><p>[<a rel="nofollow" class="external free" href="http://google.com">http://google.com</a>]
27100 </p><p>[<a rel="nofollow" class="external free" href="http://google.com">http://google.com</a>]
27105 Links 5. ExtLinks: No escapes needed
27109 <p><a rel="mw:ExtLink" href="http://google.com">[google</a></p>
27110 <p>[<a ref="mw:ExtLink" href="http://google.com"></a>]</p>
27112 [http://google.com [google]
27114 [[http://google.com]]
27116 <p><a rel="nofollow" class="external text" href="http://google.com">[google</a>
27117 </p><p>[<a rel="nofollow" class="external autonumber" href="http://google.com">[1]</a>]
27122 Links 6. Add <nowiki/>s between text-nodes and url-links when required (T66300)
27126 <p>x<a rel="mw:ExtLink" href="http://example.com" data-parsoid='{"stx":"url"}'>http://example.com</a>y
27127 <a rel="mw:ExtLink" href="http://example.com" data-parsoid='{"stx":"url"}'>http://example.com</a>?x
27128 <a rel="mw:ExtLink" href="http://example.com" data-parsoid='{"stx":"url"}'>http://example.com</a>&x
27129 <a rel="mw:ExtLink" href="http://example.com" data-parsoid='{"stx":"url"}'>http://example.com</a>'x
27130 <a rel="mw:ExtLink" href="http://example.com" data-parsoid='{"stx":"url"}'>http://example.com</a>,x
27131 <a rel="mw:ExtLink" href="http://example.com" data-parsoid='{"stx":"url"}'>http://example.com</a>.x
27132 <a rel="mw:ExtLink" href="http://example.com" data-parsoid='{"stx":"url"}'>http://example.com</a>;x
27133 <a rel="mw:ExtLink" href="http://example.com" data-parsoid='{"stx":"url"}'>http://example.com</a>:x
27134 <a rel="mw:ExtLink" href="http://example.com" data-parsoid='{"stx":"url"}'>http://example.com</a>;x
27135 <a rel="mw:ExtLink" href="http://example.com" data-parsoid='{"stx":"url"}'>http://example.com</a>!x
27136 <a rel="mw:ExtLink" href="http://example.com" data-parsoid='{"stx":"url"}'>http://example.com</a>=x
27137 <a rel="mw:ExtLink" href="http://example.com" data-parsoid='{"stx":"url"}'>http://example.com</a>(x)
27138 <a rel="mw:ExtLink" href="http://example.com(x" data-parsoid='{"stx":"url"}'>http://example.com(x</a>)
27141 x<nowiki/>http://example.com<nowiki/>y
27142 http://example.com<nowiki/>?x
27143 http://example.com<nowiki/>&x
27144 http://example.com<nowiki/>'x
27145 http://example.com<nowiki/>,x
27146 http://example.com<nowiki/>.x
27147 http://example.com<nowiki/>;x
27148 http://example.com<nowiki/>:x
27149 http://example.com<nowiki/>;x
27150 http://example.com<nowiki/>!x
27151 http://example.com<nowiki/>=x
27152 http://example.com<nowiki/>(x)
27153 http://example.com(x<nowiki/>)
27157 Links 7a. Don't add spurious <nowiki/>s between text-nodes and url-links (T66300)
27162 <a rel="mw:ExtLink" href="http://example.com" data-parsoid='{"stx":"url"}'>http://example.com</a>
27164 "<a rel="mw:ExtLink" href="http://example.com" data-parsoid='{"stx":"url"}'>http://example.com</a>"
27165 (<a rel="mw:ExtLink" href="http://example.com" data-parsoid='{"stx":"url"}'>http://example.com</a>)
27166 (<a rel="mw:ExtLink" href="http://example.com" data-parsoid='{"stx":"url"}'>http://example.com</a>) foo
27167 <a rel="mw:ExtLink" href="http://example.com" data-parsoid='{"stx":"url"}'>http://example.com</a>,
27168 <a rel="mw:ExtLink" href="http://example.com" data-parsoid='{"stx":"url"}'>http://example.com</a>, foo
27174 "http://example.com"
27175 (http://example.com)
27176 (http://example.com) foo
27177 http://example.com,
27178 http://example.com, foo
27181 <a rel="nofollow" class="external free" href="http://example.com">http://example.com</a>
27183 "<a rel="nofollow" class="external free" href="http://example.com">http://example.com</a>"
27184 (<a rel="nofollow" class="external free" href="http://example.com">http://example.com</a>)
27185 (<a rel="nofollow" class="external free" href="http://example.com">http://example.com</a>) foo
27186 <a rel="nofollow" class="external free" href="http://example.com">http://example.com</a>,
27187 <a rel="nofollow" class="external free" href="http://example.com">http://example.com</a>, foo
27192 Links 7b. Don't add spurious <nowiki/>s between text-nodes and url-links (T66300)
27196 <p><a rel="mw:ExtLink" href="http://example.com" data-parsoid='{"stx":"url"}'>http://example.com</a>.,;:!?\
27197 -<a rel="mw:ExtLink" href="http://example.com">http://example.com</a>:</p>
27199 http://example.com.,;:!?\
27200 -http://example.com:
27202 <p><a rel="nofollow" class="external free" href="http://example.com">http://example.com</a>.,;:!?\
27203 -<a rel="nofollow" class="external free" href="http://example.com">http://example.com</a>:
27208 Links 8. Add <nowiki/>s between text-nodes and RFC-links when required (T66300)
27212 <p><a href="https://tools.ietf.org/html/rfc123" rel="mw:ExtLink" data-parsoid='{"stx":"magiclink"}'>RFC 123</a>4
27213 <a href="https://tools.ietf.org/html/rfc123" rel="mw:ExtLink" data-parsoid='{"stx":"magiclink"}'>RFC 123</a>y
27214 X<a href="https://tools.ietf.org/html/rfc123" rel="mw:ExtLink" data-parsoid='{"stx":"magiclink"}'>RFC 123</a>y</p>
27218 X<nowiki/>RFC 123<nowiki/>y
27222 Links 9. Don't add spurious <nowiki/>s between text-nodes and RFC-links (T66300)
27226 <p><a href="https://tools.ietf.org/html/rfc123" rel="mw:ExtLink" data-parsoid='{"stx":"magiclink"}'>RFC 123</a>?foo
27227 <a href="https://tools.ietf.org/html/rfc123" rel="mw:ExtLink" data-parsoid='{"stx":"magiclink"}'>RFC 123</a>&foo
27228 -<a href="https://tools.ietf.org/html/rfc123" rel="mw:ExtLink" data-parsoid='{"stx":"magiclink"}'>RFC 123</a>-
27235 <p><a class="external mw-magiclink-rfc" rel="nofollow" href="https://tools.ietf.org/html/rfc123">RFC 123</a>?foo
27236 <a class="external mw-magiclink-rfc" rel="nofollow" href="https://tools.ietf.org/html/rfc123">RFC 123</a>&foo
27237 -<a class="external mw-magiclink-rfc" rel="nofollow" href="https://tools.ietf.org/html/rfc123">RFC 123</a>-
27242 Links 10. Add <nowiki/>s between text-nodes and PMID-links when required (T66300)
27246 <p><a href="//www.ncbi.nlm.nih.gov/pubmed/123?dopt=Abstract" rel="mw:ExtLink" data-parsoid='{"stx":"magiclink"}'>PMID 123</a>4
27247 <a href="//www.ncbi.nlm.nih.gov/pubmed/123?dopt=Abstract" rel="mw:ExtLink" data-parsoid='{"stx":"magiclink"}'>PMID 123</a>y
27248 X<a href="//www.ncbi.nlm.nih.gov/pubmed/123?dopt=Abstract" rel="mw:ExtLink" data-parsoid='{"stx":"magiclink"}'>PMID 123</a>y
27252 X<nowiki/>PMID 123<nowiki/>y
27256 Links 11. Don't add spurious <nowiki/>s between text-nodes and PMID-links (T66300)
27260 <p><a href="//www.ncbi.nlm.nih.gov/pubmed/123?dopt=Abstract" rel="mw:ExtLink" data-parsoid='{"stx":"magiclink"}'>PMID 123</a>?foo
27261 <a href="//www.ncbi.nlm.nih.gov/pubmed/123?dopt=Abstract" rel="mw:ExtLink" data-parsoid='{"stx":"magiclink"}'>PMID 123</a>&foo
27262 -<a href="//www.ncbi.nlm.nih.gov/pubmed/123?dopt=Abstract" rel="mw:ExtLink" data-parsoid='{"stx":"magiclink"}'>PMID 123</a>-
27269 <p><a class="external mw-magiclink-pmid" rel="nofollow" href="//www.ncbi.nlm.nih.gov/pubmed/123?dopt=Abstract">PMID 123</a>?foo
27270 <a class="external mw-magiclink-pmid" rel="nofollow" href="//www.ncbi.nlm.nih.gov/pubmed/123?dopt=Abstract">PMID 123</a>&foo
27271 -<a class="external mw-magiclink-pmid" rel="nofollow" href="//www.ncbi.nlm.nih.gov/pubmed/123?dopt=Abstract">PMID 123</a>-
27276 Links 12. Add <nowiki/>s between text-nodes and ISBN-links when required (T66300)
27280 <p><a href="./Special:BookSources/1234567890" rel="mw:WikiLink" data-parsoid='{"stx":"magiclink"}'>ISBN 1234567890</a>1
27281 <a href="./Special:BookSources/1234567890" rel="mw:WikiLink" data-parsoid='{"stx":"magiclink"}'>ISBN 1234567890</a>x
27282 a<a href="./Special:BookSources/1234567890" rel="mw:WikiLink" data-parsoid='{"stx":"magiclink"}'>ISBN 1234567890</a>b
27285 ISBN 1234567890<nowiki/>1
27286 ISBN 1234567890<nowiki/>x
27287 a<nowiki/>ISBN 1234567890<nowiki/>b
27291 Links 13. Don't add spurious <nowiki/>s between text-nodes and ISBN-links (T66300)
27295 <p>-<a href="./Special:BookSources/1234567890" rel="mw:WikiLink" data-parsoid='{"stx":"magiclink"}'>ISBN 1234567890</a>'s
27299 <p>-<a href="/wiki/Special:BookSources/1234567890" class="internal mw-magiclink-isbn">ISBN 1234567890</a>'s
27304 Links 14. Protect link-like plain text. (Parsoid bug T78425)
27308 <p>this is not a link: http://example.com
27311 this is not a link: <nowiki>http://example.com</nowiki>
27315 Links 15. Link trails can't become link prefixes.
27320 <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>
27322 [[Söfnuður]]-[[00]]
27324 <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>
27328 #### --------------- Quotes ---------------
27329 #### 1. Quotes inside <b> and <i>
27330 #### 2. Link fragments separated by <i> and <b> tags
27331 #### 3. Link fragments inside <i> and <b>
27332 #### 4. No escaping needed
27333 #### --------------------------------------
27335 1a. Quotes inside <b> and <i>
27346 <b>foo'<i>bar'</i>baz</b>
27355 <i>fools'<span> errand</span></i>
27356 <i><span>fool</span>'s errand</i>
27357 '<i>foo</i> bar '<i>baz</i>
27358 a|!*#-:;+-~[]{}b'<i>x</i>
27362 ''<nowiki>''foo''</nowiki>''
27363 ''<nowiki>'''foo'''</nowiki>''
27365 '''<nowiki/>'foo''''
27366 '''<nowiki>''foo''</nowiki>'''
27367 '''<nowiki>'''foo'''</nowiki>'''
27368 '''foo'<nowiki/>''bar'<nowiki/>''baz'''
27369 '''foo'''<nowiki/>'s
27375 '''foo'''<nowiki/>'
27376 ''''foo'''<nowiki/>'
27377 ''fools'<span> errand</span>''
27378 ''<span>fool</span>'s errand''
27379 '<nowiki/>''foo'' bar '''baz''
27380 a|!*#-:;+-~[]{}b'''x''
27384 1b. Quotes inside <b> and <i> with other tags on same line
27388 '<i>a</i> foo <i><a rel="mw:WikiLink" href="Bar" title="Bar">bar</a></i>
27389 <i>a'</i> foo <i><a rel="mw:WikiLink" href="Bar" title="Bar">bar</a></i>
27390 <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>
27391 <a rel="mw:WikiLink" href="Foo" title="Foo">foo</a> x'<i><a href="Bar" rel="mw:WikiLink" title="Bar">bar</a></i>
27392 '<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>
27393 '<i>foo</i> <div title="name">test</div>
27394 '<i>foo</i> and <br data-parsoid='{"stx":"html","noClose":true}'/> bar
27395 <ol class="mw-references references" typeof="mw:Extension/references" about="#mwt5" data-mw='{"name":"references","attrs":{}}'>
27396 <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>
27399 '''a'' foo ''[[bar]]''
27400 ''a''' foo ''[[bar]]''
27401 ''a''' foo '''{{echo|[[bar]]}}'''
27402 [[foo]] x'''[[bar]]''
27403 '''foo'' <ref>test</ref>
27404 '''foo'' <div title="name">test</div>
27405 '''foo'' and <br> bar
27410 2. Link fragments separated by <i> and <b> tags
27414 <p>[[<i>foo</i>hello]]</p>
27415 <p>[[<b>foo</b>hello]]</p>
27417 [[''foo''<nowiki>hello]]</nowiki>
27419 [['''foo'''<nowiki>hello]]</nowiki>
27422 # FIXME: Escaping one or both of [[ and ]] is also acceptable --
27423 # this is one of the shortcomings of this format
27425 3. Link fragments inside <i> and <b>
27429 <p><i>[[foo</i>]]</p>
27430 <p><b>[[foo</b>]]</p>
27432 ''[[foo''<nowiki>]]</nowiki>
27434 '''[[foo'''<nowiki>]]</nowiki>
27438 4. No escaping needed
27442 <p>'<span><i>bar</i></span>'
27443 '<span><b>bar</b></span>'
27447 '<span>''bar''</span>'
27448 '<span>'''bar'''</span>'
27452 #### ----------- Paragraphs ---------------
27453 #### 1. No unnecessary escapes
27454 #### --------------------------------------
27457 1. No unnecessary escapes
27461 <p>bar <span>[[foo]]</span>
27462 </p><p>=bar <span>[[foo]]</span>
27463 </p><p>[[bar <span>[[foo]]</span>
27464 </p><p>]]bar <span>[[foo]]</span>
27465 </p><p>=bar <span>foo]]</span>=
27468 bar <span><nowiki>[[foo]]</nowiki></span>
27470 =bar <span><nowiki>[[foo]]</nowiki></span>
27472 [[bar <span><nowiki>[[foo]]</nowiki></span>
27474 ]]bar <span><nowiki>[[foo]]</nowiki></span>
27476 =bar <span>foo]]</span><nowiki>=</nowiki>
27479 #### ----------------------- PRE --------------------------
27481 1. Leading whitespace in SOL context should be escaped
27504 <nowiki> </nowiki>a
27506 <nowiki> </nowiki> a
27510 <nowiki> </nowiki> a
27512 <nowiki> </nowiki>a
27515 <nowiki> </nowiki>b
27538 2. Leading whitespace in non-indent-pre contexts should not be escaped
27542 <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>
27543 <ol class="mw-references references" typeof="mw:Extension/references" about="#mwt4" data-mw='{"name":"references","attrs":{}}'>
27544 <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>
27554 3. Leading whitespace in indent-pre suppressing contexts should not be escaped
27573 4. Leading whitespace in indent-pre suppressing contexts should not be escaped
27577 <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>
27579 [[File:Foobar.jpg|thumb|caption]]
27583 5. Nowiki escaping should account for indent-pres
27593 T95794: nowiki escaping should account for leading space at start-of-line in an indent-pre block
27607 Whitespace scrubbing in SOL position should account for SOL-sensitive wikitext markup
27610 "modes": ["html2wt"],
27611 "scrubWikitext": true
27619 <p><link rel="mw:PageProp/Category" href="./Category:Foo" data-parsoid="{}"> *foo</p>
27620 <p> <link rel="mw:PageProp/Category" href="./Category:Foo" data-parsoid="{}">*foo</p>
27621 <p> <!--boo-->*foo</p>
27622 <p><!--boo--> *foo</p>
27623 <p><!--a--> <!--b--> <!--c--> <!--d--> <!--e--> foo</p>
27624 <p><!--a--> <!--b--> <!--c--> <!--d--> <!--e--> *foo</p>
27640 <nowiki>*</nowiki>foo
27642 <nowiki/><!--boo-->*foo
27644 <!--boo--><nowiki/>*foo
27646 <!--a--><!--b--><!--c--><!--d--><!--e-->foo
27648 <!--a--><nowiki/><!--b--><!--c--><!--d--><!--e-->*foo
27651 #### --------------- Behavior Switches --------------------
27654 1. Valid behavior switches should be escaped
27661 <nowiki>__TOC__</nowiki>
27662 ''<nowiki>__TOC__</nowiki>''
27666 2. Invalid behavior switches should not be escaped
27677 # We use indent-pre as an indirect way to test for sol-transparent behavior.
27679 Behavior switches should be SOL-transparent
27683 <meta property="mw:PageProp/toc" />
27685 <!-- this one's bogus -->
27688 <pre data-parsoid='{}'><meta property="mw:PageProp/toc" data-parsoid='{"src":"__TOC__","magicSrc":"__TOC__"}'/> foo</pre>
27690 <meta property="mw:PageProp/toc" data-parsoid='{"src":"__TOC__","magicSrc":"__TOC__"}'/><pre data-parsoid='{}'>bar</pre>
27694 <!-- this one's bogus -->
27703 #### --------------- HTML tags ---------------
27706 #### 3. multi-line html tag
27707 #### 4. extension tags
27708 #### -----------------------------------------
27714 <a href="http://google.com">google</a>
27716 <a href="http://google.com">google</a>
27724 <ul><li> <div>foo</div></li>
27725 <li> <div style="color:red">foo</div></li>
27726 <li> <td></li></ul>
27729 * <nowiki><div>foo</div></nowiki>
27730 * <nowiki><div style="color:red">foo</div></nowiki>
27731 * <nowiki><td></nowiki>
27735 3. multi-line html tag
27754 <p><ref>foo</ref>
27755 </p><p><ref>bar
27756 </p><p>baz</ref>
27759 <nowiki><ref>foo</ref></nowiki>
27761 <nowiki><ref>bar</nowiki>
27763 baz<nowiki></ref></nowiki>
27767 Parsoid: newline inducing block nodes don't suppress <nowiki>
27773 <nowiki> </nowiki>a
27778 #### --------------- Others ---------------
27784 <p><nowiki>foo</nowiki>
27787 <nowiki>foo</nowiki>
27790 ## The quote-char in the input is necessary for triggering the bug
27792 (T54035) Nowiki-escaping should not get tripped by " :" in text
27801 #----------- End of wikitext escaping tests --------------
27805 Tag-like HTML structures are passed through as text
27827 </p><p>1<d e>f
27832 HTML tag with necessary entities in attributes
27834 <span title="&amp;">foo</span>
27836 <p><span title="&amp;">foo</span>
27841 HTML tag with 'unnecessary' entity encoding in attributes
27843 <span title="&">foo</span>
27845 <p><span title="&">foo</span>
27850 HTML tag with broken attribute value quoting
27852 parsoid=wt2html,html2html
27854 <span title="Hello world>Foo</span>
27856 <p><span title="Hello world">Foo</span>
27859 <p><span title="Hello world">Foo</span></p>
27863 Self-closed tag with broken attribute value quoting
27865 parsoid=wt2html,html2html
27867 <div title="Hello world />Foo
27869 <div title="Hello world"></div><p>Foo
27872 <div title="Hello world " data-parsoid='{"stx":"html","selfClose":true}'></div><p>Foo</p>
27876 Table with broken attribute value quoting
27878 parsoid=wt2html,html2html
27881 | title="Hello world|Foo
27886 <td title="Hello world">Foo
27892 <td title="Hello world">Foo
27898 Table with broken attribute value quoting on consecutive lines
27900 parsoid=wt2html,html2html
27903 | title="Hello world|Foo
27904 | style="color:red|Bar
27909 <td title="Hello world">Foo
27911 <td style="color:red">Bar
27917 <td title="Hello world">Foo
27918 </td><td style="color: red">Bar
27919 </td></tr></tbody></table>
27924 Accept empty td cell attribute
27927 | align="center" |foo|| |
27932 <td align="center">foo</td>
27939 Non-empty attributes in th-cells
27942 !Foo!! style="color: red" |Bar
27948 <th style="color: red">Bar
27954 Accept empty attributes in th-cells
27969 Empty table rows go away
27990 ### Parsoid-centric tests for testing RTing of inter-element separators
27991 ### Edge cases not tested by existing parser tests and specific to
27992 ### Parsoid-specific serialization strategies.
27996 RT-ed inter-element separators should be valid separators
28008 <tbody><tr class='mw-empty-elt' data-parsoid='{"startTagSrc":"|-","a":{"[[foo]]":null},"sa":{"[[foo]]":""},"autoInsertedEnd":true}'></tr>
28012 # Parsoid-only test of a DOM pass
28014 Trailing newlines in a deep dom-subtree that ends a wikitext line should be migrated out
28026 <tbody><tr data-parsoid='{"autoInsertedEnd":true,"autoInsertedStart":true}'><td data-parsoid='{"autoInsertedEnd":true}'><small data-parsoid='{"stx":"html","autoInsertedEnd":true}'>foo
28027 <p>bar</p></small></td></tr>
28031 <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>
28035 # Note that the "style" attribute is really a template parameter here.
28036 # The = would have to be {{=}} if you wanted the literal.
28038 Empty TD followed by TD with tpl-generated attribute
28043 |{{echo|style='color:red'}}|foo
28057 Indented table with an empty td
28076 Indented table with blank lines in between (T85627)
28095 <br /></p></td></tr>
28100 Indented block & table
28114 <div data-parsoid='{"stx":"html"}'>foo</div>
28116 <tr data-parsoid='{"autoInsertedEnd":true,"autoInsertedStart":true}'><td data-parsoid='{"autoInsertedEnd":true}'>foo</td></tr>
28121 Indent and comment before table row
28136 <!--hi--><tbody><tr data-parsoid='{"startTagSrc":"|-","autoInsertedEnd":true}'>
28137 <td data-parsoid='{"autoInsertedEnd":true}'> there</td></tr>
28141 # PHP parser omits empty TR
28143 Empty TR followed by a template-generated TR
28147 {{echo|<tr><td>foo</td></tr>}}
28152 <tbody><tr><td>foo</td></tr>
28157 <tr class='mw-empty-elt'></tr>
28158 <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}}]}'>
28163 ## PHP and parsoid output differ for this; as usual PHP omits empty
28164 ## elements, and since it strips the comments the TR is empty.
28166 Empty TR followed by mixed-ws-comment line should RT correctly
28182 <tr class='mw-empty-elt'></tr>
28185 <!--c--> </tr><!--d-->
28191 Multi-line image caption generated by templates with/without trailing newlines
28193 [[File:Foobar.jpg|thumb|300x300px|foo\n{{echo|A}}\n{{echo|B}}\n{{echo|C}}]]
28194 [[File:Foobar.jpg|thumb|300x300px|foo\n{{echo|A}}\n{{echo|B}}\n{{echo|C}}\n\n]]
28196 <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>
28197 <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>
28201 New element inserted (without intervening newlines) after an old sol-transparent node should serialize correctly
28205 <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>
28207 <link rel="mw:PageProp/Category" href="./Category:Foo" data-parsoid='{}'/><h1>new heading</h1>
28209 <includeonly>foo</includeonly>
28217 ## PHP emits broken html for this, and since this is primarily
28218 ## a Parsoid serializer test, marking this Parsoid only
28220 Improperly nested inline or quotes tags with whitespace in between
28222 <span> <s>x</span> </s>
28225 <p><span> <s>x</s></span><s> </s>
28226 <b> <i>x</i></b><i> </i>
28231 Encapsulate protected attributes from wt
28233 <div typeof="mw:placeholder stuff" data-mw="whoo" data-parsoid="weird" data-parsoid-other="no" about="time" rel="mw:true">foo</div>
28235 {| typeof="mw:placeholder stuff" data-mw="whoo" data-parsoid="weird" data-parsoid-other="no" about="time" rel="mw:true"
28239 <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>
28241 <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">
28242 <tbody><tr><td data-parsoid='{"autoInsertedEnd":true}'>ok</td></tr>
28246 ## Currently the p-wrapper is fragile in how it adds / removes transformations.
28247 ## Having nested or stray pre tags results in the attempt to add duplicates,
28248 ## causing an assertion fail. This test tries to prevent that situation.
28250 Ensure ParagraphWrapper can deal with stray closing pre tags
28259 ## Remex doesn't account for fostered content.
28261 1. Ensure fostered text content is wrapped in element nodes
28265 <table>hi</table><table>ho</table>
28267 hi<table></table>ho<table></table>
28269 <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>
28272 ## Remex doesn't account for fostered content.
28274 2. Ensure fostered text content is wrapped in element nodes (traps regressions around fostered marker on the element getting lost)
28276 parsoid=wt2html,wt2wt
28286 </td></tr></tbody></table>
28288 <p data-parsoid='{"fostered":true,"autoInsertedEnd":true,"autoInsertedStart":true}'> || ||</p>
28289 <table data-parsoid='{"stx":"html"}'>
28290 <tbody><tr data-parsoid='{"stx":"html","autoInsertedEnd":true}'><td data-parsoid='{"stx":"html","autoInsertedEnd":true}'> a
28291 </td></tr></tbody></table>
28294 ## Remex doesn't account for fostered content.
28296 Encapsulation properly handles null DSR information from foster box
28298 parsoid=wt2html,wt2wt
28300 {{echo|<table>foo<tr><td>bar</td></tr></table>}}
28302 <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>
28305 ## Remex doesn't account for fostered content.
28307 1. Encapsulate foster-parented transclusion content
28309 parsoid=wt2wt,wt2html
28311 <table>{{echo|foo<tr><td>bar</td></tr>}}</table>
28313 foo<table><tbody><tr><td>bar</td></tr></tbody></table>
28315 <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>
28319 2. Encapsulate foster-parented transclusion content
28321 parsoid=wt2wt,wt2html
28323 <table><div>{{echo|foo}}</div><tr><td>bar</td></tr></table>
28325 <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>
28336 3. Encapsulate foster-parented transclusion content
28338 parsoid=wt2wt,wt2html
28340 <table><div><p>{{echo|foo</p></div><tr><td>}}bar</td></tr></table>
28342 <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>"]}">
28355 4. Encapsulate foster-parented transclusion content
28357 parsoid=wt2wt,wt2html
28359 <table><div><p>{{echo|foo</p></div><tr><td>}}bar</td></tr></table>
28361 <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>"]}">
28373 ## Remex doesn't account for fostered content.
28375 5. Encapsulate foster-parented transclusion content
28377 parsoid=wt2wt,wt2html
28379 <table><tr><td><div><p>{{echo|foo</p></div></td>foo}}</tr></table>
28381 foo<table><tbody><tr><td><div><p>foo</p></div></td></tr></tbody></table>
28383 <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>
28386 ## Remex doesn't account for fostered content.
28388 6. Encapsulate foster-parented transclusion content
28390 parsoid=wt2wt,wt2html
28392 <table><tr><td><div><p>{{echo|foo</p></div></td>foo</tr></table>}}<p>ok</p>
28394 foo<table><tbody><tr><td><div><p>foo</p></div></td></tr></tbody></table><p>ok</p>
28396 <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>
28400 7. Encapsulate foster-parented transclusion content
28402 parsoid=wt2wt,wt2html
28404 <table>{{echo|<p>foo</p>}}<td>bar</td></table>
28406 <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>
28416 ## Remex doesn't account for fostered content.
28417 # Note that the wt is broken on purpose: the = should be {{=}} if you
28418 # don't want it to be a template parameter key.
28420 8. Encapsulate foster-parented transclusion content
28422 parsoid=wt2wt,wt2html
28425 }}{|{{echo|style='color:red'}}
28436 </td></tr></tbody></table>
28438 <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">
28439 </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">
28442 </td></tr></tbody></table>
28445 ## Remex doesn't account for fostered content.
28447 9. Encapsulate foster-parented transclusion content
28449 parsoid=wt2wt,wt2html
28451 <table>{{echo|hi</table>hello}}
28453 hi<table></table><p>hello
28456 <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>
28460 Table in fosterable position
28471 <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">
28473 <table about="#mwt1" data-parsoid='{"autoInsertedEnd":true}'></table>
28479 # Parsoid only for T66747
28481 Properly encapsulate empty-content transclusions in fosterable positions
28489 <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"}]]}'>
28494 ## No longer captures its original intention
28496 Always encapsulate foster box when template range is expanded to table
28510 T115289: Unclosed table
28512 {{echo|<table>}}<!--c-->[[Category:Two]]
28514 <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>
28518 T115289: Don't migrate newlines out of tables with fostered content
28520 <table><td></td>{{echo|<tr>[[Category:One]]}}<!--c-->[[Category:Two]]
28522 <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>
28526 T73074: More fostering fun
28528 <table><td></td>{{echo|<tr>}}<!--c-->[[Category:Two]]
28530 <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>
28534 Support <object> element with .data attribute
28538 <object data="test.swf"></object>
28540 <object data="test.swf"></object>
28544 Don't block XML namespace declaration
28546 <span xmlns:dct="http://purl.org/dc/terms/" property="dct:title">MediaWiki</span>
28548 <p><span xmlns:dct="http://purl.org/dc/terms/" property="dct:title">MediaWiki</span>
28551 <p><span xmlns:dct="http://purl.org/dc/terms/" data-x-property="dct:title" data-parsoid='{"stx":"html"}'>MediaWiki</span></p>
28554 # -----------------------------------------------------------------
28555 # The following section of tests are primarily to spec requirements
28556 # around Parsoid's serialization (old, new, edited content)
28558 # All these tests are marked Parsoid html2wt and html2html only
28559 # ----------------------------------------------------------------
28562 Ignore rel attribute in a-tags during serialization to url-links
28566 <a href='http://en.wikipedia.org/wiki/Foobar'>http://en.wikipedia.org/wiki/Foobar</a>
28567 <a href='http://en.wikipedia.org/wiki/Foobar' rel='mw:ExtLink'>http://en.wikipedia.org/wiki/Foobar</a>
28568 <a href='http://en.wikipedia.org/wiki/Foobar' rel='mw:WikiLink'>http://en.wikipedia.org/wiki/Foobar</a>
28570 http://en.wikipedia.org/wiki/Foobar
28571 http://en.wikipedia.org/wiki/Foobar
28572 http://en.wikipedia.org/wiki/Foobar
28575 # 'mi' is a localinterwiki prefix as well as a language
28577 Serialize interwiki links pointing to the current wiki as plain wiki links (T67869)
28581 <p><a rel="mw:ExtLink" href="http://mi.wikipedia.org/wiki/Foo">Foo</a></p>
28587 Parsoid should accept interwiki shortcuts
28591 <p><a rel='mw:WikiLink' href='./fr:Foo'>Foo</a>
28592 <a rel='mw:ExtLink' href='./fr:Foo'>Foo</a>
28593 <a href='./fr:Foo'>Foo</a></p>
28594 <p><a rel='mw:WikiLink' href='fr%3AFoo'>Foo</a>
28595 <a rel='mw:ExtLink' href='fr%3AFoo'>Foo</a>
28596 <a href='fr%3AFoo'>Foo</a></p>
28597 <p><a href='FR%3AFoo'>Foo</a>
28598 <a href='./FR:Foo'>Foo</a></p>
28613 Parsoid should not accept invalid interwiki shortcuts
28617 <p><a rel='mw:WikiLink' href='news:Foo'>Foo</a>
28618 <a rel='mw:ExtLink' href='news:Foo'>Foo</a>
28619 <a href='news:Foo'>Foo</a></p>
28628 New wikilinks should be serialized properly
28632 <a rel="mw:WikiLink" href="./Foo" title="Foo" data-parsoid='{}'>Foo</a>
28633 <a rel="mw:WikiLink" href="./Foo" title="Foo">Foo</a>
28634 <a href="//en.wikipedia.org/wiki/Foo">//en.wikipedia.org/wiki/Foo</a>
28635 <a href="http://en.wikipedia.org/wiki/Foo">http://en.wikipedia.org/wiki/Foo</a>
28636 <a href="//en.wikipedia.org/wiki/Foo_bar">//en.wikipedia.org/wiki/Foo bar</a>
28640 [[:en:Foo|//en.wikipedia.org/wiki/Foo]]
28641 http://en.wikipedia.org/wiki/Foo
28642 [[:en:Foo_bar|//en.wikipedia.org/wiki/Foo bar]]
28646 New wiki links (href variations)
28650 <a rel="mw:WikiLink" href="./Foo_bar">Foo_bar</a>
28651 <a rel="mw:WikiLink" href="Foo_bar">Foo_bar</a>
28652 <a rel="mw:WikiLink" href="Foo bar">Foo_bar</a>
28653 <a rel="mw:WikiLink" href="./Toxine_bact%C3%A9rienne">Toxine bactérienne</a>
28658 [[Toxine bactérienne]]
28662 New wiki links (content string variations)
28666 <a rel="mw:WikiLink" href="./Foo_bar">Foo_bar</a>
28667 <a rel="mw:WikiLink" href="./Foo_bar">Foo bar</a>
28668 <a rel="mw:WikiLink" href="./Foo_bar">./Foo_bar</a>
28672 [[Foo_bar|./Foo_bar]]
28676 New category links (href variations)
28680 <link rel="mw:PageProp/Category" href="./Category:Toxine_bactérienne" />
28681 <link rel="mw:PageProp/Category" href="./Category:Toxine_bact%C3%A9rienne" />
28682 <link rel="mw:PageProp/Category" href="Category:Toxine_bact%C3%A9rienne" />
28684 [[Category:Toxine bactérienne]]
28685 [[Category:Toxine bactérienne]]
28686 [[Category:Toxine bactérienne]]
28690 New sol transparent links don't need indent-pre nowiki protection
28695 <link rel="mw:PageProp/redirect" href="./Main_Page">
28696 <!-- this is good --> <link rel="mw:PageProp/Category" href="./Category:Good" />
28697 <!-- this is great --> <link rel="mw:PageProp/Category" href="./Kategorie:Great" />
28699 #WEITERLEITUNG [[Main Page]]
28700 <!-- this is good --> [[Category:Good]]
28701 <!-- this is great --> [[Kategorie:Great]]
28705 New interlanguage links (href variations)
28709 <link rel="mw:PageProp/Language" href="http://es.wikipedia.org/wiki/Toxine bactérienne" />
28710 <link rel="mw:PageProp/Language" href="http://es.wikipedia.org/wiki/Toxine_bactérienne" />
28711 <link rel="mw:PageProp/Language" href="http://es.wikipedia.org/wiki/Toxine_bact%C3%A9rienne" />
28713 [[es:Toxine bactérienne]]
28714 [[es:Toxine_bactérienne]]
28715 [[es:Toxine_bactérienne]]
28719 Image: Modifying size of an image (1)
28722 "modes": ["wt2wt"],
28724 ["img[height]", "attr", "height", "22"],
28725 ["img[width]", "attr", "width", "200"]
28729 [[Image:Foobar.jpg|230x230px]]
28731 [[Image:Foobar.jpg|200x200px]]
28735 Image: Modifying size of an image (2)
28738 "modes": ["wt2wt"],
28740 ["img[height]", "attr", "height", "100"],
28741 ["img[width]", "attr", "width", "500"]
28745 [[Image:Foobar.jpg|230x230px]]
28747 [[Image:Foobar.jpg|500x500px]]
28750 # Change in size is ignored so long as class='mw-default-size'
28752 Image: Modifying size of an image (3)
28755 "modes": ["wt2wt"],
28757 ["figure[class]", "removeClass", "mw-default-size"],
28758 ["figure img", "attr", "height", "19"],
28759 ["figure img", "attr", "width", "170"]
28763 [[Image:Foobar.jpg|thumb]]
28765 [[Image:Foobar.jpg|thumb|170x170px]]
28769 Image: Modifying alignment of an image (T50665)
28772 "modes": ["wt2wt"],
28774 ["figure[class]", "removeClass", "mw-halign-right"],
28775 ["figure[class]", "addClass", "mw-halign-left"]
28779 [[Image:Foobar.jpg|thumb|caption|right]]
28781 [[Image:Foobar.jpg|thumb|caption|left]]
28785 Image: Modifying mw-default-size of an frameless image (T64805)
28788 "modes": ["wt2wt"],
28790 ["figure.mw-default-size", "removeClass", "mw-default-size"]
28794 [[Image:Foobar.jpg|frameless|right]]
28796 [[Image:Foobar.jpg|frameless|right|220x220px]]
28800 Image: Modifying valign of an image (T51221)
28803 "modes": ["wt2wt"],
28805 ["*[typeof=\"mw:Image\"]", "removeClass", "mw-valign-middle"],
28806 ["*[typeof=\"mw:Image\"]", "addClass", "mw-valign-text-top"]
28810 [[File:Foobar.jpg|20px|middle]]
28812 [[File:Foobar.jpg|20px|text-top]]
28816 Image: Modifying alt attribute of an image (T58400)
28819 "modes": ["wt2wt"],
28821 ["img[alt]", "attr", "alt", "some alternate edited text"]
28825 [[File:Foobar.jpg|thumb|some caption|alt=some alternate text]]
28827 [[File:Foobar.jpg|thumb|some caption|alt=some alternate edited text]]
28831 Image: Modifying caption of an image
28834 "modes": ["wt2wt"],
28836 ["figcaption", "text", "new caption"]
28840 [[Image:Foobar.jpg|thumb|original caption]]
28842 [[Image:Foobar.jpg|thumb|new caption]]
28846 Image: empty alt attribute (T50924)
28848 [[File:Foobar.jpg|thumb|alt=|bar]]
28850 <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>
28852 <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>
28856 Image: new attributes should be serialized in wiki's language for RTL languages (T53852)
28862 <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>
28864 [[Imagen:Foobar.jpg|derecha|miniaturadeimagen]]
28868 Image: Block level image should have \n before and after
28871 [[File:Foobar.jpg|right|thumb|150x150px]]
28875 <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>
28880 Image: New block level image should have \n before and after (existing content)
28883 [[File:Foobar.jpg|right|thumb|150x150px]]
28887 <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>
28892 Image: upright option (parsoid)
28894 [[File:Foobar.jpg|thumb|upright|caption]]
28895 [[File:Foobar.jpg|thumb|upright=0.5|caption]]
28896 [[File:Foobar.jpg|thumb|500x500px|upright=0.5|caption]]
28898 <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>
28899 <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>
28900 <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>
28904 Image: upright option is ignored on inline and frame images (parsoid)
28906 [[File:Foobar.jpg|500x500px|upright=0.5|caption]]
28908 <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>
28912 Image: in template parameter with empty parameter
28914 {{echo|[[File:Foobar.jpg|link=]]}}
28916 <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>
28920 Image: from basic HTML (1)
28924 <span typeof="mw:Image">
28925 <img src="./File:Foobar.jpg" width=100 height=100 alt="Alt">
28928 [[File:Foobar.jpg|link=|alt=Alt|100x100px]]
28932 Image: from basic HTML (2)
28936 <img src="./File:Foobar.jpg" width=100 height=100 alt="Alt">
28938 [[File:Foobar.jpg|link=|alt=Alt|100x100px]]
28942 Image: from basic HTML (3)
28946 <a href="Main"><img src="./File:Foobar.jpg" width=100 height=100 alt="Alt"></a>
28948 [[File:Foobar.jpg|link=Main|alt=Alt|100x100px]]
28952 Image: from basic HTML (4)
28956 <img src="./File:Foobar.jpg">
28958 [[File:Foobar.jpg|link=]]
28962 Image: Invalid title as link
28964 [[File:Foobar.jpg|link=<]]
28966 <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>
28969 <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>
28973 Lists: Serialize correctly even when list content is wrapped in p-tags (like VE does)
28978 <li><p>foo</p></li>
28985 Lists: Serialize correctly even when list tags has unneeded whitespace between tags
28989 <ul> <li>foo</li></ul>
28995 Don't strip leading whitespace when handling indent-pre suppressing tags
29000 <tr><td> indented row</td></tr>
29003 <b>This is very bold of you!</b>
29006 indented cell (no pre-wrapping!)
29016 '''This is very bold of you!'''
29020 indented cell (no pre-wrapping!)
29028 Nowiki-wrap leading whitespace when handling indent-pre inducing tags
29050 <nowiki> </nowiki></span>bar2
29053 <nowiki> </nowiki><span>bar</span>
29056 <nowiki> </nowiki><span>foo</span>
29061 Lists: Dont insert newlines in a serialized list item.
29065 <ul><li>a<br>b</li><li>c</li></ul>
29072 1. Headings: Force sol-transparent links and behavior switches to serialize before/after
29075 "modes": ["html2wt"],
29076 "scrubWikitext": false
29079 <h2>hello there<link href="./Category:A1" rel="mw:PageProp/Category" /></h2>
29080 <h2><link href="./Category:A2" rel="mw:PageProp/Category" />hi pal</h2>
29082 <h2><!--foo--> <link href="./Category:A3" rel="mw:PageProp/Category" /> how goes it</h2>
29083 <h2>it goes well <link href="./Category:A4" rel="mw:PageProp/Category" /> <!--bar--></h2>
29085 <h2 data-parsoid='{}'>howdy<link href="./Category:A5" rel="mw:PageProp/Category" /></h2>
29087 <h2><meta property="mw:PageProp/toc" /> ok</h2>
29089 == hello there [[Category:A1]] ==
29091 == [[Category:A2]] hi pal ==
29093 == <!--foo--> [[Category:A3]] how goes it ==
29095 == it goes well [[Category:A4]] <!--bar--> ==
29097 ==howdy [[Category:A5]]==
29103 2. Headings: Force sol-transparent links and behavior switches to serialize before/after
29106 "modes": ["html2wt"],
29107 "scrubWikitext": true
29110 <h2>hello there<link href="./Category:A1" rel="mw:PageProp/Category" /></h2>
29111 <h2><link href="./Category:A2" rel="mw:PageProp/Category" />hi pal</h2>
29113 <h2><!--foo--> <link href="./Category:A3" rel="mw:PageProp/Category" /> how goes it</h2>
29114 <h2>it goes well <link href="./Category:A4" rel="mw:PageProp/Category" /> <!--bar--></h2>
29116 <h2><meta property="mw:PageProp/toc" /> ok</h2>
29124 <!--foo-->[[Category:A3]]
29129 [[Category:A4]] <!--bar-->
29137 Headings: Don't hoist metas that come from templates
29140 "modes": ["html2wt"],
29141 "scrubWikitext": true
29144 <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>
29146 == {{echo|foo [[Category:Foo]]}} ==
29150 Headings: Category in ref isn't hoisted
29153 "modes": ["html2wt"],
29154 "scrubWikitext": true
29157 <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>
29159 <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>
29162 [[Category:Baz]] </ref> ==
29168 Parsoid: Serialize positional parameters with = in them as named parameter
29172 <p about="#mwt1" typeof="mw:Transclusion"
29173 data-mw='{"parts":[{"template":{"target":{"wt":"echo","href":"./Template:Echo"},"params":{"1":{"wt":"f=oo"}},"i":0}}]}'>foo</p>
29175 <p about="#mwt1" typeof="mw:Transclusion"
29176 data-mw='{"parts":[{"template":{"target":{"wt":"echo","href":"./Template:Echo"},"params":{"1":{"wt":"f=oo"}, "2":{"wt":"bar"}},"i":0}}]}'>foo</p>
29178 <!--Orig params with data-parsoid has heuristics for handling = chars-->
29179 <!--FIXME: But maybe the heuristic needs fixing to apply to new params as well-->
29180 <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>
29184 {{echo|1=f=oo|2=bar}}
29186 <!--Orig params with data-parsoid has heuristics for handling = chars-->
29187 <!--FIXME: But maybe the heuristic needs fixing to apply to new params as well-->
29188 {{echo|<nowiki>f=oo</nowiki>|bar}}
29192 Parsoid: Serialize positional parameters with = in extlink as named parameter
29196 <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>
29198 {{echo|1=http://stuff?is=ok}}
29202 Parsoid: Correctly serialize block-node children when they are a combination of text and p-nodes
29206 <div>a<p>b</p></div>
29227 Substrings resembling wikitext in hrefs should not get nowiki escapes
29231 <a rel="mw:WikiLink" href="./Foo''bar''baz">Foo''bar''baz</a>
29237 Enforce single-line context in the serializer
29244 <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">
29245 </span><span about="#mwt1">you</span> </h2>
29247 <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>
29249 <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
29250 there</span></li></ol>
29262 ho </dt><dd data-parsoid='{"stx":"row"}'> hi
29269 </tbody></table></dd></dl>
29273 == hi {{bogus|there
29284 * foo '''bar''' baz
29296 Serialize new placeholder space without spans
29300 <p>foo<span typeof="mw:Placeholder"> </span>: bar</p>
29302 <p>foo<span typeof="mw:DisplaySpace mw:Placeholder" data-parsoid='{"src":" ","isDisplayHack":true}'> </span>: bar</p>
29304 <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>
29310 <ref>foo : bar</ref>ok
29314 #-----------------------
29315 # Tag minimization tests
29316 #-----------------------
29319 1. I/B quote minimization: wikitext-only tags should be combined
29323 <p><i>A</i><i>B</i></p>
29324 <p><b>A</b><b>B</b></p>
29325 <p><i>A</i><b><i>B</i></b></p>
29326 <p><b>A</b><i><b>B</b></i></p>
29327 <p><b>A</b><i><b>B</b><b>C</b></i><b>D</b></p>
29328 <p><i><b>A</b></i><i><b>B</b></i></p>
29329 <p><i><b>A</b></i><b><i>B</i></b></p>
29330 <p><b><i>A</i></b><i><b>B</b></i></p>
29350 2. I/B quote minimization: wikitext and html tags should not be combined
29354 <p><i>A</i><i data-parsoid='{"stx":"html"}'>B</i></p>
29355 <p><i>A</i><b><i data-parsoid='{"stx":"html"}'>B</i></b></p>
29359 ''A''<nowiki/>'''<i>B</i>'''
29363 3. I/B quote minimization: templated content stops minimization
29367 <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>
29368 <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>
29370 ''A''{{echo|''B''}}
29372 ''A''{{echo|'''''B'''''}}
29376 4. I/B quote minimization: new content should be mimimized with adjacent old content
29380 <p><i>A</i><i>B</i></p>
29381 <p><b>A</b><b>B</b></p>
29382 <p><i>A</i><b><i>B</i></b></p>
29392 5a. Merge adjacent quote nodes if they've been edited
29395 "modes": ["wt2wt", "selser"],
29397 ["p", "contents", "remove", ":contains('b')"]
29407 5b. Merge adjacent quote nodes if they've been edited
29410 "modes": ["wt2wt", "selser"],
29416 ''a''<span id="x">b</span>''c''
29422 1. Merge adjacent link nodes as long as at least one element is new
29425 "modes": ["html2wt"],
29426 "scrubWikitext": true
29429 <a rel="mw:WikiLink" href="./Football">Foot</a><a rel="mw:WikiLink" href="./Football">ball</a>
29430 <a data-parsoid="{}" rel="mw:WikiLink" href="./Football">Foot</a><a rel="mw:WikiLink" href="./Football">ball</a>
29431 <a data-parsoid="{}" rel="mw:WikiLink" href="./Football">Foot</a><a data-parsoid="{}" rel="mw:WikiLink" href="./Football">ball</a>
29435 [[Football|Foot]][[Football|ball]]
29439 2. Merge adjacent link nodes and enable additional normalizations
29442 "modes": ["html2wt"],
29443 "scrubWikitext": true
29446 <a rel="mw:WikiLink" href="./Football"><i>Foot</i></a><a rel="mw:WikiLink" href="./Football"><i>ball</i></a>
29452 3. Don't merge adjacent link nodes if scrubWikitext is false
29455 "modes": ["html2wt"],
29456 "scrubWikitext": false
29459 <a rel="mw:WikiLink" href="./Football">Foot</a><a rel="mw:WikiLink" href="./Football">ball</a>
29461 [[Football|Foot]][[Football|ball]]
29465 1. Move format tags outside of WikiLink
29468 "modes": ["html2wt"],
29469 "scrubWikitext": true
29472 <a rel="mw:WikiLink" href="./Football"><i>Football</i></a>
29473 <a rel="mw:WikiLink" href="./Football"><i><b>Football</b></i></a>
29474 <a rel="mw:WikiLink" href="./Football"><u><i><b>Football</b></i></u></a>
29477 '''''[[Football]]'''''
29478 <u>'''''[[Football]]'''''</u>
29482 2. Move format tags outside of WikiLink with mergable A tags
29485 "modes": ["html2wt"],
29486 "scrubWikitext": true
29489 <a rel="mw:WikiLink" href="./Football"><i><b>Foot</b></i></a><a rel="mw:WikiLink" href="./Football"><i><b>ball</b></i></a>
29491 '''''[[Football]]'''''
29495 3. Move format tags outside of WikiLink while preserving formats already outside WikiLink
29498 "modes": ["html2wt"],
29499 "scrubWikitext": true
29502 <font color="red"><a rel="mw:WikiLink" href="./Foo" title="Foo" class="mw-redirect"><u><b>Foo</b></u></a></font>
29504 <font color="red"><u>'''[[Foo]]'''</u></font>
29508 4. Do not move format tags outside of WikiLink which includes attributes color, style and class
29511 "modes": ["html2wt"],
29512 "scrubWikitext": true
29515 <a rel="mw:WikiLink" href="./Foo" title="Foo" class="mw-redirect"><font color="red">Foo</font></a>
29516 <a rel="mw:WikiLink" href="./Foo" title="Foo" class="mw-redirect"><span style="color: blue; font-size: 46px;">Foo></span></a>
29517 <a rel="mw:WikiLink" href="./Foo" title="Foo" class="mw-redirect"><span class="Bar">Foo</span></a>
29519 [[Foo|<font color="red">Foo</font>]]
29520 [[Foo|<span style="color: blue; font-size: 46px;">Foo></span>]]
29521 [[Foo|<span class="Bar">Foo</span>]]
29525 5. T194083 Regression test: Manual edit test that also enables scrubWikitext to move format tags outside wikilinks
29528 "modes": ["selser"],
29529 "scrubWikitext": true,
29531 ["a", "html", "<i>Foo</i>"]
29541 6. Regression test: Manual edit test to ensure diff markers are not lost
29544 "modes": ["selser"],
29545 "scrubWikitext": true,
29547 ["i", "wrap", "<a href='./Foo' rel='mw:WikiLink'></a>"]
29557 7. T194083 Regression test: Manual edit test to ensure nested diff markers aren't inserted
29560 "modes": ["selser"],
29561 "scrubWikitext": true,
29563 ["div", "after", "\n<p><a href='./Foo' rel='mw:WikiLink'>Foo </a>, placeholder</p>"]
29567 <div>placeholder</div>
29569 <div>placeholder</div>
29570 [[Foo]] , placeholder
29573 #------------------------------
29574 # End of tag minimization tests
29575 #------------------------------
29578 T56262: New entities
29582 <span typeof="mw:Entity"> </span>
29587 ## Note that there is no wikitext output for 'unknownproperty' ##
29588 ## Unknown magic words are silently dropped ##
29595 <meta property='mw:PageProp/toc' />
29596 <meta property='mw:PageProp/notoc' />
29597 <meta property='mw:PageProp/forcetoc' />
29598 <meta property='mw:PageProp/index' />
29599 <meta property='mw:PageProp/noindex' />
29600 <meta property='mw:PageProp/nogallery' />
29601 <meta property='mw:PageProp/noeditsection' />
29602 <meta property='mw:PageProp/notitleconvert' />
29603 <meta property='mw:PageProp/nocontentconvert' />
29604 <meta property='mw:PageProp/unknownproperty' />
29614 __NOCONTENTCONVERT__
29618 Consecutive <pre>s should not get merged
29620 parsoid=html2wt,html2html
29622 <pre>a</pre><pre>b</pre>
29650 Edited ISBN links not serializable as ISBN links should serialize as wikilinks
29654 <a href="./Special:BookSources/1234567890" rel="mw:ExtLink">ISBN 1234567895</a>
29656 [[Special:BookSources/1234567890|ISBN 1234567895]]
29660 Edited RFC links not serializable as RFC links should serialize as extlinks
29664 <a href="https://tools.ietf.org/html/rfc123" rel="mw:ExtLink">New RFC</a>
29666 [https://tools.ietf.org/html/rfc123 New RFC]
29670 Edited PMID links not serializable as PMID links should serialize as extlinks
29674 <a href="//www.ncbi.nlm.nih.gov/pubmed/123?dopt=Abstract" rel="mw:ExtLink">New PMID</a>
29676 [//www.ncbi.nlm.nih.gov/pubmed/123?dopt=Abstract New PMID]
29680 WTS of autolinks with trailing/surrounding context
29684 <p><a href="http://cscott.net">http://cscott.net</a><b>foo</b></p>
29685 <p><a href="http://cscott.net">http://cscott.net</a><b data-parsoid='{"stx":"html"}'>foo</b></p>
29686 <p><b><a href="http://cscott.net">http://cscott.net</a></b></p>
29687 <p><b><a href="http://cscott.net">http://cscott.net</a> </b></p>
29688 <p><b><a href="http://cscott.net">http://cscott.net</a>x</b></p>
29689 <p><a href="http://cscott.net">http://cscott.net</a>x</p>
29691 http://cscott.net'''foo'''
29693 http://cscott.net<b>foo</b>
29695 '''http://cscott.net'''
29697 '''http://cscott.net '''
29699 '''http://cscott.net<nowiki/>x'''
29701 http://cscott.net<nowiki/>x
29705 WTS of autolinks with nowikis (round-trip)
29707 x<nowiki/>http://cscott.net<nowiki/>x
29709 <p>x<a rel="mw:ExtLink" class="external free" href="http://cscott.net">http://cscott.net</a>x</p>
29712 # this is the "easy" test because it leaves in place all the
29713 # data-parsoid information indicating this is an autolink
29715 WTS of autolinks with escapes (editing)
29718 "modes": ["wt2wt"],
29720 [ "span", "remove" ]
29724 x<nowiki/>http://cscott.net<nowiki/>x
29726 x<nowiki/>http://cscott.net<nowiki/>x
29730 WTS of edited autolink-like text (T103364)
29733 "modes": ["wt2wt"],
29735 [ "span[typeof]", "removeAttr", "typeof" ]
29739 Not a link: <nowiki>http://example.com</nowiki>.
29741 Not a link: <span><nowiki>http://example.com</nowiki></span>.
29745 WTS of newly-authored autolink-like text (T103364)
29749 <p>http://example.com is not a link.</p>
29751 <nowiki>http://example.com</nowiki> is not a link.
29755 WTS of autolink-like text after an autolink (T108563)
29759 <p><a rel="mw:ExtLink" href="http://example.com">http://example.com</a> http://example.com is not a link.</p>
29761 http://example.com <nowiki>http://example.com</nowiki> is not a link.
29765 Magic links inside links (not autolinked)
29767 [[Foo|http://example.com]]
29770 [[Foo|ISBN 123456789x]]
29772 [http://foo.com http://example.com]
29773 [http://foo.com RFC 1234]
29774 [http://foo.com PMID 1234]
29775 [http://foo.com ISBN 123456789x]
29777 <p><a href="/wiki/Foo" title="Foo">http://example.com</a>
29778 <a href="/wiki/Foo" title="Foo">RFC 1234</a>
29779 <a href="/wiki/Foo" title="Foo">PMID 1234</a>
29780 <a href="/wiki/Foo" title="Foo">ISBN 123456789x</a>
29781 </p><p><a rel="nofollow" class="external text" href="http://foo.com">http://example.com</a>
29782 <a rel="nofollow" class="external text" href="http://foo.com">RFC 1234</a>
29783 <a rel="nofollow" class="external text" href="http://foo.com">PMID 1234</a>
29784 <a rel="nofollow" class="external text" href="http://foo.com">ISBN 123456789x</a>
29787 <p><a rel="mw:WikiLink" href="./Foo" title="Foo">http://example.com</a>
29788 <a rel="mw:WikiLink" href="./Foo" title="Foo">RFC 1234</a>
29789 <a rel="mw:WikiLink" href="./Foo" title="Foo">PMID 1234</a>
29790 <a rel="mw:WikiLink" href="./Foo" title="Foo">ISBN 123456789x</a></p>
29792 <p><a rel="mw:ExtLink" class="external text" href="http://foo.com">http://example.com</a>
29793 <a rel="mw:ExtLink" class="external text" href="http://foo.com">RFC 1234</a>
29794 <a rel="mw:ExtLink" class="external text" href="http://foo.com">PMID 1234</a>
29795 <a rel="mw:ExtLink" class="external text" href="http://foo.com">ISBN 123456789x</a></p>
29799 Magic links inside image captions (autolinked)
29801 [[File:Foobar.jpg|thumb|http://example.com]]
29802 [[File:Foobar.jpg|thumb|RFC 1234]]
29803 [[File:Foobar.jpg|thumb|PMID 1234]]
29804 [[File:Foobar.jpg|thumb|ISBN 123456789x]]
29806 <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>
29807 <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>
29808 <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>
29809 <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>
29811 <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>
29812 <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>
29813 <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>
29814 <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>
29818 WTS of magic word text (T109371)
29823 <p><a href="http://foo.com" rel="mw:ExtLink">RFC 1234</a></p>
29824 <p><a href="./Foo" rel="mw:WikiLink">RFC 1234</a></p>
29826 <nowiki>RFC 1234</nowiki>
29828 [http://foo.com RFC 1234]
29834 Edited Redirect link should emit a non-piped wikitext link
29838 <link rel="mw:PageProp/redirect" href="Bar" data-parsoid='{"a":{"href":"./Foo"},"sa":{"href":"Foo"}}'>
29844 T75121: Infer extension name from typeOf if data-mw is not present
29846 parsoid={ "modes": ["html2wt"], "suppressErrors": true }
29848 <div typeOf="mw:Extension/foo"></div>
29853 # Note that the <p> wrapping isn't present in PHP parser output
29854 # The important thing for this test is that P-wrapping doesn't
29855 # interfere with the <nowiki> protection for leading - in <td>
29856 # (which isn't necessary for <th>).
29858 T88318: p-wrapped dash in table.
29860 parsoid=html2wt,wt2wt
29863 <tr><th><p>-</p></th><th><p>- </p></th></tr>
29864 <tr><td><p>-</p></td><td><p>- </p></td></tr>
29865 <tr><td><small>-</small></td><td><br/><p>-</p></td><td><br/>-</td></tr>
29872 |<nowiki>-</nowiki>
29873 |<nowiki>- </nowiki>
29893 <td><small>-</small>
29900 </td></tr></tbody></table>
29904 T149209: WTS: Handle newlines in table cells properly
29912 </td><td data-parsoid='{"stx":"row"}'>c</td></tr>
29914 </td><td data-parsoid='{"stx":"row", "startTagSrc": "{{!}}{{!}}"}'>y</td></tr>
29920 </th><th data-parsoid='{"stx":"row"}'>c</th></tr>
29922 </th><th data-parsoid='{"stx":"row"}'>y</th></tr>
29944 T149209: Selser: Handle newlines in table cells properly
29947 "modes": ["selser"],
29949 [ "#h1", "html", "a\nb\n" ],
29950 [ "#h2", "html", "a\nb\n" ],
29951 [ "#c1", "html", "a\nb\n" ],
29952 [ "#c2", "html", "<p>a</p>" ],
29953 [ "#c3", "html", "<p>a</p>" ],
29954 [ "#c4", "html", "edit-me<p>a</p>" ]
29959 ! id="h1" |edit-me!!1
29961 ! id="h2" |edit-me||2
29963 | id="c1" |edit-me||3
29965 | id="c2" |edit-me||4
29967 | id="c3" |edit-me||p||q||r
29969 | id="c4" |edit-me||p||q||r
29998 HTML id attribute with Parsoid-like element ids should not be serialized to wikitext
30003 <td id='mwAc'>foo</td>
30004 <td id='serialize-this'>bar</td>
30009 | id="serialize-this" |bar
30014 Parsoid-like element ids should not be serialized to wikitext unless shadowed
30018 <div id="mwAQ" data-parsoid='{"stx":"html","a":{"id":"mwAQ"},"sa":{"id":"hello"}}'>ok</div>
30020 <div id="hello">ok</div>
30024 Testing serialization after deletion in references
30027 "modes": ["wt2wt"],
30033 hi <ref><div id="x">ho</div></ref>
30043 Testing serialization after deletion of table cells
30046 "modes": ["wt2wt", "selser"],
30054 | id="x" |c1 {{!}}{{!}}{{!}}c2 |||c3
30064 Testing selser after addition of new row before first row (T125419)
30067 "modes": ["wt2wt", "selser"],
30069 [ "tr", "before", "<tr><td>X</td></tr>" ]
30085 Serialize new table rows in a HTML table using HTML tags
30088 "modes": ["wt2wt", "selser"],
30090 [ "tr", "before", "<tr><td>X</td></tr>" ]
30094 <table><tr><td>a</td></tr></table>
30096 <table><tr><td>X</td></tr><tr><td>a</td></tr></table>
30100 Serialize new table cells in a HTML row using HTML tags
30103 "modes": ["wt2wt", "selser"],
30105 [ "td", "before", "<td>X</td>" ]
30109 <table><tr><td>a</td></tr></table>
30111 <table><tr><td>X</td><td>a</td></tr></table>
30115 Serialize wikitext list items as HTML list items when embedded in a HTML list
30119 <ul data-parsoid='{"stx": "html"}'>
30120 <li data-parsoid='{}'>a</li>
30135 # Nested list should be inside <li>, that is
30136 # <ul><li>foo<ul>..</ul></li></ul> instead of
30137 # <ul><li>foo</li><ul>..</ul></ul>
30138 # See https://stackoverflow.com/questions/5899337/proper-way-to-make-html-nested-list
30140 Wikitext lists can be nested inside HTML lists
30144 <ul data-parsoid='{"stx": "html"}'>
30145 <li data-parsoid='{"stx": "html"}'>a
30146 <ul><li>b</li></ul>
30150 <ul data-parsoid='{"stx": "html"}'>
30152 <ul><li>y</li></ul>
30170 <ul><li>b</li></ul>
30175 <ul><li>y</li></ul>
30184 "modes": ["wt2wt"],
30186 [ "#xyz", "before", "<b>before</b> stuff " ],
30187 [ "#xyz", "after", " stuff <i>after</i>" ],
30188 [ "#xyz", "html", "x <b>y</b> z" ]
30192 <span id="xyz">hello</span>
30194 '''before''' stuff <span id="xyz">x '''y''' z</span> stuff ''after''
30198 Never serialize a-tag as html, regardless of what data-parsoid has to say
30200 parsoid={ "modes": ["html2wt"], "suppressErrors": true }
30202 <a rel="mw:WikiLink" href="./Foo" title="Foo" data-parsoid='{"stx":"html"}'>Foo</a>
30207 ## SSS FIXME: This is broken output nevertheless.
30208 ## What might be a reasonable non-broken output for this?
30209 ## This is an edge case unlikely to be seen in production
30210 ## that I am not wasting more time on this right now.
30212 Never serialize a-tag as html, no matter what attributes it has
30214 parsoid={ "modes": ["html2wt"], "suppressErrors": true }
30216 <a bad='true' href='http://boo.org'><img src='http://boohoo.org' /></a>
30218 [http://boo.org http://boohoo.org]
30221 # Misnested is an indication that selser can reuse the source but these have
30222 # shown to sneak through on occasion. See T101768.
30223 # The original wikitext here is: [http://test.com [[one]] two three]
30225 Strip span tags added to mark misnested links
30229 <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>
30231 [http://test.com][[one]] two three
30235 Catch regression when unpacking misnested links
30239 {{echo|hi}}[http://example.com [[ho]]]
30241 <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>
30245 Catch regression when unpacking with trailing content
30247 {{echo|Foo <references/> bar}}
30249 <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>
30253 Use data-parsoid.firstWikitextNode to compute newline constraints for template content
30257 <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|}"]}'>
30269 ## This test verifies the presence and computation of this attribute indirectly
30270 ## by making an edit and ensuring that the serialization is correct (which it would be
30271 ## only if firstWikitextNode is properly set).
30273 data-parsoid.firstWikitextNode should be computed properly in the presence of fostered content
30276 "modes": ["wt2wt"],
30278 [ "div#x", "remove" ],
30279 [ "div", "before", "<div>new</div>" ]
30283 <div id="x">foo</div>
30285 {{echo|<div>boo</div>
30293 {{echo|<div>boo</div>
30299 # --------------------------------------------
30300 # Tests spec'ing wikitext serialization norms |
30301 # --------------------------------------------
30304 Serialize multi-line indent-pre starting with wikitext syntax
30318 1. Categories should always be serialized on their own line
30322 foo<link rel="mw:PageProp/Category" href="./Category:Foo">bar
30330 2. Categories that are part of templates should not introduce a line break
30332 foo {{echo|<span>bar</span> [[Category:baz]]}} bar
30334 <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>
30337 # Careful while editing these next 2 tests. There are \u200f characters
30338 # before and after the <link> tags in the HTML and following some
30339 # of the categories in wikitext
30340 # Do not remove these characters in edits.
30342 # As part of the serialization, these bidi characters will get stripped.
30344 RTL (\u200f) and LTR (\u200e) markers around category tags should be stripped
30347 "modes": ["html2wt"],
30348 "scrubWikitext": true
30351 <p><link rel="mw:PageProp/Category" href="./קטגוריה:טקסים" />
30352 <link rel="mw:PageProp/Category" href="./קטגוריה:_שיטות_משפט" /></p>
30355 [[קטגוריה: שיטות משפט]]
30359 RTL (\u200f) and LTR (\u200e) markers should not be stripped if followed by a text node
30362 "modes": ["html2wt"],
30363 "scrubWikitext": true
30366 <p><link rel="mw:PageProp/Category" href="./קטגוריה:טקסים" />y</p>
30373 Lists: Add space after bullets
30380 <li><span> baz</span></li>
30385 * <span> baz</span>
30389 1. Headings: Add space before/after == (T53744)
30396 <h2><span> baz</span></h2>
30404 == <span> baz</span> ==
30408 2. Headings: Add space before/after == even after hoisted content
30411 "modes": ["html2wt"],
30412 "scrubWikitext": true
30415 <h2> <link href="./Category:A2" rel="mw:PageProp/Category" />ok</h2>
30423 1. Headings: suppress newly created empty headings
30426 "modes": ["html2wt"],
30427 "scrubWikitext": true
30435 2. Headings: don't suppress empty headings if scrubWikitext is false
30445 3. Headings: suppress empty headings on edits
30448 "modes": ["selser"],
30449 "scrubWikitext": true,
30455 ==<span id="x">foo</span>==
30460 Headings: Replace <br/> with a single whitespace char (when scrubWikitext = true)
30463 "modes": ["html2wt"],
30464 "scrubWikitext": true
30467 <h2>foo<br/>bar</h2>
30468 <h2>foo <span><br/>bar</span> baz</h2>
30472 == foo <span> bar</span> baz ==
30476 Headings: Replace <br/> with a single whitespace char (when scrubWikitext = false)
30479 "modes": ["html2wt"],
30480 "scrubWikitext": false
30483 <h2>foo<br/>bar</h2>
30489 1. WT Quote Tags: suppress newly created empty style tags
30492 "modes": ["html2wt"],
30493 "scrubWikitext": true
30501 2. WT Quote Tags: don't suppress empty style tags if scrubWikitext is false
30507 ''<nowiki/>'''''<nowiki/>'''
30511 3. WT Quote Tags: suppress empty style tags on edits
30514 "modes": ["selser"],
30515 "scrubWikitext": true,
30521 '''<span id="x">foo</span>'''
30526 1. Anchors: suppress newly created empty anchors
30529 "modes": ["html2wt"],
30530 "scrubWikitext": true
30533 <a rel="mw:WikiLink" href="./Test" title="Test"></a>
30538 2. Anchors: don't suppress empty anchors if scrubWikitext is false
30541 "modes": ["html2wt"],
30542 "scrubWikitext": false
30545 <a rel="mw:WikiLink" href="./Test" title="Test"></a>
30551 3. Anchors: suppress empty anchors on edits
30554 "modes": ["selser"],
30555 "scrubWikitext": true,
30561 [[Test|<span id="x">foo</span>]]
30566 3a. Anchors: do not suppress numbered extlinks
30569 "modes": ["wt2wt"],
30570 "scrubWikitext": true
30575 <a rel="mw:ExtLink" href="http://foo.com"></a>
30579 3b. Anchors: do not suppress numbered extlinks
30582 "modes": ["wt2wt"],
30583 "scrubWikitext": true,
30589 [http://foo.com <span id="x">foo</span>]
30595 Normalizations should be restricted to edited content
30598 "modes": ["selser"],
30599 "scrubWikitext": true,
30601 [ "h1", "before", "<i></i>"]
30615 1. Multiple normalizations (html2wt)
30618 "modes": ["html2wt"],
30619 "scrubWikitext": true
30623 <p><a href='Foo' rel='mw:WikiLink'>foo<i></i>
30624 </a><b><i></i></b>x</p>
30633 2. Multiple normalizations (selser)
30636 "modes": ["selser"],
30637 "scrubWikitext": true,
30639 [ "#x", "after", "<h1><i></i></h1>\n<p> bar<b></b></p>"]
30643 <div id="x">foo</div>
30645 <div id="x">foo</div>
30650 1. Indent Pre Nowiki: suppress whitespace at the start of new paragraph
30653 "modes": ["html2wt"],
30654 "scrubWikitext": true
30666 2. Indent Pre Nowiki: don't suppress whitespace at the start of new paragraph if scrubWikitext is false
30673 <nowiki> </nowiki>hi
30675 <nowiki> </nowiki> hello
30679 3. Indent Pre Nowiki: suppress whitespace after newlines in new paragraph or table cell
30682 "modes": ["html2wt"],
30683 "scrubWikitext": true
30692 baz bang</td></tr></table>
30698 bar<span>boo</span></p>
30714 bar<span>boo</span>
30718 4. Indent Pre Nowiki: suppress leading whitespace in edited paragraphs
30721 "modes": ["selser"],
30722 "scrubWikitext": true,
30724 [ "p", "html", " a\n b" ]
30735 1. New links that end in spaces
30738 "modes": ["html2wt"],
30739 "scrubWikitext": false
30742 <p><a rel="mw:WikiLink" href="./Berlin" title="Berlin">Berlin </a>is the capital of Germany.</p>
30743 <p><a rel="mw:WikiLink" href="./Foo" title="Foo">Foo </a><b>bar</b></p>
30744 <p><a rel="mw:WikiLink" href="./Boston" title="Boston">Boston </a> is a city.</p>
30746 [[Berlin ]]<nowiki/>is the capital of Germany.
30750 [[Boston ]] is a city.
30754 2. New links that end in spaces
30757 "modes": ["html2wt"],
30758 "scrubWikitext": true
30761 <p><a rel="mw:WikiLink" href="./Berlin" title="Berlin">Berlin </a>is the capital of Germany.</p>
30762 <p><a rel="mw:WikiLink" href="./Foo" title="Foo">Foo </a><b>bar</b></p>
30763 <p><a rel="mw:WikiLink" href="./Boston" title="Boston">Boston </a> is a city.</p>
30765 [[Berlin]] is the capital of Germany.
30769 [[Boston]] is a city.
30773 1. Table cells with escapable prefixes
30776 "modes": ["html2wt"],
30777 "scrubWikitext": false
30781 <tr><td>a</td></tr>
30782 <tr><td>-</td></tr>
30783 <tr><td>+</td></tr>
30784 <tr><td>}</td></tr>
30790 |<nowiki>-</nowiki>
30792 |<nowiki>+</nowiki>
30794 |<nowiki>}</nowiki>
30799 2. Table cells with escapable prefixes
30802 "modes": ["html2wt"],
30803 "scrubWikitext": true
30807 <tr><td>a</td></tr>
30808 <tr><td>-</td></tr>
30809 <tr><td>+</td></tr>
30810 <tr><td>}</td></tr>
30825 3a. Table cells with escapable prefixes after edits
30828 "modes": ["selser"],
30829 "scrubWikitext": true,
30831 [ "table tbody tr:first-child td:first-child", "remove"]
30845 3b. Table cells with escapable prefixes after edits
30848 "modes": ["selser"],
30849 "scrubWikitext": true,
30851 [ "table tbody tr:first-child td:first-child", "html", "-" ],
30858 |<span id="x">foo</span>+
30867 # FIXME: This test will fail because
30868 # normalization doesn't realize that the id attribute
30869 # will eliminate the escapable scenario
30871 4a. Table cells without escapable prefixes after edits
30874 "modes": ["selser"],
30875 "scrubWikitext": true,
30877 [ "#x", "html", "-" ]
30890 ## This tests normalizer's ability to discriminate between
30891 ## cells having identical content.
30893 4b. Table cells without escapable prefixes after edits
30896 "modes": ["selser"],
30897 "scrubWikitext": true,
30899 [ "td", "html", "-" ]
30912 ## This tests normalizer's ability to not be tripped by
30913 ## comments (and whitespace)
30915 4c. Table cells without escapable prefixes after edits
30918 "modes": ["selser"],
30919 "scrubWikitext": true,
30921 [ "table tbody tr td:first-child", "remove" ]
30936 ## This tests normalizer's ability to handle HTML cells
30938 4d. Table cells without escapable prefixes after edits
30941 "modes": ["selser"],
30942 "scrubWikitext": true,
30944 [ "td", "html", "-" ]
30949 <tr><td>a</td></tr>
30953 <tr><td>-</td></tr>
30957 ## T111151 Remove font elements without attributes
30959 5a. font tags without attributes should be dropped in scrubWikitext mode
30962 "modes": ["html2wt"],
30963 "scrubWikitext": true
30967 <font><font>bar</font></font>
30968 <font class="x">boo</font>
30972 <font class="x">boo</font>
30976 5b. font tags should not be dropped without scrubWikitext being enabled
30979 "modes": ["html2wt"],
30980 "scrubWikitext": false
30989 Escape nowiki DOM elements
30993 <nowiki><i>foo</i></nowiki>
30995 <nowiki>''foo''</nowiki>
30998 # This is meant to be an interim fix while we go about figuring out
30999 # how to not introduce these trailing <nowiki/>s in the first place.
31001 T115717: Strip trailing <nowiki/>s (without affecting valid uses)
31005 <p>x<meta typeof="mw:Placeholder" data-parsoid='{"src":"<nowiki/>"}'/><meta typeof="mw:Placeholder" data-parsoid='{"src":"<nowiki/>"}'/>
31007 <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>
31008 <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>
31022 New list is serialized on newlines
31026 <p>The quick brown fox jumps over the lazy dog.</p><ul>
31030 </ul><p>The quick onyx goblin jumps over the lazy dwarf.</p>
31032 The quick brown fox jumps over the lazy dog.
31038 The quick onyx goblin jumps over the lazy dwarf.
31042 New lists in formatting elements serialized w/o newlines
31054 <small><ul><li>hi</li></ul></small>
31066 New list in table doesn't need newlines
31070 <table><tr><td><ul><li>test</li><li>123</li></td></tr></table>
31079 # ---------------------------------------------------
31080 # End of tests spec'ing wikitext serialization norms |
31081 # ---------------------------------------------------
31085 Bare inline nodes not wrapped inside p-tags should be treated as p-wrapped
31093 <td><b>c</b><p>d</p></td>
31112 Anchor without href scenarios
31114 parsoid={ "modes": ["html2wt"], "suppressErrors": true }
31117 <a class="no">dice</a>
31122 <span name="foo"></span>
31126 New transclusion added after a list should be serialized after the list
31130 <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>
31136 # -----------------------------------------------------------------
31137 # End of section for Parsoid-only html2wt tests for serialization
31139 # -----------------------------------------------------------------
31141 # -----------------------------------------------------------------
31142 # The following section of tests are primarily to spec behavior of
31143 # the selective serializer. All these tests have manual selser
31144 # changes. The automated selser changes for all tests handle the
31145 # wide variation of changes, but these tests here capture specs
31146 # deterministically.
31147 # ----------------------------------------------------------------
31151 Selser: New comments should not be lost
31154 "modes": ["selser"],
31156 [ "#a", "after", "<!--c1-->" ],
31157 [ "#b", "before", "<!--c2-->" ]
31161 <span id="a">a</span>
31163 <span id="b">b</span>
31165 <span id="a">a</span><!--c1-->
31167 <!--c2--><span id="b">b</span>
31172 Selser: Check for validity of DSR before using it
31175 "modes": ["selser"],
31177 [ "#a", "before", "<meta property='mw:PageProp/displaytitle' content='foo'>" ]
31181 <span id="a">a</span>
31183 {{DISPLAYTITLE:foo}}
31184 <span id="a">a</span>
31188 1. DOMDiff: Changes to <ref> content should be looked up using id
31191 "modes": ["selser"],
31193 ["#X", "after", "bar"],
31194 ["#Y", "after", "baz"]
31198 X <ref><span id="X">foo</span></ref>
31201 <ref name="a"><span id="Y">foo</span></ref>
31204 X <ref><span id="X">foo</span>bar</ref>
31207 <ref name="a"><span id="Y">foo</span>baz</ref>
31212 2. DOMDiff: Changes to <ref> content should be looked up using id
31215 "modes": ["selser"],
31217 ["#Z", "after", "bar"]
31221 A <ref>foo bar for a</ref>
31222 B <ref group="X" name="b" />
31226 <references group="X">
31227 <ref name="b"><span id="Z">foo</span></ref>
31230 A <ref>foo bar for a</ref>
31231 B <ref group="X" name="b" />
31235 <references group="X">
31236 <ref name="b"><span id="Z">foo</span>bar</ref>
31241 DOMDiff: Edits to content nested in elements with templated attributes should not be lost (T139388)
31244 "modes": ["selser"],
31246 [ "div:first-child", "text", "bar" ]
31250 <div style="{{1x|color:red;}}%">foo</div>
31252 <div style="{{1x|color:red;}}%">bar</div>
31264 <li class="mw-empty-elt"></li>
31265 <li class="mw-empty-elt"></li>
31272 [[File:Thumb.png|thumb]]
31274 <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>
31276 <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>
31280 unclosed internal link XSS (T137264)
31282 [[#%3Cscript%3Ealert(1)%3C/script%3E|
31284 <p>[[#<script>alert(1)</script>|
31287 <p>[[#%3Cscript%3Ealert(1)%3C/script%3E|</p>
31291 Validating that <style> isn't eaten by tidy (T167349)
31296 <style>.foo::before { content: "<foo>"; }</style>
31297 <style data-mw-foobar="baz">.foo::after { content: "<bar>"; }</style>
31301 <style>.foo::before { content: "<foo>"; }</style>
31302 <style data-mw-foobar="baz">.foo::after { content: "<bar>"; }</style>
31306 <style typeof="mw:Extension/style" data-mw='{"name":"style","attrs":{},"body":{"extsrc":".foo::before { content: \"<foo>\"; }"}}'>.foo::before { content: "<foo>"; }</style>
31307 <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>
31311 ## Right now, Parsoid doesn't de-duplicate style tags.
31312 ## So, we shouldn't see link tags that need to bypass the sanitizer.
31313 ## In a followup patch, when we de-duplicate style tags and
31314 ## introduce link tags, we'll add a hook for link tags in
31315 ## the parser test runner script.
31317 Validating that <style> isn't wrapped in a paragraph (T186965)
31321 A style tag, by itself or with other style/link tags, shouldn't be wrapped in a paragraph
31323 <style>.foo::before { content: "<foo>"; }</style>
31325 <style>.foo::before { content: "<foo>"; }</style> <link rel="foo" href="bar"/><style>.foo::before { content: "<foo>"; }</style>
31327 But if it's on a line with other content, let it be wrapped.
31329 <style>.foo::before { content: "<foo>"; }</style> bar
31331 foo <style>.foo::before { content: "<foo>"; }</style>
31333 foo <style>.foo::before { content: "<foo>"; }</style> bar
31335 And the same if we have non-paragraph-breaking whitespace
31338 <style>.foo::before { content: "<foo>"; }</style>
31341 <p>A style tag, by itself or with other style/link tags, shouldn't be wrapped in a paragraph
31343 <style>.foo::before { content: "<foo>"; }</style>
31344 <style>.foo::before { content: "<foo>"; }</style> <link rel="foo" href="bar"/><style>.foo::before { content: "<foo>"; }</style>
31345 <p>But if it's on a line with other content, let it be wrapped.
31346 </p><p><style>.foo::before { content: "<foo>"; }</style> bar
31347 </p><p>foo <style>.foo::before { content: "<foo>"; }</style>
31348 </p><p>foo <style>.foo::before { content: "<foo>"; }</style> bar
31349 </p><p>And the same if we have non-paragraph-breaking whitespace
31351 <style>.foo::before { content: "<foo>"; }</style>
31355 <p>A style tag, by itself or with other style/link tags, shouldn't be wrapped in a paragraph</p>
31357 <style typeof="mw:Extension/style" data-mw='{"name":"style","attrs":{},"body":{"extsrc":".foo::before { content: \"<foo>\"; }"}}'>.foo::before { content: "<foo>"; }</style>
31359 <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>
31361 <p>But if it's on a line with other content, let it be wrapped.</p>
31363 <p><style typeof="mw:Extension/style" data-mw='{"name":"style","attrs":{},"body":{"extsrc":".foo::before { content: \"<foo>\"; }"}}'>.foo::before { content: "<foo>"; }</style> bar</p>
31365 <p>foo <style typeof="mw:Extension/style" data-mw='{"name":"style","attrs":{},"body":{"extsrc":".foo::before { content: \"<foo>\"; }"}}'>.foo::before { content: "<foo>"; }</style></p>
31367 <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>
31369 <p>And the same if we have non-paragraph-breaking whitespace</p>
31372 <style typeof="mw:Extension/style" data-mw='{"name":"style","attrs":{},"body":{"extsrc":".foo::before { content: \"<foo>\"; }"}}'>.foo::before { content: "<foo>"; }</style>
31377 Validating that <link> isn't wrapped in a paragraph (T186965)
31381 A link tag, by itself or with other style/link tags, shouldn't be wrapped in a paragraph
31383 <link rel="foo" href="bar"/>
31385 <link rel="foo" href="bar"/> <style>.foo::before { content: "<foo>"; }</style><link rel="foo" href="bar"/>
31387 But if it's on a line with other content, let it be wrapped.
31389 <link rel="foo" href="bar"/> bar
31391 foo <link rel="foo" href="bar"/>
31393 foo <link rel="foo" href="bar"/> bar
31395 And the same if we have non-paragraph-breaking whitespace
31398 <link rel="foo" href="bar"/>
31401 <p>A link tag, by itself or with other style/link tags, shouldn't be wrapped in a paragraph
31403 <link rel="foo" href="bar"/>
31404 <link rel="foo" href="bar"/> <style>.foo::before { content: "<foo>"; }</style><link rel="foo" href="bar"/>
31405 <p>But if it's on a line with other content, let it be wrapped.
31406 </p><p><link rel="foo" href="bar"/> bar
31407 </p><p>foo <link rel="foo" href="bar"/>
31408 </p><p>foo <link rel="foo" href="bar"/> bar
31409 </p><p>And the same if we have non-paragraph-breaking whitespace
31411 <link rel="foo" href="bar"/>
31417 Extension returning multiple nodes starting with a style tag roundtrips
31422 {{echo|<html><style>.hi { color: red; }</style>
31424 <tr><td class="hi">ho</td></tr>
31427 <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">
31428 </span></p><table about="#mwt5" data-parsoid='{"stx":"html"}'>
31430 <tbody><tr><td class="hi">ho</td></tr>
31435 Decoding of HTML entities in headings and links for IDs and link fragments (T103714)
31437 wgFragmentMode=[ 'html5', 'legacy' ]
31439 ==A&B&C&amp;D&amp;amp;E==
31440 [[#A&B&C&amp;D&amp;amp;E]]
31442 <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>
31443 <p><a href="#A&B&C&amp;D&amp;amp;E">#A&B&C&amp;D&amp;amp;E</a>
31446 <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>
31447 <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>
31451 Decoding of HTML entities in headings and links for IDs and link fragments (T103714) (legacy)
31453 wgFragmentMode=[ 'legacy' ]
31455 ==A&B&C&amp;D&amp;amp;E==
31456 [[#A&B&C&amp;D&amp;amp;E]]
31458 <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>
31459 <p><a href="#A.26B.26C.26amp.3BD.26amp.3Bamp.3BE">#A&B&C&amp;D&amp;amp;E</a>
31464 Decoding of HTML entities in embedded HTML tags
31466 <table class="1&2&3&amp;4&amp;amp;5"><tr><td>x</td></tr></table>
31468 <table class="1&2&3&amp;4&amp;amp;5"><tr><td>x</td></tr></table>
31471 <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>
31475 Decoding of HTML entities in indicator names for IDs (T104196)
31477 parsoid=wt2html,html2html
31480 <indicator name="1&2&3&amp;4&amp;amp;5">Indicator</indicator>
31482 1&2&3&4&amp;5=Indicator
31485 <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>
31488 # this version of the test strips out the ambiguity so Parsoid rts cleanly
31490 Decoding of HTML entities in indicator names for IDs (unambiguous) (T104196)
31494 <indicator name="1&2&3&amp;4&amp;amp;5">Indicator</indicator>
31496 1&2&3&4&amp;5=Indicator
31499 <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>
31502 # This fragment mode is what Parsoid supports.
31504 HTML5 ids: fallback to legacy
31506 wgFragmentMode=[ 'html5', 'legacy' ]
31518 ==Hey < # " > % : '==
31519 [[#Foo bar]] [[#foo Bar]] [[#Тест]] [[#тест]] [[#Hey < # " > % : ']]
31521 {{anchorencode:💩}} <span id="{{anchorencode:💩}}"></span>
31523 <!-- These two links should produce identical HTML -->
31524 [[#啤酒]] [[#%E5%95%A4%E9%85%92]]
31527 <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>
31529 <li class="toclevel-1 tocsection-1"><a href="#Foo_bar"><span class="tocnumber">1</span> <span class="toctext">Foo bar</span></a></li>
31530 <li class="toclevel-1 tocsection-2"><a href="#foo_Bar_2"><span class="tocnumber">2</span> <span class="toctext">foo Bar</span></a></li>
31531 <li class="toclevel-1 tocsection-3"><a href="#Тест"><span class="tocnumber">3</span> <span class="toctext">Тест</span></a></li>
31532 <li class="toclevel-1 tocsection-4"><a href="#Тест_2"><span class="tocnumber">4</span> <span class="toctext">Тест</span></a></li>
31533 <li class="toclevel-1 tocsection-5"><a href="#тест"><span class="tocnumber">5</span> <span class="toctext">тест</span></a></li>
31534 <li class="toclevel-1 tocsection-6"><a href="#Hey_<_#_"_>_%_:_'"><span class="tocnumber">6</span> <span class="toctext">Hey < # " > % : '</span></a></li>
31538 <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>
31539 <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>
31540 <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>
31541 <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>
31542 <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>
31543 <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>
31544 <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>
31545 </p><p>💩 <span id="💩"></span>
31546 </p><p><a href="#啤酒">#啤酒</a> <a href="#啤酒">#啤酒</a>
31549 <h2 id="Foo_bar">Foo bar</h2>
31551 <h2 id="foo_Bar_2">foo Bar</h2>
31553 <h2 id="Тест"><span id=".D0.A2.D0.B5.D1.81.D1.82" typeof="mw:FallbackId"></span>Тест</h2>
31555 <h2 id="Тест_2"><span id=".D0.A2.D0.B5.D1.81.D1.82_2" typeof="mw:FallbackId"></span>Тест</h2>
31557 <h2 id="тест"><span id=".D1.82.D0.B5.D1.81.D1.82" typeof="mw:FallbackId"></span>тест</h2>
31559 <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>
31560 <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>
31562 <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>
31564 <!-- These two links should produce identical HTML -->
31565 <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>
31568 # Parsoid doesn't support this mode
31570 HTML5 ids: legacy with a fallback to modern
31572 wgFragmentMode=[ 'legacy', 'html5' ]
31584 ==Hey < # " > % : '==
31585 [[#Foo bar]] [[#foo Bar]] [[#Тест]] [[#тест]] [[#Hey < # " > % : ']]
31587 {{anchorencode:💩}} <span id="{{anchorencode:💩}}"></span>
31589 <!-- These two links should produce identical HTML -->
31590 [[#啤酒]] [[#%E5%95%A4%E9%85%92]]
31593 <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>
31595 <li class="toclevel-1 tocsection-1"><a href="#Foo_bar"><span class="tocnumber">1</span> <span class="toctext">Foo bar</span></a></li>
31596 <li class="toclevel-1 tocsection-2"><a href="#foo_Bar_2"><span class="tocnumber">2</span> <span class="toctext">foo Bar</span></a></li>
31597 <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>
31598 <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>
31599 <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>
31600 <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>
31604 <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>
31605 <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>
31606 <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>
31607 <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>
31608 <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>
31609 <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>
31610 <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>
31611 </p><p>.F0.9F.92.A9 <span id=".F0.9F.92.A9"></span>
31612 </p><p><a href="#.E5.95.A4.E9.85.92">#啤酒</a> <a href="#.E5.95.A4.E9.85.92">#啤酒</a>
31616 # Parsoid doesn't support this mode.
31618 HTML5 ids: no legacy
31620 wgFragmentMode=[ 'html5' ]
31632 ==Hey < # " > % : '==
31633 [[#Foo bar]] [[#foo Bar]] [[#Тест]] [[#тест]] [[#Hey < # " > % : ']]
31635 {{anchorencode:💩}} <span id="{{anchorencode:💩}}"></span>
31637 <!-- These two links should produce identical HTML -->
31638 [[#啤酒]] [[#%E5%95%A4%E9%85%92]]
31641 <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>
31643 <li class="toclevel-1 tocsection-1"><a href="#Foo_bar"><span class="tocnumber">1</span> <span class="toctext">Foo bar</span></a></li>
31644 <li class="toclevel-1 tocsection-2"><a href="#foo_Bar_2"><span class="tocnumber">2</span> <span class="toctext">foo Bar</span></a></li>
31645 <li class="toclevel-1 tocsection-3"><a href="#Тест"><span class="tocnumber">3</span> <span class="toctext">Тест</span></a></li>
31646 <li class="toclevel-1 tocsection-4"><a href="#Тест_2"><span class="tocnumber">4</span> <span class="toctext">Тест</span></a></li>
31647 <li class="toclevel-1 tocsection-5"><a href="#тест"><span class="tocnumber">5</span> <span class="toctext">тест</span></a></li>
31648 <li class="toclevel-1 tocsection-6"><a href="#Hey_<_#_"_>_%_:_'"><span class="tocnumber">6</span> <span class="toctext">Hey < # " > % : '</span></a></li>
31652 <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>
31653 <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>
31654 <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>
31655 <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>
31656 <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>
31657 <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>
31658 <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>
31659 </p><p>💩 <span id="💩"></span>
31660 </p><p><a href="#啤酒">#啤酒</a> <a href="#啤酒">#啤酒</a>
31665 T90902: Normalize weird characters in section IDs
31667 wgFragmentMode=[ 'html5', 'legacy' ]
31673 <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>
31674 <p><a href="#Foo_bar">#Foo bar</a>
31677 <h2 id="Foo_bar"> Foo<span typeof="mw:Entity" data-parsoid='{"src":"&nbsp;","srcContent":" "}'> </span>bar </h2>
31678 <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>
31682 T51672: Test for brackets in attributes of elements in external link texts
31684 [http://example.com/ link <span title="title with [brackets]">span</span>]
31685 [http://example.com/ link <span title="title with [brackets]">span</span>]
31688 <p><a rel="nofollow" class="external text" href="http://example.com/">link <span title="title with [brackets]">span</span></a>
31689 <a rel="nofollow" class="external text" href="http://example.com/">link <span title="title with [brackets]">span</span></a>
31692 <p><a rel="mw:ExtLink" class="external text" href="http://example.com/">link <span title="title with [brackets]">span</span></a>
31693 <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>
31697 T72875: Test for brackets in attributes of elements in internal link texts
31699 [[Foo|link <span title="title with [[double brackets]]">span</span>]]
31700 [[Foo|link <span title="title with [[double brackets]]">span</span>]]
31703 <p><a href="/wiki/Foo" title="Foo">link <span title="title with [[double brackets]]">span</span></a>
31704 <a href="/wiki/Foo" title="Foo">link <span title="title with [[double brackets]]">span</span></a>
31707 <p><a rel="mw:WikiLink" href="./Foo" title="Foo">link <span title="title with [[double brackets]]">span</span></a>
31708 <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>
31712 T199926: html arrow wt: Parsoid sometimes trips up on verticalbar chars in hrefs
31715 "modes": ["html2wt"]
31718 <a href="https://stats.wikimedia.org/v2/#/fr.wikipedia.org/reading/page-views-by-country/normal|map|2-Year~2016060100~2018071100|~total">9</a>
31719 <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>
31721 [https://stats.wikimedia.org/v2/#/fr.wikipedia.org/reading/page-views-by-country/normal|map|2-Year~2016060100~2018071100|~total 9]
31722 [[stats:v2/#/fr.wikipedia.org/reading/page-views-by-country/normal%7Cmap%7C2-Year~2016060100~2018071100%7C~total|10]]
31726 T179544: {{anchorencode:}} output should be always usable in links
31728 wgFragmentMode=[ 'html5' ]
31730 <span id="{{anchorencode:[foo]}}"></span>[[#{{anchorencode:[foo]}}]]
31732 <p><span id="[foo]"></span><a href="#[foo]">#[foo]</a>
31735 <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>
31738 ## ------------------------------
31739 ## Parsoid section-wrapping tests
31740 ## ------------------------------
31742 Section wrapping for well-nested sections (no leading content)
31745 "wrapSections": true
31766 <section data-mw-section-id="0"></section><section data-mw-section-id="1"><h1 id="1">1</h1>
31769 </section><section data-mw-section-id="2"><h1 id="2">2</h1>
31772 <section data-mw-section-id="3"><h2 id="2.1">2.1</h2>
31775 </section><section data-mw-section-id="4"><h2 id="2.2">2.2</h2>
31778 <section data-mw-section-id="5"><h3 id="2.2.1">2.2.1</h3>
31781 </section></section></section><section data-mw-section-id="6"><h1 id="3">3</h1>
31788 Section wrapping for well-nested sections (with leading content)
31791 "wrapSections": true
31796 Para 2 with a <div>nested in it</div>
31809 <section data-mw-section-id="0"><p>Para 1.</p>
31811 <p>Para 2 with a </p><div>nested in it</div>
31815 </section><section data-mw-section-id="1"><h1 id="1">1</h1>
31818 </section><section data-mw-section-id="2"><h1 id="2">2</h1>
31821 <section data-mw-section-id="3"><h2 id="2.1">2.1</h2>
31824 </section></section>
31828 Section wrapping with template-generated sections (good nesting 1)
31831 "wrapSections": true
31848 <section data-mw-section-id="0"></section><section data-mw-section-id="1"><h1 id="1">1</h1>
31851 <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">
31852 </span><p about="#mwt1">b</p>
31853 </section><section data-mw-section-id="3"><h2 id="1.2">1.2</h2>
31856 </section></section><section data-mw-section-id="4"><h1 id="2">2</h1>
31860 # In this example, the template scope is mildly expanded to incorporate the
31861 # trailing newline after the transclusion since that is part of section 1.1.1
31863 Section wrapping with template-generated sections (good nesting 2)
31866 "wrapSections": true,
31867 "modes": ["wt2html", "wt2wt"]
31882 <section data-mw-section-id="0"></section><section data-mw-section-id="1"><h1 id="1">1</h1>
31885 <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">
31886 </span><p about="#mwt1">b</p><span about="#mwt1">
31887 </span><section data-mw-section-id="-1" about="#mwt1"><h3 about="#mwt1" id="1.1.1">1.1.1</h3><span about="#mwt1">
31888 </span><p about="#mwt1">d</p><span about="#mwt1">
31889 </span></section></section></section><section data-mw-section-id="4" data-parsoid="{}"><h1 id="2">2</h1>
31893 # In this example, the template scope is mildly expanded to incorporate the
31894 # trailing newline after the transclusion since that is part of section 1.2.1
31896 Section wrapping with template-generated sections (good nesting 3)
31899 "wrapSections": true,
31900 "modes": ["wt2html", "wt2wt"]
31918 <section data-mw-section-id="0"></section><section data-mw-section-id="1" data-parsoid="{}"><h1 id="1"> 1 </h1>
31921 <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">
31922 </span><section data-mw-section-id="-1" about="#mwt1"><h2 about="#mwt1" id="1.1">1.1</h2><span about="#mwt1">
31923 </span><p about="#mwt1">b</p><span about="#mwt1">
31924 </span></section><section data-mw-section-id="-1" about="#mwt1"><h2 about="#mwt1" id="1.2">1.2</h2><span about="#mwt1">
31925 </span><p about="#mwt1">c</p><span about="#mwt1">
31926 </span><section data-mw-section-id="-1" about="#mwt1"><h3 about="#mwt1" id="1.2.1">1.2.1</h3><span about="#mwt1">
31927 </span><p about="#mwt1">d</p><span about="#mwt1">
31928 </span></section></section></section><section data-mw-section-id="5"><h1 id="2">2</h1>
31932 # Because of section-wrapping and template-wrapping interactions,
31933 # the scope of the template is expanded so that the template markup
31934 # is valid in the presence of <section> tags.
31935 # This exercises the s1 is null scenario in the wrapSections code
31937 Section wrapping with template-generated sections (bad nesting 1)
31940 "wrapSections": true
31954 <section data-mw-section-id="-1"></section><section data-mw-section-id="-2"><div data-parsoid='{"stx":"html"}'>
31957 <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"]}'>
31958 </span><section data-mw-section-id="-1" about="#mwt1"><h1 about="#mwt1" id="1">1</h1><span about="#mwt1">
31959 </span><p about="#mwt1">b
31960 </p><span about="#mwt1">
31962 </span><p about="#mwt1">c</p><span about="#mwt1">
31963 </span></section></div></section>
31966 # Because of section-wrapping and template-wrapping interactions,
31967 # the scope of the template is expanded so that the template markup
31968 # is valid in the presence of <section> tags.
31969 # This exercises the s1 is ancestor of s2 scenario in the wrapSections code
31971 Section wrapping with template-generated sections (bad nesting 2)
31974 "wrapSections": true
31992 <section data-mw-section-id="0"></section><section data-mw-section-id="1"><h1 id="1">1</h1>
31995 </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">
31996 </span><p about="#mwt1">b</p><span about="#mwt1">
31997 </span><section data-mw-section-id="-1" about="#mwt1"><h2 about="#mwt1" id="2.1">2.1</h2><span about="#mwt1">
31998 </span><p about="#mwt1">c</p><span about="#mwt1">
32000 </span><p about="#mwt1">d</p><span about="#mwt1">
32002 </span></section></section><section data-mw-section-id="4"><h1 id="3">3</h1>
32006 # Because of section-wrapping and template-wrapping interactions,
32007 # additional template wrappers are added to <section> tags
32008 # so that template wrapping semantics are valid whether section
32009 # tags are retained or stripped. But, the template scope can expand
32010 # greatly when accounting for section tags.
32011 # This exercises the s1 and s2 are in different subtrees scenario
32013 Section wrapping with template-generated sections (bad nesting 3)
32016 "wrapSections": true,
32017 "modes": ["wt2html", "wt2wt"]
32035 <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>
32038 <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">
32039 </span><p about="#mwt1">b</p><span about="#mwt1">
32040 </span></section></section><section data-mw-section-id="-1" about="#mwt1"><h1 about="#mwt1" id="2">2</h1><span about="#mwt1">
32041 </span><p about="#mwt1">c</p>
32044 </section><section data-mw-section-id="4" data-parsoid="{}"><h1 id="3">3</h1>
32049 Section wrapping with uneditable lead section + div wrapping multiple sections
32052 "wrapSections": true
32057 <div style="border:1px solid red;">
32074 <section data-mw-section-id="-1"><p>foo</p>
32076 </section><section data-mw-section-id="-2"><div style="border:1px solid red;">
32077 <section data-mw-section-id="1"><h1 id="1">1</h1>
32080 <section data-mw-section-id="2"><h2 id="1.1">1.1</h2>
32083 </section></section><section data-mw-section-id="-1"><h1 id="2">2</h1>
32087 </section><section data-mw-section-id="4"><h1 id="3">3</h1>
32090 <section data-mw-section-id="5"><h2 id="3.1">3.1</h2>
32092 </section></section>
32096 Section wrapping with editable lead section + div overlapping multiple sections
32099 "wrapSections": true
32106 <div style="border:1px solid red;">
32123 <section data-mw-section-id="0"><p>foo</p>
32125 </section><section data-mw-section-id="-1"><h1 id="1">1</h1>
32127 </section><section data-mw-section-id="-2"><div style="border:1px solid red;">
32130 <section data-mw-section-id="2"><h2 id="1.1">1.1</h2>
32133 </section><section data-mw-section-id="-1"><h1 id="2">2</h1>
32138 </section><section data-mw-section-id="4"><h1 id="3">3</h1>
32141 <section data-mw-section-id="5"><h2 id="3.1">3.1</h2>
32143 </section></section>
32147 HTML header tags should not be wrapped in section tags
32150 "wrapSections": true
32163 <section data-mw-section-id="0"><p>foo</p>
32165 <h1 id="a" data-parsoid='{"stx":"html"}'>a</h1>
32167 </section><section data-mw-section-id="1"><h1 id="b">b</h1>
32169 <h1 id="c" data-parsoid='{"stx":"html"}'>c</h1>
32171 </section><section data-mw-section-id="2"><h1 id="d">d</h1></section>
32175 Lead section containing only whitespace and comments.
32178 "wrapSections": true
32182 <!-- this is a comment, presumably significant to editors -->
32189 <section data-mw-section-id="0" data-parsoid="{}">
32190 <!-- this is a comment, presumably significant to editors -->
32191 </section><section data-mw-section-id="1"><h1 id="1">1</h1>
32194 </section><section data-mw-section-id="2"><h1 id="2">2</h1>
32199 Pseudo-sections emitted by templates should have id -2
32202 "wrapSections": true
32212 <section data-mw-section-id="-1"><p>foo</p>
32213 </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}}]}'>
32214 <section data-mw-section-id="-1"><h2 id="a">a</h2>
32215 </section><section data-mw-section-id="-1"><h2 id="b">b</h2>
32216 </section></div><span about="#mwt1">
32220 ##########################################################################
32221 Tests demonstrating white-space insensitivity in input wikitext
32222 for wikitext headings, wikitext list items, and wikitext table captions,
32223 headings, and cells. HTML versions of the same should preserve whitespace.
32224 ##########################################################################
32226 Trim whitespace in wikitext headings, list items, table captions, headings, and cells
32229 "modes": ["wt2html"],
32230 "preserveIEW": true
32234 == <!--c1--> <!--c2--> Spaces <!--c3--> <!--c4--> ==
32235 == <!--c1--> <!--c2--> Tabs <!--c3--><!--c4--> ==
32236 == <!--Headings with fallback ids--> Личная жизнь ==
32237 * <!--c1--> <!--c2--> List item <!--c3--> <!--c4-->
32238 ; <!--term to define--> term : <!--term's definition--> definition
32240 |+ <!--c1--> <!--c2--> Table Caption <!--c3--> <!--c4-->
32242 ! <!--c1--> <!--c2--> Table Heading 1 <!--c3--> <!--c4--> !! Table Heading 2 <!--c5-->
32244 | <!--c1--> <!--c2--> Table Cell 1 <!--c3--> <!--c4--> || Table Cell 2 <!--c5-->
32246 | class="foo" || <!--c1--> <!--c2--> Table Cell 3 <!--c3--> <!--c4-->
32248 | <!--c1--> testing [[one|two]] <!--c2--> | <!--c3--> some content
32251 | <!--c1--> <!--c2--> Table Cell 1 <!--c3--> <!--c4--> || Table Cell 2 <!--c5-->
32254 <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>
32255 <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>
32256 <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>
32257 <ul><li>List item</li></ul>
32258 <dl><dt>term </dt>
32259 <dd>definition</dd></dl>
32261 <caption>Table Caption
32264 <th>Table Heading 1</th>
32265 <th>Table Heading 2
32268 <td>Table Cell 1</td>
32272 <td>class="foo"</td>
32276 <td>testing <a href="/index.php?title=One&action=edit&redlink=1" class="new" title="One (page does not exist)">two</a> | some content
32277 </td></tr></tbody></table>
32280 <td>Table Cell 1</td>
32282 </td></tr></tbody></table> foo</dd></dl>
32284 <meta property="mw:PageProp/notoc">
32285 <h2 id="Spaces"><!--c1--><!--c2-->Spaces<!--c3--><!--c4--></h2>
32286 <h2 id="Tabs"><!--c1--><!--c2-->Tabs<!--c3--><!--c4--></h2>
32287 <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>
32288 <ul><li><!--c1--><!--c2-->List item<!--c3--><!--c4--></li></ul>
32289 <dl><dt><!--term to define-->term </dt><dd><!--term's definition-->definition</dd></dl>
32291 <caption><!--c1--><!--c2-->Table Caption<!--c3--><!--c4--></caption>
32293 <th><!--c1--><!--c2-->Table Heading 1<!--c3--><!--c4--></th><th>Table Heading 2<!--c5--></th></tr>
32295 <td><!--c1--><!--c2-->Table Cell 1<!--c3--><!--c4--></td><td>Table Cell 2<!--c5--></td></tr>
32297 <td>class="foo"</td><td><!--c1--><!--c2-->Table Cell 3<!--c3--><!--c4--></td></tr>
32299 <td><!--c1-->testing <a rel="mw:WikiLink" href="./One" title="One">two</a> <!--c2--> | <!--c3--> some content</td></tr>
32302 <tbody><tr><td><!--c1--><!--c2-->Table Cell 1<!--c3--><!--c4--></td><td>Table Cell 2<!--c5--></td></tr>
32303 </tbody></table> foo<!--c1--></dd></dl>
32306 # Looks like <caption> is not accepted in HTML
32308 Do not trim whitespace in HTML headings, list items, table captions, headings, and cells
32311 "modes": ["wt2html"],
32312 "preserveIEW": true
32316 <h2> <!--c1--> <!--c2--> Heading <!--c3--> <!--c4--> </h2>
32317 <ul><li> <!--c1--> <!--c2--> List item <!--c3--> <!--c4--> </li></ul>
32319 <tr><th> <!--c1--> <!--c2--> Table Heading <!--c3--> <!--c4--> <th></tr>
32320 <tr><td> <!--c1--> <!--c2--> Table Cell <!--c3--> <!--c4--> <th></tr>
32323 <h2><span class="mw-headline" id="Heading"> Heading </span></h2>
32324 <ul><li> List item </li></ul>
32326 <tbody><tr><th> Table Heading </th><th></th></tr>
32327 <tr><td> Table Cell </td><th></th></tr>
32330 <meta property="mw:PageProp/notoc"/>
32331 <h2 id="Heading"> <!--c1--> <!--c2--> Heading <!--c3--> <!--c4--> </h2>
32332 <ul><li> <!--c1--> <!--c2--> List item <!--c3--> <!--c4--> </li></ul>
32334 <tbody><tr><th> <!--c1--> <!--c2--> Table Heading <!--c3--> <!--c4--> </th><th></th></tr>
32335 <tr><td> <!--c1--> <!--c2--> Table Cell <!--c3--> <!--c4--> </td><th></th></tr>
32340 Do not trim whitespace in links and quotes
32343 "modes": ["wt2html"],
32344 "preserveIEW": true
32347 foo '' <!--c1--> italic <!--c2--> '' and ''' <!--c3--> bold <!--c4--> '''
32348 [[Foo| some text ]]
32350 <p>foo <i> italic </i> and <b> bold </b>
32351 <a href="/wiki/Foo" title="Foo"> some text </a>
32354 <p>foo <i> <!--c1--> italic <!--c2--> </i> and <b> <!--c3--> bold <!--c4--> </b>
32355 <a rel="mw:WikiLink" href="./Foo" title="Foo"> some text </a></p>
32359 Remove p tags surrounding a single element in a figcaption
32363 [[File:Foobar.jpg|right|200x200px|Caption]]
32365 <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>
32369 Selser preserves lack of newline before list and allows newline after the list
32372 "modes": ["selser"],
32373 "scrubWikitext": true,
32375 [ "ul", "after", "<p>footer</p>" ]
32392 Selser does not introduce newlines between unedited paragraph preceding the list
32395 "modes": ["selser"],
32397 [ "table tbody tr td p:last-child", "empty" ]
32419 Selser does not introduce newlines between unedited paragraph following the list
32422 "modes": ["selser"],
32424 [ "table tbody tr td p:first-child", "empty" ]
32446 Remove a list item but do not insert newline above list
32449 "modes": ["selser"],
32451 [ "ul li:last-child", "remove" ]