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/parserTestsParserHook.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 typeof="mw:Extension/pre" about="#mwt2" class="one two" 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:Transclusion mw:Extension/pre" about="#mwt2" data-parsoid='{"stx":"html","a":{"<pre":null},"sa":{"<pre":""},"pi":[[{"k":"1"}]]}' data-mw='{"parts":[{"template":{"target":{"wt":"echo","href":"./Template:Echo"},"params":{"1":{"wt":"<pre <pre>x</pre>"}},"i":0}}]}'>x</pre>
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 Parsoid: Don't paragraph-wrap fosterable content even if table syntax is unbalanced
2946 #--------------------------------------------------------------------
2947 # Transclusion parameter whitespace stripping tests
2948 # Behavior is different for positional and named parameters
2949 #--------------------------------------------------------------------
2951 Templates: Strip leading and trailing whitespace from named-param values
2955 {{echo|1= {{echo|b}} }}
2973 Templates: Don't strip whitespace from positional-param values
2977 {{echo|{{echo|b}} }}
3017 Templates: Don't recognize targets split by newlines
3033 Templates: Recognize targets when newlines and comments don't split the target
3038 <!--X--> ech<!--X-->o<!--X-->
3046 <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>
3050 Templates: Handle empty comment-and-ws-only lines correctly
3053 <!--should be ignored-->
3054 <!--should be ignored as well-->
3061 <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>
3065 Templates: Handle comments in the target
3068 <!-- should be ignored -->
3072 <!-- should be ignored and spaces on next line should not trip us up (T147742) -->
3075 {{echo<!-- should be ignored -->
3078 {{echo<!-- should be ignored -->|foo}}
3080 {{<!-- should be ignored -->echo|foo}}
3089 <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>
3091 <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>
3093 <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>
3095 <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>
3097 <p typeof="mw:Transclusion" data-mw='{"parts":[{"template":{"target":{"wt":"echo","href":"./Template:Echo"},"params":{"1":{"wt":"foo"}},"i":0}}]}'>foo</p>
3101 Templates: Handle comments in parameter names (T69657)
3104 <!-- should be ignored -->
3108 <!-- should be ignored -->
3111 {{echo|1<!-- should be ignored -->=foo}}
3113 {{echo|<!-- should be ignored -->1=foo}}
3121 <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>
3123 <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>
3125 <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>
3127 <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>
3131 Templates: Other wikitext in parameter names (T69657)
3138 <p typeof="mw:Transclusion" data-mw='{"parts":[{"template":{"target":{"wt":"echo","href":"./Template:Echo"},"params":{"''1''":{"wt":"foo"}},"i":0}}]}'>{{{1}}}</p>
3142 Templates: With colons
3146 <p>Template with colon
3149 <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>
3152 #--------------------------------------------------------------------
3153 # Transclusion parameter escaping tests
3154 #--------------------------------------------------------------------
3157 Templates: Parsoid parameter escaping test 1
3159 {{echo|[foo]|{{echo|[bar]}}}}
3164 <p about="#mwt1" typeof="mw:Transclusion"
3165 data-mw='{"parts":[{"template":{"target":{"wt":"echo","href":"./Template:Echo"},"params":{"1":{"wt":"[foo]"},"2":{"wt":"{{echo|[bar]}}"}},"i":0}}]}'>[foo]</p>
3169 Parsoid: Pipes in external links in template parameter
3171 {{echo|[{{echo|http://example.com}} link]}}
3173 <p><a rel="nofollow" class="external text" href="http://example.com">link</a>
3176 <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>
3180 Parsoid: pipe in transclusion parameter
3182 {{echo|http://foo.com/a|b}}
3184 <p><a rel="nofollow" class="external free" href="http://foo.com/a%7Cb">http://foo.com/a%7Cb</a>
3187 <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>
3191 Parsoid: Pipe in external link target and content in template parameter
3193 parsoid=html2wt,wt2wt
3195 {{echo|[http://foo.com/a|b a|b]}}
3197 <p><a rel="nofollow" class="external text" href="http://foo.com/a%7Cb">a|b</a>
3200 <p><a rel="mw:ExtLink" href="http://foo.com/a|b" about="#mwt1"
3201 typeof="mw:Transclusion"
3202 data-mw='{"parts":[{"template":{"target":{"wt":"echo","href":"./Template:Echo"},
3203 "params":{"1":{"wt":"[http://foo.com/a|b a|b]"}},"i":0}}]}'>a|b</a></p>
3207 Parsoid: Pipe in template with nested template in external link target in template parameter (seriously)
3211 {{echo|[{{fullurl:{{FULLPAGENAME}}|action=edit}} bar]}}
3213 <p typeof="mw:Transclusion" data-mw='{"parts":[{"template":{"target":{"wt":"echo","href":"./Template:Echo"},"params":{"1":{"wt":"[{{fullurl:{{FULLPAGENAME}}|action=edit}} bar]"}},"i":0}}]}'>[Main Page bar]</p>
3217 Templates: Don't escape already nowiki-escaped text in template parameters
3219 parsoid=html2wt,wt2wt
3221 {{echo|foo<nowiki>|</nowiki>bar}}
3222 {{echo|<nowiki><div></nowiki>}}
3223 {{echo|<nowiki></nowiki>}}
3230 <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>
3231 <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>
3232 <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>
3238 Templates: '=' char in nested transclusions should not trigger nowiki escapes or conversion to named param
3240 parsoid=html2wt,wt2wt
3242 {{echo|{{echo|1=bar}}}}
3247 <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>
3252 Templates parameters with special tokenizing behavior dont get modified because of arg escaping
3259 <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>
3264 Templates: Preserve blank parameter names
3271 <p about="#mwt1" typeof="mw:Transclusion" data-mw='{"parts":[{"template":{"target":{"wt":"echo","href":"./Template:Echo"},"params":{"":{"wt":"foo"}},"i":0}}]}'>{{{1}}}</p>
3275 Templates: Preserve blank parameter names in other positions
3277 {{blank_param|bar|=foo}}
3283 <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
3288 ### Parsoid-centric tests for testing RT edge cases for pre
3292 1a. Indent-Pre and Comments
3305 1b. Indent-Pre and Comments
3318 1c. Indent-Pre and Comments
3331 1d. Indent-Pre and Comments
3332 (Pre-handler currently cannot distinguish between comment/ws order and normalizes them to [comment,ws] order)
3345 2a. Indent-Pre and tables
3366 2b. Indent-Pre and tables
3382 2c. Indent-Pre and tables (T44252)
3399 2d. Indent-Pre and tables
3416 <tbody><tr><td> b</td></tr>
3421 2e. Indent-Pre and table-line syntax
3434 2f. Indent-pre started by table-line syntax
3453 2g. Indented table markup mixed with indented pre content (proposed in T8200)
3458 Text that should be rendered preformatted
3466 <pre>Text that should be rendered preformatted
3475 2h. Indent pre in tables
3477 parsoid=wt2html,html2html
3520 </td><td data-parsoid='{"startTagSrc":"{{!}}"}'>
3522 </td></tr></tbody></table>
3526 3a. Indent-Pre and block tags (single-line html)
3530 c <blockquote> foo </blockquote>
3535 c <blockquote> foo </blockquote>
3536 <pre><span> foo </span>
3539 <p> a </p><p> foo </p><p>
3540 b </p><div> foo </div><p>
3541 c </p><blockquote><p> foo </p></blockquote>
3542 <pre><span> foo </span>
3545 <p> a </p><p data-parsoid='{"stx":"html"}'> foo </p><p>
3546 b </p><div data-parsoid='{"stx":"html"}'> foo </div><p>
3547 c </p><blockquote data-parsoid='{"stx":"html"}'><p> foo </p></blockquote>
3548 <pre><span data-parsoid='{"stx":"html"}'> foo </span></pre>
3552 3b. Indent-Pre and block tags (multi-line html)
3555 <!-- comment --> b <div> foo </div>
3557 <pre>a <span>foo</span>
3562 <pre>a <span data-parsoid='{"stx":"html"}'>foo</span></pre>
3563 <!-- comment --> <p>b </p><div data-parsoid='{"stx":"html"}'> foo </div>
3565 <pre>a <span>foo</span>
3567 b </p><div> foo </div>
3571 3c. Indent-Pre and block tags (pre-content on separate line)
3635 4. Indent-Pre and extension tags
3637 parsoid=wt2html,html2html
3646 <p> a </p><pre typeof="mw:Extension/tag" about="#mwt2" data-mw='{"name":"tag","attrs":{}}'></pre>
3650 5. Indent-Pre and html pre
3652 <pre class="123">hi</pre>
3654 <pre class="123">hi</pre>
3657 <pre typeof="mw:Extension/pre" about="#mwt2" class="123" data-mw='{"name":"pre","attrs":{"class":"123"},"body":{"extsrc":"hi"}}'>hi</pre>
3661 Render paragraphs when indent-pre is suppressed in blocklevels
3678 4. Multiple spaces at start-of-line
3696 ## NOTE: the leading white-space chars on empty line are significant
3698 5a. White-space in indent-pre
3710 ## NOTE: the leading white-space chars on empty line are significant
3712 5b. White-space in indent-pre
3731 5c. White-space in indent-pre
3744 6. Pre-blocks should extend across lines with leading WS even when there is no wrappable content
3767 7a. Indent-pre and category links
3769 parsoid=wt2html,wt2wt
3771 [[Category:foo]] <!-- No pre-wrapping -->
3772 {{echo| [[Category:foo]]}} <!-- No pre-wrapping -->
3775 <link rel="mw:PageProp/Category" href="./Category:Foo"> <!-- No pre-wrapping -->
3776 <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 -->
3779 ## We used to, but no longer wt2wt this test since the default serializer
3780 ## will normalize all categories to serialize on their own line.
3781 ## This wikitext usage is going to be fairly uncommon in production and
3782 ## selser will take care of preserving formatting in those scenarios.
3784 7b. Indent-pre and category links
3789 [[Category:foo]] {{echo|b}}
3791 <pre><link rel="mw:PageProp/Category" href="./Category:Foo"> a
3792 <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>
3796 Indent-Pre: Newlines in comments shouldn't affect sol state
3811 ### HTML-pre (some to spec PHP parser behavior and some Parsoid-RT-centric)
3815 HTML-pre: 1. embedded newlines
3847 <pre typeof="mw:Extension/pre" about="#mwt2" data-mw='{"name":"pre","attrs":{},"body":{"extsrc":"foo"}}'>foo</pre>
3849 <pre typeof="mw:Extension/pre" about="#mwt4" data-mw='{"name":"pre","attrs":{},"body":{"extsrc":"\nfoo\n"}}'>foo
3852 <pre typeof="mw:Extension/pre" about="#mwt6" data-mw='{"name":"pre","attrs":{},"body":{"extsrc":"\n\nfoo\n"}}'>
3857 <pre typeof="mw:Extension/pre" about="#mwt8" data-mw='{"name":"pre","attrs":{},"body":{"extsrc":"\n\n\nfoo\n"}}'>
3865 HTML-pre: big spaces
3901 <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"}}'>
3920 HTML-pre: 2: indented text
3933 HTML-pre: 3: other wikitext
3952 <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
3961 ### Definition lists
3969 <dd>Definition</dd></dl>
3974 Definition list for indentation only
3978 <dl><dd>Indented text</dd></dl>
3983 Definition list with no space
3988 <dd>Definition</dd></dl>
3993 Definition list with URL link
3995 ;http://example.com/ :definition
3997 <dl><dt><a rel="nofollow" class="external free" href="http://example.com/">http://example.com/</a></dt>
3998 <dd>definition</dd></dl>
4003 Definition list with bracketed URL link
4005 ;[http://www.example.com/ Example]:Something about it
4007 <dl><dt><a rel="nofollow" class="external text" href="http://www.example.com/">Example</a></dt>
4008 <dd>Something about it</dd></dl>
4013 Definition list with wikilink containing colon
4015 ;[[Help:FAQ]]:The least-read page on Wikipedia
4017 <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>
4018 <dd>The least-read page on Wikipedia</dd></dl>
4022 # At Brion's and JeLuF's insistence... :)
4024 Definition list with news link containing colon
4026 ;news:alt.wikipedia.rox :This isn't even a real newsgroup!
4028 <dl><dt><a rel="nofollow" class="external free" href="news:alt.wikipedia.rox">news:alt.wikipedia.rox</a></dt>
4029 <dd>This isn't even a real newsgroup!</dd></dl>
4032 <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>
4036 Malformed definition list with colon
4038 ;news:alt.wikipedia.rox -- don't crash or enter an infinite loop
4040 <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>
4045 Definition lists: colon in external link text
4047 ;[http://www.wikipedia2.org/ Wikipedia :The Next Generation] :OK, I made that up
4049 <dl><dt><a rel="nofollow" class="external text" href="http://www.wikipedia2.org/">Wikipedia :The Next Generation</a></dt>
4050 <dd>OK, I made that up</dd></dl>
4055 Definition lists: colon in HTML attribute
4057 ;<b style="display: inline">bold</b>
4059 <dl><dt><b style="display: inline">bold</b></dt></dl>
4064 Definition lists: self-closed tag
4066 ;one<br/>two :two-line fun
4068 <dl><dt>one<br />two</dt>
4069 <dd>two-line fun</dd></dl>
4074 Definition lists: ignore colons inside tags
4076 ;one <b>two : tag <i>fun:</i>:</b>:def
4078 <dl><dt>one <b>two : tag <i>fun:</i>:</b></dt>
4084 Definition lists: excess closed tags
4086 ;one</b>two :bad tag fun
4089 <dd>bad tag fun</dd></dl>
4093 <dd>bad tag fun</dd>
4098 T13748: Literal closing tags
4102 <dd>test test test test test</dd>
4104 <dd>test test test test test</dd>
4109 <dd>test test test test test</dd>
4111 <dd>test test test test test</dd>
4117 Definition and unordered list using wiki syntax nested in unordered list using html tags.
4126 <dd>description</dd></dl>
4127 <ul><li>unordered</li></ul>
4133 Definition list with empty definition and following paragraph
4146 Nested definition lists using html syntax
4159 Definition Lists: No nesting: Multiple dd's
4172 Definition Lists: Indentation: Regular
4180 <dl><dd>i3</dd></dl></dd></dl></dd></dl>
4185 Definition Lists: Indentation: Missing 1st level
4191 <dl><dd>i3</dd></dl></dd></dl></dd></dl>
4196 Definition Lists: Indentation: Multi-level indent
4200 <dl><dd><dl><dd><dl><dd>i3</dd></dl></dd></dl></dd></dl>
4205 Definition Lists: Hacky use to indent tables
4212 should be left alone
4214 <dl><dd><dl><dd><table>
4219 </td></tr></table></dd></dl></dd></dl>
4221 should be left alone
4226 Definition Lists: Hacky use to indent tables (with content following table)
4231 |} <!--c1--> this text should be part of the dl
4238 </td></tr></tbody></table> this text should be part of the dl</dd></dl>
4245 </td></tr></tbody></table> <!--c1--> this text should be part of the dl</dd></dl>
4249 Definition Lists: Hacky use to indent tables, with comments (T65979)
4257 should be left alone
4260 <dl><dd><dl><dd><table><tr>
4263 </tr></table><!-- bar --></dd></dl></dd></dl>
4265 should be left alone</p>
4269 Definition Lists: Hacky use to indent tables, with comment before table
4277 <dl><dd><dl><dd><!-- foo --><table><tr>
4279 </tr></table></dd></dl></dd></dl>
4282 # The trailing whitespace in this test is to catch a regression in
4283 # Parsoid after T54473.
4285 Definition Lists: Hacky use to indent tables (WS-insensitive)
4294 </td></tr></table></dd></dl>
4298 <tbody><tr><td>a</td></tr>
4299 </tbody></table></dd></dl>
4302 ## The PHP parser treats : items (dd) without a corresponding ; item (dt)
4303 ## as an empty dt item. It also ignores all but the last ";" when followed
4304 ## by ":" later on. So, ";" are not ignored in ";;;t3" but are ignored in
4305 ## ";;;t3 :d1". So, PHP parser behavior is a little inconsistent wrt multiple
4308 ## Ex: ";;t2 ::d2" is transformed into:
4320 ## But, Parsoid treats "; :" as a tight atomic unit and excess ":" as plain text
4321 ## So, the same wikitext above (;;t2 ::d2) is transformed into:
4332 ## All Parsoid only definition list tests have this difference.
4334 ## See also: https://phabricator.wikimedia.org/T8569
4335 ## and https://lists.wikimedia.org/pipermail/wikitext-l/2011-November/000483.html
4338 Table / list interaction: indented table with lists in table contents
4360 </td></tr></table></dd></dl>
4365 Table / list interaction: lists nested in tables nested in indented lists
4388 </td></tr></table></dd></dl>
4395 Definition Lists: Nesting: Multi-level (Parsoid only)
4423 Definition Lists: Nesting: Test 2
4430 <dl><dd>d2</dd></dl></dd></dl>
4435 Definition Lists: Nesting: Test 3
4440 <dl><dd><dl><dt>t1</dt>
4442 <dl><dd><dl><dd>d2</dd></dl></dd></dl></dd></dl></dd></dl>
4447 Definition Lists: Nesting: Test 4
4452 <dl><dd><dl><dd><dl><dt>t3</dt>
4453 <dd>d3</dd></dl></dd></dl></dd></dl>
4458 ## The Parsoid team believes the following three test exposes a
4459 ## bug in the PHP parser. (Parsoid team thinks the PHP parser is
4460 ## wrong to close the <dl> after the <dt> containing the <ul>.)
4461 ## It also exposes a "misfeature" in tidy, which doesn't like
4462 ## <dl> tags with a single <dt> child; it converts the <dt> into
4463 ## a <dd> in that case. (Parsoid leaves the <dt> alone!)
4465 Definition Lists: Mixed Lists: Test 1
4471 <dl><dd><dl><dt><ul><li>foo</li>
4472 <li>bar</li></ul></dt></dl>
4473 <dl><dt>baz</dt></dl></dd></dl>
4476 <dl><dd><dl><dt><ul><li>foo</li>
4477 <li>bar</li></ul></dt></dl>
4478 <dl><dt>baz</dt></dl></dd></dl>
4496 Definition Lists: Mixed Lists: Test 2
4501 <ul><li><dl><dd>d1</dd>
4502 <dd>d2</dd></dl></li></ul>
4508 Definition Lists: Mixed Lists: Test 3
4513 <ul><li><dl><dd><dl><dd><dl><dd>d1</dd>
4514 <dd>d2</dd></dl></dd></dl></dd></dl></li></ul>
4520 Definition Lists: Mixed Lists: Test 4
4525 <ul><li><dl><dt>d1</dt>
4528 <dd>d4</dd></dl></li></ul>
4534 Definition Lists: Mixed Lists: Test 5
4540 <dl><dd>d2</dd></dl></dd></dl></li></ul>
4546 Definition Lists: Mixed Lists: Test 6
4551 <ol><li><ul><li><dl><dd>d1
4552 <dl><dd><dl><dd>d3</dd></dl></dd></dl></dd></dl></li></ul></li></ol>
4558 Definition Lists: Mixed Lists: Test 7
4563 <dl><dd><ul><li>d1</li>
4564 <li>d2</li></ul></dd></dl>
4570 Definition Lists: Mixed Lists: Test 8
4575 <dl><dd><ul><li>d1</li></ul>
4576 <dl><dd><ul><li>d2</li></ul></dd></dl></dd></dl>
4582 Definition Lists: Mixed Lists: Test 9
4586 <ul><li><dl><dt>foo</dt>
4587 <dd>bar</dd></dl></li></ul>
4593 Definition Lists: Mixed Lists: Test 10
4597 <ul><li><ol><li><dl><dt>foo</dt>
4598 <dd>bar</dd></dl></li></ol></li></ul>
4602 # The Parsoid team disagrees with the PHP parser's seemingly-random
4603 # rules regarding dd/dt on the next few tests. Parsoid is more
4604 # consistent, and recognizes the shared nesting and keeps the
4605 # still-open tags around until the nesting is complete.
4607 # This is a regression test for T175099
4609 Definition Lists: Mixed Lists: Test 11
4616 <ul><li>b</li></ul></dd></dl>
4620 <dd><ul><li>b</li></ul></dd></dl>
4623 # FIXME: Maybe get rid of this test?
4625 Definition Lists: Mixed Lists: Test 12
4630 <ul><li><ol><li><ul><li><ol><li><dl><dt>foo</dt>
4631 <dd><ul><li><dl><dt><dl><dt>bar</dt></dl></dd></dl></li></ul></dd></dl>
4633 <dd>baz</dd></dl></li></ol></li></ul></li></ol></li></ul>
4636 <ul><li><ol><li><ul><li><ol><li><dl><dt>foo</dt>
4637 <dd><ul><li><dl><dt><dl><dt>bar</dt></dl></dt></dl></li></ul></dd></dl></li></ol></li></ul>
4639 <dd>baz</dd></dl></li></ol></li></ul>
4657 <dd data-parsoid='{"stx":"row"}'>bar</dd>
4662 <dd data-parsoid='{"stx":"row"}'>baz</dd>
4671 Definition Lists: Mixed Lists: Test 13
4676 <ul><li><ol><li><ul><li><ol><li><dl><dt>foo </dt>
4677 <dd><ul><li><dl><dt><dl><dt>bar</dt></dl></dt></dl></li></ul></dd></dl></li></ol></li></ul>
4678 <dl><dt>boo </dt>
4679 <dd>baz</dd></dl></li></ol></li></ul>
4682 # FIXME: Maybe get rid of this test?
4684 # * The test is wrong, there are two colons where there should be :;
4685 # * The PHP parser is wrong to close the <dl> after the <dt> containing the <ul>.
4687 Definition Lists: Weird Ones: Test 1
4689 *#;*::;;foo :bar (who uses this?)
4691 <ul><li><ol><li><dl><dt>foo</dt>
4692 <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>
4710 <dd data-parsoid='{"stx":"row"}'>bar (who uses this?)</dd>
4722 Definition Lists: colons occurring in tags
4739 <dt><span>a:b</span></dt>
4740 <dt><div>a:b</div></dt>
4741 <dt><div>a</div></dt>
4745 <dt><i>a:b</i></dt></dl>
4746 <dl><dt><dl><dt><dl><dt><i>a:b</i></dt></dl></dt></dl></dt></dl>
4748 <dl><dt>a</dt><dd data-parsoid='{"stx":"row"}'>b</dd>
4750 <dt><i data-parsoid='{"stx":"html"}'>a:b</i></dt>
4751 <dt><span data-parsoid='{"stx":"html"}'>a:b</span></dt>
4752 <dt><div data-parsoid='{"stx":"html"}'>a:b</div></dt>
4753 <dt><div data-parsoid='{"stx":"html","autoInsertedEnd":true}'>a</div></dt>
4755 <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>
4756 <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>
4757 <dl><dt><dl><dt><i>a:b</i></dt></dl></dt></dl></dt></dl>
4760 # Parsoid's output differs here again because it shares
4761 # nesting between the two lists unlike the PHP parser.
4762 # Unsure which is more desirable.
4764 Definition Lists: colons and tables 1
4776 </td></tr></table></dd></dl>
4780 </td></tr></table></dd></dl>
4786 </td></tr></table></dd>
4790 </td></tr></table></dd></dl>
4793 # FIXME: Does this need a html/php section?
4795 Definition Lists: template interaction
4797 ::{{definition_list}}
4800 ::{{definition_list}}
4805 <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">
4806 </span><dd about="#mwt1">two</dd></dl></dd></dl>
4808 <dl><dd data-parsoid='{}'>one
4809 <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">
4810 </span><dd about="#mwt2">two
4812 <dd>three</dd></dl></dd>
4813 <dd data-parsoid='{}'>four</dd></dl></dd></dl>
4821 External links: non-bracketed
4823 Non-bracketed: http://example.com
4825 <p>Non-bracketed: <a rel="nofollow" class="external free" href="http://example.com">http://example.com</a>
4829 # parsoid doesn't explicitly mark autonumbered links, see T55505
4831 External links: numbered
4833 Numbered: [http://example.com]
4834 Numbered: [http://example.net]
4835 Numbered: [http://example.com]
4837 <p>Numbered: <a rel="nofollow" class="external autonumber" href="http://example.com">[1]</a>
4838 Numbered: <a rel="nofollow" class="external autonumber" href="http://example.net">[2]</a>
4839 Numbered: <a rel="nofollow" class="external autonumber" href="http://example.com">[3]</a>
4842 <p>Numbered: <a rel="mw:ExtLink" class="external autonumber" href="http://example.com"></a>
4843 Numbered: <a rel="mw:ExtLink" class="external autonumber" href="http://example.net"></a>
4844 Numbered: <a rel="mw:ExtLink" class="external autonumber" href="http://example.com"></a></p>
4848 External links: specified text
4850 Specified text: [http://example.com link]
4852 <p>Specified text: <a rel="nofollow" class="external text" href="http://example.com">link</a>
4857 External links: trail
4859 Linktrails should not work for external links: [http://example.com link]s
4861 <p>Linktrails should not work for external links: <a rel="nofollow" class="external text" href="http://example.com">link</a>s
4866 External links: dollar sign in URL
4868 http://example.com/1$2345
4870 <p><a rel="nofollow" class="external free" href="http://example.com/1$2345">http://example.com/1$2345</a>
4874 # parsoid doesn't explicitly mark autonumbered links, see T55505
4876 External links: dollar sign in URL (autonumber)
4878 [http://example.com/1$2345]
4880 <p><a rel="nofollow" class="external autonumber" href="http://example.com/1$2345">[1]</a>
4883 <p><a rel="mw:ExtLink" class="external autonumber" href="http://example.com/1$2345"></a></p>
4887 External links: open square bracket forbidden in URL (T6377)
4889 parsoid=wt2html,wt2wt,html2html
4891 http://example.com/1[2345
4893 <p><a rel="nofollow" class="external free" href="http://example.com/1">http://example.com/1</a>[2345
4896 <p><a rel="mw:ExtLink" class="external free" href="http://example.com/1">http://example.com/1</a>[2345</p>
4900 External links: open square bracket forbidden in URL (named) (T6377)
4902 parsoid=wt2html,html2html
4904 [http://example.com/1[2345]
4906 <p><a rel="nofollow" class="external text" href="http://example.com/1">[2345</a>
4909 <p><a rel="mw:ExtLink" class="external text" href="http://example.com/1">[2345</a></p>
4912 # parsoid adds a space before the link name
4914 External links: open square bracket forbidden in URL (named) (T6377)
4917 [http://example.com/1 [2345]
4919 <p><a rel="nofollow" class="external text" href="http://example.com/1">[2345</a>
4924 External links: nowiki in URL link text (T8230)
4926 [http://example.com/ <nowiki>''example site''</nowiki>]
4928 <p><a rel="nofollow" class="external text" href="http://example.com/">''example site''</a>
4933 External links: newline forbidden in text (T8230 regression check)
4935 [http://example.com/ first
4938 <p>[<a rel="nofollow" class="external free" href="http://example.com/">http://example.com/</a> first
4944 External links: Pipe char between url and text
4946 [http://example.com | link]
4948 <p><a rel="nofollow" class="external text" href="http://example.com">| link</a>
4953 External links: protocol-relative URL in brackets
4955 [//example.com/ Test]
4957 <p><a rel="nofollow" class="external text" href="//example.com/">Test</a>
4961 # parsoid doesn't explicitly mark autonumbered links, see T55505
4963 External links: protocol-relative URL in brackets without text
4967 <p><a rel="nofollow" class="external autonumber" href="//example.com">[1]</a>
4970 <p><a rel="mw:ExtLink" class="external autonumber" href="//example.com"></a></p>
4974 External links: protocol-relative URL in free text is left alone
4978 <p>//example.com/Foo
4983 External links: protocol-relative URL in the middle of a word is left alone (T32269)
4985 foo//example.com/Foo
4987 <p>foo//example.com/Foo
4991 ## html2wt and html2html will fail because we will prefer the :en: interwiki prefix over wikipedia:
4993 External links: with no contents
4995 parsoid=wt2html,wt2wt
4997 [http://en.wikipedia.org/wiki/Foo]
4999 [[wikipedia:Foo|Bar]]
5001 [[wikipedia:Foo|<span>Bar</span>]]
5003 <p><a rel="nofollow" class="external autonumber" href="http://en.wikipedia.org/wiki/Foo">[1]</a>
5004 </p><p><a href="http://en.wikipedia.org/wiki/Foo" class="extiw" title="wikipedia:Foo">Bar</a>
5005 </p><p><a href="http://en.wikipedia.org/wiki/Foo" class="extiw" title="wikipedia:Foo"><span>Bar</span></a>
5008 <p><a rel="mw:ExtLink" class="external autonumber" href="http://en.wikipedia.org/wiki/Foo"></a></p>
5009 <p><a rel="mw:WikiLink/Interwiki" href="http://en.wikipedia.org/wiki/Foo" title="wikipedia:Foo">Bar</a></p>
5010 <p><a rel="mw:WikiLink/Interwiki" href="http://en.wikipedia.org/wiki/Foo" title="wikipedia:Foo"><span>Bar</span></a></p>
5014 External links: Free with trailing punctuation
5024 http://example.com/url_with_(brackets)
5025 (http://example.com/url_without_brackets)
5026 http://example.com/url_with_entity&
5027 http://example.com/url_with_entity&
5028 http://example.com/url_with_entity&
5029 http://example.com/url_with_entity
5030 http://example.com/url_with_entity 
5031 http://example.com/url_with_entity 
5032 http://example.com/url_with_entity<
5033 http://example.com/url_with_entity<
5034 http://example.com/url_with_entity<
5036 <p><a rel="nofollow" class="external free" href="http://example.com">http://example.com</a>,
5037 <a rel="nofollow" class="external free" href="http://example.com">http://example.com</a>;
5038 <a rel="nofollow" class="external free" href="http://example.com">http://example.com</a>\
5039 <a rel="nofollow" class="external free" href="http://example.com">http://example.com</a>.
5040 <a rel="nofollow" class="external free" href="http://example.com">http://example.com</a>:
5041 <a rel="nofollow" class="external free" href="http://example.com">http://example.com</a>!
5042 <a rel="nofollow" class="external free" href="http://example.com">http://example.com</a>?
5043 <a rel="nofollow" class="external free" href="http://example.com">http://example.com</a>)
5044 <a rel="nofollow" class="external free" href="http://example.com/url_with_(brackets)">http://example.com/url_with_(brackets)</a>
5045 (<a rel="nofollow" class="external free" href="http://example.com/url_without_brackets">http://example.com/url_without_brackets</a>)
5046 <a rel="nofollow" class="external free" href="http://example.com/url_with_entity&">http://example.com/url_with_entity&</a>
5047 <a rel="nofollow" class="external free" href="http://example.com/url_with_entity&">http://example.com/url_with_entity&</a>
5048 <a rel="nofollow" class="external free" href="http://example.com/url_with_entity&">http://example.com/url_with_entity&</a>
5049 <a rel="nofollow" class="external free" href="http://example.com/url_with_entity">http://example.com/url_with_entity</a> 
5050 <a rel="nofollow" class="external free" href="http://example.com/url_with_entity">http://example.com/url_with_entity</a> 
5051 <a rel="nofollow" class="external free" href="http://example.com/url_with_entity">http://example.com/url_with_entity</a> 
5052 <a rel="nofollow" class="external free" href="http://example.com/url_with_entity">http://example.com/url_with_entity</a><
5053 <a rel="nofollow" class="external free" href="http://example.com/url_with_entity">http://example.com/url_with_entity</a><
5054 <a rel="nofollow" class="external free" href="http://example.com/url_with_entity">http://example.com/url_with_entity</a><
5057 <p><a rel="mw:ExtLink" class="external free" href="http://example.com">http://example.com</a>,
5058 <a rel="mw:ExtLink" class="external free" href="http://example.com">http://example.com</a>;
5059 <a rel="mw:ExtLink" class="external free" href="http://example.com">http://example.com</a>\
5060 <a rel="mw:ExtLink" class="external free" href="http://example.com">http://example.com</a>.
5061 <a rel="mw:ExtLink" class="external free" href="http://example.com">http://example.com</a>:
5062 <a rel="mw:ExtLink" class="external free" href="http://example.com">http://example.com</a>!
5063 <a rel="mw:ExtLink" class="external free" href="http://example.com">http://example.com</a>?
5064 <a rel="mw:ExtLink" class="external free" href="http://example.com">http://example.com</a>)
5065 <a rel="mw:ExtLink" class="external free" href="http://example.com/url_with_(brackets)">http://example.com/url_with_(brackets)</a>
5066 (<a rel="mw:ExtLink" class="external free" href="http://example.com/url_without_brackets">http://example.com/url_without_brackets</a>)
5067 <a rel="mw:ExtLink" class="external free" href="http://example.com/url_with_entity&">http://example.com/url_with_entity&</a>
5068 <a rel="mw:ExtLink" class="external free" href="http://example.com/url_with_entity&">http://example.com/url_with_entity&</a>
5069 <a rel="mw:ExtLink" class="external free" href="http://example.com/url_with_entity&">http://example.com/url_with_entity&</a>
5070 <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>
5071 <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>
5072 <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>
5073 <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>
5074 <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>
5075 <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>
5079 External links: tricky Parsoid html2html case
5081 parsoid=wt2html,wt2wt,html2html
5083 http://example.com/url_with_entity&amp;
5085 <p><a rel="nofollow" class="external free" href="http://example.com/url_with_entity&amp">http://example.com/url_with_entity&amp</a>;
5088 <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>
5092 External links: Free with trailing quotes (T113666)
5094 '''News:''' Stuff here
5098 <p><b>News:</b> Stuff here
5099 </p><p><a rel="nofollow" class="external free" href="news:'a'b">news:'a'b</a><i>c</i>d e
5102 <p><b>News:</b> Stuff here</p>
5103 <p><a rel="mw:ExtLink" class="external free" href="news:'a'b">news:'a'b</a><i>c</i>d e</p>
5107 External links: with entity
5109 [http:// www.librarieswithoutborders.org Libraries without borders]
5111 <p><a rel="nofollow" class="external text" href="http://+www.librarieswithoutborders.org">Libraries without borders</a>
5114 <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>
5118 External links: Lone protocols are never linked (T105697)
5137 External links: No preceding word characters allowed (T67278)
5139 NOPEhttp://example.com
5140 N0http://example.com
5141 ok:http://example.com
5142 ok-http://example.com
5144 <p>NOPEhttp://example.com
5145 N0http://example.com
5146 ok:<a rel="nofollow" class="external free" href="http://example.com">http://example.com</a>
5147 ok-<a rel="nofollow" class="external free" href="http://example.com">http://example.com</a>
5152 External links: nofollow domain exception
5154 A [https://no-nofollow.org/foobar link], and another [https://example.org link].
5156 <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>.
5163 External image: http://meta.wikimedia.org/upload/f/f1/Ncwikicol.png
5165 <p>External image: <img src="http://meta.wikimedia.org/upload/f/f1/Ncwikicol.png" alt="Ncwikicol.png"/>
5170 External image from https
5172 External image from https: https://meta.wikimedia.org/upload/f/f1/Ncwikicol.png
5174 <p>External image from https: <img src="https://meta.wikimedia.org/upload/f/f1/Ncwikicol.png" alt="Ncwikicol.png"/>
5179 External image (when not allowed)
5181 wgAllowExternalImages=0
5183 External image: http://meta.wikimedia.org/upload/f/f1/Ncwikicol.png
5185 <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>
5190 Link to non-http image, no img tag
5192 Link to non-http image, no img tag: ftp://example.com/test.jpg
5194 <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>
5199 External links: terminating separator
5201 Terminating separator: http://example.com/thing,
5203 <p>Terminating separator: <a rel="nofollow" class="external free" href="http://example.com/thing">http://example.com/thing</a>,
5208 External links: intervening separator
5210 Intervening separator: http://example.com/1,2,3
5212 <p>Intervening separator: <a rel="nofollow" class="external free" href="http://example.com/1,2,3">http://example.com/1,2,3</a>
5217 External links: old bug with URL in query
5219 Old bug with URL in query: [http://example.com/thing?url=http://example.com link]
5221 <p>Old bug with URL in query: <a rel="nofollow" class="external text" href="http://example.com/thing?url=http://example.com">link</a>
5226 External links: old URL-in-URL bug, mixed protocols
5228 And again with mixed protocols: [ftp://example.com?url=http://example.com link]
5230 <p>And again with mixed protocols: <a rel="nofollow" class="external text" href="ftp://example.com?url=http://example.com">link</a>
5234 # Since Parsoid is starting to emit canonical wikitext for links,
5235 # [http://example.com http://example.com] will not RT back to that
5238 External links: URL in text
5242 URL in text: [http://example.com http://example.com]
5244 <p>URL in text: <a rel="nofollow" class="external text" href="http://example.com">http://example.com</a>
5247 <p>URL in text: <a rel="mw:ExtLink" class="external text" href="http://example.com">http://example.com</a></p>
5251 External links: Clickable images
5253 ja-style clickable images: [http://example.com http://meta.wikimedia.org/upload/f/f1/Ncwikicol.png]
5255 <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>
5258 <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>
5262 External links: raw ampersand
5264 Old & use: http://x&y
5266 <p>Old & use: <a rel="nofollow" class="external free" href="http://x&y">http://x&y</a>
5271 External links: encoded ampersand
5273 Old & use: http://x&y
5275 <p>Old & use: <a rel="nofollow" class="external free" href="http://x&y">http://x&y</a>
5278 <p>Old <span typeof="mw:Entity">&</span> use: <a rel="mw:ExtLink" class="external free" href="http://x&y">http://x&y</a></p>
5282 External links: encoded equals (T8102)
5284 http://example.com/?foo=bar
5286 <p><a rel="nofollow" class="external free" href="http://example.com/?foo=bar">http://example.com/?foo=bar</a>
5289 <p><a rel="mw:ExtLink" class="external free" href="http://example.com/?foo=bar">http://example.com/?foo=bar</a></p>
5293 ## Note that parsoid doesn't explicit mark autonumbered links, nor
5294 ## does it number them. As discussed in T55505, we can identify
5295 ## autonumbered links via CSS.
5299 External links: [raw ampersand]
5301 Old & use: [http://x&y]
5303 <p>Old & use: <a rel="nofollow" class="external autonumber" href="http://x&y">[1]</a>
5306 <p>Old <span typeof="mw:Entity">&</span> use: <a rel="mw:ExtLink" class="external autonumber" href="http://x&y"></a></p>
5309 # note that parsoid html is identical to [raw ampersand] case; so html2wt
5310 # mode will return the [raw ampersand] wikitext
5312 External links: [encoded ampersand]
5314 parsoid=wt2html,wt2wt,html2html
5316 Old & use: [http://x&y]
5318 <p>Old & use: <a rel="nofollow" class="external autonumber" href="http://x&y">[1]</a>
5321 <p>Old <span typeof="mw:Entity">&</span> use: <a rel="mw:ExtLink" class="external autonumber" href="http://x&y"></a></p>
5325 External links: [raw equals]
5327 [http://example.com/?foo=bar]
5329 <p><a rel="nofollow" class="external autonumber" href="http://example.com/?foo=bar">[1]</a>
5332 <p><a rel="mw:ExtLink" class="external autonumber" href="http://example.com/?foo=bar"></a></p>
5335 # note that parsoid html is identical to [raw equals] case; so html2wt
5336 # mode will return the [raw equals] wikitext
5338 External links: [encoded equals] (T8102)
5340 parsoid=wt2html,wt2wt,html2html
5342 [http://example.com/?foo=bar]
5344 <p><a rel="nofollow" class="external autonumber" href="http://example.com/?foo=bar">[1]</a>
5347 <p><a rel="mw:ExtLink" class="external autonumber" href="http://example.com/?foo=bar"></a></p>
5350 # xxx parsoid strips the IDN character, so the round-trip tests will
5351 # obviously fail and are disabled. --cscott
5353 External links: [IDN ignored character reference in hostname; strip it right off]
5355 parsoid=wt2html,wt2wt,html2html
5357 [http://e‌xample.com/]
5359 <p><a rel="nofollow" class="external autonumber" href="http://example.com/">[1]</a>
5362 <p><a rel="mw:ExtLink" class="external autonumber" href="http://example.com/"></a></p>
5365 # FIXME: This test (the IDN characters in the text of a link) is an inconsistency.
5366 # Where an external link could easily circumvent the sanitization of the text of
5367 # a link like this (where an IDN-ignore character is in the URL somewhere), this
5368 # test demands a higher standard. That's a bit strange.
5372 # http://example.com -> [http://example.com|http://example.com]
5373 # [http://example.com|http://example.com] -> [http://example.com|http://example.com]
5375 # The first example is sanitized, but the second is not. Any security benefits
5376 # from this production are trivial to circumvent. Either remove this test and
5377 # let the parser(s) do their thing unaccosted, or fix the inconsistency and change
5378 # the test accordingly.
5382 # xxx parsoid strips the IDN character, so the round-trip tests will
5383 # obviously fail and are disabled. --cscott
5385 External links: IDN ignored character reference in hostname; strip it right off
5387 parsoid=wt2html,html2html
5389 http://e‌xample.com/
5391 <p><a rel="nofollow" class="external free" href="http://example.com/">http://example.com/</a>
5394 <p><a rel="mw:ExtLink" class="external free" href="http://example.com/">http://example.com/</a></p>
5398 External links: www.jpeg.org (T2554)
5402 <p><a rel="nofollow" class="external free" href="http://www.jpeg.org">http://www.jpeg.org</a>
5406 # parsoid doesn't explicitly mark autonumbered links, see T55505
5408 External links: URL within URL (T2002)
5410 [http://www.unausa.org/newindex.asp?place=http://www.unausa.org/programs/mun.asp]
5412 <p><a rel="nofollow" class="external autonumber" href="http://www.unausa.org/newindex.asp?place=http://www.unausa.org/programs/mun.asp">[1]</a>
5415 <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>
5419 T2361: URL inside bracketed URL
5421 [http://www.example.com/foo http://www.example.com/bar]
5423 <p><a rel="nofollow" class="external text" href="http://www.example.com/foo">http://www.example.com/bar</a>
5428 T2361: URL within URL, not bracketed
5430 http://www.example.com/foo?=http://www.example.com/bar
5432 <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>
5437 T2289: ">"-token in URL-tail
5439 http://www.example.com/<hello>
5441 <p><a rel="nofollow" class="external free" href="http://www.example.com/">http://www.example.com/</a><hello>
5446 T2289: literal ">"-token in URL-tail
5448 http://www.example.com/<b>html</b>
5450 <p><a rel="nofollow" class="external free" href="http://www.example.com/">http://www.example.com/</a><b>html</b>
5453 <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>
5457 T2289: ">"-token in bracketed URL
5459 [http://www.example.com/<hello> stuff]
5461 <p><a rel="nofollow" class="external text" href="http://www.example.com/"><hello> stuff</a>
5466 T2289: literal ">"-token in bracketed URL
5468 [http://www.example.com/<b>html</b> stuff]
5470 <p><a rel="nofollow" class="external text" href="http://www.example.com/"><b>html</b> stuff</a>
5475 T2289: literal double quote at end of URL
5477 http://www.example.com/"hello"
5479 <p><a rel="nofollow" class="external free" href="http://www.example.com/">http://www.example.com/</a>"hello"
5484 T2289: literal double quote 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 External links: multiple legal whitespace is fine, Magnus. Don't break it please. (T7081)
5495 [http://www.example.com test]
5497 <p><a rel="nofollow" class="external text" href="http://www.example.com">test</a>
5502 External links: link text with spaces
5504 [http://www.example.com a b c]
5505 [http://www.example.com ''a'' ''b'']
5507 <p><a rel="nofollow" class="external text" href="http://www.example.com">a b c</a>
5508 <a rel="nofollow" class="external text" href="http://www.example.com"><i>a</i> <i>b</i></a>
5512 # Note edge case difference between PHP and Parsoid here.
5514 External links: wiki links within external link (T5695)
5516 parsoid=wt2html,html2html
5518 [http://example.com [[wikilink]] embedded in ext link]
5520 [http://example.com test [[wikilink]] embedded in ext link]
5522 <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>
5523 </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>
5526 <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>
5527 <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>
5531 T2787: Links with one slash after the url protocol are invalid
5535 [http:/example.com title]
5537 <p>http:/example.com
5538 </p><p>[http:/example.com title]
5543 Bracketed external links with template-generated invalid target
5545 [{{echo|http:/example.com}} title]
5547 <p>[http:/example.com title]
5551 # wt2html only because Parsoid would want to add <nowiki>s coming from html
5553 Broken wikilinks (but not external links) prevent templates from closing
5557 [http://example.com x
5559 {{echo|[http://example.com x}}
5565 <p>[<a rel="nofollow" class="external free" href="http://example.com">http://example.com</a> x
5566 </p><p>[<a rel="nofollow" class="external free" href="http://example.com">http://example.com</a> x
5568 </p><p>{{echo|[[Foo}}
5571 <p>[<a rel="mw:ExtLink" class="external free" href="http://example.com">http://example.com</a> x</p>
5572 <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>
5574 <p>{{echo|[[Foo}}</p>
5578 Wikilinks with embedded newlines are not broken
5589 <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>
5601 <p>{{echo|<a href="/wiki/Foo" title="Foo">}}</a>
5605 <p>{{echo|<a rel="mw:WikiLink" href="./Foo" title="Foo">}}</a></p>
5606 <p>[[Foo|<span typeof="mw:Transclusion" data-mw='{"parts":[{"template":{"target":{"wt":"echo","href":"./Template:Echo"},"params":{"1":{"wt":"]]"}},"i":0}}]}'>]]</span></p>
5610 T4702: Mismatched <i>, <b> and <a> tags are invalid
5612 ''[http://example.com text'']
5613 [http://example.com '''text]'''
5614 ''Something [http://example.com in italic'']
5615 ''Something [http://example.com mixed''''', even bold]'''
5616 '''''Now [http://example.com both''''']
5618 <p><a rel="nofollow" class="external text" href="http://example.com"><i>text</i></a>
5619 <a rel="nofollow" class="external text" href="http://example.com"><b>text</b></a>
5620 <i>Something </i><a rel="nofollow" class="external text" href="http://example.com"><i>in italic</i></a>
5621 <i>Something </i><a rel="nofollow" class="external text" href="http://example.com"><i>mixed</i><b>, even bold</b></a>
5622 <i><b>Now </b></i><a rel="nofollow" class="external text" href="http://example.com"><i><b>both</b></i></a>
5630 http://www.example.com/?title=AT%26T
5632 <p><a rel="nofollow" class="external free" href="http://www.example.com/?title=AT%26T">http://www.example.com/?title=AT%26T</a>
5635 <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>
5638 # According to https://www.w3.org/TR/2011/WD-html5-20110525/Overview.html#parsing-urls a plain
5639 # % is actually legal in HTML5. Any change in output would need testing though.
5641 T6781, T7267: %25 in URL
5643 http://www.example.com/?title=100%25_Bran
5645 <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>
5648 <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>
5652 T6781, T7267: %28, %29 in URL
5654 http://www.example.com/?title=Ben-Hur_%281959_film%29
5656 <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>
5659 <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>
5664 T6781: %26 in autonumber URL
5666 [http://www.example.com/?title=AT%26T]
5668 <p><a rel="nofollow" class="external autonumber" href="http://www.example.com/?title=AT%26T">[1]</a>
5671 <p><a rel="mw:ExtLink" class="external autonumber" href="http://www.example.com/?title=AT%26T"></a></p>
5675 T6781, T7267: %26 in autonumber URL
5677 [http://www.example.com/?title=100%25_Bran]
5679 <p><a rel="nofollow" class="external autonumber" href="http://www.example.com/?title=100%25_Bran">[1]</a>
5682 <p><a rel="mw:ExtLink" class="external autonumber" href="http://www.example.com/?title=100%25_Bran"></a></p>
5686 T6781, T7267: %28, %29 in autonumber URL
5688 [http://www.example.com/?title=Ben-Hur_%281959_film%29]
5690 <p><a rel="nofollow" class="external autonumber" href="http://www.example.com/?title=Ben-Hur_%281959_film%29">[1]</a>
5693 <p><a rel="mw:ExtLink" class="external autonumber" href="http://www.example.com/?title=Ben-Hur_%281959_film%29"></a></p>
5698 T6781: %26 in bracketed URL
5700 [http://www.example.com/?title=AT%26T link]
5702 <p><a rel="nofollow" class="external text" href="http://www.example.com/?title=AT%26T">link</a>
5705 <p><a rel="mw:ExtLink" class="external text" href="http://www.example.com/?title=AT%26T">link</a></p>
5709 T6781, T7267: %25 in bracketed URL
5711 [http://www.example.com/?title=100%25_Bran link]
5713 <p><a rel="nofollow" class="external text" href="http://www.example.com/?title=100%25_Bran">link</a>
5718 T6781, T7267: %28, %29 in bracketed URL
5720 [http://www.example.com/?title=Ben-Hur_%281959_film%29 link]
5722 <p><a rel="nofollow" class="external text" href="http://www.example.com/?title=Ben-Hur_%281959_film%29">link</a>
5725 <p><a rel="mw:ExtLink" class="external text" href="http://www.example.com/?title=Ben-Hur_%281959_film%29">link</a></p>
5729 External link containing a period in the anchor. (T65947)
5731 [//foo.org/bar#baz. bang]
5733 [//foo.org/bar. bang]
5735 <p><a rel="nofollow" class="external text" href="//foo.org/bar#baz.">bang</a>
5736 </p><p><a rel="nofollow" class="external text" href="//foo.org/bar.">bang</a>
5739 <p><a rel="mw:ExtLink" class="external text" href="//foo.org/bar#baz.">bang</a></p>
5740 <p><a rel="mw:ExtLink" class="external text" href="//foo.org/bar.">bang</a></p>
5744 External link containing a single quote. (T65947)
5748 [//foo.org/bar'baz bang]
5750 <p><a rel="nofollow" class="external autonumber" href="//foo.org/bar'baz">[1]</a>
5751 </p><p><a rel="nofollow" class="external text" href="//foo.org/bar'baz">bang</a>
5754 <p><a rel="mw:ExtLink" class="external autonumber" href="//foo.org/bar'baz"></a></p>
5755 <p><a rel="mw:ExtLink" class="external text" href="//foo.org/bar'baz">bang</a></p>
5759 External link containing double-single-quotes in text '' (T6598 sanity check)
5761 Some [http://example.com/ pretty ''italics'' and stuff]!
5763 <p>Some <a rel="nofollow" class="external text" href="http://example.com/">pretty <i>italics</i> and stuff</a>!
5768 External link containing double-single-quotes in text embedded in italics (T6598 sanity check)
5770 ''Some [http://example.com/ pretty ''italics'' and stuff]!''
5772 <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>
5776 # Don't add the html/php section since the output is broken and there isn't any reason to spec it
5778 External link containing double-single-quotes with no space separating the url from text in italics
5780 [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]].]
5782 <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>.
5785 <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>
5789 External link with comments in link text
5791 [http://www.google.com Google <!-- comment -->]
5793 <p><a rel="nofollow" class="external text" href="http://www.google.com">Google </a>
5796 <p><a rel="mw:ExtLink" class="external text" href="http://www.google.com">Google <!-- comment --></a></p>
5800 External link to bare IPv4 address
5802 [http://192.168.0.1 Link]
5804 <p><a rel="nofollow" class="external text" href="http://192.168.0.1">Link</a>
5807 <p><a rel="mw:ExtLink" class="external text" href="http://192.168.0.1">Link</a></p>
5811 URL-encoding in URL functions (single parameter)
5813 {{localurl:Some page|amp=&}}
5815 <p>/index.php?title=Some_page&amp=&
5820 URL-encoding in URL functions (multiple parameters)
5822 {{localurl:Some page|q=?&=&}}
5824 <p>/index.php?title=Some_page&q=?&amp=&
5831 http://example.com/index.php?foozoid%5B%5D=bar
5833 http://example.com/index.php?foozoid[]=bar
5835 <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>
5836 </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>
5839 <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>
5841 <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>
5845 IPv6 urls, autolink format (T23261)
5847 http://[2404:130:0:1000::187:2]/index.php
5849 Examples from RFC 2373, section 2.2:
5851 *http://[1080::8:800:200C:417A]/unicast
5852 *http://[FF01::101]/multicast
5853 *http://[::1]/loopback
5854 *http://[::]/unspecified
5855 *http://[::13.1.68.3]/ipv4compat
5856 *http://[::FFFF:129.144.52.38]/ipv4compat
5858 Examples from RFC 2732, section 2:
5860 *http://[FEDC:BA98:7654:3210:FEDC:BA98:7654:3210]:80/index.html
5861 *http://[1080:0:0:0:8:800:200C:417A]/index.html
5862 *http://[3ffe:2a00:100:7031::1]
5863 *http://[1080::8:800:200C:417A]/foo
5864 *http://[::192.9.5.5]/ipng
5865 *http://[::FFFF:129.144.52.38]:80/index.html
5866 *http://[2010:836B:4179::836B:4179]
5868 <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>
5869 </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:
5871 <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>
5872 <li><a rel="nofollow" class="external free" href="http://[FF01::101]/multicast">http://[FF01::101]/multicast</a></li>
5873 <li><a rel="nofollow" class="external free" href="http://[::1]/loopback">http://[::1]/loopback</a></li>
5874 <li><a rel="nofollow" class="external free" href="http://[::]/unspecified">http://[::]/unspecified</a></li>
5875 <li><a rel="nofollow" class="external free" href="http://[::13.1.68.3]/ipv4compat">http://[::13.1.68.3]/ipv4compat</a></li>
5876 <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>
5877 <p>Examples from <a class="external mw-magiclink-rfc" rel="nofollow" href="https://tools.ietf.org/html/rfc2732">RFC 2732</a>, section 2:
5879 <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>
5880 <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>
5881 <li><a rel="nofollow" class="external free" href="http://[3ffe:2a00:100:7031::1]">http://[3ffe:2a00:100:7031::1]</a></li>
5882 <li><a rel="nofollow" class="external free" href="http://[1080::8:800:200C:417A]/foo">http://[1080::8:800:200C:417A]/foo</a></li>
5883 <li><a rel="nofollow" class="external free" href="http://[::192.9.5.5]/ipng">http://[::192.9.5.5]/ipng</a></li>
5884 <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>
5885 <li><a rel="nofollow" class="external free" href="http://[2010:836B:4179::836B:4179]">http://[2010:836B:4179::836B:4179]</a></li></ul>
5888 <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>
5890 <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>
5891 <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>
5892 <li><a rel="mw:ExtLink" class="external free" href="http://[FF01::101]/multicast">http://[FF01::101]/multicast</a></li>
5893 <li><a rel="mw:ExtLink" class="external free" href="http://[::1]/loopback">http://[::1]/loopback</a></li>
5894 <li><a rel="mw:ExtLink" class="external free" href="http://[::]/unspecified">http://[::]/unspecified</a></li>
5895 <li><a rel="mw:ExtLink" class="external free" href="http://[::13.1.68.3]/ipv4compat">http://[::13.1.68.3]/ipv4compat</a></li>
5896 <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>
5898 <p>Examples from <a href="https://tools.ietf.org/html/rfc2732" rel="mw:ExtLink" class="external mw-magiclink">RFC 2732</a>, section 2:</p>
5899 <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>
5900 <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>
5901 <li><a rel="mw:ExtLink" class="external free" href="http://[3ffe:2a00:100:7031::1]">http://[3ffe:2a00:100:7031::1]</a></li>
5902 <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>
5903 <li><a rel="mw:ExtLink" class="external free" href="http://[::192.9.5.5]/ipng">http://[::192.9.5.5]/ipng</a></li>
5904 <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>
5905 <li><a rel="mw:ExtLink" class="external free" href="http://[2010:836B:4179::836B:4179]">http://[2010:836B:4179::836B:4179]</a></li></ul>
5909 IPv6 urls, bracketed format (T23261)
5911 [http://[2404:130:0:1000::187:2]/index.php test]
5913 Examples from RFC 2373, section 2.2:
5915 *[http://[1080::8:800:200C:417A] unicast]
5916 *[http://[FF01::101] multicast]
5917 *[http://[::1]/ loopback]
5918 *[http://[::] unspecified]
5919 *[http://[::13.1.68.3] ipv4compat]
5920 *[http://[::FFFF:129.144.52.38] ipv4compat]
5922 Examples from RFC 2732, section 2:
5924 *[http://[FEDC:BA98:7654:3210:FEDC:BA98:7654:3210]:80/index.html 1]
5925 *[http://[1080:0:0:0:8:800:200C:417A]/index.html 2]
5926 *[http://[3ffe:2a00:100:7031::1] 3]
5927 *[http://[1080::8:800:200C:417A]/foo 4]
5928 *[http://[::192.9.5.5]/ipng 5]
5929 *[http://[::FFFF:129.144.52.38]:80/index.html 6]
5930 *[http://[2010:836B:4179::836B:4179] 7]
5932 <p><a rel="nofollow" class="external text" href="http://[2404:130:0:1000::187:2]/index.php">test</a>
5933 </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:
5935 <ul><li><a rel="nofollow" class="external text" href="http://[1080::8:800:200C:417A]">unicast</a></li>
5936 <li><a rel="nofollow" class="external text" href="http://[FF01::101]">multicast</a></li>
5937 <li><a rel="nofollow" class="external text" href="http://[::1]/">loopback</a></li>
5938 <li><a rel="nofollow" class="external text" href="http://[::]">unspecified</a></li>
5939 <li><a rel="nofollow" class="external text" href="http://[::13.1.68.3]">ipv4compat</a></li>
5940 <li><a rel="nofollow" class="external text" href="http://[::FFFF:129.144.52.38]">ipv4compat</a></li></ul>
5941 <p>Examples from <a class="external mw-magiclink-rfc" rel="nofollow" href="https://tools.ietf.org/html/rfc2732">RFC 2732</a>, section 2:
5943 <ul><li><a rel="nofollow" class="external text" href="http://[FEDC:BA98:7654:3210:FEDC:BA98:7654:3210]:80/index.html">1</a></li>
5944 <li><a rel="nofollow" class="external text" href="http://[1080:0:0:0:8:800:200C:417A]/index.html">2</a></li>
5945 <li><a rel="nofollow" class="external text" href="http://[3ffe:2a00:100:7031::1]">3</a></li>
5946 <li><a rel="nofollow" class="external text" href="http://[1080::8:800:200C:417A]/foo">4</a></li>
5947 <li><a rel="nofollow" class="external text" href="http://[::192.9.5.5]/ipng">5</a></li>
5948 <li><a rel="nofollow" class="external text" href="http://[::FFFF:129.144.52.38]:80/index.html">6</a></li>
5949 <li><a rel="nofollow" class="external text" href="http://[2010:836B:4179::836B:4179]">7</a></li></ul>
5952 <p><a rel="mw:ExtLink" class="external text" href="http://[2404:130:0:1000::187:2]/index.php">test</a></p>
5954 <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>
5955 <ul><li><a rel="mw:ExtLink" class="external text" href="http://[1080::8:800:200C:417A]">unicast</a></li>
5956 <li><a rel="mw:ExtLink" class="external text" href="http://[FF01::101]">multicast</a></li>
5957 <li><a rel="mw:ExtLink" class="external text" href="http://[::1]/">loopback</a></li>
5958 <li><a rel="mw:ExtLink" class="external text" href="http://[::]">unspecified</a></li>
5959 <li><a rel="mw:ExtLink" class="external text" href="http://[::13.1.68.3]">ipv4compat</a></li>
5960 <li><a rel="mw:ExtLink" class="external text" href="http://[::FFFF:129.144.52.38]">ipv4compat</a></li></ul>
5962 <p>Examples from <a href="https://tools.ietf.org/html/rfc2732" rel="mw:ExtLink" class="external mw-magiclink">RFC 2732</a>, section 2:</p>
5963 <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>
5964 <li><a rel="mw:ExtLink" class="external text" href="http://[1080:0:0:0:8:800:200C:417A]/index.html">2</a></li>
5965 <li><a rel="mw:ExtLink" class="external text" href="http://[3ffe:2a00:100:7031::1]">3</a></li>
5966 <li><a rel="mw:ExtLink" class="external text" href="http://[1080::8:800:200C:417A]/foo">4</a></li>
5967 <li><a rel="mw:ExtLink" class="external text" href="http://[::192.9.5.5]/ipng">5</a></li>
5968 <li><a rel="mw:ExtLink" class="external text" href="http://[::FFFF:129.144.52.38]:80/index.html">6</a></li>
5969 <li><a rel="mw:ExtLink" class="external text" href="http://[2010:836B:4179::836B:4179]">7</a></li></ul>
5973 Non-extlinks in brackets
5982 [{{echo|foo}} ''bar'']
5983 [{{echo|foo}}l's] errand
5984 [{{echo|foo}}l's errand]
5986 [url=http://example.com]
5987 [http:// bare protocols don't count]
6000 [url=<a rel="nofollow" class="external free" href="http://example.com">http://example.com</a>]
6001 [http:// bare protocols don't count]
6009 [<span about="#mwt19" typeof="mw:Transclusion" data-mw='{"parts":[{"template":{"target":{"wt":"echo","href":"./Template:Echo"},"params":{"1":{"wt":"foo"}},"i":0}}]}'>foo</span>]
6010 [<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]
6011 [<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>]
6012 [<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
6013 [<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]
6014 [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>]
6015 [url=<a rel="mw:ExtLink" class="external free" href="http://example.com">http://example.com</a>]
6016 [http:// bare protocols don't count]</p>
6020 Percent encoding in external links
6022 [https://github.com/search?l=&q=ResourceLoader+%40wikimedia Search]
6024 <p><a rel="nofollow" class="external text" href="https://github.com/search?l=&q=ResourceLoader+%40wikimedia">Search</a>
6027 <p><a rel="mw:ExtLink" class="external text" href="https://github.com/search?l=&q=ResourceLoader+%40wikimedia">Search</a></p>
6031 Use url link syntax for links where the content is equal the link target
6035 <p><a rel="nofollow" class="external free" href="http://example.com">http://example.com</a>
6038 <p><a rel="mw:ExtLink" class="external free" href="http://example.com">http://example.com</a></p>
6042 Parenthesis in external links, especially URL links
6046 http://example.com/test)
6048 http://example.com/(test)
6050 http://example.com/((test)
6052 (http://example.com/(test))
6054 (http://example.com/(test)))))
6056 http://example.com/a)b
6058 [http://example.com) foo]
6060 <p><a rel="nofollow" class="external free" href="http://example.com">http://example.com</a>)
6061 </p><p><a rel="nofollow" class="external free" href="http://example.com/test">http://example.com/test</a>)
6062 </p><p><a rel="nofollow" class="external free" href="http://example.com/(test)">http://example.com/(test)</a>
6063 </p><p><a rel="nofollow" class="external free" href="http://example.com/((test)">http://example.com/((test)</a>
6064 </p><p>(<a rel="nofollow" class="external free" href="http://example.com/(test))">http://example.com/(test))</a>
6065 </p><p>(<a rel="nofollow" class="external free" href="http://example.com/(test)))))">http://example.com/(test)))))</a>
6066 </p><p><a rel="nofollow" class="external free" href="http://example.com/a)b">http://example.com/a)b</a>
6067 </p><p><a rel="nofollow" class="external text" href="http://example.com)">foo</a>
6070 <p><a rel="mw:ExtLink" class="external free" href="http://example.com">http://example.com</a>)</p>
6071 <p><a rel="mw:ExtLink" class="external free" href="http://example.com/test">http://example.com/test</a>)</p>
6072 <p><a rel="mw:ExtLink" class="external free" href="http://example.com/(test)">http://example.com/(test)</a></p>
6073 <p><a rel="mw:ExtLink" class="external free" href="http://example.com/((test)">http://example.com/((test)</a></p>
6074 <p>(<a rel="mw:ExtLink" class="external free" href="http://example.com/(test))">http://example.com/(test))</a></p>
6075 <p>(<a rel="mw:ExtLink" class="external free" href="http://example.com/(test)))))">http://example.com/(test)))))</a></p>
6076 <p><a rel="mw:ExtLink" class="external free" href="http://example.com/a)b">http://example.com/a)b</a></p>
6077 <p><a rel="mw:ExtLink" class="external text" href="http://example.com)">foo</a></p>
6081 Parenthesis in external links, w/ transclusion or comment
6083 (http://example.com/{{echo|hi}})
6085 (http://example.com<!-- hi -->)
6087 <p>(<a rel="nofollow" class="external free" href="http://example.com/hi">http://example.com/hi</a>)
6088 </p><p>(<a rel="nofollow" class="external free" href="http://example.com">http://example.com</a>)
6091 <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>
6093 <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>
6097 Serialize <a> tags with invalid link targets as plain text
6099 parsoid={ "modes": ["html2wt"], "suppressErrors": true }
6101 <a rel="mw:WikiLink" href="[[foo]]">text</a>
6102 <a rel="mw:WikiLink" href="[[foo]]">*text</a>
6103 <a rel="mw:WikiLink" href="[[foo]]">[[foo]]</a>
6104 <a rel="mw:WikiLink" href="[[foo]]">*a [[foo]]</a>
6107 <nowiki>*</nowiki>text
6108 <nowiki>[[foo]]</nowiki>
6109 <nowiki>*</nowiki>a <nowiki>[[foo]]</nowiki>
6113 mw:ExtLink -vs- mw:WikiLink (T94723)
6117 <a rel="mw:WikiLink" href="./Foo" title="Foo" data-parsoid='{"stx":"piped","a":{"href":"./Foo"},"sa":{"href":"Foo"}}'>Bar</a>
6118 <a rel="mw:WikiLink" href="./Foo" title="Foo">Bar</a>
6119 <a rel="mw:WikiLink" href="http://en.wikipedia.org/wiki/Foo" title="Foo">Bar</a>
6120 <a rel="mw:ExtLink" href="http://en.wikipedia.org/wiki/Foo" title="Foo">Bar</a>
6122 <a rel="mw:ExtLink" href="http://en.wikipedia.org/wiki/European_Robin">European Robin</a>
6123 <a rel="mw:WikiLink" href="http://en.wikipedia.org/wiki/European_Robin">European Robin</a>
6131 [[:en:European_Robin|European Robin]]
6132 [[:en:European_Robin|European Robin]]
6136 mw:ExtLink linking to a interwiki URL can be round-tripped losslessly (T94723)
6140 [http://en.wikipedia.org/wiki/European_Robin European Robin]
6142 THIS SECTION IS NOT USED (but Parsoid won't run the test without it)
6153 Normal text. '''Bold text.''' Normal text. ''Italic text.''
6155 Normal text. '''''Bold italic text.''''' Normal text.
6157 <p>Normal text. <b>Bold text.</b> Normal text. <i>Italic text.</i>
6158 </p><p>Normal text. <i><b>Bold italic text.</b></i> Normal text.
6163 Quotes wrapping HTML table
6165 '''<table><tr><td>hi</td></tr></table>'''
6167 <b><table><tbody><tr><td>hi</td></tr></tbody></table></b>
6169 <b><table data-parsoid='{"stx":"html"}'><tbody><tr data-parsoid='{"stx":"html"}'><td data-parsoid='{"stx":"html"}'>hi</td></tr></tbody></table></b>
6172 # Parsoid inserts an empty bold tag pair at the end of the line, that the PHP
6173 # parser strips. The wikitext contains just the first half of the bold
6176 Unclosed and unmatched quotes
6178 '''''Bold italic text '''with bold deactivated''' in between.'''''
6180 '''''Bold italic text ''with italic deactivated'' in between.'''''
6184 ..spanning two paragraphs (should not work).'''
6186 '''Bold tag left open
6188 ''Italic tag left open
6192 <!-- Unmatching number of opening, closing tags: -->
6193 '''This year''''s election ''should'' beat '''last year''''s.
6195 ''Tom'''s car is bigger than ''Susan'''s.
6197 Plain ''italic'''s plain
6199 <p><i><b>Bold italic text </b>with bold deactivated<b> in between.</b></i>
6200 </p><p><b><i>Bold italic text </i>with italic deactivated<i> in between.</i></b>
6201 </p><p><b>Bold text..</b>
6202 </p><p>..spanning two paragraphs (should not work).
6203 </p><p><b>Bold tag left open</b>
6204 </p><p><i>Italic tag left open</i>
6206 </p><p><b>This year'</b>s election <i>should</i> beat <b>last year'</b>s.
6207 </p><p><i>Tom<b>s car is bigger than </b></i><b>Susan</b>s.
6208 </p><p>Plain <i>italic'</i>s plain
6211 <p><i><b>Bold italic text </b>with bold deactivated<b> in between.</b></i>
6212 </p><p><b><i>Bold italic text </i>with italic deactivated<i> in between.</i></b>
6213 </p><p><b>Bold text..</b>
6214 </p><p>..spanning two paragraphs (should not work).<b></b>
6215 </p><p><b>Bold tag left open</b>
6216 </p><p><i>Italic tag left open</i>
6219 <!-- Unmatching number of opening, closing tags: -->
6220 <p><b>This year'</b>s election <i>should</i> beat <b>last year'</b>s.
6221 </p><p><i>Tom<b>s car is bigger than </b></i><b>Susan</b>s.
6222 </p><p>Plain <i>italic'</i>s plain
6229 ### some content taken from http://meta.wikimedia.org/wiki/MediaWiki_User%27s_Guide:_Using_tables
6232 # This should not produce <table></table> as <table><tr><td></td></tr></table>
6233 # is the bare minimum required by the spec, see:
6234 # https://www.w3.org/TR/xhtml-modularization/dtd_module_defs.html#a_module_Basic_Tables
6235 # Parsoid team replies: empty table tags are legal in HTML5
6237 A table with no data.
6250 A table with stray table end tags on start tag line (wt2html)
6254 {|style="color: red;"|}
6256 {|style="color: red;" |}
6260 {|style="color: red;"|} id="foo"
6264 {|style="color: red;" |} id="foo"
6268 <table style="color: red;"></table>
6270 <table style="color: red;">
6276 <table style="color: red;" id="foo">
6282 <table style="color: red;" id="foo">
6291 A table with no data (take 2)
6299 # A table with nothing but a caption is invalid XHTML, we might want to render
6300 # this as <p>caption</p>
6301 # Parsoid team replies: table with only a caption is legal in HTML5
6303 A table with nothing but a caption
6311 </caption><tr><td></td></tr></table>
6314 <table><caption>caption</caption></table>
6318 A table with caption with default-spaced attributes and a table row
6321 |+ style="color: red;" |caption1
6327 <caption style="color: red;">caption1
6336 A table with captions with non-default spaced attributes and a table row
6339 |+style="color: red;"|caption2
6340 |+ style="color: red;"|caption3
6346 <caption style="color: red;">caption2
6348 <caption style="color: red;">caption3
6357 Table td-cell syntax variations
6362 |style='color:red;'|baz
6363 |style='color:red;'||baz
6370 <td>foo bar foo</td>
6373 <td style="color:red;">baz
6375 <td>style='color:red;'</td>
6403 Simple table but with multiple dashes for row wikitext
6422 Multiplication table
6424 {| border="1" cellpadding="2"
6425 |+Multiplication table
6445 <table border="1" cellpadding="2">
6446 <caption>Multiplication table
6493 Accept "||" in table headings
6508 Accept "!!" in table data
6522 <tbody><tr data-parsoid='{"autoInsertedEnd":true,"autoInsertedStart":true}'><td data-parsoid='{"autoInsertedEnd":true}'> Foo!! </td><td data-parsoid='{"stx":"row","autoInsertedEnd":true}'></td></tr>
6527 Accept "||" in indented table headings
6537 </th></tr></table></dd></dl>
6542 Accept "!!" in templates
6556 <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>
6560 Accept "!!" in table headings after newline
6577 <p>b!!c</p></th></tr>
6582 Accept "!!" in table data of mixed wikitext / html syntax
6586 <tr><td>b!!c</td></tr>
6592 </th></tr><tr><td>b!!c</td></tr>
6596 <tbody><tr><th>a</th></tr>
6597 <tr data-parsoid='{"stx":"html"}'><td data-parsoid='{"stx":"html"}'>b!!c</td></tr>
6602 Accept empty attributes in td/th cells (td/th cells starting with leading ||)
6619 Accept "| !" at start of line in tables (ignore !-attribute)
6623 |!style="color:red"|bar
6635 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 +/-
6639 |style='color:red;'|+1
6640 |style='color:blue;'|-1
6652 <td style="color:red;">+1
6654 <td style="color:blue;">-1
6678 |rowspan=2|Cell 2, row 1 (and 2)
6689 <td rowspan="2">Cell 2, row 1 (and 2)
6707 {| bgcolor=#ABCDEF border=2
6712 |the original table again
6720 <table bgcolor="#ABCDEF" border="2">
6728 <td>the original table again
6734 Invalid attributes in table cell (T3830)
6748 Table cell attributes: Pipes protected by nowikis should be treated as a plain character
6752 |title="foo<nowiki>|</nowiki>" |bar
6753 |title="foo<nowiki>|</nowiki>" bar
6760 <td title="foo|">bar
6762 <td>title="foo|" bar
6767 <tbody><tr><td title="foo">bar</td>
6768 <td title="foo|" data-parsoid='{"a":{"title":"foo|"},"sa":{"title":"foo<nowiki>|</nowiki>"},"autoInsertedEnd":true}'>bar</td>
6769 <td> title="foo<span typeof="mw:Nowiki">|</span>" bar</td></tr>
6773 # See: http://lists.wikimedia.org/mailman/htdig/wikitech-l/2006-April/022293.html
6774 # N.B. The "|}" to close the table is missing from the input, so parsoid's
6775 # *2wt modes will fail.
6777 Table security: embedded pipes
6779 parsoid=wt2html,html2html
6782 | |[ftp://|x||]" onmouseover="alert(document.cookie)">test
6786 <td>[<a rel="nofollow" class="external free" href="ftp://%7Cx">ftp://%7Cx</a></td>
6787 <td>]" onmouseover="alert(document.cookie)">test
6795 <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>
6799 Element attributes with double ! should not be broken up by <th>
6802 !hi <div class="!!">ha</div> ho
6807 <th>hi <div class="!!">ha</div> ho
6812 <tbody><tr><th>hi <div class="!!" data-parsoid='{"stx":"html"}'>ha</div> ho</th></tr>
6817 ! and || in element attributes should not be parsed as <th>/<td>
6820 |<div style="color: red !important;" data-contrived="put this here ||">hi</div>
6825 <td><div style="color: red !important;" data-contrived="put this here ||">hi</div>
6830 <tbody><tr><td><div style="color: red !important;" data-contrived="put this here ||" data-parsoid='{"stx":"html"}'>hi</div></td></tr>
6834 # FIXME: The output seems broken. Filed as T110268.
6836 ! and || in td attributes should not be parsed as <th>/<td>
6841 |style="color: red !important;" data-contrived="put this here ||"|foo
6846 <td>style="color: red !important;" data-contrived="put this here</td>
6852 <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>
6857 Break on | in element attribute in template
6859 parsoid=wt2html,html2html
6861 {{echo|1=<div class="hi|ho">ha</div>}}
6863 <p>ho">ha</div>
6866 <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>
6870 Break on | in element attribute name in template
6872 {{echo|<div cla|ss="hiho">ha</div>}}
6874 <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>
6878 Don't break on | in extension attribute in template
6880 {{echo|<ref name="hi|ho">ha</ref>}}
6884 <p><sup about="#mwt2" class="mw-ref" id="cite_ref-hi|ho_1-0" rel="dc:references" typeof="mw:Transclusion mw:Extension/ref" data-mw='{"parts":[{"template":{"target":{"wt":"echo","href":"./Template:Echo"},"params":{"1":{"wt":"<ref name=\"hi|ho\">ha</ref>"}},"i":0}}]}'><a href="./Main_Page#cite_note-hi|ho-1" style="counter-reset: mw-Ref 1;"><span class="mw-reflink-text">[1]</span></a></sup></p>
6886 <ol class="mw-references references" typeof="mw:Extension/references" about="#mwt5" data-mw='{"name":"references","attrs":{}}'><li about="#cite_note-hi|ho-1" id="cite_note-hi|ho-1"><a href="./Main_Page#cite_ref-hi|ho_1-0" rel="mw:referencedBy"><span class="mw-linkback-text">↑ </span></a> <span id="mw-reference-text-cite_note-hi|ho-1" class="mw-reference-text">ha</span></li></ol>
6889 ## We don't support roundtripping of these attributes in Parsoid.
6890 ## Selective serialization takes care of preventing dirty diffs.
6891 ## But, on edits, we dirty-diff the invalid attribute text.
6893 Invalid text in table attributes should be discarded
6897 {| <span>boo</span> style='border:1px solid black'
6898 | <span>boo</span> style='color:blue' |1
6899 |<span>boo</span> style='color:blue'|2
6902 <table style="border:1px solid black">
6904 <td style="color:blue">1
6906 <td style="color:blue">2
6910 <table style="border:1px solid black">
6912 <td style="color:blue">1</td>
6913 <td style="color:blue">2</td>
6919 Invalid text in table attributes should be preserved by selective serializer
6922 "modes": ["selser"],
6924 ["td:first-child", "text", "abc"],
6925 ["td + td", "text", "xyz"]
6929 {| <span>boo</span> style='border:1px solid black'
6930 | <span>boo</span> style='color:blue' | 1
6931 |<span>boo</span> style='color:blue'| 2
6934 {| <span>boo</span> style='border:1px solid black'
6935 | <span>boo</span> style='color:blue' | abc
6936 |<span>boo</span> style='color:blue'| xyz
6941 1. Template-generated table cell attributes and cell content
6946 || {{table_attribs_5}}
6947 | <!--foo--> <!--bar--> <!--baz--> {{table_attribs}}
6948 |align=center {{table_attribs}}
6949 | <!--foo--> align=center <!--bar--> {{table_attribs}}
6954 <td style="color:red;">Foo
6956 <td style="color:red;">Foo
6958 <td>style="color:red;"</td>
6961 <td style="color:red;">Foo
6963 <td align="center" style="color:red;">Foo
6965 <td align="center" style="color:red;">Foo
6971 2. Template-generated table cell attributes and cell content
6974 |{{table_attribs_2}}
6979 <td style="color:red;">Foo
6987 <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>
6988 <td about="#mwt1">Bar</td><td about="#mwt1">Baz</td></tr>
6993 3. Template-generated table cell attributes and cell content
6996 !align=center {{table_header_cells}}
6998 |align=center {{table_cells}}
7003 <th align="center" style="color:red;">Foo</th>
7004 <th style="color:red;"><i>Bar</i></th>
7005 <th style="color:brown;"><i>Foo</i> and Baz
7008 <td align="center" style="color:red;">Foo</td>
7009 <td style="color:red;"><i>Bar</i></td>
7010 <td style="color:brown;"><i>Foo</i> and Baz
7015 <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>
7016 <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>
7021 4. Template-generated table cell attributes and cell content inside a templated table
7024 !align=center {{table_header_cells}}
7026 |align=center {{table_cells}}
7031 <th align="center" style="color:red;">Foo</th>
7032 <th style="color:red;"><i>Bar</i></th>
7033 <th style="color:brown;"><i>Foo</i> and Baz
7036 <td align="center" style="color:red;">Foo</td>
7037 <td style="color:red;"><i>Bar</i></td>
7038 <td style="color:brown;"><i>Foo</i> and Baz
7042 <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}}]}'>
7043 <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>
7045 <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>
7049 ## Edge case fix to prevent future regressions
7051 T107652: <ref>s in templates that also generate table cell attributes should be rendered properly
7054 |{{table_attribs_7}}
7059 <tbody><tr><td style="background:#f9f9f9;" typeof="mw:Transclusion" about="#mwt1" data-mw='{"parts":["|",{"template":{"target":{"wt":"table_attribs_7","href":"./Template:Table_attribs_7"},"params":{},"i":0}}]}'>Foo<sup class="mw-ref" id="cite_ref-1" rel="dc:references" typeof="mw:Extension/ref" data-mw='{"name":"ref","attrs":{},"body":{"id":"mw-reference-text-cite_note-1"}}'><a href="./Main_Page#cite_note-1" style="counter-reset: mw-Ref 1;"><span class="mw-reflink-text">[1]</span></a></s></td></tr>
7061 <ol class="mw-references references" typeof="mw:Extension/references" about="#mwt5" data-mw='{"name":"references","attrs":{}}'><li about="#cite_note-1" id="cite_note-1"><a href="./Main_Page#cite_ref-1" rel="mw:referencedBy"><span class="mw-linkback-text">↑ </span></a> <span id="mw-reference-text-cite_note-1" class="mw-reference-text" data-parsoid="{}">foo</span></li></ol>
7065 Table with row followed by newlines and table heading
7067 parsoid=wt2html,html2html
7085 Table with empty line following the start tag
7087 parsoid=wt2html,html2html
7105 Table attributes with empty value
7107 parsoid=wt2html,html2html
7120 <tbody><tr><td style="">hello</td></tr>
7125 Wikitext table with a lot of comments
7148 Wikitext table comments represented in parsoid dom
7150 {|<!--c1--><!--c2-->
7159 </td></tr></tbody></table>
7161 <table><!--c1--><!--c2-->
7162 <tbody><tr data-parsoid='{"startTagSrc":"|-","autoInsertedEnd":true}'><!--c3-->
7163 <td data-parsoid='{"autoInsertedEnd":true}'>x</td></tr>
7168 Wikitext table with double-line table cell
7185 Table cell with a single comment
7202 Table-cell after a comment-only-empty-line
7219 <tbody><tr data-parsoid='{"autoInsertedEnd":true,"autoInsertedStart":true}'><td data-parsoid='{"autoInsertedEnd":true}'>a</td>
7221 <!--c2--><td data-parsoid='{"autoInsertedEnd":true}'>b</td></tr>
7227 Build table with {{!}}
7229 {{{!}} class="wikitable"
7232 {{!}}- style="color:red;"
7233 {{!}}data{{!}}{{!}} style="color:red;" {{!}}second data
7236 <table class="wikitable">
7242 <tr style="color:red;">
7244 <td style="color:red;">second data
7250 Build table with pipe as data
7252 {| class="wikitable"
7255 |- style="color:red;"
7256 |data|| style="color:red;" |second data
7258 | style="color:red;" |data with | || style="color:red;" | second data with |
7260 ||data with | |||second data with |
7263 <table class="wikitable">
7269 <tr style="color:red;">
7271 <td style="color:red;">second data
7274 <td style="color:red;">data with |</td>
7275 <td style="color:red;">second data with |
7278 <td>data with |</td>
7279 <td>second data with |
7285 Build table with wikilink
7287 {| class="wikitable"
7288 !header||second header
7289 |- style="color:red;"
7290 |data [[Main Page|linktext]]||second data [[Main Page|linktext]]
7292 |data||second data [[Main Page|link|text with pipe]]
7295 <table class="wikitable">
7300 <tr style="color:red;">
7301 <td>data <a href="/wiki/Main_Page" title="Main Page">linktext</a></td>
7302 <td>second data <a href="/wiki/Main_Page" title="Main Page">linktext</a>
7306 <td>second data <a href="/wiki/Main_Page" title="Main Page">link|text with pipe</a>
7311 # The expected HTML structure in this test is debatable. The PHP parser does
7312 # not parse this kind of table at all. The main focus for Parsoid is on
7313 # round-tripping, so this output is ok for now. TODO: revisit!
7315 Wikitext table with html-syntax row
7325 <td>foo</td></tr></tbody></table>
7328 ## Remex doesn't account for fostered content.
7330 Fostered content in tables: Plain text
7350 <p data-parsoid='{"fostered":true,"autoInsertedEnd":true,"autoInsertedStart":true}'>
7353 <tbody><tr class="mw-empty-elt" data-parsoid='{"startTagSrc":"|-"}'></tr></tbody></table>
7357 Fostered content in tables: Lists
7359 parsoid=wt2html,html2html
7372 <ul><li>a</li></ul><table>
7377 <ul data-parsoid='{"fostered":true,"autoInsertedEnd":true}'><li>a</li></ul><table>
7378 <tbody><tr data-parsoid='{"startTagSrc":"|-","autoInsertedEnd":true}'>
7380 </tr></tbody></table>
7384 Template generated table cell with attributes
7388 {{table_attribs_4}} ||a||b
7394 <td style="background-color:#DC241f;" width="10px"></td>
7397 </td></tr></tbody></table>
7400 <tbody><tr data-parsoid='{"startTagSrc":"|-","autoInsertedEnd":true}'>
7401 <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>
7405 Parsoid: Round-trip tables directly followed by content (T53219)
7407 parsoid=wt2html,wt2wt
7420 </td></tr></tbody></table><p> bar
7424 </td></tr></tbody></table><p><b>quux</b>
7429 Parsoid: Default to a newline after tables in new content (T53219)
7434 <tr><td>foo</td></tr></tbody></table> bar
7436 <tr><td>baz</td></tr></tbody></table><b>quux</b>
7441 <nowiki> </nowiki>bar
7449 Parsoid: Row-syntax table headings followed by comment & table cells
7451 parsoid=wt2html,wt2wt
7455 <!-- foo --> ||baz||quux
7469 <tbody><tr><th>foo</th><th>bar
7470 <!-- foo --></th><td> baz </td><td>quux</td></tr>
7475 Parsoid: Recover better from broken table attributes
7489 </td></tr></tbody></table>
7494 <p>foo</p></td></tr>
7499 Tables: Digest broken attributes on table and tr tag
7510 <tr class='mw-empty-elt'></tr>
7511 <tr class='mw-empty-elt'></tr>
7516 Table with missing opening <tr> tag
7518 parsoid=wt2html,wt2wt
7526 <tbody><tr><td>foo</td>
7531 # T137406: Whitespace in the HTML
7533 1. Generate correct wikitext for tables with thead/tbody/tfoot
7538 <caption>Test</caption>
7600 </td></tr></tbody></table>
7603 # T137406: No whitespace in the HTML
7605 2. Generate correct wikitext for tables with thead/tbody/tfoot
7609 <table><thead><tr><th>heading</th></tr></thead><tbody><tr><td>foo</td></tr></tbody></table>
7619 Wikitext tables can be nested inside HTML tables
7623 <table data-parsoid='{"stx":"html"}'>
7626 <tr><td>foo</td></tr>
7644 Plain link, capitalized
7648 <p><a href="/wiki/Main_Page" title="Main Page">Main Page</a>
7653 Plain link, uncapitalized
7657 <p><a href="/wiki/Main_Page" title="Main Page">main Page</a>
7664 [[Main Page|The Main Page]]
7666 <p><a href="/wiki/Main_Page" title="Main Page">The Main Page</a>
7671 Piped link with comment in link text
7673 [[Main Page|The Main<!--front--> Page]]
7675 <p><a href="/wiki/Main_Page" title="Main Page">The Main Page</a>
7680 Piped link with multiple pipe characters in link text
7682 [[Main Page||The|Main|Page|]]
7684 <p><a href="/wiki/Main_Page" title="Main Page">|The|Main|Page|</a>
7687 <p><a rel="mw:WikiLink" href="./Main_Page" title="Main Page">|The|Main|Page|</a></p>
7691 Piped link with no link text
7693 [[Thomas Bek (bishop of St David's)|]]
7695 <p>[[Thomas Bek (bishop of St David's)|]]
7698 <p>[[Thomas Bek (bishop of St David's)|]]</p>
7702 Piped link with empty link text
7704 [[Main Page|<nowiki/>]] - empty nowiki
7705 [[Main Page| ]] - empty space
7706 [[Main Page| ]] - empty non breaking space
7708 <p><a href="/wiki/Main_Page" title="Main Page"></a> - empty nowiki
7709 <a href="/wiki/Main_Page" title="Main Page"> </a> - empty space
7710 <a href="/wiki/Main_Page" title="Main Page"> </a> - empty non breaking space
7713 <p><a rel="mw:WikiLink" href="./Main_Page" title="Main Page"><span typeof="mw:Nowiki"></span></a> - empty nowiki
7714 <a rel="mw:WikiLink" href="./Main_Page" title="Main Page"> </a> - empty space
7715 <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>
7723 <p><a href="/index.php?title=Zigzagzogzagzig&action=edit&redlink=1" class="new" title="Zigzagzogzagzig (page does not exist)">Zigzagzogzagzig</a>
7728 Broken link with fragment
7730 [[Zigzagzogzagzig#zug]]
7732 <p><a href="/index.php?title=Zigzagzogzagzig&action=edit&redlink=1" class="new" title="Zigzagzogzagzig (page does not exist)">Zigzagzogzagzig#zug</a>
7737 Special page link with fragment
7739 [[Special:Version#anchor]]
7741 <p><a href="/wiki/Special:Version#anchor" title="Special:Version">Special:Version#anchor</a>
7746 Nonexistent special page link with fragment
7748 [[Special:ThisNameWillHopefullyNeverBeUsed#anchor]]
7750 <p><a href="/wiki/Special:ThisNameWillHopefullyNeverBeUsed" class="new" title="Special:ThisNameWillHopefullyNeverBeUsed (page does not exist)">Special:ThisNameWillHopefullyNeverBeUsed#anchor</a>
7757 xxx[[main Page]], xxx[[Main Page]], Xxx[[main Page]] XXX[[main Page]], XXX[[Main Page]]
7759 <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>
7766 [[Main Page]]xxx, [[Main Page]]XXX, [[Main Page]]!!!
7768 <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>!!!
7779 T45661: Piped links with identical prefixes
7781 [[prefixed article|prefixed articles with spaces]]
7783 [[prefixed article|prefixed articlesaoeu]]
7785 [[Main Page|Main Page test]]
7787 <p><a href="/wiki/Prefixed_article" title="Prefixed article">prefixed articles with spaces</a>
7788 </p><p><a href="/wiki/Prefixed_article" title="Prefixed article">prefixed articlesaoeu</a>
7789 </p><p><a href="/wiki/Main_Page" title="Main Page">Main Page test</a>
7795 Link with HTML entity in suffix / tail
7797 [[Main Page]]", [[Main Page]]a
7799 <p><a href="/wiki/Main_Page" title="Main Page">Main Page</a>", <a href="/wiki/Main_Page" title="Main Page">Main Page</a>a
7802 <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>
7806 Link with 3 brackets
7817 Link with 4 brackets
7821 <p>[[<a href="/wiki/Main_Page" title="Main Page">Main Page</a>]]
7826 Piped link with 3 brackets
7828 [[[main page|the main page]]]
7830 <p>[[[main page|the main page]]]
7835 Piped link with extlink-like text
7838 [[Main Page|This is a [bar]]]
7841 <p><a href="/wiki/Main_Page" title="Main Page">[bar]</a>
7842 <a href="/wiki/Main_Page" title="Main Page">This is a [bar]</a>
7843 <a href="/wiki/Main_Page" title="Main Page">[bar</a>
7846 <p><a rel="mw:WikiLink" href="./Main_Page" title="Main Page" data-parsoid='{"stx":"piped"}'>[bar]</a>
7847 <a rel="mw:WikiLink" href="./Main_Page" title="Main Page" data-parsoid='{"stx":"piped"}'>This is a [bar]</a>
7848 <a rel="mw:WikiLink" href="./Main_Page" title="Main Page" data-parsoid='{"stx":"piped"}'>[bar</a></p>
7852 Link with multiple pipes
7854 [[Main Page|The|Main|Page]]
7856 <p><a href="/wiki/Main_Page" title="Main Page">The|Main|Page</a>
7861 Anchor containing a #. (T65430)
7863 wgFragmentMode=[ 'html5', 'legacy' ]
7865 [[Main Page#And#Link]]
7867 <p><a href="/wiki/Main_Page#And#Link" title="Main Page">Main Page#And#Link</a>
7870 <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>
7876 [[Talk:Parser testing]], [[Meta:Disclaimers]]
7878 <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>
7883 Link with space in namespace
7885 [[User talk:Foo bar]]
7887 <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>
7892 MemoryAlpha:AlphaTest
7894 This is an article in the MemoryAlpha namespace
7895 (which shadows the memoryalpha interwiki link).
7899 Namespace takes precedence over interwiki link (T53680)
7901 [[MemoryAlpha:AlphaTest]]
7903 <p><a href="/wiki/MemoryAlpha:AlphaTest" title="MemoryAlpha:AlphaTest">MemoryAlpha:AlphaTest</a>
7907 # The previous test doesn't work correctly in html2*, due to not recognizing the
7908 # link as an internal one. This one checks for the correct behavior.
7910 Link to namespace preferred over interwiki with correct rel attribute
7912 parsoid=html2wt,html2html
7914 <p><a rel="mw:WikiLink" href="./MemoryAlpha:AlphaTest" title="MemoryAlpha:AlphaTest">MemoryAlpha:AlphaTest</a></p>
7916 [[MemoryAlpha:AlphaTest]]
7920 Piped link to namespace
7922 [[Meta:Disclaimers|The disclaimers]]
7924 <p><a href="/index.php?title=Meta:Disclaimers&action=edit&redlink=1" class="new" title="Meta:Disclaimers (page does not exist)">The disclaimers</a>
7931 [[Usually caused by a typo (oops}]]
7933 <p>[[Usually caused by a typo (oops}]]
7940 Just a test of an article title containing a percent.
7944 Link containing % (not as a hex sequence)
7947 [[7% Solution|7%25 Solution]]
7949 <p><a href="/wiki/7%25_Solution" title="7% Solution">7% Solution</a>
7950 <a href="/wiki/7%25_Solution" title="7% Solution">7%25 Solution</a>
7953 <p><a rel="mw:WikiLink" href="./7%25_Solution" title="7% Solution">7% Solution</a>
7954 <a rel="mw:WikiLink" href="./7%25_Solution" title="7% Solution">7%25 Solution</a></p>
7957 # note that the parsoid HTML is identical to the previous test output,
7958 # so the previous test ensures that the html2wt mode will generate the
7959 # "not as a hex sequence" wikitext.
7961 Link containing % as a single hex sequence interpreted to char
7963 parsoid=wt2wt,wt2html,html2html
7966 [[7%25 Solution|7%25 Solution]]
7968 <p><a href="/wiki/7%25_Solution" title="7% Solution">7% Solution</a>
7969 <a href="/wiki/7%25_Solution" title="7% Solution">7%25 Solution</a>
7972 <p><a rel="mw:WikiLink" href="./7%25_Solution" title="7% Solution">7% Solution</a>
7973 <a rel="mw:WikiLink" href="./7%25_Solution" title="7% Solution">7%25 Solution</a></p>
7977 Link containing % as a double hex sequence interpreted to hex sequence
7981 <p>[[7%2525 Solution]]
7985 ## Example for such a section: == < ==
7987 Link containing "#<" and "#>" % as a hex sequences- these are valid section anchors
7989 wgFragmentMode=[ 'html5', 'legacy' ]
7991 [[%23%3c]][[%23%3e]]
7993 <p><a href="#<">#<</a><a href="#>">#></a>
7996 <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>
7999 ## Example for such a section: == < ==
8001 Link containing "#<" and "#>" % as a hex sequences- these are valid section anchors (legacy)
8003 wgFragmentMode=[ 'legacy' ]
8005 [[%23%3c]][[%23%3e]]
8007 <p><a href="#.3C">#<</a><a href="#.3E">#></a>
8012 Link containing "<#" and ">#" as a hex sequences
8014 [[%3c%23]][[%3e%23]]
8016 <p>[[%3c%23]][[%3e%23]]
8021 Link containing an equals sign
8023 [[Special:BookSources/isbn=4-00-026157-6]]
8025 <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>
8028 <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>
8034 Just a test of an article title containing an ampersand
8038 Link containing an ampersand
8044 [[Foo &amp; bar]]
8046 <p><a href="/wiki/Foo_%26_bar" title="Foo & bar">Foo & bar</a>
8047 </p><p><a href="/wiki/Foo_%26_bar" title="Foo & bar">Foo & bar</a>
8048 </p><p>[[Foo &amp; bar]]
8051 <p><a rel="mw:WikiLink" href="./Foo_&_bar" title="Foo & bar">Foo & bar</a></p>
8052 <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>
8053 <p>[[Foo <span typeof="mw:Entity" data-parsoid='{"src":"&amp;","srcContent":"&"}'>&</span>amp; bar]]</p>
8059 Just a test of an article title containing a tilde.
8062 # note that links containing signatures, like [[Foo~~~~]], are
8063 # massaged by the pre-save transform (PST) and so the tildes are never
8064 # seen by the parser.
8066 Link containing a tilde
8070 <p><a href="/wiki/Foo~bar" title="Foo~bar">Foo~bar</a>
8073 <p><a rel="mw:WikiLink" href="./Foo~bar" title="Foo~bar">Foo~bar</a></p>
8077 Link containing double-single-quotes '' (T6598)
8079 [[Lista d''e paise d''o munno]]
8081 <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>
8084 <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>
8088 Link containing double quotes and spaces
8092 <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>
8095 <p><a rel="mw:WikiLink" href='./Cool_"Gator"' title='Cool "Gator"'>Cool "Gator"</a></p>
8099 File containing double quotes and spaces
8101 [[File:Cool "Gator".png]]
8103 <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>
8107 Redirect containing double quotes and spaces
8109 #REDIRECT [[Cool "Gator"]]
8111 <link rel="mw:PageProp/redirect" href="./Cool_%22Gator%22" data-parsoid='{"src":"#REDIRECT ","a":{"href":"./Cool_%22Gator%22"},"sa":{"href":"Cool \"Gator\""}}'/>
8115 Link containing double-single-quotes '' in text (T6598 sanity check)
8117 Some [[Link|pretty ''italics'' and stuff]]!
8119 <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>!
8122 <p>Some <a rel="mw:WikiLink" href="./Link" title="Link">pretty <i>italics</i> and stuff</a>!</p>
8126 Link containing double-single-quotes '' in text embedded in italics (T6598 sanity check)
8128 ''Some [[Link|pretty ''italics'' and stuff]]!''
8130 <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>
8135 Link with double quotes in title part (literal) and alternate part (interpreted)
8137 [[File:Denys_Savchenko_''Pentecoste''.jpg]]
8141 [[''Pentecoste''|Pentecoste]]
8143 [[''Pentecoste''|''Pentecoste'']]
8145 <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>
8146 </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>
8147 </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>
8148 </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>
8151 <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>
8152 <p><a rel="mw:WikiLink" href="./''Pentecoste''" title="''Pentecoste''">''Pentecoste''</a></p>
8153 <p><a rel="mw:WikiLink" href="./''Pentecoste''" title="''Pentecoste''">Pentecoste</a></p>
8154 <p><a rel="mw:WikiLink" href="./''Pentecoste''" title="''Pentecoste''"><i>Pentecoste</i></a></p>
8158 Broken image links with HTML captions (T41700)
8160 [[File:Nonexistent|<script></script>]]
8161 [[File:Nonexistent|100x100px|<script></script>]]
8162 [[File:Nonexistent|<]]
8163 [[File:Nonexistent|a<i>b</i>c]]
8165 <p><a href="/index.php?title=Special:Upload&wpDestFile=Nonexistent" class="new" title="File:Nonexistent"><script></script></a>
8166 <a href="/index.php?title=Special:Upload&wpDestFile=Nonexistent" class="new" title="File:Nonexistent"><script></script></a>
8167 <a href="/index.php?title=Special:Upload&wpDestFile=Nonexistent" class="new" title="File:Nonexistent"><</a>
8168 <a href="/index.php?title=Special:Upload&wpDestFile=Nonexistent" class="new" title="File:Nonexistent">abc</a>
8171 <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>
8172 <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>
8173 <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>
8174 <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>
8180 [[http://www.example.com]]
8182 <p>[<a rel="nofollow" class="external autonumber" href="http://www.example.com">[1]</a>]
8185 <p>[<a rel="mw:ExtLink" class="external autonumber" href="http://www.example.com"></a>]</p>
8189 Plain link to URL with link text
8191 [[http://www.example.com Link text]]
8193 <p>[<a rel="nofollow" class="external text" href="http://www.example.com">Link text</a>]
8198 Plain link to protocol-relative URL
8200 [[//www.example.com]]
8202 <p>[<a rel="nofollow" class="external autonumber" href="//www.example.com">[1]</a>]
8205 <p>[<a rel="mw:ExtLink" class="external autonumber" href="//www.example.com"></a>]</p>
8209 Plain link to protocol-relative URL with link text
8211 [[//www.example.com Link text]]
8213 <p>[<a rel="nofollow" class="external text" href="//www.example.com">Link text</a>]
8218 Plain link to page with question mark in title
8224 <p><a href="/wiki/A%3Fb" title="A?b">A?b</a>
8225 </p><p><a href="/wiki/A%3Fb" title="A?b">Baz</a>
8229 # I'm fairly sure the expected result here is wrong.
8230 # We want these to be URL links, not pseudo-pages with URLs for titles....
8231 # However the current output is also pretty screwy.
8234 # I'm changing it to match the current output--it arguably makes more
8235 # sense in the light of the test above. Old expected result was:
8236 #<p>Piped link to URL: <a href="/index.php?title=Http://www.example.com&action=edit" class="new">an example URL</a>
8238 # But I think this test is bordering on "garbage in, garbage out" anyway.
8243 Piped link to URL: [[http://www.example.com|an example URL]]
8245 <p>Piped link to URL: [<a rel="nofollow" class="external text" href="http://www.example.com%7Can">example URL</a>]
8248 <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>
8252 Plain link in template argument
8256 {{echo|[http://www.example.com |123]}}
8258 {{echo|[[http://www.example.com |123]]}}
8260 {{echo|[[http://www.example.com |123]}}
8262 {{echo|[http://www.example.com |123]]}}
8264 <p>[<a rel="nofollow" class="external free" href="http://www.example.com">http://www.example.com</a>
8265 </p><p>[<a rel="nofollow" class="external text" href="http://www.example.com">|123</a>]
8266 </p><p>{{echo|[<a rel="nofollow" class="external text" href="http://www.example.com">|123</a>}}
8267 </p><p>[<a rel="nofollow" class="external free" href="http://www.example.com">http://www.example.com</a>
8270 <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>
8272 <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>
8274 <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>
8276 <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>
8280 T2002: [[page|http://url/]] should link to page, not http://url/
8282 [[Main Page|http://url/]]
8284 <p><a href="/wiki/Main_Page" title="Main Page">http://url/</a>
8287 <p><a rel="mw:WikiLink" href="./Main_Page" title="Main Page">http://url/</a></p>
8290 # Parsoid does not mark self-links, by design.
8292 T2337: Escaped self-links should be bold
8296 [[Bug462]] [[Bug462]]
8298 <p><a class="mw-selflink selflink">Bug462</a> <a class="mw-selflink selflink">Bug462</a>
8301 <p><a rel="mw:WikiLink" href="./Bug462" title="Bug462">Bug462</a> <a rel="mw:WikiLink" href="./Bug462" title="Bug462">Bug462</a></p>
8305 Self-link to section should not be bold
8309 [[Main Page#section]]
8311 <p><a href="/wiki/Main_Page#section" title="Main Page">Main Page#section</a>
8322 Self-link to numeric title
8328 <p><a class="mw-selflink selflink">0</a>
8333 Link to numeric-equivalent title
8339 <p><a href="/wiki/00" title="00">00</a>
8344 <nowiki> inside a link
8346 [[Main<nowiki> Page</nowiki>]] [[Main Page|the main page <nowiki>[it's not very good]</nowiki>]]
8348 <p>[[Main Page]] <a href="/wiki/Main_Page" title="Main Page">the main page [it's not very good]</a>
8353 Non-breaking spaces in title
8355 [[ Main Page ]]
8357 <p><a href="/wiki/Main_Page" title="Main Page">  Main   Page  </a>
8361 # Add new article for the test below so that it doesn't red-link
8369 Multiple spaces in titles should normalize to a single underscore
8371 parsoid=wt2html,wt2wt
8377 <p><a href="/wiki/Foo_bar_baz" title="Foo bar baz">x</a>
8378 <a href="/wiki/Foo_bar_baz" title="Foo bar baz">x</a>
8379 <a href="/wiki/Foo_bar_baz" title="Foo bar baz">x</a>
8382 <p><a rel="mw:WikiLink" href="./Foo_bar_baz" title="Foo bar baz">x</a>
8383 <a rel="mw:WikiLink" href="./Foo_bar_baz" title="Foo bar baz">x</a>
8384 <a rel="mw:WikiLink" href="./Foo_bar_baz" title="Foo bar baz">x</a>
8389 Internal link with ca linktrail, surrounded by bold apostrophes (T29473 primary issue)
8395 <p><b><a href="/wiki/Main_Page" title="Main Page">Main Page</a></b>
8400 Internal link with ca linktrail, surrounded by italic apostrophes (T29473 primary issue)
8406 <p><i><a href="/wiki/Main_Page" title="Main Page">Main Page</a></i>
8411 Internal link with en linktrail: no apostrophes (T29473)
8417 <p><a href="/index.php?title=Something&action=edit&redlink=1" class="new" title="Something (page does not exist)">Something</a>'nice
8422 Internal link with ca linktrail with apostrophes (T29473)
8428 <p><a href="/index.php?title=Something&action=edit&redlink=1" class="new" title="Something (encara no existeix)">Something'nice</a>
8433 Internal link with kaa linktrail with apostrophes (T29473)
8439 <p><a href="/index.php?title=Something&action=edit&redlink=1" class="new" title="Something (bet ele jaratılmag'an)">Something'nice</a>
8444 Link with multiple ":" in a subpage-supporting namespace (T65636)
8446 [[User:Foo/Test/63636:Bar|Test]]
8448 <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>
8451 <p><a rel="mw:WikiLink" href="./User:Foo/Test/63636:Bar" title="User:Foo/Test/63636:Bar">Test</a></p>
8454 ## Mainly a sanity check for Parsoid
8456 Handle title parsing for subpages
8476 Link to a subpage from a namespace other than main
8483 <p><a href="/wiki/User:Test/123" title="User:Test/123">/123</a>
8486 <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>
8490 Ensure that transclusion titles are not url-decoded
8492 subpage title=[[Test]]
8495 {{Bar%C3%A9}} {{/Bar%C3%A9}}
8497 <p>{{Bar%C3%A9}} {{/Bar%C3%A9}}
8500 <p>{{Bar%C3%A9}} {{/Bar%C3%A9}}</p>
8504 Purely hash wikilink
8506 title=[[User:Test/123]]
8511 <p><a href="#a">b</a>
8514 <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>
8518 Serialization of purely hash wikilink
8520 title=[[User:Test/123]]
8524 <p><a href="#a">[[</a></p>
8526 [[#a|<nowiki>[[</nowiki>]]
8528 <p><a href="#a">[[</a>
8533 1. Interaction of linktrail and template encapsulation
8537 <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>
8541 2. Interaction of linktrail and template encapsulation
8545 {{echo|Some [[Fool]]}}s
8547 <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>
8551 3. Interaction of linktrail and template encapsulation
8555 {{echo|Some [[Fool]]s are '''bold and foolish'''}}
8557 <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>
8567 Internal link with is link prefix
8571 Aðrir mótmælenda[[söfnuður|söfnuðir]] og
8573 <p>Aðrir <a href="/wiki/S%C3%B6fnu%C3%B0ur" title="Söfnuður">mótmælendasöfnuðir</a> og
8584 Internal link with is link trail and link prefix
8588 [[mótmælendatrú|xxx]]ar
8590 mótmælenda[[söfnuður]]
8591 mótmælenda[[söfnuður|söfnuðir]]
8592 mótmælenda[[söfnuður|söfnuðir]]xxx
8594 <p><a href="/wiki/M%C3%B3tm%C3%A6lendatr%C3%BA" title="Mótmælendatrú">xxxar</a>
8595 <a href="/wiki/M%C3%B3tm%C3%A6lendatr%C3%BA" title="Mótmælendatrú">mótmælendatrúar</a>
8596 <a href="/wiki/S%C3%B6fnu%C3%B0ur" title="Söfnuður">mótmælendasöfnuður</a>
8597 <a href="/wiki/S%C3%B6fnu%C3%B0ur" title="Söfnuður">mótmælendasöfnuðir</a>
8598 <a href="/wiki/S%C3%B6fnu%C3%B0ur" title="Söfnuður">mótmælendasöfnuðirxxx</a>
8603 Parsoid link trail escaping
8605 parsoid=html2wt,html2html
8607 <p><a rel="mw:WikiLink" href="./Apple" title="Apple">apple</a>s</p>
8613 Parsoid link prefix escaping
8616 parsoid=html2wt,html2html
8618 <p>Aðrir mótmælenda<a rel="mw:WikiLink" href="./Söfnuður" title="Söfnuður">söfnuður</a></p>
8620 Aðrir mótmælenda<nowiki/>[[söfnuður]]
8624 Parsoid link bracket escaping
8626 parsoid=html2wt,html2html
8628 <p><a rel="mw:WikiLink" href="./Test" title="Test">Test</a></p>
8629 <p>[<a rel="mw:WikiLink" href="./Test" title="Test">Test</a>]</p>
8630 <p>[[<a rel="mw:WikiLink" href="./Test" title="Test">Test</a>]]</p>
8631 <p>[[[<a rel="mw:WikiLink" href="./Test" title="Test">Test</a>]]]</p>
8632 <p>[[[[<a rel="mw:WikiLink" href="./Test" title="Test">Test</a>]]]]</p>
8633 <p>[[[[[<a rel="mw:WikiLink" href="./Test" title="Test">Test</a>]]]]]</p>
8641 [[[<nowiki/>[[Test]]]]]
8645 [[[[[<nowiki/>[[Test]]]]]]]
8649 Parsoid-centric test: Whitespace in ext- and wiki-links should be preserved
8657 [http://wp.org ''foo'']
8659 <p><a href="/wiki/Foo" title="Foo"> bar</a>
8660 </p><p><a href="/wiki/Foo" title="Foo"> <i>bar</i></a>
8661 </p><p><a rel="nofollow" class="external text" href="http://wp.org">foo</a>
8662 </p><p><a rel="nofollow" class="external text" href="http://wp.org"><i>foo</i></a>
8667 Parsoid: Scoped parsing should handle mixed transclusions and plain text
8669 [[Foo|{{echo|a}} b {{echo|c}}]]
8671 <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>
8675 Link with angle bracket after anchor
8677 wgFragmentMode=[ 'html5', 'legacy' ]
8681 <p><a href="/wiki/Foo#<bar>" title="Foo">Foo#<bar></a>
8684 <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>
8688 Link with angle bracket after anchor (legacy)
8690 wgFragmentMode=[ 'legacy' ]
8694 <p><a href="/wiki/Foo#.3Cbar.3E" title="Foo">Foo#<bar></a>
8699 ### Interwiki links (see maintenance/interwiki.sql)
8703 Inline interwiki link
8705 parsoid=wt2html,wt2wt,html2html
8707 [[MeatBall:SoftSecurity]]
8709 <p><a href="http://www.usemod.com/cgi-bin/mb.pl?SoftSecurity" class="extiw" title="meatball:SoftSecurity">MeatBall:SoftSecurity</a>
8712 <p><a rel="mw:WikiLink/Interwiki" href="http://www.usemod.com/cgi-bin/mb.pl?SoftSecurity" title="meatball:SoftSecurity">MeatBall:SoftSecurity</a></p>
8716 Inline interwiki link with empty title (T4372)
8718 parsoid=wt2html,wt2wt,html2html
8722 <p><a href="http://www.usemod.com/cgi-bin/mb.pl" class="extiw" title="meatball:">MeatBall:</a>
8725 <p><a rel="mw:WikiLink/Interwiki" href="http://www.usemod.com/cgi-bin/mb.pl?" title="meatball:">MeatBall:</a></p>
8728 ## html2wt and html2html will fail because we will prefer the :en: interwiki prefix over wikipedia:
8730 Interwiki link encoding conversion (T3636)
8732 parsoid=wt2html,wt2wt
8734 *[[Wikipedia:ro:Olteniţa]]
8735 *[[Wikipedia:ro:Olteniţa]]
8737 <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>
8738 <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>
8742 <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>
8743 <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>
8747 <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>
8748 <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>
8753 Interwiki link with fragment (T4130)
8755 [[MeatBall:SoftSecurity#foo]]
8757 <p><a href="http://www.usemod.com/cgi-bin/mb.pl?SoftSecurity#foo" class="extiw" title="meatball:SoftSecurity">MeatBall:SoftSecurity#foo</a>
8762 Link scenarios with escaped fragments
8764 wgFragmentMode=[ 'html5', 'legacy' ]
8767 [[Foo#Is this great?]]
8768 [[meatball:Foo#Is this great?]]
8770 <p><a href="#Is_this_great?">#Is this great?</a>
8771 <a href="/wiki/Foo#Is_this_great?" title="Foo">Foo#Is this great?</a>
8772 <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>
8775 <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>
8776 <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>
8777 <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>
8781 Link scenarios with escaped fragments (legacy)
8783 wgFragmentMode=[ 'legacy' ]
8786 [[Foo#Is this great?]]
8787 [[meatball:Foo#Is this great?]]
8789 <p><a href="#Is_this_great.3F">#Is this great?</a>
8790 <a href="/wiki/Foo#Is_this_great.3F" title="Foo">Foo#Is this great?</a>
8791 <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>
8795 # Ideally the wikipedia: prefix here should be proto-relative too
8796 # [CSA]: this is kind of a bogus test, as the PHP parser test doesn't
8797 # define the 'en' prefix, and originally the test used 'wikipedia',
8798 # which isn't a localinterwiki prefix hence the links to the 'en:Foo'
8801 Different interwiki prefixes mapping to the same URL
8809 [[:wikipedia:Foo|Foo]]
8811 [[wikipedia:en:Foo]]
8813 [[:wikipedia:en:Foo]]
8817 <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>
8819 <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>
8821 <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>
8823 <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>
8825 <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>
8827 <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>
8829 <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>
8833 Interwiki links that cannot be represented in wiki syntax
8836 [[meatball:ok#foo|ok with fragment]]
8837 [[meatball:ok_as_well?|ok ending with ? mark]]
8838 [http://de.wikipedia.org/wiki/Foo?action=history has query]
8839 [http://de.wikipedia.org/wiki/#foo is just fragment]
8842 <p><a href="http://www.usemod.com/cgi-bin/mb.pl?ok" class="extiw" title="meatball:ok">meatball:ok</a>
8843 <a href="http://www.usemod.com/cgi-bin/mb.pl?ok#foo" class="extiw" title="meatball:ok">ok with fragment</a>
8844 <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>
8845 <a rel="nofollow" class="external text" href="http://de.wikipedia.org/wiki/Foo?action=history">has query</a>
8846 <a rel="nofollow" class="external text" href="http://de.wikipedia.org/wiki/#foo">is just fragment</a>
8849 <p><a rel="mw:WikiLink/Interwiki" href="http://www.usemod.com/cgi-bin/mb.pl?ok" title="meatball:ok">meatball:ok</a>
8850 <a rel="mw:WikiLink/Interwiki" href="http://www.usemod.com/cgi-bin/mb.pl?ok#foo" title="meatball:ok">ok with fragment</a>
8851 <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>
8852 <a rel="mw:ExtLink" class="external text" href="http://de.wikipedia.org/wiki/Foo?action=history">has query</a>
8853 <a rel="mw:ExtLink" class="external text" href="http://de.wikipedia.org/wiki/#foo">is just fragment</a></p>
8857 Interwiki links: trail
8859 [[wikipedia:Foo|Ba]]r
8861 <p><a href="http://en.wikipedia.org/wiki/Foo" class="extiw" title="wikipedia:Foo">Bar</a>
8864 <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>
8868 Local interwiki link
8870 parsoid=wt2html,wt2wt,html2html
8872 [[local:Template:Foo]]
8874 <p><a href="/wiki/Template:Foo" title="Template:Foo">local:Template:Foo</a>
8877 <p><a rel="mw:WikiLink" href="./Template:Foo" title="Template:Foo">local:Template:Foo</a></p>
8880 # Parsoid does not mark self-links, by design.
8882 Local interwiki link: self-link to current page
8885 parsoid=wt2html,wt2wt,html2html
8889 <p><a class="mw-selflink selflink">local:Main Page</a>
8892 <p><a rel="mw:WikiLink" href="./Main_Page" title="Main Page">local:Main Page</a></p>
8896 Local interwiki link: prefix only (T66167)
8898 parsoid=wt2html,wt2wt,html2html
8902 <p><a href="/wiki/Main_Page" title="Main Page">local:</a>
8905 <p><a rel="mw:WikiLink" href="./Main_Page" title="Main Page">local:</a></p>
8909 Local interwiki link: with additional interwiki prefix (T63357)
8911 parsoid=wt2html,wt2wt,html2html
8913 [[local:meatball:Hello]]
8915 <p><a href="http://www.usemod.com/cgi-bin/mb.pl?Hello" class="extiw" title="meatball:Hello">local:meatball:Hello</a>
8918 <p><a rel="mw:WikiLink/Interwiki" href="http://www.usemod.com/cgi-bin/mb.pl?Hello" title="meatball:Hello">local:meatball:Hello</a></p>
8922 Multiple local interwiki link prefixes
8924 [[local:local:local:local:mi:local:Foo]]
8926 parsoid=wt2html,wt2wt,html2html
8928 <p><a href="/wiki/Foo" title="Foo">local:local:local:local:mi:local:Foo</a>
8931 <p><a rel="mw:WikiLink" href="./Foo" title="Foo">local:local:local:local:mi:local:Foo</a></p>
8935 Interwiki link with percent encoded target
8937 [[:es:Nueva Guip%C3%BAzcoa|Nueva Guipúzcoa]]
8939 <p><a href="http://es.wikipedia.org/wiki/Nueva_Guip%C3%BAzcoa" class="extiw" title="es:Nueva Guipúzcoa">Nueva Guipúzcoa</a>
8942 <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>
8946 ### Interlanguage links
8947 ### Language links (so that searching for '### language' matches..)
8959 <p>Blah blah blah</p>
8960 <link rel="mw:PageProp/Language" href="http://zh.wikipedia.org/wiki/Chinese"/>
8963 ## parsoid html2wt will lose the space variations
8965 Interlanguage link with spacing
8967 parsoid=wt2html,wt2wt,html2html
8975 <p>Blah blah blah</p>
8976 <link rel="mw:PageProp/Language" href="http://zh.wikipedia.org/wiki/Chinese"/>
8980 Double interlanguage link
8989 <p>Blah blah blah</p>
8990 <link rel="mw:PageProp/Language" href="http://es.wikipedia.org/wiki/Spanish"/>
8991 <link rel="mw:PageProp/Language" href="http://zh.wikipedia.org/wiki/Chinese"/>
8994 ## parsoid html2wt will lose the space variations
8996 Interlanguage link variations
8998 parsoid=wt2html,wt2wt,html2html
9008 <p>Blah blah blah</p>
9009 <link rel="mw:PageProp/Language" href="http://es.wikipedia.org/wiki/Spanish" />
9010 <link rel="mw:PageProp/Language" href="http://zh.wikipedia.org/wiki/Chinese" />
9011 <link rel="mw:PageProp/Language" href="http://es.wikipedia.org/wiki/Foo_bar" />
9015 Escaping of interlanguage links (T129218, T156308)
9019 [[ : zh : Chinese ]]
9022 <a href="http://es.wikipedia.org/wiki/Spanish" class="extiw" title="es:Spanish">es:Spanish</a>
9023 <a href="http://zh.wikipedia.org/wiki/Chinese" class="extiw" title="zh:Chinese"> zh : Chinese </a>
9027 <a rel="mw:WikiLink/Interwiki" href="http://es.wikipedia.org/wiki/Spanish" title="es:Spanish">es:Spanish</a>
9028 <a rel="mw:WikiLink/Interwiki" href="http://zh.wikipedia.org/wiki/Chinese" title="zh:Chinese"> zh : Chinese </a></p>
9032 Multiple colons escaping interlanguage links
9040 <p><a href="http://es.wikipedia.org/wiki/Spanish" class="extiw" title="es:Spanish">es:Spanish</a>
9045 <p><a rel="mw:WikiLink/Interwiki" href="http://es.wikipedia.org/wiki/Spanish" title="es:Spanish">es:Spanish</a>
9047 [[:::es:Spanish]]</p>
9050 ## parsoid html2wt will normalize the space to _
9052 Space and question mark encoding in interlanguage links (T95473)
9054 parsoid=wt2html,wt2wt,html2html
9062 <p>Blah blah blah</p>
9063 <link rel="mw:PageProp/Language" href="http://es.wikipedia.org/wiki/Foo_bar%3F" />
9067 Interlanguage link, with prefix links
9077 <p>Blah blah blah</p>
9078 <link rel="mw:PageProp/Language" href="http://zh.wikipedia.org/wiki/Chinese"/>
9082 Double interlanguage link, with prefix links (T10897)
9093 <p>Blah blah blah</p>
9094 <link rel="mw:PageProp/Language" href="http://es.wikipedia.org/wiki/Spanish"/>
9095 <link rel="mw:PageProp/Language" href="http://zh.wikipedia.org/wiki/Chinese"/>
9099 "Extra" interlanguage links (T34189 / gerrit 111390)
9107 <p>Blah blah blah</p>
9108 <link rel="mw:PageProp/Language" title="Multilingual" href="http://wikisource.org/wiki/Article"/>
9111 ## PHP parser tests script needs an update
9112 ## Parsoid html2wt will normalize output to [[:zh:Chinese]]
9114 Language links render as inline links if $wgInterwikiMagic=false
9116 wgInterwikiMagic=false
9117 parsoid=wt2html,wt2wt,html2html
9122 <p>Blah blah blah <a rel="mw:WikiLink/Interwiki" href="http://zh.wikipedia.org/wiki/Chinese" title="zh:Chinese">zh:Chinese</a></p>
9125 ## PHP parser tests script needs an update
9126 ## Parsoid html2wt will normalize output to [[:zh:Chinese]]
9128 Language links render as inline links in the Talk namespace
9131 parsoid=wt2html,wt2wt,html2html
9136 <p>Blah blah blah <a rel="mw:WikiLink/Interwiki" href="http://zh.wikipedia.org/wiki/Chinese" title="zh:Chinese">zh:Chinese</a></p>
9140 Parsoid-specific test: Wikilinks with should RT properly
9146 <p><a href="/index.php?title=WW_II&action=edit&redlink=1" class="new" title="WW II (lonkásá ezalí tɛ̂)">WW II</a>
9151 Parsoid T55221: Wikilinks should be properly entity-escaped
9153 parsoid={ "modes": ["html2wt"], "suppressErrors": true }
9155 <p>He&nbsp;llo <a href="./Foo" rel="mw:WikiLink">He&nbsp;llo</a></p>
9156 <p>He&nbsp;llo <a href="./He&nbsp;llo" rel="mw:WikiLink">He&nbsp;llo</a></p>
9158 He&nbsp;llo [[Foo|He&nbsp;llo]]
9160 He&nbsp;llo He&nbsp;llo
9162 <p>He&nbsp;llo <a href="/wiki/Foo" title="Foo">He&nbsp;llo</a>
9163 </p><p>He&nbsp;llo He&nbsp;llo
9167 # html2wt will fail because of title normalization without data-parsoid
9169 Parsoid: handle constructor well
9171 parsoid=wt2html,wt2wt
9177 <p><a href="/index.php?title=Constructor&action=edit&redlink=1" class="new" title="Constructor (page does not exist)">constructor</a>
9178 </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>
9181 <p><a rel="mw:WikiLink" href="./Constructor" title="Constructor" data-parsoid='{"stx":"simple","a":{"href":"./Constructor"},"sa":{"href":"constructor"}}'>constructor</a></p>
9183 <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>
9187 Template parameter named "constructor"
9189 {{echo| constructor = |hi}}
9191 <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>
9200 # Note that `ko` isn't a known interlanguage prefix
9202 Parsoid: recognize interlanguage links without a target page
9212 <link rel="mw:PageProp/Language" href="http://es.wikipedia.org/wiki/"/>
9214 <p><a rel="mw:WikiLink" href="./Ko:" title="Ko:">ko:</a></p>
9217 # Note that `ko` isn't a known interwiki prefix
9219 Parsoid: recognize interwiki links without a target page
9221 parsoid=wt2html,wt2wt,html2html
9227 <p><a href="http://es.wikipedia.org/wiki/" class="extiw" title="es:">es:</a>
9228 </p><p><a href="/wiki/Ko:" title="Ko:">ko:</a>
9231 <p><a rel="mw:WikiLink/Interwiki" href="http://es.wikipedia.org/wiki/" title="es:">es:</a></p>
9232 <p><a rel="mw:WikiLink" href="./Ko:" title="Ko:">ko:</a></p>
9236 Handle interwiki links pointing to the current wiki as plain wiki links (T47209)
9240 <p><a href="/wiki/Foo" title="Foo">mi:Foo</a>
9243 <p><a rel="mw:WikiLink" href="./Foo" title="Foo" data-parsoid='{"stx":"simple","a":{"href":"./Foo"},"sa":{"href":"mi:Foo"}}'>mi:Foo</a></p>
9247 Interlanguage link with preceding local interwiki link (T70085)
9249 parsoid=wt2html,wt2wt,html2html
9252 [[local:es:Spanish]]
9255 <a href="http://es.wikipedia.org/wiki/Spanish" class="extiw" title="es:Spanish">local:es:Spanish</a>
9259 <a rel="mw:WikiLink/Interwiki" href="http://es.wikipedia.org/wiki/Spanish" title="es:Spanish">local:es:Spanish</a></p>
9263 Looks like an interlanguage link, but is actually a local interwiki
9265 parsoid=wt2html,wt2wt,html2html
9271 <a href="/wiki/Template:Foo" title="Template:Foo">mi:Template:Foo</a>
9275 <a rel="mw:WikiLink" href="./Template:Foo" title="Template:Foo">mi:Template:Foo</a></p>
9279 ### Redirects, Parsoid-only
9283 1. Simple redirect to page
9285 #REDIRECT [[Main Page]]
9287 <link rel="mw:PageProp/redirect" href="./Main_Page"/>
9291 2. Other redirect variants
9293 #REDIRECT [[Main_Page]]
9295 <link rel="mw:PageProp/redirect" href="./Main_Page" data-parsoid='{"src":"#REDIRECT ","a":{"href":"./Main_Page"},"sa":{"href":"Main_Page"}}'/>
9298 # Not a valid redirect in PHP (although perhaps it was, once upon a time)
9299 # This tests the Parsoid bail-out code.
9301 3. Other redirect variants
9305 #REDIRECT [[<nowiki>[[Bar]]</nowiki>]]
9307 <ol><li>REDIRECT [[<span typeof="mw:Nowiki">[[Bar]]</span>]]</li></ol>
9311 4. Redirect to a templated destination
9313 #REDIRECT [[{{echo|Foo}}bar]]
9315 <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"}]]}'/>
9321 parsoid=wt2html,wt2wt
9326 <li>REDIRECT [[]]</li></ol>
9330 Optional colon in #REDIRECT
9332 # the colon is archaic syntax. we support it for wt2html, but we
9333 # don't care that it roundtrips back to the modern syntax.
9334 parsoid=wt2html,html2html
9336 #REDIRECT:[[Main Page]]
9338 <link rel="mw:PageProp/redirect" href="./Main_Page"/>
9342 Whitespace in #REDIRECT with optional colon
9344 # the colon and gratuitous whitespace is archaic syntax. we support
9345 # it for wt2html, but we don't care that it roundtrips back to the
9346 # modern syntax (without extra whitespace)
9347 parsoid=wt2html,html2html
9354 <link rel="mw:PageProp/redirect" href="./Main_Page"/>
9358 Piped link in #REDIRECT
9360 # content after piped link is ignored. we support this syntax,
9361 # but don't care that the piped link is lost when we roundtrip this.
9364 #REDIRECT [[Main Page|bar]]
9366 <link rel="mw:PageProp/redirect" href="./Main_Page"/>
9370 Redirect to category (T104502)
9372 parsoid=wt2html,wt2wt
9374 #REDIRECT [[Category:Foo]]
9376 <link rel="mw:PageProp/redirect" href="./Category:Foo"/>
9380 Redirect to category with URL encoding (T104502)
9384 #REDIRECT [[Category%3AFoo]]
9386 <link rel="mw:PageProp/redirect" href="./Category:Foo"/>
9390 Redirect to category page
9392 #REDIRECT [[:Category:Foo]]
9394 <link rel="mw:PageProp/redirect" href="./Category:Foo"/>
9398 Redirect to image page (1)
9400 #REDIRECT [[File:Wiki.png]]
9402 <link rel="mw:PageProp/redirect" href="./File:Wiki.png"/>
9406 Redirect to image page (2)
9408 #REDIRECT [[Image:Wiki.png]]
9410 <link rel="mw:PageProp/redirect" href="./File:Wiki.png" data-parsoid='{"src":"#REDIRECT ","a":{"href":"./File:Wiki.png"},"sa":{"href":"Image:Wiki.png"}}'/>
9413 # html2wt disabled because wts serializes as "#REDIRECT [[:en:File:Wiki.png]]"
9414 # Next test confirms this.
9416 Redirect to language (1) (T104918)
9418 parsoid=wt2html,wt2wt,html2html
9420 #REDIRECT [[en:File:Wiki.png]]
9422 <link rel="mw:PageProp/redirect" href="//en.wikipedia.org/wiki/File:Wiki.png"/>
9426 Redirect to language (2) (T104918)
9428 #REDIRECT [[:en:File:Wiki.png]]
9430 <link rel="mw:PageProp/redirect" href="//en.wikipedia.org/wiki/File:Wiki.png"/>
9434 Redirect to interwiki (T104918)
9436 #REDIRECT [[meatball:File:Wiki.png]]
9438 <link rel="mw:PageProp/redirect" href="http://www.usemod.com/cgi-bin/mb.pl?File:Wiki.png"/>
9442 Non-English #REDIRECT
9446 #TILVÍSUN [[Main Page]]
9448 <link rel="mw:PageProp/redirect" href="./Main_Page" data-parsoid='{"src":"#TILVÍSUN ","a":{"href":"./Main_Page"},"sa":{"href":"Main Page"}}'/>
9452 Redirect syntax under text isn't considered a redirect
9456 #redirect [[Main Page]]
9459 <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>
9467 <p>Foo<link rel="mw:PageProp/redirect" href="./Foo"/></p>
9474 Redirect followed by block on the same line
9478 #REDIRECT [[Main Page]]<!-- haha -->==hi==
9480 <link rel="mw:PageProp/redirect" href="./Main_Page"/><!-- haha --><h2 id="hi">hi</h2>
9484 Redirect followed by a newline
9486 #REDIRECT [[Main Page]]
9489 <link rel="mw:PageProp/redirect" href="./Main_Page"/>
9494 Redirect followed by multiple newlines
9496 #REDIRECT [[Main Page]]
9501 <link rel="mw:PageProp/redirect" href="./Main_Page"/>
9508 Drop duplicate redirects
9512 <link rel="mw:PageProp/redirect" href="./Foo"/>
9513 <link rel="mw:PageProp/redirect" href="./Bar"/>
9514 <link rel="mw:PageProp/redirect" href="./Baz"/>
9533 Broken br tag sanitization
9541 # TODO: Fix html2html mode (T53055)!
9543 Parsoid: Broken br tag recognition
9557 Incorrecly removing closing slashes from correctly formed XHTML
9559 <br style="clear:both;" />
9561 <p><br style="clear:both;" />
9566 Failing to transform badly formed HTML into correct XHTML
9568 <br style="clear: left;">
9569 <br style="clear: right;">
9570 <br style="clear: both;">
9572 <p><br style="clear: left;" />
9573 <br style="clear: right;" />
9574 <br style="clear: both;" />
9578 ## FIXME: Is Parsoid's acceptance of self-closing html-tags
9579 ## a feature or a bug? See https://phabricator.wikimedia.org/T76962
9581 Handling html with a div self-closing tag
9590 <p><div title />
9594 <p><div title=bar />
9595 <div title=bar/>
9597 <div title="bar/"></div>
9601 <div title="" data-parsoid='{"stx":"html","selfClose":true}'></div>
9602 <div title="" data-parsoid='{"stx":"html","selfClose":true}'></div>
9603 <div title="" data-parsoid='{"stx":"html","autoInsertedEnd":true}'>
9604 <div title="bar" data-parsoid='{"stx":"html","selfClose":true}'></div>
9605 <div title="bar" data-parsoid='{"stx":"html","selfClose":true}'></div>
9606 <div title="bar/" data-parsoid='{"stx":"html","autoInsertedEnd":true}'></div></div>
9610 Elements with solidus in various attribute positions
9612 parsoid=wt2html,html2html
9614 <div cla/ss="123">ha</div>
9616 <div / class="123">ha</div>
9618 <div class= / "123">ha</div>
9621 <div class="123">ha</div>
9622 <div class="/">ha</div>
9624 <div data-parsoid='{"stx":"html","a":{"cla":null,"ss":null},"sa":{"cla":"","ss":"123"}}'>ha</div>
9626 <div class="123" data-parsoid='{"stx":"html"}'>ha</div>
9628 <div class="/" data-parsoid='{"stx":"html","a":{"\"123\"":null},"sa":{"\"123\"":""}}'>ha</div>
9632 Handling html with a br self-closing tag
9659 Horizontal ruler (should it add that extra space?)
9668 foo </p><hr /><p> bar
9673 Horizontal ruler -- 4+ dashes render hr
9682 Horizontal ruler -- eats additional dashes on the same line
9691 Horizontal ruler -- does not collapse dashes on consecutive lines
9702 Horizontal ruler -- <4 dashes render as plain text
9711 Horizontal ruler -- Supports content following dashes on same line
9723 ### Block-level elements
9732 <ul><li>Common list</li>
9734 <li>item 3</li></ul>
9745 <ol><li>Numbered list</li>
9747 <li>item 3</li></ol>
9751 # the switch from level 3 to ordered should not introduce a newline between
9762 ***#Number on level 4
9764 **#Number on level 3
9765 **#Number on level 3
9769 #**Level 3, but ordered
9772 <ol><li>with numbers</li></ol>
9773 <ul><li>and bullets</li></ul>
9774 <ol><li>and numbers</li></ol></li>
9776 <ul><li>bullet level 2
9777 <ul><li>bullet level 3
9778 <ol><li>Number on level 4</li></ol></li></ul></li>
9780 <ol><li>Number on level 3</li>
9781 <li>Number on level 3</li></ol></li></ul>
9782 <ol><li>number level 2</li></ol></li>
9784 <ul><li><ul><li>Level 3</li></ul></li></ul></li></ul>
9785 <ol><li><ul><li><ul><li>Level 3, but ordered</li></ul></li></ul></li></ol>
9790 1. Nested mixed wikitext and html list
9793 *<ul><li>ho</li></ul>
9798 <li><ul><li>ho</li></ul></li>
9800 <ul><li>ho</li></ul></li></ul>
9804 <li><ul data-parsoid='{"stx":"html"}'><li data-parsoid='{"stx":"html"}'>ho</li></ul></li>
9806 <ul><li>ho</li></ul></li></ul>
9810 2. Nested mixed wikitext and html list (incompatible)
9813 :{{echo|<li>ho</li>}}
9816 <dd><li>ho</li></dd></dl>
9820 <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>
9830 <ul><li>bar</li></ul></li></ul>
9840 <ul><li><ul><li>foo</li></ul></li>
9846 Nested lists 3 (first element empty)
9852 <ul><li>bar</li></ul></li></ul>
9857 Nested lists 4 (first element empty)
9862 <ul><li><ul><li></li></ul></li>
9868 Nested lists 5 (both elements empty)
9873 <ul><li><ul><li></li></ul></li>
9879 Nested lists 6 (both elements empty)
9885 <ul><li></li></ul></li></ul>
9890 Nested lists 7 (skip initial nesting levels)
9894 <ul><li><ul><li><ul><li>foo</li></ul></li></ul></li></ul>
9899 Nested lists 8 (multiple nesting transitions)
9907 <ul><li><ul><li>bar</li></ul></li>
9908 <li>baz</li></ul></li>
9914 Nested lists 9 (extension interaction)
9920 <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>
9924 1. Lists with start-of-line-transparent tokens before bullets: Comments
9937 Nested lists 10 (list and span siblings: wt2wt regression)
9942 <ul><li>a <span>x</span>
9943 <ul><li>b <span>y</span></li></ul></li></ul>
9947 2. Lists with start-of-line-transparent tokens before bullets: Template close
9952 <ul><li>foo bar</li>
9958 List items are not parsed correctly following a <pre> block (T2785)
9964 <ul><li><pre>foo</pre></li>
9965 <li><pre>bar</pre></li>
9969 <ul><li><pre typeof="mw:Extension/pre" about="#mwt2" data-mw='{"name":"pre","attrs":{},"body":{"extsrc":"foo"}}'>foo</pre></li>
9970 <li><pre typeof="mw:Extension/pre" about="#mwt4" data-mw='{"name":"pre","attrs":{},"body":{"extsrc":"bar"}}'>bar</pre></li>
9974 # FIXME: Might benefit from a html/parsoid since this has a template
9976 List items from template
9987 *notSOL{{inner list}}
9991 <li>item 2</li></ul>
9994 <li>item 2</li></ul>
9998 <li>item 2</li></ul>
10003 List interrupted by empty line or heading
10011 <ul><li>foo</li></ul>
10012 <ul><li><ul><li>bar</li></ul></li></ul>
10013 <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>
10014 <ul><li>Another list item</li></ul>
10019 Multiple list tags generated by templates
10038 <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>
10039 <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>
10040 <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>
10044 Multiple newlines in between HTML list items don't induce paragraph wrapping
10057 <dd>ho<div>123</div>
10073 <dd>ho<div>123</div>
10081 Single-comment whitespace lines dont break lists, and neither do multi-comment whitespace lines
10084 <!--This line will NOT split the list-->
10086 <!--This line will NOT split the list either-->
10088 <!--foo--> <!----> <!--This line NOT split the list either-->
10099 Replacing whitespace with tabs still doesn't break the list (gerrit 78327)
10102 <!--This line will NOT split the list-->
10104 <!--This line will NOT split the list either-->
10106 <!--foo--> <!----> <!--This line NOT split the list
10117 # FIXME: Parsoid has a dedicated DOM pass to mimic this Tidy-specific li-hack
10118 # That pass could possibly be removed.
10120 Test the li-hack (a hack from Tidy days, but doesn't work as advertised with Remex)
10122 parsoid=wt2html,wt2wt
10126 *{{echo|<li>templated li-hack}}
10127 *<!--foo--><li> unsupported li-hack with preceding comments
10130 <li><li>not a li-hack
10135 <li class="mw-empty-elt"></li><li>li-hack</li>
10136 <li class="mw-empty-elt"></li><li>templated li-hack</li>
10137 <li class="mw-empty-elt"></li><li> unsupported li-hack with preceding comments</li></ul>
10139 <li class="mw-empty-elt"></li><li>not a li-hack
10144 <li data-parsoid='{"stx":"html","autoInsertedEnd":true,"liHackSrc":"*"}'>li-hack</li>
10145 <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>
10146 <li data-parsoid='{"autoInsertedEnd":true}'><!--foo--></li><li data-parsoid='{"stx":"html","autoInsertedEnd":true}'>unsupported li-hack with preceding comments</li></ul>
10148 <ul data-parsoid='{"stx":"html"}'>
10149 <li class="mw-empty-elt" data-parsoid='{"stx":"html","autoInsertedEnd":true}'></li><li data-parsoid='{"stx":"html"}'>not a li-hack
10156 Parsoid: Make sure nested lists are serialized on their own line even if HTML contains no newlines
10185 Parsoid: Test of whitespace serialization with Templated bullets
10192 <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>
10196 # ------------------------------------------------------------------------
10197 # The next set of tests are about Parsoid's ability to handle badly nested
10198 # tags (parse, minimize scope of fixup, and roundtrip back)
10199 # ------------------------------------------------------------------------
10201 # Remex and Parsoid output stems from list handling diffs because Parsoid & PHP parser.
10202 # Parsoid's list handling is more aware of block structure.
10204 Unbalanced closing block tags break a list
10211 <ul><li>a</li></ul></div><div>
10223 Unbalanced closing non-block tags don't break a list
10225 parsoid=wt2html,html2html
10233 <ul><li>a<span></span></li>
10236 <p><span data-parsoid='{"stx":"html","autoInsertedEnd":true}'></span></p>
10237 <ul><li>a<span data-parsoid='{"stx":"html","autoInsertedEnd":true}'></span></li>
10241 # Parsoid does some post-dom-building cleanup
10242 # which is why its output differs from Remex.
10244 Unclosed formatting tags that straddle lists are closed and reopened
10246 parsoid=wt2html,wt2wt,html2html
10251 <ol><li><s> a</s></li><s>
10252 </s><li><s>b </s></li></ol>
10254 <ol><li><s> a</s></li>
10255 <li><s>b </s></li></ol>
10258 # Output is ugly because of all the misnested tag fixups.
10260 1. List embedded in a formatting tag
10267 </small></p><small><ul><li>foo</li></ul></small><small></small><p><small></small>
10270 <p><small data-parsoid='{"stx":"html","autoInsertedEnd":true}'></small></p><small data-parsoid='{"stx":"html","autoInsertedEnd":true,"autoInsertedStart":true}'>
10271 <ul><li data-parsoid='{}'>foo</li></ul></small>
10272 <p><small data-parsoid='{"stx":"html","autoInsertedStart":true}'></small></p>
10275 # Output is ugly because of all the misnested tag fixups.
10277 2. List embedded in a formatting tag in a misnested way
10284 </small></p><small></small><ul><small><li>a</li>
10285 </small><li><small>b</small></li></ul>
10287 <p><small data-parsoid='{"stx":"html","autoInsertedEnd":true}'></small></p>
10288 <ul><small data-parsoid='{"stx":"html","autoInsertedEnd":true,"autoInsertedStart":true}'><li>a</li></small>
10289 <li><small data-parsoid='{"stx":"html","autoInsertedStart":true}'>b</small></li></ul>
10292 # Output is ugly because of all the misnested tag fixups.
10294 3. List embedded in a formatting tag in a misnested way
10301 </small></p><small></small><ul><small></small><li><small></small><ul><small></small><li><small>123</small></li></ul></li></ul>
10303 <p><small data-parsoid='{"stx":"html","autoInsertedEnd":true}'></small></p>
10305 <ul><li><ul><li data-parsoid='{}'><small data-parsoid='{"stx":"html","autoInsertedStart":true}'> 123</small></li></ul></li></ul>
10312 # Note that the current date is hard-coded as
10313 # 1970-01-01T00:02:03Z (a Thursday)
10314 # when running parser tests. The timezone is also fixed to GMT, so
10315 # local date will be identical to current date.
10318 Magic Word: {{CURRENTDAY}}
10327 Magic Word: {{CURRENTDAY2}}
10336 Magic Word: {{CURRENTDAYNAME}}
10345 Magic Word: {{CURRENTDOW}}
10354 Magic Word: {{CURRENTMONTH}}
10363 Magic Word: {{CURRENTMONTH1}}
10372 Magic Word: {{CURRENTMONTHABBREV}}
10374 {{CURRENTMONTHABBREV}}
10381 Magic Word: {{CURRENTMONTHNAME}}
10383 {{CURRENTMONTHNAME}}
10390 Magic Word: {{CURRENTMONTHNAMEGEN}}
10392 {{CURRENTMONTHNAMEGEN}}
10399 Magic Word: {{CURRENTTIME}}
10408 Magic Word: {{CURRENTHOUR}}
10417 Magic Word: {{CURRENTWEEK}} (T6594)
10426 Magic Word: {{CURRENTYEAR}}
10435 Magic Word: {{CURRENTTIMESTAMP}}
10437 {{CURRENTTIMESTAMP}}
10444 Magic Words LOCAL (UTC)
10448 *{{LOCALMONTHNAME}}
10449 *{{LOCALMONTHNAMEGEN}}
10450 *{{LOCALMONTHABBREV}}
10459 *{{LOCALTIMESTAMP}}
10474 <li>19700101000203</li></ul>
10479 Magic Word: {{FULLPAGENAME}}
10481 title=[[User:Ævar Arnfjörð Bjarmason]]
10482 parsoid={ "modes": ["wt2html","wt2wt"], "normalizePhp": true }
10486 <p>User:Ævar Arnfjörð Bjarmason
10491 Magic Word: {{FULLPAGENAMEE}}
10493 title=[[User:Ævar Arnfjörð Bjarmason]]
10494 parsoid={ "modes": ["wt2html","wt2wt"], "normalizePhp": true }
10498 <p>User:%C3%86var_Arnfj%C3%B6r%C3%B0_Bjarmason
10503 Magic Word: {{TALKSPACE}}
10505 title=[[User:Ævar Arnfjörð Bjarmason]]
10506 parsoid={ "modes": ["wt2html","wt2wt"], "normalizePhp": true }
10515 Magic Word: {{TALKSPACE}}, same namespace
10517 title=[[User talk:Ævar Arnfjörð Bjarmason]]
10518 parsoid={ "modes": ["wt2html","wt2wt"], "normalizePhp": true }
10527 Magic Word: {{TALKSPACE}}, main namespace
10529 title=[[Parser Test]]
10530 parsoid={ "modes": ["wt2html","wt2wt"], "normalizePhp": true }
10539 Magic Word: {{TALKSPACEE}}
10541 title=[[User:Ævar Arnfjörð Bjarmason]]
10542 parsoid={ "modes": ["wt2html","wt2wt"], "normalizePhp": true }
10551 Magic Word: {{SUBJECTSPACE}}
10553 title=[[User talk:Ævar Arnfjörð Bjarmason]]
10554 parsoid={ "modes": ["wt2html","wt2wt"], "normalizePhp": true }
10563 Magic Word: {{SUBJECTSPACE}}, same namespace
10565 title=[[User:Ævar Arnfjörð Bjarmason]]
10566 parsoid={ "modes": ["wt2html","wt2wt"], "normalizePhp": true }
10575 Magic Word: {{SUBJECTSPACE}}, main namespace
10577 title=[[Parser Test]]
10578 parsoid={ "modes": ["wt2html","wt2wt"], "normalizePhp": true }
10586 Magic Word: {{SUBJECTSPACEE}}
10588 title=[[User talk:Ævar Arnfjörð Bjarmason]]
10589 parsoid={ "modes": ["wt2html","wt2wt"], "normalizePhp": true }
10598 Magic Word: {{NAMESPACE}}
10600 title=[[User:Ævar Arnfjörð Bjarmason]]
10601 parsoid={ "modes": ["wt2html","wt2wt"], "normalizePhp": true }
10610 Magic Word: {{NAMESPACEE}}
10612 title=[[User:Ævar Arnfjörð Bjarmason]]
10613 parsoid={ "modes": ["wt2html","wt2wt"], "normalizePhp": true }
10622 Magic Word: {{NAMESPACENUMBER}}
10624 title=[[User:Ævar Arnfjörð Bjarmason]]
10625 parsoid={ "modes": ["wt2html","wt2wt"], "normalizePhp": true }
10627 {{NAMESPACENUMBER}}
10634 Magic Word: {{SUBPAGENAME}}
10636 title=[[Ævar Arnfjörð Bjarmason/sub ö]] subpage
10637 parsoid={ "modes": ["wt2html","wt2wt"], "normalizePhp": true }
10646 Magic Word: {{SUBPAGENAMEE}}
10648 title=[[Ævar Arnfjörð Bjarmason/sub ö]] subpage
10649 parsoid={ "modes": ["wt2html","wt2wt"], "normalizePhp": true }
10658 Magic Word: {{ROOTPAGENAME}}
10660 title=[[Ævar Arnfjörð Bjarmason/sub/sub2]] subpage
10661 parsoid={ "modes": ["wt2html","wt2wt"], "normalizePhp": true }
10665 <p>Ævar Arnfjörð Bjarmason
10670 Magic Word: {{ROOTPAGENAMEE}}
10672 title=[[Ævar Arnfjörð Bjarmason/sub/sub2]] subpage
10673 parsoid={ "modes": ["wt2html","wt2wt"], "normalizePhp": true }
10677 <p>%C3%86var_Arnfj%C3%B6r%C3%B0_Bjarmason
10682 Magic Word: {{BASEPAGENAME}}
10684 title=[[Ævar Arnfjörð Bjarmason/sub]] subpage
10685 parsoid={ "modes": ["wt2html","wt2wt"], "normalizePhp": true }
10689 <p>Ævar Arnfjörð Bjarmason
10694 Magic Word: {{BASEPAGENAMEE}}
10696 title=[[Ævar Arnfjörð Bjarmason/sub]] subpage
10697 parsoid={ "modes": ["wt2html","wt2wt"], "normalizePhp": true }
10701 <p>%C3%86var_Arnfj%C3%B6r%C3%B0_Bjarmason
10706 Magic Word: {{TALKPAGENAME}}
10708 title=[[User:Ævar Arnfjörð Bjarmason]]
10709 parsoid={ "modes": ["wt2html","wt2wt"], "normalizePhp": true }
10713 <p>User talk:Ævar Arnfjörð Bjarmason
10718 Magic Word: {{TALKPAGENAMEE}}
10720 title=[[User:Ævar Arnfjörð Bjarmason]]
10721 parsoid={ "modes": ["wt2html","wt2wt"], "normalizePhp": true }
10725 <p>User_talk:%C3%86var_Arnfj%C3%B6r%C3%B0_Bjarmason
10730 Magic Word: {{SUBJECTPAGENAME}}
10732 title=[[User talk:Ævar Arnfjörð Bjarmason]]
10733 parsoid={ "modes": ["wt2html","wt2wt"], "normalizePhp": true }
10735 {{SUBJECTPAGENAME}}
10737 <p>User:Ævar Arnfjörð Bjarmason
10742 Magic Word: {{SUBJECTPAGENAMEE}}
10744 title=[[User talk:Ævar Arnfjörð Bjarmason]]
10745 parsoid={ "modes": ["wt2html","wt2wt"], "normalizePhp": true }
10747 {{SUBJECTPAGENAMEE}}
10749 <p>User:%C3%86var_Arnfj%C3%B6r%C3%B0_Bjarmason
10754 Magic Word: {{NUMBEROFFILES}}
10756 parsoid={ "modes": ["wt2html","wt2wt"], "normalizePhp": true }
10765 Magic Word: {{PAGENAME}}
10767 title=[[User:Ævar Arnfjörð Bjarmason]]
10768 parsoid={ "modes": ["wt2html","wt2wt"], "normalizePhp": true }
10772 <p>Ævar Arnfjörð Bjarmason
10777 Magic Word: {{PAGENAME}} with metacharacters
10779 title=[['foo & bar = baz']]
10780 parsoid={ "modes": ["wt2html","wt2wt"], "normalizePhp": true }
10784 <p><i>'foo & bar = baz'</i>
10789 Magic Word: {{PAGENAME}} with metacharacters (T28781)
10791 title=[[*RFC 1234 http://example.com/]]
10792 parsoid={ "modes": ["wt2html","wt2wt"], "normalizePhp": true }
10796 <p>*RFC 1234 http://example.com/
10801 Magic Word: {{PAGENAMEE}}
10803 title=[[User:Ævar Arnfjörð Bjarmason]]
10804 parsoid={ "modes": ["wt2html","wt2wt"], "normalizePhp": true }
10808 <p>%C3%86var_Arnfj%C3%B6r%C3%B0_Bjarmason
10813 Magic Word: {{PAGENAMEE}} with metacharacters (T28781)
10815 title=[[*RFC 1234 http://example.com/]]
10816 parsoid={ "modes": ["wt2html","wt2wt"], "normalizePhp": true }
10820 <p>*RFC_1234_http://example.com/
10825 Magic Word: {{REVISIONID}}
10827 parsoid={ "modes": ["wt2html","wt2wt"], "normalizePhp": true }
10834 flags=vary-revision-id
10838 Magic Word: {{SCRIPTPATH}}
10840 parsoid={ "modes": ["wt2html","wt2wt"], "normalizePhp": true }
10848 Magic Word: {{STYLEPATH}}
10850 parsoid={ "modes": ["wt2html","wt2wt"], "normalizePhp": true }
10859 Magic Word: {{SERVER}}
10861 parsoid={ "modes": ["wt2html","wt2wt"], "normalizePhp": true }
10865 <p><a rel="nofollow" class="external free" href="http://example.org">http://example.org</a>
10870 Magic Word: {{SERVERNAME}}
10872 parsoid={ "modes": ["wt2html","wt2wt"], "normalizePhp": true }
10881 Magic Word: {{SITENAME}}
10883 parsoid={ "modes": ["wt2html","wt2wt"], "normalizePhp": true }
10892 Magic Word: {{PAGELANGUAGE}}
10895 parsoid={ "modes": ["wt2html","wt2wt"], "normalizePhp": true }
10904 Magic Word: {{PAGELANGUAGE}} on a page with no explicitly set language
10906 parsoid={ "modes": ["wt2html","wt2wt"], "normalizePhp": true }
10915 Case-sensitive magic words, when cased differently, should just be template transclusions
10922 <p><a href="/index.php?title=Template:CurrentMonth&action=edit&redlink=1" class="new" title="Template:CurrentMonth (page does not exist)">Template:CurrentMonth</a>
10923 <a href="/index.php?title=Template:Currentday&action=edit&redlink=1" class="new" title="Template:Currentday (page does not exist)">Template:Currentday</a>
10924 <a href="/index.php?title=Template:CURreNTweEK&action=edit&redlink=1" class="new" title="Template:CURreNTweEK (page does not exist)">Template:CURreNTweEK</a>
10925 <a href="/index.php?title=Template:CurrentHour&action=edit&redlink=1" class="new" title="Template:CurrentHour (page does not exist)">Template:CurrentHour</a>
10930 Case-insensitive magic words should still work with weird casing.
10940 <a rel="nofollow" class="external free" href="http://example.org">http://example.org</a>
10944 # From plwiki:PLOS_ONE
10946 Parsoid: Page property magic word with magic word contents
10948 {{DISPLAYTITLE:''{{PAGENAME}}''}}
10950 <meta property="mw:PageProp/displaytitle" content="Main Page" about="#mwt3" typeof="mw:ExpandedAttrs" data-parsoid='{"src":"{{DISPLAYTITLE:''{{PAGENAME}}''}}"}' data-mw='{"attribs":[[{"txt":"content"},{"html":"DISPLAYTITLE:<i data-parsoid='{\"dsr\":[15,31,2,2]}'><span about=\"#mwt1\" typeof=\"mw:Transclusion\" data-parsoid='{\"pi\":[[]],\"dsr\":[17,29,null,null]}' data-mw='{\"parts\":[{\"template\":{\"target\":{\"wt\":\"PAGENAME\",\"function\":\"pagename\"},\"params\":{},\"i\":0}}]}'>Main Page</span></i>"}]]}'/>
10953 # NOTE: mw:ExpandedAttrs is not the best typeof here. mw:Transclusion is better.
10954 # But, this is a limitation of our representation and is documented in
10955 # TemplateHandler.js in processSpecialMagicWord
10957 Parsoid: Template-generated DISPLAYTITLE
10959 {{{{echo|DISPLAYTITLE}}:Foo}}
10963 wgAllowDisplayTitle=true
10964 wgRestrictDisplayTitle=false
10969 <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"}]]}'/>
10973 Namespace 1 {{ns:1}}
10982 Namespace 1 {{ns:01}}
10991 Namespace 0 {{ns:0}} (T6783)
10999 Namespace 0 {{ns:00}} (T6783)
11007 Namespace -1 {{ns:-1}}
11016 Namespace User {{ns:User}}
11025 Namespace User talk {{ns:User_talk}}
11034 Namespace User talk {{ns:uSeR tAlK}}
11043 Namespace File {{ns:File}}
11052 Namespace File {{ns:Image}}
11061 Namespace (lang=de) Benutzer {{ns:User}}
11072 Namespace (lang=de) Benutzer Diskussion {{ns:3}}
11078 <p>Benutzer Diskussion
11085 {{urlencode:hi world?!}}
11086 {{urlencode:hi world?!|WIKI}}
11087 {{urlencode:hi world?!|PATH}}
11088 {{urlencode:hi world?!|QUERY}}
11098 Magic Word: prioritize type info over data-parsoid
11102 <meta property="mw:PageProp/forcetoc" data-parsoid='{"magicSrc":"__NOTOC__"}'/>
11108 Magic Word: serialize on separate line (parsoid)
11110 parsoid=wt2wt,html2wt
11116 foo<meta property="mw:PageProp/notoc"/>bar
11120 Magic Word: rt non-english wikis
11127 <meta property="mw:PageProp/noeditsection" data-parsoid='{"magicSrc":"__NOEDITSECTION__"}'/>
11131 __proto__ is treated as normal wikitext (T105997)
11143 Magic links: internal link to RFC (T2479)
11147 <p><a href="/index.php?title=RFC_123&action=edit&redlink=1" class="new" title="RFC 123 (page does not exist)">RFC 123</a>
11150 <p><a rel="mw:WikiLink" href="./RFC_123" title="RFC 123">RFC 123</a></p>
11154 Magic links: RFC (T2479)
11158 <p><a class="external mw-magiclink-rfc" rel="nofollow" href="https://tools.ietf.org/html/rfc822">RFC 822</a>
11161 <p><a href="https://tools.ietf.org/html/rfc822" rel="mw:ExtLink" class="external mw-magiclink">RFC 822</a></p>
11165 Magic links: RFC (T67278)
11167 This is RFC 822 but thisRFC 822 is not RFC 822linked.
11169 <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.
11172 <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>
11176 Magic links: RFC (w/ non-newline whitespace, T30950/T31025)
11178 RFC      822
11182 <p><a class="external mw-magiclink-rfc" rel="nofollow" href="https://tools.ietf.org/html/rfc822">RFC 822</a>
11187 <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>
11193 Magic links: ISBN (T3937)
11197 <p><a href="/wiki/Special:BookSources/0306406152" class="internal mw-magiclink-isbn">ISBN 0-306-40615-2</a>
11200 <p><a href="./Special:BookSources/0306406152" rel="mw:WikiLink">ISBN 0-306-40615-2</a></p>
11204 Magic links: ISBN (T67278)
11206 This is ISBN 978-0-316-09811-3 but thisISBN 978-0-316-09811-3 is not ISBN 978-0-316-09811-3linked.
11208 <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.
11211 <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>
11215 Magic links: ISBN (w/ non-newline whitespace, T30950/T31025)
11217 ISBN      978 0 316 09811 3
11223 <p><a href="/wiki/Special:BookSources/9780316098113" class="internal mw-magiclink-isbn">ISBN 978 0 316 09811 3</a>
11230 <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>
11238 Magic links: PMID incorrectly converts space to underscore
11242 <p><a class="external mw-magiclink-pmid" rel="nofollow" href="//www.ncbi.nlm.nih.gov/pubmed/1234?dopt=Abstract">PMID 1234</a>
11245 <p><a href="//www.ncbi.nlm.nih.gov/pubmed/1234?dopt=Abstract" rel="mw:ExtLink" class="external mw-magiclink">PMID 1234</a></p>
11249 Magic links: PMID (T67278)
11251 This is PMID 1234 but thisPMID 1234 is not PMID 1234linked.
11253 <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.
11256 <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>
11260 Magic links: PMID (w/ non-newline whitespace, T30950/T31025)
11262 PMID      1234
11266 <p><a class="external mw-magiclink-pmid" rel="nofollow" href="//www.ncbi.nlm.nih.gov/pubmed/1234?dopt=Abstract">PMID 1234</a>
11271 <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>
11276 # <nowiki> nodes shouldn't be inserted during html2wt by Parsoid,
11277 # since these are ExtLinkText, not MagicLinkText
11279 Magic links: use appropriate serialization for "almost" magic links.
11281 X[[Special:BookSources/0978739256|foo]]
11283 X[https://tools.ietf.org/html/rfc1234 foo]
11285 <p>X<a href="/wiki/Special:BookSources/0978739256" title="Special:BookSources/0978739256">foo</a>
11286 </p><p>X<a rel="nofollow" class="external text" href="https://tools.ietf.org/html/rfc1234">foo</a>
11289 <p>X<a rel="mw:WikiLink" href="./Special:BookSources/0978739256" title="Special:BookSources/0978739256">foo</a></p>
11290 <p>X<a rel="mw:ExtLink" class="external text" href="https://tools.ietf.org/html/rfc1234">foo</a></p>
11294 Magic links: All disabled (T47942)
11296 wgEnableMagicLinks={"ISBN":false, "PMID":false, "RFC":false}
11302 <p>ISBN 0-306-40615-2
11313 Nonexistent template
11315 {{thistemplatedoesnotexist}}
11317 <p><a href="/index.php?title=Template:Thistemplatedoesnotexist&action=edit&redlink=1" class="new" title="Template:Thistemplatedoesnotexist (page does not exist)">Template:Thistemplatedoesnotexist</a>
11322 Template with invalid target containing tags
11324 {{a<b>b</b>|{{echo|foo}}|{{echo|a}}={{echo|b}}|a = b}}
11326 <p>{{a<b>b</b>|foo|a=b|a = b}}
11331 Template with invalid target containing unclosed tag
11333 {{a<b>|{{echo|foo}}|{{echo|a}}={{echo|b}}|a = b}}
11335 <p>{{a<b>|foo|a=b|a = b}}</b>
11340 Template with invalid target containing wikilink
11344 <p>{{<a href="/wiki/Main_Page" title="Main Page">Main Page</a>}}
11347 <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>
11351 Template with just whitespace in it, T70421
11355 <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>
11361 This is a test template
11369 <p>This is a test template
11374 Template with explicit namespace
11378 <p>This is a test template
11386 This is a test template with parameter {{{param}}}
11392 {{paramtest|param=foo}}
11394 <p>This is a test template with parameter foo
11399 Template:paramtestnum
11401 [[{{{1}}}|{{{2}}}]]
11405 Template unnamed parameter
11407 {{paramtestnum|Main Page|the main page}}
11409 <p><a href="/wiki/Main_Page" title="Main Page">the main page</a>
11414 Template:templatesimple
11420 Template:templateredirect
11422 #redirect [[Template:templatesimple]]
11426 Template:templateasargtestnum
11432 Template:templateasargtest
11434 {{template{{{templ}}}}}
11438 Template:templateasargtest2
11444 Template with template name as unnamed argument
11446 {{templateasargtestnum|templatesimple}}
11453 Template with template name as argument
11455 {{templateasargtest|templ=simple}}
11462 Template with template name as argument (2)
11464 {{templateasargtest2|templ=templatesimple}}
11471 Template:templateasargtestdefault
11473 {{{{{templ|templatesimple}}}}}
11483 Template with default value
11485 {{templateasargtestdefault}}
11492 Template with default value (value set)
11494 {{templateasargtestdefault|templ=templa}}
11503 {{templateredirect}}
11508 <link rel="mw:PageProp/redirect" href="./Template:Templatesimple" typeof="mw:Transclusion" data-mw='{"parts":[{"template":{"target":{"wt":"templateredirect","href":"./Template:Templateredirect"},"params":{},"i":0}}]}'/>
11512 Template with argument in separate line
11514 {{ templateasargtest |
11522 Template with complex template as argument
11525 param ={{ templateasargtest |
11526 templ = simple }}}}
11528 <p>This is a test template with parameter (test)
11533 Templates with templated name
11535 {{{{echo|echo}}|foo}}
11536 {{{{echo|inner list}} }}
11540 <ul><li>item 1</li></ul>
11543 <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>
11544 <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>
11547 ## Regression test; the output here isn't really that interesting.
11549 Templates with templated name and top level template args
11551 {{1{{2{{{3}}}|4=5}}}}
11553 <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>
11556 # Parsoid markup is deliberate "broken". This is an edge case.
11557 # See long comment in TemplateHandler.js:convertAttribsToString.
11559 Templates with invalid templated targets
11570 <p typeof="mw:Transclusion" data-mw='{"parts":[{"template":{"target":{"wt":"echo\n{{echo|foo}}\n"},"params":{},"i":0}}]}'>{{echo
11575 Template with thumb image (with link in description)
11577 {{paramtest|param=[[Image:noimage.png|thumb|[[no link|link]] [[no link|caption]]]]}}
11579 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>
11582 <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>
11584 <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>
11588 Template:complextemplate
11590 {{{1}}} {{paramtest|
11591 param ={{{param}}}}}
11595 Template with complex arguments
11598 param ={{ templateasargtest |
11599 templ = simple }}|[[Template:complextemplate|link]]}}
11601 <p><a href="/wiki/Template:Complextemplate" title="Template:Complextemplate">link</a> This is a test template with parameter (test)
11606 T2553: link with two variables in a piped link
11609 |[[{{{1}}}|{{{2}}}]]
11614 <td>[[{{{1}}}|{{{2}}}]]
11619 <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>
11625 Abort table cell attribute parsing on wikilink
11628 |testing [[one|two]] |three||four
11629 |testing one two |three||four
11630 |testing="[[one|two]]" |three||four
11635 <td>testing <a href="/index.php?title=One&action=edit&redlink=1" class="new" title="One (page does not exist)">two</a> |three</td>
11641 <td>testing="<a href="/index.php?title=One&action=edit&redlink=1" class="new" title="One (page does not exist)">two</a>" |three</td>
11647 <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>
11648 <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>
11649 <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>
11654 Don't abort table cell attribute parsing if wikilink is found in template arg
11657 |Test {{#tag:ref|One two "[[three]]" four}}
11661 <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>
11666 Magic variable as template parameter
11668 {{paramtest|param={{SITENAME}}}}
11670 <p>This is a test template with parameter MediaWiki
11677 [[{{{param}}}|link]]
11681 Template parameter as link source
11683 {{linktest|param=Main Page}}
11685 <p><a href="/wiki/Main_Page" title="Main Page">link</a>
11690 Template:paramtest2
11692 including another template, {{paramtest|param={{{arg}}}}}
11696 Template passing argument to another template
11698 {{paramtest2|arg='hmm'}}
11700 <p>including another template, This is a test template with parameter 'hmm'
11711 Template as link source
11715 [[{{linktest2}}|Main Page]]
11717 [[{{linktest2}}]]Page
11719 <p><a href="/wiki/Main_Page" title="Main Page">Main Page</a>
11720 </p><p><a href="/wiki/Main_Page" title="Main Page">Main Page</a>
11721 </p><p><a href="/wiki/Main_Page" title="Main Page">Main Page</a>Page
11739 Template infinite loop
11743 <p><span class="error">Template loop detected: <a href="/wiki/Template:Loop1" title="Template:Loop1">Template:Loop1</a></span>
11748 Template from main namespace
11757 Template from non-includable namespace
11759 wgNonincludableNamespaces=10
11763 <p><a href="/wiki/Template:Echo" title="Template:Echo">Template:Echo</a>
11778 T2529: Template with table, not included at beginning of line
11797 T2523: Template shouldn't eat newline (or add an extra one before table)
11817 T2041: Template parameters shown as broken links
11826 Template with targets containing wikilinks
11832 {{[[{{echo|foo}}]]}}
11834 {{{{echo|[[foo}}]]}}
11836 <p>{{<a href="/wiki/Foo" title="Foo">foo</a>}}
11837 </p><p>{{<a href="/wiki/Foo" title="Foo">foo</a>}}
11841 <p>{{<a rel="mw:WikiLink" href="./Foo" title="Foo">foo</a>}}</p>
11842 <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>
11843 <p>{{<span typeof="mw:Transclusion" data-mw='{"parts":[{"template":{"target":{"wt":"echo","href":"./Template:Echo"},"params":{"1":{"wt":"[[foo}}]]"}},"i":0}}]}'>[[foo}}]]</span></p>
11853 Templates: Double quotes as template target
11860 <p>foo <span about="#mwt1" typeof="mw:Transclusion" data-mw='{"parts":[{"template":{"target":{"wt":"''","href":"./Template:''"},"params":{},"i":0}}]}'>bar</span> baz
11864 ## This test is about making sure Parsoid's data-mw is well formed in the
11865 ## face of multiple templates with intersecting and overlapping ranges. The
11866 ## wikitext itself is wretched.
11868 Templates with intersecting and overlapping ranges
11879 </table><p>ho</p><table>
11883 </td></tr></tbody></table>
11885 <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":""}]]}'>
11887 </table><p about="#mwt1">ho</p><table about="#mwt1" typeof="mw:ExpandedAttrs" data-mw='{"attribs":[[{"txt":"","html":""},{"html":""}]]}'>
11889 <tbody><tr><td>hi</td></tr>
11894 Template:MSGNW test
11896 ''None'' of '''this''' should be
11898 but rather passed unmodified
11906 # hmm, fix this or just deprecate msgnw and document its behavior?
11910 {{msgnw:MSGNW test}}
11912 <p>''None'' of '''this''' should be
11914  but rather passed unmodified
11915 {{test}}
11919 <!-- comment -->
11926 {{int:youhavenewmessages|lots of money|not!}}
11928 <p>You have lots of money (not!).
11933 int keyword - non-existing message
11944 Foo<noinclude>zar</noinclude><includeonly>bar</includeonly>
11948 <includeonly> and <noinclude> being included
11959 <onlyinclude>Foo</onlyinclude>bar
11963 <onlyinclude> being included
11975 <onlyinclude>Foo</onlyinclude>bar<includeonly>zar</includeonly>
11979 <onlyinclude> and <includeonly> being included
11988 <includeonly> and <noinclude> on a page
11990 Foo<noinclude>zar</noinclude><includeonly>bar</includeonly>
11997 Un-closed <noinclude>
12004 <onlyinclude> on a page
12006 <onlyinclude>Foo</onlyinclude>bar
12013 Un-closed <onlyinclude>
12020 Self-closed noinclude, includeonly, onlyinclude tags
12031 Unbalanced includeonly and noinclude tags
12035 |b</noinclude></noinclude>
12036 |c</noinclude></includeonly>
12037 |d</includeonly></includeonly>
12046 <td>c</includeonly>
12048 <td>d</includeonly></includeonly>
12054 Template:Includeonly section
12057 ==Includeonly section==
12063 T8563: Edit link generation for section shown by <includeonly>
12065 {{includeonly section}}
12067 <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>
12068 <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>
12072 # Uses same input as the contents of [[Template:Includeonly section]]
12074 T8563: Section extraction for section shown by <includeonly>
12079 ==Includeonly section==
12087 T8563: Edit link generation for section suppressed by <includeonly>
12090 ==Includeonly section==
12094 <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>
12099 T8563: Section extraction for section suppressed by <includeonly>
12104 ==Includeonly section==
12112 Un-closed <includeonly>
12117 <meta typeof="mw:Includes/IncludeOnly" data-parsoid='{"src":"<includeonly>"}' data-mw='{"src":"<includeonly>"}'/>
12120 ## We used to, but no longer wt2wt this test since the default serializer
12121 ## will normalize the include directives to serialize on their own line.
12122 ## Selser will take care of preserving formatting in scenarios where they
12123 ## intermingled with other wikitext.
12125 Includes and comments at SOL
12127 parsoid=wt2html,html2html
12129 <!-- comment --><noinclude><!-- comment --></noinclude><!-- comment -->==hu==
12137 some</noinclude>* stuff
12140 <includeonly>can have stuff</includeonly>===here===
12143 <h2><span class="mw-headline" id="hu">hu</span></h2>
12151 <ul><li>here</li></ul>
12152 <h3><span class="mw-headline" id="here">here</span></h3>
12155 <!-- 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>
12157 <meta typeof="mw:Includes/NoInclude" data-parsoid='{"src":"<noinclude>"}'/>
12159 <meta typeof="mw:Includes/NoInclude/End" data-parsoid='{"src":"</noinclude>"}'/><ul><li>stuff</li>
12162 <meta typeof="mw:Includes/NoInclude" data-parsoid='{"src":"<noinclude>"}'/>
12163 <p>some<meta typeof="mw:Includes/NoInclude/End" data-parsoid='{"src":"</noinclude>"}'/>* stuff</p>
12164 <ul><li>here</li></ul>
12166 <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>
12170 # TODO: test with DOM fragment reuse!
12172 Parsoid: DOM fragment reuse
12174 parsoid=wt2wt,wt2html
12176 a{{echo|b<table></table>c}}d
12188 <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>
12190 <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">
12191 </span><table about="#mwt2" data-parsoid='{"stx":"html"}'></table><span about="#mwt2">
12192 </span><p about="#mwt2">cd</p>
12194 <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">
12196 </span><table about="#mwt3" data-parsoid='{"stx":"html"}'></table><span about="#mwt3">
12198 </span><p about="#mwt3">b</p>
12202 Parsoid: Merge double tds (T52603)
12207 |{{echo|{{!}} foo}}
12211 <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>
12216 Parsoid: Merge double tds in nested transclusion content (T52603)
12222 |{{echo|{{!}} foo}}
12226 <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}}]}'>
12228 <tr><td data-mw='{"parts":["|"]}'> foo</td></tr>
12234 ### <includeonly> and <noinclude> in attributes
12237 0. includeonly around the entire attribute
12239 <span <includeonly>id="v1"</includeonly><noinclude>id="v2"</noinclude>>bar</span>
12241 <p><span id="v2">bar</span>
12246 1. includeonly in html attr key
12248 <span <noinclude>id</noinclude><includeonly>about</includeonly>="foo">bar</span>
12250 <p><span id="foo">bar</span>
12255 2. includeonly in html attr value
12257 <span id="<noinclude>v1</noinclude><includeonly>v2</includeonly>">bar</span>
12258 <span id=<noinclude>"v1"</noinclude><includeonly>"v2"</includeonly>>bar</span>
12260 <p><span id="v1">bar</span>
12261 <span id="v1">bar</span>
12266 3. includeonly in part of an attr value
12268 <span style="color:<noinclude>red</noinclude><includeonly>blue</includeonly>;">bar</span>
12270 <p><span style="color:red;">bar</span>
12275 4. includeonly in table attributes
12299 ### Preprocessor precedence tests
12300 ### See: https://www.mediawiki.org/wiki/Preprocessor_ABNF
12302 ##{{[[-{{{{{{[[Foo|bar}}]]}-}}}}}]]
12304 Preprocessor precedence 1: link is rightmost opening
12310 But close-brace is not a valid character in a link title:
12313 However, we can still tell this was handled as a link in the preprocessor:
12314 {{echo|[[Foo}}|bar]]|bat}}
12316 <p>{{<a href="/wiki/Foo" title="Foo">bar}}</a>
12317 </p><p>But close-brace is not a valid character in a link title:
12319 </p><p>However, we can still tell this was handled as a link in the preprocessor:
12323 <p>{{<a rel="mw:WikiLink" href="./Foo" title="Foo">bar}}</a></p>
12324 <p>But close-brace is not a valid character in a link title: {{[[Foo}}|bar]]</p>
12325 <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>
12329 Preprocessor precedence 2: template is rightmost opening
12338 <p>-<span typeof="mw:Transclusion" data-mw='{"parts":[{"template":{"target":{"wt":"echo","href":"./Template:Echo"},"params":{"1":{"wt":"foo}-"}},"i":0}}]}'>foo}-</span>-</p>
12342 Preprocessor precedence 3: language converter is rightmost opening
12358 <p typeof="mw:Transclusion" data-mw='{"parts":[{"template":{"target":{"wt":"echo","href":"./Template:Echo"},"params":{"1":{"wt":"hi"}},"i":0}}]}'>hi</p>
12359 <p>{{<span typeof="mw:LanguageVariant" data-mw-variant='{"disabled":{"t":"echo|hi}}"}}'></span></p>
12360 <p>[[<span typeof="mw:LanguageVariant" data-mw-variant='{"disabled":{"t":"raw]]"}}'></span></p>
12364 Preprocessor precedence 4: left-most angle bracket
12375 Template:Precedence5
12381 Preprocessor precedence 5: tplarg takes precedence over template
12383 {{Precedence5|Bullet}}
12385 <ul><li>Bar</li></ul>
12388 <ul typeof="mw:Transclusion" data-mw='{"parts":[{"template":{"target":{"wt":"Precedence5","href":"./Template:Precedence5"},"params":{"1":{"wt":"Bullet"}},"i":0}}]}'><li>Bar</li></ul>
12392 Preprocessor precedence 6: broken link is rightmost opening
12398 {{echo|[[Foo|bar|bat=baz}}
12401 </p><p>{{echo|[[Foo|bar|bat=baz}}
12404 <p>{{echo|[[Foo}}</p>
12405 <p>{{echo|[[Foo|bar|bat=baz}}</p>
12408 # This next test exposes a difference between PHP and Parsoid:
12409 # Given [[Foo|{{echo|Bar]]x}}y]]z:
12410 # 1) Both PHP and Parsoid ignore the `]]` inside the `echo` in the
12411 # "preprocessor" stage. The `{{echo` extends until the `x}}`, and the
12412 # outer `[[Foo` extends until the `y]]`
12413 # 2a) But then the PHP preprocessor emits `[[Foo|Bar]]xy]]z` as an
12414 # intermediate result (after template expansion), and link processing
12415 # happens on this intermediate result, which moves the wikilink
12416 # boundary leftward to `[[Foo|Bar]]`
12417 # 2b) Parsoid works in a single step, so it's going to keep the
12418 # wikilink as extending to the `y]]`
12419 # 3a) Then PHP does linktrail processing which slurps up the trailing
12420 # `xy` inside the link.
12421 # 3b) Parsoid will do linktrail processing to slurp up the trailing
12422 # `z` inside the link.
12423 # This is "correct" behavior. Parsoid's basic worldview is that the
12424 # `]]` inside the template shouldn't be allowed to leak out to affect
12425 # the surrounding wikilink. PHP may match Parsoid (in the future)
12426 # if you use {{#balance}} (T114445).
12429 Preprocessor precedence 7: broken template is rightmost opening
12435 [[Foo|{{echo|Bar]]-x}}-y]]-z
12437 Careful: linktrails can move the end of the wikilink:
12438 [[Foo|{{echo|y']]a}}l]]l
12440 <p><a href="/wiki/Foo" title="Foo">{{echo|Bar</a>
12441 </p><p><a href="/wiki/Foo" title="Foo">Bar</a>-x-y]]-z
12442 </p><p>Careful: linktrails can move the end of the wikilink:
12443 <a href="/wiki/Foo" title="Foo">y'al</a>]]l
12446 <p>[[Foo|{{echo|Bar]]</p>
12447 <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>
12448 <p>Careful: linktrails can move the end of the wikilink:
12449 <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>
12453 Preprocessor precedence 8: broken language converter is rightmost opening
12464 Template:Preprocessor_precedence_9
12469 ;7: {{{{{{{4}}}}}}}
12473 Preprocessor precedence 9: groups of braces
12475 {{Preprocessor precedence 9|Four|Bullet|1|2}}
12481 <ul><li>Bar</li></ul>
12485 <dd>{Bullet}</dd></dl>
12488 <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}}]}'>
12493 </dl><ul about="#mwt1">
12495 </ul><span about="#mwt1"> </span><dl about="#mwt1">
12504 Template:Preprocessor_precedence_10
12511 ;6: -{{{{{{4}}}}}}-
12512 ;7: -{{{{{{{5}}}}}}}-
12516 Preprocessor precedence 10: groups of braces with leading dash
12520 {{Preprocessor precedence 10|Three|raw2|Bullet|1|2}}
12526 <ul><li>Bar-</li></ul>
12533 <ul><li>Bar-</li></ul>
12540 <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}}]}'>
12542 <dd><span typeof="mw:LanguageVariant" data-mw-variant='{"disabled":{"t":"raw"}}'></span></dd>
12545 </dl><ul about="#mwt1">
12547 </ul><span about="#mwt1"> </span><dl about="#mwt1">
12551 <dd><span typeof="mw:LanguageVariant" data-mw-variant='{"disabled":{"t":"raw2"}}'></span></dd>
12554 </dl><ul about="#mwt1">
12556 </ul><span about="#mwt1"> </span><dl about="#mwt1">
12560 <dd><span typeof="mw:LanguageVariant" data-mw-variant='{"disabled":{"t":"raw2"}}'></span></dd>
12565 Preprocessor precedence 11: found during visual diff testing
12567 {{#tag:span|-{{#tag:span|-{{echo|x}}}}}}
12569 {{echo|-{{echo|-{{echo|x}}}}}}
12571 {{echo|-{{echo|x}}}}
12573 <p><span>-<span>-x</span></span>
12578 <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>
12580 <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>
12582 <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>
12586 Preprocessor precedence 12: broken language converter closed by brace.
12590 This form breaks the template, which is unfortunate:
12591 *{{echo|foo-{bar}bat}}
12593 But if the broken language converter markup is inside an extension
12594 tag, nothing bad happens:
12595 *<nowiki>foo-{bar}bat</nowiki>
12596 *{{echo|<nowiki>foo-{bar}bat</nowiki>}}
12597 *<pre>foo-{bar}bat</pre>
12598 *{{echo|<pre>foo-{bar}bat</pre>}}
12600 <tag>foo-{bar}bat</tag>
12601 {{echo|<tag>foo-{bar}bat</tag>}}
12604 <p>This form breaks the template, which is unfortunate:
12606 <ul><li>{{echo|foo-{bar}bat}}</li></ul>
12607 <p>But if the broken language converter markup is inside an extension
12608 tag, nothing bad happens:
12610 <ul><li>foo-{bar}bat</li>
12611 <li>foo-{bar}bat</li>
12612 <li><pre>foo-{bar}bat</pre></li>
12613 <li><pre>foo-{bar}bat</pre></li></ul>
12614 <pre>'foo-{bar}bat'
12618 <pre>'foo-{bar}bat'
12623 <p>This form breaks the template, which is unfortunate:</p>
12625 <li>{{echo|foo-{bar}bat}}</li>
12627 <p>But if the broken language converter markup is inside an extension tag, nothing bad happens:</p>
12629 <li><span typeof="mw:Nowiki">foo-{bar}bat</span></li>
12630 <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>
12631 <li><pre typeof="mw:Extension/pre" data-mw='{"name":"pre","attrs":{},"body":{"extsrc":"foo-{bar}bat"}}'>foo-{bar}bat</pre></li>
12632 <li><pre typeof="mw:Transclusion mw:Extension/pre" data-mw='{"parts":[{"template":{"target":{"wt":"echo","href":"./Template:Echo"},"params":{"1":{"wt":"<pre>foo-{bar}bat</pre>"}},"i":0}}]}'>foo-{bar}bat</pre></li>
12634 <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>
12638 Preprocessor precedence 13: broken language converter in external link
12642 *[http://example.com/-{foo Example in URL]
12643 *[http://example.com Example in -{link} description]
12644 *{{echo|[http://example.com/-{foo Breaks template, however]}}
12646 <ul><li><a rel="nofollow" class="external text" href="http://example.com/-{foo">Example in URL</a></li>
12647 <li><a rel="nofollow" class="external text" href="http://example.com">Example in -{link} description</a></li>
12648 <li>{{echo|<a rel="nofollow" class="external text" href="http://example.com/-{foo">Breaks template, however</a>}}</li></ul>
12651 <li><a rel="mw:ExtLink" class="external text" href="http://example.com/-{foo">Example in URL</a></li>
12652 <li><a rel="mw:ExtLink" class="external text" href="http://example.com">Example in -{link} description</a></li>
12653 <li>{{echo|<a rel="mw:ExtLink" class="external text" href="http://example.com/-{foo">Breaks template, however</a>}}</li>
12658 Preprocessor precedence 14: broken language converter in comment
12660 *<!--{{foo}}-->...should be ok
12661 *<!---{{foo}}-->...extra dashes
12662 *{{echo|foo<!-- -{bar} -->bat}}...should be ok
12664 <ul><li>...should be ok</li>
12665 <li>...extra dashes</li>
12666 <li>foobat...should be ok</li></ul>
12669 <li><!--{{foo}}-->...should be ok</li>
12670 <li><!---{{foo}}-->...extra dashes</li>
12671 <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>
12676 Preprocessor precedence 15: broken brace markup in headings
12678 wgFragmentMode=[ 'html5', 'legacy' ]
12682 __NOTOC__ __NOEDITSECTION__
12691 ===5 foo{{{bar 5===
12696 <h3><span id="1_foo.5Bbar_1"></span><span class="mw-headline" id="1_foo[bar_1">1 foo[bar 1</span></h3>
12699 <h3><span id="2_foo.5B.5Bbar_2"></span><span class="mw-headline" id="2_foo[[bar_2">2 foo[[bar 2</span></h3>
12702 <h3><span id="3_foo.7Bbar_3"></span><span class="mw-headline" id="3_foo{bar_3">3 foo{bar 3</span></h3>
12705 <h3><span id="4_foo.7B.7Bbar_4"></span><span class="mw-headline" id="4_foo{{bar_4">4 foo{{bar 4</span></h3>
12708 <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>
12711 <h3><span id="6_foo-.7Bbar_6"></span><span class="mw-headline" id="6_foo-{bar_6">6 foo-{bar 6</span></h3>
12715 <meta property="mw:PageProp/notoc"/> <meta property="mw:PageProp/noeditsection"/>
12716 <h3 id="1_foo[bar_1"><span id="1_foo.5Bbar_1" typeof="mw:FallbackId"></span>1 foo[bar 1</h3>
12718 <h3 id="2_foo[[bar_2"><span id="2_foo.5B.5Bbar_2" typeof="mw:FallbackId"></span>2 foo[[bar 2</h3>
12720 <h3 id="3_foo{bar_3"><span id="3_foo.7Bbar_3" typeof="mw:FallbackId"></span>3 foo{bar 3</h3>
12722 <h3 id="4_foo{{bar_4"><span id="4_foo.7B.7Bbar_4" typeof="mw:FallbackId"></span>4 foo{{bar 4</h3>
12724 <h3 id="5_foo{{{bar_5"><span id="5_foo.7B.7B.7Bbar_5" typeof="mw:FallbackId"></span>5 foo{{{bar 5</h3>
12726 <h3 id="6_foo-{bar_6"><span id="6_foo-.7Bbar_6" typeof="mw:FallbackId"></span>6 foo-{bar 6</h3>
12731 Preprocessor precedence 16: matching closing braces to opening braces
12736 -{{{echo|foo}}bar}-
12741 <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>
12745 Preprocessor precedence 17: template w/o target shouldn't prevent closing
12754 <p about="#mwt1" typeof="mw:Transclusion" data-mw='{"parts":[{"template":{"target":{"wt":"echo","href":"./Template:Echo"},"params":{"1":{"wt":"hi {{}}"}},"i":0}}]}'>hi {{}}</p>
12757 # Ensure we're using a language without variants for this test; even
12758 # if $wgUsePigLatinVariant is true. We've picked `de` arbitrarily.
12760 Preprocessor precedence 18: another rightmost wins scenario
12765 {{ -{{{{1|tplarg}}} }} }-
12767 <p>{{ -{tplarg }} }-
12770 <p>{{ -{<span about="#mwt1" typeof="mw:Param" data-mw='{"parts":[{"templatearg":{"target":{"wt":"1"},"params":{"1":{"wt":"tplarg"}},"i":0}}]}'>tplarg</span> }} }-</p>
12774 Preprocessor precedence 19: break syntax
12787 ### Token Stream Patcher tests
12789 ### These tests won't always pass wt2wt and other modes because
12790 ### on serialization, the table will be output on a new line.
12791 ### For now, we are blacklisting them, and using this to test selser.
12795 1. Table tag in SOL posn. should get reparsed correctly with valid TSR
12797 parsoid=wt2html,wt2wt
12799 {{echo|}}{| width = '100%'
12803 <span typeof="mw:Transclusion" data-mw='{"parts":[{"template":{"target":{"wt":"echo","href":"./Template:Echo"},"params":{"1":{"wt":""}},"i":0}}]}'></span><table width="100%">
12804 <tbody><tr><td>foo</td></tr>
12808 ## We used to, but no longer wt2wt this test since the default serializer
12809 ## will normalize the include directives to serialize on their own line.
12810 ## Selser will take care of preserving formatting in scenarios where they
12811 ## intermingled with other wikitext.
12813 2. Table tag in SOL posn. should get reparsed correctly with valid TSR
12817 <includeonly>a</includeonly>{| {{{b}}}
12821 <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":""}]]}'>
12822 <tbody><tr><td>c</td></tr>
12827 Table wikitext syntax outside wiki-tables
12831 ! not a table heading
12834 | class="foo bar" | baz
12842 ! not a table heading
12845 | class="foo bar" | baz
12854 ### Testing parsing of templates where a template arg
12855 ### has the same name as the template itself.
12861 {{{quote|{{{1}}}}}}
12865 Templates: Template Name/Arg clash: 1. Use of positional param
12874 Templates: Template Name/Arg clash: 2. Use of named param
12876 {{quote|quote=foo}}
12883 Templates: Template Name/Arg clash: 3. Use of named param with empty input
12892 ### Parsoid-centric tests to stress Parsoid's ability to RT them unchanged
12896 Templates: 1. Simple use
12905 Templates: 2. Inside a block tag
12907 <div>{{echo|Foo}}</div>
12908 <blockquote>{{echo|Foo}}</blockquote>
12911 <blockquote>Foo</blockquote>
12915 <blockquote><p>Foo</p></blockquote>
12919 Templates: P-wrapping: 1a. Templates on consecutive lines
12930 Templates: P-wrapping: 1b. Templates on consecutive lines
12944 Templates: P-wrapping: 1c. Templates on consecutive lines
12947 {{echo|bar}} <div>baz</div>
12956 bar </p><div>baz</div>
12960 Templates: P-wrapping: 1d. Template preceded by comment-only line
12969 <p about="#mwt223" typeof="mw:Transclusion" data-mw='{"parts":[{"template":{"target":{"wt":"echo","href":"./Template:Echo"},"params":{"1":{"wt":"Bar"}},"i":0}}]}'>Bar</p>
12973 Templates: Scopes should not be expanded unnecessarily
12975 parsoid=wt2html,wt2wt
12977 {{echo|<div>a</div>}}b{{echo|
12980 <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}}]}'>
12981 </span><div about="#mwt2">c</div>
12985 Templates: Inline Text: 1. Multiple template uses
12987 {{echo|Foo}}bar{{echo|baz}}
12994 Templates: Inline Text: 2. Back-to-back template uses
12996 {{echo|Foo}}{{echo|bar}}
13003 Templates: Block Tags: 1. Multiple template uses
13005 {{echo|<div>Foo</div>}}<div>bar</div>{{echo|<div>baz</div>}}
13007 <div>Foo</div><div>bar</div><div>baz</div>
13012 Templates: Block Tags: 2. Back-to-back template uses
13014 {{echo|<div>Foo</div>}}{{echo|<div>bar</div>}}
13016 <div>Foo</div><div>bar</div>
13020 ## Parsoid drops empty elements in templates.
13022 Templates: Correctly encapsulate templates producing </p> tag without a corresponding <p> tag
13029 b</p><p class="mw-empty-elt"></p>
13031 <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">
13032 </span><p about="#mwt1">b</p>
13036 Templates: Links: 1. Simple example
13038 {{echo|[[Foo|bar]]}}
13040 <p><a href="/wiki/Foo" title="Foo">bar</a>
13045 Templates: Links: 2. Generation of link href
13047 [[{{echo|Foo}}|bar]]
13049 <p><a href="/wiki/Foo" title="Foo">bar</a>
13054 Templates: Links: 3. Generation of part of a link href
13056 [[Fo{{echo|o}}|bar]]
13058 [[Foo{{echo|bar}}]]
13060 [[Foo{{echo|bar}}baz]]
13062 [[Foo{{echo|bar}}|bar]]
13064 [[:Foo{{echo|bar}}]]
13066 [[:Foo{{echo|bar}}|bar]]
13068 <p><a href="/wiki/Foo" title="Foo">bar</a>
13069 </p><p><a href="/index.php?title=Foobar&action=edit&redlink=1" class="new" title="Foobar (page does not exist)">Foobar</a>
13070 </p><p><a href="/index.php?title=Foobarbaz&action=edit&redlink=1" class="new" title="Foobarbaz (page does not exist)">Foobarbaz</a>
13071 </p><p><a href="/index.php?title=Foobar&action=edit&redlink=1" class="new" title="Foobar (page does not exist)">bar</a>
13072 </p><p><a href="/index.php?title=Foobar&action=edit&redlink=1" class="new" title="Foobar (page does not exist)">Foobar</a>
13073 </p><p><a href="/index.php?title=Foobar&action=edit&redlink=1" class="new" title="Foobar (page does not exist)">bar</a>
13078 Templates: Links: 4. Multiple templates generating link href
13080 [[{{echo|F}}{{echo|o}}ob{{echo|ar}}]]
13082 <p><a href="/index.php?title=Foobar&action=edit&redlink=1" class="new" title="Foobar (page does not exist)">Foobar</a>
13087 Templates: Links: 5. Generation of link text
13089 [[Foo|{{echo|bar}}]]
13091 <p><a href="/wiki/Foo" title="Foo">bar</a>
13096 Templates: Links: 5. Nested templates (only outermost template should be marked)
13098 {{echo|[[{{echo|Foo}}|bar]]}}
13100 <p><a href="/wiki/Foo" title="Foo">bar</a>
13105 Templates: HTML Tag: 1. Generation of HTML attr. key
13107 <div {{echo|style}}="color:red;">foo</div>
13109 <div style="color:red;">foo</div>
13114 Templates: HTML Tag: 2. Generation of HTML attr. value
13116 <div style={{echo|'color:red;'}}>foo</div>
13118 <div style="color:red;">foo</div>
13123 Templates: HTML Tag: 3. Generation of HTML attr key and value
13125 <div {{echo|style}}={{echo|'color:red;'}}>foo</div>
13127 <div style="color:red;">foo</div>
13132 Templates: HTML Tag: 4. Generation of starting piece of HTML attr value
13134 <div title="{{echo|This is a long title}} with just one piece templated">foo</div>
13136 <div title="This is a long title with just one piece templated">foo</div>
13141 Templates: HTML Tag: 5. Generation of middle piece of HTML attr value
13143 <div title="This is a long title with just {{echo|one piece}} templated">foo</div>
13145 <div title="This is a long title with just one piece templated">foo</div>
13150 Templates: HTML Tag: 6. Generation of end piece of HTML attr value
13152 <div title="This is a long title with just one piece {{echo|templated}}">foo</div>
13154 <div title="This is a long title with just one piece templated">foo</div>
13158 # SSS FIXME: While it is great we added support for all this,
13159 # do we want to make this part of the spec? Maybe we want to
13160 # deprecate this kind of usage in the future?
13162 Templates: HTML Tag: 7. Generation of partial attribute key string
13164 <div st{{echo|yle}}="color:red;">foo</div>
13166 <div style="color:red;">foo</div>
13171 Templates: HTML Tag: 8. Template-generated attribute (k=v)
13173 <div {{echo|1=id="v1"}}>bar</div>
13175 <div id="v1">bar</div>
13180 Templates: HTML Tag: 9. Multiple template-generated attributes
13182 <div {{echo|1=id="v1" title="foo"}}>bar</div>
13184 <div id="v1" title="foo">bar</div>
13189 Templates: Support for templates generating attributes and content
13191 {| {{mixed_attr_content_template}}
13196 <table style="color:red;" title="T48811">
13206 <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|}"]}'>
13215 Template:attribute_from_template
13221 Table cell with attribute before expanded attribute
13224 | align="center" {{attribute_from_template}} |456
13228 <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>
13233 1. Entities and nowikis inside templated attributes should be handled correctly
13235 <div {{echo|style{{=}}"background:#f9f9f9;"}}>foo</div>
13237 <div style="background:#f9f9f9;">foo</div>
13240 <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>
13244 2. Entities and nowikis inside templated attributes should be handled correctly
13247 |{{table_attribs_3}}
13252 <td style="background:#f9f9f9;">Foo
13257 <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>
13262 3. Entities and nowikis inside templated attributes should be handled correctly inside templated tables
13265 |{{table_attribs_3}}
13270 <td style="background:#f9f9f9;">Foo
13274 <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}}]}'>
13275 <tbody><tr><td style="background:#f9f9f9;">Foo</td></tr>
13281 4. Entities and nowikis inside templated attributes should be handled correctly inside templated tables
13284 |{{table_attribs_6}} hi
13289 <td style="background: red;">hi
13294 <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>
13299 Templates: HTML Tables: 1. Generating start of a HTML table
13301 {{echo|<table><tr><td>foo</td>}}</tr></table>
13303 <table><tr><td>foo</td></tr></table>
13308 Templates: HTML Tables: 2a. Generating middle of a HTML table
13310 <table><tr>{{echo|<td>foo</td>}}</tr></table>
13312 <table><tr><td>foo</td></tr></table>
13317 Templates: HTML Tables: 2b. Generating middle of a HTML table
13319 <table>{{echo|<tr><td>foo</td></tr>}}</table>
13321 <table><tr><td>foo</td></tr></table>
13326 Templates: HTML Tables: 3. Generating end of a HTML table
13328 <table><tr>{{echo|<td>foo</td></tr></table>}}
13330 <table><tr><td>foo</td></tr></table>
13335 Templates: HTML Tables: 4a. Generating a single tag of a HTML table
13337 {{echo|<table>}}<tr><td>foo</td></tr></table>
13339 <table><tr><td>foo</td></tr></table>
13344 Templates: HTML Tables: 4b. Generating a single tag of a HTML table
13346 <table>{{echo|<tr>}}<td>foo</td></tr></table>
13348 <table><tr><td>foo</td></tr></table>
13353 Templates: HTML Tables: 4c. Generating a single tag of a HTML table
13355 <table><tr>{{echo|<td>}}foo</td></tr></table>
13357 <table><tr><td>foo</td></tr></table>
13362 Templates: HTML Tables: 4d. Generating a single tag of a HTML table
13364 <table><tr><td>foo{{echo|</td>}}</tr></table>
13366 <table><tr><td>foo</td></tr></table>
13371 Templates: HTML Tables: 4e. Generating a single tag of a HTML table
13373 <table><tr><td>foo</td>{{echo|</tr>}}</table>
13375 <table><tr><td>foo</td></tr></table>
13380 Templates: HTML Tables: 4f. Generating a single tag of a HTML table
13382 <table><tr><td>foo</td></tr>{{echo|</table>}}
13384 <table><tr><td>foo</td></tr></table>
13389 Templates: HTML Tables: 5. Proper fostering of categories from inside
13391 parsoid=wt2html,wt2wt
13393 <table>[[Category:foo1]]<tr><td>foo</td></tr></table>
13394 <!--Two categories (T52330)-->
13395 <table>[[Category:bar1]][[Category:bar2]]<tr><td>foo</td></tr></table>
13397 <link rel="mw:PageProp/Category" href="./Category:Foo1"><table><tbody><tr><td>foo</td></tr></tbody></table>
13398 <!--Two categories (T52330)-->
13399 <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>
13402 ## Remex doesn't account for fostered content.
13404 Templates: Wiki Tables: 1a. Fostering of entire template content
13412 <tr><td></td></tr></table>
13417 <table><tbody><tr><td></td></tr></tbody></table>
13419 <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">
13425 Templates: Wiki Tables: 1b. Fostering of entire template content
13438 <tr><td></td></tr></table>
13446 <tbody><tr><td></td></tr></tbody></table>
13448 <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|}"]}'>
13450 </div><table about="#mwt3">
13455 ## Remex doesn't account for fostered content.
13457 Templates: Wiki Tables: 2. Fostering of partial template content
13467 <tr><td></td></tr></table>
13472 <div>b</div><table>
13473 <tbody><tr><td></td></tr></tbody></table>
13475 <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">
13482 Templates: Wiki Tables: 3. td-content via multiple templates
13485 {{echo|{{pipe}}a}}{{echo|b}}
13496 Templates: Wiki Tables: 4. Templated tags, no content
13502 <tr><td></td></tr></table>
13507 Templates: Wiki Tables: 5. Templated tags, regular td-tags
13521 Templates: Wiki Tables: 6. Templated tags, templated td-tags
13534 ## This test case is very specific to Parsoid's internals
13535 ## and is hence only tested for Parsoid's code. Parsoid uses
13536 ## a <meta> marker tag for <ref> tags and they are expanded
13537 ## much later. We are verifying that this <meta> tag usage
13538 ## doesn't prevent foster parenting.
13540 Templates: Wiki Tables: 7. Fosterable <ref>s should get fostered
13542 {{PartialTable}}<ref>foo</ref>
13547 <p about="#mwt2" typeof="mw:Transclusion" data-mw='{"parts":[{"template":{"target":{"wt":"PartialTable","href":"./Template:PartialTable"},"params":{},"i":0}},"<ref>foo</ref>\n|}"]}'><sup about="#mwt3" class="mw-ref" id="cite_ref-1" rel="dc:references" typeof="mw:Extension/ref" data-mw='{"name":"ref","attrs":{},"body":{"id":"mw-reference-text-cite_note-1"}}'><a href="./Main_Page#cite_note-1" style="counter-reset: mw-Ref 1;"><span class="mw-reflink-text">[1]</span></a></sup></p><table about="#mwt2">
13551 <ol class="mw-references references" typeof="mw:Extension/references" about="#mwt5" data-mw='{"name":"references","attrs":{}}'><li about="#cite_note-1" id="cite_note-1"><a href="./Main_Page#cite_ref-1" rel="mw:referencedBy"><span class="mw-linkback-text">↑ </span></a> <span id="mw-reference-text-cite_note-1" class="mw-reference-text">foo</span></li></ol>
13555 Templates: Wiki Tables: 8. Fosterable meta-tags should get fostered
13565 <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{{!}}}"]}'>
13566 </span><meta typeof="mw:Includes/OnlyInclude" about="#mwt1"/><table about="#mwt1">
13570 <meta typeof="mw:Includes/OnlyInclude/End"/></td></tr>
13575 Templates: Lists: Multi-line list-items via templates
13577 *{{echo|a {{nonexistent|
13579 *{{echo|b {{nonexistent|
13582 <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>
13583 <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>
13588 Templates: Ugly nesting: 1. Quotes opened/closed across templates (echo)
13590 {{echo|''a}}{{echo|b''c''d}}{{echo|''e}}
13592 <p><i>ab</i>c<i>d</i>e
13597 Templates: Ugly nesting: 2. Quotes opened/closed across templates (echo_with_span)
13598 (PHP parser generates misnested html)
13600 {{echo_with_span|''a}}{{echo_with_span|b''c''d}}{{echo_with_span|''e}}
13602 <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>
13606 Templates: Ugly nesting: 3. Quotes opened/closed across templates (echo_with_div)
13607 (PHP parser generates misnested html; Parsoid html2wt mode adds newlines between {{echo}}s)
13609 parsoid=wt2html,wt2wt
13611 {{echo_with_div|''a}}{{echo_with_div|b''c''d}}{{echo_with_div|''e}}
13613 <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>
13614 <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>
13615 <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>
13619 Templates: Ugly nesting: 4. Divs opened/closed across templates
13621 a<div>b{{echo|c</div>d}}e
13626 <p>a</p><div>bc</div><p>de
13631 Templates: Ugly templates: 3. newline-only template parameter
13640 # This looks like a bug: a single newline triggers p/br for some reason.
13642 Templates: Ugly templates: 4. newline-only template parameter inconsistency
13651 # T66017 -- ugly wikitext with fostered content generates two template ranges that
13652 # have a true overlap (T1-start - T2-start - T1-end - T2-end).
13654 Templates: Ugly templates: 5. Template encapsulation test: Non-trivial overlap of template ranges is properly handled
13660 <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">
13661 </span><table about="#mwt1">
13665 # T66017 -- ugly wikitext with fostered content generates two template ranges
13666 # that are "identical" and generate nesting cycles in the algorithm
13668 Templates: Ugly templates: 6. Template encapsulation test: Cyclical nesting of template ranges is properly handled
13670 {{echo|<table><tr><td><table>}}
13674 <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"}'>
13675 </div><table about="#mwt1" data-parsoid='{"stx":"html"}'>
13676 </table></td></tr></tbody></table>
13680 Templates: Parameters substituted at the top-level
13682 {{{foo|''who'' {{echo|me}}? '''never!'''}}}
13686 <p><i>who</i> me? <b>never!</b>
13690 <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>
13692 <p about="#mwt3" typeof="mw:Param" data-mw='{"parts":[{"templatearg":{"target":{"wt":"foo"},"params":{"1":{"wt":"bar"},"2":{"wt":"baz"}},"i":0}}]}'>bar</p>
13696 Templates: Param with empty arg in the final position
13700 <span about="#mwt1" typeof="mw:Param" data-mw='{"parts":[{"templatearg":{"target":{"wt":"hi"},"params":{"1":{"wt":""}},"i":0}}]}'></span>
13704 Parser Functions: 1. Simple example
13713 Parser Functions: 2. Nested use (only outermost should be marked up)
13721 ## Note that the templates inside the references are not wrapped
13723 Template nested in extension tag in template
13727 {{echo|hi<ref>[[ho|{{echo|hi}}]]</ref>}}
13728 {{echo|hi<ref>[http://test.com?q={{echo|ho}}]</ref>}}
13729 {{echo|hi<ref>-{ho|{{echo|hi}}}-</ref>}}
13732 <p><span about="#mwt2" typeof="mw:Transclusion" data-mw='{"parts":[{"template":{"target":{"wt":"echo","href":"./Template:Echo"},"params":{"1":{"wt":"hi<ref>[[ho|{{echo|hi}}]]</ref>"}},"i":0}}]}'>hi</span><sup about="#mwt2" class="mw-ref" id="cite_ref-1" rel="dc:references" typeof="mw:Extension/ref" data-mw='{"name":"ref","attrs":{},"body":{"id":"mw-reference-text-cite_note-1"}}'><a href="./Wikipedia:首页#cite_note-1" style="counter-reset: mw-Ref 1;"><span class="mw-reflink-text">[1]</span></a></sup>
13733 <span about="#mwt8" typeof="mw:Transclusion" data-mw='{"parts":[{"template":{"target":{"wt":"echo","href":"./Template:Echo"},"params":{"1":{"wt":"hi<ref>[http://test.com?q={{echo|ho}}]</ref>"}},"i":0}}]}'>hi</span><sup about="#mwt8" class="mw-ref" id="cite_ref-2" rel="dc:references" typeof="mw:Extension/ref" data-mw='{"name":"ref","attrs":{},"body":{"id":"mw-reference-text-cite_note-2"}}'><a href="./Wikipedia:首页#cite_note-2" style="counter-reset: mw-Ref 2;"><span class="mw-reflink-text">[2]</span></a></sup>
13734 <span about="#mwt13" typeof="mw:Transclusion" data-mw='{"parts":[{"template":{"target":{"wt":"echo","href":"./Template:Echo"},"params":{"1":{"wt":"hi<ref>-{ho|{{echo|hi}}}-</ref>"}},"i":0}}]}'>hi</span><sup about="#mwt13" class="mw-ref" id="cite_ref-3" rel="dc:references" typeof="mw:Extension/ref" data-mw='{"name":"ref","attrs":{},"body":{"id":"mw-reference-text-cite_note-3"}}'><a href="./Wikipedia:首页#cite_note-3" style="counter-reset: mw-Ref 3;"><span class="mw-reflink-text">[3]</span></a></sup></p>
13735 <ol class="mw-references references" typeof="mw:Extension/references" about="#mwt17" data-mw='{"name":"references","attrs":{}}'><li about="#cite_note-1" id="cite_note-1"><a href="./Wikipedia:首页#cite_ref-1" rel="mw:referencedBy"><span class="mw-linkback-text">↑ </span></a> <span id="mw-reference-text-cite_note-1" class="mw-reference-text"><a rel="mw:WikiLink" href="./Ho" title="Ho">hi</a></span></li><li about="#cite_note-2" id="cite_note-2"><a href="./Wikipedia:首页#cite_ref-2" rel="mw:referencedBy"><span class="mw-linkback-text">↑ </span></a> <span id="mw-reference-text-cite_note-2" class="mw-reference-text"><a rel="mw:ExtLink" class="external autonumber" href="http://test.com?q=ho"></a></span></li><li about="#cite_note-3" id="cite_note-3"><a href="./Wikipedia:首页#cite_ref-3" rel="mw:referencedBy"><span class="mw-linkback-text">↑ </span></a> <span id="mw-reference-text-cite_note-3" class="mw-reference-text"><span typeof="mw:LanguageVariant" data-mw-variant='{"filter":{"l":["ho"],"t":"hi"}}'></span></span></li></ol>
13739 ### Pre-save transform tests
13743 pre-save transform: subst:
13749 This is a test template
13753 pre-save transform: normal template
13763 pre-save transform: nonexistent template
13767 {{thistemplatedoesnotexist}}
13769 {{thistemplatedoesnotexist}}
13773 pre-save transform: subst magic variables
13782 # This is T2089, which I fixed. -- wtm
13784 pre-save transform: subst: templates with parameters
13788 {{subst:paramtest|param="something else"}}
13790 This is a test template with parameter "something else"
13794 Template:nowikitest
13796 <nowiki>'''not wiki'''</nowiki>
13800 pre-save transform: nowiki in subst (T3188)
13804 {{subst:nowikitest}}
13806 <nowiki>'''not wiki'''</nowiki>
13810 Template:commenttest
13812 This template has <!-- a comment --> in it.
13816 pre-save transform: comment in subst (T3936)
13820 {{subst:commenttest}}
13822 This template has <!-- a comment --> in it.
13826 pre-save transform: unclosed tag
13830 <nowiki>'''not wiki'''
13832 <nowiki>'''not wiki'''
13836 pre-save transform: mixed tag case
13840 <NOwiki>'''not wiki'''</noWIKI>
13842 <NOwiki>'''not wiki'''</noWIKI>
13846 pre-save transform: unclosed comment in <nowiki>
13850 wiki<nowiki>nowiki<!--nowiki</nowiki>wiki
13852 wiki<nowiki>nowiki<!--nowiki</nowiki>wiki
13855 # Leading @ in this template definition works around a limitation
13856 # in parsoid's parserTests which otherwise strips the <span> from the
13857 # result (confusing it for a template wrapper)
13861 @<span onmouseover="alert('crap')">Oh no</span>
13865 (confirming safety of fix for subst T3936)
13867 {{Template:dangerous}}
13869 <p>@<span>Oh no</span>
13874 pre-save transform: comment containing gallery (T7024)
13878 <!-- <gallery>data</gallery> -->
13880 <!-- <gallery>data</gallery> -->
13884 pre-save transform: comment containing extension
13888 <!-- <tag>data</tag> -->
13890 <!-- <tag>data</tag> -->
13894 pre-save transform: comment containing nowiki
13898 <!-- <nowiki>data</nowiki> -->
13900 <!-- <nowiki>data</nowiki> -->
13904 pre-save transform: <noinclude> in subst (T5298)
13914 pre-save transform: <onlyinclude> in subst (T5298)
13918 {{subst:Includes2}}
13926 {{<includeonly>subst:</includeonly>Includes}}
13930 Template:SafeSubstTest
13932 {{<includeonly>safesubst:</includeonly>Includes}}
13936 T24297: safesubst: works during PST
13940 {{subst:SafeSubstTest}}{{safesubst:SubstTest}}
13946 T24297: safesubst: works during normal parse
13955 subst: does not work during normal parse
13959 <p>{{subst:Includes}}
13964 pre-save transform: context links ("pipe trick")
13968 [[Article (context)|]]
13971 [[Bar:Article (context)|]]
13972 [[:Bar:Article (context)|]]
13974 [[|Article (context)]]
13978 [[Article (context)|Article]]
13979 [[Bar:Article|Article]]
13980 [[:Bar:Article|Article]]
13981 [[Bar:Article (context)|Article]]
13982 [[:Bar:Article (context)|Article]]
13984 [[Article (context)]]
13985 [[Bar:X (Y) Z|X (Y) Z]]
13986 [[:Bar:X (Y) Z|X (Y) Z]]
13990 pre-save transform: context links ("pipe trick") with interwiki prefix
13994 [[interwiki:Article|]]
13995 [[:interwiki:Article|]]
13996 [[interwiki:Bar:Article|]]
13997 [[:interwiki:Bar:Article|]]
13999 [[interwiki:Article|Article]]
14000 [[:interwiki:Article|Article]]
14001 [[interwiki:Bar:Article|Bar:Article]]
14002 [[:interwiki:Bar:Article|Bar:Article]]
14006 pre-save transform: context links ("pipe trick") with parens in title
14008 pst title=[[Somearticle (context)]]
14012 [[Article (context)|Article]]
14016 pre-save transform: context links ("pipe trick") with comma in title
14018 pst title=[[Someplace, Somewhere]]
14021 [[Otherplace, Elsewhere|]]
14022 [[Otherplace, Elsewhere, Anywhere|]]
14024 [[Otherplace, Somewhere|Otherplace]]
14025 [[Otherplace, Elsewhere|Otherplace]]
14026 [[Otherplace, Elsewhere, Anywhere|Otherplace]]
14030 pre-save transform: context links ("pipe trick") with parens and comma
14032 pst title=[[Someplace (IGNORED), Somewhere]]
14035 [[Otherplace (place), Elsewhere|]]
14037 [[Otherplace, Somewhere|Otherplace]]
14038 [[Otherplace (place), Elsewhere|Otherplace]]
14042 pre-save transform: context links ("pipe trick") with comma and parens
14044 pst title=[[Who, me? (context)]]
14047 [[Me, Myself, and I (1937 song)|]]
14049 [[Yes, you. (context)|Yes, you.]]
14050 [[Me, Myself, and I (1937 song)|Me, Myself, and I]]
14054 pre-save transform: context links ("pipe trick") with namespace
14056 pst title=[[Ns:Somearticle]]
14060 [[Ns:Article|Article]]
14064 pre-save transform: context links ("pipe trick") with namespace and parens
14066 pst title=[[Ns:Somearticle (context)]]
14070 [[Ns:Article (context)|Article]]
14074 pre-save transform: context links ("pipe trick") with namespace and comma
14076 pst title=[[Ns:Somearticle, Context, Whatever]]
14080 [[Ns:Article, Context, Whatever|Article]]
14084 pre-save transform: context links ("pipe trick") with namespace, comma and parens
14086 pst title=[[Ns:Somearticle, Context (context)]]
14090 [[Ns:Article (context)|Article]]
14094 pre-save transform: context links ("pipe trick") with namespace, parens and comma
14096 pst title=[[Ns:Somearticle (IGNORED), Context]]
14100 [[Ns:Article, Context|Article]]
14104 pre-save transform: context links ("pipe trick") with full-width parens and no space (Japanese and Chinese style, T32149)
14108 [[Article(context)|]]
14109 [[Bar:Article(context)|]]
14110 [[:Bar:Article(context)|]]
14111 [[|Article(context)]]
14115 [[Article(context)|Article]]
14116 [[Bar:Article(context)|Article]]
14117 [[:Bar:Article(context)|Article]]
14118 [[Article(context)]]
14119 [[Bar:X(Y)Z|X(Y)Z]]
14120 [[:Bar:X(Y)Z|X(Y)Z]]
14124 pre-save transform: context links ("pipe trick") with full-width parens and space (Japanese and Chinese style, T32149)
14128 [[Article (context)|]]
14129 [[Bar:Article (context)|]]
14130 [[:Bar:Article (context)|]]
14131 [[|Article (context)]]
14135 [[Article (context)|Article]]
14136 [[Bar:Article (context)|Article]]
14137 [[:Bar:Article (context)|Article]]
14138 [[Article (context)]]
14139 [[Bar:X (Y) Z|X (Y) Z]]
14140 [[:Bar:X (Y) Z|X (Y) Z]]
14144 pre-save transform: context links ("pipe trick") with parens and no space (Korean style, T32149)
14148 [[Article(context)|]]
14149 [[Bar:Article(context)|]]
14150 [[:Bar:Article(context)|]]
14151 [[|Article(context)]]
14155 [[Article(context)|Article]]
14156 [[Bar:Article(context)|Article]]
14157 [[:Bar:Article(context)|Article]]
14158 [[Article(context)]]
14159 [[Bar:X(Y)Z|X(Y)Z]]
14160 [[:Bar:X(Y)Z|X(Y)Z]]
14164 pre-save transform: context links ("pipe trick") with commas (T23660)
14168 [[Article (context), context|]]
14169 [[Article (context),context|]]
14170 [[Bar:Article (context), context|]]
14171 [[Bar:Article (context),context|]]
14172 [[:Bar:Article (context), context|]]
14173 [[:Bar:Article (context),context|]]
14175 [[Article (context), context|Article]]
14176 [[Article (context),context|Article]]
14177 [[Bar:Article (context), context|Article]]
14178 [[Bar:Article (context),context|Article]]
14179 [[:Bar:Article (context), context|Article]]
14180 [[:Bar:Article (context),context|Article]]
14184 Parsoid: backwards pipe trick
14191 <p>[[|<b>bar</b>]]</p>
14195 pre-save transform: trim trailing empty lines
14199 Empty lines are trimmed
14205 Empty lines are trimmed
14209 pre-save transform: Signature expansion
14216 * <noinclude>~~~</noinclude>
14217 * <includeonly>~~~</includeonly>
14218 * <onlyinclude>~~~</onlyinclude>
14220 * [[Special:Contributions/127.0.0.1|127.0.0.1]]
14221 * [[Special:Contributions/127.0.0.1|127.0.0.1]] 00:02, 1 January 1970 (UTC)
14222 * 00:02, 1 January 1970 (UTC)
14223 * <noinclude>[[Special:Contributions/127.0.0.1|127.0.0.1]]</noinclude>
14224 * <includeonly>[[Special:Contributions/127.0.0.1|127.0.0.1]]</includeonly>
14225 * <onlyinclude>[[Special:Contributions/127.0.0.1|127.0.0.1]]</onlyinclude>
14230 ParserOutput flags from signature expansion (T84843)
14237 [[Special:Contributions/127.0.0.1|127.0.0.1]] 00:02, 1 January 1970 (UTC)
14238 flags=user-signature
14243 pre-save transform: Signature expansion in nowiki tags (T2093)
14249 <nowiki>~~~~</nowiki>
14251 <includeonly><nowiki>~~~~</nowiki></includeonly>
14253 <noinclude><nowiki>~~~~</nowiki></noinclude>
14255 <onlyinclude><nowiki>~~~~</nowiki></onlyinclude>
14257 {{subst:Foo}} shall be converted to FOO
14259 As well as inside noinclude/onlyinclude
14260 <noinclude>{{subst:Foo}}</noinclude>
14261 <onlyinclude>{{subst:Foo}}</onlyinclude>
14263 But not inside includeonly
14264 <includeonly>{{subst:Foo}}</includeonly>
14268 <nowiki>~~~~</nowiki>
14270 <includeonly><nowiki>~~~~</nowiki></includeonly>
14272 <noinclude><nowiki>~~~~</nowiki></noinclude>
14274 <onlyinclude><nowiki>~~~~</nowiki></onlyinclude>
14276 FOO shall be converted to FOO
14278 As well as inside noinclude/onlyinclude
14279 <noinclude>FOO</noinclude>
14280 <onlyinclude>FOO</onlyinclude>
14282 But not inside includeonly
14283 <includeonly>{{subst:Foo}}</includeonly>
14287 Parsoid: Recognize nowiki with trailing space in tags
14291 <nowiki ><div>[[foo]]</nowiki >
14299 <p><div>[[foo]]
14300 </p><p>a<nowiki / >b
14302 </p><p>e<nowiki/ >f
14305 <p><span typeof="mw:Nowiki"><div>[[foo]]</span></p>
14307 <p>a<nowiki / >b</p>
14309 <p>c<span typeof="mw:Nowiki"></span>d</p>
14311 <p>e<nowiki/ >f</p>
14315 Parsoid: Recognize nowiki with odd capitalization
14319 <noWikI ><div>[[foo]]</Nowiki >
14321 <p><span typeof="mw:Nowiki"><div>[[foo]]</span></p>
14326 Parsoid: Escape nowiki with trailing space in tags
14330 <p><nowiki > foo </nowiki ></p>
14331 <p>a<nowiki />b</p>
14332 <p>c<nowiki/ >d</p>
14334 <nowiki > foo </nowiki >
14342 Parsoid: Escape weird noWikI capitalizations
14346 <p><noWikI > foo </NoWikI ></p>
14348 <noWikI > foo </NoWikI >
14352 ### Message transform tests
14355 message transform: magic variables
14365 message transform: should not transform wiki markup
14375 message transform: <noinclude> in transcluded template (T6926)
14385 message transform: <onlyinclude> in transcluded template (T6926)
14395 {{#special:}} page name, known
14399 {{#special:Recentchanges}}
14401 Special:RecentChanges
14405 {{#special:}} page name with subpage, known
14409 {{#special:Recentchanges/param}}
14411 Special:RecentChanges/param
14415 {{#special:}} page name, unknown
14419 {{#special:foobar nonexistent}}
14421 Special:Foobar nonexistent
14425 {{#speciale:}} page name, known
14429 {{#speciale:Recentchanges}}
14431 Special:RecentChanges
14435 {{#speciale:}} page name with subpage, known
14439 {{#speciale:Recentchanges/param}}
14441 Special:RecentChanges/param
14445 {{#speciale:}} page name, unknown
14449 {{#speciale:foobar nonexistent}}
14451 Special:Foobar_nonexistent
14457 ### For Parsoid-specific tests, see
14458 #### https://www.mediawiki.org/wiki/Parsoid/MediaWiki_DOM_spec#Images
14463 parsoid=wt2html,wt2wt,html2html
14465 [[Image:foobar.jpg]]
14467 <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>
14470 <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>
14474 Serialize simple image with span wrapper
14478 <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>
14480 [[File:Foobar.jpg]]
14484 Simple image (using File: namespace, now canonical)
14486 [[File:Foobar.jpg]]
14488 <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>
14491 <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>
14495 Right-aligned image
14497 [[File:Foobar.jpg|right]]
14499 <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>
14502 <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>
14508 [[File:Foobar.jpg|right|Caption text]]
14510 <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>
14513 <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>
14517 Image with caption, T55312 #1
14519 [[File:Foobar.jpg|right|Caption page stuff]]
14521 <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>
14524 <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>
14528 Image with caption, T55312 #2
14530 [[File:Foobar.jpg|right|Caption page=]]
14532 <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>
14535 <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>
14539 Image with caption, T55312 #3
14541 [[File:Foobar.jpg|right|Caption page=stuff]]
14543 <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>
14546 <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>
14550 Image caption with pipe entity
14552 [[File:Foobar.jpg|thumb|one | two]]
14553 [[File:Foobar.jpg|thumb|one ''two'' | three]]
14555 <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>
14556 <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>
14559 <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>
14560 <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>
14564 Allow empty links in image captions (T62753)
14568 [[File:Foobar.jpg|thumb|Caption [[Link1]]
14573 <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>
14576 <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>
14578 <a rel="mw:WikiLink" href="./Link2" title="Link2" data-parsoid='{"stx":"simple","a":{"href":"./Link2"},"sa":{"href":"Link2"}}'>Link2</a>
14579 </figcaption></figure>
14583 Titles in unlinked images (T23454)
14585 [[File:Foobar.jpg|link=|stuff]]
14587 <p><img alt="stuff" src="http://example.com/images/3/3a/Foobar.jpg" title="stuff" width="1941" height="220" />
14590 <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>
14594 Link with empty target
14603 Image with link trail
14605 Linktrails should not work for images: [[File:Foobar.jpg]]s
14607 <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
14610 <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>
14614 Image with empty attribute
14616 parsoid=wt2html,wt2wt,html2html
14618 [[File:Foobar.jpg|right||Caption text]]
14620 <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>
14623 <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>
14627 1. Block image with individual attributes from templates
14629 [[File:Foobar.jpg|thumb|{{echo|137px}}|This is a caption]]
14631 <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>
14634 <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>
14638 2. Block Image with individual attributes from templates
14640 [[File:Foobar.jpg|{{echo|thumb}}|{{echo|137px}}|This is a caption]]
14642 <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>
14645 <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>
14649 3. Inline image with individual attributes from templates
14651 [[File:Foobar.jpg|{{echo|50px}}]]
14653 <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>
14656 <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>
14659 ## Parsoid does not provide editing support for images where templates produce multiple image attributes.
14660 ## To signal this, we add a 'mw:Placeholder' type to such images. This could change in the future.
14662 Image with multiple attributes from the same template
14664 [[File:Foobar.jpg|{{image_attribs}}]]
14666 <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>
14669 <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>
14673 Image with link tails
14677 123[[File:Foobar.jpg]]456
14678 123[[File:Foobar.jpg|right]]456
14679 123[[File:Foobar.jpg|thumb]]456
14681 <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
14683 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
14684 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
14687 <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
14689 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
14690 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
14693 <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>
14694 <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
14695 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>
14699 Image with multiple captions -- only last one is accepted
14701 [[File:Foobar.jpg|right|Caption1 - ignored|[[Caption2]] - ignored|Caption3 - accepted]]
14703 <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>
14706 <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>
14710 Image with multiple widths -- use last
14712 [[File:Foobar.jpg|200px|300px|caption]]
14714 <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>
14717 <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>
14721 Image with multiple alignments -- use first (T50664)
14725 [[File:Foobar.jpg|thumb|left|right|center|caption]]
14727 [[File:Foobar.jpg|middle|text-top|caption]]
14729 <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>
14730 <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>
14733 <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>
14734 <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>
14738 Image with width attribute at different positions
14740 [[File:Foobar.jpg|200px|right|Caption]]
14741 [[File:Foobar.jpg|right|200px|Caption]]
14742 [[File:Foobar.jpg|right|Caption|200px]]
14744 <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>
14745 <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>
14746 <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>
14749 <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>
14750 <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>
14751 <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>
14754 # a sad bit of backward-compatibility
14756 Image with size specified with pxpx (T15500, T53628)
14758 parsoid=wt2html,wt2wt,html2html
14760 [[File:Foobar.jpg|20pxpx]]
14761 [[File:Foobar.jpg|200x20pxpx]]
14763 <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>
14764 <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>
14767 <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>
14771 Image with link parameter, wiki target
14773 [[File:Foobar.jpg|link=Main Page]]
14775 <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>
14778 <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>
14781 # parsoid T51293 (part 1)
14783 Image with link parameter, URL target
14785 [[File:Foobar.jpg|link=http://example.com/]]
14787 <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>
14790 <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>
14793 # parsoid T51293 (part 2)
14795 Image with link parameter, protocol-less URL target
14797 [[File:Foobar.jpg|link=//example.com/]]
14799 <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>
14802 <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>
14806 Escaping non-block captions (T107435)
14809 "modes": ["wt2wt"],
14811 ["[typeof~='mw:Image']", "attr", "data-mw", "{\"caption\": \"|\"}"]
14815 [[Image:Foobar.jpg|caption]]
14817 [[Image:Foobar.jpg|<nowiki>|</nowiki>]]
14820 # wgExternalLinkTarget not supported by Parsoid
14822 Image with link parameter, wgExternalLinkTarget
14824 [[Image:foobar.jpg|link=http://example.com/]]
14826 wgExternalLinkTarget='foobar'
14828 <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>
14833 Image with link parameter, wgNoFollowLinks set to false
14835 [[Image:foobar.jpg|link=http://example.com/]]
14837 wgNoFollowLinks=false
14839 <p><a href="http://example.com/"><img alt="Foobar.jpg" src="http://example.com/images/3/3a/Foobar.jpg" width="1941" height="220" /></a>
14844 Image with link parameter, wgNoFollowDomainExceptions
14846 [[Image:foobar.jpg|link=http://example.com/]]
14848 wgNoFollowDomainExceptions='example.com'
14850 <p><a href="http://example.com/"><img alt="Foobar.jpg" src="http://example.com/images/3/3a/Foobar.jpg" width="1941" height="220" /></a>
14854 # wgExternalLinkTarget not supported by Parsoid
14856 Image with link parameter, wgExternalLinkTarget, unnamed parameter
14858 [[Image:foobar.jpg|link=http://example.com/|Title]]
14860 wgExternalLinkTarget='foobar'
14862 <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>
14867 Image with empty link parameter
14869 [[File:Foobar.jpg|link=]]
14871 <p><img alt="Foobar.jpg" src="http://example.com/images/3/3a/Foobar.jpg" width="1941" height="220" />
14874 <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>
14878 Image with link parameter (wiki target) and unnamed parameter
14880 [[File:Foobar.jpg|link=Main_Page|Title]]
14882 <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>
14885 <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>
14889 Image with link parameter (URL target) and unnamed parameter
14891 [[File:Foobar.jpg|link=http://example.com/|Title]]
14893 <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>
14896 <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>
14900 Thumbnail image with link parameter
14903 parsoid=wt2html,wt2wt,html2html
14905 [[File:Foobar.jpg|thumb|link=http://example.com/|Title]]
14907 <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>
14910 <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>
14914 Manually-specified thumbnail image
14918 [[File:Foobar.jpg|thumbnail=Thumb.png|Title]]
14920 <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>
14923 <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>
14927 Manually-specified thumbnail image with explicit link to wiki page
14930 parsoid=wt2html,wt2wt,html2html
14932 [[File:Foobar.jpg|thumb=Thumb.png|link=Main_Page|Title]]
14934 <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>
14937 <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>
14941 Manually-specified thumbnail image with explicit link to url
14944 parsoid=wt2html,wt2wt,html2html
14946 [[File:Foobar.jpg|thumb=Thumb.png|link=http://example.com|Title]]
14948 <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>
14951 <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>
14955 Manually-specified thumbnail image with explicit no link
14958 parsoid=wt2html,wt2wt,html2html
14960 [[File:Foobar.jpg|thumb=Thumb.png|link=|Title]]
14962 <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>
14965 <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>
14969 Manually-specified thumbnail image with explicit link and alt text
14972 parsoid=wt2html,wt2wt,html2html
14974 [[File:Foobar.jpg|thumb=Thumb.png|link=Main_Page|alt=alttext|Title]]
14976 <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>
14979 <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>
14983 Image with frame and link
14985 parsoid=wt2html,wt2wt,html2html
14987 [[File:Foobar.jpg|frame|left|This is a test image [[Main Page]]]]
14989 <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>
14992 <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>
14996 Image with frame and link and explicit alt
14998 parsoid=wt2html,wt2wt,html2html
15000 [[Image:Foobar.jpg|frame|left|This is a test image [[Main Page]]|alt=Altitude]]
15002 <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>
15005 <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>
15009 Image with wiki markup in implicit alt
15011 [[Image:Foobar.jpg|testing '''bold''' in alt]]
15013 [[Image:Foobar.jpg|alt=testing '''bold''' in alt]]
15015 <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>
15016 </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>
15019 <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>
15021 <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>
15025 Alt image option should handle most kinds of wikitext without barfing
15027 [[Image:Foobar.jpg|thumb|This is the image caption|alt=This is a [[link]] and a {{echo|''bold template''}}.]]
15029 <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>
15032 <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>
15036 Ampersand in alt attribute (T206940)
15038 [[File:Foobar.jpg|alt=&amp;]]
15040 <!-- consistency with gallery extension -->
15042 File:Foobar.jpg|alt=&amp;
15045 <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>
15047 <ul class="gallery mw-gallery-traditional">
15048 <li class="gallerybox" style="width: 155px"><div style="width: 155px">
15049 <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>
15050 <div class="gallerytext">
15055 <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>
15057 <!-- consistency with gallery extension -->
15058 <ul class="gallery mw-gallery-traditional" typeof="mw:Extension/gallery" data-mw='{"name":"gallery","attrs":{},"body":{}}'>
15059 <li class="gallerybox">
15060 <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>
15061 <div class="gallerytext"></div>
15067 Italics markup in alt attribute (T206940)
15069 [[File:Foobar.jpg|alt=''x''|caption]]
15071 <!-- consistency with gallery extension -->
15073 File:Foobar.jpg|alt=''x''|caption
15076 <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>
15078 <ul class="gallery mw-gallery-traditional">
15079 <li class="gallerybox" style="width: 155px"><div style="width: 155px">
15080 <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>
15081 <div class="gallerytext">
15088 <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>
15090 <!-- consistency with gallery extension -->
15091 <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"}}'>
15092 <li class="gallerybox">
15093 <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>
15094 <div class="gallerytext">caption</div>
15100 Nowiki markup in alt attribute (T206940)
15102 [[File:Foobar.jpg|alt=<nowiki>''</nowiki>x<nowiki>''</nowiki>|caption]]
15104 <!-- consistency with gallery extension -->
15106 File:Foobar.jpg|alt=<nowiki>''</nowiki>x<nowiki>''</nowiki>|caption
15109 <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>
15111 <ul class="gallery mw-gallery-traditional">
15112 <li class="gallerybox" style="width: 155px"><div style="width: 155px">
15113 <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>
15114 <div class="gallerytext">
15121 <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>
15123 <!-- consistency with gallery extension -->
15124 <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"}}'>
15125 <li class="gallerybox">
15126 <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>
15127 <div class="gallerytext">caption</div>
15133 Nowiki markup in alt attribute (edited html, no data-parsoid) (T206940)
15135 [[File:Foobar.jpg|alt=<nowiki>''x''</nowiki>|caption]]
15137 <!-- consistency with gallery extension -->
15139 File:Foobar.jpg|alt=<nowiki>''x''</nowiki>|caption
15142 <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>
15144 <ul class="gallery mw-gallery-traditional">
15145 <li class="gallerybox" style="width: 155px"><div style="width: 155px">
15146 <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>
15147 <div class="gallerytext">
15154 <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>
15156 <!-- consistency with gallery extension -->
15157 <ul class="gallery mw-gallery-traditional" typeof="mw:Extension/gallery" data-mw='{"name":"gallery","attrs":{},"body":{}}'>
15158 <li class="gallerybox">
15159 <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>
15160 <div class="gallerytext">caption</div>
15166 Ampersand in link attribute (T206940)
15168 [[File:Foobar.jpg|link=Foo & bar]]
15170 <!-- consistency with gallery extension -->
15172 File:Foobar.jpg|link=Foo & bar
15175 <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>
15177 <ul class="gallery mw-gallery-traditional">
15178 <li class="gallerybox" style="width: 155px"><div style="width: 155px">
15179 <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>
15180 <div class="gallerytext">
15185 <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>
15187 <!-- consistency with gallery extension -->
15188 <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"}}'>
15189 <li class="gallerybox">
15190 <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>
15191 <div class="gallerytext"></div>
15197 Ampersand in link attribute (edited html, no data-parsoid) (T206940)
15199 [[File:Foobar.jpg|link=Foo_&_bar]]
15201 <!-- consistency with gallery extension -->
15203 File:Foobar.jpg|link=Foo_&_bar
15206 <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>
15208 <ul class="gallery mw-gallery-traditional">
15209 <li class="gallerybox" style="width: 155px"><div style="width: 155px">
15210 <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>
15211 <div class="gallerytext">
15216 <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>
15218 <!-- consistency with gallery extension -->
15219 <ul class="gallery mw-gallery-traditional" typeof="mw:Extension/gallery" data-mw='{"name":"gallery","attrs":{},"body":{}}'>
15220 <li class="gallerybox">
15221 <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>
15222 <div class="gallerytext"></div>
15228 Italics markup in link attribute (T206940)
15232 <!-- Note that "italics" are stripped, even though this is a valid page title -->
15233 [[File:Foobar.jpg|link=Foo''s bar''s|caption1]]
15235 [[File:Foobar.jpg|link=''Main Page''|caption2]]
15237 <!-- consistency with gallery extension -->
15239 File:Foobar.jpg|link=Foo''s bar''s|caption1
15240 File:Foobar.jpg|link=''Main Page''|caption2
15243 <p><a href="/wiki/Foo%27%27s_bar%27%27s" title="Foo''s bar''s">Foo''s bar''s</a>
15244 </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>
15245 </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>
15247 <ul class="gallery mw-gallery-traditional">
15248 <li class="gallerybox" style="width: 155px"><div style="width: 155px">
15249 <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>
15250 <div class="gallerytext">
15255 <li class="gallerybox" style="width: 155px"><div style="width: 155px">
15256 <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>
15257 <div class="gallerytext">
15264 <p><a rel="mw:WikiLink" href="./Foo''s_bar''s" title="Foo''s bar''s">Foo''s bar''s</a></p>
15266 <!-- Note that "italics" are stripped, even though this is a valid page title -->
15267 <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>
15269 <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>
15271 <!-- consistency with gallery extension -->
15272 <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"}}'>
15273 <li class="gallerybox">
15274 <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>
15275 <div class="gallerytext">caption1</div>
15277 <li class="gallerybox">
15278 <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>
15279 <div class="gallerytext">caption2</div>
15285 Nowiki markup in link attribute (T206940)
15287 [[File:Foobar.jpg|link=Foo<nowiki>''</nowiki>s_bar<nowiki>''</nowiki>s|caption]]
15289 <!-- consistency with gallery extension -->
15291 File:Foobar.jpg|link=Foo<nowiki>''</nowiki>s_bar<nowiki>''</nowiki>s|caption
15294 <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>
15296 <ul class="gallery mw-gallery-traditional">
15297 <li class="gallerybox" style="width: 155px"><div style="width: 155px">
15298 <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>
15299 <div class="gallerytext">
15306 <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>
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<nowiki>''</nowiki>s_bar<nowiki>''</nowiki>s|caption\n"}}'>
15310 <li class="gallerybox">
15311 <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>
15312 <div class="gallerytext">caption</div>
15318 Nowiki markup in link attribute (edited html, no data-parsoid) (T206940)
15320 [[File:Foobar.jpg|link=Foo<nowiki>''s_bar''</nowiki>s|caption]]
15322 <!-- consistency with gallery extension -->
15324 File:Foobar.jpg|link=Foo<nowiki>''s_bar''</nowiki>s|caption
15327 <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>
15329 <ul class="gallery mw-gallery-traditional">
15330 <li class="gallerybox" style="width: 155px"><div style="width: 155px">
15331 <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>
15332 <div class="gallerytext">
15339 <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>
15341 <!-- consistency with gallery extension -->
15342 <ul class="gallery mw-gallery-traditional" typeof="mw:Extension/gallery" data-mw='{"name":"gallery","attrs":{},"body":{}}'>
15343 <li class="gallerybox">
15344 <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>
15345 <div class="gallerytext">caption</div>
15351 Image with table with attributes in caption
15353 parsoid=wt2html,html2html
15355 [[File:Foobar.jpg|thumb|
15362 <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>
15363 <table class="123">
15364 <tbody><tr class="456" data-parsoid='{"startTagSrc":"|-"}'>
15367 </figcaption></figure>
15371 Image with table with rows from templates in caption
15373 [[File:Foobar.jpg|thumb|
15379 <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>
15381 <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>
15383 </figcaption></figure>
15387 Image with nested tables in caption
15389 [[File:Foobar.jpg|thumb|Foo<br />
15398 <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}'/>
15402 <tbody><tr><td>z</td></tr>
15403 </tbody></table></td></tr>
15405 </figcaption></figure>
15409 Image with heading and horizontal rule in caption
15411 [[File:Foobar.jpg|thumb|
15417 <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>
15420 <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>
15421 <h3 id="Testing">Testing</h3>
15423 <hr data-parsoid='{"extra_dashes":10}'/>
15424 </figcaption></figure>
15427 ###################
15428 # Conflicting image format options.
15429 # First option specified should 'win'.
15430 # All three cases in each test should be identical.
15433 Image with 'frameless' first.
15435 parsoid=wt2html,wt2wt,html2html
15437 [[File:Foobar.jpg|frameless|caption]]
15439 [[File:Foobar.jpg|frameless|frame|caption]]
15441 [[File:Foobar.jpg|frameless|thumb|caption]]
15443 <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>
15444 </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>
15445 </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>
15448 <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>
15449 <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>
15450 <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>
15454 Image with 'frame' first.
15456 parsoid=wt2html,wt2wt,html2html
15458 [[File:Foobar.jpg|frame|caption]]
15459 [[File:Foobar.jpg|frame|frameless|caption]]
15460 [[File:Foobar.jpg|frame|thumb|caption]]
15462 <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>
15463 <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>
15464 <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>
15467 <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>
15468 <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>
15469 <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>
15473 Image with 'thumb' first.
15475 parsoid=wt2html,wt2wt,html2html
15477 [[File:Foobar.jpg|thumb|caption]]
15478 [[File:Foobar.jpg|thumb|frameless|caption]]
15479 [[File:Foobar.jpg|thumb|frame|caption]]
15481 <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>
15482 <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>
15483 <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>
15486 <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>
15487 <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>
15488 <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>
15491 ###################
15493 # See https://www.mediawiki.org/wiki/Help:Images#Size_and_frame
15494 # and https://phabricator.wikimedia.org/T64258
15495 # Foobar has actual size of 1941x220
15496 # 1. Thumbs & frameless always reduce, can't be enlarged unless it's
15497 # a scalable format.
15498 # 2. Framed images always ignore size options; always render at default size.
15499 # 3. "Unspecified format" and border are the only types which can be
15503 Image: unspecified format and border enlarge
15505 parsoid=wt2html,wt2wt,html2html
15507 [[File:Foobar.jpg|2000px]]
15509 [[File:Foobar.jpg|border|2000px]]
15511 <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>
15512 </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>
15515 <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>
15516 <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>
15520 Image: "unspecified format" and border reduce
15522 parsoid=wt2html,wt2wt,html2html
15524 [[File:Foobar.jpg|1000px]]
15526 [[File:Foobar.jpg|border|1000px]]
15528 <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>
15529 </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>
15532 <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>
15533 <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>
15537 Image: thumbs reduce
15539 parsoid=wt2html,wt2wt,html2html
15541 [[File:Foobar.jpg|thumb|50px]]
15543 <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>
15546 <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>
15550 Image: bitmap thumbs can't be enlarged past original size, but vector can.
15552 parsoid=wt2html,wt2wt,html2html
15554 [[File:Foobar.jpg|thumb|2000px]]
15556 [[File:Foobar.svg|thumb|2000px]]
15558 <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>
15559 <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>
15562 <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>
15563 <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>
15567 Image: frameless can reduce in size
15569 parsoid=wt2html,wt2wt,html2html
15571 [[File:Foobar.jpg|frameless|50px]]
15573 <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>
15576 <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>
15580 Image: bitmap frameless can't be enlarged past original size, but vector can
15582 parsoid=wt2html,wt2wt,html2html
15584 [[File:Foobar.jpg|frameless|2000px]]
15586 [[File:Foobar.svg|frameless|2000px]]
15588 <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>
15589 </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>
15592 <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>
15593 <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>
15597 Image: framed images are always unscaled.
15599 parsoid=wt2html,wt2wt,html2html
15601 [[File:Foobar.jpg|frame]]
15603 [[File:Foobar.jpg|frame|50px]]
15605 [[File:Foobar.jpg|frame|50x50px]]
15607 [[File:Foobar.jpg|frame|2000px]]
15609 <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>
15610 <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>
15611 <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>
15612 <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>
15615 <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>
15616 <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>
15617 <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>
15618 <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>
15621 ###################
15624 Link to image page- image page normally doesn't exists, hence edit link
15625 Add test with existing image page
15626 #<p><a href="/wiki/File:Test" title="Image:Test">Image:test</a>
15630 <p><a href="/index.php?title=File:Test&action=edit&redlink=1" class="new" title="File:Test (page does not exist)">Image:test</a>
15635 T20784 Link to non-existent image page with caption should use caption as link text
15637 [[:Image:test|caption]]
15639 <p><a href="/index.php?title=File:Test&action=edit&redlink=1" class="new" title="File:Test (page does not exist)">caption</a>
15644 Frameless image caption with a free URL
15646 [[File:Foobar.jpg|http://example.com]]
15648 <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>
15651 <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>
15655 Thumbnail image caption with a free URL
15659 [[File:Foobar.jpg|thumb|http://example.com]]
15661 <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>
15664 <figure class="mw-default-size" typeof="mw:Image/Thumb"><a href="./File:Foobar.jpg"><img resource="./File:Foobar.jpg" src="//example.com/images/thumb/3/3a/Foobar.jpg/220px-Foobar.jpg" data-file-width="1941" data-file-height="220" data-file-type="bitmap" height="25" width="220"/></a><figcaption><a rel="mw:ExtLink" class="external free" href="http://example.com">http://example.com</a></figcaption></figure>
15668 Thumbnail image caption with a free URL and explicit alt
15671 parsoid=wt2html,wt2wt,html2html
15673 [[File:Foobar.jpg|thumb|http://example.com|alt=Alteration]]
15675 <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>
15678 <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>
15682 SVG thumbnails with no language set
15685 [[File:Foobar.svg|thumb|caption]]
15687 <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>
15690 <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>
15694 SVG thumbnails with language de
15696 parsoid=wt2html,wt2wt,html2html
15698 [[File:Foobar.svg|thumb|caption|lang=de]]
15700 <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>
15703 <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>
15707 SVG thumbnails with invalid language code
15709 parsoid=wt2html,wt2wt,html2html
15711 [[File:Foobar.svg|thumb|caption|lang=invalid:language:code]]
15713 <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>
15716 <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>
15720 SVG thumbnails in page language
15723 wgMediaInTargetLanguage = true
15725 [[File:Foobar.svg]] [[File:Foobar.svg|lang=en]]
15727 <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>
15732 SVG thumbnails in page language not present in the file
15735 wgMediaInTargetLanguage = true
15737 [[File:Foobar.svg]] [[File:Foobar.svg|lang=ru]]
15739 <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>
15744 T3887: A ISBN with a thumbnail
15746 [[File:Foobar.jpg|thumb|ISBN 1235467890]]
15748 <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>
15751 <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>
15755 T3887: A RFC with a thumbnail
15757 [[File:Foobar.jpg|thumb|This is RFC 12354]]
15759 <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>
15762 <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>
15766 T3887: A mailto link with a thumbnail
15768 [[File:Foobar.jpg|thumb|Please mailto:nobody@example.com]]
15770 <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>
15773 <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>
15776 # Pending resolution to T2368
15778 T2648: Frameless image caption with a link
15780 [[File:Foobar.jpg|text with a [[link]] in it]]
15782 <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>
15785 <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>
15789 T2648: Frameless image caption with a link (suffix)
15791 [[File:Foobar.jpg|text with a [[link]]foo in it]]
15793 <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>
15796 <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>
15800 T2648: Frameless image caption with an interwiki link
15802 [[File:Foobar.jpg|text with a [[MeatBall:Link]] in it]]
15804 <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>
15807 <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>
15811 T2648: Frameless image caption with a piped interwiki link
15813 [[File:Foobar.jpg|text with a [[MeatBall:Link|link]] in it]]
15815 <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>
15818 <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>
15822 T107474: Frameless image caption with <nowiki>
15824 [[File:Foobar.jpg|<nowiki>text with a [[MeatBall:Link|link]] in it</nowiki>]]
15826 <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>
15830 Escape HTML special chars in image alt text
15832 [[File:Foobar.jpg|& < > "]]
15834 <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>
15837 <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>
15841 Escape HTML special chars in image alt text with LanguageConverter
15845 [[File:Foobar.jpg|& < > "]]
15847 <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>
15850 <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>
15854 Entities in file name and attributes
15856 [[File:7%25 solution.gif|manualthumb=7%25 solution.gif|link=7%25 solution|[[7%25 solution]]]]
15858 <p><a href="/index.php?title=Special:Upload&wpDestFile=7%25_solution.gif" class="new" title="File:7% solution.gif">7% solution</a>
15861 <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>
15865 T2499: Alt text should have Ӓ, not &1234;
15867 [[File:Foobar.jpg|♀]]
15869 <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>
15872 <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>
15876 Broken image caption with link
15878 parsoid=wt2html,wt2wt,html2html
15880 [[Image:Foobar.jpg|thumb|This is a broken caption. But [[Main Page|this]] is just an ordinary link.
15882 <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.
15885 <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>
15889 Image caption containing another image
15891 [[File:Foobar.jpg|thumb|This is a caption with another [[File:Thumb.png|image]] inside it!]]
15893 <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>
15896 <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>
15900 Image: caption containing a newline
15902 [[File:Foobar.jpg|This
15905 <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>
15908 <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>
15912 Image: caption containing leading space
15913 (The leading space should not trigger nowiki escaping in wt2wt mode)
15915 [[File:Foobar.jpg|thumb| bar]]
15917 <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>
15920 <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>
15923 # html/php output not have newlines after table, td, th, etc. because
15924 # Linker::makeThumbLink2() replaces the newlines with spaces since
15925 # the table is inside a caption.
15926 # FIXME: Verify if that circa 2004 fix is still required.
15928 Image: caption containing a table
15930 parsoid=wt2html,wt2wt,html2html
15932 [[Image:Foobar.jpg|thumb|200px|This is an example image thumbnail caption with a table
15938 and some more text.]]
15940 <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>
15943 <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
15946 <tr><th>Foo</th><th>Bar</th></tr>
15949 <td>Bar1</td></tr></tbody></table>and some more text.</figcaption></figure>
15953 T5090: External links other than http: in image captions
15955 [[File:Foobar.jpg|thumb|200x200px|This caption has [irc://example.net irc] and [https://example.com Secure] ext links in it.]]
15957 <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>
15960 <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>
15966 parsoid=wt2html,wt2wt,html2html
15968 [[Image:foobar.jpg|a|class=b]]
15970 <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>
15973 <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>
15977 Localized image handling (1).
15979 parsoid=wt2html,wt2wt,html2html
15982 [[Archivo:Foobar.jpg|izquierda|enlace=foo|caption]]
15984 <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>
15987 <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>
15991 Localized image handling (2).
15994 parsoid=wt2html,wt2wt,html2html
15997 [[Archivo:Foobar.jpg|miniatura|izquierda|enlace=foo|caption]]
15999 <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>
16002 <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>
16006 Localized image handling (3).
16011 <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>
16013 [[File:Foobar.jpg|بندانگشتی]]
16017 "border", "frameless" and "class" attributes on an image.
16020 parsoid=wt2html,wt2wt,html2html
16022 [[File:Foobar.jpg|frameless|border|class=extra|caption]]
16024 <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>
16027 <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>
16030 # Note that 'right' is the default alignment, despite the misspelled 'righ' below
16032 Invalid image attributes (T64500)
16035 parsoid=wt2html,wt2wt,html2html
16037 [[File:Foobar.jpg|thumb|float|left|caption]]
16039 [[File:Foobar.jpg|thumb|righ|caption]]
16041 [[File:Foobar.jpg|bogus1|thumb|bogus2|left|bogus3|caption]]
16043 <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>
16044 <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>
16045 <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>
16048 <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>
16049 <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>
16050 <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>
16056 #REDIRECT [[File:Barfoo.jpg]]
16059 # FIXME: Parsoid should run this test -- but we'd need to teach the
16060 # mockAPI about the redirected Barfoo.jpg image.
16064 [[Image:Barfoo.jpg]]
16066 <p><a href="/wiki/File:Barfoo.jpg" class="mw-redirect" title="File:Barfoo.jpg">File:Barfoo.jpg</a>
16071 Missing image with uploads disabled
16075 [[File:Foobaz.jpg]]
16077 <p><a href="/wiki/File:Foobaz.jpg" title="File:Foobaz.jpg">File:Foobaz.jpg</a>
16080 <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>
16083 # Parsoid-specific testing for images
16084 # https://www.mediawiki.org/wiki/Parsoid/MediaWiki_DOM_spec#Images
16085 # Currently imperfect due to a flaw in the Parsoid testrunner
16087 # THESE TESTS SHOULD BE MOVED UP and merged with the php-specific
16091 Parsoid-specific image handling - simple image with size and middle alignment
16093 [[File:Foobar.jpg|middle|50px]]
16095 <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>
16099 Parsoid-specific image handling - simple image with size, middle alignment, non-standard namespace alias
16101 parsoid=wt2wt,wt2html,html2html
16103 [[Image:Foobar.jpg|middle|50px]]
16105 <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>
16109 Parsoid-specific image handling - simple image with size and middle alignment (existing content)
16111 [[File:Foobar.jpg|50px|middle]]
16113 <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>
16117 Parsoid-specific image handling - simple image with size and middle alignment and non-standard namespace name
16119 parsoid=wt2html,wt2wt,html2html
16121 [[Image:Foobar.jpg|50px|middle]]
16123 <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>
16127 Parsoid-specific image handling - simple image with both sizes, a baseline alignment, and a caption
16129 [[File:Foobar.jpg|500x10px|baseline|caption]]
16131 <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>
16135 Parsoid-specific image handling - simple image with border and size spec
16137 [[File:Foobar.jpg|50px|border|caption]]
16139 <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>
16143 Parsoid-specific image handling - thumbnail with halign, valign, and caption
16145 parsoid=wt2html,html2html
16147 [[File:Foobar.jpg|left|baseline|thumb|caption content]]
16149 <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>
16153 Parsoid-specific image handling - thumbnail with halign, valign, and caption (existing content)
16155 parsoid=wt2html,html2html
16157 [[File:Foobar.jpg|thumb|left|baseline|caption content]]
16159 <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>
16163 Parsoid-specific image handling - thumbnail with specific size, halign, valign, and caption
16165 parsoid=wt2html,html2html
16167 [[Image:Foobar.jpg|right|middle|thumb|50x50px|caption]]
16169 <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>
16173 Parsoid-specific image handling - thumbnail with specific size, halign, valign, and caption (existing content)
16175 parsoid=wt2html,html2html
16177 [[File:Foobar.jpg|thumb|50x50px|right|middle|caption]]
16179 <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>
16183 Parsoid-specific image handling - framed image with specific size and caption (size is ignored)
16185 parsoid=wt2html,wt2wt,html2html
16187 [[File:Foobar.jpg|frame|500x50px|caption]]
16189 <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>
16193 Parsoid-specific image handling - framed image with specific size, halign, valign, and caption (size is ignored)
16195 parsoid=wt2html,html2html
16197 [[File:Foobar.jpg|left|baseline|frame|500x50px|caption]]
16199 <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>
16203 Parsoid-specific image handling - frameless image with specific size, border, and caption
16205 [[File:Foobar.jpg|frameless|442x50px|border|caption]]
16207 <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>
16211 Parsoid-specific image handling - simple image with a formatted caption
16213 [[File:Foobar.jpg|<table><tr><td>a</td><td>b</td></tr><tr><td>c</td></tr></table>]]
16215 <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>
16219 Parsoid-specific image handling - caption with a template in it
16221 [[File:Foobar.jpg|thumb|200x23px|This caption has a {{echo|transclusion}} in it.]]
16223 <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>
16227 Parsoid-specific image handling - caption with unbalanced tags in it
16229 parsoid=wt2html,wt2wt,html2html
16232 [[File:Foobar.jpg|thumb|200x200px|This caption has a <center>unbalanced tag in it.]]
16236 <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>
16241 Parsoid-specific image handling - empty caption (1)
16243 parsoid=wt2html,wt2wt
16245 [[File:Foobar.jpg|thumb|]]
16247 <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>
16250 # empty captions don't get serialized unless we're in the "round trip" case
16252 Parsoid-specific image handling - empty caption (2)
16256 <figure class="mw-default-size" typeof="mw:Image/Thumb">
16257 <a href="./File:Foobar.jpg">
16258 <img resource="./File:Foobar.jpg"
16259 src="//example.com/images/3/3a/Foobar.jpg"
16260 data-file-width="1941" data-file-height="220" data-file-type="bitmap"
16261 height="25" width="220"/>
16263 <figcaption></figcaption>
16266 [[File:Foobar.jpg|thumb]]
16270 Parsoid-specific image handling - whitespace caption
16272 [[File:Foobar.jpg|thumb| ]]
16274 <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>
16278 Parsoid-specific image handling - lang option
16281 [[File:Foobar.svg|lang=de|caption]]
16285 <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>
16289 ## Edge case bugs in Parsoid from T93580
16291 T93580: 1. Templated <ref> inside block images
16293 [[File:Foobar.jpg|thumb|Caption with templated ref: {{echo|<ref>foo</ref>}}]]
16297 <figure class="mw-default-size" typeof="mw:Image/Thumb" data-parsoid='{"optList":[{"ck":"thumbnail","ak":"thumb"},{"ck":"caption","ak":"Caption with templated ref: {{echo|<ref>foo</ref>}}"}]}'><a href="./File:Foobar.jpg" data-parsoid='{"a":{"href":"./File:Foobar.jpg"},"sa":{}}'><img resource="./File:Foobar.jpg" src="//example.com/images/thumb/3/3a/Foobar.jpg/220px-Foobar.jpg" data-file-width="1941" data-file-height="220" data-file-type="bitmap" height="25" width="220" data-parsoid='{"a":{"resource":"./File:Foobar.jpg","height":"25","width":"220"},"sa":{"resource":"File:Foobar.jpg"}}'/></a><figcaption>Caption with templated ref: <sup about="#mwt5" class="mw-ref" id="cite_ref-1" rel="dc:references" typeof="mw:Transclusion mw:Extension/ref" data-mw='{"parts":[{"template":{"target":{"wt":"echo","href":"./Template:Echo"},"params":{"1":{"wt":"<ref>foo</ref>"}},"i":0}}]}'><a href="./Main_Page#cite_note-1" style="counter-reset: mw-Ref 1;"><span class="mw-reflink-text">[1]</span></a></sup></figcaption></figure>
16299 <ol class="mw-references references" typeof="mw:Extension/references" about="#mwt6" data-mw='{"name":"references","attrs":{}}'><li about="#cite_note-1" id="cite_note-1"><a href="./Main_Page#cite_ref-1" rel="mw:referencedBy"><span class="mw-linkback-text">↑ </span></a> <span id="mw-reference-text-cite_note-1" class="mw-reference-text" data-parsoid="{}">foo</span></li></ol>
16303 T93580: 2. <ref> inside inline images
16305 [[File:Foobar.jpg|Undisplayed caption in inline image with ref: <ref>foo</ref>]]
16309 <p><figure-inline class="mw-default-size" typeof="mw:Image" data-parsoid='{"optList":[{"ck":"caption","ak":"Undisplayed caption in inline image with ref: <ref>foo</ref>"}]}' data-mw='{"caption":"Undisplayed caption in inline image with ref: <sup about=\"#mwt2\" class=\"mw-ref\" id=\"cite_ref-1\" rel=\"dc:references\" typeof=\"mw:Extension/ref\" data-parsoid='{\"dsr\":[64,78,5,6]}' data-mw='{\"name\":\"ref\",\"attrs\":{},\"body\":{\"id\":\"mw-reference-text-cite_note-1\"}}'><a href=\"./Main_Page#cite_note-1\" style=\"counter-reset: mw-Ref 1;\" data-parsoid=\"{}\"><span class=\"mw-reflink-text\" data-parsoid=\"{}\">[1]</span></a></sup>"}'><a href="./File:Foobar.jpg" data-parsoid='{"a":{"href":"./File:Foobar.jpg"},"sa":{"href":"File:Foobar.jpg"}}'><img resource="./File:Foobar.jpg" src="//example.com/images/3/3a/Foobar.jpg" data-file-width="1941" data-file-height="220" data-file-type="bitmap" height="220" width="1941" data-parsoid='{"a":{"resource":"./File:Foobar.jpg","height":"220","width":"1941"},"sa":{"resource":"File:Foobar.jpg"}}'/></a></figure-inline></p>
16311 <ol class="mw-references references" typeof="mw:Extension/references" about="#mwt4" data-mw='{"name":"references","attrs":{}}'><li about="#cite_note-1" id="cite_note-1"><a href="./Main_Page#cite_ref-1" rel="mw:referencedBy"><span class="mw-linkback-text">↑ </span></a> <span id="mw-reference-text-cite_note-1" class="mw-reference-text">foo</span></li></ol>
16315 T93580: 3. Templated <ref> inside inline images
16317 [[File:Foobar.jpg|Undisplayed caption in inline image with ref: {{echo|<ref>{{echo|foo}}</ref>}}]]
16321 <p><figure-inline class="mw-default-size" typeof="mw:Image" data-parsoid='{"optList":[{"ck":"caption","ak":"Undisplayed caption in inline image with ref: {{echo|<ref>{{echo|foo}}</ref>}}"}]}' data-mw='{"caption":"Undisplayed caption in inline image with ref: <sup about=\"#mwt2\" class=\"mw-ref\" id=\"cite_ref-1\" rel=\"dc:references\" typeof=\"mw:Transclusion mw:Extension/ref\" data-parsoid='{\"dsr\":[64,96,null,null],\"pi\":[[{\"k\":\"1\"}]]}' data-mw='{\"parts\":[{\"template\":{\"target\":{\"wt\":\"echo\",\"href\":\"./Template:Echo\"},\"params\":{\"1\":{\"wt\":\"&lt;ref>{{echo|foo}}&lt;/ref>\"}},\"i\":0}}]}'><a href=\"./Main_Page#cite_note-1\" style=\"counter-reset: mw-Ref 1;\" data-parsoid=\"{}\"><span class=\"mw-reflink-text\" data-parsoid=\"{}\">[1]</span></a></sup>"}'><a href="./File:Foobar.jpg" data-parsoid='{"a":{"href":"./File:Foobar.jpg"},"sa":{"href":"File:Foobar.jpg"}}'><img resource="./File:Foobar.jpg" src="//example.com/images/3/3a/Foobar.jpg" data-file-width="1941" data-file-height="220" data-file-type="bitmap" height="220" width="1941" data-parsoid='{"a":{"resource":"./File:Foobar.jpg","height":"220","width":"1941"},"sa":{"resource":"File:Foobar.jpg"}}'/></a></figure-inline></p>
16323 <ol class="mw-references references" typeof="mw:Extension/references" about="#mwt6" data-mw='{"name":"references","attrs":{}}'><li about="#cite_note-1" id="cite_note-1"><a href="./Main_Page#cite_ref-1" rel="mw:referencedBy"><span class="mw-linkback-text">↑ </span></a> <span id="mw-reference-text-cite_note-1" class="mw-reference-text">foo</span></li></ol>
16330 Subpage test/subpage
16338 subpage title=[[Subpage test]]
16342 <p><a href="/wiki/Subpage_test/subpage" title="Subpage test/subpage">/subpage</a>
16347 Subpage noslash link
16349 subpage title=[[Subpage test]]
16353 <p><a href="/wiki/Subpage_test/subpage" title="Subpage test/subpage">subpage</a>
16358 Subpage test/1/2/subpage
16364 Relative subpage noslash link
16366 parsoid=wt2wt,wt2html,html2html
16367 subpage title=[[Subpage test/1/2/3/4]]
16373 <p><a href="/wiki/Subpage_test/1/2/subpage" title="Subpage test/1/2/subpage">subpage</a>
16374 </p><p><a href="/wiki/Subpage_test/1/2/subpage" title="Subpage test/1/2/subpage">Subpage test/1/2/subpage</a>
16377 <p><a rel="mw:WikiLink" href="./Subpage_test/1/2/subpage" title="Subpage test/1/2/subpage">subpage</a></p>
16378 <p><a rel="mw:WikiLink" href="./Subpage_test/1/2/subpage" title="Subpage test/1/2/subpage">Subpage_test/1/2/subpage</a></p>
16382 Parsoid: dot-slash prefixed wikilinks
16392 </p><p>[[././baz/]]
16397 </p><p>[[././baz/]]
16402 Render invalid page names as plain text (T53090)
16414 [[foo[http://example.com]xyz]]
16416 [[{{echo|./../foo}}|bar]]
16417 [[{{echo|foo/.}}|bar]]
16418 [[{{echo|foo/..}}|bar]]
16419 [[{{echo|foo~~~~bar}}]]
16420 [[{{echo|foo>bar}}]]
16421 [[{{echo|foo././bar}}]]
16422 [[{{echo|foo{bar}}]]
16423 [[{{echo|foo}bar}}]]
16424 [[{{echo|foo[bar}}]]
16425 [[{{echo|foo]bar}}]]
16426 [[{{echo|foo<bar}}]]
16428 <p>[[./../foo|bar]]
16438 [[foo<a rel="nofollow" class="external autonumber" href="http://example.com">[1]</a>xyz]]
16439 </p><p>[[./../foo|bar]]
16452 <p>[[./../foo|bar]]
16462 [[foo<a rel="mw:ExtLink" class="external autonumber" href="http://example.com"></a>xyz]]</p>
16464 <p>[[<span typeof="mw:Transclusion" data-mw='{"parts":[{"template":{"target":{"wt":"echo","href":"./Template:Echo"},"params":{"1":{"wt":"./../foo"}},"i":0}}]}'>./../foo</span>|bar]]
16465 [[<span typeof="mw:Transclusion" data-mw='{"parts":[{"template":{"target":{"wt":"echo","href":"./Template:Echo"},"params":{"1":{"wt":"foo/."}},"i":0}}]}'>foo/.</span>|bar]]
16466 [[<span typeof="mw:Transclusion" data-mw='{"parts":[{"template":{"target":{"wt":"echo","href":"./Template:Echo"},"params":{"1":{"wt":"foo/.."}},"i":0}}]}'>foo/..</span>|bar]]
16467 [[<span typeof="mw:Transclusion" data-mw='{"parts":[{"template":{"target":{"wt":"echo","href":"./Template:Echo"},"params":{"1":{"wt":"foo~~~~bar"}},"i":0}}]}'>foo~~~~bar</span>]]
16468 [[<span typeof="mw:Transclusion" data-mw='{"parts":[{"template":{"target":{"wt":"echo","href":"./Template:Echo"},"params":{"1":{"wt":"foo>bar"}},"i":0}}]}'>foo>bar</span>]]
16469 [[<span typeof="mw:Transclusion" data-mw='{"parts":[{"template":{"target":{"wt":"echo","href":"./Template:Echo"},"params":{"1":{"wt":"foo././bar"}},"i":0}}]}'>foo././bar</span>]]
16470 [[<span typeof="mw:Transclusion" data-mw='{"parts":[{"template":{"target":{"wt":"echo","href":"./Template:Echo"},"params":{"1":{"wt":"foo{bar"}},"i":0}}]}'>foo{bar</span>]]
16471 [[<span typeof="mw:Transclusion" data-mw='{"parts":[{"template":{"target":{"wt":"echo","href":"./Template:Echo"},"params":{"1":{"wt":"foo}bar"}},"i":0}}]}'>foo}bar</span>]]
16472 [[<span typeof="mw:Transclusion" data-mw='{"parts":[{"template":{"target":{"wt":"echo","href":"./Template:Echo"},"params":{"1":{"wt":"foo[bar"}},"i":0}}]}'>foo[bar</span>]]
16473 [[<span typeof="mw:Transclusion" data-mw='{"parts":[{"template":{"target":{"wt":"echo","href":"./Template:Echo"},"params":{"1":{"wt":"foo]bar"}},"i":0}}]}'>foo]bar</span>]]
16474 [[<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>
16482 <p><a href="/index.php?title=/subpage&action=edit&redlink=1" class="new" title="/subpage (page does not exist)">/subpage</a>
16487 T2561: {{/Subpage}}
16489 subpage title=[[Page]]
16493 <p><a href="/index.php?title=Page/Subpage&action=edit&redlink=1" class="new" title="Page/Subpage (page does not exist)">Page/Subpage</a>
16501 Category:MediaWiki User's Guide
16509 [[:Category:MediaWiki User's Guide]]
16511 <p><a href="/wiki/Category:MediaWiki_User%27s_Guide" title="Category:MediaWiki User's Guide">Category:MediaWiki User's Guide</a>
16520 [[Category:MediaWiki User's Guide]]
16522 cat=MediaWiki_User's_Guide sort=
16524 <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"}}'/>
16528 PAGESINCATEGORY invalid title fatal (r33546 fix)
16530 {{PAGESINCATEGORY:<bogus>}}
16537 Category with different sort key
16541 [[Category:MediaWiki User's Guide|Foo]]
16543 cat=MediaWiki_User's_Guide sort=Foo
16545 <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"}}'/>
16549 Category with identical sort key
16553 [[Category:MediaWiki User's Guide|MediaWiki User's Guide]]
16555 cat=MediaWiki_User's_Guide sort=MediaWiki User's Guide
16557 <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"}}'/>
16561 Category with empty sort key
16566 [[Category:MediaWiki User's Guide|]]
16568 [[Category:MediaWiki User's Guide|MediaWiki User's Guide]]
16572 Category with empty sort key and parentheses
16577 [[Category:Foo (bar)|]]
16579 [[Category:Foo (bar)|Foo]]
16583 Category with link tail
16588 123[[Category:Foo]]456
16590 123[[Category:Foo]]456
16594 Category with template
16599 [[Category:{{echo|Foo}}]]
16601 [[Category:{{echo|Foo}}]]
16605 Category with template in sort key
16610 [[Category:Foo|{{echo|Bar}}]]
16612 [[Category:Foo|{{echo|Bar}}]]
16616 Category with template in sort key and title
16621 [[Category:{{echo|Foo}}|{{echo|Bar}}]]
16623 [[Category:{{echo|Foo}}|{{echo|Bar}}]]
16626 ## We used to, but no longer wt2wt this test since the default serializer
16627 ## will normalize all categories to serialize on their own line.
16628 ## This wikitext usage is going to be fairly uncommon in production and
16629 ## selser will take care of preserving formatting in those scenarios.
16631 Category / paragraph interactions
16635 Foo [[Category:Baz]] Bar
16637 Foo [[Category:Baz]]
16645 [[Category:Baz]] Bar
16658 {{echo|[[Category:Baz]]}}
16671 <p>Foo <link rel="mw:PageProp/Category" href="./Category:Baz"/> Bar</p>
16672 <p>Foo <link rel="mw:PageProp/Category" href="./Category:Baz"/> Bar</p>
16673 <p>Foo <link rel="mw:PageProp/Category" href="./Category:Baz"/> Bar</p>
16674 <p>Foo <link rel="mw:PageProp/Category" href="./Category:Baz"/> Bar</p>
16675 <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>
16676 <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}}]}'/>
16677 <link rel="mw:PageProp/Category" href="./Category:Baz"/>
16680 ## We used to, but no longer wt2wt this test since the default serializer
16681 ## will normalize all categories to serialize on their own line.
16682 ## This wikitext usage is going to be fairly uncommon in production and
16683 ## selser will take care of preserving formatting in those scenarios.
16685 ## The whitespace on the empty line is part of the test. Please do not delete
16687 1. Categories and newlines: All preceding newlines should be suppressed (courtesy T2087)
16693 [[Category:Foo]] and this should be part of same paragraph (not an indent-pre)
16695 {{echo|[[Category:Foo]] and so should this!}}
16697 <p>This and this should be part of same paragraph (not an indent-pre) and so should this!
16702 <link rel="mw:PageProp/Category" href="./Category:Foo"/> and this should be part of same paragraph (not an indent-pre)
16704 <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>
16707 ## Parsoid will not try to wt2wt this while preserving newlines because
16708 ## it suppresses excess newlines within list items -- and we don't want to
16709 ## introduce a special case just for categories, which is, in reality somewhat
16710 ## odd behavior -- categories are unlikely to be used in list items like this
16711 ## in top-level pages and are only likely to show up in template-generated
16712 ## list items where this RT-ing is a non-issue.
16714 ## The whitespace on the empty line is part of the test. Please do not delete
16716 2. Categories and newlines: All preceding newlines should be suppressed (courtesy T2087)
16722 [[Category:Foo]] and this should be part of the same list item
16725 {{echo|[[Category:Foo]] and this should be part of the same list item}}
16727 <ul><li>This and this should be part of the same list item</li>
16728 <li>So should this and this should be part of the same list item</li></ul>
16731 <li>This <link rel="mw:PageProp/Category" href="./Category:Foo"/> and this should be part of the same list item</li>
16732 <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>
16736 ## Newlines and categories that follow the last item of a list
16737 ## are treated differently because this (list followed by categories)
16738 ## is an extremely common pattern on wikis.
16740 3. Categories and newlines: newline suppression for last list item should RT properly
16761 <link rel="mw:PageProp/Category" href="./Category:Foo"/>
16763 <link rel="mw:PageProp/Category" href="./Category:Bar"/>
16764 <link rel="mw:PageProp/Category" href="./Category:Baz"/>
16766 <dl><dd>c</dd></dl>
16768 <link rel="mw:PageProp/Category" href="./Category:C"/>
16770 <dl><dt>d</dt></dl>
16772 <link rel="mw:PageProp/Category" href="./Category:D"/>
16776 4. Categories and newlines: newline suppression for last list item should RT properly
16784 <ul><li><ul><li><ul><li>b</li></ul></li></ul></li></ul></li></ul>
16786 <link rel="mw:PageProp/Category" href="./Category:Foo" data-parsoid='{"stx":"simple","a":{"href":"./Category:Foo"},"sa":{"href":"Category:Foo"}}'/>
16789 ## only wt2html for this to make sure the algo only applies to the rightmost path
16791 5. Categories and newlines: migrateTrailingCategories dom pass should only run on the rightmost path of nested lists
16804 <link rel="mw:PageProp/Category" href="./Category:Foo" data-parsoid='{"stx":"simple","a":{"href":"./Category:Foo"},"sa":{"href":"Category:Foo"}}'/></li></ul></li>
16806 <ul><li>d</li></ul></li></ul>
16807 <link rel="mw:PageProp/Category" href="./Category:Foo" data-parsoid='{"stx":"simple","a":{"href":"./Category:Foo"},"sa":{"href":"Category:Foo"}}'/>
16810 ## We used to, but no longer wt2wt this test since the default serializer
16811 ## will normalize all categories to serialize on their own line.
16812 ## This wikitext usage is going to be fairly uncommon in production and
16813 ## selser will take care of preserving formatting in those scenarios.
16815 6. Categories and newlines: migrateTrailingCategories dom pass should not migrate categories not preceded by newlines
16819 *a [[Category:Foo]]
16821 <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>
16824 # This test also demonstrates because of newline+category tunneling
16825 # through the list hander, template wrapping doesn't expand to the
16826 # containing list when the list item swallows the category.
16828 7. Categories and newlines: migrateTrailingCategories dom pass should leave template content alone
16833 <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
16834 </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>
16838 8. Categories and newlines: migrateTrailingCategories dom pass should not get tripped by intervening templates
16842 {{echo|[[Category:Foo]]
16846 <ul><li>a</li></ul>
16848 <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">
16849 </span><link rel="mw:PageProp/Category" href="./Category:Bar" about="#mwt1" data-parsoid='{"stx":"simple","a":{"href":"./Category:Bar"},"sa":{"href":"Category:Bar"}}'/>
16850 <link rel="mw:PageProp/Category" href="./Category:Baz" data-parsoid='{"stx":"simple","a":{"href":"./Category:Baz"},"sa":{"href":"Category:Baz"}}'/>
16854 Categories and newlines: migrateTrailingCategories dom pass should not get tripped by comments and whitespace
16858 [[Category:Bar]]<!--boo1--> <!--boo2-->
16859 [[Category:Baz]]<!--boo3--> <!--boo4-->
16861 <ul><li>a</li></ul>
16863 <link rel="mw:PageProp/Category" href="./Category:Bar"/><!--boo1--> <!--boo2-->
16864 <link rel="mw:PageProp/Category" href="./Category:Baz"/><!--boo3--> <!--boo4-->
16868 Categories and newlines: should behave properly with linkprefix (T87753)
16883 <link rel="mw:PageProp/Category" href="./تصنيف:Foo"/>
16884 <link rel="mw:PageProp/Category" href="./تصنيف:Bar"/>
16888 No regressions on internal links following category (T174639)
16890 parsoid=wt2html,html2html
16892 [[Category:Foo]]<div>a
16897 <a href="/wiki/Foo" title="Foo">Foo</a></div>
16900 <link rel="mw:PageProp/Category" href="./Category:Foo"/><div>a
16902 <a rel="mw:WikiLink" href="./Foo" title="Foo">Foo</a></div>
16905 # Note that Parsoid differs slightly from PHP due to T175421
16907 11. Special case where only newlines separate links (T175416)
16909 parsoid=wt2html,html2html
16913 [[Foo]][[es:Alimento]]
16918 <a href="/wiki/Foo" title="Foo">Foo</a>
16919 </p><p><a href="/wiki/Foo" title="Foo">Foo</a>
16922 <link rel="mw:PageProp/Category" href="./Category:Foo"/>
16924 <p><a rel="mw:WikiLink" href="./Foo" title="Foo">Foo</a></p><link rel="mw:PageProp/Language" href="http://es.wikipedia.org/wiki/Alimento"/>
16926 <p><a rel="mw:WikiLink" href="./Foo" title="Foo">Foo</a></p>
16930 Category links with multiple namespaces
16932 [[Category:Project:Foo]]
16934 <link rel="mw:PageProp/Category" href="./Category:Project:Foo" />
16938 Parsoid: Serialize link to category page with colon escape
16944 [[:Category:Foo|Bar]]
16947 <a rel="mw:WikiLink" href="./Category:Foo" title="Category:Foo">Category:Foo</a>
16948 <a rel="mw:WikiLink" href="./Category:Foo" title="Category:Foo">Bar</a>
16952 # We used to, but no longer wt2wt this test since the default serializer
16953 # will normalize all categories to serialize on their own line.
16954 # This wikitext usage is going to be fairly uncommon in production and
16955 # selser will take care of preventing whitespace insertion if this
16956 # occurs in an article.
16958 # html2html disabled for the same reason (whitespace insertion between
16961 # html2wt disabled because it localizes the "Category" namespace.
16963 Link prefix/suffixes aren't applied to category links
16973 <p>x<link rel="mw:PageProp/Category" href="./Flokkur:Foo" data-parsoid=""/>y</p>
16977 Link prefix/suffixes aren't applied to language links
16987 <p>x<link rel="mw:PageProp/Language" href="http://es.wikipedia.org/wiki/Foo" data-parsoid=""/>y</p>
16991 Parsoid: Serialize link to file page with colon escape
16997 [[:File:Foo.png|Bar]]
17000 <a rel="mw:WikiLink" href="./File:Foo.png" title="File:Foo.png">File:Foo.png</a>
17001 <a rel="mw:WikiLink" href="./File:Foo.png" title="File:Foo.png">Bar</a>
17006 Parsoid: Serialize a genuine category link without colon escape
17011 [[Category:Foo|Bar]]
17013 <link rel="mw:PageProp/Category" href="./Category:Foo">
17014 <link rel="mw:PageProp/Category" href="./Category:Foo#Bar">
17018 Normalize hrefs properly before testing for invalid link targets (T72894)
17022 <link rel="mw:PageProp/Category" href="./Category:Toxine_bactérienne"/>
17024 [[Category:Toxine bactérienne]]
17028 Parsoid: Defaultsort
17030 {{DEFAULTSORT:Foo}}
17032 <meta property="mw:PageProp/categorydefaultsort" content="Foo"/>
17035 # NOTE: mw:ExpandedAttrs is not the best typeof here. mw:Transclusion is better.
17036 # But, this is a limitation of our representation and is documented in
17037 # TemplateHandler.js in processSpecialMagicWord
17039 Parsoid: Defaultsort (template-generated)
17041 {{{{echo|DEFAULTSORT}}:Foo}}
17043 <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"}]]}'/>
17047 ### Inter-language links
17050 Interlanguage links
17058 es:Alimento fr:Nourriture zh:食品
17060 <link rel="mw:PageProp/Language" href="http://es.wikipedia.org/wiki/Alimento"/>
17061 <link rel="mw:PageProp/Language" href="http://fr.wikipedia.org/wiki/Nourriture"/>
17062 <link rel="mw:PageProp/Language" href="http://zh.wikipedia.org/wiki/食品"/>
17066 Duplicate interlanguage links (T26502)
17077 <link rel="mw:PageProp/Language" href="http://es.wikipedia.org/wiki/1"/>
17078 <link rel="mw:PageProp/Language" href="http://es.wikipedia.org/wiki/2"/>
17079 <link rel="mw:PageProp/Language" href="http://fr.wikipedia.org/wiki/1"/>
17080 <link rel="mw:PageProp/Language" href="http://fr.wikipedia.org/wiki/2"/>
17087 Basic section headings
17094 ===Smaller headline===
17097 <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>
17100 <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>
17103 <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>
17109 Section headings with TOC
17112 ===Subheadline 1===
17113 =====Skipping a level=====
17114 ======Skipping a level======
17118 ===Another headline===
17120 <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>
17122 <li class="toclevel-1 tocsection-1"><a href="#Headline_1"><span class="tocnumber">1</span> <span class="toctext">Headline 1</span></a>
17124 <li class="toclevel-2 tocsection-2"><a href="#Subheadline_1"><span class="tocnumber">1.1</span> <span class="toctext">Subheadline 1</span></a>
17126 <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>
17128 <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>
17135 <li class="toclevel-1 tocsection-5"><a href="#Headline_2"><span class="tocnumber">2</span> <span class="toctext">Headline 2</span></a>
17137 <li class="toclevel-2 tocsection-6"><a href="#Another_headline"><span class="tocnumber">2.1</span> <span class="toctext">Another headline</span></a></li>
17143 <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>
17144 <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>
17145 <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>
17146 <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>
17147 <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>
17150 <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>
17155 TOC anchors don't collide
17163 <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>
17165 <li class="toclevel-1 tocsection-1"><a href="#Headline_2"><span class="tocnumber">1</span> <span class="toctext">Headline 2</span></a></li>
17166 <li class="toclevel-1 tocsection-2"><a href="#Headline"><span class="tocnumber">2</span> <span class="toctext">Headline</span></a></li>
17167 <li class="toclevel-1 tocsection-3"><a href="#Headline_2_2"><span class="tocnumber">3</span> <span class="toctext">Headline 2</span></a></li>
17168 <li class="toclevel-1 tocsection-4"><a href="#Headline_3"><span class="tocnumber">4</span> <span class="toctext">Headline</span></a></li>
17172 <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>
17173 <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>
17174 <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>
17175 <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>
17179 # perl -e 'print "="x$_," Level $_ heading","="x$_,"\n" for 1..10'
17180 # Parsoid html2wt direction adds <nowiki> for level 7 and up.
17182 Handling of sections up to level 6 and beyond
17187 ==Level 2 Heading==
17188 ===Level 3 Heading===
17189 ====Level 4 Heading====
17190 =====Level 5 Heading=====
17191 ======Level 6 Heading======
17192 =======Level 7 Heading=======
17193 ========Level 8 Heading========
17194 =========Level 9 Heading=========
17195 ==========Level 10 Heading==========
17197 <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>
17199 <li class="toclevel-1 tocsection-1"><a href="#Level_1_Heading"><span class="tocnumber">1</span> <span class="toctext">Level 1 Heading</span></a>
17201 <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>
17203 <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>
17205 <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>
17207 <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>
17209 <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>
17210 <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>
17211 <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>
17212 <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>
17213 <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>
17227 <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>
17228 <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>
17229 <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>
17230 <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>
17231 <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>
17232 <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>
17233 <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>
17234 <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>
17235 <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>
17236 <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>
17239 <h1 id="Level_1_Heading" data-parsoid='{}'>Level 1 Heading</h1>
17240 <h2 id="Level_2_Heading" data-parsoid='{}'>Level 2 Heading</h2>
17241 <h3 id="Level_3_Heading" data-parsoid='{}'>Level 3 Heading</h3>
17242 <h4 id="Level_4_Heading" data-parsoid='{}'>Level 4 Heading</h4>
17243 <h5 id="Level_5_Heading" data-parsoid='{}'>Level 5 Heading</h5>
17244 <h6 id="Level_6_Heading" data-parsoid='{}'>Level 6 Heading</h6>
17245 <h6 id="=Level_7_Heading=" data-parsoid='{}'><span id=".3DLevel_7_Heading.3D" typeof="mw:FallbackId"></span>=Level 7 Heading=</h6>
17246 <h6 id="==Level_8_Heading==" data-parsoid='{}'><span id=".3D.3DLevel_8_Heading.3D.3D" typeof="mw:FallbackId"></span>==Level 8 Heading==</h6>
17247 <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>
17248 <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>
17252 TOC regression (T11764)
17256 ====title 1.1.1====
17261 <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>
17263 <li class="toclevel-1 tocsection-1"><a href="#title_1"><span class="tocnumber">1</span> <span class="toctext">title 1</span></a>
17265 <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>
17267 <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>
17270 <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>
17273 <li class="toclevel-1 tocsection-5"><a href="#title_2"><span class="tocnumber">2</span> <span class="toctext">title 2</span></a>
17275 <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>
17281 <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>
17282 <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>
17283 <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>
17284 <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>
17285 <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>
17286 <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>
17291 TOC for heading containing <span id="..."></span> (T96153)
17294 ==<span id="old-anchor"></span>New title==
17296 <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>
17298 <li class="toclevel-1 tocsection-1"><a href="#New_title"><span class="tocnumber">1</span> <span class="toctext">New title</span></a></li>
17302 <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>
17307 TOC with wgMaxTocLevel=3 (T8204)
17313 ====title 1.1.1====
17318 <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>
17320 <li class="toclevel-1 tocsection-1"><a href="#title_1"><span class="tocnumber">1</span> <span class="toctext">title 1</span></a>
17322 <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>
17323 <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>
17326 <li class="toclevel-1 tocsection-5"><a href="#title_2"><span class="tocnumber">2</span> <span class="toctext">title 2</span></a>
17328 <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>
17334 <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>
17335 <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>
17336 <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>
17337 <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>
17338 <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>
17339 <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>
17344 TOC with wgMaxTocLevel=3 and two level four headings (T8204)
17350 ====Section 1.1.1====
17351 ====Section 1.1.1.1====
17354 <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>
17356 <li class="toclevel-1 tocsection-1"><a href="#Section_1"><span class="tocnumber">1</span> <span class="toctext">Section 1</span></a>
17358 <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>
17361 <li class="toclevel-1 tocsection-5"><a href="#Section_2"><span class="tocnumber">2</span> <span class="toctext">Section 2</span></a></li>
17365 <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>
17366 <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>
17367 <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>
17368 <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>
17369 <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>
17375 Resolving duplicate section names
17380 <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>
17381 <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>
17386 Resolving duplicate section names with differing case (T12721)
17391 <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>
17392 <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>
17404 Template with sections, __NOTOC__
17411 <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>
17412 <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>
17413 <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>
17414 <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>
17419 __NOEDITSECTION__ keyword
17425 <h2><span class="mw-headline" id="Section_1">Section 1</span></h2>
17426 <h2><span class="mw-headline" id="Section_2">Section 2</span></h2>
17431 Link inside a section heading
17433 ==Section with a [[Main Page|link]] in it==
17435 <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>
17440 TOC regression (T14077)
17447 <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>
17449 <li class="toclevel-1 tocsection-1"><a href="#title_1"><span class="tocnumber">1</span> <span class="toctext">title 1</span></a>
17451 <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>
17454 <li class="toclevel-1 tocsection-3"><a href="#title_2"><span class="tocnumber">2</span> <span class="toctext">title 2</span></a></li>
17458 <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>
17459 <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>
17460 <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>
17465 T3219 URL next to image (good)
17467 http://example.com [[File:Foobar.jpg]]
17469 <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>
17472 <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>
17475 # Parsoid doesn't wt2wt this cleanly because it adds <nowiki>s.
17477 Short headings with trailing space should match behavior of Parser::doHeadings (T21910)
17479 parsoid=wt2html,html2html
17482 The line above must have a trailing space!
17485 But just in case it doesn't...
17487 <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>
17488 <p>The line above must have a trailing space!
17490 <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>
17491 <p>But just in case it doesn't...
17494 <h1 id="="><span id=".3D" typeof="mw:FallbackId"></span>=</h1>
17495 <p>The line above must have a trailing space!</p>
17496 <h1 id="=_2"><span id=".3D_2" typeof="mw:FallbackId"></span>=</h1> <!--
17498 <p>But just in case it doesn't...</p>
17502 Header with special characters (T27462)
17504 The tooltips shall not show entities to the user (ie. be double escaped)
17521 <p>The tooltips shall not show entities to the user (ie. be double escaped)
17523 <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>
17525 <li class="toclevel-1 tocsection-1"><a href="#text_.3E_text"><span class="tocnumber">1</span> <span class="toctext">text > text</span></a></li>
17526 <li class="toclevel-1 tocsection-2"><a href="#text_.3C_text"><span class="tocnumber">2</span> <span class="toctext">text < text</span></a></li>
17527 <li class="toclevel-1 tocsection-3"><a href="#text_.26_text"><span class="tocnumber">3</span> <span class="toctext">text & text</span></a></li>
17528 <li class="toclevel-1 tocsection-4"><a href="#text_.27_text"><span class="tocnumber">4</span> <span class="toctext">text ' text</span></a></li>
17529 <li class="toclevel-1 tocsection-5"><a href="#text_.22_text"><span class="tocnumber">5</span> <span class="toctext">text " text</span></a></li>
17533 <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>
17536 <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>
17539 <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>
17542 <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>
17545 <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>
17549 <p>The tooltips shall not show entities to the user (ie. be double escaped)</p>
17551 <h2 id="text_>_text"><span id="text_.3E_text" typeof="mw:FallbackId"></span>text > text</h2>
17554 <h2 id="text_<_text"><span id="text_.3C_text" typeof="mw:FallbackId"></span>text < text</h2>
17557 <h2 id="text_&_text"><span id="text_.26_text" typeof="mw:FallbackId"></span>text & text</h2>
17560 <h2 id="text_'_text"><span id="text_.27_text" typeof="mw:FallbackId"></span>text ' text</h2>
17563 <h2 id='text_"_text'><span id="text_.22_text" typeof="mw:FallbackId"></span>text " text</h2>
17568 Header with space, plus and underscore as entity
17570 Id should not contain + for spaces
17572 ==Space between Text==
17575 ==Space-Entity between Text==
17578 ==Plus+between+Text==
17581 ==Plus-Entity+between+Text==
17584 ==Underscore_between_Text==
17587 ==Underscore-Entity_between_Text==
17590 [[#Space between Text]]
17591 [[#Space-Entity between Text]]
17592 [[#Plus+between+Text]]
17593 [[#Plus-Entity+between+Text]]
17594 [[#Underscore_between_Text]]
17595 [[#Underscore-Entity_between_Text]]
17597 <p>Id should not contain + for spaces
17599 <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>
17601 <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>
17602 <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>
17603 <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>
17604 <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>
17605 <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>
17606 <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>
17610 <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>
17613 <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>
17616 <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>
17619 <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>
17622 <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>
17625 <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>
17627 </p><p><a href="#Space_between_Text">#Space between Text</a>
17628 <a href="#Space-Entity_between_Text">#Space-Entity between Text</a>
17629 <a href="#Plus.2Bbetween.2BText">#Plus+between+Text</a>
17630 <a href="#Plus-Entity.2Bbetween.2BText">#Plus-Entity+between+Text</a>
17631 <a href="#Underscore_between_Text">#Underscore_between_Text</a>
17632 <a href="#Underscore-Entity_between_Text">#Underscore-Entity_between_Text</a>
17635 <p>Id should not contain + for spaces</p>
17637 <h2 id="Space_between_Text">Space between Text</h2>
17640 <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>
17643 <h2 id="Plus+between+Text"><span id="Plus.2Bbetween.2BText" typeof="mw:FallbackId"></span>Plus+between+Text</h2>
17646 <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>
17649 <h2 id="Underscore_between_Text">Underscore_between_Text</h2>
17652 <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>
17655 <p><a rel="mw:WikiLink" href="./Main_Page#Space_between_Text" data-parsoid='{"stx":"simple","a":{"href":"./Main_Page#Space_between_Text"},"sa":{"href":"#Space between Text"}}'>#Space between Text</a>
17656 <a rel="mw:WikiLink" href="./Main_Page#Space-Entity_between_Text" data-parsoid='{"stx":"simple","a":{"href":"./Main_Page#Space-Entity_between_Text"},"sa":{"href":"#Space-Entity&#32;between&#32;Text"}}'>#Space-Entity between Text</a>
17657 <a rel="mw:WikiLink" href="./Main_Page#Plus+between+Text" data-parsoid='{"stx":"simple","a":{"href":"./Main_Page#Plus+between+Text"},"sa":{"href":"#Plus+between+Text"}}'>#Plus+between+Text</a>
17658 <a rel="mw:WikiLink" href="./Main_Page#Plus-Entity+between+Text" data-parsoid='{"stx":"simple","a":{"href":"./Main_Page#Plus-Entity+between+Text"},"sa":{"href":"#Plus-Entity&#43;between&#43;Text"}}'>#Plus-Entity+between+Text</a>
17659 <a rel="mw:WikiLink" href="./Main_Page#Underscore_between_Text" data-parsoid='{"stx":"simple","a":{"href":"./Main_Page#Underscore_between_Text"},"sa":{"href":"#Underscore_between_Text"}}'>#Underscore_between_Text</a>
17660 <a rel="mw:WikiLink" href="./Main_Page#Underscore-Entity_between_Text" data-parsoid='{"stx":"simple","a":{"href":"./Main_Page#Underscore-Entity_between_Text"},"sa":{"href":"#Underscore-Entity&#95;between&#95;Text"}}'>#Underscore-Entity_between_Text</a></p>
17663 # Parsoid html2wt disabled because it adds padding spaces around =
17665 Headers with excess '=' characters
17666 (Are similar tests necessary beyond the 1st level?)
17668 parsoid=wt2html,wt2wt,html2html
17672 =''italic'' heading==
17673 ==''italic'' heading=
17675 <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>
17677 <li class="toclevel-1 tocsection-1"><a href="#foo.3D"><span class="tocnumber">1</span> <span class="toctext">foo=</span></a></li>
17678 <li class="toclevel-1 tocsection-2"><a href="#.3Dfoo"><span class="tocnumber">2</span> <span class="toctext">=foo</span></a></li>
17679 <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>
17680 <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>
17684 <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>
17685 <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>
17686 <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>
17687 <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>
17690 <h1 id="foo="><span id="foo.3D" typeof="mw:FallbackId"></span>foo=</h1>
17691 <h1 id="=foo"><span id=".3Dfoo" typeof="mw:FallbackId"></span>=foo</h1>
17692 <h1 id="italic_heading="><span id="italic_heading.3D" typeof="mw:FallbackId"></span><i>italic</i> heading=</h1>
17693 <h1 id="=italic_heading"><span id=".3Ditalic_heading" typeof="mw:FallbackId"></span>=<i>italic</i> heading</h1>
17697 HTML headers vs TOC (T25393)
17698 (__NOEDITSECTION__ for clearer output, doesn't matter here)
17710 <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>
17712 <li class="toclevel-1"><a href="#Header_1"><span class="tocnumber">1</span> <span class="toctext">Header 1</span></a>
17714 <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>
17715 <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>
17718 <li class="toclevel-1"><a href="#Header_2"><span class="tocnumber">2</span> <span class="toctext">Header 2</span></a>
17720 <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>
17721 <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>
17727 <h1><span class="mw-headline" id="Header_1">Header 1</span></h1>
17728 <h2><span class="mw-headline" id="Header_1.1">Header 1.1</span></h2>
17729 <h2><span class="mw-headline" id="Header_1.2">Header 1.2</span></h2>
17730 <h1><span class="mw-headline" id="Header_2">Header 2
17732 <h2><span class="mw-headline" id="Header_2.1">Header 2.1</span></h2>
17733 <h2><span class="mw-headline" id="Header_2.2">Header 2.2</span></h2>
17736 <h1 id="Header_1" data-parsoid='{"stx":"html"}'>Header 1</h1>
17737 <h2 id="Header_1.1" data-parsoid='{}'>Header 1.1</h2>
17738 <h2 id="Header_1.2" data-parsoid='{}'>Header 1.2</h2>
17740 <h1 id="Header_2" data-parsoid='{"stx":"html"}'>Header 2
17742 <h2 id="Header_2.1" data-parsoid='{}'>Header 2.1</h2>
17743 <h2 id="Header_2.2" data-parsoid='{}'>Header 2.2</h2>
17744 <meta property="mw:PageProp/noeditsection"/>
17748 Single-line or multiline-comments can follow headings
17750 parsoid=wt2html,wt2wt
17758 <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>
17759 <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>
17760 <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>
17763 <h2 id="foo">foo</h2><!---->
17764 <h2 id="bar">bar</h2><!--c1-->
17765 <h2 id="baz">baz</h2><!--
17771 T3219 URL next to image (broken)
17773 http://example.com[[File:Foobar.jpg]]
17775 <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>
17778 <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>
17782 T3186 news: in the middle of text
17784 http://en.wikinews.org/wiki/Wikinews:Workplace
17786 <p><a rel="nofollow" class="external free" href="http://en.wikinews.org/wiki/Wikinews:Workplace">http://en.wikinews.org/wiki/Wikinews:Workplace</a>
17792 Namespaced link must have a title
17801 Namespaced link must have a title (bad fragment version)
17803 [[Project:#fragment]]
17805 <p>[[Project:#fragment]]
17811 ### HTML tags and HTML attributes
17815 div with no attributes
17817 <div>HTML rocks</div>
17819 <div>HTML rocks</div>
17824 div with double-quoted attribute
17826 <div id="rock">HTML rocks</div>
17828 <div id="rock">HTML rocks</div>
17833 div with single-quoted attribute
17835 <div id='rock'>HTML rocks</div>
17837 <div id="rock">HTML rocks</div>
17842 div with unquoted attribute
17844 <div id=rock>HTML rocks</div>
17846 <div id="rock">HTML rocks</div>
17851 div with illegal double attributes
17853 <div id="a" id="b">HTML rocks</div>
17855 <div id="b">HTML rocks</div>
17860 div with empty attribute value, space before equals
17862 parsoid=wt2html,html2html
17864 <div class =>HTML rocks</div>
17866 <div class="">HTML rocks</div>
17869 <div class="" data-parsoid='{"stx":"html"}'>HTML rocks</div>
17873 div with multiple empty attribute values
17875 wgFragmentMode=[ 'html5', 'legacy' ]
17877 parsoid=wt2html,html2html
17879 <div id= title=>HTML rocks</div>
17881 <div id="title=">HTML rocks</div>
17884 <div id="title=" data-parsoid='{"stx":"html"}'>HTML rocks</div>
17887 # FIXME Parsoid doesn't actually match PHP here.
17888 # Probably we should use the synthetic <foo /> or <indicator>
17889 # extensions for this test, which are enabled when running parser tests.
17891 Extension tag in attribute value
17893 <span title="<translate>123</translate>">ok</span>
17894 !! html/php+disabled
17895 <p><span title="<translate>123</translate>">ok</span>
17898 <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>
17902 table with multiple empty attribute values
17904 parsoid=wt2html,html2html
17910 <table title="id=">
17916 <table title="id=">
17917 <tbody><tr><td>hi</td></tr>
17922 div with braces in attribute value
17924 <div title="{}">Foo</div>
17926 <div title="{}">Foo</div>
17929 <div title="{}">Foo</div>
17933 div with empty attribute value, no space before equals
17935 parsoid=wt2html,html2html
17937 <div class=>HTML rocks</div>
17939 <div class="">HTML rocks</div>
17942 <div class="">HTML rocks</div>
17946 HTML multiple attributes correction
17948 <p class="error" class="awesome">Awesome!</p>
17950 <p class="awesome">Awesome!</p>
17955 Table multiple attributes correction
17958 !+ class="error" class="awesome"|status
17963 <th class="awesome">status
17971 <DIV ID="x">HTML ROCKS</DIV>
17973 <div id="x">HTML ROCKS</div>
17978 Non-ASCII pseudo-tags are rendered as text
17987 Pseudo-tag with URL 'name' renders as url link
17989 <http://example.com/>
17991 <p><<a rel="nofollow" class="external free" href="http://example.com/">http://example.com/</a>>
17996 text with amp in the middle of nowhere
18000 <p>Remember AT&T?
18005 text with character entity: eacute
18007 I always thought é was a cute letter.
18009 <p>I always thought é was a cute letter.
18014 text with entity-escaped character entity-like string: eacute
18016 I always thought &eacute; was a cute letter.
18018 <p>I always thought &eacute; was a cute letter.
18023 text with undefined character entity: xacute
18025 I always thought &xacute; was a cute letter.
18027 <p>I always thought &xacute; was a cute letter.
18034 <data value="5">five</data>
18035 <time datetime="2000-01-01T00:00Z">The new millenium started</time>
18036 <mark>This highlighted text</mark>
18038 <p><data value="5">five</data>
18039 <time datetime="2000-01-01T00:00Z">The new millenium started</time>
18040 <mark>This highlighted text</mark>
18045 HTML tag with leading space is parsed as text
18049 <p>< div>foo< /div>
18053 ## Don't expect Parsoid and PHP to match, since PHP isn't exactly following
18054 ## the HTML5 parsing spec.
18056 Element with broken attribute syntax
18060 <div style=" style="123">hi</div>
18063 <div style="123">hi</div>
18067 <div style=" style=" data-parsoid='{"stx":"html","a":{"123\"":null},"sa":{"123\"":""}}'>hi</div>
18068 <div data-parsoid='{"stx":"html","a":{"=":null},"sa":{"=":""}}'>ho</div>
18072 ### Nesting tests (see T43545, T52604, T53081)
18075 # This test case is fixed in Parsoid by domino 1.0.12. (T52604)
18076 # Note that html2wt is considerably more difficult if we use <b> in
18077 # the test case, instead of <small>
18079 Ensure that HTML adoption agency algorithm is properly implemented.
18081 <small>X<small>Y</small>Z</small>
18083 <p><small>X<small>Y</small>Z</small>
18087 # This was T43545 in the PHP parser.
18091 <kbd>X<kbd>Y</kbd>Z</kbd>
18093 <p><kbd>X<kbd>Y</kbd>Z</kbd>
18097 # The following cases were T53081 in the PHP parser.
18098 # Note that there are some other nestable tags (b, i, etc) which are
18099 # not covered; see T53081 for discussion.
18104 <em>X<em>Y</em>Z</em>
18106 <p><em>X<em>Y</em>Z</em>
18111 Nesting of <strong>
18113 <strong>X<strong>Y</strong>Z</strong>
18115 <p><strong>X<strong>Y</strong>Z</strong>
18124 <p><q>X<q>Y</q>Z</q>
18131 <ruby>X<ruby>Y</ruby>Z</ruby>
18133 <p><ruby>X<ruby>Y</ruby>Z</ruby>
18140 <bdo>X<bdo>Y</bdo>Z</bdo>
18142 <p><bdo>X<bdo>Y</bdo>Z</bdo>
18154 [[Media:Foobar.jpg]]
18155 [[Media:Video.ogv]]
18156 [[:Media:Video.ogv]]
18158 <p><a href="http://example.com/images/3/3a/Foobar.jpg" class="internal" title="Foobar.jpg">Media:Foobar.jpg</a>
18159 <a href="http://example.com/images/0/00/Video.ogv" class="internal" title="Video.ogv">Media:Video.ogv</a>
18160 <a href="http://example.com/images/0/00/Video.ogv" class="internal" title="Video.ogv">Media:Video.ogv</a>
18163 <p><a rel="mw:MediaLink" href="//example.com/images/3/3a/Foobar.jpg" resource="./Media:Foobar.jpg" title="Foobar.jpg">Media:Foobar.jpg</a>
18164 <a rel="mw:MediaLink" href="//example.com/images/0/00/Video.ogv" resource="./Media:Video.ogv" title="Video.ogv">Media:Video.ogv</a>
18165 <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>
18169 Media link with text
18171 [[Media:Foobar.jpg|A neat file to look at]]
18173 <p><a href="http://example.com/images/3/3a/Foobar.jpg" class="internal" title="Foobar.jpg">A neat file to look at</a>
18176 <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>
18180 Localized media link
18184 [[Miðill:Foobar.jpg]]
18186 [[Miðill:Foobar.jpg|Icelandic]]
18188 <p><a href="http://example.com/images/3/3a/Foobar.jpg" class="internal" title="Foobar.jpg">Miðill:Foobar.jpg</a>
18189 </p><p><a href="http://example.com/images/3/3a/Foobar.jpg" class="internal" title="Foobar.jpg">Icelandic</a>
18192 <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>
18193 <p><a rel="mw:MediaLink" href="//example.com/images/3/3a/Foobar.jpg" resource="./Miðill:Foobar.jpg" title="Foobar.jpg">Icelandic</a></p>
18196 # FIXME: this is still bad HTML tag nesting
18197 # FIXME: doBlockLevels won't wrap this in a paragraph because it contains a div
18198 # Parsoid & Remex fix the p-wrapping since they operate on the DOM.
18200 Media link with nasty text
18202 parsoid=wt2html,html2html
18204 [[Media:Foobar.jpg|Safe Link<div style=display:none>" onmouseover="alert(document.cookie)" onfoo="</div>]]
18206 <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>
18209 <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>
18211 <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>
18215 Media link from missing resource (parsoid-only)
18219 <a rel="mw:MediaLink" href="http://example.com/images/3/3a/Foobar.jpg">Bat!</a>
18221 [[Media:Foobar.jpg|Bat!]]
18225 Media link from missing resource, localized (parsoid-only)
18230 <a rel="mw:MediaLink" href="http://example.com/images/3/3a/Foobar.jpg">Bat!</a>
18232 [[Miðill:Foobar.jpg|Bat!]]
18235 # This is a sanity test to ensure we don't crash or choke when given
18236 # old cached 1.7.0 HTML for media links; we don't require that the
18237 # result be "valid" because wt2wt was completely broken in 1.7.0
18239 Media link from old 1.7.0 DOM spec (crash test, parsoid-only) T198511
18243 <p>This is what Parsoid would emit (and we still handle this HTML fine):</p>
18244 <p><a rel="mw:MediaLink" href="//example.com/images/3/3a/Foobar.jpg" title="Foobar.jpg">A neat file to look at</a></p>
18245 <p>But VisualEditor would mangle the rel attribute, and give us back this:</p>
18246 <p><a rel="mw:ExtLink" href="//example.com/images/3/3a/Foobar.jpg" title="Foobar.jpg">A neat file to look at</a></p>
18247 <p>But at least we don't crash when trying to handle the mangled HTML!</p>
18249 This is what Parsoid would emit (and we still handle this HTML fine):
18251 [[Media:Foobar.jpg|A neat file to look at]]
18253 But VisualEditor would mangle the rel attribute, and give us back this:
18255 [//example.com/images/3/3a/Foobar.jpg A neat file to look at]
18257 But at least we don't crash when trying to handle the mangled HTML!
18261 Media link to nonexistent file (T3702)
18263 [[Media:No such.jpg]]
18264 [[Media:No_such file.jpg]]
18266 <p><a href="/index.php?title=Special:Upload&wpDestFile=No_such.jpg" class="new" title="No such.jpg">Media:No such.jpg</a>
18267 <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>
18270 <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>
18271 <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>
18275 Image link to nonexistent file (T3850 - good)
18277 [[File:No_such.jpg]]
18279 <p><a href="/index.php?title=Special:Upload&wpDestFile=No_such.jpg" class="new" title="File:No such.jpg">File:No such.jpg</a>
18282 <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>
18286 :Image link to nonexistent file (T3850 - bad)
18288 [[:Image:No such.jpg]]
18290 <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>
18293 <p><a rel="mw:WikiLink" href="./File:No_such.jpg" title="File:No such.jpg">Image:No such.jpg</a></p>
18297 Character reference normalization in link text (T3938)
18299 [[Main Page|this&that]]
18301 <p><a href="/wiki/Main_Page" title="Main Page">this&that</a>
18308 Test for unicode normalization
18310 The page's name is U+05d0 U+05b7, with non-canonical form U+FB2E
18314 (T21451) Links should refer to the normalized form.
18322 <p><a href="/wiki/%D7%90%D6%B7" title="אַ">אַ</a>
18323 <a href="/wiki/%D7%90%D6%B7" title="אַ">אַ</a>
18324 <a href="/wiki/%D7%90%D6%B7" title="אַ">אַ</a>
18325 <a href="/wiki/%D7%90%D6%B7" title="אַ">אַ</a>
18326 <a href="/wiki/%D7%90%D6%B7" title="אַ">אַ</a>
18331 Empty attribute crash test (T4067)
18333 <font color="">foo</font>
18335 <p><font color="">foo</font>
18340 Empty attribute crash test single-quotes (T4067)
18342 <font color=''>foo</font>
18344 <p><font color="">foo</font>
18349 Attribute test: equals, then nothing
18351 parsoid=wt2html,html2html
18353 <font color=>foo</font>
18355 <p><font color="">foo</font>
18358 <p><font color="" data-parsoid='{"stx":"html"}'>foo</font></p>
18362 Attribute test: unquoted value
18364 parsoid=wt2html,html2html
18366 <font color=x>foo</font>
18368 <p><font color="x">foo</font>
18371 <p><font color="x" data-parsoid='{"stx":"html"}'>foo</font></p>
18375 Attribute test: unquoted but illegal value (hash)
18377 <font color=#x>foo</font>
18379 <p><font color="#x">foo</font>
18383 # Parsoid does not serialize to empty attribute syntax,
18384 # so wt2wt and html2wt cases are skipped
18386 Attribute test: no value (T54330)
18388 parsoid=wt2html,html2html
18390 <font color>foo</font>
18392 <p><font color="">foo</font>
18395 <p><font color="">foo</font></p>
18399 T4095: link with three closing brackets
18403 <p><a href="/wiki/Main_Page" title="Main Page">Main Page</a>]
18406 <p><a rel="mw:WikiLink" href="./Main_Page" title="Main Page">Main Page</a>]</p>
18410 T4095: link with pipe and three closing brackets
18412 [[Main Page|link]]]
18414 <p><a href="/wiki/Main_Page" title="Main Page">link</a>]
18417 <p><a rel="mw:WikiLink" href="./Main_Page" title="Main Page">link</a>]</p>
18421 T4095: link with pipe and three closing brackets, version 2
18423 [[Main Page|[http://example.com/]]]
18425 <p><a href="/wiki/Main_Page" title="Main Page">[http://example.com/]</a>
18428 <p><a rel="mw:WikiLink" href="./Main_Page" title="Main Page">[http://example.com/]</a></p>
18437 Template:Dangerous attribute
18439 " onmouseover="alert(document.cookie)
18443 Template:Dangerous style attribute
18445 border-size: expression(alert(document.cookie))
18451 <div style="float: right; {{{1}}}">Magic div</div>
18455 T4304: HTML attribute safety (safe template; regression T4309)
18457 <div title="{{test}}"></div>
18459 <div title="This is a test template"></div>
18462 <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>
18465 # Parsoid has enough context to handle this case
18467 T4304: HTML attribute safety (dangerous template; 2309)
18469 <div title="{{dangerous attribute}}"></div>
18471 <div title=""></div>
18474 <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>
18478 T4304: HTML attribute safety (dangerous style template; 2309)
18480 <div style="{{dangerous style attribute}}"></div>
18482 <div style="/* insecure input */"></div>
18485 <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>
18489 T4304: HTML attribute safety (safe parameter; 2309)
18491 {{div style|width: 200px}}
18493 <div style="float: right; width: 200px">Magic div</div>
18496 <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>
18500 T4304: HTML attribute safety (unsafe parameter; 2309)
18502 {{div style|width: expression(alert(document.cookie))}}
18504 <div style="/* insecure input */">Magic div</div>
18507 <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>
18510 ## Parsoid output here differs; needs investigation.
18512 T4304: HTML attribute safety (unsafe breakout parameter; 2309)
18514 {{div style|"><script>alert(document.cookie)</script>}}
18516 <div style="float: right;"><script>alert(document.cookie)</script>">Magic div</div>
18520 ## Parsoid output here differs; needs investigation.
18522 T4304: HTML attribute safety (unsafe breakout parameter 2; 2309)
18524 {{div style|" ><script>alert(document.cookie)</script>}}
18526 <div style="float: right;"><script>alert(document.cookie)</script>">Magic div</div>
18531 T4304: HTML attribute safety (link)
18533 <div title="[[Main Page]]"></div>
18535 <div title="[[Main Page]]"></div>
18538 <div title="[[Main Page]]"></div>
18542 T4304: HTML attribute safety (italics)
18544 <div title="''foobar''"></div>
18546 <div title="''foobar''"></div>
18551 T4304: HTML attribute safety (bold)
18553 <div title="'''foobar'''"></div>
18555 <div title="'''foobar'''"></div>
18560 T4304: HTML attribute safety (ISBN)
18562 <div title="ISBN 1234567890"></div>
18564 <div title="ISBN 1234567890"></div>
18569 T4304: HTML attribute safety (RFC)
18571 <div title="RFC 1234"></div>
18573 <div title="RFC 1234"></div>
18578 T4304: HTML attribute safety (PMID)
18580 <div title="PMID 1234567890"></div>
18582 <div title="PMID 1234567890"></div>
18587 T4304: HTML attribute safety (web link)
18589 <div title="http://example.com/"></div>
18591 <div title="http://example.com/"></div>
18596 T4304: HTML attribute safety (named web link)
18598 <div title="[http://example.com/ link]"></div>
18600 <div title="[http://example.com/ link]"></div>
18603 <div title="[http://example.com/ link]"></div>
18607 T5244: HTML attribute safety (extension; safe)
18609 <div style="<nowiki>background:blue</nowiki>"></div>
18611 <div style="background:blue"></div>
18614 <div style="background:blue" data-parsoid='{"stx":"html","a":{"style":"background:blue"},"sa":{"style":"<nowiki>background:blue</nowiki>"}}'></div>
18618 T5244: HTML attribute safety (extension; unsafe)
18620 <div style="<nowiki>border-left:expression(alert(document.cookie))</nowiki>"></div>
18622 <div style="/* insecure input */"></div>
18625 <div style="/* insecure input */" data-parsoid='{"stx":"html","a":{"style":"/* insecure input */"},"sa":{"style":"<nowiki>border-left:expression(alert(document.cookie))</nowiki>"}}'></div>
18628 # More MSIE fun discovered by Tom Gilder
18631 MSIE CSS safety test: spurious slash
18633 <div style="background-image:u\rl(javascript:alert('boo'))">evil</div>
18635 <div style="/* insecure input */">evil</div>
18638 <div style="/* insecure input */" data-parsoid='{"stx":"html","a":{"style":"/* insecure input */"},"sa":{"style":"background-image:u\\rl(javascript:alert('boo'))"}}'>evil</div>
18642 MSIE CSS safety test: hex code
18644 <div style="background-image:u\72l(javascript:alert('boo'))">evil</div>
18646 <div style="/* insecure input */">evil</div>
18649 <div style="/* insecure input */" data-parsoid='{"stx":"html","a":{"style":"/* insecure input */"},"sa":{"style":"background-image:u\\72l(javascript:alert('boo'))"}}'>evil</div>
18653 MSIE CSS safety test: comment in url
18655 <div style="background-image:u/**/rl(javascript:alert('boo'))">evil</div>
18657 <div style="background-image:u rl(javascript:alert('boo'))">evil</div>
18660 <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>
18664 MSIE CSS safety test: comment in expression
18666 <div style="background-image:expres/**/sion(alert('boo4'))">evil4</div>
18668 <div style="background-image:expres sion(alert('boo4'))">evil4</div>
18671 <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>
18675 CSS safety test (all browsers): vertical tab (T57332 / CVE-2013-4567)
18677 <p style="font-size: 100px; background-image:url\b(https://www.google.com/images/srpr/logo6w.png)">A</p>
18679 <p style="/* invalid control char */">A</p>
18682 <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>
18686 MSIE 6 CSS safety test: Fullwidth (T57332)
18688 <p style="font-size: 100px; color: expression((title='XSSed'),'red')">A</p>
18689 <div style="top:EXPRESSION(alert())">B</div>
18691 <p style="/* insecure input */">A</p>
18692 <div style="/* insecure input */">B</div>
18695 <p style="/* insecure input */" data-parsoid='{"stx":"html","a":{"style":"/* insecure input */"},"sa":{"style":"font-size: 100px; color: expression((title='XSSed'),'red')"}}'>A</p>
18696 <div style="/* insecure input */" data-parsoid='{"stx":"html","a":{"style":"/* insecure input */"},"sa":{"style":"top:EXPRESSION(alert())"}}'>B</div>
18700 MSIE 6 CSS safety test: IPA extensions (T57332)
18702 <div style="background-image:uʀʟ(javascript:alert())">A</div>
18703 <p style="font-size: 100px; color: expʀessɪoɴ((title='XSSed'),'red')">B</p>
18705 <div style="/* insecure input */">A</div>
18706 <p style="/* insecure input */">B</p>
18709 <div style="/* insecure input */" data-parsoid='{"stx":"html","a":{"style":"/* insecure input */"},"sa":{"style":"background-image:uʀʟ(javascript:alert())"}}'>A</div>
18710 <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>
18714 MSIE 6 CSS safety test: sup/sub script (T57332)
18716 <div style="background-image:url⁽javascript:alert())">A</div>
18717 <div style="background-image:url₍javascript:alert())">B</div>
18718 <p style="font-size: 100px; color: expressioⁿ((title='XSSed'),'red')">C</p>
18720 <div style="/* insecure input */">A</div>
18721 <div style="/* insecure input */">B</div>
18722 <p style="/* insecure input */">C</p>
18725 <div style="/* insecure input */" data-parsoid='{"stx":"html","a":{"style":"/* insecure input */"},"sa":{"style":"background-image:url⁽javascript:alert())"}}'>A</div>
18726 <div style="/* insecure input */" data-parsoid='{"stx":"html","a":{"style":"/* insecure input */"},"sa":{"style":"background-image:url₍javascript:alert())"}}'>B</div>
18727 <p style="/* insecure input */" data-parsoid='{"stx":"html","a":{"style":"/* insecure input */"},"sa":{"style":"font-size: 100px; color: expressioⁿ((title='XSSed'),'red')"}}'>C</p>
18733 parsoid=wt2html,html2html
18736 title="data:text/html,<img src=1 onerror=alert(1)>"
18737 style="-o-link:attr(title);-o-link-source:current">X</div>
18739 <div title="data:text/html,<img src=1 onerror=alert(1)>" style="/* insecure input */">X</div>
18742 <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>
18746 MSIE 6 CSS safety test: Repetition markers (T57332)
18748 <p style="font-size: 100px; color: expres〱ion((title='XSSed'),'red')">A</p>
18749 <p style="font-size: 100px; color: expresゝion((title='XSSed'),'red')">B</p>
18750 <p style="font-size: 100px; color: expresーion((title='XSSed'),'red')">C</p>
18751 <p style="font-size: 100px; color: expresヽion((title='XSSed'),'red')">D</p>
18752 <p style="font-size: 100px; color: expresﹽion((title='XSSed'),'red')">E</p>
18753 <p style="font-size: 100px; color: expresﹼion((title='XSSed'),'red')">F</p>
18754 <p style="font-size: 100px; color: expresーion((title='XSSed'),'red')">G</p>
18756 <p style="/* insecure input */">A</p>
18757 <p style="/* insecure input */">B</p>
18758 <p style="/* insecure input */">C</p>
18759 <p style="/* insecure input */">D</p>
18760 <p style="/* insecure input */">E</p>
18761 <p style="/* insecure input */">F</p>
18762 <p style="/* insecure input */">G</p>
18765 <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>
18766 <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>
18767 <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>
18768 <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>
18769 <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>
18770 <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>
18771 <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>
18775 Table attribute legitimate extension
18778 !+ style="<nowiki>color:blue</nowiki>"|status
18783 <th style="color:blue">status
18789 Table attribute safety
18792 !+ style="<nowiki>border-width:expression(0+alert(document.cookie))</nowiki>"|status
18797 <th style="/* insecure input */">status
18803 CSS line continuation 1
18805 <div style="background-image: u\ rl(test.jpg);"></div>
18807 <div style="/* insecure input */"></div>
18812 CSS line continuation 2
18814 <div style="background-image: u\ rl(test.jpg); "></div>
18816 <div style="/* invalid control char */"></div>
18827 Expansion of multi-line templates in attribute values (T8255)
18829 <div style="background: {{identity|#00FF00}}">-</div>
18831 <div style="background: #00FF00">-</div>
18836 Expansion of multi-line templates in attribute values (T8255 sanity check)
18838 <div style="background:
18841 <div style="background: #00FF00">-</div>
18844 <div style="background:
18849 Expansion of multi-line templates in attribute values (T8255 sanity check 2)
18851 <div style="background: #00FF00">-</div>
18853 <div style="background: #00FF00">-</div>
18858 Tags which are hidden from tidiers cannot pass through the Sanitizer
18860 <mw:toc><script>alert();</script></mw:toc>
18862 <p><mw:toc><script>alert();</script></mw:toc>
18867 ### Parser hooks (see tests/parser/parserTestsParserHook.php for the <tag> extension)
18871 Parser hook: empty input
18882 <pre typeof="mw:Extension/tag" data-mw='{"name":"tag","attrs":{},"body":{"extsrc":""}}' data-parsoid='{}' about="#mwt2"></pre>
18885 ## Don't expect parsoid to rt this form.
18887 Parser hook: empty input using terminated empty elements
18889 parsoid=wt2html,html2html
18900 <pre typeof="mw:Extension/tag" data-mw='{"name":"tag","attrs":{}}' data-parsoid='{}' about="#mwt2"></pre>
18904 Parser hook: empty input using terminated empty elements (space before)
18915 <pre typeof="mw:Extension/tag" data-mw='{"name":"tag","attrs":{}}' data-parsoid='{}' about="#mwt2"></pre>
18919 Parser hook: basic input
18930 <pre typeof="mw:Extension/tag" data-mw='{"name":"tag","attrs":{},"body":{"extsrc":"input"}}' data-parsoid='{}' about="#mwt2"></pre>
18933 ## Don't expect parsoid to rt this form.
18935 Parser hook: case insensitive
18937 parsoid=wt2html,html2html
18948 <pre typeof="mw:Extension/tag" data-mw='{"name":"tag","attrs":{},"body":{"extsrc":"input"}}' data-parsoid='{}' about="#mwt2"></pre>
18951 ## Don't expect parsoid to rt this form.
18953 Parser hook: case insensitive, redux
18955 parsoid=wt2html,html2html
18966 <pre typeof="mw:Extension/tag" data-mw='{"name":"tag","attrs":{},"body":{"extsrc":"input"}}' data-parsoid='{}' about="#mwt2"></pre>
18970 Parser hook: nested tags
18974 <tag><tag></tag></tag>
18986 </tag></pre><p></tag>
18989 <pre typeof="mw:Extension/tag" about="#mwt2" data-mw='{"name":"tag","attrs":{},"body":{"extsrc":"<tag>"}}'></pre><p></tag></p>
18993 Parser hook: basic arguments
18995 <tag width="200" height="100" depth="50" square=""></tag>
19008 <pre typeof="mw:Extension/tag" data-mw='{"name":"tag","attrs":{"width":"200","height":"100","depth":"50","square":""},"body":{"extsrc":""}}' data-parsoid='{}' about="#mwt2"></pre>
19011 ## Don't expect parsoid to rt this form.
19013 Parser hook: basic arguments, variations
19015 parsoid=wt2html,html2html
19017 <tag width=200 height = "100" depth = '50' square></tag>
19030 <pre typeof="mw:Extension/tag" data-mw='{"name":"tag","attrs":{"width":"200","height":"100","depth":"50","square":""},"body":{"extsrc":""}}' data-parsoid='{}' about="#mwt2"></pre>
19034 Parser hook: argument containing a forward slash (T7344)
19036 <tag filename="/tmp/bla"></tag>
19041 'filename' => '/tmp/bla',
19046 <pre typeof="mw:Extension/tag" data-mw='{"name":"tag","attrs":{"filename":"/tmp/bla"},"body":{"extsrc":""}}' data-parsoid='{}' about="#mwt2"></pre>
19049 ## Don't expect parsoid to rt this form.
19051 Parser hook: empty input using terminated empty elements (T4374)
19053 parsoid=wt2html,html2html
19065 <pre typeof="mw:Extension/tag" about="#mwt2" data-mw='{"name":"tag","attrs":{"foo":"bar"}}'></pre><p>text</p>
19068 ## </tag> should be output literally since there is no matching tag that begins it
19069 ## Don't expect parsoid to rt this form.
19071 Parser hook: basic arguments using terminated empty elements (T4374)
19075 <tag width=200 height = "100" depth = '50' square/>
19092 <pre typeof="mw:Extension/tag" data-mw='{"name":"tag","attrs":{"width":"200","height":"100","depth":"50","square":""}}' about="#mwt2"></pre><p>other stuff
19096 ## Don't expect parsoid to rt this form.
19098 Parser hook: Don't allow unclosed extension tags
19104 this is a '''test'''
19106 <p>test <tag>123
19107 </p><p>this is a <b>test</b>
19110 <p>test <tag>123</p>
19112 <p>this is a <b>test</b></p>
19116 Parser hook: horizontal rule inside extension tag that outputs <pre>
19137 ### (see tests/parser/parserTestsParserHook.php for the <statictag> extension)
19141 Parser hook: static parser hook not inside a comment
19143 <statictag>hello, world</statictag>
19145 <statictag action="flush" />
19151 <p><span typeof="mw:Extension/statictag" data-mw='{"name":"statictag","attrs":{},"body":{"extsrc":"hello, world"}}' data-parsoid='{}' about="#mwt2"></span></p>
19152 <p typeof="mw:Extension/statictag" data-mw='{"name":"statictag","attrs":{"action":"flush"}}' data-parsoid='{}' about="#mwt4">hello, world</p>
19156 Parser hook: static parser hook inside a comment
19158 <!-- <statictag>hello, world</statictag> -->
19159 <statictag action="flush" />
19164 <!-- <statictag>hello, world</statictag> -->
19165 <p typeof='mw:Extension/statictag' data-mw='{"name":"statictag","attrs":{"action":"flush"}}' data-parsoid='{}' about='#mwt2'></p>
19168 # Nested template calls; this case was broken by Parser.php rev 1.506,
19172 Template:One-parameter
19174 (My parameter is: {{{1}}})
19178 Template:Map-one-parameter
19180 {{{{{1}}}|{{{2}}}}}
19184 Nested template calls
19186 {{Map-one-parameter|One-parameter|param}}
19188 <p>(My parameter is: param)
19198 Sanitizer: Closing of open tags
19200 <s></s><table></table>
19202 <p><s></s></p><table></table>
19204 <p><s data-parsoid='{"stx":"html"}'></s></p><table data-parsoid='{"stx":"html"}'></table>
19208 Sanitizer: Closing of open but not closed tags
19217 Sanitizer: Closing of closed but not open tags
19223 <p class="mw-empty-elt">
19228 Sanitizer: Closing of closed but not open table tags
19232 Table not started</td></tr></table>
19234 <p>Table not started
19239 Sanitizer: Escaping of spaces, multibyte characters, colons & other stuff in id=""
19241 wgFragmentMode=[ 'html5', 'legacy' ]
19243 <span id="æ: v">byte</span>[[#æ: v|backlink]]
19245 <p><span id="æ:_v">byte</span><a href="#æ:_v">backlink</a>
19248 <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>
19252 Sanitizer: Escaping of spaces, multibyte characters, colons & other stuff in id="" (legacy)
19254 wgFragmentMode=[ 'legacy' ]
19256 <span id="æ: v">byte</span>[[#æ: v|backlink]]
19258 <p><span id=".C3.A6:_v">byte</span><a href="#.C3.A6:_v">backlink</a>
19262 # In HTML5, the restrictions are that id must contain at least one character,
19263 # and must not contain any space characters.
19265 Sanitizer: Validating the contents of the id attribute (T6515)
19269 <br id="" /><br id="a space" />
19274 # In HTML5, id must be unique amongst all the ids in the element's home subtree.
19276 Sanitizer: Validating id attribute uniqueness (T6515, T8301)
19280 <br id="foo" /><br id="foo" />
19282 Something need to be done. foo-2 ?
19286 Sanitizer: Validating that <meta> and <link> work, but only for Microdata
19289 <meta itemprop="hello" content="world">
19290 <meta http-equiv="refresh" content="5">
19291 <meta itemprop="hello" http-equiv="refresh" content="5">
19292 <link itemprop="hello" href="{{SERVER}}">
19293 <link rel="stylesheet" href="{{SERVER}}">
19294 <link rel="stylesheet" itemprop="hello" href="{{SERVER}}">
19298 <p> <meta itemprop="hello" content="world" />
19299 <meta http-equiv="refresh" content="5">
19300 <meta itemprop="hello" content="5" />
19301 <link itemprop="hello" href="http://example.org" />
19302 <link rel="stylesheet" href="<a rel="nofollow" class="external free" href="http://example.org">http://example.org</a>">
19303 <link itemprop="hello" href="http://example.org" />
19310 Sanitizer: Strip comments from CSS attributes
19312 parsoid=wt2html,wt2wt
19314 <span style="margin:/*negate mbox-text padding */-0.125em -0.45em; /*rainbow*/rgba(255, 0, 0, 0.3)">2013</span>
19316 <p><span style="margin: -0.125em -0.45em; rgba(255, 0, 0, 0.3)">2013</span>
19319 <p><span style="margin: -0.125em -0.45em; rgba(255, 0, 0, 0.3)">2013</span></p>
19323 Sanitizer: Avoid unnecessary percent encoded characters in interwiki links
19325 [[meatball:Soft"Security]]
19327 <p><a href="http://www.usemod.com/cgi-bin/mb.pl?Soft%22Security" class="extiw" title="meatball:Soft"Security">meatball:Soft"Security</a>
19330 <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>
19334 Sanitizer: angle brackets are invalid, even in interwiki links (T182338)
19336 [[meatball:Foo<Bar]]
19337 [[meatball:Foo>Bar]]
19338 [[meatball:Foo<bar]]
19339 [[meatball:Foo>bar]]
19341 <p>[[meatball:Foo<Bar]]
19342 [[meatball:Foo>Bar]]
19343 [[meatball:Foo<bar]]
19344 [[meatball:Foo>bar]]
19347 <p>[[meatball:Foo<Bar]]
19348 [[meatball:Foo>Bar]]
19349 [[meatball:Foo<span typeof="mw:Entity" data-parsoid='{"src":"&lt;","srcContent":"<"}'><</span>bar]]
19350 [[meatball:Foo<span typeof="mw:Entity" data-parsoid='{"src":"&gt;","srcContent":">"}'>></span>bar]]</p>
19354 Language converter: output gets cut off unexpectedly (T7757)
19358 this bit is safe: }-
19360 but if we add a conversion instance: -{zh-cn:xxx;zh-tw:yyy}-
19362 then we get cut off here: }-
19364 all additional text is vanished
19366 <p>this bit is safe: }-
19367 </p><p>but if we add a conversion instance: xxx
19368 </p><p>then we get cut off here: }-
19369 </p><p>all additional text is vanished
19372 <p>this bit is safe: }-</p>
19373 <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>
19374 <p>then we get cut off here: }-</p>
19375 <p>all additional text is vanished</p>
19379 Language converter glossary rules inside attributes (T119158)
19381 language=sr variant=sr-el
19383 -{H|foAjrjvi=>sr-el:" onload="alert(1)" data-foo="}-
19385 [[File:Foobar.jpg|alt=-{}-foAjrjvi-{}-]]
19388 </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>
19391 <p><meta typeof="mw:LanguageVariant" data-mw-variant='{"add":true,"oneway":[{"f":"foAjrjvi","l":"sr-el","t":"\" onload=\"alert(1)\" data-foo=\""}]}'/></p>
19393 <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>
19397 Self closed html pairs (T7487)
19399 <center><font id="bug" />Centered text</center>
19400 <div><font id="bug2" />In div text</div>
19402 <center><font id="bug"></font>Centered text</center>
19403 <div><font id="bug2"></font>In div text</div>
19407 Punctuation: nbsp before exclamation
19411 <p>C'est grave !
19416 Punctuation: CSS !important (T13874)
19418 <div style="width:50% !important">important</div>
19420 <div style="width:50% !important">important</div>
19425 Punctuation: CSS ! important (T13874; with space after)
19427 <div style="width:50% ! important">important</div>
19429 <div style="width:50% ! important">important</div>
19434 HTML bullet list, closed tags (T7497)
19447 <ul data-parsoid='{"stx":"html"}'>
19448 <li data-parsoid='{"stx":"html"}'>One</li>
19449 <li data-parsoid='{"stx":"html"}'>Two</li>
19455 HTML bullet list, unclosed tags (T7497)
19467 <ul data-parsoid='{"stx":"html"}'>
19468 <li data-parsoid='{"stx":"html","autoInsertedEnd":true}'>One</li>
19469 <li data-parsoid='{"stx":"html","autoInsertedEnd":true}'>Two</li>
19475 HTML ordered list, closed tags (T7497)
19488 <ol data-parsoid='{"stx":"html"}'>
19489 <li data-parsoid='{"stx":"html"}'>One</li>
19490 <li data-parsoid='{"stx":"html"}'>Two</li>
19496 HTML ordered list, unclosed tags (T7497)
19509 <ol data-parsoid='{"stx":"html"}'>
19510 <li data-parsoid='{"stx":"html","autoInsertedEnd":true}'>One</li>
19511 <li data-parsoid='{"stx":"html","autoInsertedEnd":true}'>Two</li>
19517 HTML nested bullet list, closed tags (T7497)
19540 <ul data-parsoid='{"stx":"html"}'>
19541 <li data-parsoid='{"stx":"html"}'>One</li>
19542 <li data-parsoid='{"stx":"html"}'>Two:
19543 <ul data-parsoid='{"stx":"html"}'>
19544 <li data-parsoid='{"stx":"html"}'>Sub-one</li>
19545 <li data-parsoid='{"stx":"html"}'>Sub-two</li>
19552 HTML nested bullet list, open tags (T7497)
19574 HTML nested ordered list, closed tags (T7497)
19599 HTML nested ordered list, open tags (T7497)
19636 HTML ordered list item with parameters oddity
19638 <ol><li id="fragment">One</li>
19641 <ol><li id="fragment">One</li>
19646 # parsoid doesn't explicitly mark autonumbered links, see T55505
19648 T7918: autonumbering
19650 [http://first/] [http://second] [ftp://ftp]
19654 [mailto:enclosed@mail.tld With target]
19656 [mailto:enclosed@mail.tld]
19658 mailto:inline@mail.tld
19660 <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>
19661 </p><p><a rel="nofollow" class="external free" href="ftp://inlineftp">ftp://inlineftp</a>
19662 </p><p><a rel="nofollow" class="external text" href="mailto:enclosed@mail.tld">With target</a>
19663 </p><p><a rel="nofollow" class="external autonumber" href="mailto:enclosed@mail.tld">[4]</a>
19664 </p><p><a rel="nofollow" class="external free" href="mailto:inline@mail.tld">mailto:inline@mail.tld</a>
19667 <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>
19668 <p><a rel="mw:ExtLink" class="external free" href="ftp://inlineftp">ftp://inlineftp</a></p>
19669 <p><a rel="mw:ExtLink" class="external text" href="mailto:enclosed@mail.tld">With target</a></p>
19670 <p><a rel="mw:ExtLink" class="external autonumber" href="mailto:enclosed@mail.tld"></a></p>
19671 <p><a rel="mw:ExtLink" class="external free" href="mailto:inline@mail.tld">mailto:inline@mail.tld</a></p>
19676 # Security and HTML correctness
19677 # From Nick Jenkins' fuzz testing
19681 Fuzz testing: Parser13
19695 # Note that Parsoid output differs from the PHP parser here: the PHP
19696 # parser breaks the URL for the magic word, while in Parsoid the URL
19697 # production takes precedence.
19699 Fuzz testing: Parser14
19704 <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>
19705 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>
19707 <li class="toclevel-1 tocsection-1"><a href="#onmouseover.3D"><span class="tocnumber">1</span> <span class="toctext">onmouseover=</span></a></li>
19713 <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>
19714 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>
19716 <li class="toclevel-1 tocsection-1"><a href="#onmouseover.3D"><span class="tocnumber">1</span> <span class="toctext">onmouseover=</span></a></li>
19720 <h2 id="onmouseover="><span id="onmouseover.3D" typeof="mw:FallbackId"></span>onmouseover=</h2>
19721 <p><a rel="mw:ExtLink" class="external free" href="http://__TOC__" data-parsoid='{"stx":"url"}'>http://__TOC__</a></p>
19725 Fuzz testing: Parser14-table
19727 parsoid=wt2html,html2html
19732 <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>
19733 <table style="__TOC__">
19738 <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>
19739 <table style="__TOC__">
19746 <table style="__TOC__"></table>
19749 # Known to produce bogus xml (extra </td>)
19750 # Don't add the html/php section since it generates broken HTML
19752 Fuzz testing: Parser16
19769 Fuzz testing: Parser21
19772 !irc://{{ftp://a" onmouseover="alert('hello world');"
19777 <th><a rel="nofollow" class="external free" href="irc://{{ftp://a">irc://{{ftp://a</a>" onmouseover="alert('hello world');"
19787 Fuzz testing: Parser22
19789 http://===r:::https://b
19793 <p><a rel="nofollow" class="external free" href="http://===r:::https://b">http://===r:::https://b</a>
19801 ## Remex doesn't account for fostered content.
19802 ## Known to produce bad XML for now
19804 Fuzz testing: Parser24
19811 | {{{{SSSll!!!!!!!VVVV)]]][[Special:*xxxxxxx--><noinclude>}}}} >
19812 <br style="onmouseover='alert(document.cookie);' " />
19814 MOVE YOUR MOUSE CURSOR OVER THIS TEXT
19819 <u class="|">}}}} >
19820 <br style="onmouseover='alert(document.cookie);'" />
19822 MOVE YOUR MOUSE CURSOR OVER THIS TEXT
19832 <u class="|">}}}} >
19833 <br style="onmouseover='alert(document.cookie);'" />
19835 MOVE YOUR MOUSE CURSOR OVER THIS TEXT
19836 </u><table><tbody><tr>
19840 </tbody></table><p><u class="|">
19843 <p data-parsoid='{"fostered":true,"autoInsertedEnd":true,"autoInsertedStart":true}'>
19845 <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>"}'/>}}}} >
19846 <br style="onmouseover='alert(document.cookie);' " data-parsoid='{"stx":"html","selfClose":true}'/>
19848 MOVE YOUR MOUSE CURSOR OVER THIS TEXT</u></p>
19849 <table data-parsoid='{"autoInsertedEnd":true}'><tbody><tr data-parsoid='{"autoInsertedStart":true}'><td></td></tr></tbody></table>
19852 # Note: the current result listed for this is not what the original one was,
19853 # but the original bug was JavaScript injection, which is fixed in any case.
19854 # It's not clear that the original result listed was any more correct than the
19855 # current one. Original result:
19858 # <li class="||">
19859 # }}}blah" onmouseover="alert('hello world');" align="left"<b>MOVE MOUSE CURSOR OVER HERE</b>
19861 Fuzz testing: Parser25 (T8055)
19867 }}}blah" onmouseover="alert('hello world');" align="left"'''MOVE MOUSE CURSOR OVER HERE
19869 <p><LI CLASS=blah" onmouseover="alert('hello world');" align="left"<b>MOVE MOUSE CURSOR OVER HERE</b>
19872 <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"]}'>
19873 </span><p about="#mwt1"><LI CLASS=blah" onmouseover="alert('hello world');" align="left"<b>MOVE MOUSE CURSOR OVER HERE</b></p>
19877 Fuzz testing: URL adjacent extension (with space, clean)
19879 http://example.com <nowiki>junk</nowiki>
19881 <p><a rel="nofollow" class="external free" href="http://example.com">http://example.com</a> junk
19884 <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>
19888 Fuzz testing: URL adjacent extension (no space, dirty; nowiki)
19890 http://example.com<nowiki>junk</nowiki>
19892 <p><a rel="nofollow" class="external free" href="http://example.com">http://example.com</a>junk
19895 <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>
19899 Fuzz testing: URL adjacent extension (no space, dirty; pre)
19901 http://example.com<pre>junk</pre>
19903 <a rel="nofollow" class="external free" href="http://example.com">http://example.com</a><pre>junk</pre>
19906 <p><a rel="nofollow" class="external free" href="http://example.com">http://example.com</a></p><pre>junk</pre>
19908 <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>
19912 Fuzz testing: image with bogus manual thumbnail
19914 [[Image:foobar.jpg|thumbnail= ]]
19916 <div class="thumb tright"><div class="thumbinner" style="width:182px;">Error creating thumbnail: <div class="thumbcaption"></div></div></div>
19919 <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>
19922 # Parsoid will emit the newline literally in wt2wt; see next test case.
19924 Fuzz testing: encoded newline in generated HTML replacements (T8577)
19928 <pre dir=" "></pre>
19930 <pre dir=" "></pre>
19933 <pre typeof="mw:Extension/pre" about="#mwt2" dir="
19934 " data-mw='{"name":"pre","attrs":{"dir":"\n"},"body":{"extsrc":""}}'></pre>
19938 Fuzz testing: encoded newline in generated HTML replacements, html2wt (T8577)
19942 <pre typeof="mw:Extension/pre" about="#mwt2" dir="
19943 " data-mw='{"name":"pre","attrs":{"dir":"\n"},"body":{"extsrc":""}}'></pre>
19953 Templates in extension attributes are not expanded
19955 <pre dir="{{echo|ltr}}"></pre>
19957 <pre dir="{{echo|ltr}}"></pre>
19960 <pre typeof="mw:Extension/pre" about="#mwt2" dir="{{echo|ltr}}" data-mw='{"name":"pre","attrs":{"dir":"{{echo|ltr}}"},"body":{"extsrc":""}}'></pre>
19964 Parsing optional HTML elements (T8171)
19969 <td> Some tabular data</td>
19970 <td> More tabular data ...
19971 <td> And yet som tabular data</td>
19977 <td> Some tabular data</td>
19978 <td> More tabular data ...
19979 </td><td> And yet som tabular data</td>
19986 Correct handling of <td>, <tr> (T8171)
19991 <td> Some tabular data</td>
19992 <td> More tabular data ...</td>
19993 <td> And yet som tabular data</td>
19999 <td> Some tabular data</td>
20000 <td> More tabular data ...</td>
20001 <td> And yet som tabular data</td>
20009 Parsing crashing regression (fr:JavaScript)
20013 <p></body></x>
20018 Inline wiki vs wiki block nesting
20024 <p><b>Bold paragraph</b>
20025 </p><p>New wiki paragraph
20029 # FIXME: The current php output is documented
20030 # and desired output is the parsoid target.
20032 Inline HTML vs wiki block nesting
20038 <p><b>Bold paragraph
20039 </p><p>New wiki paragraph</b>
20042 <p><b>Bold paragraph
20043 </b></p><p><b>New wiki paragraph
20046 <p><b>Bold paragraph</b>
20047 </p><p>New wiki paragraph
20051 # Original result was this:
20052 # <p><b>bold</b><b>bold<i>bolditalics</i></b>
20054 # While that might be marginally more intuitive, maybe, the six-apostrophe
20055 # construct is clearly pathological and the result stated here (which is what
20056 # the parser actually does) is about as reasonable as anything.
20058 Mixing markup for italics and bold
20061 '''bold''''''bold''bolditalics'''''
20063 <p>'<i>bold'</i><b>bold<i>bolditalics</i></b>
20071 Article for special page transclusion test
20075 Special page transclusion
20078 {{Special:Prefixindex/Xyzzyx}}
20080 <ul class="mw-prefixindex-list"><li><a href="/wiki/Xyzzyx" title="Xyzzyx">Xyzzyx</a></li>
20086 Special page transclusion twice (T7021)
20089 {{Special:Prefixindex/Xyzzyx}}
20090 {{Special:Prefixindex/Xyzzyx}}
20092 <ul class="mw-prefixindex-list"><li><a href="/wiki/Xyzzyx" title="Xyzzyx">Xyzzyx</a></li>
20094 <ul class="mw-prefixindex-list"><li><a href="/wiki/Xyzzyx" title="Xyzzyx">Xyzzyx</a></li>
20100 Transclusion of default MediaWiki message
20102 {{MediaWiki:Mainpage}}
20109 Transclusion of nonexistent MediaWiki message
20111 {{MediaWiki:Mainpagexxx}}
20113 <p><a href="/index.php?title=MediaWiki:Mainpagexxx&action=edit&redlink=1" class="new" title="MediaWiki:Mainpagexxx (page does not exist)">MediaWiki:Mainpagexxx</a>
20118 Transclusion of MediaWiki message with underscore
20120 {{MediaWiki:history_short}}
20127 Transclusion of MediaWiki message with space
20129 {{MediaWiki:history short}}
20136 Invalid header with following text
20146 Section extraction test (section 0)
20166 Section extraction test (section 1)
20188 Section extraction test (section 2)
20209 Section extraction test (section 3)
20229 Section extraction test (section 4)
20253 Section extraction test (section 5)
20273 Section extraction test (section 6)
20294 Section extraction test (section 7)
20314 Section extraction test (section 8)
20334 Section extraction test (section 9)
20355 Section extraction test (section 10)
20375 Section extraction test (nonexistent section 11)
20394 Section extraction test with bogus heading (section 1)
20399 ==bogus== not a legal section
20403 ==bogus== not a legal section
20407 Section extraction test with bogus heading (section 2)
20412 ==bogus== not a legal section
20419 Section extraction test with comment after heading (section 1)
20431 Section extraction test with comment after heading (section 2)
20443 Section extraction test with bogus <nowiki> heading (section 1)
20448 ==bogus== <nowiki>not a legal section</nowiki>
20452 ==bogus== <nowiki>not a legal section</nowiki>
20456 Section extraction test with bogus <nowiki> heading (section 2)
20461 ==bogus== <nowiki>not a legal section</nowiki>
20467 # Formerly testing for T4587, now resolved by the use of unmarked sections
20468 # instead of respecting commented sections
20470 Section extraction prefixed by comment (section 1)
20481 Section extraction prefixed by comment (section 2)
20491 # Formerly testing for T4607, now resolved by the use of unmarked sections
20492 # instead of respecting HTML-style headings
20494 Section extraction, mixed wiki and html (section 1)
20510 Section extraction, mixed wiki and html (section 2)
20526 # Formerly testing for T5342
20528 Section extraction, heading surrounded by <noinclude>
20532 <noinclude>==unmarked==</noinclude>
20538 # Test behavior of T21910
20540 Sectiion with all-equals
20545 The line above must have a trailing space
20548 But just in case it doesn't...
20552 But just in case it doesn't...
20556 Section replacement test (section 0)
20587 Section replacement test (section 1)
20616 Section replacement test (section 2)
20646 Section replacement test (section 3)
20677 Section replacement test (section 4)
20704 Section replacement test (section 5)
20735 Section replacement test (section 6)
20765 Section replacement test (section 7)
20796 Section replacement test (section 8)
20827 Section replacement test (section 9)
20856 Section replacement test (section 10)
20886 Section replacement test with initial whitespace (T15728)
20890 Preformatted initial line
20894 Preformatted initial line
20901 Section extraction, heading followed by pre with 20 spaces (T8398)
20913 Section extraction, heading followed by pre with 19 spaces (T8398 sanity check)
20926 Section extraction, <pre> around bogus header (T12309)
20943 Section replacement, <pre> around bogus header (T12309)
20964 Handling of 
 in URLs
20968 <ul><li><a rel="nofollow" class="external free" href="irc://%0Aa">irc://%0Aa</a></li></ul>
20971 <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>
20975 Handling of %0A in URLs
20979 <ul><li><a rel="nofollow" class="external free" href="irc://%0Aa">irc://%0Aa</a></li></ul>
20982 <ul><li><a rel="mw:ExtLink" class="external free" href="irc://%0Aa">irc://%0Aa</a></li></ul>
20985 # The PHP parser strips the empty tags out for giggles; parsoid doesn't.
20987 5 quotes, code coverage +1 line
20994 <p><b><i></i></b></p>
20997 # same html as previous, but wikitext adjusted to match parsoid html2wt
20998 # note that wt2html and html2html will put the <i> before the <b>
21000 5 quotes, code coverage +1 line w/ nowiki (1)
21002 parsoid=wt2wt,html2wt
21004 '''''<nowiki/>'''''
21009 <p><b><i></i></b></p>
21012 # same as previous, just swapping the <i> and <b>
21014 5 quotes, code coverage +1 line w/ nowiki (2)
21016 '''''<nowiki/>'''''
21021 <p><i><b></b></i></p>
21025 Special:Search page linking.
21029 <p><a href="/wiki/Special:Search" title="Special:Search">Special:Search</a>
21034 {{!}} is a magic word
21036 {{!}} is a magic word there and {{!}} is still a magic word here
21037 | is not a magic word here but {{!}} is still a magic word here
21039 <p>| is a magic word there and | is still a magic word here
21040 | is not a magic word here but | is still a magic word here
21043 <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
21044 | 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>
21050 title=[[Parser test]]
21064 *{{SUBJECTPAGENAME}}
21065 *{{SUBJECTPAGENAMEE}}
21068 *{{NAMESPACENUMBER}}
21073 *{{Dynamic|{{NUMBEROFUSERS}}|{{NUMBEROFPAGES}}|{{CURRENTVERSION}}|{{CONTENTLANGUAGE}}|{{DIRECTIONMARK}}|{{CURRENTTIMESTAMP}}|{{NUMBEROFARTICLES}}}}
21075 <ul><li>Parser test</li>
21076 <li>Parser_test</li>
21077 <li>Parser test</li>
21078 <li>Parser_test</li>
21079 <li>Parser test</li>
21080 <li>Parser_test</li>
21081 <li>Parser test</li>
21082 <li>Parser_test</li>
21083 <li>Parser test</li>
21084 <li>Parser_test</li>
21085 <li>Talk:Parser test</li>
21086 <li>Talk:Parser_test</li>
21087 <li>Parser test</li>
21088 <li>Parser_test</li>
21096 <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>
21099 ### Note: Above tests excludes the "{{NUMBEROFADMINS}}" magic word because it generates a MySQL error when included.
21102 Gallery with valid attributes
21104 <gallery type="123" summary="345">
21105 File:File:Foobar.jpg
21108 <ul class="gallery mw-gallery-traditional" type="123">
21109 <li class="gallerybox" style="width: 155px"><div style="width: 155px">
21110 <div class="thumb" style="height: 150px;">File:Foobar.jpg</div>
21111 <div class="gallerytext">
21117 <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"}}'>
21118 <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>
21122 ## Parsoid thinks the "centre" here is a property, not a caption.
21127 "modes": ["wt2html"],
21128 "nativeGallery": true
21136 image4 |300px| centre
21137 image5.svg| http://///////
21142 <ul class="gallery mw-gallery-traditional">
21143 <li class="gallerybox" style="width: 155px"><div style="width: 155px">
21144 <div class="thumb" style="height: 150px;">Image1.png</div>
21145 <div class="gallerytext">
21148 <li class="gallerybox" style="width: 155px"><div style="width: 155px">
21149 <div class="thumb" style="height: 150px;">Image2.gif</div>
21150 <div class="gallerytext">
21153 <li class="gallerybox" style="width: 155px"><div style="width: 155px">
21154 <div class="thumb" style="height: 150px;">Image3</div>
21155 <div class="gallerytext">
21158 <li class="gallerybox" style="width: 155px"><div style="width: 155px">
21159 <div class="thumb" style="height: 150px;">Image4</div>
21160 <div class="gallerytext">
21165 <li class="gallerybox" style="width: 155px"><div style="width: 155px">
21166 <div class="thumb" style="height: 150px;">Image5.svg</div>
21167 <div class="gallerytext">
21168 <p><a rel="nofollow" class="external free" href="http://///////">http://///////</a>
21172 <li class="gallerybox" style="width: 155px"><div style="width: 155px">
21173 <div class="thumb" style="height: 150px;">* image6</div>
21174 <div class="gallerytext">
21180 <ul class="gallery mw-gallery-traditional" typeof="mw:Extension/gallery" about="#mwt3" data-mw='{"name":"gallery","attrs":{},"body":{}}'>
21181 <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>
21182 <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>
21183 <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>
21184 <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>
21185 <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>
21186 <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>
21191 Gallery (with options, html)
21194 "modes": ["wt2html", "html2html"],
21195 "nativeGallery": true
21198 <gallery widths="70px" heights="40px" perrow="2" caption="Foo [[Main Page]]">
21199 File:Nonexistent.jpg|caption
21200 File:Nonexistent.jpg
21201 image:foobar.jpg|some '''caption''' [[Main Page]]
21203 image:foobar.jpg|Blabla|alt=This is a foo-bar.|blabla.
21206 <ul class="gallery mw-gallery-traditional" style="max-width: 226px;_width: 226px;">
21207 <li class='gallerycaption'>Foo <a href="/wiki/Main_Page" title="Main Page">Main Page</a></li>
21208 <li class="gallerybox" style="width: 105px"><div style="width: 105px">
21209 <div class="thumb" style="height: 70px;">Nonexistent.jpg</div>
21210 <div class="gallerytext">
21215 <li class="gallerybox" style="width: 105px"><div style="width: 105px">
21216 <div class="thumb" style="height: 70px;">Nonexistent.jpg</div>
21217 <div class="gallerytext">
21220 <li class="gallerybox" style="width: 105px"><div style="width: 105px">
21221 <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>
21222 <div class="gallerytext">
21223 <p>some <b>caption</b> <a href="/wiki/Main_Page" title="Main Page">Main Page</a>
21227 <li class="gallerybox" style="width: 105px"><div style="width: 105px">
21228 <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>
21229 <div class="gallerytext">
21232 <li class="gallerybox" style="width: 105px"><div style="width: 105px">
21233 <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>
21234 <div class="gallerytext">
21242 <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":{}}'>
21243 <li class="gallerycaption">Foo <a rel="mw:WikiLink" href="./Main_Page" title="Main Page">Main Page</a></li>
21244 <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>
21245 <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>
21246 <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>
21247 <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>
21248 <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>
21253 Gallery (with options, extsrc)
21256 "nativeGallery": false
21259 <gallery widths="70px" heights="40px" perrow="2" caption="Foo [[Main Page]]">
21260 File:Nonexistent.jpg|caption
21261 File:Nonexistent.jpg
21262 image:foobar.jpg|some '''caption''' [[Main Page]]
21264 image:foobar.jpg|Blabla|alt=This is a foo-bar.|blabla.
21267 <ul class="gallery mw-gallery-traditional" style="max-width: 226px;_width: 226px;">
21268 <li class='gallerycaption'>Foo <a href="/wiki/Main_Page" title="Main Page">Main Page</a></li>
21269 <li class="gallerybox" style="width: 105px"><div style="width: 105px">
21270 <div class="thumb" style="height: 70px;">Nonexistent.jpg</div>
21271 <div class="gallerytext">
21276 <li class="gallerybox" style="width: 105px"><div style="width: 105px">
21277 <div class="thumb" style="height: 70px;">Nonexistent.jpg</div>
21278 <div class="gallerytext">
21281 <li class="gallerybox" style="width: 105px"><div style="width: 105px">
21282 <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>
21283 <div class="gallerytext">
21284 <p>some <b>caption</b> <a href="/wiki/Main_Page" title="Main Page">Main Page</a>
21288 <li class="gallerybox" style="width: 105px"><div style="width: 105px">
21289 <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>
21290 <div class="gallerytext">
21293 <li class="gallerybox" style="width: 105px"><div style="width: 105px">
21294 <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>
21295 <div class="gallerytext">
21303 <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"}}'>
21304 <li class="gallerycaption">Foo <a rel="mw:WikiLink" href="./Main_Page" title="Main Page">Main Page</a></li>
21305 <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>
21306 <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>
21307 <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>
21308 <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>
21309 <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>
21314 Gallery (without px units)
21316 <gallery widths="70" heights="40">
21320 <ul class="gallery mw-gallery-traditional">
21321 <li class="gallerybox" style="width: 105px"><div style="width: 105px">
21322 <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>
21323 <div class="gallerytext">
21329 <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"}}'>
21330 <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>
21335 Gallery (with invalid units)
21337 <gallery widths="70em" heights="40em">
21341 <ul class="gallery mw-gallery-traditional">
21342 <li class="gallerybox" style="width: 155px"><div style="width: 155px">
21343 <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>
21344 <div class="gallerytext">
21350 <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"}}'>
21351 <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>
21356 Gallery with link that has fragment
21359 "modes": ["wt2html", "html2html"],
21360 "nativeGallery": true
21364 image:foobar.jpg|link=Main_Page
21365 image:foobar.jpg|link=Main_Page#section
21366 image:foobar.jpg|link=Main Page#section|caption
21369 <ul class="gallery mw-gallery-traditional">
21370 <li class="gallerybox" style="width: 155px"><div style="width: 155px">
21371 <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>
21372 <div class="gallerytext">
21375 <li class="gallerybox" style="width: 155px"><div style="width: 155px">
21376 <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>
21377 <div class="gallerytext">
21380 <li class="gallerybox" style="width: 155px"><div style="width: 155px">
21381 <div class="thumb" style="width: 150px;"><div style="margin:68px auto;"><a href="/wiki/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>
21382 <div class="gallerytext">
21390 <ul class="gallery mw-gallery-traditional" typeof="mw:Extension/gallery" about="#mwt2" data-mw='{"name":"gallery","attrs":{},"body":{}}'>
21391 <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>
21392 <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>
21393 <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>
21397 ## Whoops, Parsoid shouldn't be parsing templates in the attribute caption!
21399 Gallery with template inside caption
21402 "nativeGallery": true
21405 <gallery caption="{{echo|hi}}">
21406 File:Foobar.jpg|{{echo|ho}}
21409 <ul class="gallery mw-gallery-traditional">
21410 <li class='gallerycaption'>{{echo|hi}}</li>
21411 <li class="gallerybox" style="width: 155px"><div style="width: 155px">
21412 <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>
21413 <div class="gallerytext">
21421 <ul class="gallery mw-gallery-traditional" typeof="mw:Extension/gallery" about="#mwt6" data-mw='{"name":"gallery","attrs":{},"body":{}}'>
21422 <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>
21423 <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>
21428 Gallery with wikitext inside caption
21431 "nativeGallery": true
21435 File:Foobar.jpg|alt=galleryalt|[[File:Foobar.jpg|alt=inneralt|20x20px|desc]]
21436 File:Foobar.jpg|alt=galleryalt|{{Test|unamedParam|alt=param}}
21439 <ul class="gallery mw-gallery-traditional">
21440 <li class="gallerybox" style="width: 155px"><div style="width: 155px">
21441 <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>
21442 <div class="gallerytext">
21443 <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>
21447 <li class="gallerybox" style="width: 155px"><div style="width: 155px">
21448 <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>
21449 <div class="gallerytext">
21450 <p>This is a test template
21457 <ul class="gallery mw-gallery-traditional" typeof="mw:Extension/gallery" about="#mwt6" data-mw='{"name":"gallery","attrs":{},"body":{}}'>
21458 <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>
21459 <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>
21464 Gallery (with showfilename option)
21467 "nativeGallery": true
21470 <gallery showfilename="">
21471 File:Nonexistent.jpg|caption
21472 File:Nonexistent.jpg
21473 File:Foobar.jpg|some '''caption''' [[Main Page]]
21477 <ul class="gallery mw-gallery-traditional">
21478 <li class="gallerybox" style="width: 155px"><div style="width: 155px">
21479 <div class="thumb" style="height: 150px;">Nonexistent.jpg</div>
21480 <div class="gallerytext">
21481 <p><a href="/wiki/File:Nonexistent.jpg" class="galleryfilename galleryfilename-truncate" title="File:Nonexistent.jpg">Nonexistent.jpg</a>
21486 <li class="gallerybox" style="width: 155px"><div style="width: 155px">
21487 <div class="thumb" style="height: 150px;">Nonexistent.jpg</div>
21488 <div class="gallerytext">
21489 <p><a href="/wiki/File:Nonexistent.jpg" class="galleryfilename galleryfilename-truncate" title="File:Nonexistent.jpg">Nonexistent.jpg</a>
21493 <li class="gallerybox" style="width: 155px"><div style="width: 155px">
21494 <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>
21495 <div class="gallerytext">
21496 <p><a href="/wiki/File:Foobar.jpg" class="galleryfilename galleryfilename-truncate" title="File:Foobar.jpg">Foobar.jpg</a>
21497 some <b>caption</b> <a href="/wiki/Main_Page" title="Main Page">Main Page</a>
21501 <li class="gallerybox" style="width: 155px"><div style="width: 155px">
21502 <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>
21503 <div class="gallerytext">
21504 <p><a href="/wiki/File:Foobar.jpg" class="galleryfilename galleryfilename-truncate" title="File:Foobar.jpg">Foobar.jpg</a>
21511 <ul class="gallery mw-gallery-traditional" typeof="mw:Extension/gallery" about="#mwt3" data-mw='{"name":"gallery","attrs":{"showfilename":""},"body":{}}'>
21512 <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>
21513 <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>
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"><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>
21515 <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>
21519 ## Should Parsoid be preserving these variations? See T151367
21521 Gallery (with namespace-less filenames)
21524 "modes": ["wt2html", "html2html"],
21525 "nativeGallery": true
21529 File:Nonexistent.jpg
21535 <ul class="gallery mw-gallery-traditional">
21536 <li class="gallerybox" style="width: 155px"><div style="width: 155px">
21537 <div class="thumb" style="height: 150px;">Nonexistent.jpg</div>
21538 <div class="gallerytext">
21541 <li class="gallerybox" style="width: 155px"><div style="width: 155px">
21542 <div class="thumb" style="height: 150px;">Nonexistent.jpg</div>
21543 <div class="gallerytext">
21546 <li class="gallerybox" style="width: 155px"><div style="width: 155px">
21547 <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>
21548 <div class="gallerytext">
21551 <li class="gallerybox" style="width: 155px"><div style="width: 155px">
21552 <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>
21553 <div class="gallerytext">
21559 <ul class="gallery mw-gallery-traditional" typeof="mw:Extension/gallery" about="#mwt2" data-mw='{"name":"gallery","attrs":{},"body":{}}'>
21560 <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>
21561 <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>
21562 <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>
21563 <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>
21568 Gallery override link with wikilink (T36852)
21571 "nativeGallery": true
21575 File:Foobar.jpg|alt=galleryalt|link=Wikilink
21578 <ul class="gallery mw-gallery-traditional">
21579 <li class="gallerybox" style="width: 155px"><div style="width: 155px">
21580 <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>
21581 <div class="gallerytext">
21587 <ul class="gallery mw-gallery-traditional" typeof="mw:Extension/gallery" about="#mwt2" data-mw='{"name":"gallery","attrs":{},"body":{}}'>
21588 <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>
21593 Gallery override link with absolute external link (T36852)
21596 "nativeGallery": true
21600 File:Foobar.jpg|alt=galleryalt|link=http://www.example.org
21603 <ul class="gallery mw-gallery-traditional">
21604 <li class="gallerybox" style="width: 155px"><div style="width: 155px">
21605 <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>
21606 <div class="gallerytext">
21612 <ul class="gallery mw-gallery-traditional" typeof="mw:Extension/gallery" about="#mwt2" data-mw='{"name":"gallery","attrs":{},"body":{}}'>
21613 <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>
21618 Gallery override link with absolute external link with LanguageConverter
21623 File:foobar.jpg|caption|alt=galleryalt|link=http://www.example.org
21626 <ul class="gallery mw-gallery-traditional">
21627 <li class="gallerybox" style="width: 155px"><div style="width: 155px">
21628 <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>
21629 <div class="gallerytext">
21637 <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"}}'>
21638 <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>
21643 Gallery override link with malicious javascript (T36852)
21646 "modes": ["wt2html", "html2html"],
21647 "nativeGallery": true
21651 File:Foobar.jpg|alt=galleryalt|link=" onclick="alert('malicious javascript code!');
21654 <ul class="gallery mw-gallery-traditional">
21655 <li class="gallerybox" style="width: 155px"><div style="width: 155px">
21656 <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>
21657 <div class="gallerytext">
21663 <ul class="gallery mw-gallery-traditional" typeof="mw:Extension/gallery" about="#mwt2" data-mw='{"name":"gallery","attrs":{},"body":{}}'>
21664 <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>
21668 # Note that parsoid uses the invalid link as a caption, PHP does not.
21670 Gallery with invalid title as link (T45964)
21673 "modes": ["wt2html", "html2html"],
21674 "nativeGallery": true
21678 File:Foobar.jpg|link=<
21681 <ul class="gallery mw-gallery-traditional">
21682 <li class="gallerybox" style="width: 155px"><div style="width: 155px">
21683 <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>
21684 <div class="gallerytext">
21690 <ul class="gallery mw-gallery-traditional" typeof="mw:Extension/gallery" about="#mwt2" data-mw='{"name":"gallery","attrs":{},"body":{}}'>
21691 <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>
21696 Serialize gallery without attrs in data-mw
21699 "modes": ["html2wt"],
21700 "nativeGallery": true
21703 <ul class="gallery mw-gallery-traditional" typeof="mw:Extension/gallery" about="#mwt2" data-mw='{"name":"gallery","body":{}}'>
21704 <li class="gallerycaption">123</li>
21705 <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>
21708 <gallery caption="123">
21714 Gallery with class and style attributes
21717 "nativeGallery": true
21720 <gallery class="center" style="text-align: center;">
21724 <ul class="gallery mw-gallery-traditional center" style="text-align: center;">
21725 <li class="gallerybox" style="width: 155px"><div style="width: 155px">
21726 <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>
21727 <div class="gallerytext">
21733 <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":{}}'>
21734 <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>
21739 Gallery in slideshow mode
21742 "nativeGallery": true
21745 <gallery mode="slideshow" showthumbnails="">
21749 <ul class="gallery mw-gallery-slideshow" data-showthumbnails="1">
21750 <li class="gallerybox" style="width: 155px"><div style="width: 155px">
21751 <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>
21752 <div class="gallerytext">
21758 <ul class="gallery mw-gallery-slideshow" data-showthumbnails="1" typeof="mw:Extension/gallery" about="#mwt2" data-mw='{"name":"gallery","attrs":{"mode":"slideshow","showthumbnails":""},"body":{}}'>
21759 <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>
21764 Serialize gallery image captions on a line
21767 "modes": ["html2wt"],
21768 "nativeGallery": true
21771 <ul class="gallery mw-gallery-traditional" typeof="mw:Extension/gallery" about="#mwt2" data-mw='{"name":"gallery","attrs":{},"body":{}}'>
21772 <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>
21773 <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>
21777 File:Foobar.jpg| hi ho
21778 File:Foobar.jpg|hi<br />ho
21783 HTML Hex character encoding (spells the word "JavaScript")
21785 parsoid=wt2html,wt2wt,html2html
21787 JavaScript
21789 <p>JavaScript
21792 <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>
21796 HTML Hex character encoding bogus encoding (T28437 regression check)
21800 <p>&#xsee;&#XSEE;
21805 HTML Hex character encoding mixed case
21807 parsoid=wt2html,wt2wt,html2html
21814 <p><span typeof="mw:Entity">î</span><span typeof="mw:Entity">î</span></p>
21817 # See: https://www.w3.org/TR/html5/syntax.html#character-references
21818 # Note that U+000C (form feed) is not a valid XML character, so
21819 # it is banned even though allowed in HTML5.
21821 Illegal character references (T106578)
21826 ; Control (low): 
21827 ; Control (high):  Ÿ
21828 ; Surrogate: ��
21829 ; This is an okay astral character: 💩
21837 <dt>Control (low)</dt>
21839 <dt>Control (high)</dt>
21840 <dd>&#x7F; &#x9F;</dd>
21842 <dd>&#xD83D;&#xDCA9;</dd>
21843 <dt>This is an okay astral character</dt>
21844 <dd>💩</dd></dl>
21848 __FORCETOC__ override
21860 ISBN 978-0-1234-56 789
21862 <p><a href="/wiki/Special:BookSources/9780123456" class="internal mw-magiclink-isbn">ISBN 978-0-1234-56</a> 789
21865 <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>
21869 ISBN followed by 5 spaces
21880 ISBN ISBN 1234567890
21882 <p>ISBN <a href="/wiki/Special:BookSources/1234567890" class="internal mw-magiclink-isbn">ISBN 1234567890</a>
21885 <p>ISBN <a href="./Special:BookSources/1234567890" rel="mw:WikiLink" data-parsoid='{"stx":"magiclink"}'>ISBN 1234567890</a></p>
21888 # Uppercase X and lowercase x as well
21899 <p><a href="/wiki/Special:BookSources/346204561X" class="internal mw-magiclink-isbn">ISBN 3-462-04561-X</a>
21900 <a href="/wiki/Special:BookSources/346204561X" class="internal mw-magiclink-isbn">ISBN 3-462-04561-x</a>
21901 <a href="/wiki/Special:BookSources/080442957X" class="internal mw-magiclink-isbn">ISBN 080442957X</a>
21902 <a href="/wiki/Special:BookSources/080442957X" class="internal mw-magiclink-isbn">ISBN 080442957x</a>
21903 <a href="/wiki/Special:BookSources/978080442957X" class="internal mw-magiclink-isbn">ISBN 978080442957X</a>
21904 <a href="/wiki/Special:BookSources/978080442957X" class="internal mw-magiclink-isbn">ISBN 978080442957x</a>
21907 <p><a href="./Special:BookSources/346204561X" rel="mw:WikiLink" data-parsoid='{"stx":"magiclink"}'>ISBN 3-462-04561-X</a>
21908 <a href="./Special:BookSources/346204561X" rel="mw:WikiLink" data-parsoid='{"stx":"magiclink"}'>ISBN 3-462-04561-x</a>
21909 <a href="./Special:BookSources/080442957X" rel="mw:WikiLink" data-parsoid='{"stx":"magiclink"}'>ISBN 080442957X</a>
21910 <a href="./Special:BookSources/080442957X" rel="mw:WikiLink" data-parsoid='{"stx":"magiclink"}'>ISBN 080442957x</a>
21911 <a href="./Special:BookSources/978080442957X" rel="mw:WikiLink" data-parsoid='{"stx":"magiclink"}'>ISBN 978080442957X</a>
21912 <a href="./Special:BookSources/978080442957X" rel="mw:WikiLink" data-parsoid='{"stx":"magiclink"}'>ISBN 978080442957x</a></p>
21916 ISBN with empty prefix (parsoid test)
21920 <p><a href="/wiki/Special:BookSources/1234567890" class="internal mw-magiclink-isbn">ISBN 1234567890</a>
21923 <p><a href="./Special:BookSources/1234567890" rel="mw:WikiLink">ISBN 1234567890</a></p>
21927 T24905: <abbr> followed by ISBN followed by </a>
21929 <abbr>(fr)</abbr> ISBN 2753300917 [http://www.example.com example.com]
21931 <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>
21934 <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>
21942 <p>RFC <a class="external mw-magiclink-rfc" rel="nofollow" href="https://tools.ietf.org/html/rfc1234">RFC 1234</a>
21945 <p>RFC <a href="https://tools.ietf.org/html/rfc1234" rel="mw:ExtLink" class="external mw-magiclink">RFC 1234</a></p>
21949 Double RFC with a wiki link
21953 <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>
21956 <p>RFC <a rel="mw:WikiLink" href="./RFC_1234" title="RFC 1234">RFC 1234</a></p>
21964 <p><a class="external mw-magiclink-rfc" rel="nofollow" href="https://tools.ietf.org/html/rfc983">RFC 983</a> 987
21967 <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>
21971 Centre-aligned image
21973 [[Image:foobar.jpg|centre]]
21975 <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>
21978 <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>
21984 [[Image:foobar.jpg|none]]
21986 <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>
21989 <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>
21993 Width + Height sized image (using px) (height is ignored)
21995 [[Image:foobar.jpg|640x480px]]
21997 <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>
22000 <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>
22004 Width-sized image (using px, no following whitespace)
22006 [[Image:foobar.jpg|640px]]
22008 <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>
22011 <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>
22015 Width-sized image (using px, with following whitespace - test regression from r39467)
22017 [[Image:foobar.jpg|640px ]]
22019 <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>
22022 <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>
22026 Width-sized image (using px, with preceding whitespace - test regression from r39467)
22028 [[Image:foobar.jpg| 640px]]
22030 <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>
22033 <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>
22037 Image with page parameter
22041 [[File:LoremIpsum.djvu|page=2]]
22043 <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>
22046 <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>
22050 Another italics / bold test
22058 # FIXME: The php output seems broken. It's interleaving some open/close tags.
22064 <dl><dd><dl><dt><dl><dt><dl><dt><dl><dd><dl><dd></dt></dl></dd></dl></dd></dl></dd></dl></dd></dl></dd></dl>
22067 <dl><dd><dl><dt><dl><dt><dl><dt><dl><dd><dl><dd></dd></dl></dd></dl></dt></dl></dt></dl></dt></dl></dd></dl>
22071 # Images with the "|" character in external URLs in comment tags; Eats half the comment, leaves unmatched "</a>" tag.
22073 Images with the "|" character in the comment
22075 [[File:Foobar.jpg|thumb|An [http://test/?param1=|left|¶m2=|x external] URL]]
22077 <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>
22080 <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>
22084 [Before] HTML without raw HTML enabled ($wgRawHtml==false)
22086 <html><script>alert(1);</script></html>
22088 <p><html><script>alert(1);</script></html>
22093 HTML with raw HTML ($wgRawHtml==true)
22097 <html><script>alert(1);</script></html>
22099 <p><script>alert(1);</script>
22102 <p><script typeof="mw:Extension/html" about="#mwt3" data-mw='{"name":"html","attrs":{},"body":{"extsrc":"<script>alert(1);</script>"}}'>alert(1);</script></p>
22106 Parents of subpages, one level up
22108 subpage title=[[Subpage test/L1/L2/L3]]
22112 <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>
22118 Parents of subpages, one level up, not named
22120 subpage title=[[Subpage test/L1/L2/L3]]
22124 <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>
22131 Parents of subpages, two levels up
22133 subpage title=[[Subpage test/L1/L2/L3]]
22139 <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
22140 </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>
22145 Parents of subpages, two levels up, without trailing slash or name.
22147 subpage title=[[Subpage test/L1/L2/L3]]
22156 Parents of subpages, two levels up, with lots of extra trailing slashes.
22158 subpage title=[[Subpage test/L1/L2/L3]]
22162 <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>
22167 Subpage test/L1/L2/L3Sibling
22173 Transclusion of a sibling page (one level up)
22175 subpage title=[[Subpage test/L1/L2/L3]]
22184 Transclusion of a child page
22186 subpage title=[[Subpage test/L1/L2]]
22194 # This is wt2html only in Parsoid because we add <nowiki>
22195 # because of {{..}} and we don't expect to fix that to
22196 # eliminate the nowikis selective for {{..}} markup.
22198 Non-transclusion because of too many up levels
22200 subpage title=[[Subpage test/L1/L2/L3]]
22203 {{../../../../More than parent}}
22205 <p>{{../../../../More than parent}}
22208 <p>{{../../../../More than parent}}</p>
22212 Definition list code coverage
22226 <dl><dt>title </dt><dd>def</dd>
22227 <dt>title </dt><dd>def</dd>
22228 <dt>title</dt><dd>def</dd></dl>
22232 Don't fall for the self-closing div
22234 <div>hello world</div/>
22236 <div>hello world</div>
22245 <p>[[:Template:Msg]]
22254 <p><a href="/index.php?title=Template:QUERTY&action=edit&redlink=1" class="new" title="Template:QUERTY (page does not exist)">Template:QUERTY</a>
22258 # This isn't needed for XHTML conformance, but would be handy as a fallback security measure
22260 Always escape literal '>' in output, not just after '<'
22274 <p>This is a test template
22275 This is a test template
22287 Inclusion of !userCanEdit() content
22291 <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>
22297 Out-of-order TOC heading levels
22306 <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>
22308 <li class="toclevel-1 tocsection-1"><a href="#2"><span class="tocnumber">1</span> <span class="toctext">2</span></a>
22310 <li class="toclevel-2 tocsection-2"><a href="#6"><span class="tocnumber">1.1</span> <span class="toctext">6</span></a></li>
22311 <li class="toclevel-2 tocsection-3"><a href="#3"><span class="tocnumber">1.2</span> <span class="toctext">3</span></a></li>
22314 <li class="toclevel-1 tocsection-4"><a href="#1"><span class="tocnumber">2</span> <span class="toctext">1</span></a>
22316 <li class="toclevel-2 tocsection-5"><a href="#5"><span class="tocnumber">2.1</span> <span class="toctext">5</span></a></li>
22317 <li class="toclevel-2 tocsection-6"><a href="#2_2"><span class="tocnumber">2.2</span> <span class="toctext">2</span></a></li>
22323 <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>
22324 <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>
22325 <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>
22326 <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>
22327 <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>
22328 <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>
22334 ISBN with a dummy number
22344 ISBN with space-delimited number
22348 <p><a href="/wiki/Special:BookSources/9290170328" class="internal mw-magiclink-isbn">ISBN 92 9017 032 8</a>
22351 <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>
22356 ISBN with multiple spaces, no number
22375 </p><p><a href="/wiki/Special:BookSources/1234567890" class="internal mw-magiclink-isbn">ISBN 1234567890</a>
22376 </p><p>ISBN 12345678901
22379 <p>ISBN 123456789</p>
22381 <p><a href="./Special:BookSources/1234567890" rel="mw:WikiLink" data-parsoid='{"stx":"magiclink"}'>ISBN 1234567890</a></p>
22383 <p>ISBN 12345678901</p>
22388 ISBN with trailing year (T9110)
22390 ISBN 1-234-56789-0 - 2006
22392 ISBN 1 234 56789 0 - 2006
22394 <p><a href="/wiki/Special:BookSources/1234567890" class="internal mw-magiclink-isbn">ISBN 1-234-56789-0</a> - 2006
22395 </p><p><a href="/wiki/Special:BookSources/1234567890" class="internal mw-magiclink-isbn">ISBN 1 234 56789 0</a> - 2006
22398 <p><a href="./Special:BookSources/1234567890" rel="mw:WikiLink" data-parsoid='{"stx":"magiclink"}'>ISBN 1-234-56789-0</a> - 2006</p>
22400 <p><a href="./Special:BookSources/1234567890" rel="mw:WikiLink" data-parsoid='{"stx":"magiclink"}'>ISBN 1 234 56789 0</a> - 2006</p>
22407 wgFragmentMode=[ 'html5', 'legacy' ]
22409 {{anchorencode:foo bar©#%n}}
22414 <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>
22418 anchorencode (legacy)
22420 wgFragmentMode=[ 'legacy' ]
22422 {{anchorencode:foo bar©#%n}}
22424 <p>foo_bar.C2.A9.23.25n
22429 anchorencode trims spaces
22431 wgFragmentMode=[ 'html5', 'legacy' ]
22433 {{anchorencode: __pretty__please__}}
22438 <p about="#mwt1" typeof="mw:Transclusion" data-mw='{"parts":[{"template":{"target":{"wt":"anchorencode: __pretty__please__","function":"anchorencode"},"params":{},"i":0}}]}'>pretty_please</p>
22442 anchorencode deals with links
22444 wgFragmentMode=[ 'html5', 'legacy' ]
22446 {{anchorencode: [[hello|world]] [[hi]]}}
22451 <p about="#mwt1" typeof="mw:Transclusion" data-mw='{"parts":[{"template":{"target":{"wt":"anchorencode: [[hello|world]] [[hi]]","function":"anchorencode"},"params":{},"i":0}}]}'>world_hi</p>
22455 anchorencode deals with templates
22457 wgFragmentMode=[ 'html5', 'legacy' ]
22459 {{anchorencode: {{Foo}} x}}
22464 <p about="#mwt2" typeof="mw:Transclusion" data-mw='{"parts":[{"template":{"target":{"wt":"anchorencode: {{Foo}} x","function":"anchorencode"},"params":{},"i":0}}]}'>FOO_x</p>
22468 anchorencode encodes like the TOC generator: (T20431)
22470 wgFragmentMode=[ 'html5', 'legacy' ]
22472 ===_ +:.3A%3A _ &&]] x===
22473 {{anchorencode: _ +:.3A%3A _ &&]] x}}
22476 <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>
22477 <p>+:.3A%3A_&&]]_x
22480 <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>
22481 <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>
22482 <meta property="mw:PageProp/noeditsection"/>
22486 anchorencode encodes like the TOC generator: (T20431) (legacy)
22488 wgFragmentMode=[ 'legacy' ]
22490 ===_ +:.3A%3A&&]]===
22491 {{anchorencode: _ +:.3A%3A&&]] }}
22494 <h3><span class="mw-headline" id=".2B:.3A.253A.26.26.5D.5D">_ +:.3A%3A&&]]</span></h3>
22495 <p>.2B:.3A.253A.26.26.5D.5D
22500 T8200: blockquotes and paragraph formatting
22521 T10293: Use of center tag ruins paragraph formatting
22542 Parsing of overlapping (improperly nested) inline html tags
22544 <span><s>x</span></s>
22546 <p><span><s>x</span></s></span>
22549 <p><span><s>x</s></span>
22554 ### Language variants related tests
22557 # Parsoid does not mark self-links.
22558 # Parsoid does not convert links; PHP will do any necessary redirects.
22561 Self-link in language variants
22563 title=[[Dunav]] language=sr
22565 Both [[Dunav]] and [[Дунав]] are names for this river.
22567 <p>Both <a class="mw-selflink selflink">Dunav</a> and <a class="mw-selflink selflink">Дунав</a> are names for this river.
22570 <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>
22580 Link to another existing title shouldn't be parsed as self-link even if it's a variant of this title
22582 title=[[Duna]] language=sr
22584 [[Дуна]] is not a self-link while [[Duna]] and [[Dуна]] are still self-links.
22586 <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.
22589 <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>
22593 Link to a section of a variant of this title shouldn't be parsed as self-link
22595 title=[[Duna]] language=sr
22597 [[Dуна]] is a self-link while [[Dunа#Foo]] and [[Dуна#Foo]] are not self-links.
22599 <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.
22602 <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>
22606 Link to pages in language variants
22610 Main Page can be written as [[Маин Паге]]
22612 <p>Main Page can be written as <a href="/wiki/Main_Page" title="Main Page">Маин Паге</a>
22615 <p>Main Page can be written as <a rel="mw:WikiLink" href="./Маин_Паге" title="Маин Паге">Маин Паге</a></p>
22620 Multiple links to pages in language variants
22624 [[Main Page]] can be written as [[Маин Паге]] same as [[Маин Паге]].
22626 <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>.
22629 <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>
22634 Simple template in language variants
22640 <p>This is a test template
22646 Template with explicit namespace in language variants
22652 <p>This is a test template
22658 Basic test for template parameter in language variants
22662 {{парамтест|param=foo}}
22664 <p>This is a test template with parameter foo
22669 Simple category in language variants
22673 [[Category:МедиаWики Усер'с Гуиде]]
22675 cat=МедиаWики_Усер'с_Гуиде sort=
22677 <link rel="mw:PageProp/Category" href="./Категорија:МедиаWики_Усер'с_Гуиде" data-parsoid='{"stx":"simple","a":{"href":"./Категорија:МедиаWики_Усер'с_Гуиде"},"sa":{"href":"Category:МедиаWики Усер'с Гуиде"}}'/>
22692 ## We used to, but no longer wt2wt this test since the default serializer
22693 ## will normalize all categories to serialize on their own line.
22694 ## This wikitext usage is going to be fairly uncommon in production and
22695 ## selser will take care of preserving formatting in those scenarios.
22697 Don't convert blue categorylinks to another variant (T35210)
22703 [[A]][[Category:分类]]
22707 <p><a rel="mw:WikiLink" href="./A" title="A">A</a></p>
22708 <link rel="mw:PageProp/Category" href="./Category:分类"/>
22712 Stripping -{}- tags (language variants)
22716 Latin proverb: -{Ne nuntium necare}-
22718 <p>Latin proverb: Ne nuntium necare
22721 <p>Latin proverb: <span typeof="mw:LanguageVariant" data-mw-variant='{"disabled":{"t":"Ne nuntium necare"}}'></span></p>
22726 Prevent conversion with -{}- tags (language variants)
22728 language=sr variant=sr-ec
22730 Latinski: -{Ne nuntium necare}-
22732 <p>Латински: Ne nuntium necare
22735 <p>Latinski: <span typeof="mw:LanguageVariant" data-mw-variant='{"disabled":{"t":"Ne nuntium necare"}}'></span></p>
22740 Prevent conversion of text with -{}- tags (language variants)
22742 language=sr variant=sr-ec
22744 Latinski: -{Ne nuntium necare}-
22746 <p>Латински: Ne nuntium necare
22749 <p>Latinski: <span typeof="mw:LanguageVariant" data-mw-variant='{"disabled":{"t":"Ne nuntium necare"}}'></span></p>
22754 Prevent conversion of links with -{}- tags (language variants)
22756 language=sr variant=sr-ec
22760 <p><a href="/wiki/Main_Page" title="Main Page">Main Page</a>
22763 <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>
22768 -{}- tags within headlines (within html for parserConvert())
22770 wgFragmentMode=[ 'html5', 'legacy' ]
22772 language=sr variant=sr-ec
22776 Note that even an unprotected headline ID is not affected by language
22781 <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>
22782 <p>Ноте тхат евен ан унпротецтед хеадлине ИД ис нот аффецтед бy лангуаге
22785 <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>
22788 <h2 id="-{Naslov}-"><span id="-.7BNaslov.7D-" typeof="mw:FallbackId"></span><span typeof="mw:LanguageVariant" data-mw-variant='{"disabled":{"t":"Naslov"}}'></span></h2>
22790 <p>Note that even an unprotected headline ID is not affected by language
22793 <h2 id="Latinski">Latinski</h2>
22797 Explicit definition of language variant alternatives
22799 language=zh variant=zh-tw
22801 -{zh:China;zh-tw:Taiwan}-, not China
22803 <p>Taiwan, not China
22806 <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>
22810 Filter syntax for language variants
22812 language=zh variant=zh-tw
22814 foo-{zh;zh-hans;zh-hant|blog, WEBJOURNAL, WEBLOG}-quux
22816 <p>fooblog, WEBJOURNAL, WEBLOGquux
22819 <p>foo<span typeof="mw:LanguageVariant" data-mw-variant='{"filter":{"l":["zh","zh-hans","zh-hant"],"t":"blog, WEBJOURNAL, WEBLOG"}}'></span>quux</p>
22822 # Note that Parsoid post-processing for language variants needs to
22823 # update the `title` attribute here, based on the mw:ExpandedAttrs property
22825 Conversion around HTML tags
22827 language=sr variant=sr-ec
22829 -{H|span=>sr-ec:script;title=>sr-ec:src}-
22830 <span title="La-{sr-el:L;sr-ec:C}-tin">ski</span>
22833 <span title="ЛаCтин">ски</span>
22836 <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"}]}'/>
22837 <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>
22841 Explicit session-wise two-way language variant mapping (A flag and - flag)
22843 language=zh variant=zh-tw
22845 This is -{zh:China; zh-tw:Taiwan}-, but we'll forget that now.
22847 Taiwan is not China.
22849 But -{A|zh:China; zh-tw:Taiwan}- is China,
22851 (This-{-|zh:China; zh-tw:Taiwan}- should be stripped!)
22853 and -{China}- is China.
22855 <p>This is Taiwan, but we'll forget that now.
22856 </p><p>Taiwan is not China.
22857 </p><p>But Taiwan is Taiwan,
22858 </p><p>(This should be stripped!)
22859 </p><p>and China is China.
22862 <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>
22863 <p>Taiwan is not China.</p>
22864 <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>
22865 <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>
22866 <p>and <span typeof="mw:LanguageVariant" data-mw-variant='{"disabled":{"t":"China"}}'></span> is China.</p>
22870 Explicit session-wise one-way language variant mapping (A flag and - flag)
22872 language=zh variant=zh-tw
22874 This is -{COUNTRY=>zh:China;COUNTRY=>zh-tw:Taiwan}-, but we'll forget that now.
22876 COUNTRY is China or Taiwan.
22878 But -{A|COUNTRY=>zh:China;COUNTRY=>zh-tw:Taiwan}- is COUNTRY,
22880 (This-{-|COUNTRY=>zh:China;COUNTRY=>zh-tw:Taiwan}- should be stripped!)
22882 and -{COUNTRY}- is COUNTRY.
22884 <p>This is Taiwan, but we'll forget that now.
22885 </p><p>COUNTRY is China or Taiwan.
22886 </p><p>But Taiwan is Taiwan,
22887 </p><p>(This should be stripped!)
22888 </p><p>and COUNTRY is COUNTRY.
22891 <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>
22892 <p>COUNTRY is China or Taiwan.</p>
22893 <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>
22894 <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>
22895 <p>and <span typeof="mw:LanguageVariant" data-mw-variant='{"disabled":{"t":"COUNTRY"}}'></span> is COUNTRY.</p>
22899 Explicit session-wise two-way language variant mapping (H flag for hide)
22901 language=zh variant=zh-tw
22903 (This-{H|zh:China;zh-tw:Taiwan}- should be stripped!)
22907 <p>(This should be stripped!)
22908 </p><p>Taiwan is Taiwan.
22911 <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>
22912 <p>Taiwan is China.</p>
22916 Explicit session-wise one-way language variant mapping (H flag for hide)
22918 language=zh variant=zh-tw
22920 (This-{H|COUNTRY=>zh:China;COUNTRY=>zh-tw:Taiwan}- should be stripped!)
22922 COUNTRY is Taiwan or China.
22924 <p>(This should be stripped!)
22925 </p><p>Taiwan is Taiwan or China.
22928 <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>
22929 <p>COUNTRY is Taiwan or China.</p>
22932 ## Note that parsoid test runner does not support 'showtitle' option.
22934 Adding explicit conversion rule for title (T flag)
22936 language=zh variant=zh-tw showtitle
22938 Should be stripped-{T|zh:China;zh-tw:Taiwan}-!
22943 <p>Should be stripped!
22944 </p><p>Taiwan is China.
22947 <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>
22948 <p>Taiwan is China.</p>
22952 Code coverage: T combined with H flag
22954 language=zh variant=zh-tw showtitle
22956 Should be stripped-{T;H|zh:China; zh-tw:Taiwan}-!
22961 <p>Should be stripped!
22962 </p><p>Taiwan is Taiwan.
22965 <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>
22966 <p>Taiwan is China.</p>
22970 Code coverage: T with no variants
22972 language=zh variant=zh-tw showtitle
22974 -{H|zh:China; zh-tw:Taiwan}-
22975 Taiwan is China.-{T|Taiwan is China}-
22982 <p><meta typeof="mw:LanguageVariant" data-mw-variant='{"add":true,"twoway":[{"l":"zh","t":"China"},{"l":"zh-tw","t":"Taiwan"}]}'/>
22983 Taiwan is China.<meta typeof="mw:LanguageVariant" data-mw-variant='{"disabled":{"t":"Taiwan is China"},"title":true}'/></p>
22987 Code coverage: rules with no variants
22989 language=zh variant=zh-tw
22991 -{H|zh:China; zh-tw:Taiwan}-
23002 <p><meta typeof="mw:LanguageVariant" data-mw-variant='{"add":true,"twoway":[{"l":"zh","t":"China"},{"l":"zh-tw","t":"Taiwan"}]}'/>
23004 <meta typeof="mw:LanguageVariant" data-mw-variant='{"add":true,"twoway":[{"l":"*","t":"China"}]}'/>
23005 Taiwan is China.</p>
23010 Code coverage: D flag for conversion rule
23012 language=zh variant=zh-tw
23014 -{D|zh-cn:XA; zh-tw:YA}-
23015 -{A;D|zh-cn:XB; zh-tw:YB}-
23016 -{D;H|zh-cn:XC; zh-tw:YC}-
23018 -{D;H|FOO=>zh-tw:BAR;FOO=>zh-cn:BAT}-
23024 XA XB XC YA YB YC FOO BAR BAT 012345
23029 </p><p>FOO⇒台灣:BAR;FOO⇒大陆:BAT;
23033 </p><p>XA YB YC YA YB YC BAR BAR BAT 013355
23036 <p><span typeof="mw:LanguageVariant" data-mw-variant='{"describe":true,"twoway":[{"l":"zh-cn","t":"XA"},{"l":"zh-tw","t":"YA"}]}'></span>
23037 <meta typeof="mw:LanguageVariant" data-mw-variant='{"add":true,"describe":true,"twoway":[{"l":"zh-cn","t":"XB"},{"l":"zh-tw","t":"YB"}]}'/>
23038 <span typeof="mw:LanguageVariant" data-mw-variant='{"add":true,"describe":true,"twoway":[{"l":"zh-cn","t":"XC"},{"l":"zh-tw","t":"YC"}]}'></span></p>
23039 <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>
23040 <p><span typeof="mw:LanguageVariant" data-mw-variant='{"describe":true,"oneway":[{"f":"0","l":"zh-tw","t":"1"}]}'></span>
23041 <meta typeof="mw:LanguageVariant" data-mw-variant='{"add":true,"describe":true,"oneway":[{"f":"2","l":"zh-tw","t":"3"}]}'/>
23042 <span typeof="mw:LanguageVariant" data-mw-variant='{"add":true,"describe":true,"oneway":[{"f":"4","l":"zh-tw","t":"5"}]}'></span></p>
23043 <p>XA XB XC YA YB YC FOO BAR BAT 012345</p>
23047 Code coverage: N flag for conversion rule
23049 language=zh variant=zh-cn
23059 </p><p>српски (ћирилица)
23062 <p><span typeof="mw:LanguageVariant" data-mw-variant='{"name":{"t":"zh-cn"}}'></span></p>
23063 <p><span typeof="mw:LanguageVariant" data-mw-variant='{"name":{"t":"zh-tw"}}'></span></p>
23064 <p><span typeof="mw:LanguageVariant" data-mw-variant='{"name":{"t":"sr-ec"}}'></span></p>
23067 # html2wt suppresses the bogus 'D' flag, so this is wt2html only
23069 Code coverage: N flag for conversion rule (wt2html only)
23071 language=zh variant=zh-cn
23072 parsoid=wt2html,html2html
23079 <p><span typeof="mw:LanguageVariant" data-mw-variant='{"name":{"t":"en"}}' data-parsoid='{"fl":["D","N"]}'></span></p>
23083 Testing that changing the language variant here in the tests actually works
23085 language=zh variant=zh showtitle
23087 Should be stripped-{T|zh:China; zh-tw:Taiwan}-!
23090 <p>Should be stripped!
23093 <p>Should be stripped<meta typeof="mw:LanguageVariant" data-mw-variant='{"title":true,"twoway":[{"l":"zh","t":"China"},{"l":"zh-tw","t":"Taiwan"}]}'/>!</p>
23097 Recursive conversion of alt and title attrs shouldn't clear converter state
23099 language=zh variant=zh-cn
23102 -{H|zh-cn:Exclamation; zh-tw:exclamation}-
23103 Should be stripped-{T|zh-cn:China; zh-tw:Taiwan}-<span title="exclamation">!</span>
23107 Should be stripped<span title="Exclamation">!</span>
23110 <p><meta typeof="mw:LanguageVariant" data-mw-variant='{"add":true,"twoway":[{"l":"zh-cn","t":"Exclamation"},{"l":"zh-tw","t":"exclamation"}]}'/>
23111 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>
23115 T26072: more test on conversion rule for title
23117 language=zh variant=zh-tw showtitle
23119 This should be stripped-{T|zh:China; zh-tw:Taiwan}-!
23121 This won't take interferes with the title rule-{H|zh:Beijing; zh-tw:Taipei}-.
23124 <p>This should be stripped!
23125 </p><p>This won't take interferes with the title rule.
23128 <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>
23129 <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>
23133 Partly disable title conversion if variant == main language code
23135 language=zh variant=zh title=[[ZH]] showtitle
23137 -{T|zh-cn:CN;zh-tw:TW}-
23143 <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>
23147 Partly disable title conversion if variant == main language code, more
23149 language=zh variant=zh title=[[ZH]] showtitle
23157 <p><meta typeof="mw:LanguageVariant" data-mw-variant='{"disabled":{"t":"TW"},"title":true}'/></p>
23161 Raw output of variant escape tags (R flag)
23163 language=zh variant=zh-tw
23165 Raw: -{R|zh:China;zh-tw:Taiwan}-
23167 <p>Raw: zh:China;zh-tw:Taiwan
23170 <p>Raw: <span typeof="mw:LanguageVariant" data-mw-variant='{"disabled":{"t":"zh:China;zh-tw:Taiwan"}}'></span></p>
23173 # html2wt suppresses the bogus 'D' flags, so this is wt2html only
23175 Raw output of variant escape tags (R flag) (wt2html only)
23177 language=zh variant=zh-tw
23178 parsoid=wt2html,html2html
23180 -{Variant}- -{D|syntax}- -{D;R|options}-
23182 <p>Variant syntax options
23185 <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>
23189 Nested markup inside raw output of variant escape tags (R flag)
23191 language=zh variant=zh-tw
23193 Nested raw: -{R|nested -{zh:China;zh-tw:Taiwan}- nested}-
23195 <p>Nested raw: nested Taiwan nested
23198 <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>
23202 Nested markup and spaces inside raw output of variant escape tags (R flag)
23204 language=zh variant=zh-tw
23206 X-{ outer -{ inner }- outer }-X
23208 <p>X outer inner outer X
23211 <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>
23215 Templates inside raw output of variant escape tags (R flag)
23217 language=zh variant=zh-tw
23219 Nested raw: -{R|nested {{echo|hi}} templates}-
23221 <p>Nested raw: nested hi templates
23224 <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>
23228 Strings evaluating false shouldn't be ignored by Language converter (T51072)
23230 language=zh variant=zh-cn
23232 -{zh-cn:0;zh-sg:1;zh-tw:2;zh-hk:3}-
23237 <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>
23241 Conversion rules from [numeric-only string] to [something else] (T48634)
23243 language=zh variant=zh-cn
23245 -{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
23250 <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>
23254 Two-way converter rule entries with an empty value should be ignored (T53551)
23256 language=zh variant=zh-cn
23258 -{H|zh-cn:foo;zh-tw:;}-foobar
23263 <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>
23267 One-way converter rule entries with an empty "from" string should be ignored (T53551)
23269 language=zh variant=zh-cn
23271 -{H|=>zh-cn:foo;}-foobar
23276 <p><meta typeof="mw:LanguageVariant" data-parsoid='{"tSp":[5]}' data-mw-variant='{"add":true,"oneway":[{"f":"","l":"zh-cn","t":"foo"}]}'/>foobar</p>
23280 Empty converter rule entries shouldn't be inserted into the conversion table (T53551)
23282 language=zh variant=zh-cn
23289 <p><meta typeof="mw:LanguageVariant" data-mw-variant='{"add":true,"twoway":[{"l":"*","t":""}]}'/>foobar</p>
23293 Nested using of manual convert syntax
23295 language=zh variant=zh-hk
23297 Nested: -{zh-hans:Hi -{zh-cn:China;zh-sg:Singapore;}-;zh-hant:Hello -{zh-tw:Taiwan;zh-hk:H-{ong}- K-{}-ong;}-;}-!
23299 <p>Nested: Hello Hong Kong!
23302 <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>
23306 HTML markups with conversion syntax in attribs, nested in other conversion blocks
23308 language=zh variant=zh-cn
23310 -{zh;zh-hans;zh-hant|<span title="-{X}-">A</span>}-
23312 <p><span title="X">A</span>
23315 <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>
23319 HTML markups with conversion syntax in attribs, nested in other conversion blocks (not working yet in PHP parser)
23321 language=zh variant=zh-cn
23323 -{<span title="-{X}-">A</span>}-
23324 !! html/php+disabled
23325 <p><span title="X">A</span>
23328 <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>
23331 # Parsoid and PHP disagree on how to parse this example: Parsoid
23332 # insists that the content of a language converter element be a valid
23333 # DOM fragment or attribute string
23335 Language converter markup with block content
23337 language=zh variant=zh-cn
23339 <span>a-{b<div>c}-d
23341 <span>a-{zh;zh-hans;zh-hant|b<div>c}-d
23343 <span>a-{H|0=>zh-cn:x<span>y;0=>zh-tw:b<div>c}-d
23348 </span></div></span></div></span>
23350 <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
23352 <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
23354 <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>
23358 LanguageConverter selser (1)
23360 language=zh variant=zh-cn
23362 "modes": ["wt2wt", "selser"],
23364 ["span[typeof]", "attr", "data-mw-variant", "{\"disabled\":{\"t\":\"edited\"}}"]
23374 LanguageConverter selser (2)
23376 language=zh variant=zh-cn
23378 "modes": ["wt2wt", "selser"],
23380 ["span[class='x']", "contents", "text", "-{foo}-"],
23381 ["a", "contents", "text", "-{"],
23382 ["span[typeof]", "attr", "data-mw", "{\"parts\":[{\"template\":{\"target\":{\"wt\":\"1x\",\"href\":\"./Template:1x\"},\"params\":{\"1\":{\"wt\":\"-{\"}},\"i\":0}}]}"]
23386 <span class="x">TEXT1</span>
23387 [http://example.com TEXT2]
23391 <span class="x"><nowiki>-{foo}-</nowiki></span>
23392 [http://example.com -{]
23393 [[Foo|<nowiki>-{</nowiki>]]
23394 {{1x|<nowiki>-{</nowiki>}}
23397 # Tests LanguageVariantText in ConstrainedText
23399 LanguageConverter selser (3)
23401 language=zh variant=zh-cn
23403 "modes": ["wt2wt", "selser"],
23405 ["td > span", "attr", "typeof", "mw:LanguageVariant"],
23406 ["td > span", "attr", "data-mw-variant", "{\"disabled\":{\"t\":\"edited\"}}"]
23417 |<nowiki/>-{edited}-
23421 # Tests LanguageVariantText._fromSelSer
23423 LanguageConverter selser (4)
23425 language=zh variant=zh-cn
23427 "modes": ["wt2wt", "selser"],
23429 ["td > span.x", "remove"]
23435 |<span class="x">Foo</span>-{Bar}-
23436 ||<span class="x">Foo</span>-{Bar}-
23446 # Since Parsoid is starting to emit canonical wikitext for links,
23447 # [http://example.com http://example.com] will not RT back to that
23449 # Parsoid does not language-convert links (it is done in a
23450 # post-processing step)
23452 Proper conversion of text in external links
23454 language=sr variant=sr-ec
23457 http://www.google.com
23458 gopher://www.google.com
23459 [http://www.google.com http://www.google.com]
23460 [gopher://www.google.com gopher://www.google.com]
23461 [https://www.google.com irc://www.google.com]
23462 [ftp://www.google.com www.google.com/ftp://dir]
23463 [//www.google.com www.google.com]
23465 <p><a rel="nofollow" class="external free" href="http://www.google.com">http://www.google.com</a>
23466 <a rel="nofollow" class="external free" href="gopher://www.google.com">gopher://www.google.com</a>
23467 <a rel="nofollow" class="external text" href="http://www.google.com">http://www.google.com</a>
23468 <a rel="nofollow" class="external text" href="gopher://www.google.com">gopher://www.google.com</a>
23469 <a rel="nofollow" class="external text" href="https://www.google.com">irc://www.google.com</a>
23470 <a rel="nofollow" class="external text" href="ftp://www.google.com">www.гоогле.цом/фтп://дир</a>
23471 <a rel="nofollow" class="external text" href="//www.google.com">www.гоогле.цом</a>
23474 <p><a rel="mw:ExtLink" class="external free" href="http://www.google.com">http://www.google.com</a>
23475 <a rel="mw:ExtLink" class="external free" href="gopher://www.google.com">gopher://www.google.com</a>
23476 <a rel="mw:ExtLink" class="external text" href="http://www.google.com">http://www.google.com</a>
23477 <a rel="mw:ExtLink" class="external text" href="gopher://www.google.com">gopher://www.google.com</a>
23478 <a rel="mw:ExtLink" class="external text" href="https://www.google.com">irc://www.google.com</a>
23479 <a rel="mw:ExtLink" class="external text" href="ftp://www.google.com">www.google.com/ftp://dir</a>
23480 <a rel="mw:ExtLink" class="external text" href="//www.google.com">www.google.com</a></p>
23484 Do not convert roman numbers to language variants
23486 language=sr variant=sr-ec
23490 <p>Фридрих IV је цар.
23493 <p>Fridrih IV je car.</p>
23497 Unclosed language converter markup "-{"
23508 Don't convert raw rule "-{R|=>}-" to "=>"
23517 <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>
23521 Don't break link parsing if language converter markup is in the caption.
23523 language=sr variant=sr-ec
23525 [[Main Page|-{R|main page}-]]
23527 <p><a href="/wiki/Main_Page" title="Маин Паге">main page</a>
23530 <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>
23534 T146304: Don't break template parsing if language converter markup is in the parameter.
23536 language=sr variant=sr-ec
23543 <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>
23547 T146305: Don't break image parsing if language converter markup is in the caption.
23551 [[Датотека:Foobar.jpg|thumb|-{R|caption:}-]]
23553 <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>
23556 <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>
23560 T146305: Don't break image parsing if nested language converter markup is in the caption.
23562 language=zh variant=zh-cn
23564 [[File:Foobar.jpg|thumb|-{|zh-cn:blog (hk: -{zh-hans|WEBJOURNAL}-, tw: -{zh-hans|WEBLOG}-)}-]]
23566 <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>
23569 <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>
23572 # XXX html2wt disabled because rich markup in alt is not preserved.
23574 Don't break gallery if language converter markup is inside.
23579 File:foobar.jpg|[[File:foobar.jpg|20px|desc|alt=-{R|foo}-|-{R|bar}-]]|alt=-{R|bat}-
23580 File:foobar.jpg|{{Test|unamedParam|alt=-{R|param}-}}|alt=galleryalt
23583 <ul class="gallery mw-gallery-traditional">
23584 <li class="gallerybox" style="width: 155px"><div style="width: 155px">
23585 <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>
23586 <div class="gallerytext">
23587 <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>
23591 <li class="gallerybox" style="width: 155px"><div style="width: 155px">
23592 <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>
23593 <div class="gallerytext">
23594 <p>This is a test template
23601 <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"}}'>
23602 <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>
23603 <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>
23608 T153135: Don't break list handling if language converter markup is in the item.
23610 language=zh variant=zh-cn
23612 ;-{zh-cn:AAA;zh-tw:BBB}-
23616 <dt>foo:bar</dt></dl>
23619 <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>
23620 <dt data-parsoid='{"dsr":[25,39,1,0]}'><span typeof="mw:LanguageVariant" data-mw-variant='{"disabled":{"t":"foo:bar"}}'></span></dt>
23624 // Note that parsoid does not protect colons unless language converter
23625 // markup is properly nested, because it is a backtracking parser.
23627 T153135: Unclosed markup in definition list (code coverage)
23629 language=zh variant=zh-cn
23634 <dl><dt><b>foo:bar</b></dt><b>
23635 <dt>-{zh-cn:AAA</dt></b></dl><p><b>
23638 <dl><dt data-parsoid='{}'><b data-parsoid='{"stx":"html","autoInsertedEnd":true}'>foo:bar</b></dt><b data-parsoid='{"stx":"html","autoInsertedEnd":true,"autoInsertedStart":true}'>
23639 <dt data-parsoid='{}'>-{zh-cn</dt><dd data-parsoid='{"stx":"row"}'>AAA</dd></b></dl>
23643 T153135: Nested language converter markup in definition list (code coverage)
23645 language=zh variant=zh-cn
23647 ;-{|zh-cn:AAA -{zh-hans|foo:bar}- -{R|bat:baz}-}-:def
23649 <dl><dt>AAA foo:bar bat:baz</dt>
23653 <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>
23654 <dd data-parsoid='{"stx":"row","dsr":[49,53,1,0]}'>def</dd>
23658 # html2wt mode disabled due to <nowiki> insertion.
23660 T153140: Don't break table handling if language converter markup is in the cell.
23662 language=sr variant=sr-ec
23663 parsoid=wt2html,wt2wt,html2html
23680 <td><span typeof="mw:LanguageVariant" data-mw-variant='{"disabled":{"t":"B"}}'></span></td>
23687 Language converter tricky html2wt cases (1)
23690 parsoid=html2wt,wt2wt
23692 <p><span typeof="mw:LanguageVariant" data-mw-variant='{"disabled":{"t":"}-"}}'></span></p>
23694 -{<nowiki>}-</nowiki>}-
23701 Language converter tricky html2wt cases (2)
23704 parsoid=html2wt,wt2wt
23708 <nowiki>-{foo}-</nowiki>
23710 <p>-{foo}-
23715 Language converter tricky html2wt cases (3)
23718 parsoid=html2wt,wt2wt
23720 <p><span typeof="mw:LanguageVariant" data-mw-variant='{"disabled":{"t":"|"}}'></span></p>
23721 <p><span typeof="mw:LanguageVariant" data-mw-variant='{"disabled":{"t":"R|raw"}}'></span></p>
23722 <p><span typeof="mw:LanguageVariant" data-mw-variant='{"disabled":{"t":"-{foo}-"}}'></span></p>
23728 -{<nowiki>-{foo}-</nowiki>}-
23732 </p><p>-{foo}-
23737 Language converter tricky html2wt cases (4)
23740 parsoid=html2wt,wt2wt
23742 <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>
23750 # Note that the <nowiki> escaping added by parsoid for source text,
23751 # destination text, and language names only works on the PHP side
23752 # for *destination text*. (HTML entity escaping wouldn't work
23753 # any better.) This is probably a bug, at least for source texts.
23754 # (For language names PHP uses a precise regexp based on the languages
23755 # it currently knows have variants, which is fragile since this set
23756 # can grow/shrink over time.)
23758 Language converter tricky html2wt cases (5)
23760 language=zh variant=zh-cn
23762 <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>
23763 <p><meta typeof="mw:LanguageVariant" data-mw-variant='{"add":true,"oneway":[{"f":"A","l":"bo:g;us","t":"B"}]}'/></p>
23764 <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>
23765 <p><span typeof="mw:LanguageVariant" data-mw-variant='{"twoway":[{"l":"bo:g;us","t":"xyz"},{"l":"zh-cn","t":"abc"}]}'></span></p>
23768 -{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
23770 -{H|A=><nowiki>bo:g;us</nowiki>:B}-
23772 -{A|zh-tw:xyz; zh-cn:<nowiki>0;zh-tw:bar</nowiki>}-
23774 -{<nowiki>bo:g;us</nowiki>:xyz; zh-cn:abc}-
23777 !! html/php+disabled
23778 <p>foobat;xyz=>zh-cn:abc
23782 </p><p>a:b=>c 0;zh-tw:bar
23787 T179579: Nowiki and lc interaction
23794 -{123<nowiki>|</nowiki>456}-
23796 <p><span typeof="mw:LanguageVariant" data-mw-variant='{"disabled":{"t":"&lt;/nowiki>123"}}' data-parsoid='{"fl":[],"src":"-{</nowiki>123}-"}'></span></p>
23798 <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>
23802 T2529: Uncovered bullet
23812 T2529: Uncovered bullet in a deeply nested list
23814 *******Foo {{bullet}}
23816 <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>
23822 T2529: Uncovered table already at line-start
23845 T2529: Uncovered bullet in parser function result
23847 *Foo {{lc:{{bullet}} }}
23855 T7678: Double-parsed template argument
23857 {{lc:{{{1}}}|hello}}
23864 T7678: Double-parsed template invocation
23866 {{lc:{{paramtest {{!}} param = hello }} }}
23868 <p>{{paramtest | param = hello }}
23873 Case insensitivity of parser functions for non-ASCII characters (T10143)
23876 title=[[Main Page]]
23878 {{PRVNÍVELKÉ:ěščř}}
23879 {{prvnívelké:ěščř}}
23899 Morwen/13: Unclosed link followed by heading
23906 <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>
23911 HHP2.1: Heuristics for headings in preprocessor parenthetical structures
23918 <h1><span class="mw-headline" id="heading">heading</span></h1>
23923 HHP2.2: Heuristics for headings in preprocessor parenthetical structures
23930 <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>
23945 Paragraphs inside divs (no extra line breaks)
23957 Paragraphs inside divs (extra line break on open)
23972 Paragraphs inside divs (extra line break on close)
23987 Paragraphs inside divs (extra line break on open and close)
24003 # doBlockLevels screws up this output and Remex cleans up as much as it can.
24005 Nesting tags, paragraphs on lines which begin with <div>
24007 <div></div><strong>A
24010 <div></div><p><strong>A
24011 </strong></p><strong></strong><p><strong>B</strong>
24014 <div data-parsoid='{"stx":"html"}'></div><p><strong data-parsoid='{"stx":"html","autoInsertedEnd":true}'>A</strong></p>
24015 <p><strong data-parsoid='{"stx":"html","autoInsertedStart":true}'>B</strong></p>
24018 # T8200: <blockquote> should behave like <div> with respect to line breaks
24020 T8200: paragraphs inside blockquotes (no extra line breaks)
24022 <blockquote>Line one
24024 Line two</blockquote>
24026 <blockquote>Line one
24027 Line two</blockquote>
24030 <blockquote><p>Line one
24031 Line two</p></blockquote>
24035 T8200: paragraphs inside blockquotes (extra line break on open)
24040 Line two</blockquote>
24045 Line two</blockquote>
24051 Line two</p></blockquote>
24055 T8200: paragraphs inside blockquotes (extra line break on close)
24057 <blockquote>Line one
24062 <blockquote>Line one
24068 <blockquote><p>Line one
24075 T8200: paragraphs inside blockquotes (extra line break on open and close)
24091 ## This is a corner case interaction between the paragraph wrapping in the
24092 ## php parser's BlockLevelPass and Remex. `doBlockLevels` has a notion of
24093 ## some tags which close paragraphs (and thus prevent wrapping on their line),
24094 ## of which "div" is one, but do p-wrapping inside them. These are referred
24095 ## to as "never suppressing". Remex, for its part, doesn't traverse into
24096 ## "div"s to p-wrap. Hence, we only get this partial wrapping.
24098 Paragraphs inside blockquotes/divs (no extra line breaks)
24100 <blockquote><div>Line one
24102 Line two</div></blockquote>
24104 <blockquote><div>Line one
24105 Line two</div></blockquote>
24110 Paragraphs inside blockquotes/divs (extra line break on open)
24115 Line two</div></blockquote>
24120 Line two</div></blockquote>
24125 Paragraphs inside blockquotes/divs (extra line break on close)
24127 <blockquote><div>Line one
24130 </div></blockquote>
24132 <blockquote><div>Line one
24135 </div></blockquote>
24140 Paragraphs inside blockquotes/divs (extra line break on open and close)
24146 </div></blockquote>
24152 </div></blockquote>
24157 Interwiki links trounced by replaceExternalLinks after early LinkHolderArray expansion
24159 wgLinkHolderBatchSize=0
24165 <p><a href="http://www.usemod.com/cgi-bin/mb.pl?1" class="extiw" title="meatball:1">meatball:1</a>
24166 <a href="http://www.usemod.com/cgi-bin/mb.pl?2" class="extiw" title="meatball:2">meatball:2</a>
24167 <a href="http://www.usemod.com/cgi-bin/mb.pl?3" class="extiw" title="meatball:3">meatball:3</a>
24172 Free external link invading image caption
24174 [[Image:Foobar.jpg|thumb|http://x|hello]]
24176 <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>
24179 <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>
24183 T17196: localised external link numbers
24187 [http://en.wikipedia.org/]
24189 <p><a rel="nofollow" class="external autonumber" href="http://en.wikipedia.org/">[۱]</a>
24192 <p><a rel="mw:ExtLink" class="external autonumber" href="http://en.wikipedia.org/"></a></p>
24196 Multibyte character in padleft
24198 {{padleft:-Hello|7|Æ}}
24203 <p typeof="mw:Transclusion" data-mw='{"parts":[{"template":{"target":{"wt":"padleft:-Hello","function":"padleft"},"params":{"1":{"wt":"7"},"2":{"wt":"Æ"}},"i":0}}]}'>Æ-Hello</p>
24207 Multibyte character in padright
24209 {{padright:Hello-|7|Æ}}
24214 <p typeof="mw:Transclusion" data-mw='{"parts":[{"template":{"target":{"wt":"padright:Hello-","function":"padright"},"params":{"1":{"wt":"7"},"2":{"wt":"Æ"}},"i":0}}]}'>Hello-Æ</p>
24218 formatdate parser function
24220 {{#formatdate:2009-03-24}}
24222 <p><span class="mw-formatted-date" title="2009-03-24">2009-03-24</span>
24227 formatdate parser function, with default format
24229 {{#formatdate:2009-03-24|mdy}}
24231 <p><span class="mw-formatted-date" title="2009-03-24">March 24, 2009</span>
24236 Spacing of numbers in formatted dates
24238 {{#formatdate:January 15}}
24240 <p><span class="mw-formatted-date" title="01-15">January 15</span>
24245 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
24247 language=nl title=[[MediaWiki:Common.css]]
24249 {{#formatdate:2009-03-24|dmy}}
24251 <p><span class="mw-formatted-date" title="2009-03-24">24 March 2009</span>
24264 Edit comment with link
24268 I like the [[Main Page]] a lot
24270 I like the <a href="/wiki/Main_Page" title="Main Page">Main Page</a> a lot
24274 Edit comment with link and link text
24278 I like the [[Main Page|best pages]] a lot
24280 I like the <a href="/wiki/Main_Page" title="Main Page">best pages</a> a lot
24284 Edit comment with link and link text with suffix
24288 I like the [[Main Page|best page]]s a lot
24290 I like the <a href="/wiki/Main_Page" title="Main Page">best pages</a> a lot
24294 Edit comment with section link (non-local, eg in history list)
24296 comment title=[[Main Page]]
24298 /* External links */ removed bogus entries
24300 <a href="/wiki/Main_Page#External_links" title="Main Page">→</a><span dir="auto"><span class="autocomment">External links: </span> removed bogus entries</span>
24304 Edit comment with section link and text before it (non-local, eg in history list)
24306 comment title=[[Main Page]]
24308 pre-comment text /* External links */ removed bogus entries
24310 pre-comment text <a href="/wiki/Main_Page#External_links" title="Main Page">→</a><span dir="auto"><span class="autocomment">External links: </span> removed bogus entries</span>
24314 Edit comment with section link (local, eg in diff view)
24316 comment local title=[[Main Page]]
24318 /* External links */ removed bogus entries
24320 <a href="#External_links">→</a><span dir="auto"><span class="autocomment">External links: </span> removed bogus entries</span>
24324 Edit comment with subpage link (T16080)
24328 title=[[Subpage test]]
24330 Poked at a [[/subpage]] here...
24332 Poked at a <a href="/wiki/Subpage_test/subpage" title="Subpage test/subpage">/subpage</a> here...
24336 Edit comment with subpage link and link text (T16080)
24340 title=[[Subpage test]]
24342 Poked at a [[/subpage|neat little page]] here...
24344 Poked at a <a href="/wiki/Subpage_test/subpage" title="Subpage test/subpage">neat little page</a> here...
24348 Edit comment with bogus subpage link in non-subpage NS (T16080)
24351 title=[[Subpage test]]
24353 Poked at a [[/subpage]] here...
24355 Poked at a <a href="/index.php?title=/subpage&action=edit&redlink=1" class="new" title="/subpage (page does not exist)">/subpage</a> here...
24359 Edit comment with bare anchor link (local, as on diff)
24363 title=[[Main Page]]
24367 <a href="#section">#section</a>
24371 Edit comment with bare anchor link (non-local, as on history)
24374 title=[[Main Page]]
24378 <a href="/wiki/Main_Page#section" title="Main Page">#section</a>
24382 Anchor starting with underscore
24388 <p><a href="#_ref">One</a>
24391 <p><a rel="mw:WikiLink" href="./Foo#_ref" data-parsoid='{"stx":"piped","a":{"href":"./Foo#_ref"},"sa":{"href":"#_ref"}}'>One</a></p>
24395 Id starting with underscore
24397 <div id="_ref"></div>
24399 <div id="_ref"></div>
24404 Edit comment with link with more than one pipe (T99346)
24408 [[Main Page|Many|pipes]]
24410 <a href="/wiki/Main_Page" title="Main Page">Many|pipes</a>
24414 Complex edit comment with link with more than one pipe (T99346)
24418 Created page with "<noinclude>[[Category:Requests for permissions/Bot|{{subst:#titleparts:{{subst:PAGENAME}}|1|3}}]]</noinclude> === [[User:MineoBot|]] 8=== {{Request for permissions/links|Mineo..."
24420 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..."
24424 Space normalisation on autocomment (T24784)
24427 title=[[Main Page]]
24429 /* __hello__world__ */
24431 <a href="/wiki/Main_Page#hello_world" title="Main Page">→</a><span dir="auto"><span class="autocomment">__hello__world__</span></span>
24435 percent-encoding and + signs in comments (T28410)
24439 [[ABC%33D% ++]] [[ABC%33D% ++|+%20]]
24441 <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>
24444 # Parsoid doesn't support this yet: see T75581
24445 # but it *should* omit the 'src' attribute if the image is bad.
24446 # PHP side of tests was disabled in
24447 # mediawiki/core:6bd31e7d95161a6e88fa86df60871051da997c3c
24448 # because of issues in the PHP parserTests infrastructure
24449 # (but the output below is indeed what the PHP side emits)
24451 Bad images - basic functionality
24454 !! html/php+disabled
24456 <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>
24460 Bad images - T18039: text after bad image disappears
24465 !! html/php+disabled
24471 <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>
24476 Verify that displaytitle works (T24501) no displaytitle
24480 wgAllowDisplayTitle=true
24481 wgRestrictDisplayTitle=false
24483 this is not the the title
24486 <p>this is not the the title
24491 Verify that displaytitle works (T24501) RestrictDisplayTitle=false
24496 wgAllowDisplayTitle=true
24497 wgRestrictDisplayTitle=false
24499 this is not the the title
24500 {{DISPLAYTITLE:whatever}}
24503 <p>this is not the the title
24508 Verify that displaytitle works (T24501) RestrictDisplayTitle=true mismatch
24513 wgAllowDisplayTitle=true
24514 wgRestrictDisplayTitle=true
24516 this is not the the title
24517 {{DISPLAYTITLE:whatever}}
24520 <p>this is not the the title
24525 Verify that displaytitle works (T24501) RestrictDisplayTitle=true matching
24530 wgAllowDisplayTitle=true
24531 wgRestrictDisplayTitle=true
24533 this is not the the title
24534 {{DISPLAYTITLE:screen}}
24537 <p>this is not the the title
24542 Verify that displaytitle works (T24501) AllowDisplayTitle=false
24547 wgAllowDisplayTitle=false
24549 this is not the the title
24550 {{DISPLAYTITLE:screen}}
24553 <p>this is not the the title
24554 <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>
24559 Verify that displaytitle works (T24501) AllowDisplayTitle=false no DISPLAYTITLE
24564 wgAllowDisplayTitle=false
24566 this is not the the title
24569 <p>this is not the the title
24574 Verify that displaytitle handles inline CSS styles (T28547) - rejected value
24579 wgAllowDisplayTitle=true
24580 wgRestrictDisplayTitle=true
24582 this is not the the title
24583 {{DISPLAYTITLE:<span style="display: none;">s</span>creen}}
24585 <span style="/* attempt to bypass $wgRestrictDisplayTitle */">s</span>creen
24586 <p>this is not the the title
24591 Verify that displaytitle handles inline CSS styles (T28547) - accepted value
24596 wgAllowDisplayTitle=true
24597 wgRestrictDisplayTitle=true
24599 this is not the the title
24600 {{DISPLAYTITLE:<span style="color: red;">s</span>creen}}
24602 <span style="color: red;">s</span>creen
24603 <p>this is not the the title
24608 Page status indicators: Empty name is invalid
24612 <indicator name=" "></indicator>
24613 <indicator></indicator>
24615 <p><span class="error"><strong>Error:</strong> Page status indicators' <code>name</code> attribute must not be empty.</span>
24616 <span class="error"><strong>Error:</strong> Page status indicators' <code>name</code> attribute must not be empty.</span>
24621 Page status indicators: Weird syntaxes that are okay
24625 <indicator name="empty" />
24626 <indicator name="name"></indicator>
24635 Page status indicators: Torture test
24639 <indicator name="01">hello world</indicator>
24640 <indicator name="02">[[Main Page]]</indicator>
24641 <indicator name="03">[[File:Foobar.jpg|25px|link=]]</indicator>
24642 <indicator name="04">[[File:Foobar.jpg|25px]]</indicator>
24643 <indicator name="05">*foo
24645 <indicator name="06"><nowiki>foo</nowiki></indicator>
24646 <indicator name="07"> Preformatted</indicator>
24647 <indicator name="08"><div>Broken tag</indicator>
24648 <indicator name="09">{| class=wikitable
24651 <indicator name="10">Two
24653 paragraphs</indicator>
24656 02=<a href="/wiki/Main_Page" title="Main Page">Main Page</a>
24657 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" />
24658 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>
24659 05=<ul><li>foo</li>
24663 07=<pre>Preformatted
24665 08=<div>Broken tag</div>
24667 09=<table class="wikitable">
24684 preload: check <noinclude> and <includeonly>
24688 Hello <noinclude>cruel</noinclude><includeonly>kind</includeonly> world.
24694 preload: check <onlyinclude>
24698 Goodbye <onlyinclude>Hello world</onlyinclude>
24704 preload: can pass tags through if we want to
24708 <includeonly><</includeonly>includeonly>Hello world<includeonly><</includeonly>/includeonly>
24710 <includeonly>Hello world</includeonly>
24714 preload: check that it doesn't try to do tricks
24718 * <!-- Hello --> ''{{world}}'' {{<includeonly>subst:</includeonly>How are you}}{{ {{{|safesubst:}}} #if:1|2|3}}
24720 * <!-- Hello --> ''{{world}}'' {{subst:How are you}}{{ {{{|safesubst:}}} #if:1|2|3}}
24724 Play a bit with r67090 and T5158
24726 <div style="width:50% !important"> </div>
24727 <div style="width:50% !important"> </div>
24728 <div style="width:50% !important"> </div>
24729 <div style="border : solid;"> </div>
24731 <div style="width:50% !important"> </div>
24732 <div style="width:50% !important"> </div>
24733 <div style="width:50% !important"> </div>
24734 <div style="border : solid;"> </div>
24737 <div style="width:50% !important" data-parsoid='{"stx":"html"}'><span typeof="mw:Entity" data-parsoid='{"srcContent":" "}'> </span></div>
24738 <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>
24739 <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>
24740 <div style="border : solid;" data-parsoid='{"stx":"html"}'><span typeof="mw:Entity" data-parsoid='{"srcContent":" "}'> </span></div>
24745 French spaces in wikitext
24747 foo ! bar ? bat 50 % is less than 75 %.
24749 Hello : this ; is « something ‹ else › again »
24751 <p>foo ! bar ? bat 50 % is less than 75 %.
24752 </p><p>Hello : this ; is « something ‹ else › again »
24756 # It would be reasonable for Parsoid and PHP to differ here.
24757 # The PHP behavior is arguably a bug.
24759 Corner case: french spaces in definition list
24763 <dl><dt>foo </dt>
24768 T5158: Test for French spaces in attributes
24770 <br style=" clear : both ; " />
24772 <p><br style="clear : both ;" />
24777 HTML5 data attributes
24779 <span data-foo="bar">Baz</span>
24780 <p data-abc-def_hij="">Quuz</p>
24782 <p><span data-foo="bar">Baz</span>
24784 <p data-abc-def_hij="">Quuz</p>
24787 <p><span data-foo="bar" data-parsoid='{"stx":"html"}'>Baz</span></p>
24788 <p data-abc-def_hij="" data-parsoid='{"stx":"html"}'>Quuz</p>
24792 Strip reserved data attributes
24794 <div data-mw="foo" data-parsoid="bar" data-mw-someext="baz" data-ok="fred" data-ooui="xyzzy" data-bad:ns="ns">d</div>
24796 <div data-ok="fred">d</div>
24799 <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>
24803 percent-encoding and + signs in internal links (T28410)
24805 [[User:+%]] [[Page+title%]]
24806 [[%+]] [[%+|%20]] [[%+ ]] [[%+r]]
24807 [[%]] [[+]] [[File:%+abc%39|foo|[[bar]]]]
24808 [[%33%45]] [[%33%45+]]
24810 <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>
24811 <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>
24812 <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>
24813 <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>
24816 <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>
24817 <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>
24818 <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>
24819 <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>
24823 Special characters in embedded file links (T29679)
24825 [[File:Contains & ampersand.jpg]]
24826 [[File:Does not exist.jpg|Title with & ampersand]]
24828 <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>
24829 <a href="/index.php?title=Special:Upload&wpDestFile=Does_not_exist.jpg" class="new" title="File:Does not exist.jpg">Title with & ampersand</a>
24832 <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>
24833 <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>
24837 Confirm that 'apos' named character reference doesn't make it to output (not legal in HTML 4)
24839 Text's been normalized?
24841 <p>Text's been normalized?
24846 T21052 U+3000 IDEOGRAPHIC SPACE should terminate free external links
24848 http://www.example.org/ <-- U+3000 (vim: ^Vu3000)
24850 <p><a rel="nofollow" class="external free" href="http://www.example.org/">http://www.example.org/</a> <-- U+3000 (vim: ^Vu3000)
24855 T21052 U+3000 IDEOGRAPHIC SPACE should terminate bracketed external links
24857 [http://www.example.org/ ideograms]
24859 <p><a rel="nofollow" class="external text" href="http://www.example.org/">ideograms</a>
24864 T21052 U+3000 IDEOGRAPHIC SPACE should terminate external images links
24866 http://www.example.org/pic.png <-- U+3000 (vim: ^Vu3000)
24868 <p><img src="http://www.example.org/pic.png" alt="pic.png"/> <-- U+3000 (vim: ^Vu3000)
24892 T33098 Template which includes system messages which includes the template
24896 <p><span class="error">Template loop detected: <a href="/wiki/Template:Identical" title="Template:Identical">Template:Identical</a></span>
24897 <span class="error">Template loop detected: <a href="/wiki/Template:Identical" title="Template:Identical">Template:Identical</a></span>
24902 T33490 Turkish: ucfirst 'blah'
24913 T33490 Turkish: ucfirst 'ix'
24924 T33490 Turkish: lcfirst 'BLAH'
24935 T33490 Turkish: ucfırst (with a dotless i)
24941 <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>
24946 T33490 ucfırst (with a dotless i) with English language
24952 <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>
24956 # Note that Parsoid doesn't emit an explicit TOC.
24957 # Note also that the html2wt direction tends to emit an extra newline
24958 # between the __TOC__ magicword and the first heading unless *both*
24959 # the <meta> and the <h2> have a data-parsoid attribute set (even if
24963 T28375: TOC with italics
24965 title=[[Main Page]]
24968 ==''Lost'' episodes==
24970 <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>
24972 <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>
24976 <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>
24979 <meta property="mw:PageProp/toc" data-parsoid='{}'/>
24980 <h2 id="Lost_episodes" data-parsoid='{}'><i>Lost</i> episodes</h2>
24984 T28375: TOC with bold
24986 title=[[Main Page]]
24989 =='''should be bold''' then normal text==
24991 <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>
24993 <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>
24997 <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>
25000 <meta property="mw:PageProp/toc" data-parsoid='{}'/>
25001 <h2 id="should_be_bold_then_normal_text" data-parsoid='{}'><b>should be bold</b> then normal text</h2>
25005 T35845: Headings become cursive in TOC when they contain an image
25007 title=[[Main Page]]
25010 ==Image [[Image:foobar.jpg]]==
25012 <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>
25014 <li class="toclevel-1 tocsection-1"><a href="#Image"><span class="tocnumber">1</span> <span class="toctext">Image</span></a></li>
25018 <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>
25021 <meta property="mw:PageProp/toc" data-parsoid='{}'/>
25022 <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>
25026 T35845 (2): Headings become bold in TOC when they contain a blockquote
25028 title=[[Main Page]]
25031 ==<blockquote>Quote</blockquote>==
25033 <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>
25035 <li class="toclevel-1 tocsection-1"><a href="#Quote"><span class="tocnumber">1</span> <span class="toctext">Quote</span></a></li>
25039 <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>
25042 <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>
25044 <li class="toclevel-1 tocsection-1"><a href="#Quote"><span class="tocnumber">1</span> <span class="toctext">Quote</span></a></li>
25048 <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>
25050 <meta property="mw:PageProp/toc" data-parsoid='{}'/>
25051 <h2 id="Quote" data-parsoid='{}'><blockquote><p>Quote</p></blockquote></h2>
25055 Unclosed tags in TOC
25057 wgFragmentMode=[ 'html5', 'legacy' ]
25059 title=[[Main Page]]
25063 <small>Hanc marginis exiguitas non caperet.</small>
25066 <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>
25068 <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>
25072 <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>
25073 <p><small>Hanc marginis exiguitas non caperet.</small>
25077 <meta property="mw:PageProp/toc" data-parsoid='{}'/>
25078 <h2 id="Proof:_2_<_3" data-parsoid='{}'><span id="Proof:_2_.3C_3" typeof="mw:FallbackId"></span>Proof: 2 < 3</h2>
25079 <p><small>Hanc marginis exiguitas non caperet.</small>
25084 Multiple tags in TOC
25087 ==<i>Foo</i> <b>Bar</b>==
25089 ==<i>Foo</i> <blockquote>Bar</blockquote>==
25091 <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>
25093 <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>
25094 <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>
25098 <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>
25099 <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>
25102 <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>
25104 <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>
25105 <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>
25109 <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>
25110 <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>
25112 <meta property="mw:PageProp/toc" data-parsoid='{}'/>
25113 <h2 id="Foo_Bar" data-parsoid='{}'><i data-parsoid='{"stx":"html"}'>Foo</i> <b data-parsoid='{"stx":"html"}'>Bar</b></h2>
25115 <h2 id="Foo_Bar_2" data-parsoid='{}'><i data-parsoid='{"stx":"html"}'>Foo</i> <blockquote><p>Bar</p></blockquote></h2>
25118 # Don't expect Parsoid to roundtrip this until the php parser comes closer to
25119 # html5 tag parsing.
25121 Tags with parameters in TOC
25126 ==<sup class="in-h2">Hello</sup>==
25128 ==<sup class="a > b">Evilbye</sup>==
25130 <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>
25132 <li class="toclevel-1 tocsection-1"><a href="#Hello"><span class="tocnumber">1</span> <span class="toctext"><sup>Hello</sup></span></a></li>
25133 <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>
25137 <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>
25138 <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>
25141 <meta property="mw:PageProp/toc" />
25142 <h2 id="Hello"><sup class="in-h2" data-parsoid='{"stx":"html"}'>Hello</sup></h2>
25144 <h2 id='b">Evilbye'><span id="b.22.3EEvilbye" typeof="mw:FallbackId"></span><sup class="a " data-parsoid='{"stx":"html"}'> b">Evilbye</sup></h2>
25148 span tags with directionality in TOC
25151 ==<span dir="ltr">C++</span>==
25153 ==<span dir="rtl">זבנג!</span>==
25155 ==<span style="font-style: italic">The attributes on these span tags must be deleted from the TOC</span>==
25157 ==<span style="font-style: italic" dir="ltr">All attributes on these span tags must be deleted from the TOC</span>==
25159 ==<span dir="ltr" style="font-style: italic">Attributes after dir on these span tags must be deleted from the TOC</span>==
25161 <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>
25163 <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>
25164 <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>
25165 <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>
25166 <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>
25167 <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>
25171 <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>
25172 <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>
25173 <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>
25174 <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>
25175 <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>
25178 <meta property="mw:PageProp/toc" data-parsoid='{}'/>
25179 <h2 id="C++" data-parsoid='{}'><span id="C.2B.2B" typeof="mw:FallbackId"></span><span dir="ltr">C++</span></h2>
25180 <h2 id="זבנג!"><span id=".D7.96.D7.91.D7.A0.D7.92.21" typeof="mw:FallbackId"></span><span dir="rtl">זבנג!</span></h2>
25181 <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>
25182 <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>
25183 <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>
25187 T74884: bdi element in ToC
25190 ==<bdi>test</bdi>==
25192 <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>
25194 <li class="toclevel-1 tocsection-1"><a href="#test"><span class="tocnumber">1</span> <span class="toctext"><bdi>test</bdi></span></a></li>
25198 <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>
25201 <meta property="mw:PageProp/toc" data-parsoid='{}'/>
25202 <h2 id="test" data-parsoid='{}'><bdi>test</bdi></h2>
25206 T35715: s/strike element in ToC
25209 ==<s>test</s> test <strike>test</strike>==
25211 <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>
25213 <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>
25217 <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>
25220 <meta property="mw:PageProp/toc" data-parsoid='{}'/>
25221 <h2 id="test_test_test" data-parsoid='{}'><s>test</s> test <strike>test</strike></h2>
25225 T198618: style element in ToC
25230 ==<style>.foo {}</style>Style<style>.bar {}</style>==
25232 <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>
25234 <li class="toclevel-1 tocsection-1"><a href="#Style"><span class="tocnumber">1</span> <span class="toctext">Style</span></a></li>
25238 <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>
25241 <meta property="mw:PageProp/toc" data-parsoid="{}"/>
25242 <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>
25246 T198618: script element in ToC
25251 ==<html><script>alert(1);</script></html>Script<html><script>alert(1);</script></html>==
25253 <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>
25255 <li class="toclevel-1 tocsection-1"><a href="#Script"><span class="tocnumber">1</span> <span class="toctext">Script</span></a></li>
25259 <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>
25262 <meta property="mw:PageProp/toc" data-parsoid='{}'/>
25263 <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>
25267 Empty <p> tag in TOC, removed by Sanitizer (T92892)
25272 <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>
25274 <li class="toclevel-1 tocsection-1"><a href="#x"><span class="tocnumber">1</span> <span class="toctext">x</span></a></li>
25278 <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>
25281 <meta property="mw:PageProp/toc" data-parsoid='{}'/>
25282 <h2 id="x" data-parsoid='{}'>x</h2>
25288 == {{int:headline_sample}} ==
25292 T34057: Title needed when expanding <h> nodes.
25294 title=[[Main Page]]
25298 <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>
25303 Strip marker in urlencode
25305 {{urlencode:x<nowiki/>y}}
25306 {{urlencode:x<nowiki/>y|wiki}}
25307 {{urlencode:x<nowiki/>y|path}}
25308 {{urlencode:x<pre id="one">two</pre>y}}
25336 Strip marker in formatNum
25338 {{formatnum:1<nowiki/>2}}
25339 {{formatnum:1<nowiki/>2|R}}
25347 Check noCommafy in formatNum
25351 {{formatnum:123456.78}}
25352 {{formatnum:123456.78|NOSEP}}
25360 Wrong option for formatNum (T58199)
25362 {{formatnum:1,234.56|Random}}
25363 {{formatnum:1,234.56|EVERYTHING}}
25364 {{formatnum:1234.56|any argument that has the string 'NOSEP'}}
25373 Strip marker in grammar
25377 {{grammar:elative|foo<nowiki/>bar}}
25384 Strip marker in padleft
25386 {{padleft:|2|x<nowiki/>y}}
25393 Strip marker in padright
25395 {{padright:|2|x<nowiki/>y}}
25402 Strip marker in anchorencode
25404 {{anchorencode:x<nowiki/>y}}
25409 <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>
25413 nowiki inside link inside heading (T20295)
25415 ==[[foo|x<nowiki>y</nowiki>z]]==
25417 <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>
25422 new support for bdi element (T33817)
25424 <p dir="rtl" lang="he">ולדימיר לנין (ברוסית: <bdi lang="ru">Владимир Ленин</bdi>, 24 באפריל 1870–22 בינואר 1924) הוא מנהיג פוליטי קומוניסטי רוסי.</p>
25426 <p dir="rtl" lang="he">ולדימיר לנין (ברוסית: <bdi lang="ru">Владимир Ленин</bdi>, 24 באפריל 1870–22 בינואר 1924) הוא מנהיג פוליטי קומוניסטי רוסי.</p>
25431 Ignore pipe between table row attributes
25435 |- id=foo | style='color: red'
25443 <tr id="foo" style="color: red">
25450 Language parser function
25459 Padleft and padright (default 0-padding)
25468 <p><span typeof="mw:Transclusion" data-mw='{"parts":[{"template":{"target":{"wt":"padleft:xyz","function":"padleft"},"params":{"1":{"wt":"5"}},"i":0}}]}'>00xyz</span>
25469 <span typeof="mw:Transclusion" data-mw='{"parts":[{"template":{"target":{"wt":"padright:xyz","function":"padright"},"params":{"1":{"wt":"5"}},"i":0}}]}'>xyz00</span></p>
25473 Padleft and padright (partial fill)
25475 {{padleft:xyz|6|ab}}
25476 {{padright:xyz|6|ab}}
25482 <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>
25483 <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>
25487 Padleft and padright as substr
25489 {{padleft:|3|abcde}}
25490 {{padright:|3|abcde}}
25496 <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>
25497 <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>
25501 Padleft and padright with non-numerical length (T180403)
25503 {{padleft:abcdef|junk}}
25504 {{padright:abcdef|junk}}
25512 Special parser function
25514 {{#special:RandomPage}}
25515 {{#special:BaDtItLe}}
25516 {{#special:Foobar}}
25525 T36939 - Case insensitive link parsing ([HttP://])
25527 [HttP://MediaWiki.Org/]
25529 <p><a rel="nofollow" class="external autonumber" href="HttP://MediaWiki.Org/">[1]</a>
25532 <p><a rel="mw:ExtLink" class="external autonumber" href="HttP://MediaWiki.Org/"></a></p>
25536 T36939 - Case insensitive link parsing ([HttP:// title])
25538 [HttP://MediaWiki.Org/ MediaWiki]
25540 <p><a rel="nofollow" class="external text" href="HttP://MediaWiki.Org/">MediaWiki</a>
25545 T36939 - Case insensitive link parsing (HttP://)
25547 HttP://MediaWiki.Org/
25549 <p><a rel="nofollow" class="external free" href="HttP://MediaWiki.Org/">HttP://MediaWiki.Org/</a>
25552 <p><a rel="mw:ExtLink" class="external free" href="HttP://MediaWiki.Org/">HttP://MediaWiki.Org/</a></p>
25570 <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>
25571 <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>
25572 <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>
25573 <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>
25574 <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>
25580 ### Parsoid-specific tests
25581 ### Parsoid-PHP parser incompatibilities
25584 1. SOL-sensitive wikitext tokens as template-args
25586 parsoid=wt2html,wt2wt
25592 <span about="#mwt1" typeof="mw:Transclusion">
25593 </span><ul about="#mwt1"><li>a</li>
25595 <span about="#mwt2" typeof="mw:Transclusion">
25596 </span><ol about="#mwt2"><li>a</li>
25598 <span about="#mwt3" typeof="mw:Transclusion">
25599 </span><dl about="#mwt3"><dd>a</dd>
25603 #### -----------------------------------------------------------------
25604 #### Parsoid-specific functionality tests
25605 #### -----------------------------------------------------------------
25607 # T65642/T68749: Formatting elt fixup around images.
25608 # We know wt2wt will fail, but we expect selser to pass.
25609 # Due to the nature of our testing, wt2wt and selser tests will enter the
25610 # blacklist and we'll catch selser regressions based on changes to the
25611 # blacklist entries for selser tests.
25613 1. Treebuilder fixup of formatting elt
25615 parsoid=wt2html,wt2wt
25620 [[Image:Foobar.jpg|right|Test]]
25628 </small></p><small>
25629 <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>
25630 </small><p><small></small>
25632 </td></tr></tbody></table>
25636 <p><small data-parsoid='{"stx":"html","autoInsertedEnd":true}'></small></p><small data-parsoid='{"stx":"html","autoInsertedEnd":true,"autoInsertedStart":true}'>
25637 <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>
25638 <p><small data-parsoid='{"stx":"html","autoInsertedStart":true}'></small></p></td></tr>
25643 2. Treebuilder fixup of formatting elt
25645 parsoid=wt2html,wt2wt
25647 '''foo[[File:Foobar.jpg|thumb|caption]]bar'''
25649 <small>[[Image:Foobar.jpg|right|300px]]</small>
25651 <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>
25652 </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>
25654 <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>
25656 <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>
25660 3. Treebuilder fixup of formatting elt
25662 parsoid=wt2html,wt2wt
25664 <small>'''foo[[File:Foobar.jpg|thumb|caption]]bar'''</small>
25666 <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>
25669 <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>
25673 4. Treebuilder fixup of formatting elt: formatting tags around captionless images
25675 parsoid=wt2html,wt2wt
25677 '''<small>[[Image:Foobar.jpg|right|300px]]</small>'''
25679 <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>
25681 <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>
25684 #### ----------------------------------------------------------------
25685 #### Parsoid-only testing of Parsoid's impl of LST
25686 #### Not implemented yet, see
25687 #### https://www.mediawiki.org/wiki/Parsoid/HTML_based_LST
25688 #### ----------------------------------------------------------------
25690 ## We still need to support serializing the older format while content is stored.
25692 LST Sections: Backwards compatibility
25695 "suppressErrors": true,
25696 "modes": ["html2wt"]
25699 <section begin="2011-05-16" />
25700 <section end="2014-04-10 (MW 1.23wmf22)" />
25702 <p><meta typeof="mw:Extension/LabeledSectionTransclusion/begin" content="2011-05-16"/>
25703 <meta typeof="mw:Extension/LabeledSectionTransclusion/end" content="2014-04-10 (MW 1.23wmf22)"/></p>
25707 LST Sections: Newfangled approach
25709 <section begin="2011-05-16" />
25710 <section end="2014-04-10 (MW 1.23wmf22)" />
25712 <p><span typeof="mw:Extension/section" about="#mwt4" data-mw='{"name":"section","attrs":{"begin":"2011-05-16"}}'>
25714 <span typeof="mw:Extension/section" about="#mwt6" data-mw='{"name":"section","attrs":{"end":"2014-04-10 (MW 1.23wmf22)"}}'>
25718 #--------- Test stripping of empty nodes in template content ----------
25721 Empty LI and TR nodes should be stripped from template content
25726 <ul about="#mwt1" typeof="mw:Transclusion" data-mw='{"parts":[{"template":{"target":{"wt":"EmptyLITest","href":"./Template:EmptyLITest"},"params":{},"i":0}}]}'>
25730 <table about="#mwt2" typeof="mw:Transclusion" data-mw='{"parts":[{"template":{"target":{"wt":"EmptyTRTest","href":"./Template:EmptyTRTest"},"params":{},"i":0}}]}'>
25743 Empty LI and TR nodes should not be stripped from top-level content
25757 <li class='mw-empty-elt'></li>
25762 <tr class='mw-empty-elt'></tr>
25771 Empty TR nodes should not be stripped if they have any attributes set
25773 {{EmptyTRWithHTMLAttrTest}}
25775 <table about="#mwt1" typeof="mw:Transclusion" data-mw='{"parts":[{"template":{"target":{"wt":"EmptyTRWithHTMLAttrTest","href":"./Template:EmptyTRWithHTMLAttrTest"},"params":{},"i":0}}]}'>
25776 <tr align='center'></tr>
25777 <tr><td>foo</td></tr>
25778 <tr align='center'></tr>
25779 <tr><td>bar</td></tr>
25783 #### ----------------------------------------------------------------
25784 #### The following section of tests are primarily to test
25785 #### wikitext escaping capabilities of Parsoid. Given that
25786 #### escaping can be done any number of ways, the wikitext (input)
25787 #### is always adjusted to reflect how Parsoid adds nowiki
25790 #### We are marking several tests as parsoid-only since the
25791 #### HTML in the result section is different from what the
25792 #### PHP parser generates for it.
25793 #### ----------------------------------------------------------------
25796 #### --------------- Headings ---------------
25798 #### 1. Nested inside html <h1>=foo=</h1>
25799 #### 2. Outside heading nest on a single line <h1>foo</h1>*bar
25800 #### 3. Nested inside html with wikitext split by html tags
25801 #### 4. No escape needed
25802 #### 5. Empty headings <h1></h1>
25803 #### 6. Heading chars in SOL context
25804 #### ----------------------------------------
25806 Headings: 0. Unnested
25816 <p>=foo<i>a</i>=</p>
25818 <nowiki>=foo=</nowiki>
25820 <nowiki> </nowiki>=foo=
25822 <nowiki>=foo=</nowiki>
25824 =foo''a''<nowiki>=</nowiki>
25827 # New headings and existing headings are handled differently
25829 Headings: 1. Nested inside html
25837 <h1 data-parsoid=''>=foo=</h1>
25838 <h2 data-parsoid=''>=foo=</h2>
25839 <h3 data-parsoid=''>=foo=</h3>
25840 <h4 data-parsoid=''>=foo=</h4>
25841 <h5 data-parsoid=''>=foo=</h5>
25842 <h6 data-parsoid=''>=foo=</h6>
25850 =<nowiki>=foo=</nowiki>=
25851 ==<nowiki>=foo=</nowiki>==
25852 ===<nowiki>=foo=</nowiki>===
25853 ====<nowiki>=foo=</nowiki>====
25854 =====<nowiki>=foo=</nowiki>=====
25855 ======<nowiki>=foo=</nowiki>======
25860 Headings: 2. Outside heading nest on a single line <h1>foo</h1>*bar
25869 <nowiki>*</nowiki>bar
25875 <nowiki>=bar=</nowiki>
25879 Headings: 3. Nested inside html with wikitext split by html tags
25883 <h1>=<b>bold</b>foo=</h1>
25885 = ='''bold'''foo= =
25889 Headings: 4a. No escaping needed (testing just h1 and h2)
25900 <h1><i>=</i>foo=</h1>
25920 Headings: 4b. No escaping needed (inside p-tags)
25937 Headings: 4c. Short headings (1)
25944 <nowiki>===</nowiki>
25950 # in the html2wt direction we emit '= = =' or '=<nowiki>=</nowiki>='
25952 Headings: 4d. Short headings (2)
25954 parsoid=wt2html,html2html
25965 <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>
25966 <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>
25967 <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>
25972 <h1 id="="><span id=".3D" typeof="mw:FallbackId"></span>=</h1>
25973 <h1 id="=="><span id=".3D.3D" typeof="mw:FallbackId"></span>==</h1>
25974 <h2 id="=_2"><span id=".3D_2" typeof="mw:FallbackId"></span>=</h2>
25978 Headings: 5. Empty headings
25982 <h1 data-parsoid='{}'></h1>
25984 <h2 data-parsoid='{}'></h2>
25986 <h3 data-parsoid='{}'></h3>
25988 <h4 data-parsoid='{}'></h4>
25990 <h5 data-parsoid='{}'></h5>
25992 <h6 data-parsoid='{}'></h6>
26002 =====<nowiki/>=====
26004 ======<nowiki/>======
26008 Headings: 6a. Heading chars in SOL context (with trailing spaces)
26018 <nowiki>=a=</nowiki>
26020 <nowiki>=a=</nowiki>
26022 <nowiki>=a=</nowiki>
26026 Headings: 6b. Heading chars in SOL context (with trailing newlines)
26039 <nowiki>=a=</nowiki>
26042 <nowiki>=a=</nowiki>
26045 <nowiki>=a=</nowiki>
26050 Headings: 6c. Heading chars in SOL context (leading newline break)
26058 <nowiki>=b=</nowiki>
26062 Headings: 6d. Heading chars in SOL context (with interspersed comments)
26066 <!--c0--><p>=a=</p>
26068 <!--c1--><p>=a=</p> <!--c2--> <!--c3-->
26070 <!--c0--><nowiki>=a=</nowiki>
26072 <!--c1--><nowiki>=a=</nowiki> <!--c2--> <!--c3-->
26076 Headings: 6d. Heading chars in SOL context (No escaping needed)
26086 Headings: 7. Insert a newline between new content and headings
26092 <h2 data-parsoid='{}'>A</h2>
26093 <p data-parsoid='{}'>a</p>
26104 Headings: Used as horizontal rule
26106 wgFragmentMode=[ 'html5', 'legacy' ]
26112 <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>
26115 <h6 id="==="><span id=".3D.3D.3D" typeof="mw:FallbackId"></span>===</h6>
26118 #### --------------- Lists ---------------
26119 #### 0. Outside nests (*foo, etc.)
26120 #### 1. Nested inside html <ul><li>*foo</li></ul>
26121 #### 2. Inside definition lists
26122 #### 3. Only bullets at start should be escaped
26123 #### 4. No escapes needed
26124 #### 5. No unnecessary escapes
26125 #### 6. Escape bullets in SOL position
26126 #### 7. Escape bullets in a multi-line context
26127 #### ----------------------------------------
26130 Lists: 0. Outside nests
26140 <nowiki>*</nowiki>foo
26142 <nowiki>#</nowiki>foo
26144 <nowiki>;</nowiki>Foo<nowiki>:</nowiki>bar
26147 ## Making these next 3 tests Parsoid-only since they are html2wt tests
26148 ## to test wikitext escaping, and insignificant whitespace diffs
26149 ## cause PHP parser tests to barf
26151 Lists: 1. Nested inside html (No unnecessary escapes)
26160 <li data-parsoid='{}'>*foo</li>
26161 <li data-parsoid='{}'>#foo</li>
26162 <li data-parsoid='{}'>:foo</li>
26163 <li data-parsoid='{}'>;foo</li>
26171 <li data-parsoid='{}'>*foo</li>
26172 <li data-parsoid='{}'>#foo</li>
26173 <li data-parsoid='{}'>:foo</li>
26174 <li data-parsoid='{}'>;foo</li>
26181 *<nowiki>*foo</nowiki>
26182 *<nowiki>#foo</nowiki>
26183 *<nowiki>:foo</nowiki>
26184 *<nowiki>;foo</nowiki>
26190 #<nowiki>*foo</nowiki>
26191 #<nowiki>#foo</nowiki>
26192 #<nowiki>:foo</nowiki>
26193 #<nowiki>;foo</nowiki>
26197 Lists: 2. Inside definition lists
26201 <dl><dt>;foo</dt></dl>
26202 <dl><dt>:foo</dt></dl>
26205 <dl><dd>:foo</dd></dl>
26209 ; <nowiki>:foo</nowiki>
26211 ; <nowiki>:foo</nowiki>
26218 Lists: 3. Only bullets at start of text in wikitext-generated HTML should be escaped
26224 <li data-parsoid='{}'>*foo<i>it</i>*bar</li>
26228 *<nowiki>*foo</nowiki>''it''*bar
26232 Lists: 4. No escapes needed
26245 <li><a rel="mw:WikiLink" href="Foo" title="Foo">Foo</a>: bar
26249 <li><a rel="mw:WikiLink" href="Foo" title="Foo">Foo</a>*bar
26263 Lists: 5. No unnecessary escapes
26267 <ul><li> bar <span>[[foo]]</span></li></ul>
26268 <ul><li> =bar <span>[[foo]]</span></li></ul>
26269 <ul><li> [[bar <span>[[foo]]</span></li></ul>
26270 <ul><li> ]]bar <span>[[foo]]</span></li></ul>
26271 <ul><li> =bar <span>foo]]</span>=</li></ul>
26272 <ul><li> <s></s>: a</li></ul>
26273 <ul><li> <i>* foo</i></li></ul>
26276 * bar <span><nowiki>[[foo]]</nowiki></span>
26278 * =bar <span><nowiki>[[foo]]</nowiki></span>
26280 * [[bar <span><nowiki>[[foo]]</nowiki></span>
26282 * ]]bar <span><nowiki>[[foo]]</nowiki></span>
26284 * =bar <span>foo]]</span>=
26292 Lists: 6. Escape bullets in SOL position
26296 <p><!--cmt-->*foo</p>
26298 <!--cmt--><nowiki>*</nowiki>foo
26302 Lists: 7. Escape bullets in a multi-line context
26311 <nowiki>*</nowiki>b
26315 Lists: 8. Escape colons only if not present in tags
26319 <dl><dt>a:b<i>c:d</i></dt></dl>
26321 ; <nowiki>a:b</nowiki>''c:d''
26324 #### --------------- HRs ---------------
26325 #### 1. Single line
26326 #### -----------------------------------
26329 HRs: 1. Single line
26337 ----<nowiki>----</nowiki>
26342 #### --------------- Tables ---------------
26343 #### 1a. Simple example
26344 #### 1b. No escaping needed (!foo)
26345 #### 1c. No escaping needed (|foo)
26346 #### 1d. No escaping needed (|}foo)
26348 #### 2a. Nested in td (<td>foo|bar</td>)
26349 #### 2b. Nested in td (<td>foo||bar</td>)
26350 #### 2c. Nested in td -- no escaping needed(<td>foo!!bar</td>)
26352 #### 3a. Nested in th (<th>foo!bar</th>)
26353 #### 3b. Nested in th (<th>foo!!bar</th>)
26354 #### 3c. Nested in th -- no escaping needed(<th>foo||bar</th>)
26358 #### 4c. No escaping needed
26359 #### --------------------------------------
26362 Tables: 1a. Simple example
26370 <nowiki>{|</nowiki>
26375 Tables: 1b. No escaping needed
26386 Tables: 1c. No escaping needed
26397 Tables: 1d. No escaping needed
26408 Tables: 2a. Nested in td
26413 <td>foo|bar</td></tr>
26414 <tr><td>x<div>a|b</div></td>
26418 |<nowiki>foo|bar</nowiki>
26420 |x<div><nowiki>a|b</nowiki></div>
26428 <td>x<div>a|b</div>
26429 </td></tr></tbody></table>
26433 Tables: 2b. Nested in td
26439 <td>a<i>b||c</i></td>
26440 <td>a<i><div>b||c</div></i></td>
26441 </tr></tbody></table>
26444 |<nowiki>foo||bar</nowiki>
26445 |a''<nowiki>b||c</nowiki>''
26446 |a''<div><nowiki>b||c</nowiki></div>''
26455 <td>a<i><div>b||c</div></i>
26461 Tables: 2c. Nested in td -- no escaping needed
26477 Tables: 3a. Nested in th
26493 Tables: 3b. Nested in th
26498 <tr><th>foo!!bar</th>
26499 <th><i>foo|bar</i></th>
26500 <th><i>foo!!bar</i></th>
26501 <th><i><span>foo!!bar</span></i></th>
26502 </tr></tbody></table>
26505 !<nowiki>foo!!bar</nowiki>
26506 !''<nowiki>foo|bar</nowiki>''
26507 !''<nowiki>foo!!bar</nowiki>''
26508 !''<span><nowiki>foo!!bar</nowiki></span>''
26517 <th><i>foo!!bar</i>
26519 <th><i><span>foo!!bar</span></i>
26525 Tables: 3c. Nested in th
26530 <tr><th>foo||bar</th>
26531 <th><span typeof="mw:Nowiki">foo||bar</span></th>
26532 </tr></tbody></table>
26535 !<nowiki>foo||bar</nowiki>
26536 !<nowiki>foo||bar</nowiki>
26549 Tables: 4a. Escape -
26565 |<nowiki>-bar</nowiki>
26570 Tables: 4b. Escape +
26586 |<nowiki>+bar</nowiki>
26591 Tables: 4c. No escaping needed
26596 <tr><td>foo-bar</td><td>foo+bar</td></tr>
26597 <tr><td><i>foo</i>-bar</td><td><i>foo</i>+bar</td></tr>
26603 <div>a|b</div></td>
26648 Tables: 4d. No escaping needed
26653 <tbody><tr><td><a rel="mw:WikiLink" href="./Foo" title="Foo">Foo</a>-bar</td>
26654 <td data-parsoid='{"startTagSrc":"|","attrSepSrc":"|"}'>+1</td>
26655 <td data-parsoid='{"startTagSrc":"|","attrSepSrc":"|"}'>-2</td></tr>
26666 <td><a href="/wiki/Foo" title="Foo">Foo</a>-bar
26676 Tables: 5. Empty table cells should get whitespace to avoid need for nowikis
26680 <table><tr><td></td><td align="center" data-parsoid='{"stx":"row"}'></td><td data-parsoid='{"stx":"row"}'></td></tr></table>
26682 <table><tr><td></td><td align="center"></td><td></td></tr></table>
26684 <table><tr><td></td><td align="center" data-parsoid='{"stx":"row", "startTagSrc":"{{!}}{{!}}"}'></td><td data-parsoid='{"stx":"row"}'></td></tr></table>
26686 <table><tr><th></th><th align="center" data-parsoid='{"stx":"row"}'></th><th data-parsoid='{"stx":"row"}'></th></tr></table>
26689 | || align="center" | ||
26699 | {{!}}{{!}} align="center" | ||
26703 ! !! align="center" | !!
26709 <td align="center"></td>
26711 </td></tr></tbody></table>
26716 <td align="center">
26719 </td></tr></tbody></table>
26723 <td align="center"></td>
26725 </td></tr></tbody></table>
26729 <th align="center"></th>
26731 </th></tr></tbody></table>
26735 T97430: Don't emit empty nowiki pairs around marker meta tags
26739 <p>*This is a long sentence here that will make the nowiki algo split up the nowikis into multiple pairs
26740 |** Make this another long long long sentence forcing the nowiki algo to split up the nowikis.</p>
26742 <nowiki>*</nowiki>This is a long sentence here that will make the nowiki algo split up the nowikis into multiple pairs
26743 |** Make this another long long long sentence forcing the nowiki algo to split up the nowikis.
26747 Unclosed xmlish element in table line shouldn't eat end delimiters
26752 <tbody><tr><td> <foo</td>
26753 <td> bar></td></tr>
26770 #### --------------- Links ----------------
26771 #### 1. Quote marks in link text
26772 #### 2. Wikilinks: Escapes needed
26773 #### 3. Wikilinks: No escapes needed
26774 #### 4. Extlinks: Escapes needed
26775 #### 5. Extlinks: No escapes needed
26776 #### --------------------------------------
26778 Links 1. WikiLinks: No escapes needed
26782 <p><a rel="mw:WikiLink" href="Foo" title="Foo">Foo<i>boo</i></a>
26783 <a rel="mw:WikiLink" href="Foo" title="Foo">[Foobar]</a>
26784 <a rel="mw:WikiLink" href="Foo" title="Foo">x [Foobar] x</a></p>
26788 [[Foo|x [Foobar] x]]
26790 <p><a href="/wiki/Foo" title="Foo">Foo<i>boo</i></a>
26791 <a href="/wiki/Foo" title="Foo">[Foobar]</a>
26792 <a href="/wiki/Foo" title="Foo">x [Foobar] x</a>
26797 Links 2. WikiLinks: Escapes needed
26801 <a href="Foo" rel="mw:WikiLink">Foobar]</a>
26802 <a href="Foo" rel="mw:WikiLink">x [http://google.com g] x</a>
26803 <a href="Foo" rel="mw:WikiLink">[[Bar]]</a>
26804 <a href="Foo" rel="mw:WikiLink">x [[Bar]] x</a>
26805 <a href="Foo" rel="mw:WikiLink">|Bar</a>
26806 <a href="Foo" rel="mw:WikiLink">]]bar</a>
26807 <a href="Foo" rel="mw:WikiLink">[[bar</a>
26808 <a href="Foo" rel="mw:WikiLink">x [[ y</a>
26809 <a href="Foo" rel="mw:WikiLink">x ]] y</a>
26810 <a href="Foo" rel="mw:WikiLink">x ]] y [[ z</a>
26812 [[Foo|<nowiki>Foobar]</nowiki>]]
26813 [[Foo|x <nowiki>[http://google.com g]</nowiki> x]]
26814 [[Foo|<nowiki>[[Bar]]</nowiki>]]
26815 [[Foo|<nowiki>x [[Bar]] x</nowiki>]]
26816 [[Foo|<nowiki>|Bar</nowiki>]]
26817 [[Foo|<nowiki>]]bar</nowiki>]]
26818 [[Foo|<nowiki>[[bar</nowiki>]]
26819 [[Foo|<nowiki>x [[ y</nowiki>]]
26820 [[Foo|<nowiki>x ]] y</nowiki>]]
26821 [[Foo|<nowiki>x ]] y [[ z</nowiki>]]
26823 <p><a href="/wiki/Foo" title="Foo">Foobar]</a>
26824 <a href="/wiki/Foo" title="Foo">x [http://google.com g] x</a>
26825 <a href="/wiki/Foo" title="Foo">[[Bar]]</a>
26826 <a href="/wiki/Foo" title="Foo">x [[Bar]] x</a>
26827 <a href="/wiki/Foo" title="Foo">|Bar</a>
26828 <a href="/wiki/Foo" title="Foo">]]bar</a>
26829 <a href="/wiki/Foo" title="Foo">[[bar</a>
26830 <a href="/wiki/Foo" title="Foo">x [[ y</a>
26831 <a href="/wiki/Foo" title="Foo">x ]] y</a>
26832 <a href="/wiki/Foo" title="Foo">x ]] y [[ z</a>
26837 Links 3. WikiLinks: No escapes needed
26841 <p><a rel="mw:WikiLink" href="Foo">[Foobar</a>
26842 <a rel="mw:WikiLink" href="Foo" title="Foo">foo|bar</a></p>
26847 <p><a href="/wiki/Foo" title="Foo">[Foobar</a>
26848 <a href="/wiki/Foo" title="Foo">foo|bar</a>
26853 Links 4. ExtLinks: Escapes needed
26857 <p><a rel="mw:ExtLink" href="http://google.com">[google]</a>
26858 <a rel="mw:ExtLink" href="http://google.com">google]</a>
26859 <a rel="mw:ExtLink" href="http://google.com">goog] le</a></p>
26860 <p>[http://google.com]</p>
26861 <p>[http://google.com google]</p>
26862 <p>[<a rel="mw:ExtLink" href="http://google.com">http://google.com</a>]</p>
26863 <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>
26865 [http://google.com <nowiki>[google]</nowiki>]
26866 [http://google.com <nowiki>google]</nowiki>]
26867 [http://google.com <nowiki>goog] le</nowiki>]
26869 <nowiki>[http://google.com]</nowiki>
26871 <nowiki>[http://google.com google]</nowiki>
26873 [http://google.com<nowiki>]</nowiki>
26875 [{{echo|http://google.com}}<nowiki>]</nowiki>
26877 <p><a rel="nofollow" class="external text" href="http://google.com">[google]</a>
26878 <a rel="nofollow" class="external text" href="http://google.com">google]</a>
26879 <a rel="nofollow" class="external text" href="http://google.com">goog] le</a>
26880 </p><p>[http://google.com]
26881 </p><p>[http://google.com google]
26882 </p><p>[<a rel="nofollow" class="external free" href="http://google.com">http://google.com</a>]
26883 </p><p>[<a rel="nofollow" class="external free" href="http://google.com">http://google.com</a>]
26888 Links 5. ExtLinks: No escapes needed
26892 <p><a rel="mw:ExtLink" href="http://google.com">[google</a></p>
26893 <p>[<a ref="mw:ExtLink" href="http://google.com"></a>]</p>
26895 [http://google.com [google]
26897 [[http://google.com]]
26899 <p><a rel="nofollow" class="external text" href="http://google.com">[google</a>
26900 </p><p>[<a rel="nofollow" class="external autonumber" href="http://google.com">[1]</a>]
26905 Links 6. Add <nowiki/>s between text-nodes and url-links when required (T66300)
26909 <p>x<a rel="mw:ExtLink" href="http://example.com" data-parsoid='{"stx":"url"}'>http://example.com</a>y
26910 <a rel="mw:ExtLink" href="http://example.com" data-parsoid='{"stx":"url"}'>http://example.com</a>?x
26911 <a rel="mw:ExtLink" href="http://example.com" data-parsoid='{"stx":"url"}'>http://example.com</a>&x
26912 <a rel="mw:ExtLink" href="http://example.com" data-parsoid='{"stx":"url"}'>http://example.com</a>'x
26913 <a rel="mw:ExtLink" href="http://example.com" data-parsoid='{"stx":"url"}'>http://example.com</a>,x
26914 <a rel="mw:ExtLink" href="http://example.com" data-parsoid='{"stx":"url"}'>http://example.com</a>.x
26915 <a rel="mw:ExtLink" href="http://example.com" data-parsoid='{"stx":"url"}'>http://example.com</a>;x
26916 <a rel="mw:ExtLink" href="http://example.com" data-parsoid='{"stx":"url"}'>http://example.com</a>:x
26917 <a rel="mw:ExtLink" href="http://example.com" data-parsoid='{"stx":"url"}'>http://example.com</a>;x
26918 <a rel="mw:ExtLink" href="http://example.com" data-parsoid='{"stx":"url"}'>http://example.com</a>!x
26919 <a rel="mw:ExtLink" href="http://example.com" data-parsoid='{"stx":"url"}'>http://example.com</a>=x
26920 <a rel="mw:ExtLink" href="http://example.com" data-parsoid='{"stx":"url"}'>http://example.com</a>(x)
26921 <a rel="mw:ExtLink" href="http://example.com(x" data-parsoid='{"stx":"url"}'>http://example.com(x</a>)
26924 x<nowiki/>http://example.com<nowiki/>y
26925 http://example.com<nowiki/>?x
26926 http://example.com<nowiki/>&x
26927 http://example.com<nowiki/>'x
26928 http://example.com<nowiki/>,x
26929 http://example.com<nowiki/>.x
26930 http://example.com<nowiki/>;x
26931 http://example.com<nowiki/>:x
26932 http://example.com<nowiki/>;x
26933 http://example.com<nowiki/>!x
26934 http://example.com<nowiki/>=x
26935 http://example.com<nowiki/>(x)
26936 http://example.com(x<nowiki/>)
26940 Links 7a. Don't add spurious <nowiki/>s between text-nodes and url-links (T66300)
26945 <a rel="mw:ExtLink" href="http://example.com" data-parsoid='{"stx":"url"}'>http://example.com</a>
26947 "<a rel="mw:ExtLink" href="http://example.com" data-parsoid='{"stx":"url"}'>http://example.com</a>"
26948 (<a rel="mw:ExtLink" href="http://example.com" data-parsoid='{"stx":"url"}'>http://example.com</a>)
26949 (<a rel="mw:ExtLink" href="http://example.com" data-parsoid='{"stx":"url"}'>http://example.com</a>) foo
26950 <a rel="mw:ExtLink" href="http://example.com" data-parsoid='{"stx":"url"}'>http://example.com</a>,
26951 <a rel="mw:ExtLink" href="http://example.com" data-parsoid='{"stx":"url"}'>http://example.com</a>, foo
26957 "http://example.com"
26958 (http://example.com)
26959 (http://example.com) foo
26960 http://example.com,
26961 http://example.com, foo
26964 <a rel="nofollow" class="external free" href="http://example.com">http://example.com</a>
26966 "<a rel="nofollow" class="external free" href="http://example.com">http://example.com</a>"
26967 (<a rel="nofollow" class="external free" href="http://example.com">http://example.com</a>)
26968 (<a rel="nofollow" class="external free" href="http://example.com">http://example.com</a>) foo
26969 <a rel="nofollow" class="external free" href="http://example.com">http://example.com</a>,
26970 <a rel="nofollow" class="external free" href="http://example.com">http://example.com</a>, foo
26975 Links 7b. Don't add spurious <nowiki/>s between text-nodes and url-links (T66300)
26979 <p><a rel="mw:ExtLink" href="http://example.com" data-parsoid='{"stx":"url"}'>http://example.com</a>.,;:!?\
26980 -<a rel="mw:ExtLink" href="http://example.com">http://example.com</a>:</p>
26982 http://example.com.,;:!?\
26983 -http://example.com:
26985 <p><a rel="nofollow" class="external free" href="http://example.com">http://example.com</a>.,;:!?\
26986 -<a rel="nofollow" class="external free" href="http://example.com">http://example.com</a>:
26991 Links 8. Add <nowiki/>s between text-nodes and RFC-links when required (T66300)
26995 <p><a href="https://tools.ietf.org/html/rfc123" rel="mw:ExtLink" data-parsoid='{"stx":"magiclink"}'>RFC 123</a>4
26996 <a href="https://tools.ietf.org/html/rfc123" rel="mw:ExtLink" data-parsoid='{"stx":"magiclink"}'>RFC 123</a>y
26997 X<a href="https://tools.ietf.org/html/rfc123" rel="mw:ExtLink" data-parsoid='{"stx":"magiclink"}'>RFC 123</a>y</p>
27001 X<nowiki/>RFC 123<nowiki/>y
27005 Links 9. Don't add spurious <nowiki/>s between text-nodes and RFC-links (T66300)
27009 <p><a href="https://tools.ietf.org/html/rfc123" rel="mw:ExtLink" data-parsoid='{"stx":"magiclink"}'>RFC 123</a>?foo
27010 <a href="https://tools.ietf.org/html/rfc123" rel="mw:ExtLink" data-parsoid='{"stx":"magiclink"}'>RFC 123</a>&foo
27011 -<a href="https://tools.ietf.org/html/rfc123" rel="mw:ExtLink" data-parsoid='{"stx":"magiclink"}'>RFC 123</a>-
27018 <p><a class="external mw-magiclink-rfc" rel="nofollow" href="https://tools.ietf.org/html/rfc123">RFC 123</a>?foo
27019 <a class="external mw-magiclink-rfc" rel="nofollow" href="https://tools.ietf.org/html/rfc123">RFC 123</a>&foo
27020 -<a class="external mw-magiclink-rfc" rel="nofollow" href="https://tools.ietf.org/html/rfc123">RFC 123</a>-
27025 Links 10. Add <nowiki/>s between text-nodes and PMID-links when required (T66300)
27029 <p><a href="//www.ncbi.nlm.nih.gov/pubmed/123?dopt=Abstract" rel="mw:ExtLink" data-parsoid='{"stx":"magiclink"}'>PMID 123</a>4
27030 <a href="//www.ncbi.nlm.nih.gov/pubmed/123?dopt=Abstract" rel="mw:ExtLink" data-parsoid='{"stx":"magiclink"}'>PMID 123</a>y
27031 X<a href="//www.ncbi.nlm.nih.gov/pubmed/123?dopt=Abstract" rel="mw:ExtLink" data-parsoid='{"stx":"magiclink"}'>PMID 123</a>y
27035 X<nowiki/>PMID 123<nowiki/>y
27039 Links 11. Don't add spurious <nowiki/>s between text-nodes and PMID-links (T66300)
27043 <p><a href="//www.ncbi.nlm.nih.gov/pubmed/123?dopt=Abstract" rel="mw:ExtLink" data-parsoid='{"stx":"magiclink"}'>PMID 123</a>?foo
27044 <a href="//www.ncbi.nlm.nih.gov/pubmed/123?dopt=Abstract" rel="mw:ExtLink" data-parsoid='{"stx":"magiclink"}'>PMID 123</a>&foo
27045 -<a href="//www.ncbi.nlm.nih.gov/pubmed/123?dopt=Abstract" rel="mw:ExtLink" data-parsoid='{"stx":"magiclink"}'>PMID 123</a>-
27052 <p><a class="external mw-magiclink-pmid" rel="nofollow" href="//www.ncbi.nlm.nih.gov/pubmed/123?dopt=Abstract">PMID 123</a>?foo
27053 <a class="external mw-magiclink-pmid" rel="nofollow" href="//www.ncbi.nlm.nih.gov/pubmed/123?dopt=Abstract">PMID 123</a>&foo
27054 -<a class="external mw-magiclink-pmid" rel="nofollow" href="//www.ncbi.nlm.nih.gov/pubmed/123?dopt=Abstract">PMID 123</a>-
27059 Links 12. Add <nowiki/>s between text-nodes and ISBN-links when required (T66300)
27063 <p><a href="./Special:BookSources/1234567890" rel="mw:WikiLink" data-parsoid='{"stx":"magiclink"}'>ISBN 1234567890</a>1
27064 <a href="./Special:BookSources/1234567890" rel="mw:WikiLink" data-parsoid='{"stx":"magiclink"}'>ISBN 1234567890</a>x
27065 a<a href="./Special:BookSources/1234567890" rel="mw:WikiLink" data-parsoid='{"stx":"magiclink"}'>ISBN 1234567890</a>b
27068 ISBN 1234567890<nowiki/>1
27069 ISBN 1234567890<nowiki/>x
27070 a<nowiki/>ISBN 1234567890<nowiki/>b
27074 Links 13. Don't add spurious <nowiki/>s between text-nodes and ISBN-links (T66300)
27078 <p>-<a href="./Special:BookSources/1234567890" rel="mw:WikiLink" data-parsoid='{"stx":"magiclink"}'>ISBN 1234567890</a>'s
27082 <p>-<a href="/wiki/Special:BookSources/1234567890" class="internal mw-magiclink-isbn">ISBN 1234567890</a>'s
27087 Links 14. Protect link-like plain text. (Parsoid bug T78425)
27091 <p>this is not a link: http://example.com
27094 this is not a link: <nowiki>http://example.com</nowiki>
27098 Links 15. Link trails can't become link prefixes.
27103 <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>
27105 [[Söfnuður]]-[[00]]
27107 <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>
27111 #### --------------- Quotes ---------------
27112 #### 1. Quotes inside <b> and <i>
27113 #### 2. Link fragments separated by <i> and <b> tags
27114 #### 3. Link fragments inside <i> and <b>
27115 #### 4. No escaping needed
27116 #### --------------------------------------
27118 1a. Quotes inside <b> and <i>
27129 <b>foo'<i>bar'</i>baz</b>
27138 <i>fools'<span> errand</span></i>
27139 <i><span>fool</span>'s errand</i>
27140 '<i>foo</i> bar '<i>baz</i>
27141 a|!*#-:;+-~[]{}b'<i>x</i>
27145 ''<nowiki>''foo''</nowiki>''
27146 ''<nowiki>'''foo'''</nowiki>''
27148 '''<nowiki/>'foo''''
27149 '''<nowiki>''foo''</nowiki>'''
27150 '''<nowiki>'''foo'''</nowiki>'''
27151 '''foo'<nowiki/>''bar'<nowiki/>''baz'''
27152 '''foo'''<nowiki/>'s
27158 '''foo'''<nowiki/>'
27159 ''''foo'''<nowiki/>'
27160 ''fools'<span> errand</span>''
27161 ''<span>fool</span>'s errand''
27162 '<nowiki/>''foo'' bar '''baz''
27163 a|!*#-:;+-~[]{}b'''x''
27167 1b. Quotes inside <b> and <i> with other tags on same line
27171 '<i>a</i> foo <i><a rel="mw:WikiLink" href="Bar" title="Bar">bar</a></i>
27172 <i>a'</i> foo <i><a rel="mw:WikiLink" href="Bar" title="Bar">bar</a></i>
27173 <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>
27174 <a rel="mw:WikiLink" href="Foo" title="Foo">foo</a> x'<i><a href="Bar" rel="mw:WikiLink" title="Bar">bar</a></i>
27175 '<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>
27176 '<i>foo</i> <div title="name">test</div>
27177 '<i>foo</i> and <br data-parsoid='{"stx":"html","noClose":true}'/> bar
27178 <ol class="mw-references references" typeof="mw:Extension/references" about="#mwt5" data-mw='{"name":"references","attrs":{}}'>
27179 <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>
27182 '''a'' foo ''[[bar]]''
27183 ''a''' foo ''[[bar]]''
27184 ''a''' foo '''{{echo|[[bar]]}}'''
27185 [[foo]] x'''[[bar]]''
27186 '''foo'' <ref>test</ref>
27187 '''foo'' <div title="name">test</div>
27188 '''foo'' and <br> bar
27193 2. Link fragments separated by <i> and <b> tags
27197 <p>[[<i>foo</i>hello]]</p>
27198 <p>[[<b>foo</b>hello]]</p>
27200 [[''foo''<nowiki>hello]]</nowiki>
27202 [['''foo'''<nowiki>hello]]</nowiki>
27205 # FIXME: Escaping one or both of [[ and ]] is also acceptable --
27206 # this is one of the shortcomings of this format
27208 3. Link fragments inside <i> and <b>
27212 <p><i>[[foo</i>]]</p>
27213 <p><b>[[foo</b>]]</p>
27215 ''[[foo''<nowiki>]]</nowiki>
27217 '''[[foo'''<nowiki>]]</nowiki>
27221 4. No escaping needed
27225 <p>'<span><i>bar</i></span>'
27226 '<span><b>bar</b></span>'
27230 '<span>''bar''</span>'
27231 '<span>'''bar'''</span>'
27235 #### ----------- Paragraphs ---------------
27236 #### 1. No unnecessary escapes
27237 #### --------------------------------------
27240 1. No unnecessary escapes
27244 <p>bar <span>[[foo]]</span>
27245 </p><p>=bar <span>[[foo]]</span>
27246 </p><p>[[bar <span>[[foo]]</span>
27247 </p><p>]]bar <span>[[foo]]</span>
27248 </p><p>=bar <span>foo]]</span>=
27251 bar <span><nowiki>[[foo]]</nowiki></span>
27253 =bar <span><nowiki>[[foo]]</nowiki></span>
27255 [[bar <span><nowiki>[[foo]]</nowiki></span>
27257 ]]bar <span><nowiki>[[foo]]</nowiki></span>
27259 =bar <span>foo]]</span><nowiki>=</nowiki>
27262 #### ----------------------- PRE --------------------------
27264 1. Leading whitespace in SOL context should be escaped
27287 <nowiki> </nowiki>a
27289 <nowiki> </nowiki> a
27293 <nowiki> </nowiki> a
27295 <nowiki> </nowiki>a
27298 <nowiki> </nowiki>b
27321 2. Leading whitespace in non-indent-pre contexts should not be escaped
27325 <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>
27326 <ol class="mw-references references" typeof="mw:Extension/references" about="#mwt4" data-mw='{"name":"references","attrs":{}}'>
27327 <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>
27337 3. Leading whitespace in indent-pre suppressing contexts should not be escaped
27356 4. Leading whitespace in indent-pre suppressing contexts should not be escaped
27360 <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>
27362 [[File:Foobar.jpg|thumb|caption]]
27366 5. Nowiki escaping should account for indent-pres
27376 T95794: nowiki escaping should account for leading space at start-of-line in an indent-pre block
27390 Whitespace scrubbing in SOL position should account for SOL-sensitive wikitext markup
27393 "modes": ["html2wt"],
27394 "scrubWikitext": true
27402 <p><link rel="mw:PageProp/Category" href="./Category:Foo" data-parsoid="{}"> *foo</p>
27403 <p> <link rel="mw:PageProp/Category" href="./Category:Foo" data-parsoid="{}">*foo</p>
27404 <p> <!--boo-->*foo</p>
27405 <p><!--boo--> *foo</p>
27406 <p><!--a--> <!--b--> <!--c--> <!--d--> <!--e--> foo</p>
27407 <p><!--a--> <!--b--> <!--c--> <!--d--> <!--e--> *foo</p>
27423 <nowiki>*</nowiki>foo
27425 <nowiki/><!--boo-->*foo
27427 <!--boo--><nowiki/>*foo
27429 <!--a--><!--b--><!--c--><!--d--><!--e-->foo
27431 <!--a--><nowiki/><!--b--><!--c--><!--d--><!--e-->*foo
27434 #### --------------- Behavior Switches --------------------
27437 1. Valid behavior switches should be escaped
27444 <nowiki>__TOC__</nowiki>
27445 ''<nowiki>__TOC__</nowiki>''
27449 2. Invalid behavior switches should not be escaped
27460 # We use indent-pre as an indirect way to test for sol-transparent behavior.
27462 Behavior switches should be SOL-transparent
27466 <meta property="mw:PageProp/toc" />
27468 <!-- this one's bogus -->
27471 <pre data-parsoid='{}'><meta property="mw:PageProp/toc" data-parsoid='{"src":"__TOC__","magicSrc":"__TOC__"}'/> foo</pre>
27473 <meta property="mw:PageProp/toc" data-parsoid='{"src":"__TOC__","magicSrc":"__TOC__"}'/><pre data-parsoid='{}'>bar</pre>
27477 <!-- this one's bogus -->
27486 #### --------------- HTML tags ---------------
27489 #### 3. multi-line html tag
27490 #### 4. extension tags
27491 #### -----------------------------------------
27497 <a href="http://google.com">google</a>
27499 <a href="http://google.com">google</a>
27507 <ul><li> <div>foo</div></li>
27508 <li> <div style="color:red">foo</div></li>
27509 <li> <td></li></ul>
27512 * <nowiki><div>foo</div></nowiki>
27513 * <nowiki><div style="color:red">foo</div></nowiki>
27514 * <nowiki><td></nowiki>
27518 3. multi-line html tag
27537 <p><ref>foo</ref>
27538 </p><p><ref>bar
27539 </p><p>baz</ref>
27542 <nowiki><ref>foo</ref></nowiki>
27544 <nowiki><ref>bar</nowiki>
27546 baz<nowiki></ref></nowiki>
27550 Parsoid: newline inducing block nodes don't suppress <nowiki>
27556 <nowiki> </nowiki>a
27561 #### --------------- Others ---------------
27567 <p><nowiki>foo</nowiki>
27570 <nowiki>foo</nowiki>
27573 ## The quote-char in the input is necessary for triggering the bug
27575 (T54035) Nowiki-escaping should not get tripped by " :" in text
27584 #----------- End of wikitext escaping tests --------------
27588 Tag-like HTML structures are passed through as text
27610 </p><p>1<d e>f
27615 HTML tag with necessary entities in attributes
27617 <span title="&amp;">foo</span>
27619 <p><span title="&amp;">foo</span>
27624 HTML tag with 'unnecessary' entity encoding in attributes
27626 <span title="&">foo</span>
27628 <p><span title="&">foo</span>
27633 HTML tag with broken attribute value quoting
27635 parsoid=wt2html,html2html
27637 <span title="Hello world>Foo</span>
27639 <p><span title="Hello world">Foo</span>
27642 <p><span title="Hello world">Foo</span></p>
27646 Self-closed tag with broken attribute value quoting
27648 parsoid=wt2html,html2html
27650 <div title="Hello world />Foo
27652 <div title="Hello world"></div><p>Foo
27655 <div title="Hello world " data-parsoid='{"stx":"html","selfClose":true}'></div><p>Foo</p>
27659 Table with broken attribute value quoting
27661 parsoid=wt2html,html2html
27664 | title="Hello world|Foo
27669 <td title="Hello world">Foo
27675 <td title="Hello world">Foo
27681 Table with broken attribute value quoting on consecutive lines
27683 parsoid=wt2html,html2html
27686 | title="Hello world|Foo
27687 | style="color:red|Bar
27692 <td title="Hello world">Foo
27694 <td style="color:red">Bar
27700 <td title="Hello world">Foo
27701 </td><td style="color: red">Bar
27702 </td></tr></tbody></table>
27707 Accept empty td cell attribute
27710 | align="center" |foo|| |
27715 <td align="center">foo</td>
27722 Non-empty attributes in th-cells
27725 !Foo!! style="color: red" |Bar
27731 <th style="color: red">Bar
27737 Accept empty attributes in th-cells
27752 Empty table rows go away
27773 ### Parsoid-centric tests for testing RTing of inter-element separators
27774 ### Edge cases not tested by existing parser tests and specific to
27775 ### Parsoid-specific serialization strategies.
27779 RT-ed inter-element separators should be valid separators
27791 <tbody><tr class='mw-empty-elt' data-parsoid='{"startTagSrc":"|-","a":{"[[foo]]":null},"sa":{"[[foo]]":""},"autoInsertedEnd":true}'></tr>
27795 # Parsoid-only test of a DOM pass
27797 Trailing newlines in a deep dom-subtree that ends a wikitext line should be migrated out
27809 <tbody><tr data-parsoid='{"autoInsertedEnd":true,"autoInsertedStart":true}'><td data-parsoid='{"autoInsertedEnd":true}'><small data-parsoid='{"stx":"html","autoInsertedEnd":true}'>foo
27810 <p>bar</p></small></td></tr>
27814 <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>
27818 # Note that the "style" attribute is really a template parameter here.
27819 # The = would have to be {{=}} if you wanted the literal.
27821 Empty TD followed by TD with tpl-generated attribute
27826 |{{echo|style='color:red'}}|foo
27840 Indented table with an empty td
27859 Indented table with blank lines in between (T85627)
27878 <br /></p></td></tr>
27883 Indented block & table
27897 <div data-parsoid='{"stx":"html"}'>foo</div>
27899 <tr data-parsoid='{"autoInsertedEnd":true,"autoInsertedStart":true}'><td data-parsoid='{"autoInsertedEnd":true}'>foo</td></tr>
27904 Indent and comment before table row
27919 <!--hi--><tbody><tr data-parsoid='{"startTagSrc":"|-","autoInsertedEnd":true}'>
27920 <td data-parsoid='{"autoInsertedEnd":true}'> there</td></tr>
27924 # Parsoid-specific since PHP parser doesn't handle this mixed tbl-wikitext
27926 Empty TR followed by a template-generated TR
27932 {{echo|<tr><td>foo</td></tr>}}
27937 <tr class='mw-empty-elt'></tr>
27938 <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}}]}'>
27943 ## PHP and parsoid output differ for this, and since this is primarily
27944 ## for testing Parsoid's serializer, marking this Parsoid only
27946 Empty TR followed by mixed-ws-comment line should RT correctly
27959 <tr class='mw-empty-elt'></tr>
27962 <!--c--> </tr><!--d-->
27968 Multi-line image caption generated by templates with/without trailing newlines
27970 [[File:Foobar.jpg|thumb|300x300px|foo\n{{echo|A}}\n{{echo|B}}\n{{echo|C}}]]
27971 [[File:Foobar.jpg|thumb|300x300px|foo\n{{echo|A}}\n{{echo|B}}\n{{echo|C}}\n\n]]
27973 <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>
27974 <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>
27978 New element inserted (without intervening newlines) after an old sol-transparent node should serialize correctly
27982 <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>
27984 <link rel="mw:PageProp/Category" href="./Category:Foo" data-parsoid='{}'/><h1>new heading</h1>
27986 <includeonly>foo</includeonly>
27994 ## PHP emits broken html for this, and since this is primarily
27995 ## a Parsoid serializer test, marking this Parsoid only
27997 Improperly nested inline or quotes tags with whitespace in between
27999 <span> <s>x</span> </s>
28002 <p><span> <s>x</s></span><s> </s>
28003 <b> <i>x</i></b><i> </i>
28008 Encapsulate protected attributes from wt
28010 <div typeof="mw:placeholder stuff" data-mw="whoo" data-parsoid="weird" data-parsoid-other="no" about="time" rel="mw:true">foo</div>
28012 {| typeof="mw:placeholder stuff" data-mw="whoo" data-parsoid="weird" data-parsoid-other="no" about="time" rel="mw:true"
28016 <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>
28018 <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">
28019 <tbody><tr><td data-parsoid='{"autoInsertedEnd":true}'>ok</td></tr>
28023 ## Currently the p-wrapper is fragile in how it adds / removes transformations.
28024 ## Having nested or stray pre tags results in the attempt to add duplicates,
28025 ## causing an assertion fail. This test tries to prevent that situation.
28027 Ensure ParagraphWrapper can deal with stray closing pre tags
28036 ## Remex doesn't account for fostered content.
28038 1. Ensure fostered text content is wrapped in element nodes
28042 <table>hi</table><table>ho</table>
28044 hi<table></table>ho<table></table>
28046 <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>
28049 ## Remex doesn't account for fostered content.
28051 2. Ensure fostered text content is wrapped in element nodes (traps regressions around fostered marker on the element getting lost)
28053 parsoid=wt2html,wt2wt
28063 </td></tr></tbody></table>
28065 <p data-parsoid='{"fostered":true,"autoInsertedEnd":true,"autoInsertedStart":true}'> || ||</p>
28066 <table data-parsoid='{"stx":"html"}'>
28067 <tbody><tr data-parsoid='{"stx":"html","autoInsertedEnd":true}'><td data-parsoid='{"stx":"html","autoInsertedEnd":true}'> a
28068 </td></tr></tbody></table>
28071 ## Remex doesn't account for fostered content.
28073 Encapsulation properly handles null DSR information from foster box
28075 parsoid=wt2html,wt2wt
28077 {{echo|<table>foo<tr><td>bar</td></tr></table>}}
28079 <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>
28082 ## Remex doesn't account for fostered content.
28084 1. Encapsulate foster-parented transclusion content
28086 parsoid=wt2wt,wt2html
28088 <table>{{echo|foo<tr><td>bar</td></tr>}}</table>
28090 foo<table><tbody><tr><td>bar</td></tr></tbody></table>
28092 <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>
28096 2. Encapsulate foster-parented transclusion content
28098 parsoid=wt2wt,wt2html
28100 <table><div>{{echo|foo}}</div><tr><td>bar</td></tr></table>
28102 <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>
28113 3. Encapsulate foster-parented transclusion content
28115 parsoid=wt2wt,wt2html
28117 <table><div><p>{{echo|foo</p></div><tr><td>}}bar</td></tr></table>
28119 <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>"]}">
28132 4. Encapsulate foster-parented transclusion content
28134 parsoid=wt2wt,wt2html
28136 <table><div><p>{{echo|foo</p></div><tr><td>}}bar</td></tr></table>
28138 <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>"]}">
28150 ## Remex doesn't account for fostered content.
28152 5. Encapsulate foster-parented transclusion content
28154 parsoid=wt2wt,wt2html
28156 <table><tr><td><div><p>{{echo|foo</p></div></td>foo}}</tr></table>
28158 foo<table><tbody><tr><td><div><p>foo</p></div></td></tr></tbody></table>
28160 <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>
28163 ## Remex doesn't account for fostered content.
28165 6. Encapsulate foster-parented transclusion content
28167 parsoid=wt2wt,wt2html
28169 <table><tr><td><div><p>{{echo|foo</p></div></td>foo</tr></table>}}<p>ok</p>
28171 foo<table><tbody><tr><td><div><p>foo</p></div></td></tr></tbody></table><p>ok</p>
28173 <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>
28177 7. Encapsulate foster-parented transclusion content
28179 parsoid=wt2wt,wt2html
28181 <table>{{echo|<p>foo</p>}}<td>bar</td></table>
28183 <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>
28193 ## Remex doesn't account for fostered content.
28194 # Note that the wt is broken on purpose: the = should be {{=}} if you
28195 # don't want it to be a template parameter key.
28197 8. Encapsulate foster-parented transclusion content
28199 parsoid=wt2wt,wt2html
28202 }}{|{{echo|style='color:red'}}
28213 </td></tr></tbody></table>
28215 <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">
28216 </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">
28219 </td></tr></tbody></table>
28222 ## Remex doesn't account for fostered content.
28224 9. Encapsulate foster-parented transclusion content
28226 parsoid=wt2wt,wt2html
28228 <table>{{echo|hi</table>hello}}
28230 hi<table></table><p>hello
28233 <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>
28237 Table in fosterable position
28248 <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">
28250 <table about="#mwt1" data-parsoid='{"autoInsertedEnd":true}'></table>
28256 # Parsoid only for T66747
28258 Properly encapsulate empty-content transclusions in fosterable positions
28266 <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"}]]}'>
28271 ## No longer captures its original intention
28273 Always encapsulate foster box when template range is expanded to table
28287 T115289: Unclosed table
28289 {{echo|<table>}}<!--c-->[[Category:Two]]
28291 <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>
28295 T115289: Don't migrate newlines out of tables with fostered content
28297 <table><td></td>{{echo|<tr>[[Category:One]]}}<!--c-->[[Category:Two]]
28299 <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>
28303 T73074: More fostering fun
28305 <table><td></td>{{echo|<tr>}}<!--c-->[[Category:Two]]
28307 <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>
28311 Support <object> element with .data attribute
28315 <object data="test.swf"></object>
28317 <object data="test.swf"></object>
28321 Don't block XML namespace declaration
28323 <span xmlns:dct="http://purl.org/dc/terms/" property="dct:title">MediaWiki</span>
28325 <p><span xmlns:dct="http://purl.org/dc/terms/" property="dct:title">MediaWiki</span>
28328 <p><span xmlns:dct="http://purl.org/dc/terms/" data-x-property="dct:title" data-parsoid='{"stx":"html"}'>MediaWiki</span></p>
28331 # -----------------------------------------------------------------
28332 # The following section of tests are primarily to spec requirements
28333 # around Parsoid's serialization (old, new, edited content)
28335 # All these tests are marked Parsoid html2wt and html2html only
28336 # ----------------------------------------------------------------
28339 Ignore rel attribute in a-tags during serialization to url-links
28343 <a href='http://en.wikipedia.org/wiki/Foobar'>http://en.wikipedia.org/wiki/Foobar</a>
28344 <a href='http://en.wikipedia.org/wiki/Foobar' rel='mw:ExtLink'>http://en.wikipedia.org/wiki/Foobar</a>
28345 <a href='http://en.wikipedia.org/wiki/Foobar' rel='mw:WikiLink'>http://en.wikipedia.org/wiki/Foobar</a>
28347 http://en.wikipedia.org/wiki/Foobar
28348 http://en.wikipedia.org/wiki/Foobar
28349 http://en.wikipedia.org/wiki/Foobar
28352 # 'mi' is a localinterwiki prefix as well as a language
28354 Serialize interwiki links pointing to the current wiki as plain wiki links (T67869)
28358 <p><a rel="mw:ExtLink" href="http://mi.wikipedia.org/wiki/Foo">Foo</a></p>
28364 Parsoid should accept interwiki shortcuts
28368 <p><a rel='mw:WikiLink' href='./fr:Foo'>Foo</a>
28369 <a rel='mw:ExtLink' href='./fr:Foo'>Foo</a>
28370 <a href='./fr:Foo'>Foo</a></p>
28371 <p><a rel='mw:WikiLink' href='fr%3AFoo'>Foo</a>
28372 <a rel='mw:ExtLink' href='fr%3AFoo'>Foo</a>
28373 <a href='fr%3AFoo'>Foo</a></p>
28374 <p><a href='FR%3AFoo'>Foo</a>
28375 <a href='./FR:Foo'>Foo</a></p>
28390 Parsoid should not accept invalid interwiki shortcuts
28394 <p><a rel='mw:WikiLink' href='news:Foo'>Foo</a>
28395 <a rel='mw:ExtLink' href='news:Foo'>Foo</a>
28396 <a href='news:Foo'>Foo</a></p>
28405 New wikilinks should be serialized properly
28409 <a rel="mw:WikiLink" href="./Foo" title="Foo" data-parsoid='{}'>Foo</a>
28410 <a rel="mw:WikiLink" href="./Foo" title="Foo">Foo</a>
28411 <a href="//en.wikipedia.org/wiki/Foo">//en.wikipedia.org/wiki/Foo</a>
28412 <a href="http://en.wikipedia.org/wiki/Foo">http://en.wikipedia.org/wiki/Foo</a>
28413 <a href="//en.wikipedia.org/wiki/Foo_bar">//en.wikipedia.org/wiki/Foo bar</a>
28417 [[:en:Foo|//en.wikipedia.org/wiki/Foo]]
28418 http://en.wikipedia.org/wiki/Foo
28419 [[:en:Foo_bar|//en.wikipedia.org/wiki/Foo bar]]
28423 New wiki links (href variations)
28427 <a rel="mw:WikiLink" href="./Foo_bar">Foo_bar</a>
28428 <a rel="mw:WikiLink" href="Foo_bar">Foo_bar</a>
28429 <a rel="mw:WikiLink" href="Foo bar">Foo_bar</a>
28430 <a rel="mw:WikiLink" href="./Toxine_bact%C3%A9rienne">Toxine bactérienne</a>
28435 [[Toxine bactérienne]]
28439 New wiki links (content string variations)
28443 <a rel="mw:WikiLink" href="./Foo_bar">Foo_bar</a>
28444 <a rel="mw:WikiLink" href="./Foo_bar">Foo bar</a>
28445 <a rel="mw:WikiLink" href="./Foo_bar">./Foo_bar</a>
28449 [[Foo_bar|./Foo_bar]]
28453 New category links (href variations)
28457 <link rel="mw:PageProp/Category" href="./Category:Toxine_bactérienne" />
28458 <link rel="mw:PageProp/Category" href="./Category:Toxine_bact%C3%A9rienne" />
28459 <link rel="mw:PageProp/Category" href="Category:Toxine_bact%C3%A9rienne" />
28461 [[Category:Toxine bactérienne]]
28462 [[Category:Toxine bactérienne]]
28463 [[Category:Toxine bactérienne]]
28467 New sol transparent links don't need indent-pre nowiki protection
28472 <link rel="mw:PageProp/redirect" href="./Main_Page">
28473 <!-- this is good --> <link rel="mw:PageProp/Category" href="./Category:Good" />
28474 <!-- this is great --> <link rel="mw:PageProp/Category" href="./Kategorie:Great" />
28476 #WEITERLEITUNG [[Main Page]]
28477 <!-- this is good --> [[Category:Good]]
28478 <!-- this is great --> [[Kategorie:Great]]
28482 New interlanguage links (href variations)
28486 <link rel="mw:PageProp/Language" href="http://es.wikipedia.org/wiki/Toxine bactérienne" />
28487 <link rel="mw:PageProp/Language" href="http://es.wikipedia.org/wiki/Toxine_bactérienne" />
28488 <link rel="mw:PageProp/Language" href="http://es.wikipedia.org/wiki/Toxine_bact%C3%A9rienne" />
28490 [[es:Toxine bactérienne]]
28491 [[es:Toxine_bactérienne]]
28492 [[es:Toxine_bactérienne]]
28496 Image: Modifying size of an image (1)
28499 "modes": ["wt2wt"],
28501 ["img[height]", "attr", "height", "22"],
28502 ["img[width]", "attr", "width", "200"]
28506 [[Image:Foobar.jpg|230x230px]]
28508 [[Image:Foobar.jpg|200x200px]]
28512 Image: Modifying size of an image (2)
28515 "modes": ["wt2wt"],
28517 ["img[height]", "attr", "height", "100"],
28518 ["img[width]", "attr", "width", "500"]
28522 [[Image:Foobar.jpg|230x230px]]
28524 [[Image:Foobar.jpg|500x500px]]
28527 # Change in size is ignored so long as class='mw-default-size'
28529 Image: Modifying size of an image (3)
28532 "modes": ["wt2wt"],
28534 ["figure[class]", "removeClass", "mw-default-size"],
28535 ["figure img", "attr", "height", "19"],
28536 ["figure img", "attr", "width", "170"]
28540 [[Image:Foobar.jpg|thumb]]
28542 [[Image:Foobar.jpg|thumb|170x170px]]
28546 Image: Modifying alignment of an image (T50665)
28549 "modes": ["wt2wt"],
28551 ["figure[class]", "removeClass", "mw-halign-right"],
28552 ["figure[class]", "addClass", "mw-halign-left"]
28556 [[Image:Foobar.jpg|thumb|caption|right]]
28558 [[Image:Foobar.jpg|thumb|caption|left]]
28562 Image: Modifying mw-default-size of an frameless image (T64805)
28565 "modes": ["wt2wt"],
28567 ["figure.mw-default-size", "removeClass", "mw-default-size"]
28571 [[Image:Foobar.jpg|frameless|right]]
28573 [[Image:Foobar.jpg|frameless|right|220x220px]]
28577 Image: Modifying valign of an image (T51221)
28580 "modes": ["wt2wt"],
28582 ["*[typeof=\"mw:Image\"]", "removeClass", "mw-valign-middle"],
28583 ["*[typeof=\"mw:Image\"]", "addClass", "mw-valign-text-top"]
28587 [[File:Foobar.jpg|20px|middle]]
28589 [[File:Foobar.jpg|20px|text-top]]
28593 Image: Modifying alt attribute of an image (T58400)
28596 "modes": ["wt2wt"],
28598 ["img[alt]", "attr", "alt", "some alternate edited text"]
28602 [[File:Foobar.jpg|thumb|some caption|alt=some alternate text]]
28604 [[File:Foobar.jpg|thumb|some caption|alt=some alternate edited text]]
28608 Image: Modifying caption of an image
28611 "modes": ["wt2wt"],
28613 ["figcaption", "text", "new caption"]
28617 [[Image:Foobar.jpg|thumb|original caption]]
28619 [[Image:Foobar.jpg|thumb|new caption]]
28623 Image: empty alt attribute (T50924)
28627 [[File:Foobar.jpg|thumb|alt=|bar]]
28629 <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>
28633 Image: new attributes should be serialized in wiki's language for RTL languages (T53852)
28639 <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>
28641 [[Imagen:Foobar.jpg|derecha|miniaturadeimagen]]
28645 Image: Block level image should have \n before and after
28648 [[File:Foobar.jpg|right|thumb|150x150px]]
28652 <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>
28657 Image: New block level image should have \n before and after (existing content)
28660 [[File:Foobar.jpg|right|thumb|150x150px]]
28664 <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>
28669 Image: upright option (parsoid)
28671 [[File:Foobar.jpg|thumb|upright|caption]]
28672 [[File:Foobar.jpg|thumb|upright=0.5|caption]]
28673 [[File:Foobar.jpg|thumb|500x500px|upright=0.5|caption]]
28675 <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>
28676 <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>
28677 <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>
28681 Image: upright option is ignored on inline and frame images (parsoid)
28683 [[File:Foobar.jpg|500x500px|upright=0.5|caption]]
28685 <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>
28689 Image: in template parameter with empty parameter
28691 {{echo|[[File:Foobar.jpg|link=]]}}
28693 <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>
28697 Image: from basic HTML (1)
28701 <span typeof="mw:Image">
28702 <img src="./File:Foobar.jpg" width=100 height=100 alt="Alt">
28705 [[File:Foobar.jpg|link=|alt=Alt|100x100px]]
28709 Image: from basic HTML (2)
28713 <img src="./File:Foobar.jpg" width=100 height=100 alt="Alt">
28715 [[File:Foobar.jpg|link=|alt=Alt|100x100px]]
28719 Image: from basic HTML (3)
28723 <a href="Main"><img src="./File:Foobar.jpg" width=100 height=100 alt="Alt"></a>
28725 [[File:Foobar.jpg|link=Main|alt=Alt|100x100px]]
28729 Image: from basic HTML (4)
28733 <img src="./File:Foobar.jpg">
28735 [[File:Foobar.jpg|link=]]
28739 Image: Invalid title as link
28741 [[File:Foobar.jpg|link=<]]
28743 <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>
28746 <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>
28750 Lists: Serialize correctly even when list content is wrapped in p-tags (like VE does)
28755 <li><p>foo</p></li>
28762 Lists: Serialize correctly even when list tags has unneeded whitespace between tags
28766 <ul> <li>foo</li></ul>
28772 Don't strip leading whitespace when handling indent-pre suppressing tags
28777 <tr><td> indented row</td></tr>
28780 <b>This is very bold of you!</b>
28783 indented cell (no pre-wrapping!)
28793 '''This is very bold of you!'''
28797 indented cell (no pre-wrapping!)
28805 Nowiki-wrap leading whitespace when handling indent-pre inducing tags
28827 <nowiki> </nowiki></span>bar2
28830 <nowiki> </nowiki><span>bar</span>
28833 <nowiki> </nowiki><span>foo</span>
28838 Lists: Dont insert newlines in a serialized list item.
28842 <ul><li>a<br>b</li><li>c</li></ul>
28849 1. Headings: Force sol-transparent links and behavior switches to serialize before/after
28852 "modes": ["html2wt"],
28853 "scrubWikitext": false
28856 <h2>hello there<link href="./Category:A1" rel="mw:PageProp/Category" /></h2>
28857 <h2><link href="./Category:A2" rel="mw:PageProp/Category" />hi pal</h2>
28859 <h2><!--foo--> <link href="./Category:A3" rel="mw:PageProp/Category" /> how goes it</h2>
28860 <h2>it goes well <link href="./Category:A4" rel="mw:PageProp/Category" /> <!--bar--></h2>
28862 <h2 data-parsoid='{}'>howdy<link href="./Category:A5" rel="mw:PageProp/Category" /></h2>
28864 <h2><meta property="mw:PageProp/toc" /> ok</h2>
28866 == hello there [[Category:A1]] ==
28868 == [[Category:A2]] hi pal ==
28870 == <!--foo--> [[Category:A3]] how goes it ==
28872 == it goes well [[Category:A4]] <!--bar--> ==
28874 ==howdy [[Category:A5]]==
28880 2. Headings: Force sol-transparent links and behavior switches to serialize before/after
28883 "modes": ["html2wt"],
28884 "scrubWikitext": true
28887 <h2>hello there<link href="./Category:A1" rel="mw:PageProp/Category" /></h2>
28888 <h2><link href="./Category:A2" rel="mw:PageProp/Category" />hi pal</h2>
28890 <h2><!--foo--> <link href="./Category:A3" rel="mw:PageProp/Category" /> how goes it</h2>
28891 <h2>it goes well <link href="./Category:A4" rel="mw:PageProp/Category" /> <!--bar--></h2>
28893 <h2><meta property="mw:PageProp/toc" /> ok</h2>
28901 <!--foo-->[[Category:A3]]
28906 [[Category:A4]] <!--bar-->
28914 Headings: Don't hoist metas that come from templates
28917 "modes": ["html2wt"],
28918 "scrubWikitext": true
28921 <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>
28923 == {{echo|foo [[Category:Foo]]}} ==
28927 Headings: Category in ref isn't hoisted
28930 "modes": ["html2wt"],
28931 "scrubWikitext": true
28934 <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>
28936 <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>
28939 [[Category:Baz]] </ref> ==
28945 Parsoid: Serialize positional parameters with = in them as named parameter
28949 <p about="#mwt1" typeof="mw:Transclusion"
28950 data-mw='{"parts":[{"template":{"target":{"wt":"echo","href":"./Template:Echo"},"params":{"1":{"wt":"f=oo"}},"i":0}}]}'>foo</p>
28952 <p about="#mwt1" typeof="mw:Transclusion"
28953 data-mw='{"parts":[{"template":{"target":{"wt":"echo","href":"./Template:Echo"},"params":{"1":{"wt":"f=oo"}, "2":{"wt":"bar"}},"i":0}}]}'>foo</p>
28955 <!--Orig params with data-parsoid has heuristics for handling = chars-->
28956 <!--FIXME: But maybe the heuristic needs fixing to apply to new params as well-->
28957 <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>
28961 {{echo|1=f=oo|2=bar}}
28963 <!--Orig params with data-parsoid has heuristics for handling = chars-->
28964 <!--FIXME: But maybe the heuristic needs fixing to apply to new params as well-->
28965 {{echo|<nowiki>f=oo</nowiki>|bar}}
28969 Parsoid: Serialize positional parameters with = in extlink as named parameter
28973 <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>
28975 {{echo|1=http://stuff?is=ok}}
28979 Parsoid: Correctly serialize block-node children when they are a combination of text and p-nodes
28983 <div>a<p>b</p></div>
29004 Substrings resembling wikitext in hrefs should not get nowiki escapes
29008 <a rel="mw:WikiLink" href="./Foo''bar''baz">Foo''bar''baz</a>
29014 Enforce single-line context in the serializer
29021 <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">
29022 </span><span about="#mwt1">you</span> </h2>
29024 <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>
29026 <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
29027 there</span></li></ol>
29039 ho </dt><dd data-parsoid='{"stx":"row"}'> hi
29046 </tbody></table></dd></dl>
29050 == hi {{bogus|there
29061 * foo '''bar''' baz
29073 Serialize new placeholder space without spans
29077 <p>foo<span typeof="mw:Placeholder"> </span>: bar</p>
29079 <p>foo<span typeof="mw:DisplaySpace mw:Placeholder" data-parsoid='{"src":" ","isDisplayHack":true}'> </span>: bar</p>
29081 <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>
29087 <ref>foo : bar</ref>ok
29091 #-----------------------
29092 # Tag minimization tests
29093 #-----------------------
29096 1. I/B quote minimization: wikitext-only tags should be combined
29100 <p><i>A</i><i>B</i></p>
29101 <p><b>A</b><b>B</b></p>
29102 <p><i>A</i><b><i>B</i></b></p>
29103 <p><b>A</b><i><b>B</b></i></p>
29104 <p><b>A</b><i><b>B</b><b>C</b></i><b>D</b></p>
29105 <p><i><b>A</b></i><i><b>B</b></i></p>
29106 <p><i><b>A</b></i><b><i>B</i></b></p>
29107 <p><b><i>A</i></b><i><b>B</b></i></p>
29127 2. I/B quote minimization: wikitext and html tags should not be combined
29131 <p><i>A</i><i data-parsoid='{"stx":"html"}'>B</i></p>
29132 <p><i>A</i><b><i data-parsoid='{"stx":"html"}'>B</i></b></p>
29136 ''A''<nowiki/>'''<i>B</i>'''
29140 3. I/B quote minimization: templated content stops minimization
29144 <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>
29145 <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>
29147 ''A''{{echo|''B''}}
29149 ''A''{{echo|'''''B'''''}}
29153 4. I/B quote minimization: new content should be mimimized with adjacent old content
29157 <p><i>A</i><i>B</i></p>
29158 <p><b>A</b><b>B</b></p>
29159 <p><i>A</i><b><i>B</i></b></p>
29169 5a. Merge adjacent quote nodes if they've been edited
29172 "modes": ["wt2wt", "selser"],
29174 ["p", "contents", "remove", ":contains('b')"]
29184 5b. Merge adjacent quote nodes if they've been edited
29187 "modes": ["wt2wt", "selser"],
29193 ''a''<span id="x">b</span>''c''
29199 1. Merge adjacent link nodes as long as at least one element is new
29202 "modes": ["html2wt"],
29203 "scrubWikitext": true
29206 <a rel="mw:WikiLink" href="./Football">Foot</a><a rel="mw:WikiLink" href="./Football">ball</a>
29207 <a data-parsoid="{}" rel="mw:WikiLink" href="./Football">Foot</a><a rel="mw:WikiLink" href="./Football">ball</a>
29208 <a data-parsoid="{}" rel="mw:WikiLink" href="./Football">Foot</a><a data-parsoid="{}" rel="mw:WikiLink" href="./Football">ball</a>
29212 [[Football|Foot]][[Football|ball]]
29216 2. Merge adjacent link nodes and enable additional normalizations
29219 "modes": ["html2wt"],
29220 "scrubWikitext": true
29223 <a rel="mw:WikiLink" href="./Football"><i>Foot</i></a><a rel="mw:WikiLink" href="./Football"><i>ball</i></a>
29229 3. Don't merge adjacent link nodes if scrubWikitext is false
29232 "modes": ["html2wt"],
29233 "scrubWikitext": false
29236 <a rel="mw:WikiLink" href="./Football">Foot</a><a rel="mw:WikiLink" href="./Football">ball</a>
29238 [[Football|Foot]][[Football|ball]]
29242 1. Move format tags outside of WikiLink
29245 "modes": ["html2wt"],
29246 "scrubWikitext": true
29249 <a rel="mw:WikiLink" href="./Football"><i>Football</i></a>
29250 <a rel="mw:WikiLink" href="./Football"><i><b>Football</b></i></a>
29251 <a rel="mw:WikiLink" href="./Football"><u><i><b>Football</b></i></u></a>
29254 '''''[[Football]]'''''
29255 <u>'''''[[Football]]'''''</u>
29259 2. Move format tags outside of WikiLink with mergable A tags
29262 "modes": ["html2wt"],
29263 "scrubWikitext": true
29266 <a rel="mw:WikiLink" href="./Football"><i><b>Foot</b></i></a><a rel="mw:WikiLink" href="./Football"><i><b>ball</b></i></a>
29268 '''''[[Football]]'''''
29272 3. Move format tags outside of WikiLink while preserving formats already outside WikiLink
29275 "modes": ["html2wt"],
29276 "scrubWikitext": true
29279 <font color="red"><a rel="mw:WikiLink" href="./Foo" title="Foo" class="mw-redirect"><u><b>Foo</b></u></a></font>
29281 <font color="red"><u>'''[[Foo]]'''</u></font>
29285 4. Do not move format tags outside of WikiLink which includes attributes color, style and class
29288 "modes": ["html2wt"],
29289 "scrubWikitext": true
29292 <a rel="mw:WikiLink" href="./Foo" title="Foo" class="mw-redirect"><font color="red">Foo</font></a>
29293 <a rel="mw:WikiLink" href="./Foo" title="Foo" class="mw-redirect"><span style="color: blue; font-size: 46px;">Foo></span></a>
29294 <a rel="mw:WikiLink" href="./Foo" title="Foo" class="mw-redirect"><span class="Bar">Foo</span></a>
29296 [[Foo|<font color="red">Foo</font>]]
29297 [[Foo|<span style="color: blue; font-size: 46px;">Foo></span>]]
29298 [[Foo|<span class="Bar">Foo</span>]]
29302 5. T194083 Regression test: Manual edit test that also enables scrubWikitext to move format tags outside wikilinks
29305 "modes": ["selser"],
29306 "scrubWikitext": true,
29308 ["a", "html", "<i>Foo</i>"]
29318 6. Regression test: Manual edit test to ensure diff markers are not lost
29321 "modes": ["selser"],
29322 "scrubWikitext": true,
29324 ["i", "wrap", "<a href='./Foo' rel='mw:WikiLink'></a>"]
29334 7. T194083 Regression test: Manual edit test to ensure nested diff markers aren't inserted
29337 "modes": ["selser"],
29338 "scrubWikitext": true,
29340 ["div", "after", "\n<p><a href='./Foo' rel='mw:WikiLink'>Foo </a>, placeholder</p>"]
29344 <div>placeholder</div>
29346 <div>placeholder</div>
29347 [[Foo]] , placeholder
29350 #------------------------------
29351 # End of tag minimization tests
29352 #------------------------------
29355 T56262: New entities
29359 <span typeof="mw:Entity"> </span>
29364 ## Note that there is no wikitext output for 'unknownproperty' ##
29365 ## Unknown magic words are silently dropped ##
29372 <meta property='mw:PageProp/toc' />
29373 <meta property='mw:PageProp/notoc' />
29374 <meta property='mw:PageProp/forcetoc' />
29375 <meta property='mw:PageProp/index' />
29376 <meta property='mw:PageProp/noindex' />
29377 <meta property='mw:PageProp/nogallery' />
29378 <meta property='mw:PageProp/noeditsection' />
29379 <meta property='mw:PageProp/notitleconvert' />
29380 <meta property='mw:PageProp/nocontentconvert' />
29381 <meta property='mw:PageProp/unknownproperty' />
29391 __NOCONTENTCONVERT__
29395 Consecutive <pre>s should not get merged
29397 parsoid=html2wt,html2html
29399 <pre>a</pre><pre>b</pre>
29427 Edited ISBN links not serializable as ISBN links should serialize as wikilinks
29431 <a href="./Special:BookSources/1234567890" rel="mw:ExtLink">ISBN 1234567895</a>
29433 [[Special:BookSources/1234567890|ISBN 1234567895]]
29437 Edited RFC links not serializable as RFC links should serialize as extlinks
29441 <a href="https://tools.ietf.org/html/rfc123" rel="mw:ExtLink">New RFC</a>
29443 [https://tools.ietf.org/html/rfc123 New RFC]
29447 Edited PMID links not serializable as PMID links should serialize as extlinks
29451 <a href="//www.ncbi.nlm.nih.gov/pubmed/123?dopt=Abstract" rel="mw:ExtLink">New PMID</a>
29453 [//www.ncbi.nlm.nih.gov/pubmed/123?dopt=Abstract New PMID]
29457 WTS of autolinks with trailing/surrounding context
29461 <p><a href="http://cscott.net">http://cscott.net</a><b>foo</b></p>
29462 <p><a href="http://cscott.net">http://cscott.net</a><b data-parsoid='{"stx":"html"}'>foo</b></p>
29463 <p><b><a href="http://cscott.net">http://cscott.net</a></b></p>
29464 <p><b><a href="http://cscott.net">http://cscott.net</a> </b></p>
29465 <p><b><a href="http://cscott.net">http://cscott.net</a>x</b></p>
29466 <p><a href="http://cscott.net">http://cscott.net</a>x</p>
29468 http://cscott.net'''foo'''
29470 http://cscott.net<b>foo</b>
29472 '''http://cscott.net'''
29474 '''http://cscott.net '''
29476 '''http://cscott.net<nowiki/>x'''
29478 http://cscott.net<nowiki/>x
29482 WTS of autolinks with nowikis (round-trip)
29484 x<nowiki/>http://cscott.net<nowiki/>x
29486 <p>x<a rel="mw:ExtLink" class="external free" href="http://cscott.net">http://cscott.net</a>x</p>
29489 # this is the "easy" test because it leaves in place all the
29490 # data-parsoid information indicating this is an autolink
29492 WTS of autolinks with escapes (editing)
29495 "modes": ["wt2wt"],
29497 [ "span", "remove" ]
29501 x<nowiki/>http://cscott.net<nowiki/>x
29503 x<nowiki/>http://cscott.net<nowiki/>x
29507 WTS of edited autolink-like text (T103364)
29510 "modes": ["wt2wt"],
29512 [ "span[typeof]", "removeAttr", "typeof" ]
29516 Not a link: <nowiki>http://example.com</nowiki>.
29518 Not a link: <span><nowiki>http://example.com</nowiki></span>.
29522 WTS of newly-authored autolink-like text (T103364)
29526 <p>http://example.com is not a link.</p>
29528 <nowiki>http://example.com</nowiki> is not a link.
29532 WTS of autolink-like text after an autolink (T108563)
29536 <p><a rel="mw:ExtLink" href="http://example.com">http://example.com</a> http://example.com is not a link.</p>
29538 http://example.com <nowiki>http://example.com</nowiki> is not a link.
29542 Magic links inside links (not autolinked)
29544 [[Foo|http://example.com]]
29547 [[Foo|ISBN 123456789x]]
29549 [http://foo.com http://example.com]
29550 [http://foo.com RFC 1234]
29551 [http://foo.com PMID 1234]
29552 [http://foo.com ISBN 123456789x]
29554 <p><a href="/wiki/Foo" title="Foo">http://example.com</a>
29555 <a href="/wiki/Foo" title="Foo">RFC 1234</a>
29556 <a href="/wiki/Foo" title="Foo">PMID 1234</a>
29557 <a href="/wiki/Foo" title="Foo">ISBN 123456789x</a>
29558 </p><p><a rel="nofollow" class="external text" href="http://foo.com">http://example.com</a>
29559 <a rel="nofollow" class="external text" href="http://foo.com">RFC 1234</a>
29560 <a rel="nofollow" class="external text" href="http://foo.com">PMID 1234</a>
29561 <a rel="nofollow" class="external text" href="http://foo.com">ISBN 123456789x</a>
29564 <p><a rel="mw:WikiLink" href="./Foo" title="Foo">http://example.com</a>
29565 <a rel="mw:WikiLink" href="./Foo" title="Foo">RFC 1234</a>
29566 <a rel="mw:WikiLink" href="./Foo" title="Foo">PMID 1234</a>
29567 <a rel="mw:WikiLink" href="./Foo" title="Foo">ISBN 123456789x</a></p>
29569 <p><a rel="mw:ExtLink" class="external text" href="http://foo.com">http://example.com</a>
29570 <a rel="mw:ExtLink" class="external text" href="http://foo.com">RFC 1234</a>
29571 <a rel="mw:ExtLink" class="external text" href="http://foo.com">PMID 1234</a>
29572 <a rel="mw:ExtLink" class="external text" href="http://foo.com">ISBN 123456789x</a></p>
29576 Magic links inside image captions (autolinked)
29578 [[File:Foobar.jpg|thumb|http://example.com]]
29579 [[File:Foobar.jpg|thumb|RFC 1234]]
29580 [[File:Foobar.jpg|thumb|PMID 1234]]
29581 [[File:Foobar.jpg|thumb|ISBN 123456789x]]
29583 <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>
29584 <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>
29585 <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>
29586 <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>
29588 <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>
29589 <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>
29590 <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>
29591 <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>
29595 WTS of magic word text (T109371)
29600 <p><a href="http://foo.com" rel="mw:ExtLink">RFC 1234</a></p>
29601 <p><a href="./Foo" rel="mw:WikiLink">RFC 1234</a></p>
29603 <nowiki>RFC 1234</nowiki>
29605 [http://foo.com RFC 1234]
29611 Edited Redirect link should emit a non-piped wikitext link
29615 <link rel="mw:PageProp/redirect" href="Bar" data-parsoid='{"a":{"href":"./Foo"},"sa":{"href":"Foo"}}'>
29621 T75121: Infer extension name from typeOf if data-mw is not present
29623 parsoid={ "modes": ["html2wt"], "suppressErrors": true }
29625 <div typeOf="mw:Extension/foo"></div>
29630 # Note that the <p> wrapping isn't present in PHP parser output
29631 # The important thing for this test is that P-wrapping doesn't
29632 # interfere with the <nowiki> protection for leading - in <td>
29633 # (which isn't necessary for <th>).
29635 T88318: p-wrapped dash in table.
29637 parsoid=html2wt,wt2wt
29640 <tr><th><p>-</p></th><th><p>- </p></th></tr>
29641 <tr><td><p>-</p></td><td><p>- </p></td></tr>
29642 <tr><td><small>-</small></td><td><br/><p>-</p></td><td><br/>-</td></tr>
29649 |<nowiki>-</nowiki>
29650 |<nowiki>- </nowiki>
29670 <td><small>-</small>
29677 </td></tr></tbody></table>
29681 T149209: WTS: Handle newlines in table cells properly
29689 </td><td data-parsoid='{"stx":"row"}'>c</td></tr>
29691 </td><td data-parsoid='{"stx":"row", "startTagSrc": "{{!}}{{!}}"}'>y</td></tr>
29697 </th><th data-parsoid='{"stx":"row"}'>c</th></tr>
29699 </th><th data-parsoid='{"stx":"row"}'>y</th></tr>
29721 T149209: Selser: Handle newlines in table cells properly
29724 "modes": ["selser"],
29726 [ "#h1", "html", "a\nb\n" ],
29727 [ "#h2", "html", "a\nb\n" ],
29728 [ "#c1", "html", "a\nb\n" ],
29729 [ "#c2", "html", "<p>a</p>" ],
29730 [ "#c3", "html", "<p>a</p>" ],
29731 [ "#c4", "html", "edit-me<p>a</p>" ]
29736 ! id="h1" |edit-me!!1
29738 ! id="h2" |edit-me||2
29740 | id="c1" |edit-me||3
29742 | id="c2" |edit-me||4
29744 | id="c3" |edit-me||p||q||r
29746 | id="c4" |edit-me||p||q||r
29775 HTML id attribute with Parsoid-like element ids should not be serialized to wikitext
29780 <td id='mwAc'>foo</td>
29781 <td id='serialize-this'>bar</td>
29786 | id="serialize-this" |bar
29791 Parsoid-like element ids should not be serialized to wikitext unless shadowed
29795 <div id="mwAQ" data-parsoid='{"stx":"html","a":{"id":"mwAQ"},"sa":{"id":"hello"}}'>ok</div>
29797 <div id="hello">ok</div>
29801 Testing serialization after deletion in references
29804 "modes": ["wt2wt"],
29810 hi <ref><div id="x">ho</div></ref>
29820 Testing serialization after deletion of table cells
29823 "modes": ["wt2wt", "selser"],
29831 | id="x" |c1 {{!}}{{!}}{{!}}c2 |||c3
29841 Testing selser after addition of new row before first row (T125419)
29844 "modes": ["wt2wt", "selser"],
29846 [ "tr", "before", "<tr><td>X</td></tr>" ]
29862 Serialize new table rows in a HTML table using HTML tags
29865 "modes": ["wt2wt", "selser"],
29867 [ "tr", "before", "<tr><td>X</td></tr>" ]
29871 <table><tr><td>a</td></tr></table>
29873 <table><tr><td>X</td></tr><tr><td>a</td></tr></table>
29877 Serialize new table cells in a HTML row using HTML tags
29880 "modes": ["wt2wt", "selser"],
29882 [ "td", "before", "<td>X</td>" ]
29886 <table><tr><td>a</td></tr></table>
29888 <table><tr><td>X</td><td>a</td></tr></table>
29892 Serialize wikitext list items as HTML list items when embedded in a HTML list
29896 <ul data-parsoid='{"stx": "html"}'>
29897 <li data-parsoid='{}'>a</li>
29907 # SSS FIXME: Is this actually a good thing given the
29908 # odd nested list output that is generated by MW?
29909 # <ul><li>foo<ul>..</ul></li></ul> instead of
29910 # <ul><li>foo</li><ul>..</ul></ul>
29912 Wikitext lists can be nested inside HTML lists
29916 <ul data-parsoid='{"stx": "html"}'>
29917 <li data-parsoid='{"stx": "html"}'>a
29918 <ul><li>b</li></ul>
29922 <ul data-parsoid='{"stx": "html"}'>
29924 <ul><li>y</li></ul>
29945 "modes": ["wt2wt"],
29947 [ "#xyz", "before", "<b>before</b> stuff " ],
29948 [ "#xyz", "after", " stuff <i>after</i>" ],
29949 [ "#xyz", "html", "x <b>y</b> z" ]
29953 <span id="xyz">hello</span>
29955 '''before''' stuff <span id="xyz">x '''y''' z</span> stuff ''after''
29959 Never serialize a-tag as html, regardless of what data-parsoid has to say
29961 parsoid={ "modes": ["html2wt"], "suppressErrors": true }
29963 <a rel="mw:WikiLink" href="./Foo" title="Foo" data-parsoid='{"stx":"html"}'>Foo</a>
29968 ## SSS FIXME: This is broken output nevertheless.
29969 ## What might be a reasonable non-broken output for this?
29970 ## This is an edge case unlikely to be seen in production
29971 ## that I am not wasting more time on this right now.
29973 Never serialize a-tag as html, no matter what attributes it has
29975 parsoid={ "modes": ["html2wt"], "suppressErrors": true }
29977 <a bad='true' href='http://boo.org'><img src='http://boohoo.org' /></a>
29979 [http://boo.org http://boohoo.org]
29982 # Misnested is an indication that selser can reuse the source but these have
29983 # shown to sneak through on occasion. See T101768.
29984 # The original wikitext here is: [http://test.com [[one]] two three]
29986 Strip span tags added to mark misnested links
29990 <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>
29992 [http://test.com][[one]] two three
29996 Catch regression when unpacking misnested links
30000 {{echo|hi}}[http://example.com [[ho]]]
30002 <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>
30006 Catch regression when unpacking with trailing content
30008 {{echo|Foo <references/> bar}}
30010 <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>
30014 Use data-parsoid.firstWikitextNode to compute newline constraints for template content
30018 <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|}"]}'>
30030 ## This test verifies the presence and computation of this attribute indirectly
30031 ## by making an edit and ensuring that the serialization is correct (which it would be
30032 ## only if firstWikitextNode is properly set).
30034 data-parsoid.firstWikitextNode should be computed properly in the presence of fostered content
30037 "modes": ["wt2wt"],
30039 [ "div#x", "remove" ],
30040 [ "div", "before", "<div>new</div>" ]
30044 <div id="x">foo</div>
30046 {{echo|<div>boo</div>
30054 {{echo|<div>boo</div>
30060 # --------------------------------------------
30061 # Tests spec'ing wikitext serialization norms |
30062 # --------------------------------------------
30065 Serialize multi-line indent-pre starting with wikitext syntax
30079 1. Categories should always be serialized on their own line
30083 foo<link rel="mw:PageProp/Category" href="./Category:Foo">bar
30091 2. Categories that are part of templates should not introduce a line break
30093 foo {{echo|<span>bar</span> [[Category:baz]]}} bar
30095 <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>
30098 # Careful while editing these next 2 tests. There are \u200f characters
30099 # before and after the <link> tags in the HTML and following some
30100 # of the categories in wikitext
30101 # Do not remove these characters in edits.
30103 # As part of the serialization, these bidi characters will get stripped.
30105 RTL (\u200f) and LTR (\u200e) markers around category tags should be stripped
30108 "modes": ["html2wt"],
30109 "scrubWikitext": true
30112 <p><link rel="mw:PageProp/Category" href="./קטגוריה:טקסים" />
30113 <link rel="mw:PageProp/Category" href="./קטגוריה:_שיטות_משפט" /></p>
30116 [[קטגוריה: שיטות משפט]]
30120 RTL (\u200f) and LTR (\u200e) markers should not be stripped if followed by a text node
30123 "modes": ["html2wt"],
30124 "scrubWikitext": true
30127 <p><link rel="mw:PageProp/Category" href="./קטגוריה:טקסים" />y</p>
30134 Lists: Add space after bullets
30141 <li><span> baz</span></li>
30146 * <span> baz</span>
30150 1. Headings: Add space before/after == (T53744)
30157 <h2><span> baz</span></h2>
30165 == <span> baz</span> ==
30169 2. Headings: Add space before/after == even after hoisted content
30172 "modes": ["html2wt"],
30173 "scrubWikitext": true
30176 <h2> <link href="./Category:A2" rel="mw:PageProp/Category" />ok</h2>
30184 1. Headings: suppress newly created empty headings
30187 "modes": ["html2wt"],
30188 "scrubWikitext": true
30196 2. Headings: don't suppress empty headings if scrubWikitext is false
30206 3. Headings: suppress empty headings on edits
30209 "modes": ["selser"],
30210 "scrubWikitext": true,
30216 ==<span id="x">foo</span>==
30221 Headings: Replace <br/> with a single whitespace char (when scrubWikitext = true)
30224 "modes": ["html2wt"],
30225 "scrubWikitext": true
30228 <h2>foo<br/>bar</h2>
30229 <h2>foo <span><br/>bar</span> baz</h2>
30233 == foo <span> bar</span> baz ==
30237 Headings: Replace <br/> with a single whitespace char (when scrubWikitext = false)
30240 "modes": ["html2wt"],
30241 "scrubWikitext": false
30244 <h2>foo<br/>bar</h2>
30250 1. WT Quote Tags: suppress newly created empty style tags
30253 "modes": ["html2wt"],
30254 "scrubWikitext": true
30262 2. WT Quote Tags: don't suppress empty style tags if scrubWikitext is false
30268 ''<nowiki/>'''''<nowiki/>'''
30272 3. WT Quote Tags: suppress empty style tags on edits
30275 "modes": ["selser"],
30276 "scrubWikitext": true,
30282 '''<span id="x">foo</span>'''
30287 1. Anchors: suppress newly created empty anchors
30290 "modes": ["html2wt"],
30291 "scrubWikitext": true
30294 <a rel="mw:WikiLink" href="./Test" title="Test"></a>
30299 2. Anchors: don't suppress empty anchors if scrubWikitext is false
30302 "modes": ["html2wt"],
30303 "scrubWikitext": false
30306 <a rel="mw:WikiLink" href="./Test" title="Test"></a>
30312 3. Anchors: suppress empty anchors on edits
30315 "modes": ["selser"],
30316 "scrubWikitext": true,
30322 [[Test|<span id="x">foo</span>]]
30327 3a. Anchors: do not suppress numbered extlinks
30330 "modes": ["wt2wt"],
30331 "scrubWikitext": true
30336 <a rel="mw:ExtLink" href="http://foo.com"></a>
30340 3b. Anchors: do not suppress numbered extlinks
30343 "modes": ["wt2wt"],
30344 "scrubWikitext": true,
30350 [http://foo.com <span id="x">foo</span>]
30356 Normalizations should be restricted to edited content
30359 "modes": ["selser"],
30360 "scrubWikitext": true,
30362 [ "h1", "before", "<i></i>"]
30376 1. Multiple normalizations (html2wt)
30379 "modes": ["html2wt"],
30380 "scrubWikitext": true
30384 <p><a href='Foo' rel='mw:WikiLink'>foo<i></i>
30385 </a><b><i></i></b>x</p>
30394 2. Multiple normalizations (selser)
30397 "modes": ["selser"],
30398 "scrubWikitext": true,
30400 [ "#x", "after", "<h1><i></i></h1>\n<p> bar<b></b></p>"]
30404 <div id="x">foo</div>
30406 <div id="x">foo</div>
30411 1. Indent Pre Nowiki: suppress whitespace at the start of new paragraph
30414 "modes": ["html2wt"],
30415 "scrubWikitext": true
30427 2. Indent Pre Nowiki: don't suppress whitespace at the start of new paragraph if scrubWikitext is false
30434 <nowiki> </nowiki>hi
30436 <nowiki> </nowiki> hello
30440 3. Indent Pre Nowiki: suppress whitespace after newlines in new paragraph or table cell
30443 "modes": ["html2wt"],
30444 "scrubWikitext": true
30453 baz bang</td></tr></table>
30459 bar<span>boo</span></p>
30475 bar<span>boo</span>
30479 4. Indent Pre Nowiki: suppress leading whitespace in edited paragraphs
30482 "modes": ["selser"],
30483 "scrubWikitext": true,
30485 [ "p", "html", " a\n b" ]
30496 1. New links that end in spaces
30499 "modes": ["html2wt"],
30500 "scrubWikitext": false
30503 <p><a rel="mw:WikiLink" href="./Berlin" title="Berlin">Berlin </a>is the capital of Germany.</p>
30504 <p><a rel="mw:WikiLink" href="./Foo" title="Foo">Foo </a><b>bar</b></p>
30505 <p><a rel="mw:WikiLink" href="./Boston" title="Boston">Boston </a> is a city.</p>
30507 [[Berlin ]]<nowiki/>is the capital of Germany.
30511 [[Boston ]] is a city.
30515 2. New links that end in spaces
30518 "modes": ["html2wt"],
30519 "scrubWikitext": true
30522 <p><a rel="mw:WikiLink" href="./Berlin" title="Berlin">Berlin </a>is the capital of Germany.</p>
30523 <p><a rel="mw:WikiLink" href="./Foo" title="Foo">Foo </a><b>bar</b></p>
30524 <p><a rel="mw:WikiLink" href="./Boston" title="Boston">Boston </a> is a city.</p>
30526 [[Berlin]] is the capital of Germany.
30530 [[Boston]] is a city.
30534 1. Table cells with escapable prefixes
30537 "modes": ["html2wt"],
30538 "scrubWikitext": false
30542 <tr><td>a</td></tr>
30543 <tr><td>-</td></tr>
30544 <tr><td>+</td></tr>
30550 |<nowiki>-</nowiki>
30552 |<nowiki>+</nowiki>
30557 2. Table cells with escapable prefixes
30560 "modes": ["html2wt"],
30561 "scrubWikitext": true
30565 <tr><td>a</td></tr>
30566 <tr><td>-</td></tr>
30567 <tr><td>+</td></tr>
30580 3a. Table cells with escapable prefixes after edits
30583 "modes": ["selser"],
30584 "scrubWikitext": true,
30586 [ "table tbody tr:first-child td:first-child", "remove"]
30600 3b. Table cells with escapable prefixes after edits
30603 "modes": ["selser"],
30604 "scrubWikitext": true,
30606 [ "table tbody tr:first-child td:first-child", "html", "-" ],
30613 |<span id="x">foo</span>+
30622 # FIXME: This test will fail because
30623 # normalization doesn't realize that the id attribute
30624 # will eliminate the escapable scenario
30626 4a. Table cells without escapable prefixes after edits
30629 "modes": ["selser"],
30630 "scrubWikitext": true,
30632 [ "#x", "html", "-" ]
30645 ## This tests normalizer's ability to discriminate between
30646 ## cells having identical content.
30648 4b. Table cells without escapable prefixes after edits
30651 "modes": ["selser"],
30652 "scrubWikitext": true,
30654 [ "td", "html", "-" ]
30667 ## This tests normalizer's ability to not be tripped by
30668 ## comments (and whitespace)
30670 4c. Table cells without escapable prefixes after edits
30673 "modes": ["selser"],
30674 "scrubWikitext": true,
30676 [ "table tbody tr td:first-child", "remove" ]
30691 ## This tests normalizer's ability to handle HTML cells
30693 4d. Table cells without escapable prefixes after edits
30696 "modes": ["selser"],
30697 "scrubWikitext": true,
30699 [ "td", "html", "-" ]
30704 <tr><td>a</td></tr>
30708 <tr><td>-</td></tr>
30712 ## T111151 Remove font elements without attributes
30714 5a. font tags without attributes should be dropped in scrubWikitext mode
30717 "modes": ["html2wt"],
30718 "scrubWikitext": true
30722 <font><font>bar</font></font>
30723 <font class="x">boo</font>
30727 <font class="x">boo</font>
30731 5b. font tags should not be dropped without scrubWikitext being enabled
30734 "modes": ["html2wt"],
30735 "scrubWikitext": false
30744 Escape nowiki DOM elements
30748 <nowiki><i>foo</i></nowiki>
30750 <nowiki>''foo''</nowiki>
30753 # This is meant to be an interim fix while we go about figuring out
30754 # how to not introduce these trailing <nowiki/>s in the first place.
30756 T115717: Strip trailing <nowiki/>s (without affecting valid uses)
30760 <p>x<meta typeof="mw:Placeholder" data-parsoid='{"src":"<nowiki/>"}'/><meta typeof="mw:Placeholder" data-parsoid='{"src":"<nowiki/>"}'/>
30762 <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>
30763 <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>
30777 New list is serialized on newlines
30781 <p>The quick brown fox jumps over the lazy dog.</p><ul>
30785 </ul><p>The quick onyx goblin jumps over the lazy dwarf.</p>
30787 The quick brown fox jumps over the lazy dog.
30793 The quick onyx goblin jumps over the lazy dwarf.
30797 New lists in formatting elements serialized w/o newlines
30809 <small><ul><li>hi</li></ul></small>
30821 New list in table doesn't need newlines
30825 <table><tr><td><ul><li>test</li><li>123</li></td></tr></table>
30834 # ---------------------------------------------------
30835 # End of tests spec'ing wikitext serialization norms |
30836 # ---------------------------------------------------
30840 Bare inline nodes not wrapped inside p-tags should be treated as p-wrapped
30848 <td><b>c</b><p>d</p></td>
30867 Anchor without href scenarios
30869 parsoid={ "modes": ["html2wt"], "suppressErrors": true }
30872 <a class="no">dice</a>
30877 <span name="foo"></span>
30881 New transclusion added after a list should be serialized after the list
30885 <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>
30891 # -----------------------------------------------------------------
30892 # End of section for Parsoid-only html2wt tests for serialization
30894 # -----------------------------------------------------------------
30896 # -----------------------------------------------------------------
30897 # The following section of tests are primarily to spec behavior of
30898 # the selective serializer. All these tests have manual selser
30899 # changes. The automated selser changes for all tests handle the
30900 # wide variation of changes, but these tests here capture specs
30901 # deterministically.
30902 # ----------------------------------------------------------------
30906 Selser: New comments should not be lost
30909 "modes": ["selser"],
30911 [ "#a", "after", "<!--c1-->" ],
30912 [ "#b", "before", "<!--c2-->" ]
30916 <span id="a">a</span>
30918 <span id="b">b</span>
30920 <span id="a">a</span><!--c1-->
30922 <!--c2--><span id="b">b</span>
30927 Selser: Check for validity of DSR before using it
30930 "modes": ["selser"],
30932 [ "#a", "before", "<meta property='mw:PageProp/displaytitle' content='foo'>" ]
30936 <span id="a">a</span>
30938 {{DISPLAYTITLE:foo}}
30939 <span id="a">a</span>
30943 1. DOMDiff: Changes to <ref> content should be looked up using id
30946 "modes": ["selser"],
30948 ["#X", "after", "bar"],
30949 ["#Y", "after", "baz"]
30953 X <ref><span id="X">foo</span></ref>
30956 <ref name="a"><span id="Y">foo</span></ref>
30959 X <ref><span id="X">foo</span>bar</ref>
30962 <ref name="a"><span id="Y">foo</span>baz</ref>
30967 2. DOMDiff: Changes to <ref> content should be looked up using id
30970 "modes": ["selser"],
30972 ["#Z", "after", "bar"]
30976 A <ref>foo bar for a</ref>
30977 B <ref group="X" name="b" />
30981 <references group="X">
30982 <ref name="b"><span id="Z">foo</span></ref>
30985 A <ref>foo bar for a</ref>
30986 B <ref group="X" name="b" />
30990 <references group="X">
30991 <ref name="b"><span id="Z">foo</span>bar</ref>
30996 DOMDiff: Edits to content nested in elements with templated attributes should not be lost (T139388)
30999 "modes": ["selser"],
31001 [ "div:first-child", "text", "bar" ]
31005 <div style="{{1x|color:red;}}%">foo</div>
31007 <div style="{{1x|color:red;}}%">bar</div>
31019 <li class="mw-empty-elt"></li>
31020 <li class="mw-empty-elt"></li>
31027 [[File:Thumb.png|thumb]]
31029 <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>
31031 <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>
31035 unclosed internal link XSS (T137264)
31037 [[#%3Cscript%3Ealert(1)%3C/script%3E|
31039 <p>[[#<script>alert(1)</script>|
31042 <p>[[#%3Cscript%3Ealert(1)%3C/script%3E|</p>
31046 Validating that <style> isn't eaten by tidy (T167349)
31051 <style>.foo::before { content: "<foo>"; }</style>
31052 <style data-mw-foobar="baz">.foo::after { content: "<bar>"; }</style>
31056 <style>.foo::before { content: "<foo>"; }</style>
31057 <style data-mw-foobar="baz">.foo::after { content: "<bar>"; }</style>
31061 <style typeof="mw:Extension/style" data-mw='{"name":"style","attrs":{},"body":{"extsrc":".foo::before { content: \"<foo>\"; }"}}'>.foo::before { content: "<foo>"; }</style>
31062 <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>
31066 ## Right now, Parsoid doesn't de-duplicate style tags.
31067 ## So, we shouldn't see link tags that need to bypass the sanitizer.
31068 ## In a followup patch, when we de-duplicate style tags and
31069 ## introduce link tags, we'll add a hook for link tags in
31070 ## the parser test runner script.
31072 Validating that <style> isn't wrapped in a paragraph (T186965)
31076 A style tag, by itself or with other style/link tags, shouldn't be wrapped in a paragraph
31078 <style>.foo::before { content: "<foo>"; }</style>
31080 <style>.foo::before { content: "<foo>"; }</style> <link rel="foo" href="bar"/><style>.foo::before { content: "<foo>"; }</style>
31082 But if it's on a line with other content, let it be wrapped.
31084 <style>.foo::before { content: "<foo>"; }</style> bar
31086 foo <style>.foo::before { content: "<foo>"; }</style>
31088 foo <style>.foo::before { content: "<foo>"; }</style> bar
31090 And the same if we have non-paragraph-breaking whitespace
31093 <style>.foo::before { content: "<foo>"; }</style>
31096 <p>A style tag, by itself or with other style/link tags, shouldn't be wrapped in a paragraph
31098 <style>.foo::before { content: "<foo>"; }</style>
31099 <style>.foo::before { content: "<foo>"; }</style> <link rel="foo" href="bar"/><style>.foo::before { content: "<foo>"; }</style>
31100 <p>But if it's on a line with other content, let it be wrapped.
31101 </p><p><style>.foo::before { content: "<foo>"; }</style> bar
31102 </p><p>foo <style>.foo::before { content: "<foo>"; }</style>
31103 </p><p>foo <style>.foo::before { content: "<foo>"; }</style> bar
31104 </p><p>And the same if we have non-paragraph-breaking whitespace
31106 <style>.foo::before { content: "<foo>"; }</style>
31110 <p>A style tag, by itself or with other style/link tags, shouldn't be wrapped in a paragraph</p>
31112 <style typeof="mw:Extension/style" data-mw='{"name":"style","attrs":{},"body":{"extsrc":".foo::before { content: \"<foo>\"; }"}}'>.foo::before { content: "<foo>"; }</style>
31114 <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>
31116 <p>But if it's on a line with other content, let it be wrapped.</p>
31118 <p><style typeof="mw:Extension/style" data-mw='{"name":"style","attrs":{},"body":{"extsrc":".foo::before { content: \"<foo>\"; }"}}'>.foo::before { content: "<foo>"; }</style> bar</p>
31120 <p>foo <style typeof="mw:Extension/style" data-mw='{"name":"style","attrs":{},"body":{"extsrc":".foo::before { content: \"<foo>\"; }"}}'>.foo::before { content: "<foo>"; }</style></p>
31122 <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>
31124 <p>And the same if we have non-paragraph-breaking whitespace</p>
31127 <style typeof="mw:Extension/style" data-mw='{"name":"style","attrs":{},"body":{"extsrc":".foo::before { content: \"<foo>\"; }"}}'>.foo::before { content: "<foo>"; }</style>
31132 Validating that <link> isn't wrapped in a paragraph (T186965)
31136 A link tag, by itself or with other style/link tags, shouldn't be wrapped in a paragraph
31138 <link rel="foo" href="bar"/>
31140 <link rel="foo" href="bar"/> <style>.foo::before { content: "<foo>"; }</style><link rel="foo" href="bar"/>
31142 But if it's on a line with other content, let it be wrapped.
31144 <link rel="foo" href="bar"/> bar
31146 foo <link rel="foo" href="bar"/>
31148 foo <link rel="foo" href="bar"/> bar
31150 And the same if we have non-paragraph-breaking whitespace
31153 <link rel="foo" href="bar"/>
31156 <p>A link tag, by itself or with other style/link tags, shouldn't be wrapped in a paragraph
31158 <link rel="foo" href="bar"/>
31159 <link rel="foo" href="bar"/> <style>.foo::before { content: "<foo>"; }</style><link rel="foo" href="bar"/>
31160 <p>But if it's on a line with other content, let it be wrapped.
31161 </p><p><link rel="foo" href="bar"/> bar
31162 </p><p>foo <link rel="foo" href="bar"/>
31163 </p><p>foo <link rel="foo" href="bar"/> bar
31164 </p><p>And the same if we have non-paragraph-breaking whitespace
31166 <link rel="foo" href="bar"/>
31172 Extension returning multiple nodes starting with a style tag roundtrips
31177 {{echo|<html><style>.hi { color: red; }</style>
31179 <tr><td class="hi">ho</td></tr>
31182 <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">
31183 </span></p><table about="#mwt5" data-parsoid='{"stx":"html"}'>
31185 <tbody><tr><td class="hi">ho</td></tr>
31190 Decoding of HTML entities in headings and links for IDs and link fragments (T103714)
31192 wgFragmentMode=[ 'html5', 'legacy' ]
31194 ==A&B&C&amp;D&amp;amp;E==
31195 [[#A&B&C&amp;D&amp;amp;E]]
31197 <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>
31198 <p><a href="#A&B&C&amp;D&amp;amp;E">#A&B&C&amp;D&amp;amp;E</a>
31201 <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>
31202 <p><a rel="mw:WikiLink" href="./Main_Page#A&B&C&amp;D&amp;amp;E" data-parsoid='{"stx":"simple","a":{"href":"./Main_Page#A&B&C&amp;D&amp;amp;E"},"sa":{"href":"#A&B&amp;C&amp;amp;D&amp;amp;amp;E"}}'>#A&B&C&amp;D&amp;amp;E</a></p>
31206 Decoding of HTML entities in headings and links for IDs and link fragments (T103714) (legacy)
31208 wgFragmentMode=[ 'legacy' ]
31210 ==A&B&C&amp;D&amp;amp;E==
31211 [[#A&B&C&amp;D&amp;amp;E]]
31213 <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>
31214 <p><a href="#A.26B.26C.26amp.3BD.26amp.3Bamp.3BE">#A&B&C&amp;D&amp;amp;E</a>
31219 Decoding of HTML entities in embedded HTML tags
31221 <table class="1&2&3&amp;4&amp;amp;5"><tr><td>x</td></tr></table>
31223 <table class="1&2&3&amp;4&amp;amp;5"><tr><td>x</td></tr></table>
31226 <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>
31230 Decoding of HTML entities in indicator names for IDs (T104196)
31232 parsoid=wt2html,html2html
31235 <indicator name="1&2&3&amp;4&amp;amp;5">Indicator</indicator>
31237 1&2&3&4&amp;5=Indicator
31240 <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>
31243 # this version of the test strips out the ambiguity so Parsoid rts cleanly
31245 Decoding of HTML entities in indicator names for IDs (unambiguous) (T104196)
31249 <indicator name="1&2&3&amp;4&amp;amp;5">Indicator</indicator>
31251 1&2&3&4&amp;5=Indicator
31254 <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>
31257 # This fragment mode is what Parsoid supports.
31259 HTML5 ids: fallback to legacy
31261 wgFragmentMode=[ 'html5', 'legacy' ]
31273 ==Hey < # " > % : '==
31274 [[#Foo bar]] [[#foo Bar]] [[#Тест]] [[#тест]] [[#Hey < # " > % : ']]
31276 {{anchorencode:💩}} <span id="{{anchorencode:💩}}"></span>
31278 <!-- These two links should produce identical HTML -->
31279 [[#啤酒]] [[#%E5%95%A4%E9%85%92]]
31282 <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>
31284 <li class="toclevel-1 tocsection-1"><a href="#Foo_bar"><span class="tocnumber">1</span> <span class="toctext">Foo bar</span></a></li>
31285 <li class="toclevel-1 tocsection-2"><a href="#foo_Bar_2"><span class="tocnumber">2</span> <span class="toctext">foo Bar</span></a></li>
31286 <li class="toclevel-1 tocsection-3"><a href="#Тест"><span class="tocnumber">3</span> <span class="toctext">Тест</span></a></li>
31287 <li class="toclevel-1 tocsection-4"><a href="#Тест_2"><span class="tocnumber">4</span> <span class="toctext">Тест</span></a></li>
31288 <li class="toclevel-1 tocsection-5"><a href="#тест"><span class="tocnumber">5</span> <span class="toctext">тест</span></a></li>
31289 <li class="toclevel-1 tocsection-6"><a href="#Hey_<_#_"_>_%_:_'"><span class="tocnumber">6</span> <span class="toctext">Hey < # " > % : '</span></a></li>
31293 <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>
31294 <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>
31295 <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>
31296 <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>
31297 <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>
31298 <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>
31299 <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>
31300 </p><p>💩 <span id="💩"></span>
31301 </p><p><a href="#啤酒">#啤酒</a> <a href="#啤酒">#啤酒</a>
31304 <h2 id="Foo_bar">Foo bar</h2>
31306 <h2 id="foo_Bar_2">foo Bar</h2>
31308 <h2 id="Тест"><span id=".D0.A2.D0.B5.D1.81.D1.82" typeof="mw:FallbackId"></span>Тест</h2>
31310 <h2 id="Тест_2"><span id=".D0.A2.D0.B5.D1.81.D1.82_2" typeof="mw:FallbackId"></span>Тест</h2>
31312 <h2 id="тест"><span id=".D1.82.D0.B5.D1.81.D1.82" typeof="mw:FallbackId"></span>тест</h2>
31314 <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>
31315 <p><a rel="mw:WikiLink" href="./Main_Page#Foo_bar">#Foo bar</a> <a rel="mw:WikiLink" href="./Main_Page#foo_Bar">#foo Bar</a> <a rel="mw:WikiLink" href="./Main_Page#Тест">#Тест</a> <a rel="mw:WikiLink" href="./Main_Page#тест">#тест</a> <a rel="mw:WikiLink" href="./Main_Page#Hey_<_#_"_>_%_:_'" data-parsoid='{"stx":"simple","a":{"href":"./Main_Page#Hey_<_#_\"_>_%_:_'"},"sa":{"href":"#Hey < # \" > % : '"}}'>#Hey < # " > % : '</a></p>
31317 <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>
31319 <!-- These two links should produce identical HTML -->
31320 <p><a rel="mw:WikiLink" href="./Main_Page#啤酒">#啤酒</a> <a rel="mw:WikiLink" href="./Main_Page#啤酒" data-parsoid='{"stx":"simple","a":{"href":"./Main_Page#啤酒"},"sa":{"href":"#%E5%95%A4%E9%85%92"}}'>#啤酒</a></p>
31323 # Parsoid doesn't support this mode
31325 HTML5 ids: legacy with a fallback to modern
31327 wgFragmentMode=[ 'legacy', 'html5' ]
31339 ==Hey < # " > % : '==
31340 [[#Foo bar]] [[#foo Bar]] [[#Тест]] [[#тест]] [[#Hey < # " > % : ']]
31342 {{anchorencode:💩}} <span id="{{anchorencode:💩}}"></span>
31344 <!-- These two links should produce identical HTML -->
31345 [[#啤酒]] [[#%E5%95%A4%E9%85%92]]
31348 <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>
31350 <li class="toclevel-1 tocsection-1"><a href="#Foo_bar"><span class="tocnumber">1</span> <span class="toctext">Foo bar</span></a></li>
31351 <li class="toclevel-1 tocsection-2"><a href="#foo_Bar_2"><span class="tocnumber">2</span> <span class="toctext">foo Bar</span></a></li>
31352 <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>
31353 <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>
31354 <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>
31355 <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>
31359 <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>
31360 <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>
31361 <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>
31362 <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>
31363 <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>
31364 <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>
31365 <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>
31366 </p><p>.F0.9F.92.A9 <span id=".F0.9F.92.A9"></span>
31367 </p><p><a href="#.E5.95.A4.E9.85.92">#啤酒</a> <a href="#.E5.95.A4.E9.85.92">#啤酒</a>
31371 # Parsoid doesn't support this mode.
31373 HTML5 ids: no legacy
31375 wgFragmentMode=[ 'html5' ]
31387 ==Hey < # " > % : '==
31388 [[#Foo bar]] [[#foo Bar]] [[#Тест]] [[#тест]] [[#Hey < # " > % : ']]
31390 {{anchorencode:💩}} <span id="{{anchorencode:💩}}"></span>
31392 <!-- These two links should produce identical HTML -->
31393 [[#啤酒]] [[#%E5%95%A4%E9%85%92]]
31396 <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>
31398 <li class="toclevel-1 tocsection-1"><a href="#Foo_bar"><span class="tocnumber">1</span> <span class="toctext">Foo bar</span></a></li>
31399 <li class="toclevel-1 tocsection-2"><a href="#foo_Bar_2"><span class="tocnumber">2</span> <span class="toctext">foo Bar</span></a></li>
31400 <li class="toclevel-1 tocsection-3"><a href="#Тест"><span class="tocnumber">3</span> <span class="toctext">Тест</span></a></li>
31401 <li class="toclevel-1 tocsection-4"><a href="#Тест_2"><span class="tocnumber">4</span> <span class="toctext">Тест</span></a></li>
31402 <li class="toclevel-1 tocsection-5"><a href="#тест"><span class="tocnumber">5</span> <span class="toctext">тест</span></a></li>
31403 <li class="toclevel-1 tocsection-6"><a href="#Hey_<_#_"_>_%_:_'"><span class="tocnumber">6</span> <span class="toctext">Hey < # " > % : '</span></a></li>
31407 <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>
31408 <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>
31409 <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>
31410 <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>
31411 <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>
31412 <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>
31413 <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>
31414 </p><p>💩 <span id="💩"></span>
31415 </p><p><a href="#啤酒">#啤酒</a> <a href="#啤酒">#啤酒</a>
31420 T90902: Normalize weird characters in section IDs
31422 wgFragmentMode=[ 'html5', 'legacy' ]
31428 <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>
31429 <p><a href="#Foo_bar">#Foo bar</a>
31432 <h2 id="Foo_bar"> Foo<span typeof="mw:Entity" data-parsoid='{"src":"&nbsp;","srcContent":" "}'> </span>bar </h2>
31433 <p><a rel="mw:WikiLink" href="./Main_Page#Foo_bar" data-parsoid='{"stx":"simple","a":{"href":"./Main_Page#Foo_bar"},"sa":{"href":"#Foo&nbsp;bar"}}'>#Foo bar</a></p>
31437 T51672: Test for brackets in attributes of elements in external link texts
31439 [http://example.com/ link <span title="title with [brackets]">span</span>]
31440 [http://example.com/ link <span title="title with [brackets]">span</span>]
31443 <p><a rel="nofollow" class="external text" href="http://example.com/">link <span title="title with [brackets]">span</span></a>
31444 <a rel="nofollow" class="external text" href="http://example.com/">link <span title="title with [brackets]">span</span></a>
31447 <p><a rel="mw:ExtLink" class="external text" href="http://example.com/">link <span title="title with [brackets]">span</span></a>
31448 <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>
31452 T72875: Test for brackets in attributes of elements in internal link texts
31454 [[Foo|link <span title="title with [[double brackets]]">span</span>]]
31455 [[Foo|link <span title="title with [[double brackets]]">span</span>]]
31458 <p><a href="/wiki/Foo" title="Foo">link <span title="title with [[double brackets]]">span</span></a>
31459 <a href="/wiki/Foo" title="Foo">link <span title="title with [[double brackets]]">span</span></a>
31462 <p><a rel="mw:WikiLink" href="./Foo" title="Foo">link <span title="title with [[double brackets]]">span</span></a>
31463 <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>
31467 T199926: html arrow wt: Parsoid sometimes trips up on verticalbar chars in hrefs
31470 "modes": ["html2wt"]
31473 <a href="https://stats.wikimedia.org/v2/#/fr.wikipedia.org/reading/page-views-by-country/normal|map|2-Year~2016060100~2018071100|~total">9</a>
31474 <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>
31476 [https://stats.wikimedia.org/v2/#/fr.wikipedia.org/reading/page-views-by-country/normal|map|2-Year~2016060100~2018071100|~total 9]
31477 [[stats:v2/#/fr.wikipedia.org/reading/page-views-by-country/normal%7Cmap%7C2-Year~2016060100~2018071100%7C~total|10]]
31481 T179544: {{anchorencode:}} output should be always usable in links
31483 wgFragmentMode=[ 'html5' ]
31485 <span id="{{anchorencode:[foo]}}"></span>[[#{{anchorencode:[foo]}}]]
31487 <p><span id="[foo]"></span><a href="#[foo]">#[foo]</a>
31490 <p><span id="[foo]" about="#mwt3" typeof="mw:ExpandedAttrs" data-parsoid='{"stx":"html","a":{"id":"[foo]"},"sa":{"id":"{{anchorencode:[foo]}}"}}' data-mw='{"attribs":[[{"txt":"id"},{"html":"<span typeof=\"mw:Transclusion mw:Entity\" about=\"#mwt1\" data-parsoid='{\"srcContent\":\"[\",\"dsr\":[10,32,null,null],\"pi\":[[]]}' data-mw='{\"parts\":[{\"template\":{\"target\":{\"wt\":\"anchorencode:[foo]\",\"function\":\"anchorencode\"},\"params\":{},\"i\":0}}]}'>[</span><span about=\"#mwt1\" data-parsoid=\"{}\">foo</span><span typeof=\"mw:Entity\" about=\"#mwt1\" data-parsoid='{\"src\":\"&amp;#x5D;\",\"srcContent\":\"]\"}'>]</span>"}]]}'></span><a typeof="mw:ExpandedAttrs" about="#mwt4" rel="mw:WikiLink" href="./Main_Page#[foo]" data-parsoid='{"stx":"simple","a":{"href":"./Main_Page#[foo]"},"sa":{"href":"#{{anchorencode:[foo]}}"}}' data-mw='{"attribs":[[{"txt":"href"},{"html":"#<span typeof=\"mw:Transclusion mw:Entity\" about=\"#mwt2\" data-parsoid='{\"srcContent\":\"[\",\"dsr\":[44,66,null,null],\"pi\":[[]]}' data-mw='{\"parts\":[{\"template\":{\"target\":{\"wt\":\"anchorencode:[foo]\",\"function\":\"anchorencode\"},\"params\":{},\"i\":0}}]}'>[</span><span about=\"#mwt2\" data-parsoid=\"{}\">foo</span><span typeof=\"mw:Entity\" about=\"#mwt2\" data-parsoid='{\"src\":\"&amp;#x5D;\",\"srcContent\":\"]\"}'>]</span>"}]]}'>#[foo]</a></p>
31493 ## ------------------------------
31494 ## Parsoid section-wrapping tests
31495 ## ------------------------------
31497 Section wrapping for well-nested sections (no leading content)
31500 "wrapSections": true
31521 <section data-mw-section-id="0"></section><section data-mw-section-id="1"><h1 id="1">1</h1>
31524 </section><section data-mw-section-id="2"><h1 id="2">2</h1>
31527 <section data-mw-section-id="3"><h2 id="2.1">2.1</h2>
31530 </section><section data-mw-section-id="4"><h2 id="2.2">2.2</h2>
31533 <section data-mw-section-id="5"><h3 id="2.2.1">2.2.1</h3>
31536 </section></section></section><section data-mw-section-id="6"><h1 id="3">3</h1>
31543 Section wrapping for well-nested sections (with leading content)
31546 "wrapSections": true
31551 Para 2 with a <div>nested in it</div>
31564 <section data-mw-section-id="0"><p>Para 1.</p>
31566 <p>Para 2 with a </p><div>nested in it</div>
31570 </section><section data-mw-section-id="1"><h1 id="1">1</h1>
31573 </section><section data-mw-section-id="2"><h1 id="2">2</h1>
31576 <section data-mw-section-id="3"><h2 id="2.1">2.1</h2>
31579 </section></section>
31583 Section wrapping with template-generated sections (good nesting 1)
31586 "wrapSections": true
31603 <section data-mw-section-id="0"></section><section data-mw-section-id="1"><h1 id="1">1</h1>
31606 <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">
31607 </span><p about="#mwt1">b</p>
31608 </section><section data-mw-section-id="3"><h2 id="1.2">1.2</h2>
31611 </section></section><section data-mw-section-id="4"><h1 id="2">2</h1>
31615 # In this example, the template scope is mildly expanded to incorporate the
31616 # trailing newline after the transclusion since that is part of section 1.1.1
31618 Section wrapping with template-generated sections (good nesting 2)
31621 "wrapSections": true,
31622 "modes": ["wt2html", "wt2wt"]
31637 <section data-mw-section-id="0"></section><section data-mw-section-id="1"><h1 id="1">1</h1>
31640 <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">
31641 </span><p about="#mwt1">b</p><span about="#mwt1">
31642 </span><section data-mw-section-id="-1" about="#mwt1"><h3 about="#mwt1" id="1.1.1">1.1.1</h3><span about="#mwt1">
31643 </span><p about="#mwt1">d</p><span about="#mwt1">
31644 </span></section></section></section><section data-mw-section-id="4" data-parsoid="{}"><h1 id="2">2</h1>
31648 # In this example, the template scope is mildly expanded to incorporate the
31649 # trailing newline after the transclusion since that is part of section 1.2.1
31651 Section wrapping with template-generated sections (good nesting 3)
31654 "wrapSections": true,
31655 "modes": ["wt2html", "wt2wt"]
31673 <section data-mw-section-id="0"></section><section data-mw-section-id="1" data-parsoid="{}"><h1 id="1"> 1 </h1>
31676 <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">
31677 </span><section data-mw-section-id="-1" about="#mwt1"><h2 about="#mwt1" id="1.1">1.1</h2><span about="#mwt1">
31678 </span><p about="#mwt1">b</p><span about="#mwt1">
31679 </span></section><section data-mw-section-id="-1" about="#mwt1"><h2 about="#mwt1" id="1.2">1.2</h2><span about="#mwt1">
31680 </span><p about="#mwt1">c</p><span about="#mwt1">
31681 </span><section data-mw-section-id="-1" about="#mwt1"><h3 about="#mwt1" id="1.2.1">1.2.1</h3><span about="#mwt1">
31682 </span><p about="#mwt1">d</p><span about="#mwt1">
31683 </span></section></section></section><section data-mw-section-id="5"><h1 id="2">2</h1>
31687 # Because of section-wrapping and template-wrapping interactions,
31688 # the scope of the template is expanded so that the template markup
31689 # is valid in the presence of <section> tags.
31690 # This exercises the s1 is null scenario in the wrapSections code
31692 Section wrapping with template-generated sections (bad nesting 1)
31695 "wrapSections": true
31709 <section data-mw-section-id="-1"></section><section data-mw-section-id="-2"><div data-parsoid='{"stx":"html"}'>
31712 <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"]}'>
31713 </span><section data-mw-section-id="-1" about="#mwt1"><h1 about="#mwt1" id="1">1</h1><span about="#mwt1">
31714 </span><p about="#mwt1">b
31715 </p><span about="#mwt1">
31717 </span><p about="#mwt1">c</p><span about="#mwt1">
31718 </span></section></div></section>
31721 # Because of section-wrapping and template-wrapping interactions,
31722 # the scope of the template is expanded so that the template markup
31723 # is valid in the presence of <section> tags.
31724 # This exercises the s1 is ancestor of s2 scenario in the wrapSections code
31726 Section wrapping with template-generated sections (bad nesting 2)
31729 "wrapSections": true
31747 <section data-mw-section-id="0"></section><section data-mw-section-id="1"><h1 id="1">1</h1>
31750 </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">
31751 </span><p about="#mwt1">b</p><span about="#mwt1">
31752 </span><section data-mw-section-id="-1" about="#mwt1"><h2 about="#mwt1" id="2.1">2.1</h2><span about="#mwt1">
31753 </span><p about="#mwt1">c</p><span about="#mwt1">
31755 </span><p about="#mwt1">d</p><span about="#mwt1">
31757 </span></section></section><section data-mw-section-id="4"><h1 id="3">3</h1>
31761 # Because of section-wrapping and template-wrapping interactions,
31762 # additional template wrappers are added to <section> tags
31763 # so that template wrapping semantics are valid whether section
31764 # tags are retained or stripped. But, the template scope can expand
31765 # greatly when accounting for section tags.
31766 # This exercises the s1 and s2 are in different subtrees scenario
31768 Section wrapping with template-generated sections (bad nesting 3)
31771 "wrapSections": true,
31772 "modes": ["wt2html", "wt2wt"]
31790 <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>
31793 <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">
31794 </span><p about="#mwt1">b</p><span about="#mwt1">
31795 </span></section></section><section data-mw-section-id="-1" about="#mwt1"><h1 about="#mwt1" id="2">2</h1><span about="#mwt1">
31796 </span><p about="#mwt1">c</p>
31799 </section><section data-mw-section-id="4" data-parsoid="{}"><h1 id="3">3</h1>
31804 Section wrapping with uneditable lead section + div wrapping multiple sections
31807 "wrapSections": true
31812 <div style="border:1px solid red;">
31829 <section data-mw-section-id="-1"><p>foo</p>
31831 </section><section data-mw-section-id="-2"><div style="border:1px solid red;">
31832 <section data-mw-section-id="1"><h1 id="1">1</h1>
31835 <section data-mw-section-id="2"><h2 id="1.1">1.1</h2>
31838 </section></section><section data-mw-section-id="-1"><h1 id="2">2</h1>
31842 </section><section data-mw-section-id="4"><h1 id="3">3</h1>
31845 <section data-mw-section-id="5"><h2 id="3.1">3.1</h2>
31847 </section></section>
31851 Section wrapping with editable lead section + div overlapping multiple sections
31854 "wrapSections": true
31861 <div style="border:1px solid red;">
31878 <section data-mw-section-id="0"><p>foo</p>
31880 </section><section data-mw-section-id="-1"><h1 id="1">1</h1>
31882 </section><section data-mw-section-id="-2"><div style="border:1px solid red;">
31885 <section data-mw-section-id="2"><h2 id="1.1">1.1</h2>
31888 </section><section data-mw-section-id="-1"><h1 id="2">2</h1>
31893 </section><section data-mw-section-id="4"><h1 id="3">3</h1>
31896 <section data-mw-section-id="5"><h2 id="3.1">3.1</h2>
31898 </section></section>
31902 HTML header tags should not be wrapped in section tags
31905 "wrapSections": true
31918 <section data-mw-section-id="0"><p>foo</p>
31920 <h1 id="a" data-parsoid='{"stx":"html"}'>a</h1>
31922 </section><section data-mw-section-id="1"><h1 id="b">b</h1>
31924 <h1 id="c" data-parsoid='{"stx":"html"}'>c</h1>
31926 </section><section data-mw-section-id="2"><h1 id="d">d</h1></section>
31930 Lead section containing only whitespace and comments.
31933 "wrapSections": true
31937 <!-- this is a comment, presumably significant to editors -->
31944 <section data-mw-section-id="0" data-parsoid="{}">
31945 <!-- this is a comment, presumably significant to editors -->
31946 </section><section data-mw-section-id="1"><h1 id="1">1</h1>
31949 </section><section data-mw-section-id="2"><h1 id="2">2</h1>
31954 Pseudo-sections emitted by templates should have id -2
31957 "wrapSections": true
31967 <section data-mw-section-id="-1"><p>foo</p>
31968 </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}}]}'>
31969 <section data-mw-section-id="-1"><h2 id="a">a</h2>
31970 </section><section data-mw-section-id="-1"><h2 id="b">b</h2>
31971 </section></div><span about="#mwt1">
31975 ##########################################################################
31976 Tests demonstrating white-space insensitivity in input wikitext
31977 for wikitext headings, wikitext list items, and wikitext table captions,
31978 headings, and cells. HTML versions of the same should preserve whitespace.
31979 ##########################################################################
31981 Trim whitespace in wikitext headings, list items, table captions, headings, and cells
31984 "modes": ["wt2html"],
31985 "preserveIEW": true
31989 == <!--c1--> <!--c2--> Spaces <!--c3--> <!--c4--> ==
31990 == <!--c1--> <!--c2--> Tabs <!--c3--><!--c4--> ==
31991 == <!--Headings with fallback ids--> Личная жизнь ==
31992 * <!--c1--> <!--c2--> List item <!--c3--> <!--c4-->
31993 ; <!--term to define--> term : <!--term's definition--> definition
31995 |+ <!--c1--> <!--c2--> Table Caption <!--c3--> <!--c4-->
31997 ! <!--c1--> <!--c2--> Table Heading 1 <!--c3--> <!--c4--> !! Table Heading 2 <!--c5-->
31999 | <!--c1--> <!--c2--> Table Cell 1 <!--c3--> <!--c4--> || Table Cell 2 <!--c5-->
32001 | class="foo" || <!--c1--> <!--c2--> Table Cell 3 <!--c3--> <!--c4-->
32003 | <!--c1--> testing [[one|two]] <!--c2--> | <!--c3--> some content
32006 | <!--c1--> <!--c2--> Table Cell 1 <!--c3--> <!--c4--> || Table Cell 2 <!--c5-->
32009 <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>
32010 <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>
32011 <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>
32012 <ul><li>List item</li></ul>
32013 <dl><dt>term </dt>
32014 <dd>definition</dd></dl>
32016 <caption>Table Caption
32019 <th>Table Heading 1</th>
32020 <th>Table Heading 2
32023 <td>Table Cell 1</td>
32027 <td>class="foo"</td>
32031 <td>testing <a href="/index.php?title=One&action=edit&redlink=1" class="new" title="One (page does not exist)">two</a> | some content
32032 </td></tr></tbody></table>
32035 <td>Table Cell 1</td>
32037 </td></tr></tbody></table> foo</dd></dl>
32039 <meta property="mw:PageProp/notoc">
32040 <h2 id="Spaces"><!--c1--><!--c2-->Spaces<!--c3--><!--c4--></h2>
32041 <h2 id="Tabs"><!--c1--><!--c2-->Tabs<!--c3--><!--c4--></h2>
32042 <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>
32043 <ul><li><!--c1--><!--c2-->List item<!--c3--><!--c4--></li></ul>
32044 <dl><dt><!--term to define-->term </dt><dd><!--term's definition-->definition</dd></dl>
32046 <caption><!--c1--><!--c2-->Table Caption<!--c3--><!--c4--></caption>
32048 <th><!--c1--><!--c2-->Table Heading 1<!--c3--><!--c4--></th><th>Table Heading 2<!--c5--></th></tr>
32050 <td><!--c1--><!--c2-->Table Cell 1<!--c3--><!--c4--></td><td>Table Cell 2<!--c5--></td></tr>
32052 <td>class="foo"</td><td><!--c1--><!--c2-->Table Cell 3<!--c3--><!--c4--></td></tr>
32054 <td><!--c1-->testing <a rel="mw:WikiLink" href="./One" title="One">two</a> <!--c2--> | <!--c3--> some content</td></tr>
32057 <tbody><tr><td><!--c1--><!--c2-->Table Cell 1<!--c3--><!--c4--></td><td>Table Cell 2<!--c5--></td></tr>
32058 </tbody></table> foo<!--c1--></dd></dl>
32061 # Looks like <caption> is not accepted in HTML
32063 Do not trim whitespace in HTML headings, list items, table captions, headings, and cells
32066 "modes": ["wt2html"],
32067 "preserveIEW": true
32071 <h2> <!--c1--> <!--c2--> Heading <!--c3--> <!--c4--> </h2>
32072 <ul><li> <!--c1--> <!--c2--> List item <!--c3--> <!--c4--> </li></ul>
32074 <tr><th> <!--c1--> <!--c2--> Table Heading <!--c3--> <!--c4--> <th></tr>
32075 <tr><td> <!--c1--> <!--c2--> Table Cell <!--c3--> <!--c4--> <th></tr>
32078 <h2><span class="mw-headline" id="Heading"> Heading </span></h2>
32079 <ul><li> List item </li></ul>
32081 <tbody><tr><th> Table Heading </th><th></th></tr>
32082 <tr><td> Table Cell </td><th></th></tr>
32085 <meta property="mw:PageProp/notoc"/>
32086 <h2 id="Heading"> <!--c1--> <!--c2--> Heading <!--c3--> <!--c4--> </h2>
32087 <ul><li> <!--c1--> <!--c2--> List item <!--c3--> <!--c4--> </li></ul>
32089 <tbody><tr><th> <!--c1--> <!--c2--> Table Heading <!--c3--> <!--c4--> </th><th></th></tr>
32090 <tr><td> <!--c1--> <!--c2--> Table Cell <!--c3--> <!--c4--> </td><th></th></tr>
32095 Do not trim whitespace in links and quotes
32098 "modes": ["wt2html"],
32099 "preserveIEW": true
32102 foo '' <!--c1--> italic <!--c2--> '' and ''' <!--c3--> bold <!--c4--> '''
32103 [[Foo| some text ]]
32105 <p>foo <i> italic </i> and <b> bold </b>
32106 <a href="/wiki/Foo" title="Foo"> some text </a>
32109 <p>foo <i> <!--c1--> italic <!--c2--> </i> and <b> <!--c3--> bold <!--c4--> </b>
32110 <a rel="mw:WikiLink" href="./Foo" title="Foo"> some text </a></p>
32114 Remove p tags surrounding a single element in a figcaption
32118 [[File:Foobar.jpg|right|200x200px|Caption]]
32120 <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>
32124 Selser preserves lack of newline before list and allows newline after the list
32127 "modes": ["selser"],
32128 "scrubWikitext": true,
32130 [ "ul", "after", "<p>footer</p>" ]
32147 Selser does not introduce newlines between unedited paragraph preceding the list
32150 "modes": ["selser"],
32152 [ "table tbody tr td p:last-child", "empty" ]
32174 Selser does not introduce newlines between unedited paragraph following the list
32177 "modes": ["selser"],
32179 [ "table tbody tr td p:first-child", "empty" ]
32201 Remove a list item but do not insert newline above list
32204 "modes": ["selser"],
32206 [ "ul li:last-child", "remove" ]