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>
1253 Bold conversion test
1255 a b'''c ''d e'''f'' g h'''i ''j
1259 <p>a b'<i>c </i>d e<b>f<i> g h</i></b><i>i </i>j
1268 Non-html5 tags should be accepted
1270 <center>''foo''</center>
1272 <font>''foo''</font>
1273 <strike>''foo''</strike>
1276 <center><i>foo</i></center>
1277 <p><big><i>foo</i></big>
1278 <font><i>foo</i></font>
1279 <strike><i>foo</i></strike>
1285 <wbr> is valid wikitext (T54468)
1293 # <strike> is HTML4, <s> is HTML4/5.
1295 <s> or <strike> for strikethrough
1297 <strike>strike</strike>
1301 <p><strike>strike</strike>
1309 Text-level semantic html elements in wikitext
1312 <strong>text</strong>
1328 <ruby><rb>明日</rb><rp>(</rp><rt>Ashita</rt><rp> </rp><rtc>あした</rtc><rp>)</rp></ruby>
1335 <strong>text</strong>
1351 <ruby><rb>明日</rb><rp>(</rp><rt>Ashita</rt><rp> </rp><rtc>あした</rtc><rp>)</rp></ruby>
1359 # test cases taken from
1360 # https://www.w3.org/TR/html5/text-level-semantics.html#the-ruby-element
1362 Ruby markup (W3C-style)
1364 ;Mono-ruby for individual base characters
1365 :<ruby>日<rt>に</rt>本<rt>ほん</rt>語<rt>ご</rt></ruby>
1367 :<ruby>今日<rt>きょう</rt></ruby>
1369 :<ruby>法<rb>華</rb><rb>経</rb><rt>ほ</rt><rt>け</rt><rt>きょう</rt></ruby>
1371 :<ruby>東<rb>京</rb><rp>(</rp><rt>とう</rt><rt>きょう</rt><rp>)</rp></ruby>
1373 :<ruby><rb>旧</rb><rb>金</rb><rb>山</rb><rt>jiù</rt><rt>jīn</rt><rt>shān</rt><rtc>San Francisco</rtc></ruby>
1376 <rb>♥</rb><rtc><rt>Heart</rt></rtc><rtc lang="fr"><rt>Cœur</rt></rtc>
1377 <rb>☘</rb><rtc><rt>Shamrock</rt></rtc><rtc lang="fr"><rt>Trèfle</rt></rtc>
1378 <rb>✶</rb><rtc><rt>Star</rt></rtc><rtc lang="fr"><rt>Étoile</rt></rtc>
1381 <dl><dt>Mono-ruby for individual base characters</dt>
1382 <dd><ruby>日<rt>に</rt>本<rt>ほん</rt>語<rt>ご</rt></ruby></dd>
1384 <dd><ruby>今日<rt>きょう</rt></ruby></dd>
1385 <dt>Jukugo ruby</dt>
1386 <dd><ruby>法<rb>華</rb><rb>経</rb><rt>ほ</rt><rt>け</rt><rt>きょう</rt></ruby></dd>
1387 <dt>Inline ruby</dt>
1388 <dd><ruby>東<rb>京</rb><rp>(</rp><rt>とう</rt><rt>きょう</rt><rp>)</rp></ruby></dd>
1389 <dt>Double-sided ruby</dt>
1390 <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>
1392 <rb>♥</rb><rtc><rt>Heart</rt></rtc><rtc lang="fr"><rt>Cœur</rt></rtc>
1393 <rb>☘</rb><rtc><rt>Shamrock</rt></rtc><rtc lang="fr"><rt>Trèfle</rt></rtc>
1394 <rb>✶</rb><rtc><rt>Star</rt></rtc><rtc lang="fr"><rt>Étoile</rt></rtc>
1399 # The next two test different paths in the sanitizer.
1401 Non-word characters don't terminate tag names (T19663, T42670, T54022)
1403 <blockquote|>a</blockquote>
1405 <b→> doesn't terminate </b→>
1407 <bä> doesn't terminate </bä>
1409 <boo> doesn't terminate </boo>
1411 <s.foo> doesn't terminate </s.foo>
1415 <p><blockquote|>a</blockquote>
1416 </p><p><b→> doesn't terminate </b→>
1417 </p><p><bä> doesn't terminate </bä>
1418 </p><p><boo> doesn't terminate </boo>
1419 </p><p><s.foo> doesn't terminate </s.foo>
1420 </p><p><sub-ID#1>
1425 Non-word characters don't terminate tag names
1427 <blockquote|>a</blockquote>
1429 <b→> doesn't terminate </b→>
1431 <bä> doesn't terminate </bä>
1433 <boo> doesn't terminate </boo>
1435 <s.foo> doesn't terminate </s.foo>
1439 <p><blockquote|>a
1440 </p><p><b→> doesn't terminate </b→>
1441 </p><p><bä> doesn't terminate </bä>
1442 </p><p><boo> doesn't terminate </boo>
1443 </p><p><s.foo> doesn't terminate </s.foo>
1444 </p><p><sub-ID#1>
1449 ### See tests/parser/ParserTestParserHook.php for the <tåg> extension)
1450 ### This checks that HTML5 tags (with non-word characters in the tag
1451 ### name) make it safely through the parser -- the Sanitizer will
1452 ### munge them later, as it should.
1455 Non-word characters are valid in extension tags (T19663)
1466 <pre typeof="mw:Extension/tåg" data-mw='{"name":"tåg","attrs":{},"body":{"extsrc":"tåg"}}' data-parsoid='{}' about="#mwt2"></pre>
1470 Isolated close tags should be treated as literal text (T54760)
1478 <p class="mw-empty-elt">
1479 </p><p><s.foo>s
1484 ### Special characters
1488 Bare pipe character (T54363)
1497 Bare pipe character from a template (T54363)
1506 ### <nowiki> test cases
1510 <nowiki> unordered list
1512 <nowiki>* This is not an unordered list item.</nowiki>
1514 <p>* This is not an unordered list item.
1517 <p><span typeof="mw:Nowiki">* This is not an unordered list item.</span></p>
1523 <nowiki>Lorem ipsum dolor
1531 <p>Lorem ipsum dolor
1540 <p><span typeof="mw:Nowiki">Lorem ipsum dolor
1550 Don't parse <nowiki><span class="error"></nowiki> (T149622)
1552 <nowiki><span class="error"></nowiki>
1554 <p><span class="error">
1557 <p><span typeof="mw:Nowiki"><span class="error"></span></p>
1563 :There is not nowiki.
1564 :There is <nowiki>nowiki</nowiki>.
1566 #There is not nowiki.
1567 #There is <nowiki>nowiki</nowiki>.
1569 *There is not nowiki.
1570 *There is <nowiki>nowiki</nowiki>.
1572 <dl><dd>There is not nowiki.</dd>
1573 <dd>There is nowiki.</dd></dl>
1574 <ol><li>There is not nowiki.</li>
1575 <li>There is nowiki.</li></ol>
1576 <ul><li>There is not nowiki.</li>
1577 <li>There is nowiki.</li></ul>
1580 <dl><dd data-parsoid='{}'>There is not nowiki.</dd>
1581 <dd data-parsoid='{}'>There is <span typeof="mw:Nowiki">nowiki</span>.</dd></dl>
1583 <ol><li data-parsoid='{}'>There is not nowiki.</li>
1584 <li data-parsoid='{}'>There is <span typeof="mw:Nowiki">nowiki</span>.</li></ol>
1586 <ul><li data-parsoid='{}'>There is not nowiki.</li>
1587 <li data-parsoid='{}'>There is <span typeof="mw:Nowiki">nowiki</span>.</li></ul>
1591 Entities inside <nowiki>
1593 <nowiki><</nowiki>
1598 <p><span typeof="mw:Nowiki"><span typeof="mw:Entity" data-parsoid='{"src":"&lt;","srcContent":"<"}'><</span></span></p>
1602 Entities inside template parameters
1609 <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>
1613 Properly escape nowiki when combined with other wiki markup
1617 <p>* </nowiki> tag</p>
1619 <nowiki>*</nowiki> <nowiki></nowiki></nowiki> tag
1623 T93824: Put escaped HTML tags inside nowiki
1627 <p><h2>foo</h2></p>
1629 <nowiki><h2>foo</h2></nowiki>
1633 T71950: 1. Put nowiki as close to cause as possible, even with non-quote escapable chars
1637 <p>This text: L'<a rel="mw:WikiLink" href="./Foo">Foo</a>
1638 This text: L''<a rel="mw:WikiLink" href="./Foo">Foo</a>
1639 This text: L'''<a rel="mw:WikiLink" href="./Foo">Foo</a>''</p>
1641 This text: L'[[Foo]]
1642 This text: L<nowiki>''</nowiki>[[Foo]]
1643 This text: L<nowiki>'''</nowiki>[[Foo]]<nowiki>''</nowiki>
1646 # This test fails because wikitext whitespace is not normalized before comparing.
1648 T71950: 2. Put nowiki as close to cause as possible, after ' :'
1652 <p>This text : L''<a rel="mw:WikiLink" href="./Foo">Foo</a>
1655 This text : L<nowiki>''</nowiki>[[Foo]]
1658 # This test and the next one are html2wt only as they test that incorrect wikitext
1659 # passed in template arguments gets escaped or wrapped in nowikis where required.
1661 T71482: Use {{!}} instead of nowiki for single pipe in template argument
1665 <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>
1666 <span typeof="mw:Transclusion" data-mw="{"parts":[{"template":{"target":{"wt":"echo","href":"./Template:Echo"},"params":{"1":{"wt":"foo|bar |[["}},"i":0}}]}" about="#mwt2"></p>
1668 {{echo|foo{{!}}bar}}
1669 {{echo|<nowiki>foo|bar |[[</nowiki>}}
1673 T53961: Output correct nowikis in template arguments
1677 <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>
1678 <span typeof="mw:Transclusion" data-mw="{"parts":[{"template":{"target":{"wt":"echo","href":"./Template:Echo"},"params":{"1":{"wt":"a }} b"}},"i":0}}]}" about="#mwt2"></span>
1679 <span typeof="mw:Transclusion" data-mw="{"parts":[{"template":{"target":{"wt":"echo","href":"./Template:Echo"},"params":{"1":{"wt":"a [[ b"}},"i":0}}]}" about="#mwt3"></span>
1680 <span typeof="mw:Transclusion" data-mw="{"parts":[{"template":{"target":{"wt":"echo","href":"./Template:Echo"},"params":{"1":{"wt":"a | {{ ]]"}},"i":0}}]}" about="#mwt4"></span>
1681 <span typeof="mw:Transclusion" data-mw="{"parts":[{"template":{"target":{"wt":"echo","href":"./Template:Echo"},"params":{"1":{"wt":"a }"}},"i":0}}]}" about="#mwt5"></span></p>
1684 {{echo|<nowiki>a }} b</nowiki>}}
1685 {{echo|<nowiki>a [[ b</nowiki>}}
1686 {{echo|<nowiki>a | {{ ]]</nowiki>}}
1687 {{echo|a <nowiki>}</nowiki>}}
1691 Cases where "!!" needs nowiki protection
1696 <tr><th>this needs protection !! here</th></tr>
1700 <tr><th>this does not need
1701 protection !! here</th></tr>
1705 !<nowiki>this needs protection !! here</nowiki>
1718 Comments and Indent-Pre
1720 <!-- comment 1 --> asdf
1722 <!-- comment 1 --> asdf
1725 <!-- comment 1 --> asdf
1726 <!-- comment 2 -->xyz
1728 <!-- comment 1 --> asdf
1729 <!-- comment 2 --> xyz
1785 asdf<!-- comment 1 -->jkl
1795 <!-- foo --> b <!-- bar -->
1809 <!-- returns a single newline, not nothing, since the newline after > is not stripped -->
1815 Comment semantics and delimiters
1817 <!-- --><!----><!-----><!------>
1821 <!-- --><!----><!-----><!------>
1825 Comment semantics and delimiters, redux
1827 <!-- In SGML every "foo" here would actually show up in the text -- foo -- bar
1828 -- foo -- funky huh? ... -->
1832 <!-- In SGML every "foo" here would actually show up in the text -- foo -- bar
1833 -- foo -- funky huh? ... -->
1837 Comment semantics and delimiters: directors cut
1839 <!-- ... However we like to keep things simple and somewhat XML-ish so we eat
1840 everything starting with < followed by !-- until the first -- and > we see,
1841 that wouldn't be valid XML however, since in XML -- has to terminate a comment
1847 <!-- ... However we like to keep things simple and somewhat XML-ish so we eat
1848 everything starting with < followed by !-- until the first -- and > we see,
1849 that wouldn't be valid XML however, since in XML -- has to terminate a comment
1854 Comment semantics: nesting
1856 <!--<!-- no, we're not going to do anything fancy here -->-->
1861 <!--<!-- no, we're not going to do anything fancy here --><p>--></p>
1864 # Parsoid closes the unclosed comment, even if it means a slight
1867 Comment semantics: unclosed comment at end
1869 parsoid=wt2html,html2html
1871 <!--This comment will run out to the end of the document
1875 <!--This comment will run out to the end of the document-->
1879 Comment semantics: normalize comments to play nice with XML and browsers
1881 <!-- Browsers --!> think this is closed -->
1882 <!--> This would normally be text -->
1883 <!---> As would this -->
1884 <!-- XML doesn't like trailing dashes -------->
1885 <!-- Nor doubled hyphens -- anywhere in the data -->
1886 But this is not a comment.
1888 <p>But this is not a comment.
1891 <!-- Browsers --!> think this is closed -->
1892 <!--> This would normally be text -->
1893 <!---> As would this -->
1894 <!-- XML doesn't like trailing dashes -------->
1895 <!-- Nor doubled hyphens -- anywhere in the data -->
1896 <p>But this is not a comment.</p>
1900 Comment semantics: round-trip even text which contains encoded -->
1902 <!-- hello & goodbye - > --> --&gt; --&xx -->
1904 <!-- hello & goodbye - > --> --&gt; --&xx -->
1908 Comment in template title
1917 Comment on its own line post-expand
1929 Comment on its own line post-expand with non-significant whitespace
1941 post-expand include size being exceeded
1945 {{echo3|1234567890}}
1947 <p><a href="/wiki/Template:Echo3" title="Template:Echo3">Template:Echo3</a><!-- WARNING: template omitted, post-expand include size too large -->
1952 max template depth being reached
1956 {{echo with depth|too deep!}}
1958 <p><span class="error">Template recursion depth limit exceeded (1)</span>
1963 multiple templates that are redirects
1974 Multiple comments should still parse as SOL-transparent
1976 parsoid=wt2html,wt2wt
1979 <!--c2--><!--c3--><!--c4-->*b
1988 <!--c2--><!--c3--><!--c4-->
1994 ## Make sure ">" gets escaped in comments to avoid XSS
1996 IE conditional comments
1999 <script>alert('hi');</script>
2002 <!--[if lt IE 9]>
2003 <script>alert('hi');</script>
2008 ### paragraph wrapping tests
2024 Block tag on one line (<div>)
2034 <p>a </p><div>foo</div>
2040 No p-wrappable content
2042 parsoid=wt2html,html2html
2044 <span><div>x</div></span>
2045 <span><s><div>x</div></s></span>
2046 <small><em></em></small><span><s><div>x</div></s></span>
2048 <span><div>x</div></span>
2049 <span><s><div>x</div></s></span>
2050 <p><small><em></em></small></p><span><s><div>x</div></s></span>
2053 # T177612: Parsoid-only test
2055 Transclusion meta tags shouldn't trip Parsoid's useless p-wrapper stripping code
2057 {{echo|<span><div>x</div></span>}}
2060 <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>
2065 Block tag on one line (<blockquote>)
2067 a <blockquote>foo</blockquote>
2071 a <blockquote>foo</blockquote>
2075 <p>a </p><blockquote><p>foo</p></blockquote>
2081 Block tag on both lines (<div>)
2091 <p>a </p><div>foo</div><p>
2092 b </p><div>foo</div>
2096 Block tag on both lines (<blockquote>)
2098 a <blockquote>foo</blockquote>
2100 b <blockquote>foo</blockquote>
2102 a <blockquote>foo</blockquote>
2103 b <blockquote>foo</blockquote>
2106 <p>a </p><blockquote><p>foo</p></blockquote><p>
2107 b </p><blockquote><p>foo</p></blockquote>
2111 Multiple lines without block tags
2132 x </p><div>foo</div><p> z
2137 Empty lines between lines with block tags
2172 </p><div>b</div><p>d
2177 <div data-parsoid='{"stx":"html"}'></div>
2180 <div data-parsoid='{"stx":"html"}'></div><p>a</p>
2183 <div data-parsoid='{"stx":"html"}'>a</div><p>b</p>
2185 <div data-parsoid='{"stx":"html"}'>b</div><p>d</p>
2188 <div data-parsoid='{"stx":"html"}'>e</div>
2192 Unclosed HTML p-tags should be handled properly
2199 <div><p>foo</p></div>
2204 <div data-parsoid='{"stx":"html"}'><p data-parsoid='{"stx":"html", "autoInsertedEnd":true}'>foo</p></div>
2209 ## SSS FIXME: I can come up with other scenarios where this doesn't work because
2210 ## of eager output of buffered tokens in the p-wrapper. But, I'm going to ignore
2213 1. P-wrapping should leave sol-transparent tags outside p-tags where possible
2217 a [[Category:A1]] [[Category:A2]]
2222 <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"/>
2226 2. P-wrapping should leave sol-transparent tags outside p-tags where possible
2232 <link rel="mw:PageProp/Category" href="./Category:A1"/><p>a</p>
2236 No paragraph necessary for SOL transparent template
2238 <span><div>foo</div></span>
2241 <span><div>foo</div></span>
2242 {{echo|[[Category:Foo]]}}
2244 <span><div>foo</div></span>
2245 <span><div>foo</div></span>
2248 <span data-parsoid='{"stx":"html"}'><div data-parsoid='{"stx":"html"}'>foo</div></span>
2249 <link rel="mw:PageProp/Category" href="./Category:Foo"/>
2251 <span data-parsoid='{"stx":"html"}'><div data-parsoid='{"stx":"html"}'>foo</div></span>
2252 <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}}]}'/>
2256 Avoid expanding multiline sol transparent template ranges unnecessarily
2274 <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">
2277 <link rel="mw:PageProp/Category" href="./Category:Ho" />
2281 Paragraph wrapping following unclosed table
2283 parsoid=wt2html,html2html
2304 </td></tr></tbody></table>
2310 <table data-parsoid='{"autoInsertedEnd":true}'>
2311 <tbody><tr class="mw-empty-elt" data-parsoid='{"startTagSrc":"|-"}'></tr>
2313 </tbody></table><table>
2314 <tbody><tr data-parsoid='{"autoInsertedStart":true}'><td>x</td></tr>
2325 Paragraph wrapping suppressed in html p
2327 parsoid=wt2html,html2html
2347 <p data-parsoid='{"stx":"html"}'>
2358 Dangling table row doesn't prevent p-wrapping
2360 parsoid=wt2html,html2html
2368 <tbody><tr><td>hi</td></tr>
2369 <tr class="mw-empty-elt"></tr>
2370 </tbody></table><p> ho</p>
2374 P-wrapping non-breaking spaces
2385 ### Preformatted text
2395 And a [[Main Page|link]]
2401 And a <a href="/wiki/Main_Page" title="Main Page">link</a>
2406 Tabs don't trigger preformatted text
2410 This is preformatted text.
2416 <pre>This is preformatted text.
2421 preformatted text.</p>
2422 <pre>This is preformatted text.
2427 Space before tab needs nowiki pre protection
2433 <nowiki> </nowiki> a
2437 Ident preformatting with inline content
2448 <pre> with <nowiki> inside (compatibility with 1.6 and earlier)
2465 Regression with preformatted in <center>
2479 T54763: Preformatted in <blockquote>
2485 indented cell (no pre-wrapping!)
2495 <p> indented cell (no pre-wrapping!)
2503 T53086: Double newlines in blockquotes should be turned into paragraphs
2520 T17491: <ins>/<del> in blockquote
2523 Foo <del>bar</del> <ins>baz</ins> quux
2527 <p>Foo <del>bar</del> <ins>baz</ins> quux
2533 <p>Foo <del>bar</del> <ins>baz</ins> quux
2539 T17491: <ins>/<del> in blockquote (2)
2541 <blockquote>Foo <del>bar</del> <ins>baz</ins> quux
2544 <blockquote>Foo <del>bar</del> <ins>baz</ins> quux
2548 <blockquote><p>Foo <del>bar</del> <ins>baz</ins> quux
2553 <pre> with attributes (T5202)
2555 <pre style="background: blue; color:white">Bluescreen of WikiDeath</pre>
2557 <pre style="background: blue; color:white">Bluescreen of WikiDeath</pre>
2562 <pre> with width attribute (T5202)
2564 <pre width="8">Narrow screen goodies</pre>
2566 <pre width="8">Narrow screen goodies</pre>
2571 <pre> with forbidden attribute (T5202)
2573 <pre width="8" onmouseover="alert(document.cookie)">Narrow screen goodies</pre>
2575 <pre width="8">Narrow screen goodies</pre>
2580 Entities inside <pre>
2589 <pre> with forbidden attribute values (T5202)
2591 <pre width="8" style="border-width: expression(alert(document.cookie))">Narrow screen goodies</pre>
2593 <pre width="8" style="/* insecure input */">Narrow screen goodies</pre>
2598 <nowiki> inside <pre> (T15238)
2606 <pre><nowiki><nowiki></nowiki>Foo<nowiki></nowiki></nowiki></pre>
2614 <pre><nowiki>Foo</nowiki></pre>
2619 <nowiki> inside of #tag:pre
2621 {{#tag:pre|Foo <nowiki>→bar</nowiki>}}
2623 <pre>Foo →bar</pre>
2626 <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>
2629 ## Don't expect this to rt, Parsoid drops the unmatched closing pre tags that
2630 ## aren't enclosed in nowikis.
2632 <nowiki> and <pre> preference (first one wins)
2663 <pre typeof="mw:Extension/pre" about="#mwt2" data-mw='{"name":"pre","attrs":{},"body":{"extsrc":"\n<nowiki>\n"}}'><nowiki>
2668 <p><span typeof="mw:Nowiki">
2676 </pre> inside nowiki
2678 <nowiki></pre></nowiki>
2685 Empty pre; pre inside other HTML tags (T56946)
2702 <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
2704 <pre typeof="mw:Extension/pre" about="#mwt4" data-parsoid='{"stx":"html"}' data-mw='{"name":"pre","attrs":{},"body":{"extsrc":""}}'></pre>
2708 HTML pre followed by indent-pre
2721 <p><pre>foo</pre></p>
2723 <p class="mw-empty-elt"></p><pre>foo</pre><p class="mw-empty-elt"></p>
2725 <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>
2729 Templates: Indent-Pre: 1a. Templates that break a line should suppress <pre>
2737 Templates: Indent-Pre: 1b. Templates that break a line should suppress <pre>
2747 Templates: Indent-Pre: 1c: Wrapping should be based on expanded content
2759 Templates: Indent-Pre: 1d: Wrapping should be based on expanded content
2780 Templates: Indent-Pre: 1e. Wrapping should be based on expanded content
2784 {{echo| foo}}{{echo| bar}}
2789 {{echo|<!--cmt--> foo}}
2791 <!--cmt-->{{echo| foo}}
2793 {{echo|{{echo| }}bar}}
2811 Templates: Indent-Pre: 1f: Wrapping should be based on expanded content
2847 ## Hmm, should Parsoid rt this?
2849 Pres with newline attributes
2851 parsoid=wt2html,html2html
2856 <pre class="one two">hi</pre>
2859 <pre class="one two" typeof="mw:Extension/pre" about="#mwt2" data-mw='{"name":"pre","attrs":{"class":"one two"},"body":{"extsrc":"hi"}}'>hi</pre>
2863 Things that look like <pre> tags aren't treated as such
2865 Barack Obama <President> of the United States
2866 <President></President>
2868 <p>Barack Obama <President> of the United States
2869 <President></President>
2873 ## Remex doesn't account for fostered content.
2874 ## The difference between Parsoid and the PHP parser can be attributed to core
2875 ## commit 674e8388cba and 710618f89af in Parsoid's repo. Parsoid doesn't
2876 ## tokenize unmatched extension tags that shadow html tags as strings to ease
2877 ## an escaping mechanism. See the comment in `maybeExtensionTag`.
2879 Handle broken pre-like tags (T66025)
2883 {{echo|<pre <pre>x</pre>}}
2885 <table><pre </table>
2888 <table><pre </table>
2892 <pre <table></table>
2894 <pre typeof="mw:Extension/pre mw:Transclusion" about="#mwt2" data-parsoid='{"stx":"html","a":{"<pre":null},"sa":{"<pre":""},"pi":[[{"k":"1"}]]}' data-mw='{"parts":[{"template":{"target":{"wt":"echo","href":"./Template:Echo"},"params":{"1":{"wt":"<pre <pre>x</pre>"}},"i":0}}]}'>x</pre>
2896 <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>
2899 ## Similar to the above, but shows the difference between extension and html tags
2901 Less than in attribute position
2908 <div </p><div>123</div>
2910 <pre typeof="mw:Extension/pre" about="#mwt2" data-mw='{"name":"pre","attrs":{"<pre":""},"body":{"extsrc":"123"}}'>123</pre><p>
2912 <div </p><div>123</div>
2916 Parsoid: handle pre with space after attribute
2920 <pre style="width:50%;" >{{echo|foo}}</pre>
2922 <pre style="width:50%;">{{echo|foo}}</pre>
2925 <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>
2936 <pre typeof="mw:Extension/pre" about="#mwt2" data-mw='{"name":"pre","attrs":{}}'></pre>
2940 Newline before table-close generates empty table row: T208619
2948 <tbody><tr><td></td></tr></tbody></table>
2950 <table data-parsoid='{}'>
2955 # PHP has one more row in the output than Parsoid does: T208619
2957 Parsoid: Don't paragraph-wrap fosterable content even if table syntax is unbalanced
2977 </tr><tr><td></td></tr></tbody></table>
2994 #--------------------------------------------------------------------
2995 # Transclusion parameter whitespace stripping tests
2996 # Behavior is different for positional and named parameters
2997 #--------------------------------------------------------------------
2999 Templates: Strip leading and trailing whitespace from named-param values
3003 {{echo|1= {{echo|b}} }}
3021 Templates: Don't strip whitespace from positional-param values
3025 {{echo|{{echo|b}} }}
3065 Templates: Don't recognize targets split by newlines
3081 Templates: Recognize targets when newlines and comments don't split the target
3086 <!--X--> ech<!--X-->o<!--X-->
3094 <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>
3098 Templates: Handle empty comment-and-ws-only lines correctly
3101 <!--should be ignored-->
3102 <!--should be ignored as well-->
3109 <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>
3113 Templates: Handle comments in the target
3116 <!-- should be ignored -->
3120 <!-- should be ignored and spaces on next line should not trip us up (T147742) -->
3123 {{echo<!-- should be ignored -->
3126 {{echo<!-- should be ignored -->|foo}}
3128 {{<!-- should be ignored -->echo|foo}}
3137 <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>
3139 <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>
3141 <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>
3143 <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>
3145 <p typeof="mw:Transclusion" data-mw='{"parts":[{"template":{"target":{"wt":"echo","href":"./Template:Echo"},"params":{"1":{"wt":"foo"}},"i":0}}]}'>foo</p>
3149 Templates: Handle comments in parameter names (T69657)
3152 <!-- should be ignored -->
3156 <!-- should be ignored -->
3159 {{echo|1<!-- should be ignored -->=foo}}
3161 {{echo|<!-- should be ignored -->1=foo}}
3169 <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>
3171 <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>
3173 <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>
3175 <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>
3179 Templates: Other wikitext in parameter names (T69657)
3186 <p typeof="mw:Transclusion" data-mw='{"parts":[{"template":{"target":{"wt":"echo","href":"./Template:Echo"},"params":{"''1''":{"wt":"foo"}},"i":0}}]}'>{{{1}}}</p>
3190 Templates: With colons
3194 <p>Template with colon
3197 <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>
3200 #--------------------------------------------------------------------
3201 # Transclusion parameter escaping tests
3202 #--------------------------------------------------------------------
3205 Templates: Parsoid parameter escaping test 1
3207 {{echo|[foo]|{{echo|[bar]}}}}
3212 <p about="#mwt1" typeof="mw:Transclusion"
3213 data-mw='{"parts":[{"template":{"target":{"wt":"echo","href":"./Template:Echo"},"params":{"1":{"wt":"[foo]"},"2":{"wt":"{{echo|[bar]}}"}},"i":0}}]}'>[foo]</p>
3217 Parsoid: Pipes in external links in template parameter
3219 {{echo|[{{echo|http://example.com}} link]}}
3221 <p><a rel="nofollow" class="external text" href="http://example.com">link</a>
3224 <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>
3228 Parsoid: pipe in transclusion parameter
3230 {{echo|http://foo.com/a|b}}
3232 <p><a rel="nofollow" class="external free" href="http://foo.com/a%7Cb">http://foo.com/a%7Cb</a>
3235 <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>
3239 Parsoid: Pipe in external link target and content in template parameter
3241 parsoid=html2wt,wt2wt
3243 {{echo|[http://foo.com/a|b a|b]}}
3245 <p><a rel="nofollow" class="external text" href="http://foo.com/a%7Cb">a|b</a>
3248 <p><a rel="mw:ExtLink" href="http://foo.com/a|b" about="#mwt1"
3249 typeof="mw:Transclusion"
3250 data-mw='{"parts":[{"template":{"target":{"wt":"echo","href":"./Template:Echo"},
3251 "params":{"1":{"wt":"[http://foo.com/a|b a|b]"}},"i":0}}]}'>a|b</a></p>
3255 Parsoid: Pipe in template with nested template in external link target in template parameter (seriously)
3257 {{echo|[{{fullurl:{{FULLPAGENAME}}|action=edit}} bar]}}
3259 <p><a rel="nofollow" class="external text" href="http://example.org/index.php?title=Parser_test&action=edit">bar</a>
3262 <p><a rel="mw:ExtLink" class="external text" href="http://example.org/index.php?title=Parser_test&action=edit" typeof="mw:Transclusion" data-mw='{"parts":[{"template":{"target":{"wt":"echo","href":"./Template:Echo"},"params":{"1":{"wt":"[{{fullurl:{{FULLPAGENAME}}|action=edit}} bar]"}},"i":0}}]}'>bar</a></p>
3266 Templates: Don't escape already nowiki-escaped text in template parameters
3268 parsoid=html2wt,wt2wt
3270 {{echo|foo<nowiki>|</nowiki>bar}}
3271 {{echo|<nowiki><div></nowiki>}}
3272 {{echo|<nowiki></nowiki>}}
3279 <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>
3280 <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>
3281 <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>
3287 Templates: '=' char in nested transclusions should not trigger nowiki escapes or conversion to named param
3289 parsoid=html2wt,wt2wt
3291 {{echo|{{echo|1=bar}}}}
3296 <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>
3301 Templates parameters with special tokenizing behavior dont get modified because of arg escaping
3308 <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>
3313 Templates: Preserve blank parameter names
3320 <p about="#mwt1" typeof="mw:Transclusion" data-mw='{"parts":[{"template":{"target":{"wt":"echo","href":"./Template:Echo"},"params":{"":{"wt":"foo"}},"i":0}}]}'>{{{1}}}</p>
3324 Templates: Preserve blank parameter names in other positions
3326 {{blank_param|bar|=foo}}
3332 <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
3337 ### Parsoid-centric tests for testing RT edge cases for pre
3341 1a. Indent-Pre and Comments
3354 1b. Indent-Pre and Comments
3367 1c. Indent-Pre and Comments
3380 1d. Indent-Pre and Comments
3381 (Pre-handler currently cannot distinguish between comment/ws order and normalizes them to [comment,ws] order)
3394 2a. Indent-Pre and tables
3415 2b. Indent-Pre and tables
3431 2c. Indent-Pre and tables (T44252)
3448 2d. Indent-Pre and tables
3465 <tbody><tr><td> b</td></tr>
3470 2e. Indent-Pre and table-line syntax
3483 2f. Indent-pre started by table-line syntax
3502 2g. Indented table markup mixed with indented pre content (proposed in T8200)
3507 Text that should be rendered preformatted
3515 <pre>Text that should be rendered preformatted
3524 2h. Indent pre in tables
3526 parsoid=wt2html,html2html
3569 </td><td data-parsoid='{"startTagSrc":"{{!}}"}'>
3571 </td></tr></tbody></table>
3575 3a. Indent-Pre and block tags (single-line html)
3579 c <blockquote> foo </blockquote>
3584 c <blockquote> foo </blockquote>
3585 <pre><span> foo </span>
3588 <p> a </p><p> foo </p><p>
3589 b </p><div> foo </div><p>
3590 c </p><blockquote><p> foo </p></blockquote>
3591 <pre><span> foo </span>
3594 <p> a </p><p data-parsoid='{"stx":"html"}'> foo </p><p>
3595 b </p><div data-parsoid='{"stx":"html"}'> foo </div><p>
3596 c </p><blockquote data-parsoid='{"stx":"html"}'><p> foo </p></blockquote>
3597 <pre><span data-parsoid='{"stx":"html"}'> foo </span></pre>
3601 3b. Indent-Pre and block tags (multi-line html)
3604 <!-- comment --> b <div> foo </div>
3606 <pre>a <span>foo</span>
3611 <pre>a <span data-parsoid='{"stx":"html"}'>foo</span></pre>
3612 <!-- comment --> <p>b </p><div data-parsoid='{"stx":"html"}'> foo </div>
3614 <pre>a <span>foo</span>
3616 b </p><div> foo </div>
3620 3c. Indent-Pre and block tags (pre-content on separate line)
3682 <p data-parsoid='{"stx":"html"}'>
3699 <pre typeof="mw:Extension/pre" about="#mwt3" data-mw='{"name":"pre","attrs":{},"body":{"extsrc":"\nfoo\n"}}'>foo
3703 <table data-parsoid='{"stx":"html"}'><tbody><tr data-parsoid='{"stx":"html"}'><td data-parsoid='{"stx":"html"}'>
3705 </td></tr></tbody></table>
3707 <ul data-parsoid='{"stx":"html"}'><li data-parsoid='{"stx":"html"}'>
3713 4. Indent-Pre and extension tags
3715 parsoid=wt2html,html2html
3724 <p> a </p><pre typeof="mw:Extension/tag" about="#mwt2" data-mw='{"name":"tag","attrs":{}}'></pre>
3728 5. Indent-Pre and html pre
3730 <pre class="123">hi</pre>
3732 <pre class="123">hi</pre>
3735 <pre class="123" typeof="mw:Extension/pre" about="#mwt2" data-mw='{"name":"pre","attrs":{"class":"123"},"body":{"extsrc":"hi"}}'>hi</pre>
3739 Render paragraphs when indent-pre is suppressed in blocklevels
3756 4. Multiple spaces at start-of-line
3774 ## NOTE: the leading white-space chars on empty line are significant
3776 5a. White-space in indent-pre
3788 ## NOTE: the leading white-space chars on empty line are significant
3790 5b. White-space in indent-pre
3809 5c. White-space in indent-pre
3822 6. Pre-blocks should extend across lines with leading WS even when there is no wrappable content
3845 7a. Indent-pre and category links
3847 parsoid=wt2html,wt2wt
3849 [[Category:foo]] <!-- No pre-wrapping -->
3850 {{echo| [[Category:foo]]}} <!-- No pre-wrapping -->
3853 <link rel="mw:PageProp/Category" href="./Category:Foo"> <!-- No pre-wrapping -->
3854 <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 -->
3857 ## We used to, but no longer wt2wt this test since the default serializer
3858 ## will normalize all categories to serialize on their own line.
3859 ## This wikitext usage is going to be fairly uncommon in production and
3860 ## selser will take care of preserving formatting in those scenarios.
3862 7b. Indent-pre and category links
3867 [[Category:foo]] {{echo|b}}
3869 <pre><link rel="mw:PageProp/Category" href="./Category:Foo"> a
3870 <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>
3874 Indent-Pre: Newlines in comments shouldn't affect sol state
3889 ### HTML-pre (some to spec PHP parser behavior and some Parsoid-RT-centric)
3893 HTML-pre: 1. embedded newlines
3925 <pre typeof="mw:Extension/pre" about="#mwt2" data-mw='{"name":"pre","attrs":{},"body":{"extsrc":"foo"}}'>foo</pre>
3927 <pre typeof="mw:Extension/pre" about="#mwt4" data-mw='{"name":"pre","attrs":{},"body":{"extsrc":"\nfoo\n"}}'>foo
3930 <pre typeof="mw:Extension/pre" about="#mwt6" data-mw='{"name":"pre","attrs":{},"body":{"extsrc":"\n\nfoo\n"}}'>
3935 <pre typeof="mw:Extension/pre" about="#mwt8" data-mw='{"name":"pre","attrs":{},"body":{"extsrc":"\n\n\nfoo\n"}}'>
3943 HTML-pre: big spaces
3979 <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"}}'>
3998 HTML-pre: 2: indented text
4011 HTML-pre: 3: other wikitext
4030 <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
4039 ### Definition lists
4047 <dd>Definition</dd></dl>
4052 Definition list for indentation only
4056 <dl><dd>Indented text</dd></dl>
4061 Definition list with no space
4066 <dd>Definition</dd></dl>
4071 Definition list with URL link
4073 ;http://example.com/ :definition
4075 <dl><dt><a rel="nofollow" class="external free" href="http://example.com/">http://example.com/</a></dt>
4076 <dd>definition</dd></dl>
4081 Definition list with bracketed URL link
4083 ;[http://www.example.com/ Example]:Something about it
4085 <dl><dt><a rel="nofollow" class="external text" href="http://www.example.com/">Example</a></dt>
4086 <dd>Something about it</dd></dl>
4091 Definition list with wikilink containing colon
4093 ;[[Help:FAQ]]:The least-read page on Wikipedia
4095 <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>
4096 <dd>The least-read page on Wikipedia</dd></dl>
4100 # At Brion's and JeLuF's insistence... :)
4102 Definition list with news link containing colon
4104 ;news:alt.wikipedia.rox :This isn't even a real newsgroup!
4106 <dl><dt><a rel="nofollow" class="external free" href="news:alt.wikipedia.rox">news:alt.wikipedia.rox</a></dt>
4107 <dd>This isn't even a real newsgroup!</dd></dl>
4110 <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>
4114 Malformed definition list with colon
4116 ;news:alt.wikipedia.rox -- don't crash or enter an infinite loop
4118 <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>
4123 Definition lists: colon in external link text
4125 ;[http://www.wikipedia2.org/ Wikipedia :The Next Generation] :OK, I made that up
4127 <dl><dt><a rel="nofollow" class="external text" href="http://www.wikipedia2.org/">Wikipedia :The Next Generation</a></dt>
4128 <dd>OK, I made that up</dd></dl>
4133 Definition lists: colon in HTML attribute
4135 ;<b style="display: inline">bold</b>
4137 <dl><dt><b style="display: inline">bold</b></dt></dl>
4142 Definition lists: self-closed tag
4144 ;one<br/>two :two-line fun
4146 <dl><dt>one<br />two</dt>
4147 <dd>two-line fun</dd></dl>
4152 Definition lists: ignore colons inside tags
4154 ;one <b>two : tag <i>fun:</i>:</b>:def
4156 <dl><dt>one <b>two : tag <i>fun:</i>:</b></dt>
4162 Definition lists: excess closed tags
4164 ;one</b>two :bad tag fun
4167 <dd>bad tag fun</dd></dl>
4171 <dd>bad tag fun</dd>
4176 T13748: Literal closing tags
4180 <dd>test test test test test</dd>
4182 <dd>test test test test test</dd>
4187 <dd>test test test test test</dd>
4189 <dd>test test test test test</dd>
4195 Definition and unordered list using wiki syntax nested in unordered list using html tags.
4204 <dd>description</dd></dl>
4205 <ul><li>unordered</li></ul>
4211 Definition list with empty definition and following paragraph
4224 Nested definition lists using html syntax
4237 Definition Lists: No nesting: Multiple dd's
4250 Definition Lists: Indentation: Regular
4258 <dl><dd>i3</dd></dl></dd></dl></dd></dl>
4263 Definition Lists: Indentation: Missing 1st level
4269 <dl><dd>i3</dd></dl></dd></dl></dd></dl>
4274 Definition Lists: Indentation: Multi-level indent
4278 <dl><dd><dl><dd><dl><dd>i3</dd></dl></dd></dl></dd></dl>
4283 Definition Lists: Hacky use to indent tables
4290 should be left alone
4292 <dl><dd><dl><dd><table>
4297 </td></tr></table></dd></dl></dd></dl>
4299 should be left alone
4304 Definition Lists: Hacky use to indent tables (with content following table)
4309 |} <!--c1--> this text should be part of the dl
4316 </td></tr></tbody></table> this text should be part of the dl</dd></dl>
4323 </td></tr></tbody></table> <!--c1--> this text should be part of the dl</dd></dl>
4327 Definition Lists: Hacky use to indent tables, with comments (T65979)
4335 should be left alone
4338 <dl><dd><dl><dd><table><tr>
4341 </tr></table><!-- bar --></dd></dl></dd></dl>
4343 should be left alone</p>
4347 Definition Lists: Hacky use to indent tables, with comment before table
4355 <dl><dd><dl><dd><!-- foo --><table><tr>
4357 </tr></table></dd></dl></dd></dl>
4360 # The trailing whitespace in this test is to catch a regression in
4361 # Parsoid after T54473.
4363 Definition Lists: Hacky use to indent tables (WS-insensitive)
4372 </td></tr></table></dd></dl>
4376 <tbody><tr><td>a</td></tr>
4377 </tbody></table></dd></dl>
4380 ## The PHP parser treats : items (dd) without a corresponding ; item (dt)
4381 ## as an empty dt item. It also ignores all but the last ";" when followed
4382 ## by ":" later on. So, ";" are not ignored in ";;;t3" but are ignored in
4383 ## ";;;t3 :d1". So, PHP parser behavior is a little inconsistent wrt multiple
4386 ## Ex: ";;t2 ::d2" is transformed into:
4398 ## But, Parsoid treats "; :" as a tight atomic unit and excess ":" as plain text
4399 ## So, the same wikitext above (;;t2 ::d2) is transformed into:
4410 ## All Parsoid only definition list tests have this difference.
4412 ## See also: https://phabricator.wikimedia.org/T8569
4413 ## and https://lists.wikimedia.org/pipermail/wikitext-l/2011-November/000483.html
4416 Table / list interaction: indented table with lists in table contents
4438 </td></tr></table></dd></dl>
4443 Table / list interaction: lists nested in tables nested in indented lists
4466 </td></tr></table></dd></dl>
4473 Definition Lists: Nesting: Multi-level (Parsoid only)
4501 Definition Lists: Nesting: Test 2
4508 <dl><dd>d2</dd></dl></dd></dl>
4513 Definition Lists: Nesting: Test 3
4518 <dl><dd><dl><dt>t1</dt>
4520 <dl><dd><dl><dd>d2</dd></dl></dd></dl></dd></dl></dd></dl>
4525 Definition Lists: Nesting: Test 4
4530 <dl><dd><dl><dd><dl><dt>t3</dt>
4531 <dd>d3</dd></dl></dd></dl></dd></dl>
4536 ## The Parsoid team believes the following three test exposes a
4537 ## bug in the PHP parser. (Parsoid team thinks the PHP parser is
4538 ## wrong to close the <dl> after the <dt> containing the <ul>.)
4539 ## It also exposes a "misfeature" in tidy, which doesn't like
4540 ## <dl> tags with a single <dt> child; it converts the <dt> into
4541 ## a <dd> in that case. (Parsoid leaves the <dt> alone!)
4543 Definition Lists: Mixed Lists: Test 1
4549 <dl><dd><dl><dt><ul><li>foo</li>
4550 <li>bar</li></ul></dt></dl>
4551 <dl><dt>baz</dt></dl></dd></dl>
4554 <dl><dd><dl><dt><ul><li>foo</li>
4555 <li>bar</li></ul></dt></dl>
4556 <dl><dt>baz</dt></dl></dd></dl>
4574 Definition Lists: Mixed Lists: Test 2
4579 <ul><li><dl><dd>d1</dd>
4580 <dd>d2</dd></dl></li></ul>
4586 Definition Lists: Mixed Lists: Test 3
4591 <ul><li><dl><dd><dl><dd><dl><dd>d1</dd>
4592 <dd>d2</dd></dl></dd></dl></dd></dl></li></ul>
4598 Definition Lists: Mixed Lists: Test 4
4603 <ul><li><dl><dt>d1</dt>
4606 <dd>d4</dd></dl></li></ul>
4612 Definition Lists: Mixed Lists: Test 5
4618 <dl><dd>d2</dd></dl></dd></dl></li></ul>
4624 Definition Lists: Mixed Lists: Test 6
4629 <ol><li><ul><li><dl><dd>d1
4630 <dl><dd><dl><dd>d3</dd></dl></dd></dl></dd></dl></li></ul></li></ol>
4636 Definition Lists: Mixed Lists: Test 7
4641 <dl><dd><ul><li>d1</li>
4642 <li>d2</li></ul></dd></dl>
4648 Definition Lists: Mixed Lists: Test 8
4653 <dl><dd><ul><li>d1</li></ul>
4654 <dl><dd><ul><li>d2</li></ul></dd></dl></dd></dl>
4660 Definition Lists: Mixed Lists: Test 9
4664 <ul><li><dl><dt>foo</dt>
4665 <dd>bar</dd></dl></li></ul>
4671 Definition Lists: Mixed Lists: Test 10
4675 <ul><li><ol><li><dl><dt>foo</dt>
4676 <dd>bar</dd></dl></li></ol></li></ul>
4680 # The Parsoid team disagrees with the PHP parser's seemingly-random
4681 # rules regarding dd/dt on the next few tests. Parsoid is more
4682 # consistent, and recognizes the shared nesting and keeps the
4683 # still-open tags around until the nesting is complete.
4685 # This is a regression test for T175099
4687 Definition Lists: Mixed Lists: Test 11
4694 <ul><li>b</li></ul></dd></dl>
4698 <dd><ul><li>b</li></ul></dd></dl>
4701 # FIXME: Maybe get rid of this test?
4703 Definition Lists: Mixed Lists: Test 12
4708 <ul><li><ol><li><ul><li><ol><li><dl><dt>foo</dt>
4709 <dd><ul><li><dl><dt><dl><dt>bar</dt></dl></dd></dl></li></ul></dd></dl>
4711 <dd>baz</dd></dl></li></ol></li></ul></li></ol></li></ul>
4714 <ul><li><ol><li><ul><li><ol><li><dl><dt>foo</dt>
4715 <dd><ul><li><dl><dt><dl><dt>bar</dt></dl></dt></dl></li></ul></dd></dl></li></ol></li></ul>
4717 <dd>baz</dd></dl></li></ol></li></ul>
4735 <dd data-parsoid='{"stx":"row"}'>bar</dd>
4740 <dd data-parsoid='{"stx":"row"}'>baz</dd>
4749 Definition Lists: Mixed Lists: Test 13
4754 <ul><li><ol><li><ul><li><ol><li><dl><dt>foo </dt>
4755 <dd><ul><li><dl><dt><dl><dt>bar</dt></dl></dt></dl></li></ul></dd></dl></li></ol></li></ul>
4756 <dl><dt>boo </dt>
4757 <dd>baz</dd></dl></li></ol></li></ul>
4760 # FIXME: Maybe get rid of this test?
4762 # * The test is wrong, there are two colons where there should be :;
4763 # * The PHP parser is wrong to close the <dl> after the <dt> containing the <ul>.
4765 Definition Lists: Weird Ones: Test 1
4767 *#;*::;;foo :bar (who uses this?)
4769 <ul><li><ol><li><dl><dt>foo</dt>
4770 <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>
4788 <dd data-parsoid='{"stx":"row"}'>bar (who uses this?)</dd>
4800 Definition Lists: colons occurring in tags
4817 <dt><span>a:b</span></dt>
4818 <dt><div>a:b</div></dt>
4819 <dt><div>a</div></dt>
4823 <dt><i>a:b</i></dt></dl>
4824 <dl><dt><dl><dt><dl><dt><i>a:b</i></dt></dl></dt></dl></dt></dl>
4826 <dl><dt>a</dt><dd data-parsoid='{"stx":"row"}'>b</dd>
4828 <dt><i data-parsoid='{"stx":"html"}'>a:b</i></dt>
4829 <dt><span data-parsoid='{"stx":"html"}'>a:b</span></dt>
4830 <dt><div data-parsoid='{"stx":"html"}'>a:b</div></dt>
4831 <dt><div data-parsoid='{"stx":"html","autoInsertedEnd":true}'>a</div></dt>
4833 <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>
4834 <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>
4835 <dl><dt><dl><dt><i>a:b</i></dt></dl></dt></dl></dt></dl>
4838 # Parsoid's output differs here again because it shares
4839 # nesting between the two lists unlike the PHP parser.
4840 # Unsure which is more desirable.
4842 Definition Lists: colons and tables 1
4854 </td></tr></table></dd></dl>
4858 </td></tr></table></dd></dl>
4864 </td></tr></table></dd>
4868 </td></tr></table></dd></dl>
4871 # FIXME: Does this need a html/php section?
4873 Definition Lists: template interaction
4875 ::{{definition_list}}
4878 ::{{definition_list}}
4883 <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">
4884 </span><dd about="#mwt1">two</dd></dl></dd></dl>
4886 <dl><dd data-parsoid='{}'>one
4887 <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">
4888 </span><dd about="#mwt2">two
4890 <dd>three</dd></dl></dd>
4891 <dd data-parsoid='{}'>four</dd></dl></dd></dl>
4899 External links: non-bracketed
4901 Non-bracketed: http://example.com
4903 <p>Non-bracketed: <a rel="nofollow" class="external free" href="http://example.com">http://example.com</a>
4907 # parsoid doesn't explicitly mark autonumbered links, see T55505
4909 External links: numbered
4911 Numbered: [http://example.com]
4912 Numbered: [http://example.net]
4913 Numbered: [http://example.com]
4915 <p>Numbered: <a rel="nofollow" class="external autonumber" href="http://example.com">[1]</a>
4916 Numbered: <a rel="nofollow" class="external autonumber" href="http://example.net">[2]</a>
4917 Numbered: <a rel="nofollow" class="external autonumber" href="http://example.com">[3]</a>
4920 <p>Numbered: <a rel="mw:ExtLink" class="external autonumber" href="http://example.com"></a>
4921 Numbered: <a rel="mw:ExtLink" class="external autonumber" href="http://example.net"></a>
4922 Numbered: <a rel="mw:ExtLink" class="external autonumber" href="http://example.com"></a></p>
4926 External links: specified text
4928 Specified text: [http://example.com link]
4930 <p>Specified text: <a rel="nofollow" class="external text" href="http://example.com">link</a>
4935 External links: trail
4937 Linktrails should not work for external links: [http://example.com link]s
4939 <p>Linktrails should not work for external links: <a rel="nofollow" class="external text" href="http://example.com">link</a>s
4944 External links: dollar sign in URL
4946 http://example.com/1$2345
4948 <p><a rel="nofollow" class="external free" href="http://example.com/1$2345">http://example.com/1$2345</a>
4952 # parsoid doesn't explicitly mark autonumbered links, see T55505
4954 External links: dollar sign in URL (autonumber)
4956 [http://example.com/1$2345]
4958 <p><a rel="nofollow" class="external autonumber" href="http://example.com/1$2345">[1]</a>
4961 <p><a rel="mw:ExtLink" class="external autonumber" href="http://example.com/1$2345"></a></p>
4965 External links: open square bracket forbidden in URL (T6377)
4967 parsoid=wt2html,wt2wt,html2html
4969 http://example.com/1[2345
4971 <p><a rel="nofollow" class="external free" href="http://example.com/1">http://example.com/1</a>[2345
4974 <p><a rel="mw:ExtLink" class="external free" href="http://example.com/1">http://example.com/1</a>[2345</p>
4978 External links: open square bracket forbidden in URL (named) (T6377)
4980 parsoid=wt2html,html2html
4982 [http://example.com/1[2345]
4984 <p><a rel="nofollow" class="external text" href="http://example.com/1">[2345</a>
4987 <p><a rel="mw:ExtLink" class="external text" href="http://example.com/1">[2345</a></p>
4990 # parsoid adds a space before the link name
4992 External links: open square bracket forbidden in URL (named) (T6377)
4995 [http://example.com/1 [2345]
4997 <p><a rel="nofollow" class="external text" href="http://example.com/1">[2345</a>
5002 External links: nowiki in URL link text (T8230)
5004 [http://example.com/ <nowiki>''example site''</nowiki>]
5006 <p><a rel="nofollow" class="external text" href="http://example.com/">''example site''</a>
5011 External links: newline forbidden in text (T8230 regression check)
5013 [http://example.com/ first
5016 <p>[<a rel="nofollow" class="external free" href="http://example.com/">http://example.com/</a> first
5022 External links: Pipe char between url and text
5024 [http://example.com | link]
5026 <p><a rel="nofollow" class="external text" href="http://example.com">| link</a>
5031 External links: protocol-relative URL in brackets
5033 [//example.com/ Test]
5035 <p><a rel="nofollow" class="external text" href="//example.com/">Test</a>
5039 # parsoid doesn't explicitly mark autonumbered links, see T55505
5041 External links: protocol-relative URL in brackets without text
5045 <p><a rel="nofollow" class="external autonumber" href="//example.com">[1]</a>
5048 <p><a rel="mw:ExtLink" class="external autonumber" href="//example.com"></a></p>
5052 External links: protocol-relative URL in free text is left alone
5056 <p>//example.com/Foo
5061 External links: protocol-relative URL in the middle of a word is left alone (T32269)
5063 foo//example.com/Foo
5065 <p>foo//example.com/Foo
5069 ## html2wt and html2html will fail because we will prefer the :en: interwiki prefix over wikipedia:
5071 External links: with no contents
5073 parsoid=wt2html,wt2wt
5075 [http://en.wikipedia.org/wiki/Foo]
5077 [[wikipedia:Foo|Bar]]
5079 [[wikipedia:Foo|<span>Bar</span>]]
5081 <p><a rel="nofollow" class="external autonumber" href="http://en.wikipedia.org/wiki/Foo">[1]</a>
5082 </p><p><a href="http://en.wikipedia.org/wiki/Foo" class="extiw" title="wikipedia:Foo">Bar</a>
5083 </p><p><a href="http://en.wikipedia.org/wiki/Foo" class="extiw" title="wikipedia:Foo"><span>Bar</span></a>
5086 <p><a rel="mw:ExtLink" class="external autonumber" href="http://en.wikipedia.org/wiki/Foo"></a></p>
5087 <p><a rel="mw:WikiLink/Interwiki" href="http://en.wikipedia.org/wiki/Foo" title="wikipedia:Foo">Bar</a></p>
5088 <p><a rel="mw:WikiLink/Interwiki" href="http://en.wikipedia.org/wiki/Foo" title="wikipedia:Foo"><span>Bar</span></a></p>
5092 External links: Free with trailing punctuation
5102 http://example.com/url_with_(brackets)
5103 (http://example.com/url_without_brackets)
5104 http://example.com/url_with_entity&
5105 http://example.com/url_with_entity&
5106 http://example.com/url_with_entity&
5107 http://example.com/url_with_entity
5108 http://example.com/url_with_entity 
5109 http://example.com/url_with_entity 
5110 http://example.com/url_with_entity<
5111 http://example.com/url_with_entity<
5112 http://example.com/url_with_entity<
5114 <p><a rel="nofollow" class="external free" href="http://example.com">http://example.com</a>,
5115 <a rel="nofollow" class="external free" href="http://example.com">http://example.com</a>;
5116 <a rel="nofollow" class="external free" href="http://example.com">http://example.com</a>\
5117 <a rel="nofollow" class="external free" href="http://example.com">http://example.com</a>.
5118 <a rel="nofollow" class="external free" href="http://example.com">http://example.com</a>:
5119 <a rel="nofollow" class="external free" href="http://example.com">http://example.com</a>!
5120 <a rel="nofollow" class="external free" href="http://example.com">http://example.com</a>?
5121 <a rel="nofollow" class="external free" href="http://example.com">http://example.com</a>)
5122 <a rel="nofollow" class="external free" href="http://example.com/url_with_(brackets)">http://example.com/url_with_(brackets)</a>
5123 (<a rel="nofollow" class="external free" href="http://example.com/url_without_brackets">http://example.com/url_without_brackets</a>)
5124 <a rel="nofollow" class="external free" href="http://example.com/url_with_entity&">http://example.com/url_with_entity&</a>
5125 <a rel="nofollow" class="external free" href="http://example.com/url_with_entity&">http://example.com/url_with_entity&</a>
5126 <a rel="nofollow" class="external free" href="http://example.com/url_with_entity&">http://example.com/url_with_entity&</a>
5127 <a rel="nofollow" class="external free" href="http://example.com/url_with_entity">http://example.com/url_with_entity</a> 
5128 <a rel="nofollow" class="external free" href="http://example.com/url_with_entity">http://example.com/url_with_entity</a> 
5129 <a rel="nofollow" class="external free" href="http://example.com/url_with_entity">http://example.com/url_with_entity</a> 
5130 <a rel="nofollow" class="external free" href="http://example.com/url_with_entity">http://example.com/url_with_entity</a><
5131 <a rel="nofollow" class="external free" href="http://example.com/url_with_entity">http://example.com/url_with_entity</a><
5132 <a rel="nofollow" class="external free" href="http://example.com/url_with_entity">http://example.com/url_with_entity</a><
5135 <p><a rel="mw:ExtLink" class="external free" href="http://example.com">http://example.com</a>,
5136 <a rel="mw:ExtLink" class="external free" href="http://example.com">http://example.com</a>;
5137 <a rel="mw:ExtLink" class="external free" href="http://example.com">http://example.com</a>\
5138 <a rel="mw:ExtLink" class="external free" href="http://example.com">http://example.com</a>.
5139 <a rel="mw:ExtLink" class="external free" href="http://example.com">http://example.com</a>:
5140 <a rel="mw:ExtLink" class="external free" href="http://example.com">http://example.com</a>!
5141 <a rel="mw:ExtLink" class="external free" href="http://example.com">http://example.com</a>?
5142 <a rel="mw:ExtLink" class="external free" href="http://example.com">http://example.com</a>)
5143 <a rel="mw:ExtLink" class="external free" href="http://example.com/url_with_(brackets)">http://example.com/url_with_(brackets)</a>
5144 (<a rel="mw:ExtLink" class="external free" href="http://example.com/url_without_brackets">http://example.com/url_without_brackets</a>)
5145 <a rel="mw:ExtLink" class="external free" href="http://example.com/url_with_entity&">http://example.com/url_with_entity&</a>
5146 <a rel="mw:ExtLink" class="external free" href="http://example.com/url_with_entity&">http://example.com/url_with_entity&</a>
5147 <a rel="mw:ExtLink" class="external free" href="http://example.com/url_with_entity&">http://example.com/url_with_entity&</a>
5148 <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>
5149 <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>
5150 <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>
5151 <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>
5152 <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>
5153 <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>
5157 External links: tricky Parsoid html2html case
5159 parsoid=wt2html,wt2wt,html2html
5161 http://example.com/url_with_entity&amp;
5163 <p><a rel="nofollow" class="external free" href="http://example.com/url_with_entity&amp">http://example.com/url_with_entity&amp</a>;
5166 <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>
5170 External links: Free with trailing quotes (T113666)
5172 '''News:''' Stuff here
5176 <p><b>News:</b> Stuff here
5177 </p><p><a rel="nofollow" class="external free" href="news:'a'b">news:'a'b</a><i>c</i>d e
5180 <p><b>News:</b> Stuff here</p>
5181 <p><a rel="mw:ExtLink" class="external free" href="news:'a'b">news:'a'b</a><i>c</i>d e</p>
5185 External links: with entity
5187 [http:// www.librarieswithoutborders.org Libraries without borders]
5189 <p><a rel="nofollow" class="external text" href="http://+www.librarieswithoutborders.org">Libraries without borders</a>
5192 <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>
5196 External links: Lone protocols are never linked (T105697)
5215 External links: No preceding word characters allowed (T67278)
5217 NOPEhttp://example.com
5218 N0http://example.com
5219 ok:http://example.com
5220 ok-http://example.com
5222 <p>NOPEhttp://example.com
5223 N0http://example.com
5224 ok:<a rel="nofollow" class="external free" href="http://example.com">http://example.com</a>
5225 ok-<a rel="nofollow" class="external free" href="http://example.com">http://example.com</a>
5230 External links: nofollow domain exception
5232 A [https://no-nofollow.org/foobar link], and another [https://example.org link].
5234 <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>.
5241 External image: http://meta.wikimedia.org/upload/f/f1/Ncwikicol.png
5243 <p>External image: <img src="http://meta.wikimedia.org/upload/f/f1/Ncwikicol.png" alt="Ncwikicol.png"/>
5248 External image from https
5250 External image from https: https://meta.wikimedia.org/upload/f/f1/Ncwikicol.png
5252 <p>External image from https: <img src="https://meta.wikimedia.org/upload/f/f1/Ncwikicol.png" alt="Ncwikicol.png"/>
5257 External image (when not allowed)
5259 wgAllowExternalImages=0
5261 External image: http://meta.wikimedia.org/upload/f/f1/Ncwikicol.png
5263 <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>
5268 Link to non-http image, no img tag
5270 Link to non-http image, no img tag: ftp://example.com/test.jpg
5272 <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>
5277 External links: terminating separator
5279 Terminating separator: http://example.com/thing,
5281 <p>Terminating separator: <a rel="nofollow" class="external free" href="http://example.com/thing">http://example.com/thing</a>,
5286 External links: intervening separator
5288 Intervening separator: http://example.com/1,2,3
5290 <p>Intervening separator: <a rel="nofollow" class="external free" href="http://example.com/1,2,3">http://example.com/1,2,3</a>
5295 External links: old bug with URL in query
5297 Old bug with URL in query: [http://example.com/thing?url=http://example.com link]
5299 <p>Old bug with URL in query: <a rel="nofollow" class="external text" href="http://example.com/thing?url=http://example.com">link</a>
5304 External links: old URL-in-URL bug, mixed protocols
5306 And again with mixed protocols: [ftp://example.com?url=http://example.com link]
5308 <p>And again with mixed protocols: <a rel="nofollow" class="external text" href="ftp://example.com?url=http://example.com">link</a>
5312 # Since Parsoid is starting to emit canonical wikitext for links,
5313 # [http://example.com http://example.com] will not RT back to that
5316 External links: URL in text
5320 URL in text: [http://example.com http://example.com]
5322 <p>URL in text: <a rel="nofollow" class="external text" href="http://example.com">http://example.com</a>
5325 <p>URL in text: <a rel="mw:ExtLink" class="external text" href="http://example.com">http://example.com</a></p>
5329 External links: Clickable images
5331 ja-style clickable images: [http://example.com http://meta.wikimedia.org/upload/f/f1/Ncwikicol.png]
5333 <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>
5336 <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>
5340 External links: raw ampersand
5342 Old & use: http://x&y
5344 <p>Old & use: <a rel="nofollow" class="external free" href="http://x&y">http://x&y</a>
5349 External links: encoded ampersand
5351 Old & use: http://x&y
5353 <p>Old & use: <a rel="nofollow" class="external free" href="http://x&y">http://x&y</a>
5356 <p>Old <span typeof="mw:Entity">&</span> use: <a rel="mw:ExtLink" class="external free" href="http://x&y">http://x&y</a></p>
5360 External links: encoded equals (T8102)
5362 http://example.com/?foo=bar
5364 <p><a rel="nofollow" class="external free" href="http://example.com/?foo=bar">http://example.com/?foo=bar</a>
5367 <p><a rel="mw:ExtLink" class="external free" href="http://example.com/?foo=bar">http://example.com/?foo=bar</a></p>
5371 ## Note that parsoid doesn't explicit mark autonumbered links, nor
5372 ## does it number them. As discussed in T55505, we can identify
5373 ## autonumbered links via CSS.
5377 External links: [raw ampersand]
5379 Old & use: [http://x&y]
5381 <p>Old & use: <a rel="nofollow" class="external autonumber" href="http://x&y">[1]</a>
5384 <p>Old <span typeof="mw:Entity">&</span> use: <a rel="mw:ExtLink" class="external autonumber" href="http://x&y"></a></p>
5387 # note that parsoid html is identical to [raw ampersand] case; so html2wt
5388 # mode will return the [raw ampersand] wikitext
5390 External links: [encoded ampersand]
5392 parsoid=wt2html,wt2wt,html2html
5394 Old & use: [http://x&y]
5396 <p>Old & use: <a rel="nofollow" class="external autonumber" href="http://x&y">[1]</a>
5399 <p>Old <span typeof="mw:Entity">&</span> use: <a rel="mw:ExtLink" class="external autonumber" href="http://x&y"></a></p>
5403 External links: [raw equals]
5405 [http://example.com/?foo=bar]
5407 <p><a rel="nofollow" class="external autonumber" href="http://example.com/?foo=bar">[1]</a>
5410 <p><a rel="mw:ExtLink" class="external autonumber" href="http://example.com/?foo=bar"></a></p>
5413 # note that parsoid html is identical to [raw equals] case; so html2wt
5414 # mode will return the [raw equals] wikitext
5416 External links: [encoded equals] (T8102)
5418 parsoid=wt2html,wt2wt,html2html
5420 [http://example.com/?foo=bar]
5422 <p><a rel="nofollow" class="external autonumber" href="http://example.com/?foo=bar">[1]</a>
5425 <p><a rel="mw:ExtLink" class="external autonumber" href="http://example.com/?foo=bar"></a></p>
5428 # xxx parsoid strips the IDN character, so the round-trip tests will
5429 # obviously fail and are disabled. --cscott
5431 External links: [IDN ignored character reference in hostname; strip it right off]
5433 parsoid=wt2html,wt2wt,html2html
5435 [http://e‌xample.com/]
5437 <p><a rel="nofollow" class="external autonumber" href="http://example.com/">[1]</a>
5440 <p><a rel="mw:ExtLink" class="external autonumber" href="http://example.com/"></a></p>
5443 # FIXME: This test (the IDN characters in the text of a link) is an inconsistency.
5444 # Where an external link could easily circumvent the sanitization of the text of
5445 # a link like this (where an IDN-ignore character is in the URL somewhere), this
5446 # test demands a higher standard. That's a bit strange.
5450 # http://example.com -> [http://example.com|http://example.com]
5451 # [http://example.com|http://example.com] -> [http://example.com|http://example.com]
5453 # The first example is sanitized, but the second is not. Any security benefits
5454 # from this production are trivial to circumvent. Either remove this test and
5455 # let the parser(s) do their thing unaccosted, or fix the inconsistency and change
5456 # the test accordingly.
5460 # xxx parsoid strips the IDN character, so the round-trip tests will
5461 # obviously fail and are disabled. --cscott
5463 External links: IDN ignored character reference in hostname; strip it right off
5465 parsoid=wt2html,html2html
5467 http://e‌xample.com/
5469 <p><a rel="nofollow" class="external free" href="http://example.com/">http://example.com/</a>
5472 <p><a rel="mw:ExtLink" class="external free" href="http://example.com/">http://example.com/</a></p>
5476 External links: www.jpeg.org (T2554)
5480 <p><a rel="nofollow" class="external free" href="http://www.jpeg.org">http://www.jpeg.org</a>
5484 # parsoid doesn't explicitly mark autonumbered links, see T55505
5486 External links: URL within URL (T2002)
5488 [http://www.unausa.org/newindex.asp?place=http://www.unausa.org/programs/mun.asp]
5490 <p><a rel="nofollow" class="external autonumber" href="http://www.unausa.org/newindex.asp?place=http://www.unausa.org/programs/mun.asp">[1]</a>
5493 <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>
5497 T2361: URL inside bracketed URL
5499 [http://www.example.com/foo http://www.example.com/bar]
5501 <p><a rel="nofollow" class="external text" href="http://www.example.com/foo">http://www.example.com/bar</a>
5506 T2361: URL within URL, not bracketed
5508 http://www.example.com/foo?=http://www.example.com/bar
5510 <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>
5515 T2289: ">"-token in URL-tail
5517 http://www.example.com/<hello>
5519 <p><a rel="nofollow" class="external free" href="http://www.example.com/">http://www.example.com/</a><hello>
5524 T2289: literal ">"-token in URL-tail
5526 http://www.example.com/<b>html</b>
5528 <p><a rel="nofollow" class="external free" href="http://www.example.com/">http://www.example.com/</a><b>html</b>
5531 <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>
5535 T2289: ">"-token in bracketed URL
5537 [http://www.example.com/<hello> stuff]
5539 <p><a rel="nofollow" class="external text" href="http://www.example.com/"><hello> stuff</a>
5544 T2289: literal ">"-token in bracketed URL
5546 [http://www.example.com/<b>html</b> stuff]
5548 <p><a rel="nofollow" class="external text" href="http://www.example.com/"><b>html</b> stuff</a>
5553 T2289: literal double quote at end of URL
5555 http://www.example.com/"hello"
5557 <p><a rel="nofollow" class="external free" href="http://www.example.com/">http://www.example.com/</a>"hello"
5562 T2289: literal double quote in bracketed URL
5564 [http://www.example.com/"hello" stuff]
5566 <p><a rel="nofollow" class="external text" href="http://www.example.com/">"hello" stuff</a>
5571 External links: multiple legal whitespace is fine, Magnus. Don't break it please. (T7081)
5573 [http://www.example.com test]
5575 <p><a rel="nofollow" class="external text" href="http://www.example.com">test</a>
5580 External links: link text with spaces
5582 [http://www.example.com a b c]
5583 [http://www.example.com ''a'' ''b'']
5585 <p><a rel="nofollow" class="external text" href="http://www.example.com">a b c</a>
5586 <a rel="nofollow" class="external text" href="http://www.example.com"><i>a</i> <i>b</i></a>
5590 # Note edge case difference between PHP and Parsoid here.
5592 External links: wiki links within external link (T5695)
5594 parsoid=wt2html,html2html
5596 [http://example.com [[wikilink]] embedded in ext link]
5598 [http://example.com test [[wikilink]] embedded in ext link]
5600 <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>
5601 </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>
5604 <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>
5605 <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>
5609 T2787: Links with one slash after the url protocol are invalid
5613 [http:/example.com title]
5615 <p>http:/example.com
5616 </p><p>[http:/example.com title]
5621 Bracketed external links with template-generated invalid target
5623 [{{echo|http:/example.com}} title]
5625 <p>[http:/example.com title]
5629 # wt2html only because Parsoid would want to add <nowiki>s coming from html
5631 Broken wikilinks (but not external links) prevent templates from closing
5635 [http://example.com x
5637 {{echo|[http://example.com x}}
5643 <p>[<a rel="nofollow" class="external free" href="http://example.com">http://example.com</a> x
5644 </p><p>[<a rel="nofollow" class="external free" href="http://example.com">http://example.com</a> x
5646 </p><p>{{echo|[[Foo}}
5649 <p>[<a rel="mw:ExtLink" class="external free" href="http://example.com">http://example.com</a> x</p>
5650 <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>
5652 <p>{{echo|[[Foo}}</p>
5656 Wikilinks with embedded newlines are not broken
5667 <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>
5679 <p>{{echo|<a href="/wiki/Foo" title="Foo">}}</a>
5683 <p>{{echo|<a rel="mw:WikiLink" href="./Foo" title="Foo">}}</a></p>
5684 <p>[[Foo|<span typeof="mw:Transclusion" data-mw='{"parts":[{"template":{"target":{"wt":"echo","href":"./Template:Echo"},"params":{"1":{"wt":"]]"}},"i":0}}]}'>]]</span></p>
5688 T4702: Mismatched <i>, <b> and <a> tags are invalid
5690 ''[http://example.com text'']
5691 [http://example.com '''text]'''
5692 ''Something [http://example.com in italic'']
5693 ''Something [http://example.com mixed''''', even bold]'''
5694 '''''Now [http://example.com both''''']
5696 <p><a rel="nofollow" class="external text" href="http://example.com"><i>text</i></a>
5697 <a rel="nofollow" class="external text" href="http://example.com"><b>text</b></a>
5698 <i>Something </i><a rel="nofollow" class="external text" href="http://example.com"><i>in italic</i></a>
5699 <i>Something </i><a rel="nofollow" class="external text" href="http://example.com"><i>mixed</i><b>, even bold</b></a>
5700 <i><b>Now </b></i><a rel="nofollow" class="external text" href="http://example.com"><i><b>both</b></i></a>
5708 http://www.example.com/?title=AT%26T
5710 <p><a rel="nofollow" class="external free" href="http://www.example.com/?title=AT%26T">http://www.example.com/?title=AT%26T</a>
5713 <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>
5716 # According to https://www.w3.org/TR/2011/WD-html5-20110525/Overview.html#parsing-urls a plain
5717 # % is actually legal in HTML5. Any change in output would need testing though.
5719 T6781, T7267: %25 in URL
5721 http://www.example.com/?title=100%25_Bran
5723 <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>
5726 <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>
5730 T6781, T7267: %28, %29 in URL
5732 http://www.example.com/?title=Ben-Hur_%281959_film%29
5734 <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>
5737 <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>
5742 T6781: %26 in autonumber URL
5744 [http://www.example.com/?title=AT%26T]
5746 <p><a rel="nofollow" class="external autonumber" href="http://www.example.com/?title=AT%26T">[1]</a>
5749 <p><a rel="mw:ExtLink" class="external autonumber" href="http://www.example.com/?title=AT%26T"></a></p>
5753 T6781, T7267: %26 in autonumber URL
5755 [http://www.example.com/?title=100%25_Bran]
5757 <p><a rel="nofollow" class="external autonumber" href="http://www.example.com/?title=100%25_Bran">[1]</a>
5760 <p><a rel="mw:ExtLink" class="external autonumber" href="http://www.example.com/?title=100%25_Bran"></a></p>
5764 T6781, T7267: %28, %29 in autonumber URL
5766 [http://www.example.com/?title=Ben-Hur_%281959_film%29]
5768 <p><a rel="nofollow" class="external autonumber" href="http://www.example.com/?title=Ben-Hur_%281959_film%29">[1]</a>
5771 <p><a rel="mw:ExtLink" class="external autonumber" href="http://www.example.com/?title=Ben-Hur_%281959_film%29"></a></p>
5776 T6781: %26 in bracketed URL
5778 [http://www.example.com/?title=AT%26T link]
5780 <p><a rel="nofollow" class="external text" href="http://www.example.com/?title=AT%26T">link</a>
5783 <p><a rel="mw:ExtLink" class="external text" href="http://www.example.com/?title=AT%26T">link</a></p>
5787 T6781, T7267: %25 in bracketed URL
5789 [http://www.example.com/?title=100%25_Bran link]
5791 <p><a rel="nofollow" class="external text" href="http://www.example.com/?title=100%25_Bran">link</a>
5796 T6781, T7267: %28, %29 in bracketed URL
5798 [http://www.example.com/?title=Ben-Hur_%281959_film%29 link]
5800 <p><a rel="nofollow" class="external text" href="http://www.example.com/?title=Ben-Hur_%281959_film%29">link</a>
5803 <p><a rel="mw:ExtLink" class="external text" href="http://www.example.com/?title=Ben-Hur_%281959_film%29">link</a></p>
5807 External link containing a period in the anchor. (T65947)
5809 [//foo.org/bar#baz. bang]
5811 [//foo.org/bar. bang]
5813 <p><a rel="nofollow" class="external text" href="//foo.org/bar#baz.">bang</a>
5814 </p><p><a rel="nofollow" class="external text" href="//foo.org/bar.">bang</a>
5817 <p><a rel="mw:ExtLink" class="external text" href="//foo.org/bar#baz.">bang</a></p>
5818 <p><a rel="mw:ExtLink" class="external text" href="//foo.org/bar.">bang</a></p>
5822 External link containing a single quote. (T65947)
5826 [//foo.org/bar'baz bang]
5828 <p><a rel="nofollow" class="external autonumber" href="//foo.org/bar'baz">[1]</a>
5829 </p><p><a rel="nofollow" class="external text" href="//foo.org/bar'baz">bang</a>
5832 <p><a rel="mw:ExtLink" class="external autonumber" href="//foo.org/bar'baz"></a></p>
5833 <p><a rel="mw:ExtLink" class="external text" href="//foo.org/bar'baz">bang</a></p>
5837 External link containing double-single-quotes in text '' (T6598 sanity check)
5839 Some [http://example.com/ pretty ''italics'' and stuff]!
5841 <p>Some <a rel="nofollow" class="external text" href="http://example.com/">pretty <i>italics</i> and stuff</a>!
5846 External link containing double-single-quotes in text embedded in italics (T6598 sanity check)
5848 ''Some [http://example.com/ pretty ''italics'' and stuff]!''
5850 <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>
5854 # Don't add the html/php section since the output is broken and there isn't any reason to spec it
5856 External link containing double-single-quotes with no space separating the url from text in italics
5858 [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]].]
5860 <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>.
5863 <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>
5867 External link with comments in link text
5869 [http://www.google.com Google <!-- comment -->]
5871 <p><a rel="nofollow" class="external text" href="http://www.google.com">Google </a>
5874 <p><a rel="mw:ExtLink" class="external text" href="http://www.google.com">Google <!-- comment --></a></p>
5878 External link to bare IPv4 address
5880 [http://192.168.0.1 Link]
5882 <p><a rel="nofollow" class="external text" href="http://192.168.0.1">Link</a>
5885 <p><a rel="mw:ExtLink" class="external text" href="http://192.168.0.1">Link</a></p>
5889 URL-encoding in URL functions (single parameter)
5891 {{localurl:Some page|amp=&}}
5893 <p>/index.php?title=Some_page&amp=&
5898 URL-encoding in URL functions (multiple parameters)
5900 {{localurl:Some page|q=?&=&}}
5902 <p>/index.php?title=Some_page&q=?&amp=&
5909 http://example.com/index.php?foozoid%5B%5D=bar
5911 http://example.com/index.php?foozoid[]=bar
5913 <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>
5914 </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>
5917 <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>
5919 <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>
5923 IPv6 urls, autolink format (T23261)
5925 http://[2404:130:0:1000::187:2]/index.php
5927 Examples from RFC 2373, section 2.2:
5929 *http://[1080::8:800:200C:417A]/unicast
5930 *http://[FF01::101]/multicast
5931 *http://[::1]/loopback
5932 *http://[::]/unspecified
5933 *http://[::13.1.68.3]/ipv4compat
5934 *http://[::FFFF:129.144.52.38]/ipv4compat
5936 Examples from RFC 2732, section 2:
5938 *http://[FEDC:BA98:7654:3210:FEDC:BA98:7654:3210]:80/index.html
5939 *http://[1080:0:0:0:8:800:200C:417A]/index.html
5940 *http://[3ffe:2a00:100:7031::1]
5941 *http://[1080::8:800:200C:417A]/foo
5942 *http://[::192.9.5.5]/ipng
5943 *http://[::FFFF:129.144.52.38]:80/index.html
5944 *http://[2010:836B:4179::836B:4179]
5946 <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>
5947 </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:
5949 <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>
5950 <li><a rel="nofollow" class="external free" href="http://[FF01::101]/multicast">http://[FF01::101]/multicast</a></li>
5951 <li><a rel="nofollow" class="external free" href="http://[::1]/loopback">http://[::1]/loopback</a></li>
5952 <li><a rel="nofollow" class="external free" href="http://[::]/unspecified">http://[::]/unspecified</a></li>
5953 <li><a rel="nofollow" class="external free" href="http://[::13.1.68.3]/ipv4compat">http://[::13.1.68.3]/ipv4compat</a></li>
5954 <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>
5955 <p>Examples from <a class="external mw-magiclink-rfc" rel="nofollow" href="https://tools.ietf.org/html/rfc2732">RFC 2732</a>, section 2:
5957 <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>
5958 <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>
5959 <li><a rel="nofollow" class="external free" href="http://[3ffe:2a00:100:7031::1]">http://[3ffe:2a00:100:7031::1]</a></li>
5960 <li><a rel="nofollow" class="external free" href="http://[1080::8:800:200C:417A]/foo">http://[1080::8:800:200C:417A]/foo</a></li>
5961 <li><a rel="nofollow" class="external free" href="http://[::192.9.5.5]/ipng">http://[::192.9.5.5]/ipng</a></li>
5962 <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>
5963 <li><a rel="nofollow" class="external free" href="http://[2010:836B:4179::836B:4179]">http://[2010:836B:4179::836B:4179]</a></li></ul>
5966 <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>
5968 <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>
5969 <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>
5970 <li><a rel="mw:ExtLink" class="external free" href="http://[FF01::101]/multicast">http://[FF01::101]/multicast</a></li>
5971 <li><a rel="mw:ExtLink" class="external free" href="http://[::1]/loopback">http://[::1]/loopback</a></li>
5972 <li><a rel="mw:ExtLink" class="external free" href="http://[::]/unspecified">http://[::]/unspecified</a></li>
5973 <li><a rel="mw:ExtLink" class="external free" href="http://[::13.1.68.3]/ipv4compat">http://[::13.1.68.3]/ipv4compat</a></li>
5974 <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>
5976 <p>Examples from <a href="https://tools.ietf.org/html/rfc2732" rel="mw:ExtLink" class="external mw-magiclink">RFC 2732</a>, section 2:</p>
5977 <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>
5978 <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>
5979 <li><a rel="mw:ExtLink" class="external free" href="http://[3ffe:2a00:100:7031::1]">http://[3ffe:2a00:100:7031::1]</a></li>
5980 <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>
5981 <li><a rel="mw:ExtLink" class="external free" href="http://[::192.9.5.5]/ipng">http://[::192.9.5.5]/ipng</a></li>
5982 <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>
5983 <li><a rel="mw:ExtLink" class="external free" href="http://[2010:836B:4179::836B:4179]">http://[2010:836B:4179::836B:4179]</a></li></ul>
5987 IPv6 urls, bracketed format (T23261)
5989 [http://[2404:130:0:1000::187:2]/index.php test]
5991 Examples from RFC 2373, section 2.2:
5993 *[http://[1080::8:800:200C:417A] unicast]
5994 *[http://[FF01::101] multicast]
5995 *[http://[::1]/ loopback]
5996 *[http://[::] unspecified]
5997 *[http://[::13.1.68.3] ipv4compat]
5998 *[http://[::FFFF:129.144.52.38] ipv4compat]
6000 Examples from RFC 2732, section 2:
6002 *[http://[FEDC:BA98:7654:3210:FEDC:BA98:7654:3210]:80/index.html 1]
6003 *[http://[1080:0:0:0:8:800:200C:417A]/index.html 2]
6004 *[http://[3ffe:2a00:100:7031::1] 3]
6005 *[http://[1080::8:800:200C:417A]/foo 4]
6006 *[http://[::192.9.5.5]/ipng 5]
6007 *[http://[::FFFF:129.144.52.38]:80/index.html 6]
6008 *[http://[2010:836B:4179::836B:4179] 7]
6010 <p><a rel="nofollow" class="external text" href="http://[2404:130:0:1000::187:2]/index.php">test</a>
6011 </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:
6013 <ul><li><a rel="nofollow" class="external text" href="http://[1080::8:800:200C:417A]">unicast</a></li>
6014 <li><a rel="nofollow" class="external text" href="http://[FF01::101]">multicast</a></li>
6015 <li><a rel="nofollow" class="external text" href="http://[::1]/">loopback</a></li>
6016 <li><a rel="nofollow" class="external text" href="http://[::]">unspecified</a></li>
6017 <li><a rel="nofollow" class="external text" href="http://[::13.1.68.3]">ipv4compat</a></li>
6018 <li><a rel="nofollow" class="external text" href="http://[::FFFF:129.144.52.38]">ipv4compat</a></li></ul>
6019 <p>Examples from <a class="external mw-magiclink-rfc" rel="nofollow" href="https://tools.ietf.org/html/rfc2732">RFC 2732</a>, section 2:
6021 <ul><li><a rel="nofollow" class="external text" href="http://[FEDC:BA98:7654:3210:FEDC:BA98:7654:3210]:80/index.html">1</a></li>
6022 <li><a rel="nofollow" class="external text" href="http://[1080:0:0:0:8:800:200C:417A]/index.html">2</a></li>
6023 <li><a rel="nofollow" class="external text" href="http://[3ffe:2a00:100:7031::1]">3</a></li>
6024 <li><a rel="nofollow" class="external text" href="http://[1080::8:800:200C:417A]/foo">4</a></li>
6025 <li><a rel="nofollow" class="external text" href="http://[::192.9.5.5]/ipng">5</a></li>
6026 <li><a rel="nofollow" class="external text" href="http://[::FFFF:129.144.52.38]:80/index.html">6</a></li>
6027 <li><a rel="nofollow" class="external text" href="http://[2010:836B:4179::836B:4179]">7</a></li></ul>
6030 <p><a rel="mw:ExtLink" class="external text" href="http://[2404:130:0:1000::187:2]/index.php">test</a></p>
6032 <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>
6033 <ul><li><a rel="mw:ExtLink" class="external text" href="http://[1080::8:800:200C:417A]">unicast</a></li>
6034 <li><a rel="mw:ExtLink" class="external text" href="http://[FF01::101]">multicast</a></li>
6035 <li><a rel="mw:ExtLink" class="external text" href="http://[::1]/">loopback</a></li>
6036 <li><a rel="mw:ExtLink" class="external text" href="http://[::]">unspecified</a></li>
6037 <li><a rel="mw:ExtLink" class="external text" href="http://[::13.1.68.3]">ipv4compat</a></li>
6038 <li><a rel="mw:ExtLink" class="external text" href="http://[::FFFF:129.144.52.38]">ipv4compat</a></li></ul>
6040 <p>Examples from <a href="https://tools.ietf.org/html/rfc2732" rel="mw:ExtLink" class="external mw-magiclink">RFC 2732</a>, section 2:</p>
6041 <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>
6042 <li><a rel="mw:ExtLink" class="external text" href="http://[1080:0:0:0:8:800:200C:417A]/index.html">2</a></li>
6043 <li><a rel="mw:ExtLink" class="external text" href="http://[3ffe:2a00:100:7031::1]">3</a></li>
6044 <li><a rel="mw:ExtLink" class="external text" href="http://[1080::8:800:200C:417A]/foo">4</a></li>
6045 <li><a rel="mw:ExtLink" class="external text" href="http://[::192.9.5.5]/ipng">5</a></li>
6046 <li><a rel="mw:ExtLink" class="external text" href="http://[::FFFF:129.144.52.38]:80/index.html">6</a></li>
6047 <li><a rel="mw:ExtLink" class="external text" href="http://[2010:836B:4179::836B:4179]">7</a></li></ul>
6051 Non-extlinks in brackets
6060 [{{echo|foo}} ''bar'']
6061 [{{echo|foo}}l's] errand
6062 [{{echo|foo}}l's errand]
6064 [url=http://example.com]
6065 [http:// bare protocols don't count]
6078 [url=<a rel="nofollow" class="external free" href="http://example.com">http://example.com</a>]
6079 [http:// bare protocols don't count]
6087 [<span about="#mwt19" typeof="mw:Transclusion" data-mw='{"parts":[{"template":{"target":{"wt":"echo","href":"./Template:Echo"},"params":{"1":{"wt":"foo"}},"i":0}}]}'>foo</span>]
6088 [<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]
6089 [<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>]
6090 [<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
6091 [<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]
6092 [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>]
6093 [url=<a rel="mw:ExtLink" class="external free" href="http://example.com">http://example.com</a>]
6094 [http:// bare protocols don't count]</p>
6098 Percent encoding in external links
6100 [https://github.com/search?l=&q=ResourceLoader+%40wikimedia Search]
6102 <p><a rel="nofollow" class="external text" href="https://github.com/search?l=&q=ResourceLoader+%40wikimedia">Search</a>
6105 <p><a rel="mw:ExtLink" class="external text" href="https://github.com/search?l=&q=ResourceLoader+%40wikimedia">Search</a></p>
6109 Use url link syntax for links where the content is equal the link target
6113 <p><a rel="nofollow" class="external free" href="http://example.com">http://example.com</a>
6116 <p><a rel="mw:ExtLink" class="external free" href="http://example.com">http://example.com</a></p>
6120 Parenthesis in external links, especially URL links
6124 http://example.com/test)
6126 http://example.com/(test)
6128 http://example.com/((test)
6130 (http://example.com/(test))
6132 (http://example.com/(test)))))
6134 http://example.com/a)b
6136 [http://example.com) foo]
6138 <p><a rel="nofollow" class="external free" href="http://example.com">http://example.com</a>)
6139 </p><p><a rel="nofollow" class="external free" href="http://example.com/test">http://example.com/test</a>)
6140 </p><p><a rel="nofollow" class="external free" href="http://example.com/(test)">http://example.com/(test)</a>
6141 </p><p><a rel="nofollow" class="external free" href="http://example.com/((test)">http://example.com/((test)</a>
6142 </p><p>(<a rel="nofollow" class="external free" href="http://example.com/(test))">http://example.com/(test))</a>
6143 </p><p>(<a rel="nofollow" class="external free" href="http://example.com/(test)))))">http://example.com/(test)))))</a>
6144 </p><p><a rel="nofollow" class="external free" href="http://example.com/a)b">http://example.com/a)b</a>
6145 </p><p><a rel="nofollow" class="external text" href="http://example.com)">foo</a>
6148 <p><a rel="mw:ExtLink" class="external free" href="http://example.com">http://example.com</a>)</p>
6149 <p><a rel="mw:ExtLink" class="external free" href="http://example.com/test">http://example.com/test</a>)</p>
6150 <p><a rel="mw:ExtLink" class="external free" href="http://example.com/(test)">http://example.com/(test)</a></p>
6151 <p><a rel="mw:ExtLink" class="external free" href="http://example.com/((test)">http://example.com/((test)</a></p>
6152 <p>(<a rel="mw:ExtLink" class="external free" href="http://example.com/(test))">http://example.com/(test))</a></p>
6153 <p>(<a rel="mw:ExtLink" class="external free" href="http://example.com/(test)))))">http://example.com/(test)))))</a></p>
6154 <p><a rel="mw:ExtLink" class="external free" href="http://example.com/a)b">http://example.com/a)b</a></p>
6155 <p><a rel="mw:ExtLink" class="external text" href="http://example.com)">foo</a></p>
6159 Parenthesis in external links, w/ transclusion or comment
6161 (http://example.com/{{echo|hi}})
6163 (http://example.com<!-- hi -->)
6165 <p>(<a rel="nofollow" class="external free" href="http://example.com/hi">http://example.com/hi</a>)
6166 </p><p>(<a rel="nofollow" class="external free" href="http://example.com">http://example.com</a>)
6169 <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>
6171 <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>
6175 Serialize <a> tags with invalid link targets as plain text
6177 parsoid={ "modes": ["html2wt"], "suppressErrors": true }
6179 <a rel="mw:WikiLink" href="[[foo]]">text</a>
6180 <a rel="mw:WikiLink" href="[[foo]]">*text</a>
6181 <a rel="mw:WikiLink" href="[[foo]]">[[foo]]</a>
6182 <a rel="mw:WikiLink" href="[[foo]]">*a [[foo]]</a>
6185 <nowiki>*</nowiki>text
6186 <nowiki>[[foo]]</nowiki>
6187 <nowiki>*</nowiki>a <nowiki>[[foo]]</nowiki>
6191 mw:ExtLink -vs- mw:WikiLink (T94723)
6195 <a rel="mw:WikiLink" href="./Foo" title="Foo" data-parsoid='{"stx":"piped","a":{"href":"./Foo"},"sa":{"href":"Foo"}}'>Bar</a>
6196 <a rel="mw:WikiLink" href="./Foo" title="Foo">Bar</a>
6197 <a rel="mw:WikiLink" href="http://en.wikipedia.org/wiki/Foo" title="Foo">Bar</a>
6198 <a rel="mw:ExtLink" href="http://en.wikipedia.org/wiki/Foo" title="Foo">Bar</a>
6200 <a rel="mw:ExtLink" href="http://en.wikipedia.org/wiki/European_Robin">European Robin</a>
6201 <a rel="mw:WikiLink" href="http://en.wikipedia.org/wiki/European_Robin">European Robin</a>
6209 [[:en:European_Robin|European Robin]]
6210 [[:en:European_Robin|European Robin]]
6214 mw:ExtLink linking to a interwiki URL can be round-tripped losslessly (T94723)
6218 [http://en.wikipedia.org/wiki/European_Robin European Robin]
6220 THIS SECTION IS NOT USED (but Parsoid won't run the test without it)
6231 Normal text. '''Bold text.''' Normal text. ''Italic text.''
6233 Normal text. '''''Bold italic text.''''' Normal text.
6235 <p>Normal text. <b>Bold text.</b> Normal text. <i>Italic text.</i>
6236 </p><p>Normal text. <i><b>Bold italic text.</b></i> Normal text.
6241 Quotes wrapping HTML table
6243 '''<table><tr><td>hi</td></tr></table>'''
6245 <b><table><tbody><tr><td>hi</td></tr></tbody></table></b>
6247 <b><table data-parsoid='{"stx":"html"}'><tbody><tr data-parsoid='{"stx":"html"}'><td data-parsoid='{"stx":"html"}'>hi</td></tr></tbody></table></b>
6250 # Parsoid inserts an empty bold tag pair at the end of the line, that the PHP
6251 # parser strips. The wikitext contains just the first half of the bold
6254 Unclosed and unmatched quotes
6256 '''''Bold italic text '''with bold deactivated''' in between.'''''
6258 '''''Bold italic text ''with italic deactivated'' in between.'''''
6262 ..spanning two paragraphs (should not work).'''
6264 '''Bold tag left open
6266 ''Italic tag left open
6270 <!-- Unmatching number of opening, closing tags: -->
6271 '''This year''''s election ''should'' beat '''last year''''s.
6273 ''Tom'''s car is bigger than ''Susan'''s.
6275 Plain ''italic'''s plain
6277 <p><i><b>Bold italic text </b>with bold deactivated<b> in between.</b></i>
6278 </p><p><b><i>Bold italic text </i>with italic deactivated<i> in between.</i></b>
6279 </p><p><b>Bold text..</b>
6280 </p><p>..spanning two paragraphs (should not work).
6281 </p><p><b>Bold tag left open</b>
6282 </p><p><i>Italic tag left open</i>
6284 </p><p><b>This year'</b>s election <i>should</i> beat <b>last year'</b>s.
6285 </p><p><i>Tom<b>s car is bigger than </b></i><b>Susan</b>s.
6286 </p><p>Plain <i>italic'</i>s plain
6289 <p><i><b>Bold italic text </b>with bold deactivated<b> in between.</b></i>
6290 </p><p><b><i>Bold italic text </i>with italic deactivated<i> in between.</i></b>
6291 </p><p><b>Bold text..</b>
6292 </p><p>..spanning two paragraphs (should not work).<b></b>
6293 </p><p><b>Bold tag left open</b>
6294 </p><p><i>Italic tag left open</i>
6297 <!-- Unmatching number of opening, closing tags: -->
6298 <p><b>This year'</b>s election <i>should</i> beat <b>last year'</b>s.
6299 </p><p><i>Tom<b>s car is bigger than </b></i><b>Susan</b>s.
6300 </p><p>Plain <i>italic'</i>s plain
6307 ### some content taken from http://meta.wikimedia.org/wiki/MediaWiki_User%27s_Guide:_Using_tables
6310 # This should not produce <table></table> as <table><tr><td></td></tr></table>
6311 # is the bare minimum required by the spec, see:
6312 # https://www.w3.org/TR/xhtml-modularization/dtd_module_defs.html#a_module_Basic_Tables
6313 # Parsoid team replies: empty table tags are legal in HTML5
6315 A table with no data.
6328 A table with stray table end tags on start tag line (wt2html)
6332 {|style="color: red;"|}
6334 {|style="color: red;" |}
6338 {|style="color: red;"|} id="foo"
6342 {|style="color: red;" |} id="foo"
6346 <table style="color: red;">
6348 </table><table style="color: red;">
6351 </td></tr></tbody></table>
6352 <table style="color: red;" id="foo">
6355 </td></tr></tbody></table>
6356 <table style="color: red;" id="foo">
6359 </td></tr></tbody></table>
6361 <table style="color: red;"></table>
6363 <table style="color: red;">
6369 <table style="color: red;" id="foo">
6375 <table style="color: red;" id="foo">
6384 A table with no data (take 2)
6392 # A table with nothing but a caption is invalid XHTML, we might want to render
6393 # this as <p>caption</p>
6394 # Parsoid team replies: table with only a caption is legal in HTML5
6396 A table with nothing but a caption
6404 </caption><tr><td></td></tr></table>
6407 <table><caption>caption</caption></table>
6411 A table with caption with default-spaced attributes and a table row
6414 |+ style="color: red;" |caption1
6420 <caption style="color: red;">caption1
6429 A table with captions with non-default spaced attributes and a table row
6432 |+style="color: red;"|caption2
6433 |+ style="color: red;"|caption3
6439 <caption style="color: red;">caption2
6441 <caption style="color: red;">caption3
6450 Table td-cell syntax variations
6455 |style='color:red;'|baz
6456 |style='color:red;'||baz
6463 <td>foo bar foo</td>
6466 <td style="color:red;">baz
6468 <td>style='color:red;'</td>
6496 Simple table but with multiple dashes for row wikitext
6515 Multiplication table
6517 {| border="1" cellpadding="2"
6518 |+Multiplication table
6538 <table border="1" cellpadding="2">
6539 <caption>Multiplication table
6586 Accept "||" in table headings
6601 Accept "!!" in table data
6615 <tbody><tr data-parsoid='{"autoInsertedEnd":true,"autoInsertedStart":true}'><td data-parsoid='{"autoInsertedEnd":true}'> Foo!! </td><td data-parsoid='{"stx":"row","autoInsertedEnd":true}'></td></tr>
6620 Accept "||" in indented table headings
6630 </th></tr></table></dd></dl>
6635 Accept "!!" in templates
6649 <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>
6653 Accept "!!" in table headings after newline
6670 <p>b!!c</p></th></tr>
6675 Accept "!!" in table data of mixed wikitext / html syntax
6679 <tr><td>b!!c</td></tr>
6685 </th></tr><tr><td>b!!c</td></tr>
6689 <tbody><tr><th>a</th></tr>
6690 <tr data-parsoid='{"stx":"html"}'><td data-parsoid='{"stx":"html"}'>b!!c</td></tr>
6695 Accept empty attributes in td/th cells (td/th cells starting with leading ||)
6712 Accept "| !" at start of line in tables (ignore !-attribute)
6716 |!style="color:red"|bar
6728 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 +/-
6732 |style='color:red;'|+1
6733 |style='color:blue;'|-1
6745 <td style="color:red;">+1
6747 <td style="color:blue;">-1
6771 |rowspan=2|Cell 2, row 1 (and 2)
6782 <td rowspan="2">Cell 2, row 1 (and 2)
6800 {| bgcolor=#ABCDEF border=2
6805 |the original table again
6813 <table bgcolor="#ABCDEF" border="2">
6821 <td>the original table again
6827 Invalid attributes in table cell (T3830)
6841 Table cell attributes: Pipes protected by nowikis should be treated as a plain character
6845 |title="foo<nowiki>|</nowiki>" |bar
6846 |title="foo<nowiki>|</nowiki>" bar
6853 <td title="foo|">bar
6855 <td>title="foo|" bar
6860 <tbody><tr><td title="foo">bar</td>
6861 <td title="foo|" about="#mwt3" typeof="mw:ExpandedAttrs" data-parsoid='{"a":{"title":"foo|"},"sa":{"title":"foo<nowiki>|</nowiki>"}}' data-mw='{"attribs":[[{"txt":"title"},{"html":"foo<span typeof=\"mw:Nowiki\" data-parsoid='{\"dsr\":[32,50,8,9]}'>|</span>"}]]}'>bar</td>
6862 <td>title="foo<span typeof="mw:Nowiki">|</span>" bar</td></tr>
6866 # See: http://lists.wikimedia.org/mailman/htdig/wikitech-l/2006-April/022293.html
6867 # N.B. The "|}" to close the table is missing from the input, so parsoid's
6868 # *2wt modes will fail.
6870 Table security: embedded pipes
6872 parsoid=wt2html,html2html
6875 | |[ftp://|x||]" onmouseover="alert(document.cookie)">test
6879 <td>[<a rel="nofollow" class="external free" href="ftp://%7Cx">ftp://%7Cx</a></td>
6880 <td>]" onmouseover="alert(document.cookie)">test
6888 <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>
6892 Element attributes with double ! should not be broken up by <th>
6895 !hi <div class="!!">ha</div> ho
6900 <th>hi <div class="!!">ha</div> ho
6905 <tbody><tr><th>hi <div class="!!" data-parsoid='{"stx":"html"}'>ha</div> ho</th></tr>
6910 ! and || in element attributes should not be parsed as <th>/<td>
6913 |<div style="color: red !important;" data-contrived="put this here ||">hi</div>
6918 <td><div style="color: red !important;" data-contrived="put this here ||">hi</div>
6923 <tbody><tr><td><div style="color: red !important;" data-contrived="put this here ||" data-parsoid='{"stx":"html"}'>hi</div></td></tr>
6927 # FIXME: The output seems broken. Filed as T110268.
6929 ! and || in td attributes should not be parsed as <th>/<td>
6934 |style="color: red !important;" data-contrived="put this here ||"|foo
6939 <td>style="color: red !important;" data-contrived="put this here</td>
6945 <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>
6950 Break on | in element attribute in template
6952 parsoid=wt2html,html2html
6954 {{echo|1=<div class="hi|ho">ha</div>}}
6956 <p>ho">ha</div>
6959 <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>
6963 Break on | in element attribute name in template
6965 {{echo|<div cla|ss="hiho">ha</div>}}
6967 <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>
6971 Don't break on | in extension attribute in template
6973 {{echo|<ref name="hi|ho">ha</ref>}}
6977 <p><sup about="#mwt2" class="mw-ref" id="cite_ref-hi|ho_1-0" rel="dc:references" typeof="mw:Transclusion mw:Extension/ref" data-mw='{"parts":[{"template":{"target":{"wt":"echo","href":"./Template:Echo"},"params":{"1":{"wt":"<ref name=\"hi|ho\">ha</ref>"}},"i":0}}]}'><a href="./Parser_test#cite_note-hi|ho-1" style="counter-reset: mw-Ref 1;"><span class="mw-reflink-text">[1]</span></a></sup></p>
6979 <ol class="mw-references references" typeof="mw:Extension/references" about="#mwt5" data-mw='{"name":"references","attrs":{}}'><li about="#cite_note-hi|ho-1" id="cite_note-hi|ho-1"><a href="./Parser_test#cite_ref-hi|ho_1-0" rel="mw:referencedBy"><span class="mw-linkback-text">↑ </span></a> <span id="mw-reference-text-cite_note-hi|ho-1" class="mw-reference-text">ha</span></li></ol>
6982 ## We don't support roundtripping of these attributes in Parsoid.
6983 ## Selective serialization takes care of preventing dirty diffs.
6984 ## But, on edits, we dirty-diff the invalid attribute text.
6986 Invalid text in table attributes should be discarded
6990 {| <span>boo</span> style='border:1px solid black'
6991 | <span>boo</span> style='color:blue' |1
6992 |<span>boo</span> style='color:blue'|2
6995 <table style="border:1px solid black">
6997 <td style="color:blue">1
6999 <td style="color:blue">2
7003 <table style="border:1px solid black">
7005 <td style="color:blue">1</td>
7006 <td style="color:blue">2</td>
7012 Invalid text in table attributes should be preserved by selective serializer
7015 "modes": ["selser"],
7017 ["td:first-child", "text", "abc"],
7018 ["td + td", "text", "xyz"]
7022 {| <span>boo</span> style='border:1px solid black'
7023 | <span>boo</span> style='color:blue' | 1
7024 |<span>boo</span> style='color:blue'| 2
7027 {| <span>boo</span> style='border:1px solid black'
7028 | <span>boo</span> style='color:blue' | abc
7029 |<span>boo</span> style='color:blue'| xyz
7034 1. Template-generated table cell attributes and cell content
7039 || {{table_attribs_5}}
7040 | <!--foo--> <!--bar--> <!--baz--> {{table_attribs}}
7041 |align=center {{table_attribs}}
7042 | <!--foo--> align=center <!--bar--> {{table_attribs}}
7047 <td style="color:red;">Foo
7049 <td style="color:red;">Foo
7051 <td>style="color:red;"</td>
7054 <td style="color:red;">Foo
7056 <td align="center" style="color:red;">Foo
7058 <td align="center" style="color:red;">Foo
7064 2. Template-generated table cell attributes and cell content
7067 |{{table_attribs_2}}
7072 <td style="color:red;">Foo
7080 <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>
7081 <td about="#mwt1">Bar</td><td about="#mwt1">Baz</td></tr>
7086 3. Template-generated table cell attributes and cell content
7089 !align=center {{table_header_cells}}
7091 |align=center {{table_cells}}
7096 <th align="center" style="color:red;">Foo</th>
7097 <th style="color:red;"><i>Bar</i></th>
7098 <th style="color:brown;"><i>Foo</i> and Baz
7101 <td align="center" style="color:red;">Foo</td>
7102 <td style="color:red;"><i>Bar</i></td>
7103 <td style="color:brown;"><i>Foo</i> and Baz
7108 <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>
7109 <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>
7114 4. Template-generated table cell attributes and cell content inside a templated table
7117 !align=center {{table_header_cells}}
7119 |align=center {{table_cells}}
7124 <th align="center" style="color:red;">Foo</th>
7125 <th style="color:red;"><i>Bar</i></th>
7126 <th style="color:brown;"><i>Foo</i> and Baz
7129 <td align="center" style="color:red;">Foo</td>
7130 <td style="color:red;"><i>Bar</i></td>
7131 <td style="color:brown;"><i>Foo</i> and Baz
7135 <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}}]}'>
7136 <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>
7138 <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>
7142 ## Edge case fix to prevent future regressions
7144 T107652: <ref>s in templates that also generate table cell attributes should be rendered properly
7147 |{{table_attribs_7}}
7152 <tbody><tr><td style="background:#f9f9f9;" typeof="mw:Transclusion" about="#mwt1" data-mw='{"parts":["|",{"template":{"target":{"wt":"table_attribs_7","href":"./Template:Table_attribs_7"},"params":{},"i":0}}]}'>Foo<sup class="mw-ref" id="cite_ref-1" rel="dc:references" typeof="mw:Extension/ref" data-mw='{"name":"ref","attrs":{},"body":{"id":"mw-reference-text-cite_note-1"}}'><a href="./Parser_test#cite_note-1" style="counter-reset: mw-Ref 1;"><span class="mw-reflink-text">[1]</span></a></s></td></tr>
7154 <ol class="mw-references references" typeof="mw:Extension/references" about="#mwt5" data-mw='{"name":"references","attrs":{}}'><li about="#cite_note-1" id="cite_note-1"><a href="./Parser_test#cite_ref-1" rel="mw:referencedBy"><span class="mw-linkback-text">↑ </span></a> <span id="mw-reference-text-cite_note-1" class="mw-reference-text" data-parsoid="{}">foo</span></li></ol>
7158 Table with row followed by newlines and table heading
7160 parsoid=wt2html,html2html
7178 Table with empty line following the start tag
7180 parsoid=wt2html,html2html
7198 Table attributes with empty value
7200 parsoid=wt2html,html2html
7213 <tbody><tr><td style="">hello</td></tr>
7218 Wikitext table with a lot of comments
7241 Wikitext table comments represented in parsoid dom
7243 {|<!--c1--><!--c2-->
7252 </td></tr></tbody></table>
7254 <table><!--c1--><!--c2-->
7255 <tbody><tr data-parsoid='{"startTagSrc":"|-","autoInsertedEnd":true}'><!--c3-->
7256 <td data-parsoid='{"autoInsertedEnd":true}'>x</td></tr>
7261 Wikitext table with double-line table cell
7278 Table cell with a single comment
7295 Table-cell after a comment-only-empty-line
7312 <tbody><tr data-parsoid='{"autoInsertedEnd":true,"autoInsertedStart":true}'><td data-parsoid='{"autoInsertedEnd":true}'>a</td>
7314 <!--c2--><td data-parsoid='{"autoInsertedEnd":true}'>b</td></tr>
7320 Build table with {{!}}
7322 {{{!}} class="wikitable"
7325 {{!}}- style="color:red;"
7326 {{!}}data{{!}}{{!}} style="color:red;" {{!}}second data
7329 <table class="wikitable">
7335 <tr style="color:red;">
7337 <td style="color:red;">second data
7343 Build table with pipe as data
7345 {| class="wikitable"
7348 |- style="color:red;"
7349 |data|| style="color:red;" |second data
7351 | style="color:red;" |data with | || style="color:red;" | second data with |
7353 ||data with | |||second data with |
7356 <table class="wikitable">
7362 <tr style="color:red;">
7364 <td style="color:red;">second data
7367 <td style="color:red;">data with |</td>
7368 <td style="color:red;">second data with |
7371 <td>data with |</td>
7372 <td>second data with |
7378 Build table with wikilink
7380 {| class="wikitable"
7381 !header||second header
7382 |- style="color:red;"
7383 |data [[Main Page|linktext]]||second data [[Main Page|linktext]]
7385 |data||second data [[Main Page|link|text with pipe]]
7388 <table class="wikitable">
7393 <tr style="color:red;">
7394 <td>data <a href="/wiki/Main_Page" title="Main Page">linktext</a></td>
7395 <td>second data <a href="/wiki/Main_Page" title="Main Page">linktext</a>
7399 <td>second data <a href="/wiki/Main_Page" title="Main Page">link|text with pipe</a>
7404 # The expected HTML structure in this test is debatable. The PHP parser does
7405 # not parse this kind of table at all. The main focus for Parsoid is on
7406 # round-tripping, so this output is ok for now. TODO: revisit!
7408 Wikitext table with html-syntax row
7418 <td>foo</td></tr></tbody></table>
7421 ## Remex doesn't account for fostered content.
7423 Fostered content in tables: Plain text
7443 <p data-parsoid='{"fostered":true,"autoInsertedEnd":true,"autoInsertedStart":true}'>
7446 <tbody><tr class="mw-empty-elt" data-parsoid='{"startTagSrc":"|-"}'></tr></tbody></table>
7450 Fostered content in tables: Lists
7452 parsoid=wt2html,html2html
7465 <ul><li>a</li></ul><table>
7470 <ul data-parsoid='{"fostered":true,"autoInsertedEnd":true}'><li>a</li></ul><table>
7471 <tbody><tr data-parsoid='{"startTagSrc":"|-","autoInsertedEnd":true}'>
7473 </tr></tbody></table>
7477 Template generated table cell with attributes
7481 {{table_attribs_4}} ||a||b
7487 <td style="background-color:#DC241f;" width="10px"></td>
7490 </td></tr></tbody></table>
7493 <tbody><tr data-parsoid='{"startTagSrc":"|-","autoInsertedEnd":true}'>
7494 <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>
7498 Parsoid: Round-trip tables directly followed by content (T53219)
7500 parsoid=wt2html,wt2wt
7513 </td></tr></tbody></table><p> bar
7517 </td></tr></tbody></table><p><b>quux</b>
7522 Parsoid: Default to a newline after tables in new content (T53219)
7527 <tr><td>foo</td></tr></tbody></table> bar
7529 <tr><td>baz</td></tr></tbody></table><b>quux</b>
7534 <nowiki> </nowiki>bar
7542 Parsoid: Row-syntax table headings followed by comment & table cells
7544 parsoid=wt2html,wt2wt
7548 <!-- foo --> ||baz||quux
7562 <tbody><tr><th>foo</th><th>bar
7563 <!-- foo --></th><td> baz </td><td>quux</td></tr>
7568 Parsoid: Recover better from broken table attributes
7582 </td></tr></tbody></table>
7587 <p>foo</p></td></tr>
7591 # Note: PHP parser omits empty rows
7593 Tables: Digest broken attributes on table and tr tag
7609 <tr class='mw-empty-elt'></tr>
7610 <tr class='mw-empty-elt'></tr>
7615 Table with missing opening <tr> tag
7617 parsoid=wt2html,wt2wt
7625 <tbody><tr><td>foo</td>
7630 # T137406: Whitespace in the HTML
7632 1. Generate correct wikitext for tables with thead/tbody/tfoot
7637 <caption>Test</caption>
7699 </td></tr></tbody></table>
7702 # T137406: No whitespace in the HTML
7704 2. Generate correct wikitext for tables with thead/tbody/tfoot
7708 <table><thead><tr><th>heading</th></tr></thead><tbody><tr><td>foo</td></tr></tbody></table>
7718 Wikitext tables can be nested inside HTML tables
7722 <table data-parsoid='{"stx":"html"}'>
7725 <tr><td>foo</td></tr>
7743 </td></tr></tbody></table>
7752 Plain link, capitalized
7756 <p><a href="/wiki/Main_Page" title="Main Page">Main Page</a>
7761 Plain link, uncapitalized
7765 <p><a href="/wiki/Main_Page" title="Main Page">main Page</a>
7772 [[Main Page|The Main Page]]
7774 <p><a href="/wiki/Main_Page" title="Main Page">The Main Page</a>
7779 Piped link with comment in link text
7781 [[Main Page|The Main<!--front--> Page]]
7783 <p><a href="/wiki/Main_Page" title="Main Page">The Main Page</a>
7788 Piped link with multiple pipe characters in link text
7790 [[Main Page||The|Main|Page|]]
7792 <p><a href="/wiki/Main_Page" title="Main Page">|The|Main|Page|</a>
7795 <p><a rel="mw:WikiLink" href="./Main_Page" title="Main Page">|The|Main|Page|</a></p>
7799 Piped link with no link text
7801 [[Thomas Bek (bishop of St David's)|]]
7803 <p>[[Thomas Bek (bishop of St David's)|]]
7806 <p>[[Thomas Bek (bishop of St David's)|]]</p>
7810 Piped link with empty link text
7812 [[Main Page|<nowiki/>]] - empty nowiki
7813 [[Main Page| ]] - empty space
7814 [[Main Page| ]] - empty non breaking space
7816 <p><a href="/wiki/Main_Page" title="Main Page"></a> - empty nowiki
7817 <a href="/wiki/Main_Page" title="Main Page"> </a> - empty space
7818 <a href="/wiki/Main_Page" title="Main Page"> </a> - empty non breaking space
7821 <p><a rel="mw:WikiLink" href="./Main_Page" title="Main Page"><span typeof="mw:Nowiki"></span></a> - empty nowiki
7822 <a rel="mw:WikiLink" href="./Main_Page" title="Main Page"> </a> - empty space
7823 <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>
7831 <p><a href="/index.php?title=Zigzagzogzagzig&action=edit&redlink=1" class="new" title="Zigzagzogzagzig (page does not exist)">Zigzagzogzagzig</a>
7836 Broken link with fragment
7838 [[Zigzagzogzagzig#zug]]
7840 <p><a href="/index.php?title=Zigzagzogzagzig&action=edit&redlink=1" class="new" title="Zigzagzogzagzig (page does not exist)">Zigzagzogzagzig#zug</a>
7845 Special page link with fragment
7847 [[Special:Version#anchor]]
7849 <p><a href="/wiki/Special:Version#anchor" title="Special:Version">Special:Version#anchor</a>
7854 Nonexistent special page link with fragment
7856 [[Special:ThisNameWillHopefullyNeverBeUsed#anchor]]
7858 <p><a href="/wiki/Special:ThisNameWillHopefullyNeverBeUsed" class="new" title="Special:ThisNameWillHopefullyNeverBeUsed (page does not exist)">Special:ThisNameWillHopefullyNeverBeUsed#anchor</a>
7865 xxx[[main Page]], xxx[[Main Page]], Xxx[[main Page]] XXX[[main Page]], XXX[[Main Page]]
7867 <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>
7874 [[Main Page]]xxx, [[Main Page]]XXX, [[Main Page]]!!!
7876 <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>!!!
7887 T45661: Piped links with identical prefixes
7889 [[prefixed article|prefixed articles with spaces]]
7891 [[prefixed article|prefixed articlesaoeu]]
7893 [[Main Page|Main Page test]]
7895 <p><a href="/wiki/Prefixed_article" title="Prefixed article">prefixed articles with spaces</a>
7896 </p><p><a href="/wiki/Prefixed_article" title="Prefixed article">prefixed articlesaoeu</a>
7897 </p><p><a href="/wiki/Main_Page" title="Main Page">Main Page test</a>
7903 Link with HTML entity in suffix / tail
7905 [[Main Page]]", [[Main Page]]a
7907 <p><a href="/wiki/Main_Page" title="Main Page">Main Page</a>", <a href="/wiki/Main_Page" title="Main Page">Main Page</a>a
7910 <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>
7914 Link with 3 brackets
7925 Link with 4 brackets
7929 <p>[[<a href="/wiki/Main_Page" title="Main Page">Main Page</a>]]
7934 Piped link with 3 brackets
7936 [[[main page|the main page]]]
7938 <p>[[[main page|the main page]]]
7943 Piped link with extlink-like text
7946 [[Main Page|This is a [bar]]]
7949 <p><a href="/wiki/Main_Page" title="Main Page">[bar]</a>
7950 <a href="/wiki/Main_Page" title="Main Page">This is a [bar]</a>
7951 <a href="/wiki/Main_Page" title="Main Page">[bar</a>
7954 <p><a rel="mw:WikiLink" href="./Main_Page" title="Main Page" data-parsoid='{"stx":"piped"}'>[bar]</a>
7955 <a rel="mw:WikiLink" href="./Main_Page" title="Main Page" data-parsoid='{"stx":"piped"}'>This is a [bar]</a>
7956 <a rel="mw:WikiLink" href="./Main_Page" title="Main Page" data-parsoid='{"stx":"piped"}'>[bar</a></p>
7960 Link with multiple pipes
7962 [[Main Page|The|Main|Page]]
7964 <p><a href="/wiki/Main_Page" title="Main Page">The|Main|Page</a>
7969 Anchor containing a #. (T65430)
7971 wgFragmentMode=[ 'html5', 'legacy' ]
7973 [[Main Page#And#Link]]
7975 <p><a href="/wiki/Main_Page#And#Link" title="Main Page">Main Page#And#Link</a>
7978 <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>
7984 [[Talk:Parser testing]], [[Meta:Disclaimers]]
7986 <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>
7991 Link with space in namespace
7993 [[User talk:Foo bar]]
7995 <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>
8000 MemoryAlpha:AlphaTest
8002 This is an article in the MemoryAlpha namespace
8003 (which shadows the memoryalpha interwiki link).
8007 Namespace takes precedence over interwiki link (T53680)
8009 [[MemoryAlpha:AlphaTest]]
8011 <p><a href="/wiki/MemoryAlpha:AlphaTest" title="MemoryAlpha:AlphaTest">MemoryAlpha:AlphaTest</a>
8015 # The previous test doesn't work correctly in html2*, due to not recognizing the
8016 # link as an internal one. This one checks for the correct behavior.
8018 Link to namespace preferred over interwiki with correct rel attribute
8020 parsoid=html2wt,html2html
8022 <p><a rel="mw:WikiLink" href="./MemoryAlpha:AlphaTest" title="MemoryAlpha:AlphaTest">MemoryAlpha:AlphaTest</a></p>
8024 [[MemoryAlpha:AlphaTest]]
8028 Piped link to namespace
8030 [[Meta:Disclaimers|The disclaimers]]
8032 <p><a href="/index.php?title=Meta:Disclaimers&action=edit&redlink=1" class="new" title="Meta:Disclaimers (page does not exist)">The disclaimers</a>
8039 [[Usually caused by a typo (oops}]]
8041 <p>[[Usually caused by a typo (oops}]]
8048 Just a test of an article title containing a percent.
8052 Link containing % (not as a hex sequence)
8055 [[7% Solution|7%25 Solution]]
8057 <p><a href="/wiki/7%25_Solution" title="7% Solution">7% Solution</a>
8058 <a href="/wiki/7%25_Solution" title="7% Solution">7%25 Solution</a>
8061 <p><a rel="mw:WikiLink" href="./7%25_Solution" title="7% Solution">7% Solution</a>
8062 <a rel="mw:WikiLink" href="./7%25_Solution" title="7% Solution">7%25 Solution</a></p>
8065 # note that the parsoid HTML is identical to the previous test output,
8066 # so the previous test ensures that the html2wt mode will generate the
8067 # "not as a hex sequence" wikitext.
8069 Link containing % as a single hex sequence interpreted to char
8071 parsoid=wt2wt,wt2html,html2html
8074 [[7%25 Solution|7%25 Solution]]
8076 <p><a href="/wiki/7%25_Solution" title="7% Solution">7% Solution</a>
8077 <a href="/wiki/7%25_Solution" title="7% Solution">7%25 Solution</a>
8080 <p><a rel="mw:WikiLink" href="./7%25_Solution" title="7% Solution">7% Solution</a>
8081 <a rel="mw:WikiLink" href="./7%25_Solution" title="7% Solution">7%25 Solution</a></p>
8085 Link containing % as a double hex sequence interpreted to hex sequence
8089 <p>[[7%2525 Solution]]
8093 ## Example for such a section: == < ==
8095 Link containing "#<" and "#>" % as a hex sequences- these are valid section anchors
8099 wgFragmentMode=[ 'html5', 'legacy' ]
8101 [[%23%3c]][[%23%3e]]
8103 <p><a href="#<">#<</a><a href="#>">#></a>
8106 <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>
8109 ## Example for such a section: == < ==
8111 Link containing "#<" and "#>" % as a hex sequences- these are valid section anchors (legacy)
8113 wgFragmentMode=[ 'legacy' ]
8115 [[%23%3c]][[%23%3e]]
8117 <p><a href="#.3C">#<</a><a href="#.3E">#></a>
8122 Link containing "<#" and ">#" as a hex sequences
8124 [[%3c%23]][[%3e%23]]
8126 <p>[[%3c%23]][[%3e%23]]
8131 Link containing an equals sign
8133 [[Special:BookSources/isbn=4-00-026157-6]]
8135 <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>
8138 <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>
8144 Just a test of an article title containing an ampersand
8148 Link containing an ampersand
8154 [[Foo &amp; bar]]
8156 <p><a href="/wiki/Foo_%26_bar" title="Foo & bar">Foo & bar</a>
8157 </p><p><a href="/wiki/Foo_%26_bar" title="Foo & bar">Foo & bar</a>
8158 </p><p>[[Foo &amp; bar]]
8161 <p><a rel="mw:WikiLink" href="./Foo_&_bar" title="Foo & bar">Foo & bar</a></p>
8162 <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>
8163 <p>[[Foo <span typeof="mw:Entity" data-parsoid='{"src":"&amp;","srcContent":"&"}'>&</span>amp; bar]]</p>
8169 Just a test of an article title containing a tilde.
8172 # note that links containing signatures, like [[Foo~~~~]], are
8173 # massaged by the pre-save transform (PST) and so the tildes are never
8174 # seen by the parser.
8176 Link containing a tilde
8180 <p><a href="/wiki/Foo~bar" title="Foo~bar">Foo~bar</a>
8183 <p><a rel="mw:WikiLink" href="./Foo~bar" title="Foo~bar">Foo~bar</a></p>
8187 Link containing double-single-quotes '' (T6598)
8189 [[Lista d''e paise d''o munno]]
8191 <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>
8194 <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>
8198 Link containing double quotes and spaces
8202 <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>
8205 <p><a rel="mw:WikiLink" href='./Cool_"Gator"' title='Cool "Gator"'>Cool "Gator"</a></p>
8209 File containing double quotes and spaces
8211 [[File:Cool "Gator".png]]
8213 <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>
8217 Redirect containing double quotes and spaces
8219 #REDIRECT [[Cool "Gator"]]
8221 <link rel="mw:PageProp/redirect" href="./Cool_%22Gator%22" data-parsoid='{"src":"#REDIRECT ","a":{"href":"./Cool_%22Gator%22"},"sa":{"href":"Cool \"Gator\""}}'/>
8225 Link containing double-single-quotes '' in text (T6598 sanity check)
8227 Some [[Link|pretty ''italics'' and stuff]]!
8229 <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>!
8232 <p>Some <a rel="mw:WikiLink" href="./Link" title="Link">pretty <i>italics</i> and stuff</a>!</p>
8236 Link containing double-single-quotes '' in text embedded in italics (T6598 sanity check)
8238 ''Some [[Link|pretty ''italics'' and stuff]]!''
8240 <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>
8245 Link with double quotes in title part (literal) and alternate part (interpreted)
8247 [[File:Denys_Savchenko_''Pentecoste''.jpg]]
8251 [[''Pentecoste''|Pentecoste]]
8253 [[''Pentecoste''|''Pentecoste'']]
8255 <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>
8256 </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>
8257 </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>
8258 </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>
8261 <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>
8262 <p><a rel="mw:WikiLink" href="./''Pentecoste''" title="''Pentecoste''">''Pentecoste''</a></p>
8263 <p><a rel="mw:WikiLink" href="./''Pentecoste''" title="''Pentecoste''">Pentecoste</a></p>
8264 <p><a rel="mw:WikiLink" href="./''Pentecoste''" title="''Pentecoste''"><i>Pentecoste</i></a></p>
8268 Broken image links with HTML captions (T41700)
8270 [[File:Nonexistent|<script></script>]]
8271 [[File:Nonexistent|100x100px|<script></script>]]
8272 [[File:Nonexistent|<]]
8273 [[File:Nonexistent|a<i>b</i>c]]
8275 <p><a href="/index.php?title=Special:Upload&wpDestFile=Nonexistent" class="new" title="File:Nonexistent"><script></script></a>
8276 <a href="/index.php?title=Special:Upload&wpDestFile=Nonexistent" class="new" title="File:Nonexistent"><script></script></a>
8277 <a href="/index.php?title=Special:Upload&wpDestFile=Nonexistent" class="new" title="File:Nonexistent"><</a>
8278 <a href="/index.php?title=Special:Upload&wpDestFile=Nonexistent" class="new" title="File:Nonexistent">abc</a>
8281 <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>
8282 <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>
8283 <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>
8284 <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>
8290 [[http://www.example.com]]
8292 <p>[<a rel="nofollow" class="external autonumber" href="http://www.example.com">[1]</a>]
8295 <p>[<a rel="mw:ExtLink" class="external autonumber" href="http://www.example.com"></a>]</p>
8299 Plain link to URL with link text
8301 [[http://www.example.com Link text]]
8303 <p>[<a rel="nofollow" class="external text" href="http://www.example.com">Link text</a>]
8308 Plain link to protocol-relative URL
8310 [[//www.example.com]]
8312 <p>[<a rel="nofollow" class="external autonumber" href="//www.example.com">[1]</a>]
8315 <p>[<a rel="mw:ExtLink" class="external autonumber" href="//www.example.com"></a>]</p>
8319 Plain link to protocol-relative URL with link text
8321 [[//www.example.com Link text]]
8323 <p>[<a rel="nofollow" class="external text" href="//www.example.com">Link text</a>]
8328 Plain link to page with question mark in title
8334 <p><a href="/wiki/A%3Fb" title="A?b">A?b</a>
8335 </p><p><a href="/wiki/A%3Fb" title="A?b">Baz</a>
8339 # I'm fairly sure the expected result here is wrong.
8340 # We want these to be URL links, not pseudo-pages with URLs for titles....
8341 # However the current output is also pretty screwy.
8344 # I'm changing it to match the current output--it arguably makes more
8345 # sense in the light of the test above. Old expected result was:
8346 #<p>Piped link to URL: <a href="/index.php?title=Http://www.example.com&action=edit" class="new">an example URL</a>
8348 # But I think this test is bordering on "garbage in, garbage out" anyway.
8353 Piped link to URL: [[http://www.example.com|an example URL]]
8355 <p>Piped link to URL: [<a rel="nofollow" class="external text" href="http://www.example.com%7Can">example URL</a>]
8358 <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>
8362 Plain link in template argument
8366 {{echo|[http://www.example.com |123]}}
8368 {{echo|[[http://www.example.com |123]]}}
8370 {{echo|[[http://www.example.com |123]}}
8372 {{echo|[http://www.example.com |123]]}}
8374 <p>[<a rel="nofollow" class="external free" href="http://www.example.com">http://www.example.com</a>
8375 </p><p>[<a rel="nofollow" class="external text" href="http://www.example.com">|123</a>]
8376 </p><p>{{echo|[<a rel="nofollow" class="external text" href="http://www.example.com">|123</a>}}
8377 </p><p>[<a rel="nofollow" class="external free" href="http://www.example.com">http://www.example.com</a>
8380 <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>
8382 <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>
8384 <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>
8386 <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>
8390 T2002: [[page|http://url/]] should link to page, not http://url/
8392 [[Main Page|http://url/]]
8394 <p><a href="/wiki/Main_Page" title="Main Page">http://url/</a>
8397 <p><a rel="mw:WikiLink" href="./Main_Page" title="Main Page">http://url/</a></p>
8400 # Parsoid does not mark self-links, by design.
8402 T2337: Escaped self-links should be bold
8406 [[Bug462]] [[Bug462]]
8408 <p><a class="mw-selflink selflink">Bug462</a> <a class="mw-selflink selflink">Bug462</a>
8411 <p><a rel="mw:WikiLink" href="./Bug462" title="Bug462">Bug462</a> <a rel="mw:WikiLink" href="./Bug462" title="Bug462">Bug462</a></p>
8415 Self-link to section should not be bold
8419 [[Main Page#section]]
8421 <p><a href="/wiki/Main_Page#section" title="Main Page">Main Page#section</a>
8432 Self-link to numeric title
8438 <p><a class="mw-selflink selflink">0</a>
8443 Link to numeric-equivalent title
8449 <p><a href="/wiki/00" title="00">00</a>
8454 <nowiki> inside a link
8456 [[Main<nowiki> Page</nowiki>]] [[Main Page|the main page <nowiki>[it's not very good]</nowiki>]]
8458 <p>[[Main Page]] <a href="/wiki/Main_Page" title="Main Page">the main page [it's not very good]</a>
8461 <p>[[Main<span typeof="mw:Nowiki"> Page</span>]] <a rel="mw:WikiLink" href="./Main_Page" title="Main Page">the main page <span typeof="mw:Nowiki">[it's not very good]</span></a></p>
8464 ## Parsoid doesn't get this right and even fails wt2html because, when doing the
8465 ## normalization for comparison, the html serialization / re-parse doesn't
8466 ## roundtrip. This is T49963
8470 [[Main<pre> Page</pre>]] [[Main Page|the main page <pre>[it's not very good]</pre>]]
8472 <p>[[Main</p><pre> Page</pre><p>]] <a href="/wiki/Main_Page" title="Main Page">the main page </a></p><a href="/wiki/Main_Page" title="Main Page"><pre>[it's not very good]</pre></a>
8474 <p>[[Main</p><pre typeof="mw:Extension/pre" about="#mwt4" data-mw='{"name":"pre","attrs":{},"body":{"extsrc":" Page"}}'> Page</pre><p>]] <a rel="mw:WikiLink" href="./Main_Page" title="Main Page">the main page <pre typeof="mw:Extension/pre" about="#mwt6" data-mw='{"name":"pre","attrs":{},"body":{"extsrc":"[it's not very good]"}}'>[it's not very good]</pre></a></p>
8478 Non-breaking spaces in title
8480 [[ Main Page ]]
8482 <p><a href="/wiki/Main_Page" title="Main Page">  Main   Page  </a>
8486 # Add new article for the test below so that it doesn't red-link
8494 Multiple spaces in titles should normalize to a single underscore
8496 parsoid=wt2html,wt2wt
8502 <p><a href="/wiki/Foo_bar_baz" title="Foo bar baz">x</a>
8503 <a href="/wiki/Foo_bar_baz" title="Foo bar baz">x</a>
8504 <a href="/wiki/Foo_bar_baz" title="Foo bar baz">x</a>
8507 <p><a rel="mw:WikiLink" href="./Foo_bar_baz" title="Foo bar baz">x</a>
8508 <a rel="mw:WikiLink" href="./Foo_bar_baz" title="Foo bar baz">x</a>
8509 <a rel="mw:WikiLink" href="./Foo_bar_baz" title="Foo bar baz">x</a>
8514 Internal link with ca linktrail, surrounded by bold apostrophes (T29473 primary issue)
8520 <p><b><a href="/wiki/Main_Page" title="Main Page">Main Page</a></b>
8525 Internal link with ca linktrail, surrounded by italic apostrophes (T29473 primary issue)
8531 <p><i><a href="/wiki/Main_Page" title="Main Page">Main Page</a></i>
8536 Internal link with en linktrail: no apostrophes (T29473)
8542 <p><a href="/index.php?title=Something&action=edit&redlink=1" class="new" title="Something (page does not exist)">Something</a>'nice
8547 Internal link with ca linktrail with apostrophes (T29473)
8553 <p><a href="/index.php?title=Something&action=edit&redlink=1" class="new" title="Something (encara no existeix)">Something'nice</a>
8558 Internal link with kaa linktrail with apostrophes (T29473)
8564 <p><a href="/index.php?title=Something&action=edit&redlink=1" class="new" title="Something (bet ele jaratılmag'an)">Something'nice</a>
8569 Link with multiple ":" in a subpage-supporting namespace (T65636)
8571 [[User:Foo/Test/63636:Bar|Test]]
8573 <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>
8576 <p><a rel="mw:WikiLink" href="./User:Foo/Test/63636:Bar" title="User:Foo/Test/63636:Bar">Test</a></p>
8579 ## Mainly a sanity check for Parsoid
8581 Handle title parsing for subpages
8601 Link to a subpage from a namespace other than main
8608 <p><a href="/wiki/User:Test/123" title="User:Test/123">/123</a>
8611 <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>
8615 Ensure that transclusion titles are not url-decoded
8617 subpage title=[[Test]]
8620 {{Bar%C3%A9}} {{/Bar%C3%A9}}
8622 <p>{{Bar%C3%A9}} {{/Bar%C3%A9}}
8625 <p>{{Bar%C3%A9}} {{/Bar%C3%A9}}</p>
8629 Purely hash wikilink
8631 title=[[User:Test/123]]
8636 <p><a href="#a">b</a>
8639 <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>
8643 Serialization of purely hash wikilink
8645 title=[[User:Test/123]]
8649 <p><a href="#a">[[</a></p>
8651 [[#a|<nowiki>[[</nowiki>]]
8653 <p><a href="#a">[[</a>
8658 1. Interaction of linktrail and template encapsulation
8662 <p><a href="/wiki/Foo" title="Foo">Fool</a>
8665 <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>
8669 2. Interaction of linktrail and template encapsulation
8671 {{echo|Some [[Fool]]}}s
8673 <p>Some <a href="/index.php?title=Fool&action=edit&redlink=1" class="new" title="Fool (page does not exist)">Fools</a>
8676 <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>
8680 3. Interaction of linktrail and template encapsulation
8682 {{echo|Some [[Fool]]s are '''bold and foolish'''}}
8684 <p>Some <a href="/index.php?title=Fool&action=edit&redlink=1" class="new" title="Fool (page does not exist)">Fools</a> are <b>bold and foolish</b>
8687 <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>
8697 Internal link with is link prefix
8701 Aðrir mótmælenda[[söfnuður|söfnuðir]] og
8703 <p>Aðrir <a href="/wiki/S%C3%B6fnu%C3%B0ur" title="Söfnuður">mótmælendasöfnuðir</a> og
8714 Internal link with is link trail and link prefix
8718 [[mótmælendatrú|xxx]]ar
8720 mótmælenda[[söfnuður]]
8721 mótmælenda[[söfnuður|söfnuðir]]
8722 mótmælenda[[söfnuður|söfnuðir]]xxx
8724 <p><a href="/wiki/M%C3%B3tm%C3%A6lendatr%C3%BA" title="Mótmælendatrú">xxxar</a>
8725 <a href="/wiki/M%C3%B3tm%C3%A6lendatr%C3%BA" title="Mótmælendatrú">mótmælendatrúar</a>
8726 <a href="/wiki/S%C3%B6fnu%C3%B0ur" title="Söfnuður">mótmælendasöfnuður</a>
8727 <a href="/wiki/S%C3%B6fnu%C3%B0ur" title="Söfnuður">mótmælendasöfnuðir</a>
8728 <a href="/wiki/S%C3%B6fnu%C3%B0ur" title="Söfnuður">mótmælendasöfnuðirxxx</a>
8733 Parsoid link trail escaping
8735 parsoid=html2wt,html2html
8737 <p><a rel="mw:WikiLink" href="./Apple" title="Apple">apple</a>s</p>
8743 Parsoid link prefix escaping
8746 parsoid=html2wt,html2html
8748 <p>Aðrir mótmælenda<a rel="mw:WikiLink" href="./Söfnuður" title="Söfnuður">söfnuður</a></p>
8750 Aðrir mótmælenda<nowiki/>[[söfnuður]]
8754 Parsoid link bracket escaping
8756 parsoid=html2wt,html2html
8758 <p><a rel="mw:WikiLink" href="./Test" title="Test">Test</a></p>
8759 <p>[<a rel="mw:WikiLink" href="./Test" title="Test">Test</a>]</p>
8760 <p>[[<a rel="mw:WikiLink" href="./Test" title="Test">Test</a>]]</p>
8761 <p>[[[<a rel="mw:WikiLink" href="./Test" title="Test">Test</a>]]]</p>
8762 <p>[[[[<a rel="mw:WikiLink" href="./Test" title="Test">Test</a>]]]]</p>
8763 <p>[[[[[<a rel="mw:WikiLink" href="./Test" title="Test">Test</a>]]]]]</p>
8771 [[[<nowiki/>[[Test]]]]]
8775 [[[[[<nowiki/>[[Test]]]]]]]
8779 Parsoid-centric test: Whitespace in ext- and wiki-links should be preserved
8787 [http://wp.org ''foo'']
8789 <p><a href="/wiki/Foo" title="Foo"> bar</a>
8790 </p><p><a href="/wiki/Foo" title="Foo"> <i>bar</i></a>
8791 </p><p><a rel="nofollow" class="external text" href="http://wp.org">foo</a>
8792 </p><p><a rel="nofollow" class="external text" href="http://wp.org"><i>foo</i></a>
8797 Parsoid: Scoped parsing should handle mixed transclusions and plain text
8799 [[Foo|{{echo|a}} b {{echo|c}}]]
8801 <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>
8805 Link with angle bracket after anchor
8807 wgFragmentMode=[ 'html5', 'legacy' ]
8811 <p><a href="/wiki/Foo#<bar>" title="Foo">Foo#<bar></a>
8814 <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>
8818 Link with angle bracket after anchor (legacy)
8820 wgFragmentMode=[ 'legacy' ]
8824 <p><a href="/wiki/Foo#.3Cbar.3E" title="Foo">Foo#<bar></a>
8829 ### Interwiki links (see maintenance/interwiki.sql)
8833 Inline interwiki link
8835 parsoid=wt2html,wt2wt,html2html
8837 [[MeatBall:SoftSecurity]]
8839 <p><a href="http://www.usemod.com/cgi-bin/mb.pl?SoftSecurity" class="extiw" title="meatball:SoftSecurity">MeatBall:SoftSecurity</a>
8842 <p><a rel="mw:WikiLink/Interwiki" href="http://www.usemod.com/cgi-bin/mb.pl?SoftSecurity" title="meatball:SoftSecurity">MeatBall:SoftSecurity</a></p>
8846 Inline interwiki link with empty title (T4372)
8848 parsoid=wt2html,wt2wt,html2html
8852 <p><a href="http://www.usemod.com/cgi-bin/mb.pl" class="extiw" title="meatball:">MeatBall:</a>
8855 <p><a rel="mw:WikiLink/Interwiki" href="http://www.usemod.com/cgi-bin/mb.pl?" title="meatball:">MeatBall:</a></p>
8858 ## html2wt and html2html will fail because we will prefer the :en: interwiki prefix over wikipedia:
8860 Interwiki link encoding conversion (T3636)
8862 parsoid=wt2html,wt2wt
8864 *[[Wikipedia:ro:Olteniţa]]
8865 *[[Wikipedia:ro:Olteniţa]]
8867 <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>
8868 <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>
8871 <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>
8872 <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>
8875 <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>
8876 <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>
8881 Interwiki link with fragment (T4130)
8883 [[MeatBall:SoftSecurity#foo]]
8885 <p><a href="http://www.usemod.com/cgi-bin/mb.pl?SoftSecurity#foo" class="extiw" title="meatball:SoftSecurity">MeatBall:SoftSecurity#foo</a>
8889 ## The interwiki case here continued to be legacy escaped because of the
8890 ## default setting of $wgExternalInterwikiFragmentMode
8892 Link scenarios with escaped fragments
8896 wgFragmentMode=[ 'html5', 'legacy' ]
8899 [[Foo#Is this great?]]
8900 [[meatball:Foo#Is this great?]]
8902 <p><a href="#Is_this_great?">#Is this great?</a>
8903 <a href="/wiki/Foo#Is_this_great?" title="Foo">Foo#Is this great?</a>
8904 <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>
8907 <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>
8908 <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>
8909 <a rel="mw:WikiLink/Interwiki" href="http://www.usemod.com/cgi-bin/mb.pl?Foo#Is_this_great.3F" title="meatball:Foo" data-parsoid='{"stx":"simple","a":{"href":"http://www.usemod.com/cgi-bin/mb.pl?Foo#Is_this_great.3F"},"sa":{"href":"meatball:Foo#Is this great?"},"isIW":true}'>meatball:Foo#Is this great?</a></p>
8913 Link scenarios with escaped fragments (legacy)
8915 wgFragmentMode=[ 'legacy' ]
8918 [[Foo#Is this great?]]
8919 [[meatball:Foo#Is this great?]]
8921 <p><a href="#Is_this_great.3F">#Is this great?</a>
8922 <a href="/wiki/Foo#Is_this_great.3F" title="Foo">Foo#Is this great?</a>
8923 <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>
8927 # Ideally the wikipedia: prefix here should be proto-relative too
8928 # [CSA]: this is kind of a bogus test, as the PHP parser test doesn't
8929 # define the 'en' prefix, and originally the test used 'wikipedia',
8930 # which isn't a localinterwiki prefix hence the links to the 'en:Foo'
8933 Different interwiki prefixes mapping to the same URL
8941 [[:wikipedia:Foo|Foo]]
8943 [[wikipedia:en:Foo]]
8945 [[:wikipedia:en:Foo]]
8949 <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>
8951 <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>
8953 <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>
8955 <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>
8957 <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>
8959 <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>
8961 <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>
8965 Interwiki links that cannot be represented in wiki syntax
8968 [[meatball:ok#foo|ok with fragment]]
8969 [[meatball:ok_as_well?|ok ending with ? mark]]
8970 [http://de.wikipedia.org/wiki/Foo?action=history has query]
8971 [http://de.wikipedia.org/wiki/#foo is just fragment]
8974 <p><a href="http://www.usemod.com/cgi-bin/mb.pl?ok" class="extiw" title="meatball:ok">meatball:ok</a>
8975 <a href="http://www.usemod.com/cgi-bin/mb.pl?ok#foo" class="extiw" title="meatball:ok">ok with fragment</a>
8976 <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>
8977 <a rel="nofollow" class="external text" href="http://de.wikipedia.org/wiki/Foo?action=history">has query</a>
8978 <a rel="nofollow" class="external text" href="http://de.wikipedia.org/wiki/#foo">is just fragment</a>
8981 <p><a rel="mw:WikiLink/Interwiki" href="http://www.usemod.com/cgi-bin/mb.pl?ok" title="meatball:ok">meatball:ok</a>
8982 <a rel="mw:WikiLink/Interwiki" href="http://www.usemod.com/cgi-bin/mb.pl?ok#foo" title="meatball:ok">ok with fragment</a>
8983 <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>
8984 <a rel="mw:ExtLink" class="external text" href="http://de.wikipedia.org/wiki/Foo?action=history">has query</a>
8985 <a rel="mw:ExtLink" class="external text" href="http://de.wikipedia.org/wiki/#foo">is just fragment</a></p>
8989 Interwiki links: trail
8991 [[wikipedia:Foo|Ba]]r
8993 <p><a href="http://en.wikipedia.org/wiki/Foo" class="extiw" title="wikipedia:Foo">Bar</a>
8996 <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>
9000 Local interwiki link
9002 parsoid=wt2html,wt2wt,html2html
9004 [[local:Template:Foo]]
9006 <p><a href="/wiki/Template:Foo" title="Template:Foo">local:Template:Foo</a>
9009 <p><a rel="mw:WikiLink" href="./Template:Foo" title="Template:Foo">local:Template:Foo</a></p>
9012 # Parsoid does not mark self-links, by design.
9014 Local interwiki link: self-link to current page
9017 parsoid=wt2html,wt2wt,html2html
9021 <p><a class="mw-selflink selflink">local:Main Page</a>
9024 <p><a rel="mw:WikiLink" href="./Main_Page" title="Main Page">local:Main Page</a></p>
9028 Local interwiki link: prefix only (T66167)
9030 parsoid=wt2html,wt2wt,html2html
9034 <p><a href="/wiki/Main_Page" title="Main Page">local:</a>
9037 <p><a rel="mw:WikiLink" href="./Main_Page" title="Main Page">local:</a></p>
9041 Local interwiki link: with additional interwiki prefix (T63357)
9043 parsoid=wt2html,wt2wt,html2html
9045 [[local:meatball:Hello]]
9047 <p><a href="http://www.usemod.com/cgi-bin/mb.pl?Hello" class="extiw" title="meatball:Hello">local:meatball:Hello</a>
9050 <p><a rel="mw:WikiLink/Interwiki" href="http://www.usemod.com/cgi-bin/mb.pl?Hello" title="meatball:Hello">local:meatball:Hello</a></p>
9054 Multiple local interwiki link prefixes
9056 [[local:local:local:local:mi:local:Foo]]
9058 parsoid=wt2html,wt2wt,html2html
9060 <p><a href="/wiki/Foo" title="Foo">local:local:local:local:mi:local:Foo</a>
9063 <p><a rel="mw:WikiLink" href="./Foo" title="Foo">local:local:local:local:mi:local:Foo</a></p>
9067 Interwiki link with percent encoded target
9069 [[:es:Nueva Guip%C3%BAzcoa|Nueva Guipúzcoa]]
9071 <p><a href="http://es.wikipedia.org/wiki/Nueva_Guip%C3%BAzcoa" class="extiw" title="es:Nueva Guipúzcoa">Nueva Guipúzcoa</a>
9074 <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>
9078 ### Interlanguage links
9079 ### Language links (so that searching for '### language' matches..)
9091 <p>Blah blah blah</p>
9092 <link rel="mw:PageProp/Language" href="http://zh.wikipedia.org/wiki/Chinese"/>
9095 ## parsoid html2wt will lose the space variations
9097 Interlanguage link with spacing
9099 parsoid=wt2html,wt2wt,html2html
9107 <p>Blah blah blah</p>
9108 <link rel="mw:PageProp/Language" href="http://zh.wikipedia.org/wiki/Chinese"/>
9112 Double interlanguage link
9121 <p>Blah blah blah</p>
9122 <link rel="mw:PageProp/Language" href="http://es.wikipedia.org/wiki/Spanish"/>
9123 <link rel="mw:PageProp/Language" href="http://zh.wikipedia.org/wiki/Chinese"/>
9126 ## parsoid html2wt will lose the space variations
9128 Interlanguage link variations
9130 parsoid=wt2html,wt2wt,html2html
9140 <p>Blah blah blah</p>
9141 <link rel="mw:PageProp/Language" href="http://es.wikipedia.org/wiki/Spanish" />
9142 <link rel="mw:PageProp/Language" href="http://zh.wikipedia.org/wiki/Chinese" />
9143 <link rel="mw:PageProp/Language" href="http://es.wikipedia.org/wiki/Foo_bar" />
9147 Escaping of interlanguage links (T129218, T156308)
9151 [[ : zh : Chinese ]]
9154 <a href="http://es.wikipedia.org/wiki/Spanish" class="extiw" title="es:Spanish">es:Spanish</a>
9155 <a href="http://zh.wikipedia.org/wiki/Chinese" class="extiw" title="zh:Chinese"> zh : Chinese </a>
9159 <a rel="mw:WikiLink/Interwiki" href="http://es.wikipedia.org/wiki/Spanish" title="es:Spanish">es:Spanish</a>
9160 <a rel="mw:WikiLink/Interwiki" href="http://zh.wikipedia.org/wiki/Chinese" title="zh:Chinese"> zh : Chinese </a></p>
9164 Multiple colons escaping interlanguage links
9172 <p><a href="http://es.wikipedia.org/wiki/Spanish" class="extiw" title="es:Spanish">es:Spanish</a>
9177 <p><a rel="mw:WikiLink/Interwiki" href="http://es.wikipedia.org/wiki/Spanish" title="es:Spanish">es:Spanish</a>
9179 [[:::es:Spanish]]</p>
9182 ## parsoid html2wt will normalize the space to _
9184 Space and question mark encoding in interlanguage links (T95473)
9186 parsoid=wt2html,wt2wt,html2html
9194 <p>Blah blah blah</p>
9195 <link rel="mw:PageProp/Language" href="http://es.wikipedia.org/wiki/Foo_bar%3F" />
9199 Interlanguage link, with prefix links
9209 <p>Blah blah blah</p>
9210 <link rel="mw:PageProp/Language" href="http://zh.wikipedia.org/wiki/Chinese"/>
9214 Double interlanguage link, with prefix links (T10897)
9225 <p>Blah blah blah</p>
9226 <link rel="mw:PageProp/Language" href="http://es.wikipedia.org/wiki/Spanish"/>
9227 <link rel="mw:PageProp/Language" href="http://zh.wikipedia.org/wiki/Chinese"/>
9231 "Extra" interlanguage links (T34189 / gerrit 111390)
9239 <p>Blah blah blah</p>
9240 <link rel="mw:PageProp/Language" title="Multilingual" href="http://wikisource.org/wiki/Article"/>
9243 ## PHP parser tests script needs an update
9244 ## Parsoid html2wt will normalize output to [[:zh:Chinese]]
9246 Language links render as inline links if $wgInterwikiMagic=false
9248 wgInterwikiMagic=false
9249 parsoid=wt2html,wt2wt,html2html
9254 <p>Blah blah blah <a rel="mw:WikiLink/Interwiki" href="http://zh.wikipedia.org/wiki/Chinese" title="zh:Chinese">zh:Chinese</a></p>
9257 ## PHP parser tests script needs an update
9258 ## Parsoid html2wt will normalize output to [[:zh:Chinese]]
9260 Language links render as inline links in the Talk namespace
9263 parsoid=wt2html,wt2wt,html2html
9268 <p>Blah blah blah <a rel="mw:WikiLink/Interwiki" href="http://zh.wikipedia.org/wiki/Chinese" title="zh:Chinese">zh:Chinese</a></p>
9272 Parsoid-specific test: Wikilinks with should RT properly
9278 <p><a href="/index.php?title=WW_II&action=edit&redlink=1" class="new" title="WW II (lonkásá ezalí tɛ̂)">WW II</a>
9283 Parsoid T55221: Wikilinks should be properly entity-escaped
9285 parsoid={ "modes": ["html2wt"], "suppressErrors": true }
9287 <p>He&nbsp;llo <a href="./Foo" rel="mw:WikiLink">He&nbsp;llo</a></p>
9288 <p>He&nbsp;llo <a href="./He&nbsp;llo" rel="mw:WikiLink">He&nbsp;llo</a></p>
9290 He&nbsp;llo [[Foo|He&nbsp;llo]]
9292 He&nbsp;llo He&nbsp;llo
9294 <p>He&nbsp;llo <a href="/wiki/Foo" title="Foo">He&nbsp;llo</a>
9295 </p><p>He&nbsp;llo He&nbsp;llo
9299 # html2wt will fail because of title normalization without data-parsoid
9301 Parsoid: handle constructor well
9303 parsoid=wt2html,wt2wt
9309 <p><a href="/index.php?title=Constructor&action=edit&redlink=1" class="new" title="Constructor (page does not exist)">constructor</a>
9310 </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>
9313 <p><a rel="mw:WikiLink" href="./Constructor" title="Constructor" data-parsoid='{"stx":"simple","a":{"href":"./Constructor"},"sa":{"href":"constructor"}}'>constructor</a></p>
9315 <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>
9319 Template parameter named "constructor"
9321 {{echo| constructor = |hi}}
9323 <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>
9332 # Note that `ko` isn't a known interlanguage prefix
9334 Parsoid: recognize interlanguage links without a target page
9344 <link rel="mw:PageProp/Language" href="http://es.wikipedia.org/wiki/"/>
9346 <p><a rel="mw:WikiLink" href="./Ko:" title="Ko:">ko:</a></p>
9349 # Note that `ko` isn't a known interwiki prefix
9351 Parsoid: recognize interwiki links without a target page
9353 parsoid=wt2html,wt2wt,html2html
9359 <p><a href="http://es.wikipedia.org/wiki/" class="extiw" title="es:">es:</a>
9360 </p><p><a href="/wiki/Ko:" title="Ko:">ko:</a>
9363 <p><a rel="mw:WikiLink/Interwiki" href="http://es.wikipedia.org/wiki/" title="es:">es:</a></p>
9364 <p><a rel="mw:WikiLink" href="./Ko:" title="Ko:">ko:</a></p>
9368 Handle interwiki links pointing to the current wiki as plain wiki links (T47209)
9372 <p><a href="/wiki/Foo" title="Foo">mi:Foo</a>
9375 <p><a rel="mw:WikiLink" href="./Foo" title="Foo" data-parsoid='{"stx":"simple","a":{"href":"./Foo"},"sa":{"href":"mi:Foo"}}'>mi:Foo</a></p>
9379 Interlanguage link with preceding local interwiki link (T70085)
9381 parsoid=wt2html,wt2wt,html2html
9384 [[local:es:Spanish]]
9387 <a href="http://es.wikipedia.org/wiki/Spanish" class="extiw" title="es:Spanish">local:es:Spanish</a>
9391 <a rel="mw:WikiLink/Interwiki" href="http://es.wikipedia.org/wiki/Spanish" title="es:Spanish">local:es:Spanish</a></p>
9395 Looks like an interlanguage link, but is actually a local interwiki
9397 parsoid=wt2html,wt2wt,html2html
9403 <a href="/wiki/Template:Foo" title="Template:Foo">mi:Template:Foo</a>
9407 <a rel="mw:WikiLink" href="./Template:Foo" title="Template:Foo">mi:Template:Foo</a></p>
9411 ### Redirects, Parsoid-only
9415 1. Simple redirect to page
9417 #REDIRECT [[Main Page]]
9419 <link rel="mw:PageProp/redirect" href="./Main_Page"/>
9423 2. Other redirect variants
9425 #REDIRECT [[Main_Page]]
9427 <link rel="mw:PageProp/redirect" href="./Main_Page" data-parsoid='{"src":"#REDIRECT ","a":{"href":"./Main_Page"},"sa":{"href":"Main_Page"}}'/>
9430 # Not a valid redirect in PHP (although perhaps it was, once upon a time)
9431 # This tests the Parsoid bail-out code.
9433 3. Other redirect variants
9437 #REDIRECT [[<nowiki>[[Bar]]</nowiki>]]
9439 <ol><li>REDIRECT [[<span typeof="mw:Nowiki">[[Bar]]</span>]]</li></ol>
9443 4. Redirect to a templated destination
9445 #REDIRECT [[{{echo|Foo}}bar]]
9447 <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"}]]}'/>
9453 parsoid=wt2html,wt2wt
9458 <li>REDIRECT [[]]</li></ol>
9462 Optional colon in #REDIRECT
9464 # the colon is archaic syntax. we support it for wt2html, but we
9465 # don't care that it roundtrips back to the modern syntax.
9466 parsoid=wt2html,html2html
9468 #REDIRECT:[[Main Page]]
9470 <link rel="mw:PageProp/redirect" href="./Main_Page"/>
9474 Whitespace in #REDIRECT with optional colon
9476 # the colon and gratuitous whitespace is archaic syntax. we support
9477 # it for wt2html, but we don't care that it roundtrips back to the
9478 # modern syntax (without extra whitespace)
9479 parsoid=wt2html,html2html
9486 <link rel="mw:PageProp/redirect" href="./Main_Page"/>
9490 Piped link in #REDIRECT
9492 # content after piped link is ignored. we support this syntax,
9493 # but don't care that the piped link is lost when we roundtrip this.
9496 #REDIRECT [[Main Page|bar]]
9498 <link rel="mw:PageProp/redirect" href="./Main_Page"/>
9502 Redirect to category (T104502)
9504 parsoid=wt2html,wt2wt
9506 #REDIRECT [[Category:Foo]]
9508 <link rel="mw:PageProp/redirect" href="./Category:Foo"/>
9512 Redirect to category with URL encoding (T104502)
9516 #REDIRECT [[Category%3AFoo]]
9518 <link rel="mw:PageProp/redirect" href="./Category:Foo"/>
9522 Redirect to category page
9524 #REDIRECT [[:Category:Foo]]
9526 <link rel="mw:PageProp/redirect" href="./Category:Foo"/>
9530 Redirect to image page (1)
9532 #REDIRECT [[File:Wiki.png]]
9534 <link rel="mw:PageProp/redirect" href="./File:Wiki.png"/>
9538 Redirect to image page (2)
9540 #REDIRECT [[Image:Wiki.png]]
9542 <link rel="mw:PageProp/redirect" href="./File:Wiki.png" data-parsoid='{"src":"#REDIRECT ","a":{"href":"./File:Wiki.png"},"sa":{"href":"Image:Wiki.png"}}'/>
9545 # html2wt disabled because wts serializes as "#REDIRECT [[:en:File:Wiki.png]]"
9546 # Next test confirms this.
9548 Redirect to language (1) (T104918)
9550 parsoid=wt2html,wt2wt,html2html
9552 #REDIRECT [[en:File:Wiki.png]]
9554 <link rel="mw:PageProp/redirect" href="//en.wikipedia.org/wiki/File:Wiki.png"/>
9558 Redirect to language (2) (T104918)
9560 #REDIRECT [[:en:File:Wiki.png]]
9562 <link rel="mw:PageProp/redirect" href="//en.wikipedia.org/wiki/File:Wiki.png"/>
9566 Redirect to interwiki (T104918)
9568 #REDIRECT [[meatball:File:Wiki.png]]
9570 <link rel="mw:PageProp/redirect" href="http://www.usemod.com/cgi-bin/mb.pl?File:Wiki.png"/>
9574 Non-English #REDIRECT
9578 #TILVÍSUN [[Main Page]]
9580 <link rel="mw:PageProp/redirect" href="./Main_Page" data-parsoid='{"src":"#TILVÍSUN ","a":{"href":"./Main_Page"},"sa":{"href":"Main Page"}}'/>
9584 Redirect syntax under text isn't considered a redirect
9588 #redirect [[Main Page]]
9591 <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>
9599 <p>Foo<link rel="mw:PageProp/redirect" href="./Foo"/></p>
9606 Redirect followed by block on the same line
9610 #REDIRECT [[Main Page]]<!-- haha -->==hi==
9612 <link rel="mw:PageProp/redirect" href="./Main_Page"/><!-- haha --><h2 id="hi">hi</h2>
9616 Redirect followed by a newline
9618 #REDIRECT [[Main Page]]
9621 <link rel="mw:PageProp/redirect" href="./Main_Page"/>
9626 Redirect followed by multiple newlines
9628 #REDIRECT [[Main Page]]
9633 <link rel="mw:PageProp/redirect" href="./Main_Page"/>
9640 Drop duplicate redirects
9644 <link rel="mw:PageProp/redirect" href="./Foo"/>
9645 <link rel="mw:PageProp/redirect" href="./Bar"/>
9646 <link rel="mw:PageProp/redirect" href="./Baz"/>
9665 Broken br tag sanitization
9673 # TODO: Fix html2html mode (T53055)!
9675 Parsoid: Broken br tag recognition
9689 Incorrecly removing closing slashes from correctly formed XHTML
9691 <br style="clear:both;" />
9693 <p><br style="clear:both;" />
9698 Failing to transform badly formed HTML into correct XHTML
9700 <br style="clear: left;">
9701 <br style="clear: right;">
9702 <br style="clear: both;">
9704 <p><br style="clear: left;" />
9705 <br style="clear: right;" />
9706 <br style="clear: both;" />
9710 ## FIXME: Is Parsoid's acceptance of self-closing html-tags
9711 ## a feature or a bug? See https://phabricator.wikimedia.org/T76962
9713 Handling html with a div self-closing tag
9722 <div title=""></div>
9723 <div title=""></div>
9725 <div title="bar"></div>
9726 <div title="bar"></div>
9730 <div title="" data-parsoid='{"stx":"html","selfClose":true}'></div>
9731 <div title="" data-parsoid='{"stx":"html","selfClose":true}'></div>
9732 <div title="" data-parsoid='{"stx":"html","autoInsertedEnd":true}'>
9733 <div title="bar" data-parsoid='{"stx":"html","selfClose":true}'></div>
9734 <div title="bar" data-parsoid='{"stx":"html","selfClose":true}'></div>
9735 <div title="bar/" data-parsoid='{"stx":"html","autoInsertedEnd":true}'></div></div>
9739 Elements with solidus in various attribute positions
9741 parsoid=wt2html,html2html
9743 <div cla/ss="123">ha</div>
9745 <div / class="123">ha</div>
9747 <div class= / "123">ha</div>
9750 <div class="123">ha</div>
9751 <div class="/">ha</div>
9753 <div data-parsoid='{"stx":"html","a":{"cla":null,"ss":null},"sa":{"cla":"","ss":"123"}}'>ha</div>
9755 <div class="123" data-parsoid='{"stx":"html"}'>ha</div>
9757 <div class="/" data-parsoid='{"stx":"html","a":{"\"123\"":null},"sa":{"\"123\"":""}}'>ha</div>
9761 Handling html with a br self-closing tag
9788 Quoted attributes without spaces
9792 <div class="foo"style="color:red">red</div>
9794 <div class="foo" style="color:red">red</div>
9796 <div class="foo" style="color:red">red</div>
9800 Horizontal ruler (should it add that extra space?)
9809 foo </p><hr /><p> bar
9814 Horizontal ruler -- 4+ dashes render hr
9823 Horizontal ruler -- eats additional dashes on the same line
9832 Horizontal ruler -- does not collapse dashes on consecutive lines
9843 Horizontal ruler -- <4 dashes render as plain text
9852 Horizontal ruler -- Supports content following dashes on same line
9864 ### Block-level elements
9873 <ul><li>Common list</li>
9875 <li>item 3</li></ul>
9886 <ol><li>Numbered list</li>
9888 <li>item 3</li></ol>
9892 # the switch from level 3 to ordered should not introduce a newline between
9903 ***#Number on level 4
9905 **#Number on level 3
9906 **#Number on level 3
9910 #**Level 3, but ordered
9913 <ol><li>with numbers</li></ol>
9914 <ul><li>and bullets</li></ul>
9915 <ol><li>and numbers</li></ol></li>
9917 <ul><li>bullet level 2
9918 <ul><li>bullet level 3
9919 <ol><li>Number on level 4</li></ol></li></ul></li>
9921 <ol><li>Number on level 3</li>
9922 <li>Number on level 3</li></ol></li></ul>
9923 <ol><li>number level 2</li></ol></li>
9925 <ul><li><ul><li>Level 3</li></ul></li></ul></li></ul>
9926 <ol><li><ul><li><ul><li>Level 3, but ordered</li></ul></li></ul></li></ol>
9931 1. Nested mixed wikitext and html list
9934 *<ul><li>ho</li></ul>
9939 <li><ul><li>ho</li></ul></li>
9941 <ul><li>ho</li></ul></li></ul>
9945 <li><ul data-parsoid='{"stx":"html"}'><li data-parsoid='{"stx":"html"}'>ho</li></ul></li>
9947 <ul><li>ho</li></ul></li></ul>
9951 2. Nested mixed wikitext and html list (incompatible)
9954 :{{echo|<li>ho</li>}}
9957 <dd><li>ho</li></dd></dl>
9961 <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>
9971 <ul><li>bar</li></ul></li></ul>
9981 <ul><li><ul><li>foo</li></ul></li>
9987 Nested lists 3 (first element empty)
9993 <ul><li>bar</li></ul></li></ul>
9998 Nested lists 4 (first element empty)
10003 <ul><li><ul><li></li></ul></li>
10009 Nested lists 5 (both elements empty)
10014 <ul><li><ul><li></li></ul></li>
10020 Nested lists 6 (both elements empty)
10026 <ul><li></li></ul></li></ul>
10031 Nested lists 7 (skip initial nesting levels)
10035 <ul><li><ul><li><ul><li>foo</li></ul></li></ul></li></ul>
10040 Nested lists 8 (multiple nesting transitions)
10048 <ul><li><ul><li>bar</li></ul></li>
10049 <li>baz</li></ul></li>
10054 # XXX this test should be moved to citeParserTests, since it depends
10055 # on the Cite extension, which is "built in" to Parsoid.
10057 Nested lists 9 (extension interaction)
10060 !! html/php+tidy-DISABLED
10061 <ul><li class="mw-empty-elt"></li></ul>
10063 <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>
10067 1. Lists with start-of-line-transparent tokens before bullets: Comments
10080 Nested lists 10 (list and span siblings: wt2wt regression)
10085 <ul><li>a <span>x</span>
10086 <ul><li>b <span>y</span></li></ul></li></ul>
10090 2. Lists with start-of-line-transparent tokens before bullets: Template close
10095 <ul><li>foo bar</li>
10101 List items are not parsed correctly following a <pre> block (T2785)
10107 <ul><li><pre>foo</pre></li>
10108 <li><pre>bar</pre></li>
10112 <ul><li><pre typeof="mw:Extension/pre" about="#mwt2" data-mw='{"name":"pre","attrs":{},"body":{"extsrc":"foo"}}'>foo</pre></li>
10113 <li><pre typeof="mw:Extension/pre" about="#mwt4" data-mw='{"name":"pre","attrs":{},"body":{"extsrc":"bar"}}'>bar</pre></li>
10117 # FIXME: Might benefit from a html/parsoid since this has a template
10119 List items from template
10130 *notSOL{{inner list}}
10133 <ul><li>item 1</li>
10134 <li>item 2</li></ul>
10135 <ul><li>item 0</li>
10137 <li>item 2</li></ul>
10138 <ul><li>item 0</li>
10141 <li>item 2</li></ul>
10146 List interrupted by empty line or heading
10154 <ul><li>foo</li></ul>
10155 <ul><li><ul><li>bar</li></ul></li></ul>
10156 <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>
10157 <ul><li>Another list item</li></ul>
10162 Multiple list tags generated by templates
10181 <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>
10182 <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>
10183 <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>
10187 Multiple newlines in between HTML list items don't induce paragraph wrapping
10200 <dd>ho<div>123</div>
10216 <dd>ho<div>123</div>
10224 Single-comment whitespace lines dont break lists, and neither do multi-comment whitespace lines
10227 <!--This line will NOT split the list-->
10229 <!--This line will NOT split the list either-->
10231 <!--foo--> <!----> <!--This line NOT split the list either-->
10242 Replacing whitespace with tabs still doesn't break the list (gerrit 78327)
10245 <!--This line will NOT split the list-->
10247 <!--This line will NOT split the list either-->
10249 <!--foo--> <!----> <!--This line NOT split the list
10260 # FIXME: Parsoid has a dedicated DOM pass to mimic this Tidy-specific li-hack
10261 # That pass could possibly be removed.
10263 Test the li-hack (a hack from Tidy days, but doesn't work as advertised with Remex)
10265 parsoid=wt2html,wt2wt
10269 *{{echo|<li>templated li-hack}}
10270 *<!--foo--><li> unsupported li-hack with preceding comments
10273 <li><li>not a li-hack
10278 <li class="mw-empty-elt"></li><li>li-hack</li>
10279 <li class="mw-empty-elt"></li><li>templated li-hack</li>
10280 <li class="mw-empty-elt"></li><li> unsupported li-hack with preceding comments</li></ul>
10282 <li class="mw-empty-elt"></li><li>not a li-hack
10287 <li data-parsoid='{"stx":"html","autoInsertedEnd":true,"liHackSrc":"*"}'>li-hack</li>
10288 <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>
10289 <li data-parsoid='{"autoInsertedEnd":true}'><!--foo--></li><li data-parsoid='{"stx":"html","autoInsertedEnd":true}'>unsupported li-hack with preceding comments</li></ul>
10291 <ul data-parsoid='{"stx":"html"}'>
10292 <li class="mw-empty-elt" data-parsoid='{"stx":"html","autoInsertedEnd":true}'></li><li data-parsoid='{"stx":"html"}'>not a li-hack
10299 Parsoid: Make sure nested lists are serialized on their own line even if HTML contains no newlines
10311 <ol><li>bar</li></ol></li></ol>
10313 <ul><li>bar</li></ul></li></ul>
10315 <dl><dd>bar</dd></dl></dd></dl>
10333 Parsoid: Test of whitespace serialization with Templated bullets
10340 <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>
10344 # ------------------------------------------------------------------------
10345 # The next set of tests are about Parsoid's ability to handle badly nested
10346 # tags (parse, minimize scope of fixup, and roundtrip back)
10347 # ------------------------------------------------------------------------
10349 # Remex and Parsoid output stems from list handling diffs because Parsoid & PHP parser.
10350 # Parsoid's list handling is more aware of block structure.
10352 Unbalanced closing block tags break a list
10359 <ul><li>a</li></ul></div><div>
10371 Unbalanced closing non-block tags don't break a list
10373 parsoid=wt2html,html2html
10381 <ul><li>a<span></span></li>
10384 <p><span data-parsoid='{"stx":"html","autoInsertedEnd":true}'></span></p>
10385 <ul><li>a<span data-parsoid='{"stx":"html","autoInsertedEnd":true}'></span></li>
10389 # Parsoid does some post-dom-building cleanup
10390 # which is why its output differs from Remex.
10392 Unclosed formatting tags that straddle lists are closed and reopened
10394 parsoid=wt2html,wt2wt,html2html
10399 <ol><li><s> a</s></li><s>
10400 </s><li><s>b </s></li></ol>
10402 <ol><li><s> a</s></li>
10403 <li><s>b </s></li></ol>
10406 # Output is ugly because of all the misnested tag fixups.
10408 1. List embedded in a formatting tag
10415 </small></p><small><ul><li>foo</li></ul></small><small></small><p><small></small>
10418 <p><small data-parsoid='{"stx":"html","autoInsertedEnd":true}'></small></p><small data-parsoid='{"stx":"html","autoInsertedEnd":true,"autoInsertedStart":true}'>
10419 <ul><li data-parsoid='{}'>foo</li></ul></small>
10420 <p><small data-parsoid='{"stx":"html","autoInsertedStart":true}'></small></p>
10423 # Output is ugly because of all the misnested tag fixups.
10425 2. List embedded in a formatting tag in a misnested way
10432 </small></p><small></small><ul><small><li>a</li>
10433 </small><li><small>b</small></li></ul>
10435 <p><small data-parsoid='{"stx":"html","autoInsertedEnd":true}'></small></p>
10436 <ul><small data-parsoid='{"stx":"html","autoInsertedEnd":true,"autoInsertedStart":true}'><li>a</li></small>
10437 <li><small data-parsoid='{"stx":"html","autoInsertedStart":true}'>b</small></li></ul>
10440 # Output is ugly because of all the misnested tag fixups.
10442 3. List embedded in a formatting tag in a misnested way
10449 </small></p><small></small><ul><small></small><li><small></small><ul><small></small><li><small>123</small></li></ul></li></ul>
10451 <p><small data-parsoid='{"stx":"html","autoInsertedEnd":true}'></small></p>
10453 <ul><li><ul><li data-parsoid='{}'><small data-parsoid='{"stx":"html","autoInsertedStart":true}'> 123</small></li></ul></li></ul>
10460 # Note that the current date is hard-coded as
10461 # 1970-01-01T00:02:03Z (a Thursday)
10462 # when running parser tests. The timezone is also fixed to GMT, so
10463 # local date will be identical to current date.
10466 Magic Word: {{CURRENTDAY}}
10475 Magic Word: {{CURRENTDAY2}}
10484 Magic Word: {{CURRENTDAYNAME}}
10493 Magic Word: {{CURRENTDOW}}
10502 Magic Word: {{CURRENTMONTH}}
10511 Magic Word: {{CURRENTMONTH1}}
10520 Magic Word: {{CURRENTMONTHABBREV}}
10522 {{CURRENTMONTHABBREV}}
10529 Magic Word: {{CURRENTMONTHNAME}}
10531 {{CURRENTMONTHNAME}}
10538 Magic Word: {{CURRENTMONTHNAMEGEN}}
10540 {{CURRENTMONTHNAMEGEN}}
10547 Magic Word: {{CURRENTTIME}}
10556 Magic Word: {{CURRENTHOUR}}
10565 Magic Word: {{CURRENTWEEK}} (T6594)
10574 Magic Word: {{CURRENTYEAR}}
10583 Magic Word: {{CURRENTTIMESTAMP}}
10585 {{CURRENTTIMESTAMP}}
10592 Magic Words LOCAL (UTC)
10596 *{{LOCALMONTHNAME}}
10597 *{{LOCALMONTHNAMEGEN}}
10598 *{{LOCALMONTHABBREV}}
10607 *{{LOCALTIMESTAMP}}
10622 <li>19700101000203</li></ul>
10627 Magic Word: {{FULLPAGENAME}}
10629 title=[[User:Ævar Arnfjörð Bjarmason]]
10630 parsoid={ "modes": ["wt2html","wt2wt"], "normalizePhp": true }
10634 <p>User:Ævar Arnfjörð Bjarmason
10639 Magic Word: {{FULLPAGENAMEE}}
10641 title=[[User:Ævar Arnfjörð Bjarmason]]
10642 parsoid={ "modes": ["wt2html","wt2wt"], "normalizePhp": true }
10646 <p>User:%C3%86var_Arnfj%C3%B6r%C3%B0_Bjarmason
10651 Magic Word: {{TALKSPACE}}
10653 title=[[User:Ævar Arnfjörð Bjarmason]]
10654 parsoid={ "modes": ["wt2html","wt2wt"], "normalizePhp": true }
10663 Magic Word: {{TALKSPACE}}, same namespace
10665 title=[[User talk:Ævar Arnfjörð Bjarmason]]
10666 parsoid={ "modes": ["wt2html","wt2wt"], "normalizePhp": true }
10675 Magic Word: {{TALKSPACE}}, main namespace
10677 title=[[Parser Test]]
10678 parsoid={ "modes": ["wt2html","wt2wt"], "normalizePhp": true }
10687 Magic Word: {{TALKSPACEE}}
10689 title=[[User:Ævar Arnfjörð Bjarmason]]
10690 parsoid={ "modes": ["wt2html","wt2wt"], "normalizePhp": true }
10699 Magic Word: {{SUBJECTSPACE}}
10701 title=[[User talk:Ævar Arnfjörð Bjarmason]]
10702 parsoid={ "modes": ["wt2html","wt2wt"], "normalizePhp": true }
10711 Magic Word: {{SUBJECTSPACE}}, same namespace
10713 title=[[User:Ævar Arnfjörð Bjarmason]]
10714 parsoid={ "modes": ["wt2html","wt2wt"], "normalizePhp": true }
10723 Magic Word: {{SUBJECTSPACE}}, main namespace
10725 title=[[Parser Test]]
10726 parsoid={ "modes": ["wt2html","wt2wt"], "normalizePhp": true }
10734 Magic Word: {{SUBJECTSPACEE}}
10736 title=[[User talk:Ævar Arnfjörð Bjarmason]]
10737 parsoid={ "modes": ["wt2html","wt2wt"], "normalizePhp": true }
10746 Magic Word: {{NAMESPACE}}
10748 title=[[User:Ævar Arnfjörð Bjarmason]]
10749 parsoid={ "modes": ["wt2html","wt2wt"], "normalizePhp": true }
10758 Magic Word: {{NAMESPACEE}}
10760 title=[[User:Ævar Arnfjörð Bjarmason]]
10761 parsoid={ "modes": ["wt2html","wt2wt"], "normalizePhp": true }
10770 Magic Word: {{NAMESPACENUMBER}}
10772 title=[[User:Ævar Arnfjörð Bjarmason]]
10773 parsoid={ "modes": ["wt2html","wt2wt"], "normalizePhp": true }
10775 {{NAMESPACENUMBER}}
10782 Magic Word: {{SUBPAGENAME}}
10784 title=[[Ævar Arnfjörð Bjarmason/sub ö]] subpage
10785 parsoid={ "modes": ["wt2html","wt2wt"], "normalizePhp": true }
10794 Magic Word: {{SUBPAGENAMEE}}
10796 title=[[Ævar Arnfjörð Bjarmason/sub ö]] subpage
10797 parsoid={ "modes": ["wt2html","wt2wt"], "normalizePhp": true }
10806 Magic Word: {{ROOTPAGENAME}}
10808 title=[[Ævar Arnfjörð Bjarmason/sub/sub2]] subpage
10809 parsoid={ "modes": ["wt2html","wt2wt"], "normalizePhp": true }
10813 <p>Ævar Arnfjörð Bjarmason
10818 Magic Word: {{ROOTPAGENAMEE}}
10820 title=[[Ævar Arnfjörð Bjarmason/sub/sub2]] subpage
10821 parsoid={ "modes": ["wt2html","wt2wt"], "normalizePhp": true }
10825 <p>%C3%86var_Arnfj%C3%B6r%C3%B0_Bjarmason
10830 Magic Word: {{BASEPAGENAME}}
10832 title=[[Ævar Arnfjörð Bjarmason/sub]] subpage
10833 parsoid={ "modes": ["wt2html","wt2wt"], "normalizePhp": true }
10837 <p>Ævar Arnfjörð Bjarmason
10842 Magic Word: {{BASEPAGENAMEE}}
10844 title=[[Ævar Arnfjörð Bjarmason/sub]] subpage
10845 parsoid={ "modes": ["wt2html","wt2wt"], "normalizePhp": true }
10849 <p>%C3%86var_Arnfj%C3%B6r%C3%B0_Bjarmason
10854 Magic Word: {{TALKPAGENAME}}
10856 title=[[User:Ævar Arnfjörð Bjarmason]]
10857 parsoid={ "modes": ["wt2html","wt2wt"], "normalizePhp": true }
10861 <p>User talk:Ævar Arnfjörð Bjarmason
10866 Magic Word: {{TALKPAGENAMEE}}
10868 title=[[User:Ævar Arnfjörð Bjarmason]]
10869 parsoid={ "modes": ["wt2html","wt2wt"], "normalizePhp": true }
10873 <p>User_talk:%C3%86var_Arnfj%C3%B6r%C3%B0_Bjarmason
10878 Magic Word: {{SUBJECTPAGENAME}}
10880 title=[[User talk:Ævar Arnfjörð Bjarmason]]
10881 parsoid={ "modes": ["wt2html","wt2wt"], "normalizePhp": true }
10883 {{SUBJECTPAGENAME}}
10885 <p>User:Ævar Arnfjörð Bjarmason
10890 Magic Word: {{SUBJECTPAGENAMEE}}
10892 title=[[User talk:Ævar Arnfjörð Bjarmason]]
10893 parsoid={ "modes": ["wt2html","wt2wt"], "normalizePhp": true }
10895 {{SUBJECTPAGENAMEE}}
10897 <p>User:%C3%86var_Arnfj%C3%B6r%C3%B0_Bjarmason
10902 Magic Word: {{NUMBEROFFILES}}
10904 parsoid={ "modes": ["wt2html","wt2wt"], "normalizePhp": true }
10913 Magic Word: {{PAGENAME}}
10915 title=[[User:Ævar Arnfjörð Bjarmason]]
10916 parsoid={ "modes": ["wt2html","wt2wt"], "normalizePhp": true }
10920 <p>Ævar Arnfjörð Bjarmason
10925 Magic Word: {{PAGENAME}} with metacharacters
10927 title=[['foo & bar = baz']]
10928 parsoid={ "modes": ["wt2html","wt2wt"], "normalizePhp": true }
10932 <p><i>'foo & bar = baz'</i>
10937 Magic Word: {{PAGENAME}} with metacharacters (T28781)
10939 title=[[*RFC 1234 http://example.com/]]
10940 parsoid={ "modes": ["wt2html","wt2wt"], "normalizePhp": true }
10944 <p>*RFC 1234 http://example.com/
10949 Magic Word: {{PAGENAMEE}}
10951 title=[[User:Ævar Arnfjörð Bjarmason]]
10952 parsoid={ "modes": ["wt2html","wt2wt"], "normalizePhp": true }
10956 <p>%C3%86var_Arnfj%C3%B6r%C3%B0_Bjarmason
10961 Magic Word: {{PAGENAMEE}} with metacharacters (T28781)
10963 title=[[*RFC 1234 http://example.com/]]
10964 parsoid={ "modes": ["wt2html","wt2wt"], "normalizePhp": true }
10968 <p>*RFC_1234_http://example.com/
10973 Magic Word: {{REVISIONID}}
10975 parsoid={ "modes": ["wt2html","wt2wt"], "normalizePhp": true }
10982 flags=vary-revision-id
10986 Magic Word: {{SCRIPTPATH}}
10988 parsoid={ "modes": ["wt2html","wt2wt"], "normalizePhp": true }
10996 Magic Word: {{STYLEPATH}}
10998 parsoid={ "modes": ["wt2html","wt2wt"], "normalizePhp": true }
11007 Magic Word: {{SERVER}}
11009 parsoid={ "modes": ["wt2html","wt2wt"], "normalizePhp": true }
11013 <p><a rel="nofollow" class="external free" href="http://example.org">http://example.org</a>
11018 Magic Word: {{SERVERNAME}}
11020 parsoid={ "modes": ["wt2html","wt2wt"], "normalizePhp": true }
11029 Magic Word: {{SITENAME}}
11031 parsoid={ "modes": ["wt2html","wt2wt"], "normalizePhp": true }
11040 Magic Word: {{PAGELANGUAGE}}
11043 parsoid={ "modes": ["wt2html","wt2wt"], "normalizePhp": true }
11052 Magic Word: {{PAGELANGUAGE}} on a page with no explicitly set language
11054 parsoid={ "modes": ["wt2html","wt2wt"], "normalizePhp": true }
11063 Case-sensitive magic words, when cased differently, should just be template transclusions
11070 <p><a href="/index.php?title=Template:CurrentMonth&action=edit&redlink=1" class="new" title="Template:CurrentMonth (page does not exist)">Template:CurrentMonth</a>
11071 <a href="/index.php?title=Template:Currentday&action=edit&redlink=1" class="new" title="Template:Currentday (page does not exist)">Template:Currentday</a>
11072 <a href="/index.php?title=Template:CURreNTweEK&action=edit&redlink=1" class="new" title="Template:CURreNTweEK (page does not exist)">Template:CURreNTweEK</a>
11073 <a href="/index.php?title=Template:CurrentHour&action=edit&redlink=1" class="new" title="Template:CurrentHour (page does not exist)">Template:CurrentHour</a>
11078 Case-insensitive magic words should still work with weird casing.
11088 <a rel="nofollow" class="external free" href="http://example.org">http://example.org</a>
11092 # From plwiki:PLOS_ONE
11094 Parsoid: Page property magic word with magic word contents
11098 wgAllowDisplayTitle=true
11099 wgRestrictDisplayTitle=false
11101 {{DISPLAYTITLE:''{{PAGENAME}}''}}
11106 <meta property="mw:PageProp/displaytitle" content="Parser test" about="#mwt3" typeof="mw:ExpandedAttrs" data-parsoid='{"src":"{{DISPLAYTITLE:''{{PAGENAME}}''}}"}' data-mw='{"attribs":[[{"txt":"content"},{"html":"DISPLAYTITLE:<i data-parsoid='{\"dsr\":[15,31,2,2]}'><span about=\"#mwt1\" typeof=\"mw:Transclusion\" data-parsoid='{\"pi\":[[]],\"dsr\":[17,29,null,null]}' data-mw='{\"parts\":[{\"template\":{\"target\":{\"wt\":\"PAGENAME\",\"function\":\"pagename\"},\"params\":{},\"i\":0}}]}'>Parser test</span></i>"}]]}'/>
11109 # NOTE: mw:ExpandedAttrs is not the best typeof here. mw:Transclusion is better.
11110 # But, this is a limitation of our representation and is documented in
11111 # TemplateHandler.js in processSpecialMagicWord
11113 Parsoid: Template-generated DISPLAYTITLE
11115 {{{{echo|DISPLAYTITLE}}:Foo}}
11119 wgAllowDisplayTitle=true
11120 wgRestrictDisplayTitle=false
11125 <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"}]]}'/>
11129 Namespace 1 {{ns:1}}
11138 Namespace 1 {{ns:01}}
11147 Namespace 0 {{ns:0}} (T6783)
11155 Namespace 0 {{ns:00}} (T6783)
11163 Namespace -1 {{ns:-1}}
11172 Namespace User {{ns:User}}
11181 Namespace User talk {{ns:User_talk}}
11190 Namespace User talk {{ns:uSeR tAlK}}
11199 Namespace File {{ns:File}}
11208 Namespace File {{ns:Image}}
11217 Namespace (lang=de) Benutzer {{ns:User}}
11228 Namespace (lang=de) Benutzer Diskussion {{ns:3}}
11234 <p>Benutzer Diskussion
11241 {{urlencode:hi world?!}}
11242 {{urlencode:hi world?!|WIKI}}
11243 {{urlencode:hi world?!|PATH}}
11244 {{urlencode:hi world?!|QUERY}}
11254 Magic Word: prioritize type info over data-parsoid
11258 <meta property="mw:PageProp/forcetoc" data-parsoid='{"magicSrc":"__NOTOC__"}'/>
11264 Magic Word: serialize on separate line (parsoid)
11266 parsoid=wt2wt,html2wt
11272 foo<meta property="mw:PageProp/notoc"/>bar
11276 Magic Word: rt non-english wikis
11283 <meta property="mw:PageProp/noeditsection" data-parsoid='{"magicSrc":"__NOEDITSECTION__"}'/>
11287 __proto__ is treated as normal wikitext (T105997)
11299 Magic links: internal link to RFC (T2479)
11303 <p><a href="/index.php?title=RFC_123&action=edit&redlink=1" class="new" title="RFC 123 (page does not exist)">RFC 123</a>
11306 <p><a rel="mw:WikiLink" href="./RFC_123" title="RFC 123">RFC 123</a></p>
11310 Magic links: RFC (T2479)
11314 <p><a class="external mw-magiclink-rfc" rel="nofollow" href="https://tools.ietf.org/html/rfc822">RFC 822</a>
11317 <p><a href="https://tools.ietf.org/html/rfc822" rel="mw:ExtLink" class="external mw-magiclink">RFC 822</a></p>
11321 Magic links: RFC (T67278)
11323 This is RFC 822 but thisRFC 822 is not RFC 822linked.
11325 <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.
11328 <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>
11332 Magic links: RFC (w/ non-newline whitespace, T30950/T31025)
11334 RFC      822
11338 <p><a class="external mw-magiclink-rfc" rel="nofollow" href="https://tools.ietf.org/html/rfc822">RFC 822</a>
11343 <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>
11349 Magic links: ISBN (T3937)
11353 <p><a href="/wiki/Special:BookSources/0306406152" class="internal mw-magiclink-isbn">ISBN 0-306-40615-2</a>
11356 <p><a href="./Special:BookSources/0306406152" rel="mw:WikiLink">ISBN 0-306-40615-2</a></p>
11360 Magic links: ISBN (T67278)
11362 This is ISBN 978-0-316-09811-3 but thisISBN 978-0-316-09811-3 is not ISBN 978-0-316-09811-3linked.
11364 <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.
11367 <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>
11371 Magic links: ISBN (w/ non-newline whitespace, T30950/T31025)
11373 ISBN      978 0 316 09811 3
11379 <p><a href="/wiki/Special:BookSources/9780316098113" class="internal mw-magiclink-isbn">ISBN 978 0 316 09811 3</a>
11386 <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>
11394 Magic links: PMID incorrectly converts space to underscore
11398 <p><a class="external mw-magiclink-pmid" rel="nofollow" href="//www.ncbi.nlm.nih.gov/pubmed/1234?dopt=Abstract">PMID 1234</a>
11401 <p><a href="//www.ncbi.nlm.nih.gov/pubmed/1234?dopt=Abstract" rel="mw:ExtLink" class="external mw-magiclink">PMID 1234</a></p>
11405 Magic links: PMID (T67278)
11407 This is PMID 1234 but thisPMID 1234 is not PMID 1234linked.
11409 <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.
11412 <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>
11416 Magic links: PMID (w/ non-newline whitespace, T30950/T31025)
11418 PMID      1234
11422 <p><a class="external mw-magiclink-pmid" rel="nofollow" href="//www.ncbi.nlm.nih.gov/pubmed/1234?dopt=Abstract">PMID 1234</a>
11427 <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>
11432 # <nowiki> nodes shouldn't be inserted during html2wt by Parsoid,
11433 # since these are ExtLinkText, not MagicLinkText
11435 Magic links: use appropriate serialization for "almost" magic links.
11437 X[[Special:BookSources/0978739256|foo]]
11439 X[https://tools.ietf.org/html/rfc1234 foo]
11441 <p>X<a href="/wiki/Special:BookSources/0978739256" title="Special:BookSources/0978739256">foo</a>
11442 </p><p>X<a rel="nofollow" class="external text" href="https://tools.ietf.org/html/rfc1234">foo</a>
11445 <p>X<a rel="mw:WikiLink" href="./Special:BookSources/0978739256" title="Special:BookSources/0978739256">foo</a></p>
11446 <p>X<a rel="mw:ExtLink" class="external text" href="https://tools.ietf.org/html/rfc1234">foo</a></p>
11450 Magic links: All disabled (T47942)
11452 wgEnableMagicLinks={"ISBN":false, "PMID":false, "RFC":false}
11458 <p>ISBN 0-306-40615-2
11469 Nonexistent template
11471 {{thistemplatedoesnotexist}}
11473 <p><a href="/index.php?title=Template:Thistemplatedoesnotexist&action=edit&redlink=1" class="new" title="Template:Thistemplatedoesnotexist (page does not exist)">Template:Thistemplatedoesnotexist</a>
11478 Template with invalid target containing tags
11480 {{a<b>b</b>|{{echo|foo}}|{{echo|a}}={{echo|b}}|a = b}}
11482 <p>{{a<b>b</b>|foo|a=b|a = b}}
11487 Template with invalid target containing unclosed tag
11489 {{a<b>|{{echo|foo}}|{{echo|a}}={{echo|b}}|a = b}}
11491 <p>{{a<b>|foo|a=b|a = b}}</b>
11496 Template with invalid target containing wikilink
11500 <p>{{<a href="/wiki/Main_Page" title="Main Page">Main Page</a>}}
11503 <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>
11507 Template with just whitespace in it, T70421
11511 <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>
11517 This is a test template
11525 <p>This is a test template
11530 Template with explicit namespace
11534 <p>This is a test template
11542 This is a test template with parameter {{{param}}}
11548 {{paramtest|param=foo}}
11550 <p>This is a test template with parameter foo
11555 Template:paramtestnum
11557 [[{{{1}}}|{{{2}}}]]
11561 Template unnamed parameter
11563 {{paramtestnum|Main Page|the main page}}
11565 <p><a href="/wiki/Main_Page" title="Main Page">the main page</a>
11570 Template:templatesimple
11576 Template:templateredirect
11578 #redirect [[Template:templatesimple]]
11582 Template:templateasargtestnum
11588 Template:templateasargtest
11590 {{template{{{templ}}}}}
11594 Template:templateasargtest2
11600 Template with template name as unnamed argument
11602 {{templateasargtestnum|templatesimple}}
11609 Template with template name as argument
11611 {{templateasargtest|templ=simple}}
11618 Template with template name as argument (2)
11620 {{templateasargtest2|templ=templatesimple}}
11627 Template:templateasargtestdefault
11629 {{{{{templ|templatesimple}}}}}
11639 Template with default value
11641 {{templateasargtestdefault}}
11648 Template with default value (value set)
11650 {{templateasargtestdefault|templ=templa}}
11659 {{templateredirect}}
11664 <link rel="mw:PageProp/redirect" href="./Template:Templatesimple" typeof="mw:Transclusion" data-mw='{"parts":[{"template":{"target":{"wt":"templateredirect","href":"./Template:Templateredirect"},"params":{},"i":0}}]}'/>
11668 Template with argument in separate line
11670 {{ templateasargtest |
11678 Template with complex template as argument
11681 param ={{ templateasargtest |
11682 templ = simple }}}}
11684 <p>This is a test template with parameter (test)
11689 Templates with templated name
11691 {{{{echo|echo}}|foo}}
11692 {{{{echo|inner list}} }}
11696 <ul><li>item 1</li></ul>
11699 <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>
11700 <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>
11703 ## Regression test; the output here isn't really that interesting.
11705 Templates with templated name and top level template args
11707 {{1{{2{{{3}}}|4=5}}}}
11709 <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>
11712 # Parsoid markup is deliberate "broken". This is an edge case.
11713 # See long comment in TemplateHandler.js:convertAttribsToString.
11715 Templates with invalid templated targets
11726 <p typeof="mw:Transclusion" data-mw='{"parts":[{"template":{"target":{"wt":"echo\n{{echo|foo}}\n"},"params":{},"i":0}}]}'>{{echo
11731 Template with thumb image (with link in description)
11733 {{paramtest|param=[[Image:noimage.png|thumb|[[no link|link]] [[no link|caption]]]]}}
11735 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>
11738 <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>
11740 <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>
11744 Template:complextemplate
11746 {{{1}}} {{paramtest|
11747 param ={{{param}}}}}
11751 Template with complex arguments
11754 param ={{ templateasargtest |
11755 templ = simple }}|[[Template:complextemplate|link]]}}
11757 <p><a href="/wiki/Template:Complextemplate" title="Template:Complextemplate">link</a> This is a test template with parameter (test)
11762 T2553: link with two variables in a piped link
11765 |[[{{{1}}}|{{{2}}}]]
11770 <td>[[{{{1}}}|{{{2}}}]]
11775 <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>
11781 Abort table cell attribute parsing on wikilink
11784 |testing [[one|two]] |three||four
11785 |testing one two |three||four
11786 |testing="[[one|two]]" |three||four
11791 <td>testing <a href="/index.php?title=One&action=edit&redlink=1" class="new" title="One (page does not exist)">two</a> |three</td>
11797 <td>testing="<a href="/index.php?title=One&action=edit&redlink=1" class="new" title="One (page does not exist)">two</a>" |three</td>
11803 <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>
11804 <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>
11805 <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>
11810 Don't abort table cell attribute parsing if wikilink is found in template arg
11813 |Test {{#tag:ref|One two "[[three]]" four}}
11817 <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>
11822 Magic variable as template parameter
11824 {{paramtest|param={{SITENAME}}}}
11826 <p>This is a test template with parameter MediaWiki
11833 [[{{{param}}}|link]]
11837 Template parameter as link source
11839 {{linktest|param=Main Page}}
11841 <p><a href="/wiki/Main_Page" title="Main Page">link</a>
11846 Template:paramtest2
11848 including another template, {{paramtest|param={{{arg}}}}}
11852 Template passing argument to another template
11854 {{paramtest2|arg='hmm'}}
11856 <p>including another template, This is a test template with parameter 'hmm'
11867 Template as link source
11871 [[{{linktest2}}|Main Page]]
11873 [[{{linktest2}}]]Page
11875 <p><a href="/wiki/Main_Page" title="Main Page">Main Page</a>
11876 </p><p><a href="/wiki/Main_Page" title="Main Page">Main Page</a>
11877 </p><p><a href="/wiki/Main_Page" title="Main Page">Main Page</a>Page
11895 Template infinite loop
11899 <p><span class="error">Template loop detected: <a href="/wiki/Template:Loop1" title="Template:Loop1">Template:Loop1</a></span>
11904 Template from main namespace
11913 Template from non-includable namespace
11915 wgNonincludableNamespaces=10
11919 <p><a href="/wiki/Template:Echo" title="Template:Echo">Template:Echo</a>
11934 T2529: Template with table, not included at beginning of line
11953 T2523: Template shouldn't eat newline (or add an extra one before table)
11973 T2041: Template parameters shown as broken links
11982 Template with targets containing wikilinks
11988 {{[[{{echo|foo}}]]}}
11990 {{{{echo|[[foo}}]]}}
11992 <p>{{<a href="/wiki/Foo" title="Foo">foo</a>}}
11993 </p><p>{{<a href="/wiki/Foo" title="Foo">foo</a>}}
11997 <p>{{<a rel="mw:WikiLink" href="./Foo" title="Foo">foo</a>}}</p>
11998 <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>
11999 <p>{{<span typeof="mw:Transclusion" data-mw='{"parts":[{"template":{"target":{"wt":"echo","href":"./Template:Echo"},"params":{"1":{"wt":"[[foo}}]]"}},"i":0}}]}'>[[foo}}]]</span></p>
12009 Templates: Double quotes as template target
12016 <p>foo <span about="#mwt1" typeof="mw:Transclusion" data-mw='{"parts":[{"template":{"target":{"wt":"''","href":"./Template:''"},"params":{},"i":0}}]}'>bar</span> baz
12020 ## This test is about making sure Parsoid's data-mw is well formed in the
12021 ## face of multiple templates with intersecting and overlapping ranges. The
12022 ## wikitext itself is wretched.
12024 Templates with intersecting and overlapping ranges
12035 </table><p>ho</p><table>
12039 </td></tr></tbody></table>
12041 <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":""}]]}'>
12043 </table><p about="#mwt1">ho</p><table about="#mwt1" typeof="mw:ExpandedAttrs" data-mw='{"attribs":[[{"txt":"","html":""},{"html":""}]]}'>
12045 <tbody><tr><td>hi</td></tr>
12050 Template:MSGNW test
12052 ''None'' of '''this''' should be
12054 but rather passed unmodified
12062 # hmm, fix this or just deprecate msgnw and document its behavior?
12066 {{msgnw:MSGNW test}}
12068 <p>''None'' of '''this''' should be
12070  but rather passed unmodified
12071 {{test}}
12075 <!-- comment -->
12082 {{int:youhavenewmessages|lots of money|not!}}
12084 <p>You have lots of money (not!).
12089 int keyword - non-existing message
12100 Foo<noinclude>zar</noinclude><includeonly>bar</includeonly>
12104 <includeonly> and <noinclude> being included
12115 <onlyinclude>Foo</onlyinclude>bar
12119 <onlyinclude> being included
12131 <onlyinclude>Foo</onlyinclude>bar<includeonly>zar</includeonly>
12135 <onlyinclude> and <includeonly> being included
12144 <includeonly> and <noinclude> on a page
12146 Foo<noinclude>zar</noinclude><includeonly>bar</includeonly>
12153 Un-closed <noinclude>
12160 <onlyinclude> on a page
12162 <onlyinclude>Foo</onlyinclude>bar
12169 Un-closed <onlyinclude>
12176 Self-closed noinclude, includeonly, onlyinclude tags
12187 Unbalanced includeonly and noinclude tags
12191 |b</noinclude></noinclude>
12192 |c</noinclude></includeonly>
12193 |d</includeonly></includeonly>
12202 <td>c</includeonly>
12204 <td>d</includeonly></includeonly>
12210 Template:Includeonly section
12213 ==Includeonly section==
12219 T8563: Edit link generation for section shown by <includeonly>
12221 {{includeonly section}}
12223 <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>
12224 <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>
12228 # Uses same input as the contents of [[Template:Includeonly section]]
12230 T8563: Section extraction for section shown by <includeonly>
12235 ==Includeonly section==
12243 T8563: Edit link generation for section suppressed by <includeonly>
12246 ==Includeonly section==
12250 <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>
12255 T8563: Section extraction for section suppressed by <includeonly>
12260 ==Includeonly section==
12268 Un-closed <includeonly>
12273 <meta typeof="mw:Includes/IncludeOnly" data-parsoid='{"src":"<includeonly>"}' data-mw='{"src":"<includeonly>"}'/>
12276 ## We used to, but no longer wt2wt this test since the default serializer
12277 ## will normalize the include directives to serialize on their own line.
12278 ## Selser will take care of preserving formatting in scenarios where they
12279 ## intermingled with other wikitext.
12281 Includes and comments at SOL
12283 parsoid=wt2html,html2html
12285 <!-- comment --><noinclude><!-- comment --></noinclude><!-- comment -->==hu==
12293 some</noinclude>* stuff
12296 <includeonly>can have stuff</includeonly>===here===
12299 <h2><span class="mw-headline" id="hu">hu</span></h2>
12307 <ul><li>here</li></ul>
12308 <h3><span class="mw-headline" id="here">here</span></h3>
12311 <!-- 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>
12313 <meta typeof="mw:Includes/NoInclude" data-parsoid='{"src":"<noinclude>"}'/>
12315 <meta typeof="mw:Includes/NoInclude/End" data-parsoid='{"src":"</noinclude>"}'/><ul><li>stuff</li>
12318 <meta typeof="mw:Includes/NoInclude" data-parsoid='{"src":"<noinclude>"}'/>
12319 <p>some<meta typeof="mw:Includes/NoInclude/End" data-parsoid='{"src":"</noinclude>"}'/>* stuff</p>
12320 <ul><li>here</li></ul>
12322 <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>
12326 # TODO: test with DOM fragment reuse!
12328 Parsoid: DOM fragment reuse
12330 parsoid=wt2wt,wt2html
12332 a{{echo|b<table></table>c}}d
12344 <p>ab</p><table></table><p>cd
12355 <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>
12357 <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">
12358 </span><table about="#mwt2" data-parsoid='{"stx":"html"}'></table><span about="#mwt2">
12359 </span><p about="#mwt2">cd</p>
12361 <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">
12363 </span><table about="#mwt3" data-parsoid='{"stx":"html"}'></table><span about="#mwt3">
12365 </span><p about="#mwt3">b</p>
12369 Parsoid: Merge double tds (T52603)
12372 |{{echo|{{!}} foo}}
12378 </td></tr></tbody></table>
12381 <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>
12386 Parsoid: Merge double tds in nested transclusion content (T52603)
12390 |{{echo|{{!}} foo}}
12398 </td></tr></tbody></table>
12401 <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}}]}'>
12403 <tr><td data-mw='{"parts":["|"]}'> foo</td></tr>
12409 ### <includeonly> and <noinclude> in attributes
12412 0. includeonly around the entire attribute
12414 <span <includeonly>id="v1"</includeonly><noinclude>id="v2"</noinclude>>bar</span>
12416 <p><span id="v2">bar</span>
12421 1. includeonly in html attr key
12423 <span <noinclude>id</noinclude><includeonly>about</includeonly>="foo">bar</span>
12425 <p><span id="foo">bar</span>
12430 2. includeonly in html attr value
12432 <span id="<noinclude>v1</noinclude><includeonly>v2</includeonly>">bar</span>
12433 <span id=<noinclude>"v1"</noinclude><includeonly>"v2"</includeonly>>bar</span>
12435 <p><span id="v1">bar</span>
12436 <span id="v1">bar</span>
12441 3. includeonly in part of an attr value
12443 <span style="color:<noinclude>red</noinclude><includeonly>blue</includeonly>;">bar</span>
12445 <p><span style="color:red;">bar</span>
12450 4. includeonly in table attributes
12474 ### Preprocessor precedence tests
12475 ### See: https://www.mediawiki.org/wiki/Preprocessor_ABNF
12477 ##{{[[-{{{{{{[[Foo|bar}}]]}-}}}}}]]
12479 Preprocessor precedence 1: link is rightmost opening
12485 But close-brace is not a valid character in a link title:
12488 However, we can still tell this was handled as a link in the preprocessor:
12489 {{echo|[[Foo}}|bar]]|bat}}
12491 <p>{{<a href="/wiki/Foo" title="Foo">bar}}</a>
12492 </p><p>But close-brace is not a valid character in a link title:
12494 </p><p>However, we can still tell this was handled as a link in the preprocessor:
12498 <p>{{<a rel="mw:WikiLink" href="./Foo" title="Foo">bar}}</a></p>
12499 <p>But close-brace is not a valid character in a link title: {{[[Foo}}|bar]]</p>
12500 <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>
12504 Preprocessor precedence 2: template is rightmost opening
12513 <p>-<span typeof="mw:Transclusion" data-mw='{"parts":[{"template":{"target":{"wt":"echo","href":"./Template:Echo"},"params":{"1":{"wt":"foo}-"}},"i":0}}]}'>foo}-</span>-</p>
12517 Preprocessor precedence 3: language converter is rightmost opening
12533 <p typeof="mw:Transclusion" data-mw='{"parts":[{"template":{"target":{"wt":"echo","href":"./Template:Echo"},"params":{"1":{"wt":"hi"}},"i":0}}]}'>hi</p>
12534 <p>{{<span typeof="mw:LanguageVariant" data-mw-variant='{"disabled":{"t":"echo|hi}}"}}'></span></p>
12535 <p>[[<span typeof="mw:LanguageVariant" data-mw-variant='{"disabled":{"t":"raw]]"}}'></span></p>
12539 Preprocessor precedence 4: left-most angle bracket
12550 Template:Precedence5
12556 Preprocessor precedence 5: tplarg takes precedence over template
12558 {{Precedence5|Bullet}}
12560 <ul><li>Bar</li></ul>
12563 <ul typeof="mw:Transclusion" data-mw='{"parts":[{"template":{"target":{"wt":"Precedence5","href":"./Template:Precedence5"},"params":{"1":{"wt":"Bullet"}},"i":0}}]}'><li>Bar</li></ul>
12567 Preprocessor precedence 6: broken link is rightmost opening
12573 {{echo|[[Foo|bar|bat=baz}}
12576 </p><p>{{echo|[[Foo|bar|bat=baz}}
12579 <p>{{echo|[[Foo}}</p>
12580 <p>{{echo|[[Foo|bar|bat=baz}}</p>
12583 # This next test exposes a difference between PHP and Parsoid:
12584 # Given [[Foo|{{echo|Bar]]x}}y]]z:
12585 # 1) Both PHP and Parsoid ignore the `]]` inside the `echo` in the
12586 # "preprocessor" stage. The `{{echo` extends until the `x}}`, and the
12587 # outer `[[Foo` extends until the `y]]`
12588 # 2a) But then the PHP preprocessor emits `[[Foo|Bar]]xy]]z` as an
12589 # intermediate result (after template expansion), and link processing
12590 # happens on this intermediate result, which moves the wikilink
12591 # boundary leftward to `[[Foo|Bar]]`
12592 # 2b) Parsoid works in a single step, so it's going to keep the
12593 # wikilink as extending to the `y]]`
12594 # 3a) Then PHP does linktrail processing which slurps up the trailing
12595 # `xy` inside the link.
12596 # 3b) Parsoid will do linktrail processing to slurp up the trailing
12597 # `z` inside the link.
12598 # This is "correct" behavior. Parsoid's basic worldview is that the
12599 # `]]` inside the template shouldn't be allowed to leak out to affect
12600 # the surrounding wikilink. PHP may match Parsoid (in the future)
12601 # if you use {{#balance}} (T114445).
12604 Preprocessor precedence 7: broken template is rightmost opening
12610 [[Foo|{{echo|Bar]]-x}}-y]]-z
12612 Careful: linktrails can move the end of the wikilink:
12613 [[Foo|{{echo|y']]a}}l]]l
12615 <p><a href="/wiki/Foo" title="Foo">{{echo|Bar</a>
12616 </p><p><a href="/wiki/Foo" title="Foo">Bar</a>-x-y]]-z
12617 </p><p>Careful: linktrails can move the end of the wikilink:
12618 <a href="/wiki/Foo" title="Foo">y'al</a>]]l
12621 <p>[[Foo|{{echo|Bar]]</p>
12622 <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>
12623 <p>Careful: linktrails can move the end of the wikilink:
12624 <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>
12628 Preprocessor precedence 8: broken language converter is rightmost opening
12639 Template:Preprocessor_precedence_9
12644 ;7: {{{{{{{4}}}}}}}
12648 Preprocessor precedence 9: groups of braces
12650 {{Preprocessor precedence 9|Four|Bullet|1|2}}
12656 <ul><li>Bar</li></ul>
12660 <dd>{Bullet}</dd></dl>
12663 <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}}]}'>
12668 </dl><ul about="#mwt1">
12670 </ul><span about="#mwt1"> </span><dl about="#mwt1">
12679 Template:Preprocessor_precedence_10
12686 ;6: -{{{{{{4}}}}}}-
12687 ;7: -{{{{{{{5}}}}}}}-
12691 Preprocessor precedence 10: groups of braces with leading dash
12695 {{Preprocessor precedence 10|Three|raw2|Bullet|1|2}}
12701 <ul><li>Bar-</li></ul>
12708 <ul><li>Bar-</li></ul>
12715 <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}}]}'>
12717 <dd><span typeof="mw:LanguageVariant" data-mw-variant='{"disabled":{"t":"raw"}}'></span></dd>
12720 </dl><ul about="#mwt1">
12722 </ul><span about="#mwt1"> </span><dl about="#mwt1">
12726 <dd><span typeof="mw:LanguageVariant" data-mw-variant='{"disabled":{"t":"raw2"}}'></span></dd>
12729 </dl><ul about="#mwt1">
12731 </ul><span about="#mwt1"> </span><dl about="#mwt1">
12735 <dd><span typeof="mw:LanguageVariant" data-mw-variant='{"disabled":{"t":"raw2"}}'></span></dd>
12740 Preprocessor precedence 11: found during visual diff testing
12742 {{#tag:span|-{{#tag:span|-{{echo|x}}}}}}
12744 {{echo|-{{echo|-{{echo|x}}}}}}
12746 {{echo|-{{echo|x}}}}
12748 <p><span>-<span>-x</span></span>
12753 <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>
12755 <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>
12757 <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>
12761 Preprocessor precedence 12: broken language converter closed by brace.
12765 This form breaks the template, which is unfortunate:
12766 *{{echo|foo-{bar}bat}}
12768 But if the broken language converter markup is inside an extension
12769 tag, nothing bad happens:
12770 *<nowiki>foo-{bar}bat</nowiki>
12771 *{{echo|<nowiki>foo-{bar}bat</nowiki>}}
12772 *<pre>foo-{bar}bat</pre>
12773 *{{echo|<pre>foo-{bar}bat</pre>}}
12775 <tag>foo-{bar}bat</tag>
12776 {{echo|<tag>foo-{bar}bat</tag>}}
12779 <p>This form breaks the template, which is unfortunate:
12781 <ul><li>{{echo|foo-{bar}bat}}</li></ul>
12782 <p>But if the broken language converter markup is inside an extension
12783 tag, nothing bad happens:
12785 <ul><li>foo-{bar}bat</li>
12786 <li>foo-{bar}bat</li>
12787 <li><pre>foo-{bar}bat</pre></li>
12788 <li><pre>foo-{bar}bat</pre></li></ul>
12789 <pre>'foo-{bar}bat'
12793 <pre>'foo-{bar}bat'
12798 <p>This form breaks the template, which is unfortunate:</p>
12800 <li>{{echo|foo-{bar}bat}}</li>
12802 <p>But if the broken language converter markup is inside an extension tag, nothing bad happens:</p>
12804 <li><span typeof="mw:Nowiki">foo-{bar}bat</span></li>
12805 <li><span typeof="mw:Nowiki mw:Transclusion" 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>
12806 <li><pre typeof="mw:Extension/pre" data-mw='{"name":"pre","attrs":{},"body":{"extsrc":"foo-{bar}bat"}}'>foo-{bar}bat</pre></li>
12807 <li><pre typeof="mw:Extension/pre mw:Transclusion" data-mw='{"parts":[{"template":{"target":{"wt":"echo","href":"./Template:Echo"},"params":{"1":{"wt":"<pre>foo-{bar}bat</pre>"}},"i":0}}]}'>foo-{bar}bat</pre></li>
12809 <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>
12813 Preprocessor precedence 13: broken language converter in external link
12817 *[http://example.com/-{foo Example in URL]
12818 *[http://example.com Example in -{link} description]
12819 *{{echo|[http://example.com/-{foo Breaks template, however]}}
12821 <ul><li><a rel="nofollow" class="external text" href="http://example.com/-{foo">Example in URL</a></li>
12822 <li><a rel="nofollow" class="external text" href="http://example.com">Example in -{link} description</a></li>
12823 <li>{{echo|<a rel="nofollow" class="external text" href="http://example.com/-{foo">Breaks template, however</a>}}</li></ul>
12826 <li><a rel="mw:ExtLink" class="external text" href="http://example.com/-{foo">Example in URL</a></li>
12827 <li><a rel="mw:ExtLink" class="external text" href="http://example.com">Example in -{link} description</a></li>
12828 <li>{{echo|<a rel="mw:ExtLink" class="external text" href="http://example.com/-{foo">Breaks template, however</a>}}</li>
12833 Preprocessor precedence 14: broken language converter in comment
12835 *<!--{{foo}}-->...should be ok
12836 *<!---{{foo}}-->...extra dashes
12837 *{{echo|foo<!-- -{bar} -->bat}}...should be ok
12839 <ul><li>...should be ok</li>
12840 <li>...extra dashes</li>
12841 <li>foobat...should be ok</li></ul>
12844 <li><!--{{foo}}-->...should be ok</li>
12845 <li><!---{{foo}}-->...extra dashes</li>
12846 <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>
12851 Preprocessor precedence 15: broken brace markup in headings
12853 wgFragmentMode=[ 'html5', 'legacy' ]
12857 __NOTOC__ __NOEDITSECTION__
12866 ===5 foo{{{bar 5===
12871 <h3><span id="1_foo.5Bbar_1"></span><span class="mw-headline" id="1_foo[bar_1">1 foo[bar 1</span></h3>
12874 <h3><span id="2_foo.5B.5Bbar_2"></span><span class="mw-headline" id="2_foo[[bar_2">2 foo[[bar 2</span></h3>
12877 <h3><span id="3_foo.7Bbar_3"></span><span class="mw-headline" id="3_foo{bar_3">3 foo{bar 3</span></h3>
12880 <h3><span id="4_foo.7B.7Bbar_4"></span><span class="mw-headline" id="4_foo{{bar_4">4 foo{{bar 4</span></h3>
12883 <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>
12886 <h3><span id="6_foo-.7Bbar_6"></span><span class="mw-headline" id="6_foo-{bar_6">6 foo-{bar 6</span></h3>
12890 <meta property="mw:PageProp/notoc"/> <meta property="mw:PageProp/noeditsection"/>
12891 <h3 id="1_foo[bar_1"><span id="1_foo.5Bbar_1" typeof="mw:FallbackId"></span>1 foo[bar 1</h3>
12893 <h3 id="2_foo[[bar_2"><span id="2_foo.5B.5Bbar_2" typeof="mw:FallbackId"></span>2 foo[[bar 2</h3>
12895 <h3 id="3_foo{bar_3"><span id="3_foo.7Bbar_3" typeof="mw:FallbackId"></span>3 foo{bar 3</h3>
12897 <h3 id="4_foo{{bar_4"><span id="4_foo.7B.7Bbar_4" typeof="mw:FallbackId"></span>4 foo{{bar 4</h3>
12899 <h3 id="5_foo{{{bar_5"><span id="5_foo.7B.7B.7Bbar_5" typeof="mw:FallbackId"></span>5 foo{{{bar 5</h3>
12901 <h3 id="6_foo-{bar_6"><span id="6_foo-.7Bbar_6" typeof="mw:FallbackId"></span>6 foo-{bar 6</h3>
12906 Preprocessor precedence 16: matching closing braces to opening braces
12911 -{{{echo|foo}}bar}-
12916 <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>
12920 Preprocessor precedence 17: template w/o target shouldn't prevent closing
12929 <p about="#mwt1" typeof="mw:Transclusion" data-mw='{"parts":[{"template":{"target":{"wt":"echo","href":"./Template:Echo"},"params":{"1":{"wt":"hi {{}}"}},"i":0}}]}'>hi {{}}</p>
12932 # Ensure we're using a language without variants for this test; even
12933 # if $wgUsePigLatinVariant is true. We've picked `de` arbitrarily.
12935 Preprocessor precedence 18: another rightmost wins scenario
12940 {{ -{{{{1|tplarg}}} }} }-
12942 <p>{{ -{tplarg }} }-
12945 <p>{{ -{<span about="#mwt1" typeof="mw:Param" data-mw='{"parts":[{"templatearg":{"target":{"wt":"1"},"params":{"1":{"wt":"tplarg"}},"i":0}}]}'>tplarg</span> }} }-</p>
12949 Preprocessor precedence 19: break syntax
12962 ### Token Stream Patcher tests
12964 ### These tests won't always pass wt2wt and other modes because
12965 ### on serialization, the table will be output on a new line.
12966 ### For now, we are blacklisting them, and using this to test selser.
12970 1. Table tag in SOL posn. should get reparsed correctly with valid TSR
12972 parsoid=wt2html,wt2wt
12974 {{echo|}}{| width = '100%'
12978 <span typeof="mw:Transclusion" data-mw='{"parts":[{"template":{"target":{"wt":"echo","href":"./Template:Echo"},"params":{"1":{"wt":""}},"i":0}}]}'></span><table width="100%">
12979 <tbody><tr><td>foo</td></tr>
12983 ## We used to, but no longer wt2wt this test since the default serializer
12984 ## will normalize the include directives to serialize on their own line.
12985 ## Selser will take care of preserving formatting in scenarios where they
12986 ## intermingled with other wikitext.
12988 2. Table tag in SOL posn. should get reparsed correctly with valid TSR
12992 <includeonly>a</includeonly>{| {{{b}}}
12996 <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":""}]]}'>
12997 <tbody><tr><td>c</td></tr>
13002 Table wikitext syntax outside wiki-tables
13006 ! not a table heading
13009 | class="foo bar" | baz
13017 ! not a table heading
13020 | class="foo bar" | baz
13029 ### Testing parsing of templates where a template arg
13030 ### has the same name as the template itself.
13036 {{{quote|{{{1}}}}}}
13040 Templates: Template Name/Arg clash: 1. Use of positional param
13049 Templates: Template Name/Arg clash: 2. Use of named param
13051 {{quote|quote=foo}}
13058 Templates: Template Name/Arg clash: 3. Use of named param with empty input
13067 ### Parsoid-centric tests to stress Parsoid's ability to RT them unchanged
13071 Templates: 1. Simple use
13080 Templates: 2. Inside a block tag
13082 <div>{{echo|Foo}}</div>
13083 <blockquote>{{echo|Foo}}</blockquote>
13086 <blockquote>Foo</blockquote>
13090 <blockquote><p>Foo</p></blockquote>
13094 Templates: P-wrapping: 1a. Templates on consecutive lines
13105 Templates: P-wrapping: 1b. Templates on consecutive lines
13119 Templates: P-wrapping: 1c. Templates on consecutive lines
13122 {{echo|bar}} <div>baz</div>
13131 bar </p><div>baz</div>
13135 Templates: P-wrapping: 1d. Template preceded by comment-only line
13145 <p about="#mwt223" typeof="mw:Transclusion" data-mw='{"parts":[{"template":{"target":{"wt":"echo","href":"./Template:Echo"},"params":{"1":{"wt":"Bar"}},"i":0}}]}'>Bar</p>
13149 Templates: Scopes should not be expanded unnecessarily
13151 parsoid=wt2html,wt2wt
13153 {{echo|<div>a</div>}}b{{echo|
13159 <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}}]}'>
13160 </span><div about="#mwt2">c</div>
13164 Templates: Inline Text: 1. Multiple template uses
13166 {{echo|Foo}}bar{{echo|baz}}
13173 Templates: Inline Text: 2. Back-to-back template uses
13175 {{echo|Foo}}{{echo|bar}}
13182 Templates: Block Tags: 1. Multiple template uses
13184 {{echo|<div>Foo</div>}}<div>bar</div>{{echo|<div>baz</div>}}
13186 <div>Foo</div><div>bar</div><div>baz</div>
13191 Templates: Block Tags: 2. Back-to-back template uses
13193 {{echo|<div>Foo</div>}}{{echo|<div>bar</div>}}
13195 <div>Foo</div><div>bar</div>
13199 ## Parsoid drops empty elements in templates.
13201 Templates: Correctly encapsulate templates producing </p> tag without a corresponding <p> tag
13208 b</p><p class="mw-empty-elt"></p>
13210 <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">
13211 </span><p about="#mwt1">b</p>
13215 Templates: Links: 1. Simple example
13217 {{echo|[[Foo|bar]]}}
13219 <p><a href="/wiki/Foo" title="Foo">bar</a>
13224 Templates: Links: 2. Generation of link href
13226 [[{{echo|Foo}}|bar]]
13228 <p><a href="/wiki/Foo" title="Foo">bar</a>
13233 Templates: Links: 3. Generation of part of a link href
13235 [[Fo{{echo|o}}|bar]]
13237 [[Foo{{echo|bar}}]]
13239 [[Foo{{echo|bar}}baz]]
13241 [[Foo{{echo|bar}}|bar]]
13243 [[:Foo{{echo|bar}}]]
13245 [[:Foo{{echo|bar}}|bar]]
13247 <p><a href="/wiki/Foo" title="Foo">bar</a>
13248 </p><p><a href="/index.php?title=Foobar&action=edit&redlink=1" class="new" title="Foobar (page does not exist)">Foobar</a>
13249 </p><p><a href="/index.php?title=Foobarbaz&action=edit&redlink=1" class="new" title="Foobarbaz (page does not exist)">Foobarbaz</a>
13250 </p><p><a href="/index.php?title=Foobar&action=edit&redlink=1" class="new" title="Foobar (page does not exist)">bar</a>
13251 </p><p><a href="/index.php?title=Foobar&action=edit&redlink=1" class="new" title="Foobar (page does not exist)">Foobar</a>
13252 </p><p><a href="/index.php?title=Foobar&action=edit&redlink=1" class="new" title="Foobar (page does not exist)">bar</a>
13257 Templates: Links: 4. Multiple templates generating link href
13259 [[{{echo|F}}{{echo|o}}ob{{echo|ar}}]]
13261 <p><a href="/index.php?title=Foobar&action=edit&redlink=1" class="new" title="Foobar (page does not exist)">Foobar</a>
13266 Templates: Links: 5. Generation of link text
13268 [[Foo|{{echo|bar}}]]
13270 <p><a href="/wiki/Foo" title="Foo">bar</a>
13275 Templates: Links: 5. Nested templates (only outermost template should be marked)
13277 {{echo|[[{{echo|Foo}}|bar]]}}
13279 <p><a href="/wiki/Foo" title="Foo">bar</a>
13284 Templates: HTML Tag: 1. Generation of HTML attr. key
13286 <div {{echo|style}}="color:red;">foo</div>
13288 <div style="color:red;">foo</div>
13293 Templates: HTML Tag: 2. Generation of HTML attr. value
13295 <div style={{echo|'color:red;'}}>foo</div>
13297 <div style="color:red;">foo</div>
13302 Templates: HTML Tag: 3. Generation of HTML attr key and value
13304 <div {{echo|style}}={{echo|'color:red;'}}>foo</div>
13306 <div style="color:red;">foo</div>
13311 Templates: HTML Tag: 4. Generation of starting piece of HTML attr value
13313 <div title="{{echo|This is a long title}} with just one piece templated">foo</div>
13315 <div title="This is a long title with just one piece templated">foo</div>
13320 Templates: HTML Tag: 5. Generation of middle piece of HTML attr value
13322 <div title="This is a long title with just {{echo|one piece}} templated">foo</div>
13324 <div title="This is a long title with just one piece templated">foo</div>
13329 Templates: HTML Tag: 6. Generation of end piece of HTML attr value
13331 <div title="This is a long title with just one piece {{echo|templated}}">foo</div>
13333 <div title="This is a long title with just one piece templated">foo</div>
13337 # SSS FIXME: While it is great we added support for all this,
13338 # do we want to make this part of the spec? Maybe we want to
13339 # deprecate this kind of usage in the future?
13341 Templates: HTML Tag: 7. Generation of partial attribute key string
13343 <div st{{echo|yle}}="color:red;">foo</div>
13345 <div style="color:red;">foo</div>
13350 Templates: HTML Tag: 8. Template-generated attribute (k=v)
13352 <div {{echo|1=id="v1"}}>bar</div>
13354 <div id="v1">bar</div>
13359 Templates: HTML Tag: 9. Multiple template-generated attributes
13361 <div {{echo|1=id="v1" title="foo"}}>bar</div>
13363 <div id="v1" title="foo">bar</div>
13368 Templates: Support for templates generating attributes and content
13370 {| {{mixed_attr_content_template}}
13375 <table style="color:red;" title="T48811">
13385 <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|}"]}'>
13394 Template:attribute_from_template
13400 Table cell with attribute before expanded attribute
13403 | align="center" {{attribute_from_template}} |456
13407 <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>
13412 1. Entities and nowikis inside templated attributes should be handled correctly
13414 <div {{echo|style{{=}}"background:#f9f9f9;"}}>foo</div>
13416 <div style="background:#f9f9f9;">foo</div>
13419 <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>
13423 2. Entities and nowikis inside templated attributes should be handled correctly
13426 |{{table_attribs_3}}
13431 <td style="background:#f9f9f9;">Foo
13436 <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>
13441 3. Entities and nowikis inside templated attributes should be handled correctly inside templated tables
13444 |{{table_attribs_3}}
13449 <td style="background:#f9f9f9;">Foo
13453 <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}}]}'>
13454 <tbody><tr><td style="background:#f9f9f9;">Foo</td></tr>
13460 4. Entities and nowikis inside templated attributes should be handled correctly inside templated tables
13463 |{{table_attribs_6}} hi
13468 <td style="background: red;">hi
13473 <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>
13478 Templates: HTML Tables: 1. Generating start of a HTML table
13480 {{echo|<table><tr><td>foo</td>}}</tr></table>
13482 <table><tr><td>foo</td></tr></table>
13487 Templates: HTML Tables: 2a. Generating middle of a HTML table
13489 <table><tr>{{echo|<td>foo</td>}}</tr></table>
13491 <table><tr><td>foo</td></tr></table>
13496 Templates: HTML Tables: 2b. Generating middle of a HTML table
13498 <table>{{echo|<tr><td>foo</td></tr>}}</table>
13500 <table><tr><td>foo</td></tr></table>
13505 Templates: HTML Tables: 3. Generating end of a HTML table
13507 <table><tr>{{echo|<td>foo</td></tr></table>}}
13509 <table><tr><td>foo</td></tr></table>
13514 Templates: HTML Tables: 4a. Generating a single tag of a HTML table
13516 {{echo|<table>}}<tr><td>foo</td></tr></table>
13518 <table><tr><td>foo</td></tr></table>
13523 Templates: HTML Tables: 4b. Generating a single tag of a HTML table
13525 <table>{{echo|<tr>}}<td>foo</td></tr></table>
13527 <table><tr><td>foo</td></tr></table>
13532 Templates: HTML Tables: 4c. Generating a single tag of a HTML table
13534 <table><tr>{{echo|<td>}}foo</td></tr></table>
13536 <table><tr><td>foo</td></tr></table>
13541 Templates: HTML Tables: 4d. Generating a single tag of a HTML table
13543 <table><tr><td>foo{{echo|</td>}}</tr></table>
13545 <table><tr><td>foo</td></tr></table>
13550 Templates: HTML Tables: 4e. Generating a single tag of a HTML table
13552 <table><tr><td>foo</td>{{echo|</tr>}}</table>
13554 <table><tr><td>foo</td></tr></table>
13559 Templates: HTML Tables: 4f. Generating a single tag of a HTML table
13561 <table><tr><td>foo</td></tr>{{echo|</table>}}
13563 <table><tr><td>foo</td></tr></table>
13568 Templates: HTML Tables: 5. Proper fostering of categories from inside
13570 parsoid=wt2html,wt2wt
13572 <table>[[Category:foo1]]<tr><td>foo</td></tr></table>
13573 <!--Two categories (T52330)-->
13574 <table>[[Category:bar1]][[Category:bar2]]<tr><td>foo</td></tr></table>
13576 <table><tbody><tr><td>foo</td></tr></tbody></table>
13577 <table><tbody><tr><td>foo</td></tr></tbody></table>
13579 <link rel="mw:PageProp/Category" href="./Category:Foo1"><table><tbody><tr><td>foo</td></tr></tbody></table>
13580 <!--Two categories (T52330)-->
13581 <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>
13584 ## Remex doesn't account for fostered content.
13586 Templates: Wiki Tables: 1a. Fostering of entire template content
13594 <tr><td></td></tr></table>
13599 <table><tbody><tr><td></td></tr></tbody></table>
13601 <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">
13607 Templates: Wiki Tables: 1b. Fostering of entire template content
13620 <tr><td></td></tr></table>
13628 <tbody><tr><td></td></tr></tbody></table>
13630 <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|}"]}'>
13632 </div><table about="#mwt3">
13637 ## Remex doesn't account for fostered content.
13639 Templates: Wiki Tables: 2. Fostering of partial template content
13649 <tr><td></td></tr></table>
13654 <div>b</div><table>
13655 <tbody><tr><td></td></tr></tbody></table>
13657 <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">
13664 Templates: Wiki Tables: 3. td-content via multiple templates
13667 {{echo|{{pipe}}a}}{{echo|b}}
13678 Templates: Wiki Tables: 4. Templated tags, no content
13684 <tr><td></td></tr></table>
13689 Templates: Wiki Tables: 5. Templated tags, regular td-tags
13703 Templates: Wiki Tables: 6. Templated tags, templated td-tags
13716 ## This test case is very specific to Parsoid's internals
13717 ## and is hence only tested for Parsoid's code. Parsoid uses
13718 ## a <meta> marker tag for <ref> tags and they are expanded
13719 ## much later. We are verifying that this <meta> tag usage
13720 ## doesn't prevent foster parenting.
13722 Templates: Wiki Tables: 7. Fosterable <ref>s should get fostered
13724 {{PartialTable}}<ref>foo</ref>
13729 <p about="#mwt2" typeof="mw:Transclusion" data-mw='{"parts":[{"template":{"target":{"wt":"PartialTable","href":"./Template:PartialTable"},"params":{},"i":0}},"<ref>foo</ref>\n|}"]}'><sup about="#mwt3" class="mw-ref" id="cite_ref-1" rel="dc:references" typeof="mw:Extension/ref" data-mw='{"name":"ref","attrs":{},"body":{"id":"mw-reference-text-cite_note-1"}}'><a href="./Parser_test#cite_note-1" style="counter-reset: mw-Ref 1;"><span class="mw-reflink-text">[1]</span></a></sup></p><table about="#mwt2">
13733 <ol class="mw-references references" typeof="mw:Extension/references" about="#mwt5" data-mw='{"name":"references","attrs":{}}'><li about="#cite_note-1" id="cite_note-1"><a href="./Parser_test#cite_ref-1" rel="mw:referencedBy"><span class="mw-linkback-text">↑ </span></a> <span id="mw-reference-text-cite_note-1" class="mw-reference-text">foo</span></li></ol>
13737 Templates: Wiki Tables: 8. Fosterable meta-tags should get fostered
13747 <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{{!}}}"]}'>
13748 </span><meta typeof="mw:Includes/OnlyInclude" about="#mwt1"/><table about="#mwt1">
13752 <meta typeof="mw:Includes/OnlyInclude/End"/></td></tr>
13757 Templates: Lists: Multi-line list-items via templates
13759 *{{echo|a {{nonexistent|
13761 *{{echo|b {{nonexistent|
13764 <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>
13765 <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>
13770 Templates: Ugly nesting: 1. Quotes opened/closed across templates (echo)
13772 {{echo|''a}}{{echo|b''c''d}}{{echo|''e}}
13774 <p><i>ab</i>c<i>d</i>e
13779 Templates: Ugly nesting: 2. Quotes opened/closed across templates (echo_with_span)
13780 (PHP parser generates misnested html)
13782 {{echo_with_span|''a}}{{echo_with_span|b''c''d}}{{echo_with_span|''e}}
13784 <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>
13788 Templates: Ugly nesting: 3. Quotes opened/closed across templates (echo_with_div)
13789 (PHP parser generates misnested html; Parsoid html2wt mode adds newlines between {{echo}}s)
13791 parsoid=wt2html,wt2wt
13793 {{echo_with_div|''a}}{{echo_with_div|b''c''d}}{{echo_with_div|''e}}
13795 <div><i>a</i></div><div><i>b</i>c<i>d</i></div><div>e</div>
13797 <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>
13798 <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>
13799 <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>
13803 Templates: Ugly nesting: 4. Divs opened/closed across templates
13805 a<div>b{{echo|c</div>d}}e
13810 <p>a</p><div>bc</div><p>de
13815 Templates: Ugly templates: 3. newline-only template parameter
13824 # This looks like a bug: a single newline triggers p/br for some reason.
13826 Templates: Ugly templates: 4. newline-only template parameter inconsistency
13835 # T66017 -- ugly wikitext with fostered content generates two template ranges that
13836 # have a true overlap (T1-start - T2-start - T1-end - T2-end).
13838 Templates: Ugly templates: 5. Template encapsulation test: Non-trivial overlap of template ranges is properly handled
13844 <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">
13845 </span><table about="#mwt1">
13849 # T66017 -- ugly wikitext with fostered content generates two template ranges
13850 # that are "identical" and generate nesting cycles in the algorithm
13852 Templates: Ugly templates: 6. Template encapsulation test: Cyclical nesting of template ranges is properly handled
13854 {{echo|<table><tr><td><table>}}
13858 <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"}'>
13859 </div><table about="#mwt1" data-parsoid='{"stx":"html"}'>
13860 </table></td></tr></tbody></table>
13864 Templates: Parameters substituted at the top-level
13866 {{{foo|''who'' {{echo|me}}? '''never!'''}}}
13870 <p><i>who</i> me? <b>never!</b>
13874 <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>
13876 <p about="#mwt3" typeof="mw:Param" data-mw='{"parts":[{"templatearg":{"target":{"wt":"foo"},"params":{"1":{"wt":"bar"},"2":{"wt":"baz"}},"i":0}}]}'>bar</p>
13880 Templates: Param with empty arg in the final position
13884 <span about="#mwt1" typeof="mw:Param" data-mw='{"parts":[{"templatearg":{"target":{"wt":"hi"},"params":{"1":{"wt":""}},"i":0}}]}'></span>
13888 Parser Functions: 1. Simple example
13897 Parser Functions: 2. Nested use (only outermost should be marked up)
13905 ## Note that the templates inside the references are not wrapped
13907 Template nested in extension tag in template
13909 title=[[Main Page]]
13912 {{echo|hi<ref>[[ho|{{echo|hi}}]]</ref>}}
13913 {{echo|hi<ref>[http://test.com?q={{echo|ho}}]</ref>}}
13914 {{echo|hi<ref>-{ho|{{echo|hi}}}-</ref>}}
13917 <p><span about="#mwt2" typeof="mw:Transclusion" data-mw='{"parts":[{"template":{"target":{"wt":"echo","href":"./Template:Echo"},"params":{"1":{"wt":"hi<ref>[[ho|{{echo|hi}}]]</ref>"}},"i":0}}]}'>hi</span><sup about="#mwt2" class="mw-ref" id="cite_ref-1" rel="dc:references" typeof="mw:Extension/ref" data-mw='{"name":"ref","attrs":{},"body":{"id":"mw-reference-text-cite_note-1"}}'><a href="./Main_Page#cite_note-1" style="counter-reset: mw-Ref 1;"><span class="mw-reflink-text">[1]</span></a></sup>
13918 <span about="#mwt8" typeof="mw:Transclusion" data-mw='{"parts":[{"template":{"target":{"wt":"echo","href":"./Template:Echo"},"params":{"1":{"wt":"hi<ref>[http://test.com?q={{echo|ho}}]</ref>"}},"i":0}}]}'>hi</span><sup about="#mwt8" class="mw-ref" id="cite_ref-2" rel="dc:references" typeof="mw:Extension/ref" data-mw='{"name":"ref","attrs":{},"body":{"id":"mw-reference-text-cite_note-2"}}'><a href="./Main_Page#cite_note-2" style="counter-reset: mw-Ref 2;"><span class="mw-reflink-text">[2]</span></a></sup>
13919 <span about="#mwt13" typeof="mw:Transclusion" data-mw='{"parts":[{"template":{"target":{"wt":"echo","href":"./Template:Echo"},"params":{"1":{"wt":"hi<ref>-{ho|{{echo|hi}}}-</ref>"}},"i":0}}]}'>hi</span><sup about="#mwt13" class="mw-ref" id="cite_ref-3" rel="dc:references" typeof="mw:Extension/ref" data-mw='{"name":"ref","attrs":{},"body":{"id":"mw-reference-text-cite_note-3"}}'><a href="./Main_Page#cite_note-3" style="counter-reset: mw-Ref 3;"><span class="mw-reflink-text">[3]</span></a></sup></p>
13920 <ol class="mw-references references" typeof="mw:Extension/references" about="#mwt17" data-mw='{"name":"references","attrs":{}}'><li about="#cite_note-1" id="cite_note-1"><a href="./Main_Page#cite_ref-1" rel="mw:referencedBy"><span class="mw-linkback-text">↑ </span></a> <span id="mw-reference-text-cite_note-1" class="mw-reference-text"><a rel="mw:WikiLink" href="./Ho" title="Ho">hi</a></span></li><li about="#cite_note-2" id="cite_note-2"><a href="./Main_Page#cite_ref-2" rel="mw:referencedBy"><span class="mw-linkback-text">↑ </span></a> <span id="mw-reference-text-cite_note-2" class="mw-reference-text"><a rel="mw:ExtLink" class="external autonumber" href="http://test.com?q=ho"></a></span></li><li about="#cite_note-3" id="cite_note-3"><a href="./Main_Page#cite_ref-3" rel="mw:referencedBy"><span class="mw-linkback-text">↑ </span></a> <span id="mw-reference-text-cite_note-3" class="mw-reference-text"><span typeof="mw:LanguageVariant" data-mw-variant='{"filter":{"l":["ho"],"t":"hi"}}'></span></span></li></ol>
13924 ### Pre-save transform tests
13928 pre-save transform: subst:
13934 This is a test template
13938 pre-save transform: normal template
13948 pre-save transform: nonexistent template
13952 {{thistemplatedoesnotexist}}
13954 {{thistemplatedoesnotexist}}
13958 pre-save transform: subst magic variables
13967 # This is T2089, which I fixed. -- wtm
13969 pre-save transform: subst: templates with parameters
13973 {{subst:paramtest|param="something else"}}
13975 This is a test template with parameter "something else"
13979 Template:nowikitest
13981 <nowiki>'''not wiki'''</nowiki>
13985 pre-save transform: nowiki in subst (T3188)
13989 {{subst:nowikitest}}
13991 <nowiki>'''not wiki'''</nowiki>
13995 Template:commenttest
13997 This template has <!-- a comment --> in it.
14001 pre-save transform: comment in subst (T3936)
14005 {{subst:commenttest}}
14007 This template has <!-- a comment --> in it.
14011 pre-save transform: unclosed tag
14015 <nowiki>'''not wiki'''
14017 <nowiki>'''not wiki'''
14021 pre-save transform: mixed tag case
14025 <NOwiki>'''not wiki'''</noWIKI>
14027 <NOwiki>'''not wiki'''</noWIKI>
14031 pre-save transform: unclosed comment in <nowiki>
14035 wiki<nowiki>nowiki<!--nowiki</nowiki>wiki
14037 wiki<nowiki>nowiki<!--nowiki</nowiki>wiki
14040 # Leading @ in this template definition works around a limitation
14041 # in parsoid's parserTests which otherwise strips the <span> from the
14042 # result (confusing it for a template wrapper)
14046 @<span onmouseover="alert('crap')">Oh no</span>
14050 (confirming safety of fix for subst T3936)
14052 {{Template:dangerous}}
14054 <p>@<span>Oh no</span>
14059 pre-save transform: comment containing gallery (T7024)
14063 <!-- <gallery>data</gallery> -->
14065 <!-- <gallery>data</gallery> -->
14069 pre-save transform: comment containing extension
14073 <!-- <tag>data</tag> -->
14075 <!-- <tag>data</tag> -->
14079 pre-save transform: comment containing nowiki
14083 <!-- <nowiki>data</nowiki> -->
14085 <!-- <nowiki>data</nowiki> -->
14089 pre-save transform: <noinclude> in subst (T5298)
14099 pre-save transform: <onlyinclude> in subst (T5298)
14103 {{subst:Includes2}}
14111 {{<includeonly>subst:</includeonly>Includes}}
14115 Template:SafeSubstTest
14117 {{<includeonly>safesubst:</includeonly>Includes}}
14121 T24297: safesubst: works during PST
14125 {{subst:SafeSubstTest}}{{safesubst:SubstTest}}
14131 T24297: safesubst: works during normal parse
14140 subst: does not work during normal parse
14144 <p>{{subst:Includes}}
14149 pre-save transform: context links ("pipe trick")
14153 [[Article (context)|]]
14156 [[Bar:Article (context)|]]
14157 [[:Bar:Article (context)|]]
14159 [[|Article (context)]]
14163 [[Article (context)|Article]]
14164 [[Bar:Article|Article]]
14165 [[:Bar:Article|Article]]
14166 [[Bar:Article (context)|Article]]
14167 [[:Bar:Article (context)|Article]]
14169 [[Article (context)]]
14170 [[Bar:X (Y) Z|X (Y) Z]]
14171 [[:Bar:X (Y) Z|X (Y) Z]]
14175 pre-save transform: context links ("pipe trick") with interwiki prefix
14179 [[interwiki:Article|]]
14180 [[:interwiki:Article|]]
14181 [[interwiki:Bar:Article|]]
14182 [[:interwiki:Bar:Article|]]
14184 [[interwiki:Article|Article]]
14185 [[:interwiki:Article|Article]]
14186 [[interwiki:Bar:Article|Bar:Article]]
14187 [[:interwiki:Bar:Article|Bar:Article]]
14191 pre-save transform: context links ("pipe trick") with parens in title
14193 pst title=[[Somearticle (context)]]
14197 [[Article (context)|Article]]
14201 pre-save transform: context links ("pipe trick") with comma in title
14203 pst title=[[Someplace, Somewhere]]
14206 [[Otherplace, Elsewhere|]]
14207 [[Otherplace, Elsewhere, Anywhere|]]
14209 [[Otherplace, Somewhere|Otherplace]]
14210 [[Otherplace, Elsewhere|Otherplace]]
14211 [[Otherplace, Elsewhere, Anywhere|Otherplace]]
14215 pre-save transform: context links ("pipe trick") with parens and comma
14217 pst title=[[Someplace (IGNORED), Somewhere]]
14220 [[Otherplace (place), Elsewhere|]]
14222 [[Otherplace, Somewhere|Otherplace]]
14223 [[Otherplace (place), Elsewhere|Otherplace]]
14227 pre-save transform: context links ("pipe trick") with comma and parens
14229 pst title=[[Who, me? (context)]]
14232 [[Me, Myself, and I (1937 song)|]]
14234 [[Yes, you. (context)|Yes, you.]]
14235 [[Me, Myself, and I (1937 song)|Me, Myself, and I]]
14239 pre-save transform: context links ("pipe trick") with namespace
14241 pst title=[[Ns:Somearticle]]
14245 [[Ns:Article|Article]]
14249 pre-save transform: context links ("pipe trick") with namespace and parens
14251 pst title=[[Ns:Somearticle (context)]]
14255 [[Ns:Article (context)|Article]]
14259 pre-save transform: context links ("pipe trick") with namespace and comma
14261 pst title=[[Ns:Somearticle, Context, Whatever]]
14265 [[Ns:Article, Context, Whatever|Article]]
14269 pre-save transform: context links ("pipe trick") with namespace, comma and parens
14271 pst title=[[Ns:Somearticle, Context (context)]]
14275 [[Ns:Article (context)|Article]]
14279 pre-save transform: context links ("pipe trick") with namespace, parens and comma
14281 pst title=[[Ns:Somearticle (IGNORED), Context]]
14285 [[Ns:Article, Context|Article]]
14289 pre-save transform: context links ("pipe trick") with full-width parens and no space (Japanese and Chinese style, T32149)
14293 [[Article(context)|]]
14294 [[Bar:Article(context)|]]
14295 [[:Bar:Article(context)|]]
14296 [[|Article(context)]]
14300 [[Article(context)|Article]]
14301 [[Bar:Article(context)|Article]]
14302 [[:Bar:Article(context)|Article]]
14303 [[Article(context)]]
14304 [[Bar:X(Y)Z|X(Y)Z]]
14305 [[:Bar:X(Y)Z|X(Y)Z]]
14309 pre-save transform: context links ("pipe trick") with full-width parens and space (Japanese and Chinese style, T32149)
14313 [[Article (context)|]]
14314 [[Bar:Article (context)|]]
14315 [[:Bar:Article (context)|]]
14316 [[|Article (context)]]
14320 [[Article (context)|Article]]
14321 [[Bar:Article (context)|Article]]
14322 [[:Bar:Article (context)|Article]]
14323 [[Article (context)]]
14324 [[Bar:X (Y) Z|X (Y) Z]]
14325 [[:Bar:X (Y) Z|X (Y) Z]]
14329 pre-save transform: context links ("pipe trick") with parens and no space (Korean style, T32149)
14333 [[Article(context)|]]
14334 [[Bar:Article(context)|]]
14335 [[:Bar:Article(context)|]]
14336 [[|Article(context)]]
14340 [[Article(context)|Article]]
14341 [[Bar:Article(context)|Article]]
14342 [[:Bar:Article(context)|Article]]
14343 [[Article(context)]]
14344 [[Bar:X(Y)Z|X(Y)Z]]
14345 [[:Bar:X(Y)Z|X(Y)Z]]
14349 pre-save transform: context links ("pipe trick") with commas (T23660)
14353 [[Article (context), context|]]
14354 [[Article (context),context|]]
14355 [[Bar:Article (context), context|]]
14356 [[Bar:Article (context),context|]]
14357 [[:Bar:Article (context), context|]]
14358 [[:Bar:Article (context),context|]]
14360 [[Article (context), context|Article]]
14361 [[Article (context),context|Article]]
14362 [[Bar:Article (context), context|Article]]
14363 [[Bar:Article (context),context|Article]]
14364 [[:Bar:Article (context), context|Article]]
14365 [[:Bar:Article (context),context|Article]]
14369 Parsoid: backwards pipe trick
14376 <p>[[|<b>bar</b>]]</p>
14380 pre-save transform: trim trailing empty lines
14384 Empty lines are trimmed
14390 Empty lines are trimmed
14394 pre-save transform: Signature expansion
14401 * <noinclude>~~~</noinclude>
14402 * <includeonly>~~~</includeonly>
14403 * <onlyinclude>~~~</onlyinclude>
14405 * [[Special:Contributions/127.0.0.1|127.0.0.1]]
14406 * [[Special:Contributions/127.0.0.1|127.0.0.1]] 00:02, 1 January 1970 (UTC)
14407 * 00:02, 1 January 1970 (UTC)
14408 * <noinclude>[[Special:Contributions/127.0.0.1|127.0.0.1]]</noinclude>
14409 * <includeonly>[[Special:Contributions/127.0.0.1|127.0.0.1]]</includeonly>
14410 * <onlyinclude>[[Special:Contributions/127.0.0.1|127.0.0.1]]</onlyinclude>
14415 ParserOutput flags from signature expansion (T84843)
14422 [[Special:Contributions/127.0.0.1|127.0.0.1]] 00:02, 1 January 1970 (UTC)
14423 flags=user-signature
14428 pre-save transform: Signature expansion in nowiki tags (T2093)
14434 <nowiki>~~~~</nowiki>
14436 <includeonly><nowiki>~~~~</nowiki></includeonly>
14438 <noinclude><nowiki>~~~~</nowiki></noinclude>
14440 <onlyinclude><nowiki>~~~~</nowiki></onlyinclude>
14442 {{subst:Foo}} shall be converted to FOO
14444 As well as inside noinclude/onlyinclude
14445 <noinclude>{{subst:Foo}}</noinclude>
14446 <onlyinclude>{{subst:Foo}}</onlyinclude>
14448 But not inside includeonly
14449 <includeonly>{{subst:Foo}}</includeonly>
14453 <nowiki>~~~~</nowiki>
14455 <includeonly><nowiki>~~~~</nowiki></includeonly>
14457 <noinclude><nowiki>~~~~</nowiki></noinclude>
14459 <onlyinclude><nowiki>~~~~</nowiki></onlyinclude>
14461 FOO shall be converted to FOO
14463 As well as inside noinclude/onlyinclude
14464 <noinclude>FOO</noinclude>
14465 <onlyinclude>FOO</onlyinclude>
14467 But not inside includeonly
14468 <includeonly>{{subst:Foo}}</includeonly>
14472 Parsoid: Recognize nowiki with trailing space in tags
14476 <nowiki ><div>[[foo]]</nowiki >
14484 <p><div>[[foo]]
14485 </p><p>a<nowiki / >b
14487 </p><p>e<nowiki/ >f
14490 <p><span typeof="mw:Nowiki"><div>[[foo]]</span></p>
14492 <p>a<nowiki / >b</p>
14494 <p>c<span typeof="mw:Nowiki"></span>d</p>
14496 <p>e<nowiki/ >f</p>
14500 Parsoid: Recognize nowiki with odd capitalization
14504 <noWikI ><div>[[foo]]</Nowiki >
14506 <p><div>[[foo]]
14509 <p><span typeof="mw:Nowiki"><div>[[foo]]</span></p>
14514 Parsoid: Escape nowiki with trailing space in tags
14518 <p><nowiki > foo </nowiki ></p>
14519 <p>a<nowiki />b</p>
14520 <p>c<nowiki/ >d</p>
14522 <nowiki > foo </nowiki >
14530 Parsoid: Escape weird noWikI capitalizations
14534 <p><noWikI > foo </NoWikI ></p>
14536 <noWikI > foo </NoWikI >
14540 ### Message transform tests
14543 message transform: magic variables
14553 message transform: should not transform wiki markup
14563 message transform: <noinclude> in transcluded template (T6926)
14573 message transform: <onlyinclude> in transcluded template (T6926)
14583 {{#special:}} page name, known
14587 {{#special:Recentchanges}}
14589 Special:RecentChanges
14593 {{#special:}} page name with subpage, known
14597 {{#special:Recentchanges/param}}
14599 Special:RecentChanges/param
14603 {{#special:}} page name, unknown
14607 {{#special:foobar nonexistent}}
14609 Special:Foobar nonexistent
14613 {{#speciale:}} page name, known
14617 {{#speciale:Recentchanges}}
14619 Special:RecentChanges
14623 {{#speciale:}} page name with subpage, known
14627 {{#speciale:Recentchanges/param}}
14629 Special:RecentChanges/param
14633 {{#speciale:}} page name, unknown
14637 {{#speciale:foobar nonexistent}}
14639 Special:Foobar_nonexistent
14645 ### For Parsoid-specific tests, see
14646 #### https://www.mediawiki.org/wiki/Parsoid/MediaWiki_DOM_spec#Images
14651 parsoid=wt2html,wt2wt,html2html
14653 [[Image:foobar.jpg]]
14655 <p><a href="/wiki/File:Foobar.jpg" class="image"><img alt="Foobar.jpg" src="http://example.com/images/3/3a/Foobar.jpg" decoding="async" width="1941" height="220" /></a>
14658 <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>
14662 Serialize simple image with span wrapper
14666 <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>
14668 [[File:Foobar.jpg]]
14672 Simple image (using File: namespace, now canonical)
14674 [[File:Foobar.jpg]]
14676 <p><a href="/wiki/File:Foobar.jpg" class="image"><img alt="Foobar.jpg" src="http://example.com/images/3/3a/Foobar.jpg" decoding="async" width="1941" height="220" /></a>
14679 <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>
14683 Right-aligned image
14685 [[File:Foobar.jpg|right]]
14687 <div class="floatright"><a href="/wiki/File:Foobar.jpg" class="image"><img alt="Foobar.jpg" src="http://example.com/images/3/3a/Foobar.jpg" decoding="async" width="1941" height="220" /></a></div>
14690 <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>
14696 [[File:Foobar.jpg|right|Caption text]]
14698 <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" decoding="async" width="1941" height="220" /></a></div>
14701 <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>
14705 Image with caption, T55312 #1
14707 [[File:Foobar.jpg|right|Caption page stuff]]
14709 <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" decoding="async" width="1941" height="220" /></a></div>
14712 <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>
14716 Image with caption, T55312 #2
14718 [[File:Foobar.jpg|right|Caption page=]]
14720 <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" decoding="async" width="1941" height="220" /></a></div>
14723 <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>
14727 Image with caption, T55312 #3
14729 [[File:Foobar.jpg|right|Caption page=stuff]]
14731 <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" decoding="async" width="1941" height="220" /></a></div>
14734 <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>
14738 Image caption with pipe entity
14740 [[File:Foobar.jpg|thumb|one | two]]
14741 [[File:Foobar.jpg|thumb|one ''two'' | three]]
14743 <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" decoding="async" 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>
14744 <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" decoding="async" 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>
14747 <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>
14748 <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>
14752 Allow empty links in image captions (T62753)
14756 [[File:Foobar.jpg|thumb|Caption [[Link1]]
14761 <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" decoding="async" 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>
14764 <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>
14766 <a rel="mw:WikiLink" href="./Link2" title="Link2" data-parsoid='{"stx":"simple","a":{"href":"./Link2"},"sa":{"href":"Link2"}}'>Link2</a>
14767 </figcaption></figure>
14771 Titles in unlinked images (T23454)
14773 [[File:Foobar.jpg|link=|stuff]]
14775 <p><img alt="stuff" src="http://example.com/images/3/3a/Foobar.jpg" decoding="async" title="stuff" width="1941" height="220" />
14778 <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>
14782 Link with empty target
14791 Image with link trail
14793 Linktrails should not work for images: [[File:Foobar.jpg]]s
14795 <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" decoding="async" width="1941" height="220" /></a>s
14798 <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>
14802 Image with empty attribute
14804 parsoid=wt2html,wt2wt,html2html
14806 [[File:Foobar.jpg|right||Caption text]]
14808 <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" decoding="async" width="1941" height="220" /></a></div>
14811 <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>
14815 1. Block image with individual attributes from templates
14817 [[File:Foobar.jpg|thumb|{{echo|137px}}|This is a caption]]
14819 <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" decoding="async" 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>
14822 <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>
14826 2. Block Image with individual attributes from templates
14828 [[File:Foobar.jpg|{{echo|thumb}}|{{echo|137px}}|This is a caption]]
14830 <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" decoding="async" 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>
14833 <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>
14837 3. Inline image with individual attributes from templates
14839 [[File:Foobar.jpg|{{echo|50px}}]]
14841 <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" decoding="async" 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>
14844 <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>
14847 ## Parsoid does not provide editing support for images where templates produce multiple image attributes.
14848 ## To signal this, we add a 'mw:Placeholder' type to such images. This could change in the future.
14850 Image with multiple attributes from the same template
14852 [[File:Foobar.jpg|{{image_attribs}}]]
14854 <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" decoding="async" width="1941" height="220" /></a></div>
14857 <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>
14861 Image with link tails
14865 123[[File:Foobar.jpg]]456
14866 123[[File:Foobar.jpg|right]]456
14867 123[[File:Foobar.jpg|thumb]]456
14869 <p>123<a href="/wiki/File:Foobar.jpg" class="image"><img alt="Foobar.jpg" src="http://example.com/images/3/3a/Foobar.jpg" decoding="async" width="1941" height="220" /></a>456
14871 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" decoding="async" width="1941" height="220" /></a></div>456
14872 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" decoding="async" 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
14875 <p>123<a href="/wiki/File:Foobar.jpg" class="image"><img alt="Foobar.jpg" src="http://example.com/images/3/3a/Foobar.jpg" decoding="async" width="1941" height="220" /></a>456
14877 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" decoding="async" width="1941" height="220" /></a></div><p>456
14878 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" decoding="async" 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
14881 <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>
14882 <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
14883 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>
14887 Image with multiple captions -- only last one is accepted
14889 [[File:Foobar.jpg|right|Caption1 - ignored|[[Caption2]] - ignored|Caption3 - accepted]]
14891 <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" decoding="async" width="1941" height="220" /></a></div>
14894 <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>
14898 Image with multiple widths -- use last
14900 [[File:Foobar.jpg|200px|300px|caption]]
14902 <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" decoding="async" 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>
14905 <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>
14909 Image with multiple alignments -- use first (T50664)
14913 [[File:Foobar.jpg|thumb|left|right|center|caption]]
14915 [[File:Foobar.jpg|middle|text-top|caption]]
14917 <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" decoding="async" 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>
14918 <p><a href="/wiki/File:Foobar.jpg" class="image" title="caption"><img alt="caption" src="http://example.com/images/3/3a/Foobar.jpg" decoding="async" width="1941" height="220" style="vertical-align: middle" /></a>
14921 <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>
14922 <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>
14926 Image with width attribute at different positions
14928 [[File:Foobar.jpg|200px|right|Caption]]
14929 [[File:Foobar.jpg|right|200px|Caption]]
14930 [[File:Foobar.jpg|right|Caption|200px]]
14932 <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" decoding="async" 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>
14933 <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" decoding="async" 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>
14934 <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" decoding="async" 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>
14937 <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>
14938 <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>
14939 <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>
14942 # a sad bit of backward-compatibility
14944 Image with size specified with pxpx (T15500, T53628)
14946 parsoid=wt2html,wt2wt,html2html
14948 [[File:Foobar.jpg|20pxpx]]
14949 [[File:Foobar.jpg|200x20pxpx]]
14951 <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" decoding="async" 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>
14952 <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" decoding="async" 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>
14955 <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>
14959 Image with link parameter, wiki target
14961 [[File:Foobar.jpg|link=Main Page]]
14963 <p><a href="/wiki/Main_Page" title="Main Page"><img alt="Foobar.jpg" src="http://example.com/images/3/3a/Foobar.jpg" decoding="async" width="1941" height="220" /></a>
14966 <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>
14969 # parsoid T51293 (part 1)
14971 Image with link parameter, URL target
14973 [[File:Foobar.jpg|link=http://example.com/]]
14975 <p><a href="http://example.com/" rel="nofollow"><img alt="Foobar.jpg" src="http://example.com/images/3/3a/Foobar.jpg" decoding="async" width="1941" height="220" /></a>
14978 <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>
14981 # parsoid T51293 (part 2)
14983 Image with link parameter, protocol-less URL target
14985 [[File:Foobar.jpg|link=//example.com/]]
14987 <p><a href="//example.com/" rel="nofollow"><img alt="Foobar.jpg" src="http://example.com/images/3/3a/Foobar.jpg" decoding="async" width="1941" height="220" /></a>
14990 <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>
14994 Escaping non-block captions (T107435)
14997 "modes": ["wt2wt"],
14999 ["[typeof~='mw:Image']", "attr", "data-mw", "{\"caption\": \"|\"}"]
15003 [[Image:Foobar.jpg|caption]]
15005 [[Image:Foobar.jpg|<nowiki>|</nowiki>]]
15008 # wgExternalLinkTarget not supported by Parsoid
15010 Image with link parameter, wgExternalLinkTarget
15012 [[Image:foobar.jpg|link=http://example.com/]]
15014 wgExternalLinkTarget='foobar'
15016 <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" decoding="async" width="1941" height="220" /></a>
15021 Image with link parameter, wgNoFollowLinks set to false
15023 [[Image:foobar.jpg|link=http://example.com/]]
15025 wgNoFollowLinks=false
15027 <p><a href="http://example.com/"><img alt="Foobar.jpg" src="http://example.com/images/3/3a/Foobar.jpg" decoding="async" width="1941" height="220" /></a>
15032 Image with link parameter, wgNoFollowDomainExceptions
15034 [[Image:foobar.jpg|link=http://example.com/]]
15036 wgNoFollowDomainExceptions='example.com'
15038 <p><a href="http://example.com/"><img alt="Foobar.jpg" src="http://example.com/images/3/3a/Foobar.jpg" decoding="async" width="1941" height="220" /></a>
15042 # wgExternalLinkTarget not supported by Parsoid
15044 Image with link parameter, wgExternalLinkTarget, unnamed parameter
15046 [[Image:foobar.jpg|link=http://example.com/|Title]]
15048 wgExternalLinkTarget='foobar'
15050 <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" decoding="async" width="1941" height="220" /></a>
15055 Image with empty link parameter
15057 [[File:Foobar.jpg|link=]]
15059 <p><img alt="Foobar.jpg" src="http://example.com/images/3/3a/Foobar.jpg" decoding="async" width="1941" height="220" />
15062 <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>
15066 Image with link parameter (wiki target) and unnamed parameter
15068 [[File:Foobar.jpg|link=Main_Page|Title]]
15070 <p><a href="/wiki/Main_Page" title="Title"><img alt="Title" src="http://example.com/images/3/3a/Foobar.jpg" decoding="async" width="1941" height="220" /></a>
15073 <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>
15077 Image with link parameter (URL target) and unnamed parameter
15079 [[File:Foobar.jpg|link=http://example.com/|Title]]
15081 <p><a href="http://example.com/" title="Title" rel="nofollow"><img alt="Title" src="http://example.com/images/3/3a/Foobar.jpg" decoding="async" width="1941" height="220" /></a>
15084 <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>
15088 Thumbnail image with link parameter
15091 parsoid=wt2html,wt2wt,html2html
15093 [[File:Foobar.jpg|thumb|link=http://example.com/|Title]]
15095 <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" decoding="async" 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>
15098 <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>
15102 Manually-specified thumbnail image
15106 [[File:Foobar.jpg|thumbnail=Thumb.png|Title]]
15108 <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" decoding="async" 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>
15111 <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>
15115 Manually-specified thumbnail image with explicit link to wiki page
15118 parsoid=wt2html,wt2wt,html2html
15120 [[File:Foobar.jpg|thumb=Thumb.png|link=Main_Page|Title]]
15122 <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" decoding="async" 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>
15125 <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>
15129 Manually-specified thumbnail image with explicit link to url
15132 parsoid=wt2html,wt2wt,html2html
15134 [[File:Foobar.jpg|thumb=Thumb.png|link=http://example.com|Title]]
15136 <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" decoding="async" 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>
15139 <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>
15143 Manually-specified thumbnail image with explicit no link
15146 parsoid=wt2html,wt2wt,html2html
15148 [[File:Foobar.jpg|thumb=Thumb.png|link=|Title]]
15150 <div class="thumb tright"><div class="thumbinner" style="width:137px;"><img alt="" src="http://example.com/images/e/ea/Thumb.png" decoding="async" 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>
15153 <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>
15157 Manually-specified thumbnail image with explicit link and alt text
15160 parsoid=wt2html,wt2wt,html2html
15162 [[File:Foobar.jpg|thumb=Thumb.png|link=Main_Page|alt=alttext|Title]]
15164 <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" decoding="async" 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>
15167 <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>
15171 Image with frame and link
15173 parsoid=wt2html,wt2wt,html2html
15175 [[File:Foobar.jpg|frame|left|This is a test image [[Main Page]]]]
15177 <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" decoding="async" 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>
15180 <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>
15184 Image with frame and link and explicit alt
15186 parsoid=wt2html,wt2wt,html2html
15188 [[Image:Foobar.jpg|frame|left|This is a test image [[Main Page]]|alt=Altitude]]
15190 <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" decoding="async" 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>
15193 <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>
15197 Image with wiki markup in implicit alt
15199 [[Image:Foobar.jpg|testing '''bold''' in alt]]
15201 [[Image:Foobar.jpg|alt=testing '''bold''' in alt]]
15203 <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" decoding="async" width="1941" height="220" /></a>
15204 </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" decoding="async" width="1941" height="220" /></a>
15207 <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>
15209 <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>
15213 Alt image option should handle most kinds of wikitext without barfing
15215 [[Image:Foobar.jpg|thumb|This is the image caption|alt=This is a [[link]] and a {{echo|''bold template''}}.]]
15217 <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" decoding="async" 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>
15220 <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>
15224 Ampersand in alt attribute (T206940)
15227 "nativeGallery": true
15230 [[File:Foobar.jpg|alt=&amp;]]
15232 <!-- consistency with gallery extension -->
15234 File:Foobar.jpg|alt=&amp;
15237 <p><a href="/wiki/File:Foobar.jpg" class="image"><img alt="&amp;" src="http://example.com/images/3/3a/Foobar.jpg" decoding="async" width="1941" height="220" /></a>
15239 <ul class="gallery mw-gallery-traditional">
15240 <li class="gallerybox" style="width: 155px"><div style="width: 155px">
15241 <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" decoding="async" 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>
15242 <div class="gallerytext">
15247 <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>
15249 <!-- consistency with gallery extension -->
15250 <ul class="gallery mw-gallery-traditional" typeof="mw:Extension/gallery" data-mw='{"name":"gallery","attrs":{},"body":{}}'>
15251 <li class="gallerybox">
15252 <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>
15253 <div class="gallerytext"></div>
15259 Italics markup in alt attribute (T206940)
15261 [[File:Foobar.jpg|alt=''x''|caption]]
15263 <!-- consistency with gallery extension -->
15265 File:Foobar.jpg|alt=''x''|caption
15268 <p><a href="/wiki/File:Foobar.jpg" class="image" title="caption"><img alt="x" src="http://example.com/images/3/3a/Foobar.jpg" decoding="async" width="1941" height="220" /></a>
15270 <ul class="gallery mw-gallery-traditional">
15271 <li class="gallerybox" style="width: 155px"><div style="width: 155px">
15272 <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" decoding="async" 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>
15273 <div class="gallerytext">
15280 <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>
15282 <!-- consistency with gallery extension -->
15283 <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"}}'>
15284 <li class="gallerybox">
15285 <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>
15286 <div class="gallerytext">caption</div>
15292 Nowiki markup in alt attribute (T206940)
15294 [[File:Foobar.jpg|alt=<nowiki>''</nowiki>x<nowiki>''</nowiki>|caption]]
15296 <!-- consistency with gallery extension -->
15298 File:Foobar.jpg|alt=<nowiki>''</nowiki>x<nowiki>''</nowiki>|caption
15301 <p><a href="/wiki/File:Foobar.jpg" class="image" title="caption"><img alt="''x''" src="http://example.com/images/3/3a/Foobar.jpg" decoding="async" width="1941" height="220" /></a>
15303 <ul class="gallery mw-gallery-traditional">
15304 <li class="gallerybox" style="width: 155px"><div style="width: 155px">
15305 <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" decoding="async" 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>
15306 <div class="gallerytext">
15313 <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>
15315 <!-- consistency with gallery extension -->
15316 <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"}}'>
15317 <li class="gallerybox">
15318 <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>
15319 <div class="gallerytext">caption</div>
15325 Nowiki markup in alt attribute (edited html, no data-parsoid) (T206940)
15328 "nativeGallery": true
15331 [[File:Foobar.jpg|alt=<nowiki>''x''</nowiki>|caption]]
15333 <!-- consistency with gallery extension -->
15335 File:Foobar.jpg|alt=<nowiki>''x''</nowiki>|caption
15338 <p><a href="/wiki/File:Foobar.jpg" class="image" title="caption"><img alt="''x''" src="http://example.com/images/3/3a/Foobar.jpg" decoding="async" width="1941" height="220" /></a>
15340 <ul class="gallery mw-gallery-traditional">
15341 <li class="gallerybox" style="width: 155px"><div style="width: 155px">
15342 <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" decoding="async" 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>
15343 <div class="gallerytext">
15350 <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>
15352 <!-- consistency with gallery extension -->
15353 <ul class="gallery mw-gallery-traditional" typeof="mw:Extension/gallery" data-mw='{"name":"gallery","attrs":{},"body":{}}'>
15354 <li class="gallerybox">
15355 <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>
15356 <div class="gallerytext">caption</div>
15362 Ampersand in link attribute (T206940)
15364 [[File:Foobar.jpg|link=Foo & bar]]
15366 <!-- consistency with gallery extension -->
15368 File:Foobar.jpg|link=Foo & bar
15371 <p><a href="/wiki/Foo_%26_bar" title="Foo & bar"><img alt="Foobar.jpg" src="http://example.com/images/3/3a/Foobar.jpg" decoding="async" width="1941" height="220" /></a>
15373 <ul class="gallery mw-gallery-traditional">
15374 <li class="gallerybox" style="width: 155px"><div style="width: 155px">
15375 <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" decoding="async" 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>
15376 <div class="gallerytext">
15381 <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>
15383 <!-- consistency with gallery extension -->
15384 <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"}}'>
15385 <li class="gallerybox">
15386 <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>
15387 <div class="gallerytext"></div>
15393 Ampersand in link attribute (edited html, no data-parsoid) (T206940)
15396 "nativeGallery": true
15399 [[File:Foobar.jpg|link=Foo_&_bar]]
15401 <!-- consistency with gallery extension -->
15403 File:Foobar.jpg|link=Foo_&_bar
15406 <p><a href="/wiki/Foo_%26_bar" title="Foo & bar"><img alt="Foobar.jpg" src="http://example.com/images/3/3a/Foobar.jpg" decoding="async" width="1941" height="220" /></a>
15408 <ul class="gallery mw-gallery-traditional">
15409 <li class="gallerybox" style="width: 155px"><div style="width: 155px">
15410 <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" decoding="async" 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>
15411 <div class="gallerytext">
15416 <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>
15418 <!-- consistency with gallery extension -->
15419 <ul class="gallery mw-gallery-traditional" typeof="mw:Extension/gallery" data-mw='{"name":"gallery","attrs":{},"body":{}}'>
15420 <li class="gallerybox">
15421 <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>
15422 <div class="gallerytext"></div>
15428 Italics markup in link attribute (T206940)
15432 <!-- Note that "italics" are stripped, even though this is a valid page title -->
15433 [[File:Foobar.jpg|link=Foo''s bar''s|caption1]]
15435 [[File:Foobar.jpg|link=''Main Page''|caption2]]
15437 <!-- consistency with gallery extension -->
15439 File:Foobar.jpg|link=Foo''s bar''s|caption1
15440 File:Foobar.jpg|link=''Main Page''|caption2
15443 <p><a href="/wiki/Foo%27%27s_bar%27%27s" title="Foo''s bar''s">Foo''s bar''s</a>
15444 </p><p><a href="/wiki/Foos_bars" title="caption1"><img alt="caption1" src="http://example.com/images/3/3a/Foobar.jpg" decoding="async" width="1941" height="220" /></a>
15445 </p><p><a href="/wiki/Main_Page" title="caption2"><img alt="caption2" src="http://example.com/images/3/3a/Foobar.jpg" decoding="async" width="1941" height="220" /></a>
15447 <ul class="gallery mw-gallery-traditional">
15448 <li class="gallerybox" style="width: 155px"><div style="width: 155px">
15449 <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" decoding="async" 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>
15450 <div class="gallerytext">
15455 <li class="gallerybox" style="width: 155px"><div style="width: 155px">
15456 <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" decoding="async" 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>
15457 <div class="gallerytext">
15464 <p><a rel="mw:WikiLink" href="./Foo''s_bar''s" title="Foo''s bar''s">Foo''s bar''s</a></p>
15466 <!-- Note that "italics" are stripped, even though this is a valid page title -->
15467 <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>
15469 <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>
15471 <!-- consistency with gallery extension -->
15472 <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"}}'>
15473 <li class="gallerybox">
15474 <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>
15475 <div class="gallerytext">caption1</div>
15477 <li class="gallerybox">
15478 <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>
15479 <div class="gallerytext">caption2</div>
15485 Nowiki markup in link attribute (T206940)
15487 [[File:Foobar.jpg|link=Foo<nowiki>''</nowiki>s_bar<nowiki>''</nowiki>s|caption]]
15489 <!-- consistency with gallery extension -->
15491 File:Foobar.jpg|link=Foo<nowiki>''</nowiki>s_bar<nowiki>''</nowiki>s|caption
15494 <p><a href="/wiki/Foo%27%27s_bar%27%27s" title="caption"><img alt="caption" src="http://example.com/images/3/3a/Foobar.jpg" decoding="async" width="1941" height="220" /></a>
15496 <ul class="gallery mw-gallery-traditional">
15497 <li class="gallerybox" style="width: 155px"><div style="width: 155px">
15498 <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" decoding="async" 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>
15499 <div class="gallerytext">
15506 <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>
15508 <!-- consistency with gallery extension -->
15509 <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"}}'>
15510 <li class="gallerybox">
15511 <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>
15512 <div class="gallerytext">caption</div>
15518 Nowiki markup in link attribute (edited html, no data-parsoid) (T206940)
15521 "nativeGallery": true
15524 [[File:Foobar.jpg|link=Foo<nowiki>''s_bar''</nowiki>s|caption]]
15526 <!-- consistency with gallery extension -->
15528 File:Foobar.jpg|link=Foo<nowiki>''s_bar''</nowiki>s|caption
15531 <p><a href="/wiki/Foo%27%27s_bar%27%27s" title="caption"><img alt="caption" src="http://example.com/images/3/3a/Foobar.jpg" decoding="async" width="1941" height="220" /></a>
15533 <ul class="gallery mw-gallery-traditional">
15534 <li class="gallerybox" style="width: 155px"><div style="width: 155px">
15535 <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" decoding="async" 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>
15536 <div class="gallerytext">
15543 <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>
15545 <!-- consistency with gallery extension -->
15546 <ul class="gallery mw-gallery-traditional" typeof="mw:Extension/gallery" data-mw='{"name":"gallery","attrs":{},"body":{}}'>
15547 <li class="gallerybox">
15548 <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>
15549 <div class="gallerytext">caption</div>
15555 HTML entity prefix in link markup (T209236)
15557 [[File:Foobar.jpg|link=https://example.com?foo¶ms=bar]]
15559 <!-- consistency with gallery extension -->
15561 File:Foobar.jpg|link=https://example.com?foo¶ms=bar
15564 <p><a href="https://example.com?foo&params=bar" rel="nofollow"><img alt="Foobar.jpg" src="http://example.com/images/3/3a/Foobar.jpg" decoding="async" width="1941" height="220" /></a>
15566 <ul class="gallery mw-gallery-traditional">
15567 <li class="gallerybox" style="width: 155px"><div style="width: 155px">
15568 <div class="thumb" style="width: 150px;"><div style="margin:68px auto;"><a href="https://example.com?foo&params=bar"><img alt="Foobar.jpg" src="http://example.com/images/thumb/3/3a/Foobar.jpg/120px-Foobar.jpg" decoding="async" 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>
15569 <div class="gallerytext">
15574 <p><figure-inline class="mw-default-size" typeof="mw:Image"><a href="https://example.com?foo&params=bar"><img resource="./File:Foobar.jpg" src="//example.com/images/3/3a/Foobar.jpg" data-file-width="1941" data-file-height="220" data-file-type="bitmap" height="220" width="1941"/></a></figure-inline></p>
15576 <!-- consistency with gallery extension -->
15577 <ul class="gallery mw-gallery-traditional" typeof="mw:Extension/gallery" data-mw='{"name":"gallery","attrs":{},"body":{"extsrc":"\nFile:Foobar.jpg|link=https://example.com?foo&params=bar\n"}}'>
15578 <li class="gallerybox">
15579 <div class="thumb"><figure-inline typeof="mw:Image"><a href="https://example.com?foo&params=bar"><img resource="./File:Foobar.jpg" src="//example.com/images/thumb/3/3a/Foobar.jpg/120px-Foobar.jpg" data-file-width="1941" data-file-height="220" data-file-type="bitmap" height="14" width="120"/></a></figure-inline></div>
15580 <div class="gallerytext"></div>
15586 Image with table with attributes in caption
15588 parsoid=wt2html,html2html
15590 [[File:Foobar.jpg|thumb|
15597 <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>
15598 <table class="123">
15599 <tbody><tr class="456" data-parsoid='{"startTagSrc":"|-"}'>
15602 </figcaption></figure>
15606 Image with table with rows from templates in caption
15608 [[File:Foobar.jpg|thumb|
15614 <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>
15616 <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>
15618 </figcaption></figure>
15622 Image with nested tables in caption
15624 [[File:Foobar.jpg|thumb|Foo<br />
15633 <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}'/>
15637 <tbody><tr><td>z</td></tr>
15638 </tbody></table></td></tr>
15640 </figcaption></figure>
15644 Image with heading and horizontal rule in caption
15646 [[File:Foobar.jpg|thumb|
15652 <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" decoding="async" 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>
15655 <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>
15656 <h3 id="Testing">Testing</h3>
15658 <hr data-parsoid='{"extra_dashes":10}'/>
15659 </figcaption></figure>
15662 ###################
15663 # Conflicting image format options.
15664 # First option specified should 'win'.
15665 # All three cases in each test should be identical.
15668 Image with 'frameless' first.
15670 parsoid=wt2html,wt2wt,html2html
15672 [[File:Foobar.jpg|frameless|caption]]
15674 [[File:Foobar.jpg|frameless|frame|caption]]
15676 [[File:Foobar.jpg|frameless|thumb|caption]]
15678 <p><a href="/wiki/File:Foobar.jpg" class="image" title="caption"><img alt="caption" src="http://example.com/images/thumb/3/3a/Foobar.jpg/180px-Foobar.jpg" decoding="async" 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>
15679 </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" decoding="async" 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>
15680 </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" decoding="async" 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>
15683 <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>
15684 <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>
15685 <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>
15689 Image with 'frame' first.
15691 parsoid=wt2html,wt2wt,html2html
15693 [[File:Foobar.jpg|frame|caption]]
15694 [[File:Foobar.jpg|frame|frameless|caption]]
15695 [[File:Foobar.jpg|frame|thumb|caption]]
15697 <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" decoding="async" width="1941" height="220" class="thumbimage" /></a> <div class="thumbcaption">caption</div></div></div>
15698 <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" decoding="async" width="1941" height="220" class="thumbimage" /></a> <div class="thumbcaption">caption</div></div></div>
15699 <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" decoding="async" width="1941" height="220" class="thumbimage" /></a> <div class="thumbcaption">caption</div></div></div>
15702 <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>
15703 <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>
15704 <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>
15708 Image with 'thumb' first.
15710 parsoid=wt2html,wt2wt,html2html
15712 [[File:Foobar.jpg|thumb|caption]]
15713 [[File:Foobar.jpg|thumb|frameless|caption]]
15714 [[File:Foobar.jpg|thumb|frame|caption]]
15716 <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" decoding="async" 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>
15717 <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" decoding="async" 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>
15718 <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" decoding="async" 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>
15721 <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>
15722 <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>
15723 <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>
15726 ###################
15728 # See https://www.mediawiki.org/wiki/Help:Images#Size_and_frame
15729 # and https://phabricator.wikimedia.org/T64258
15730 # Foobar has actual size of 1941x220
15731 # 1. Thumbs & frameless always reduce, can't be enlarged unless it's
15732 # a scalable format.
15733 # 2. Framed images always ignore size options; always render at default size.
15734 # 3. "Unspecified format" and border are the only types which can be
15738 Image: unspecified format and border enlarge
15740 parsoid=wt2html,wt2wt,html2html
15742 [[File:Foobar.jpg|2000px]]
15744 [[File:Foobar.jpg|border|2000px]]
15746 <p><a href="/wiki/File:Foobar.jpg" class="image"><img alt="Foobar.jpg" src="http://example.com/images/3/3a/Foobar.jpg" decoding="async" width="2000" height="227" /></a>
15747 </p><p><a href="/wiki/File:Foobar.jpg" class="image"><img alt="Foobar.jpg" src="http://example.com/images/3/3a/Foobar.jpg" decoding="async" width="2000" height="227" class="thumbborder" /></a>
15750 <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>
15751 <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>
15755 Image: "unspecified format" and border reduce
15757 parsoid=wt2html,wt2wt,html2html
15759 [[File:Foobar.jpg|1000px]]
15761 [[File:Foobar.jpg|border|1000px]]
15763 <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" decoding="async" 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>
15764 </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" decoding="async" 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>
15767 <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>
15768 <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>
15772 Image: thumbs reduce
15774 parsoid=wt2html,wt2wt,html2html
15776 [[File:Foobar.jpg|thumb|50px]]
15778 <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" decoding="async" 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>
15781 <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>
15785 Image: bitmap thumbs can't be enlarged past original size, but vector can.
15787 parsoid=wt2html,wt2wt,html2html
15789 [[File:Foobar.jpg|thumb|2000px]]
15791 [[File:Foobar.svg|thumb|2000px]]
15793 <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" decoding="async" 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>
15794 <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" decoding="async" 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>
15797 <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>
15798 <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>
15802 Image: frameless can reduce in size
15804 parsoid=wt2html,wt2wt,html2html
15806 [[File:Foobar.jpg|frameless|50px]]
15808 <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" decoding="async" 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>
15811 <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>
15815 Image: bitmap frameless can't be enlarged past original size, but vector can
15817 parsoid=wt2html,wt2wt,html2html
15819 [[File:Foobar.jpg|frameless|2000px]]
15821 [[File:Foobar.svg|frameless|2000px]]
15823 <p><a href="/wiki/File:Foobar.jpg" class="image"><img alt="Foobar.jpg" src="http://example.com/images/3/3a/Foobar.jpg" decoding="async" width="1941" height="220" /></a>
15824 </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" decoding="async" 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>
15827 <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>
15828 <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>
15832 Image: framed images are always unscaled.
15834 parsoid=wt2html,wt2wt,html2html
15836 [[File:Foobar.jpg|frame]]
15838 [[File:Foobar.jpg|frame|50px]]
15840 [[File:Foobar.jpg|frame|50x50px]]
15842 [[File:Foobar.jpg|frame|2000px]]
15844 <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" decoding="async" width="1941" height="220" class="thumbimage" /></a> <div class="thumbcaption"></div></div></div>
15845 <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" decoding="async" width="1941" height="220" class="thumbimage" /></a> <div class="thumbcaption"></div></div></div>
15846 <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" decoding="async" width="1941" height="220" class="thumbimage" /></a> <div class="thumbcaption"></div></div></div>
15847 <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" decoding="async" width="1941" height="220" class="thumbimage" /></a> <div class="thumbcaption"></div></div></div>
15850 <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>
15851 <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>
15852 <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>
15853 <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>
15856 ###################
15859 Link to image page- image page normally doesn't exists, hence edit link
15860 Add test with existing image page
15861 #<p><a href="/wiki/File:Test" title="Image:Test">Image:test</a>
15865 <p><a href="/index.php?title=File:Test&action=edit&redlink=1" class="new" title="File:Test (page does not exist)">Image:test</a>
15870 T20784 Link to non-existent image page with caption should use caption as link text
15872 [[:Image:test|caption]]
15874 <p><a href="/index.php?title=File:Test&action=edit&redlink=1" class="new" title="File:Test (page does not exist)">caption</a>
15879 Frameless image caption with a free URL
15881 [[File:Foobar.jpg|http://example.com]]
15883 <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" decoding="async" width="1941" height="220" /></a>
15886 <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>
15890 Thumbnail image caption with a free URL
15894 [[File:Foobar.jpg|thumb|http://example.com]]
15896 <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" decoding="async" 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>
15899 <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>
15903 Thumbnail image caption with a free URL and explicit alt
15906 parsoid=wt2html,wt2wt,html2html
15908 [[File:Foobar.jpg|thumb|http://example.com|alt=Alteration]]
15910 <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" decoding="async" 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>
15913 <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>
15917 SVG thumbnails with no language set
15920 [[File:Foobar.svg|thumb|caption]]
15922 <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" decoding="async" 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>
15925 <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>
15929 SVG thumbnails with language de
15931 parsoid=wt2html,wt2wt,html2html
15933 [[File:Foobar.svg|thumb|caption|lang=de]]
15935 <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" decoding="async" 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>
15938 <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>
15942 SVG thumbnails with invalid language code
15944 parsoid=wt2html,wt2wt,html2html
15946 [[File:Foobar.svg|thumb|caption|lang=invalid:language:code]]
15948 <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" decoding="async" 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>
15951 <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>
15955 SVG thumbnails in page language
15958 wgMediaInTargetLanguage = true
15960 [[File:Foobar.svg]] [[File:Foobar.svg|lang=en]]
15962 <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" decoding="async" 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" decoding="async" 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>
15967 SVG thumbnails in page language not present in the file
15970 wgMediaInTargetLanguage = true
15972 [[File:Foobar.svg]] [[File:Foobar.svg|lang=ru]]
15974 <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" decoding="async" 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" decoding="async" 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>
15979 T3887: A ISBN with a thumbnail
15981 [[File:Foobar.jpg|thumb|ISBN 1235467890]]
15983 <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" decoding="async" 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>
15986 <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>
15990 T3887: A RFC with a thumbnail
15992 [[File:Foobar.jpg|thumb|This is RFC 12354]]
15994 <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" decoding="async" 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>
15997 <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>
16001 T3887: A mailto link with a thumbnail
16003 [[File:Foobar.jpg|thumb|Please mailto:nobody@example.com]]
16005 <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" decoding="async" 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>
16008 <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>
16011 # Pending resolution to T2368
16013 T2648: Frameless image caption with a link
16015 [[File:Foobar.jpg|text with a [[link]] in it]]
16017 <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" decoding="async" width="1941" height="220" /></a>
16020 <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>
16024 T2648: Frameless image caption with a link (suffix)
16026 [[File:Foobar.jpg|text with a [[link]]foo in it]]
16028 <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" decoding="async" width="1941" height="220" /></a>
16031 <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>
16035 T2648: Frameless image caption with an interwiki link
16037 [[File:Foobar.jpg|text with a [[MeatBall:Link]] in it]]
16039 <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" decoding="async" width="1941" height="220" /></a>
16042 <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>
16046 T2648: Frameless image caption with a piped interwiki link
16048 [[File:Foobar.jpg|text with a [[MeatBall:Link|link]] in it]]
16050 <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" decoding="async" width="1941" height="220" /></a>
16053 <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>
16057 T107474: Frameless image caption with <nowiki>
16059 [[File:Foobar.jpg|<nowiki>text with a [[MeatBall:Link|link]] in it</nowiki>]]
16061 <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>
16065 Escape HTML special chars in image alt text
16067 [[File:Foobar.jpg|& < > "]]
16069 <p><a href="/wiki/File:Foobar.jpg" class="image" title="& < > ""><img alt="& < > "" src="http://example.com/images/3/3a/Foobar.jpg" decoding="async" width="1941" height="220" /></a>
16072 <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>
16076 Escape HTML special chars in image alt text with LanguageConverter
16080 [[File:Foobar.jpg|& < > "]]
16082 <p><a href="/wiki/File:Foobar.jpg" class="image" title="& < > ""><img alt="& < > "" src="http://example.com/images/3/3a/Foobar.jpg" decoding="async" width="1941" height="220" /></a>
16085 <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>
16089 Entities in file name and attributes
16091 [[File:7%25 solution.gif|manualthumb=7%25 solution.gif|link=7%25 solution|[[7%25 solution]]]]
16093 <p><a href="/index.php?title=Special:Upload&wpDestFile=7%25_solution.gif" class="new" title="File:7% solution.gif">7% solution</a>
16096 <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>
16100 T2499: Alt text should have Ӓ, not &1234;
16102 [[File:Foobar.jpg|♀]]
16104 <p><a href="/wiki/File:Foobar.jpg" class="image" title="♀"><img alt="♀" src="http://example.com/images/3/3a/Foobar.jpg" decoding="async" width="1941" height="220" /></a>
16107 <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>
16111 Broken image caption with link
16113 parsoid=wt2html,wt2wt,html2html
16115 [[Image:Foobar.jpg|thumb|This is a broken caption. But [[Main Page|this]] is just an ordinary link.
16117 <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.
16120 <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>
16124 Image caption containing another image
16126 [[File:Foobar.jpg|thumb|This is a caption with another [[File:Thumb.png|image]] inside it!]]
16128 <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" decoding="async" 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" decoding="async" width="135" height="135" /></a> inside it!</div></div></div>
16131 <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>
16135 Image: caption containing a newline
16137 [[File:Foobar.jpg|This
16140 <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" decoding="async" width="1941" height="220" /></a>
16143 <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>
16147 Image: caption containing leading space
16148 (The leading space should not trigger nowiki escaping in wt2wt mode)
16150 [[File:Foobar.jpg|thumb| bar]]
16152 <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" decoding="async" 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>
16155 <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>
16158 # html/php output not have newlines after table, td, th, etc. because
16159 # Linker::makeThumbLink2() replaces the newlines with spaces since
16160 # the table is inside a caption.
16161 # FIXME: Verify if that circa 2004 fix is still required.
16163 Image: caption containing a table
16165 parsoid=wt2html,wt2wt,html2html
16167 [[Image:Foobar.jpg|thumb|200px|This is an example image thumbnail caption with a table
16173 and some more text.]]
16175 <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" decoding="async" 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>
16178 <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
16181 <tr><th>Foo</th><th>Bar</th></tr>
16184 <td>Bar1</td></tr></tbody></table>and some more text.</figcaption></figure>
16188 T5090: External links other than http: in image captions
16190 [[File:Foobar.jpg|thumb|200x200px|This caption has [irc://example.net irc] and [https://example.com Secure] ext links in it.]]
16192 <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" decoding="async" 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>
16195 <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>
16201 parsoid=wt2html,wt2wt,html2html
16203 [[Image:foobar.jpg|a|class=b]]
16205 <p><a href="/wiki/File:Foobar.jpg" class="image" title="a"><img alt="a" src="http://example.com/images/3/3a/Foobar.jpg" decoding="async" width="1941" height="220" class="b" /></a>
16208 <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>
16212 Localized image handling (1).
16214 parsoid=wt2html,wt2wt,html2html
16217 [[Archivo:Foobar.jpg|izquierda|enlace=foo|caption]]
16219 <div class="floatleft"><a href="/wiki/Foo" title="caption"><img alt="caption" src="http://example.com/images/3/3a/Foobar.jpg" decoding="async" width="1941" height="220" /></a></div>
16222 <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>
16226 Localized image handling (2).
16229 parsoid=wt2html,wt2wt,html2html
16232 [[Archivo:Foobar.jpg|miniatura|izquierda|enlace=foo|caption]]
16234 <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" decoding="async" 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>
16237 <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>
16241 Localized image handling (3).
16246 <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>
16248 [[File:Foobar.jpg|بندانگشتی]]
16252 "border", "frameless" and "class" attributes on an image.
16255 parsoid=wt2html,wt2wt,html2html
16257 [[File:Foobar.jpg|frameless|border|class=extra|caption]]
16259 <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" decoding="async" 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>
16262 <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>
16265 # Note that 'right' is the default alignment, despite the misspelled 'righ' below
16267 Invalid image attributes (T64500)
16270 parsoid=wt2html,wt2wt,html2html
16272 [[File:Foobar.jpg|thumb|float|left|caption]]
16274 [[File:Foobar.jpg|thumb|righ|caption]]
16276 [[File:Foobar.jpg|bogus1|thumb|bogus2|left|bogus3|caption]]
16278 <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" decoding="async" 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>
16279 <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" decoding="async" 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>
16280 <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" decoding="async" 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>
16283 <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>
16284 <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>
16285 <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>
16291 #REDIRECT [[File:Barfoo.jpg]]
16294 # FIXME: Parsoid should run this test -- but we'd need to teach the
16295 # mockAPI about the redirected Barfoo.jpg image.
16299 [[Image:Barfoo.jpg]]
16301 <p><a href="/wiki/File:Barfoo.jpg" class="mw-redirect" title="File:Barfoo.jpg">File:Barfoo.jpg</a>
16306 Missing image with uploads disabled
16310 [[File:Foobaz.jpg]]
16312 <p><a href="/wiki/File:Foobaz.jpg" title="File:Foobaz.jpg">File:Foobaz.jpg</a>
16315 <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>
16318 # Parsoid-specific testing for images
16319 # https://www.mediawiki.org/wiki/Parsoid/MediaWiki_DOM_spec#Images
16320 # Currently imperfect due to a flaw in the Parsoid testrunner
16322 # THESE TESTS SHOULD BE MOVED UP and merged with the php-specific
16326 Parsoid-specific image handling - simple image with size and middle alignment
16328 [[File:Foobar.jpg|middle|50px]]
16330 <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>
16334 Parsoid-specific image handling - simple image with size, middle alignment, non-standard namespace alias
16336 parsoid=wt2wt,wt2html,html2html
16338 [[Image:Foobar.jpg|middle|50px]]
16340 <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>
16344 Parsoid-specific image handling - simple image with size and middle alignment (existing content)
16346 [[File:Foobar.jpg|50px|middle]]
16348 <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>
16352 Parsoid-specific image handling - simple image with size and middle alignment and non-standard namespace name
16354 parsoid=wt2html,wt2wt,html2html
16356 [[Image:Foobar.jpg|50px|middle]]
16358 <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>
16362 Parsoid-specific image handling - simple image with both sizes, a baseline alignment, and a caption
16364 [[File:Foobar.jpg|500x10px|baseline|caption]]
16366 <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>
16370 Parsoid-specific image handling - simple image with border and size spec
16372 [[File:Foobar.jpg|50px|border|caption]]
16374 <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>
16378 Parsoid-specific image handling - thumbnail with halign, valign, and caption
16380 parsoid=wt2html,html2html
16382 [[File:Foobar.jpg|left|baseline|thumb|caption content]]
16384 <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>
16388 Parsoid-specific image handling - thumbnail with halign, valign, and caption (existing content)
16390 parsoid=wt2html,html2html
16392 [[File:Foobar.jpg|thumb|left|baseline|caption content]]
16394 <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>
16398 Parsoid-specific image handling - thumbnail with specific size, halign, valign, and caption
16400 parsoid=wt2html,html2html
16402 [[Image:Foobar.jpg|right|middle|thumb|50x50px|caption]]
16404 <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>
16408 Parsoid-specific image handling - thumbnail with specific size, halign, valign, and caption (existing content)
16410 parsoid=wt2html,html2html
16412 [[File:Foobar.jpg|thumb|50x50px|right|middle|caption]]
16414 <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>
16418 Parsoid-specific image handling - framed image with specific size and caption (size is ignored)
16420 parsoid=wt2html,wt2wt,html2html
16422 [[File:Foobar.jpg|frame|500x50px|caption]]
16424 <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>
16428 Parsoid-specific image handling - framed image with specific size, halign, valign, and caption (size is ignored)
16430 parsoid=wt2html,html2html
16432 [[File:Foobar.jpg|left|baseline|frame|500x50px|caption]]
16434 <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>
16438 Parsoid-specific image handling - frameless image with specific size, border, and caption
16440 [[File:Foobar.jpg|frameless|442x50px|border|caption]]
16442 <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>
16446 Parsoid-specific image handling - simple image with a formatted caption
16448 [[File:Foobar.jpg|<table><tr><td>a</td><td>b</td></tr><tr><td>c</td></tr></table>]]
16450 <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>
16454 Parsoid-specific image handling - caption with a template in it
16456 [[File:Foobar.jpg|thumb|200x23px|This caption has a {{echo|transclusion}} in it.]]
16458 <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>
16462 Parsoid-specific image handling - caption with unbalanced tags in it
16464 parsoid=wt2html,wt2wt,html2html
16467 [[File:Foobar.jpg|thumb|200x200px|This caption has a <center>unbalanced tag in it.]]
16471 <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>
16476 Parsoid-specific image handling - empty caption (1)
16478 parsoid=wt2html,wt2wt
16480 [[File:Foobar.jpg|thumb|]]
16482 <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>
16485 # empty captions don't get serialized unless we're in the "round trip" case
16487 Parsoid-specific image handling - empty caption (2)
16491 <figure class="mw-default-size" typeof="mw:Image/Thumb">
16492 <a href="./File:Foobar.jpg">
16493 <img resource="./File:Foobar.jpg"
16494 src="//example.com/images/3/3a/Foobar.jpg"
16495 data-file-width="1941" data-file-height="220" data-file-type="bitmap"
16496 height="25" width="220"/>
16498 <figcaption></figcaption>
16501 [[File:Foobar.jpg|thumb]]
16505 Parsoid-specific image handling - whitespace caption
16507 [[File:Foobar.jpg|thumb| ]]
16509 <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>
16513 Parsoid-specific image handling - lang option
16516 [[File:Foobar.svg|lang=de|caption]]
16520 <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>
16524 ## Edge case bugs in Parsoid from T93580
16526 T93580: 1. Templated <ref> inside block images
16528 [[File:Foobar.jpg|thumb|Caption with templated ref: {{echo|<ref>foo</ref>}}]]
16532 <figure class="mw-default-size" typeof="mw:Image/Thumb" data-parsoid='{"optList":[{"ck":"thumbnail","ak":"thumb"},{"ck":"caption","ak":"Caption with templated ref: {{echo|<ref>foo</ref>}}"}]}'><a href="./File:Foobar.jpg" data-parsoid='{"a":{"href":"./File:Foobar.jpg"},"sa":{}}'><img resource="./File:Foobar.jpg" src="//example.com/images/thumb/3/3a/Foobar.jpg/220px-Foobar.jpg" data-file-width="1941" data-file-height="220" data-file-type="bitmap" height="25" width="220" data-parsoid='{"a":{"resource":"./File:Foobar.jpg","height":"25","width":"220"},"sa":{"resource":"File:Foobar.jpg"}}'/></a><figcaption>Caption with templated ref: <sup about="#mwt5" class="mw-ref" id="cite_ref-1" rel="dc:references" typeof="mw:Transclusion mw:Extension/ref" data-mw='{"parts":[{"template":{"target":{"wt":"echo","href":"./Template:Echo"},"params":{"1":{"wt":"<ref>foo</ref>"}},"i":0}}]}'><a href="./Parser_test#cite_note-1" style="counter-reset: mw-Ref 1;"><span class="mw-reflink-text">[1]</span></a></sup></figcaption></figure>
16534 <ol class="mw-references references" typeof="mw:Extension/references" about="#mwt6" data-mw='{"name":"references","attrs":{}}'><li about="#cite_note-1" id="cite_note-1"><a href="./Parser_test#cite_ref-1" rel="mw:referencedBy"><span class="mw-linkback-text">↑ </span></a> <span id="mw-reference-text-cite_note-1" class="mw-reference-text" data-parsoid="{}">foo</span></li></ol>
16538 T93580: 2. <ref> inside inline images
16540 [[File:Foobar.jpg|Undisplayed caption in inline image with ref: <ref>foo</ref>]]
16544 <p><figure-inline class="mw-default-size" typeof="mw:Image" data-parsoid='{"optList":[{"ck":"caption","ak":"Undisplayed caption in inline image with ref: <ref>foo</ref>"}]}' data-mw='{"caption":"Undisplayed caption in inline image with ref: <sup about=\"#mwt2\" class=\"mw-ref\" id=\"cite_ref-1\" rel=\"dc:references\" typeof=\"mw:Extension/ref\" data-parsoid='{\"dsr\":[64,78,5,6]}' data-mw='{\"name\":\"ref\",\"attrs\":{},\"body\":{\"id\":\"mw-reference-text-cite_note-1\"}}'><a href=\"./Parser_test#cite_note-1\" style=\"counter-reset: mw-Ref 1;\" data-parsoid=\"{}\"><span class=\"mw-reflink-text\" data-parsoid=\"{}\">[1]</span></a></sup>"}'><a href="./File:Foobar.jpg" data-parsoid='{"a":{"href":"./File:Foobar.jpg"},"sa":{"href":"File:Foobar.jpg"}}'><img resource="./File:Foobar.jpg" src="//example.com/images/3/3a/Foobar.jpg" data-file-width="1941" data-file-height="220" data-file-type="bitmap" height="220" width="1941" data-parsoid='{"a":{"resource":"./File:Foobar.jpg","height":"220","width":"1941"},"sa":{"resource":"File:Foobar.jpg"}}'/></a></figure-inline></p>
16546 <ol class="mw-references references" typeof="mw:Extension/references" about="#mwt4" data-mw='{"name":"references","attrs":{}}'><li about="#cite_note-1" id="cite_note-1"><a href="./Parser_test#cite_ref-1" rel="mw:referencedBy"><span class="mw-linkback-text">↑ </span></a> <span id="mw-reference-text-cite_note-1" class="mw-reference-text">foo</span></li></ol>
16550 T93580: 3. Templated <ref> inside inline images
16552 [[File:Foobar.jpg|Undisplayed caption in inline image with ref: {{echo|<ref>{{echo|foo}}</ref>}}]]
16556 <p><figure-inline class="mw-default-size" typeof="mw:Image" data-parsoid='{"optList":[{"ck":"caption","ak":"Undisplayed caption in inline image with ref: {{echo|<ref>{{echo|foo}}</ref>}}"}]}' data-mw='{"caption":"Undisplayed caption in inline image with ref: <sup about=\"#mwt2\" class=\"mw-ref\" id=\"cite_ref-1\" rel=\"dc:references\" typeof=\"mw:Transclusion mw:Extension/ref\" data-parsoid='{\"dsr\":[64,96,null,null],\"pi\":[[{\"k\":\"1\"}]]}' data-mw='{\"parts\":[{\"template\":{\"target\":{\"wt\":\"echo\",\"href\":\"./Template:Echo\"},\"params\":{\"1\":{\"wt\":\"&lt;ref>{{echo|foo}}&lt;/ref>\"}},\"i\":0}}]}'><a href=\"./Parser_test#cite_note-1\" style=\"counter-reset: mw-Ref 1;\" data-parsoid=\"{}\"><span class=\"mw-reflink-text\" data-parsoid=\"{}\">[1]</span></a></sup>"}'><a href="./File:Foobar.jpg" data-parsoid='{"a":{"href":"./File:Foobar.jpg"},"sa":{"href":"File:Foobar.jpg"}}'><img resource="./File:Foobar.jpg" src="//example.com/images/3/3a/Foobar.jpg" data-file-width="1941" data-file-height="220" data-file-type="bitmap" height="220" width="1941" data-parsoid='{"a":{"resource":"./File:Foobar.jpg","height":"220","width":"1941"},"sa":{"resource":"File:Foobar.jpg"}}'/></a></figure-inline></p>
16558 <ol class="mw-references references" typeof="mw:Extension/references" about="#mwt6" data-mw='{"name":"references","attrs":{}}'><li about="#cite_note-1" id="cite_note-1"><a href="./Parser_test#cite_ref-1" rel="mw:referencedBy"><span class="mw-linkback-text">↑ </span></a> <span id="mw-reference-text-cite_note-1" class="mw-reference-text">foo</span></li></ol>
16565 Subpage test/subpage
16573 subpage title=[[Subpage test]]
16577 <p><a href="/wiki/Subpage_test/subpage" title="Subpage test/subpage">/subpage</a>
16582 Subpage noslash link
16584 subpage title=[[Subpage test]]
16588 <p><a href="/wiki/Subpage_test/subpage" title="Subpage test/subpage">subpage</a>
16593 Subpage test/1/2/subpage
16599 Relative subpage noslash link
16601 parsoid=wt2wt,wt2html,html2html
16602 subpage title=[[Subpage test/1/2/3/4]]
16608 <p><a href="/wiki/Subpage_test/1/2/subpage" title="Subpage test/1/2/subpage">subpage</a>
16609 </p><p><a href="/wiki/Subpage_test/1/2/subpage" title="Subpage test/1/2/subpage">Subpage test/1/2/subpage</a>
16612 <p><a rel="mw:WikiLink" href="./Subpage_test/1/2/subpage" title="Subpage test/1/2/subpage">subpage</a></p>
16613 <p><a rel="mw:WikiLink" href="./Subpage_test/1/2/subpage" title="Subpage test/1/2/subpage">Subpage_test/1/2/subpage</a></p>
16617 Parsoid: dot-slash prefixed wikilinks
16627 </p><p>[[././baz/]]
16632 </p><p>[[././baz/]]
16637 Render invalid page names as plain text (T53090)
16649 [[foo[http://example.com]xyz]]
16651 [[{{echo|./../foo}}|bar]]
16652 [[{{echo|foo/.}}|bar]]
16653 [[{{echo|foo/..}}|bar]]
16654 [[{{echo|foo~~~~bar}}]]
16655 [[{{echo|foo>bar}}]]
16656 [[{{echo|foo././bar}}]]
16657 [[{{echo|foo{bar}}]]
16658 [[{{echo|foo}bar}}]]
16659 [[{{echo|foo[bar}}]]
16660 [[{{echo|foo]bar}}]]
16661 [[{{echo|foo<bar}}]]
16663 <p>[[./../foo|bar]]
16673 [[foo<a rel="nofollow" class="external autonumber" href="http://example.com">[1]</a>xyz]]
16674 </p><p>[[./../foo|bar]]
16687 <p>[[./../foo|bar]]
16697 [[foo<a rel="mw:ExtLink" class="external autonumber" href="http://example.com"></a>xyz]]</p>
16699 <p>[[<span typeof="mw:Transclusion" data-mw='{"parts":[{"template":{"target":{"wt":"echo","href":"./Template:Echo"},"params":{"1":{"wt":"./../foo"}},"i":0}}]}'>./../foo</span>|bar]]
16700 [[<span typeof="mw:Transclusion" data-mw='{"parts":[{"template":{"target":{"wt":"echo","href":"./Template:Echo"},"params":{"1":{"wt":"foo/."}},"i":0}}]}'>foo/.</span>|bar]]
16701 [[<span typeof="mw:Transclusion" data-mw='{"parts":[{"template":{"target":{"wt":"echo","href":"./Template:Echo"},"params":{"1":{"wt":"foo/.."}},"i":0}}]}'>foo/..</span>|bar]]
16702 [[<span typeof="mw:Transclusion" data-mw='{"parts":[{"template":{"target":{"wt":"echo","href":"./Template:Echo"},"params":{"1":{"wt":"foo~~~~bar"}},"i":0}}]}'>foo~~~~bar</span>]]
16703 [[<span typeof="mw:Transclusion" data-mw='{"parts":[{"template":{"target":{"wt":"echo","href":"./Template:Echo"},"params":{"1":{"wt":"foo>bar"}},"i":0}}]}'>foo>bar</span>]]
16704 [[<span typeof="mw:Transclusion" data-mw='{"parts":[{"template":{"target":{"wt":"echo","href":"./Template:Echo"},"params":{"1":{"wt":"foo././bar"}},"i":0}}]}'>foo././bar</span>]]
16705 [[<span typeof="mw:Transclusion" data-mw='{"parts":[{"template":{"target":{"wt":"echo","href":"./Template:Echo"},"params":{"1":{"wt":"foo{bar"}},"i":0}}]}'>foo{bar</span>]]
16706 [[<span typeof="mw:Transclusion" data-mw='{"parts":[{"template":{"target":{"wt":"echo","href":"./Template:Echo"},"params":{"1":{"wt":"foo}bar"}},"i":0}}]}'>foo}bar</span>]]
16707 [[<span typeof="mw:Transclusion" data-mw='{"parts":[{"template":{"target":{"wt":"echo","href":"./Template:Echo"},"params":{"1":{"wt":"foo[bar"}},"i":0}}]}'>foo[bar</span>]]
16708 [[<span typeof="mw:Transclusion" data-mw='{"parts":[{"template":{"target":{"wt":"echo","href":"./Template:Echo"},"params":{"1":{"wt":"foo]bar"}},"i":0}}]}'>foo]bar</span>]]
16709 [[<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>
16717 <p><a href="/index.php?title=/subpage&action=edit&redlink=1" class="new" title="/subpage (page does not exist)">/subpage</a>
16722 T2561: {{/Subpage}}
16724 subpage title=[[Page]]
16728 <p><a href="/index.php?title=Page/Subpage&action=edit&redlink=1" class="new" title="Page/Subpage (page does not exist)">Page/Subpage</a>
16736 Category:MediaWiki User's Guide
16744 [[:Category:MediaWiki User's Guide]]
16746 <p><a href="/wiki/Category:MediaWiki_User%27s_Guide" title="Category:MediaWiki User's Guide">Category:MediaWiki User's Guide</a>
16755 [[Category:MediaWiki User's Guide]]
16757 cat=MediaWiki_User's_Guide sort=
16759 <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"}}'/>
16763 PAGESINCATEGORY invalid title fatal (r33546 fix)
16765 {{PAGESINCATEGORY:<bogus>}}
16772 Category with different sort key
16776 [[Category:MediaWiki User's Guide|Foo]]
16778 cat=MediaWiki_User's_Guide sort=Foo
16780 <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"}}'/>
16784 Category with identical sort key
16788 [[Category:MediaWiki User's Guide|MediaWiki User's Guide]]
16790 cat=MediaWiki_User's_Guide sort=MediaWiki User's Guide
16792 <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"}}'/>
16796 Category with empty sort key
16801 [[Category:MediaWiki User's Guide|]]
16803 [[Category:MediaWiki User's Guide|MediaWiki User's Guide]]
16807 Category with empty sort key and parentheses
16812 [[Category:Foo (bar)|]]
16814 [[Category:Foo (bar)|Foo]]
16818 Category with link tail
16823 123[[Category:Foo]]456
16825 123[[Category:Foo]]456
16829 Category with template
16834 [[Category:{{echo|Foo}}]]
16836 [[Category:{{echo|Foo}}]]
16840 Category with template in sort key
16845 [[Category:Foo|{{echo|Bar}}]]
16847 [[Category:Foo|{{echo|Bar}}]]
16851 Category with template in sort key and title
16856 [[Category:{{echo|Foo}}|{{echo|Bar}}]]
16858 [[Category:{{echo|Foo}}|{{echo|Bar}}]]
16861 ## We used to, but no longer wt2wt this test since the default serializer
16862 ## will normalize all categories to serialize on their own line.
16863 ## This wikitext usage is going to be fairly uncommon in production and
16864 ## selser will take care of preserving formatting in those scenarios.
16866 Category / paragraph interactions
16870 Foo [[Category:Baz]] Bar
16872 Foo [[Category:Baz]]
16880 [[Category:Baz]] Bar
16893 {{echo|[[Category:Baz]]}}
16906 <p>Foo <link rel="mw:PageProp/Category" href="./Category:Baz"/> Bar</p>
16907 <p>Foo <link rel="mw:PageProp/Category" href="./Category:Baz"/> Bar</p>
16908 <p>Foo <link rel="mw:PageProp/Category" href="./Category:Baz"/> Bar</p>
16909 <p>Foo <link rel="mw:PageProp/Category" href="./Category:Baz"/> Bar</p>
16910 <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>
16911 <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}}]}'/>
16912 <link rel="mw:PageProp/Category" href="./Category:Baz"/>
16915 ## We used to, but no longer wt2wt this test since the default serializer
16916 ## will normalize all categories to serialize on their own line.
16917 ## This wikitext usage is going to be fairly uncommon in production and
16918 ## selser will take care of preserving formatting in those scenarios.
16920 ## The whitespace on the empty line is part of the test. Please do not delete
16922 1. Categories and newlines: All preceding newlines should be suppressed (courtesy T2087)
16928 [[Category:Foo]] and this should be part of same paragraph (not an indent-pre)
16930 {{echo|[[Category:Foo]] and so should this!}}
16932 <p>This and this should be part of same paragraph (not an indent-pre) and so should this!
16937 <link rel="mw:PageProp/Category" href="./Category:Foo"/> and this should be part of same paragraph (not an indent-pre)
16939 <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>
16942 ## Parsoid will not try to wt2wt this while preserving newlines because
16943 ## it suppresses excess newlines within list items -- and we don't want to
16944 ## introduce a special case just for categories, which is, in reality somewhat
16945 ## odd behavior -- categories are unlikely to be used in list items like this
16946 ## in top-level pages and are only likely to show up in template-generated
16947 ## list items where this RT-ing is a non-issue.
16949 ## The whitespace on the empty line is part of the test. Please do not delete
16951 2. Categories and newlines: All preceding newlines should be suppressed (courtesy T2087)
16957 [[Category:Foo]] and this should be part of the same list item
16960 {{echo|[[Category:Foo]] and this should be part of the same list item}}
16962 <ul><li>This and this should be part of the same list item</li>
16963 <li>So should this and this should be part of the same list item</li></ul>
16966 <li>This <link rel="mw:PageProp/Category" href="./Category:Foo"/> and this should be part of the same list item</li>
16967 <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>
16971 ## Newlines and categories that follow the last item of a list
16972 ## are treated differently because this (list followed by categories)
16973 ## is an extremely common pattern on wikis.
16975 3. Categories and newlines: newline suppression for last list item should RT properly
16996 <link rel="mw:PageProp/Category" href="./Category:Foo"/>
16998 <link rel="mw:PageProp/Category" href="./Category:Bar"/>
16999 <link rel="mw:PageProp/Category" href="./Category:Baz"/>
17001 <dl><dd>c</dd></dl>
17003 <link rel="mw:PageProp/Category" href="./Category:C"/>
17005 <dl><dt>d</dt></dl>
17007 <link rel="mw:PageProp/Category" href="./Category:D"/>
17011 4. Categories and newlines: newline suppression for last list item should RT properly
17019 <ul><li><ul><li><ul><li>b</li></ul></li></ul></li></ul></li></ul>
17021 <link rel="mw:PageProp/Category" href="./Category:Foo" data-parsoid='{"stx":"simple","a":{"href":"./Category:Foo"},"sa":{"href":"Category:Foo"}}'/>
17024 ## only wt2html for this to make sure the algo only applies to the rightmost path
17026 5. Categories and newlines: migrateTrailingCategories dom pass should only run on the rightmost path of nested lists
17039 <link rel="mw:PageProp/Category" href="./Category:Foo" data-parsoid='{"stx":"simple","a":{"href":"./Category:Foo"},"sa":{"href":"Category:Foo"}}'/></li></ul></li>
17041 <ul><li>d</li></ul></li></ul>
17042 <link rel="mw:PageProp/Category" href="./Category:Foo" data-parsoid='{"stx":"simple","a":{"href":"./Category:Foo"},"sa":{"href":"Category:Foo"}}'/>
17045 ## We used to, but no longer wt2wt this test since the default serializer
17046 ## will normalize all categories to serialize on their own line.
17047 ## This wikitext usage is going to be fairly uncommon in production and
17048 ## selser will take care of preserving formatting in those scenarios.
17050 6. Categories and newlines: migrateTrailingCategories dom pass should not migrate categories not preceded by newlines
17054 *a [[Category:Foo]]
17056 <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>
17059 # This test also demonstrates because of newline+category tunneling
17060 # through the list hander, template wrapping doesn't expand to the
17061 # containing list when the list item swallows the category.
17063 7. Categories and newlines: migrateTrailingCategories dom pass should leave template content alone
17068 <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
17069 </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>
17073 8. Categories and newlines: migrateTrailingCategories dom pass should not get tripped by intervening templates
17077 {{echo|[[Category:Foo]]
17081 <ul><li>a</li></ul>
17083 <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">
17084 </span><link rel="mw:PageProp/Category" href="./Category:Bar" about="#mwt1" data-parsoid='{"stx":"simple","a":{"href":"./Category:Bar"},"sa":{"href":"Category:Bar"}}'/>
17085 <link rel="mw:PageProp/Category" href="./Category:Baz" data-parsoid='{"stx":"simple","a":{"href":"./Category:Baz"},"sa":{"href":"Category:Baz"}}'/>
17089 Categories and newlines: migrateTrailingCategories dom pass should not get tripped by comments and whitespace
17093 [[Category:Bar]]<!--boo1--> <!--boo2-->
17094 [[Category:Baz]]<!--boo3--> <!--boo4-->
17096 <ul><li>a</li></ul>
17098 <link rel="mw:PageProp/Category" href="./Category:Bar"/><!--boo1--> <!--boo2-->
17099 <link rel="mw:PageProp/Category" href="./Category:Baz"/><!--boo3--> <!--boo4-->
17103 Categories and newlines: should behave properly with linkprefix (T87753)
17118 <link rel="mw:PageProp/Category" href="./تصنيف:Foo"/>
17119 <link rel="mw:PageProp/Category" href="./تصنيف:Bar"/>
17123 No regressions on internal links following category (T174639)
17125 parsoid=wt2html,html2html
17127 [[Category:Foo]]<div>a
17132 <a href="/wiki/Foo" title="Foo">Foo</a></div>
17135 <link rel="mw:PageProp/Category" href="./Category:Foo"/><div>a
17137 <a rel="mw:WikiLink" href="./Foo" title="Foo">Foo</a></div>
17140 # Note that Parsoid differs slightly from PHP due to T175421
17142 11. Special case where only newlines separate links (T175416)
17144 parsoid=wt2html,html2html
17148 [[Foo]][[es:Alimento]]
17153 <a href="/wiki/Foo" title="Foo">Foo</a>
17154 </p><p><a href="/wiki/Foo" title="Foo">Foo</a>
17157 <link rel="mw:PageProp/Category" href="./Category:Foo"/>
17159 <p><a rel="mw:WikiLink" href="./Foo" title="Foo">Foo</a></p><link rel="mw:PageProp/Language" href="http://es.wikipedia.org/wiki/Alimento"/>
17161 <p><a rel="mw:WikiLink" href="./Foo" title="Foo">Foo</a></p>
17165 Category links with multiple namespaces
17167 [[Category:Project:Foo]]
17169 <link rel="mw:PageProp/Category" href="./Category:Project:Foo" />
17173 Parsoid: Serialize link to category page with colon escape
17177 [[:Category:Foo|Bar]]
17179 <p><a href="/index.php?title=Category:Foo&action=edit&redlink=1" class="new" title="Category:Foo (page does not exist)">Category:Foo</a>
17180 <a href="/index.php?title=Category:Foo&action=edit&redlink=1" class="new" title="Category:Foo (page does not exist)">Bar</a>
17184 <a rel="mw:WikiLink" href="./Category:Foo" title="Category:Foo">Category:Foo</a>
17185 <a rel="mw:WikiLink" href="./Category:Foo" title="Category:Foo">Bar</a>
17189 # We used to, but no longer wt2wt this test since the default serializer
17190 # will normalize all categories to serialize on their own line.
17191 # This wikitext usage is going to be fairly uncommon in production and
17192 # selser will take care of preventing whitespace insertion if this
17193 # occurs in an article.
17195 # html2html disabled for the same reason (whitespace insertion between
17198 # html2wt disabled because it localizes the "Category" namespace.
17200 Link prefix/suffixes aren't applied to category links
17210 <p>x<link rel="mw:PageProp/Category" href="./Flokkur:Foo" data-parsoid=""/>y</p>
17214 Link prefix/suffixes aren't applied to language links
17224 <p>x<link rel="mw:PageProp/Language" href="http://es.wikipedia.org/wiki/Foo" data-parsoid=""/>y</p>
17228 Parsoid: Serialize link to file page with colon escape
17232 [[:File:Foo.png|Bar]]
17234 <p><a href="/index.php?title=File:Foo.png&action=edit&redlink=1" class="new" title="File:Foo.png (page does not exist)">File:Foo.png</a>
17235 <a href="/index.php?title=File:Foo.png&action=edit&redlink=1" class="new" title="File:Foo.png (page does not exist)">Bar</a>
17239 <a rel="mw:WikiLink" href="./File:Foo.png" title="File:Foo.png">File:Foo.png</a>
17240 <a rel="mw:WikiLink" href="./File:Foo.png" title="File:Foo.png">Bar</a>
17245 Parsoid: Serialize a genuine category link without colon escape
17248 [[Category:Foo|Bar]]
17251 <link rel="mw:PageProp/Category" href="./Category:Foo">
17252 <link rel="mw:PageProp/Category" href="./Category:Foo#Bar">
17256 Normalize hrefs properly before testing for invalid link targets (T72894)
17260 <link rel="mw:PageProp/Category" href="./Category:Toxine_bactérienne"/>
17262 [[Category:Toxine bactérienne]]
17266 Parsoid: Defaultsort
17268 {{DEFAULTSORT:Foo}}
17270 <meta property="mw:PageProp/categorydefaultsort" content="Foo"/>
17273 # NOTE: mw:ExpandedAttrs is not the best typeof here. mw:Transclusion is better.
17274 # But, this is a limitation of our representation and is documented in
17275 # TemplateHandler.js in processSpecialMagicWord
17277 Parsoid: Defaultsort (template-generated)
17279 {{{{echo|DEFAULTSORT}}:Foo}}
17281 <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"}]]}'/>
17285 ### Inter-language links
17288 Interlanguage links
17296 es:Alimento fr:Nourriture zh:食品
17298 <link rel="mw:PageProp/Language" href="http://es.wikipedia.org/wiki/Alimento"/>
17299 <link rel="mw:PageProp/Language" href="http://fr.wikipedia.org/wiki/Nourriture"/>
17300 <link rel="mw:PageProp/Language" href="http://zh.wikipedia.org/wiki/食品"/>
17304 Duplicate interlanguage links (T26502)
17315 <link rel="mw:PageProp/Language" href="http://es.wikipedia.org/wiki/1"/>
17316 <link rel="mw:PageProp/Language" href="http://es.wikipedia.org/wiki/2"/>
17317 <link rel="mw:PageProp/Language" href="http://fr.wikipedia.org/wiki/1"/>
17318 <link rel="mw:PageProp/Language" href="http://fr.wikipedia.org/wiki/2"/>
17325 Basic section headings
17332 ===Smaller headline===
17335 <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>
17338 <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>
17341 <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>
17347 Section headings with TOC
17350 ===Subheadline 1===
17351 =====Skipping a level=====
17352 ======Skipping a level======
17356 ===Another headline===
17358 <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>
17360 <li class="toclevel-1 tocsection-1"><a href="#Headline_1"><span class="tocnumber">1</span> <span class="toctext">Headline 1</span></a>
17362 <li class="toclevel-2 tocsection-2"><a href="#Subheadline_1"><span class="tocnumber">1.1</span> <span class="toctext">Subheadline 1</span></a>
17364 <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>
17366 <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>
17373 <li class="toclevel-1 tocsection-5"><a href="#Headline_2"><span class="tocnumber">2</span> <span class="toctext">Headline 2</span></a>
17375 <li class="toclevel-2 tocsection-6"><a href="#Another_headline"><span class="tocnumber">2.1</span> <span class="toctext">Another headline</span></a></li>
17381 <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>
17382 <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>
17383 <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>
17384 <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>
17385 <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>
17388 <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>
17393 TOC anchors don't collide
17401 <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>
17403 <li class="toclevel-1 tocsection-1"><a href="#Headline_2"><span class="tocnumber">1</span> <span class="toctext">Headline 2</span></a></li>
17404 <li class="toclevel-1 tocsection-2"><a href="#Headline"><span class="tocnumber">2</span> <span class="toctext">Headline</span></a></li>
17405 <li class="toclevel-1 tocsection-3"><a href="#Headline_2_2"><span class="tocnumber">3</span> <span class="toctext">Headline 2</span></a></li>
17406 <li class="toclevel-1 tocsection-4"><a href="#Headline_3"><span class="tocnumber">4</span> <span class="toctext">Headline</span></a></li>
17410 <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>
17411 <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>
17412 <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>
17413 <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>
17417 # perl -e 'print "="x$_," Level $_ heading","="x$_,"\n" for 1..10'
17418 # Parsoid html2wt direction adds <nowiki> for level 7 and up.
17420 Handling of sections up to level 6 and beyond
17425 ==Level 2 Heading==
17426 ===Level 3 Heading===
17427 ====Level 4 Heading====
17428 =====Level 5 Heading=====
17429 ======Level 6 Heading======
17430 =======Level 7 Heading=======
17431 ========Level 8 Heading========
17432 =========Level 9 Heading=========
17433 ==========Level 10 Heading==========
17435 <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>
17437 <li class="toclevel-1 tocsection-1"><a href="#Level_1_Heading"><span class="tocnumber">1</span> <span class="toctext">Level 1 Heading</span></a>
17439 <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>
17441 <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>
17443 <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>
17445 <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>
17447 <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>
17448 <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>
17449 <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>
17450 <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>
17451 <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>
17465 <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>
17466 <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>
17467 <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>
17468 <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>
17469 <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>
17470 <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>
17471 <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>
17472 <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>
17473 <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>
17474 <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>
17477 <h1 id="Level_1_Heading" data-parsoid='{}'>Level 1 Heading</h1>
17478 <h2 id="Level_2_Heading" data-parsoid='{}'>Level 2 Heading</h2>
17479 <h3 id="Level_3_Heading" data-parsoid='{}'>Level 3 Heading</h3>
17480 <h4 id="Level_4_Heading" data-parsoid='{}'>Level 4 Heading</h4>
17481 <h5 id="Level_5_Heading" data-parsoid='{}'>Level 5 Heading</h5>
17482 <h6 id="Level_6_Heading" data-parsoid='{}'>Level 6 Heading</h6>
17483 <h6 id="=Level_7_Heading=" data-parsoid='{}'><span id=".3DLevel_7_Heading.3D" typeof="mw:FallbackId"></span>=Level 7 Heading=</h6>
17484 <h6 id="==Level_8_Heading==" data-parsoid='{}'><span id=".3D.3DLevel_8_Heading.3D.3D" typeof="mw:FallbackId"></span>==Level 8 Heading==</h6>
17485 <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>
17486 <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>
17490 TOC regression (T11764)
17494 ====title 1.1.1====
17499 <div id="toc" class="toc"><input type="checkbox" role="button" id="toctogglecheckbox" class="toctogglecheckbox" style="display:none"/><div class="toctitle" lang="en" dir="ltr"><h2>Contents</h2><span class="toctogglespan"><label class="toctogglelabel" for="toctogglecheckbox"></label></span></div>
17501 <li class="toclevel-1 tocsection-1"><a href="#title_1"><span class="tocnumber">1</span> <span class="toctext">title 1</span></a>
17503 <li class="toclevel-2 tocsection-2"><a href="#title_1.1"><span class="tocnumber">1.1</span> <span class="toctext">title 1.1</span></a>
17505 <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>
17508 <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>
17511 <li class="toclevel-1 tocsection-5"><a href="#title_2"><span class="tocnumber">2</span> <span class="toctext">title 2</span></a>
17513 <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>
17519 <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>
17520 <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>
17521 <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>
17522 <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>
17523 <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>
17524 <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>
17529 TOC for heading containing <span id="..."></span> (T96153)
17532 ==<span id="old-anchor"></span>New title==
17534 <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>
17536 <li class="toclevel-1 tocsection-1"><a href="#New_title"><span class="tocnumber">1</span> <span class="toctext">New title</span></a></li>
17540 <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>
17545 TOC with wgMaxTocLevel=3 (T8204)
17551 ====title 1.1.1====
17556 <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>
17558 <li class="toclevel-1 tocsection-1"><a href="#title_1"><span class="tocnumber">1</span> <span class="toctext">title 1</span></a>
17560 <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>
17561 <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>
17564 <li class="toclevel-1 tocsection-5"><a href="#title_2"><span class="tocnumber">2</span> <span class="toctext">title 2</span></a>
17566 <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>
17572 <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>
17573 <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>
17574 <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>
17575 <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>
17576 <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>
17577 <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>
17582 TOC with wgMaxTocLevel=3 and two level four headings (T8204)
17588 ====Section 1.1.1====
17589 ====Section 1.1.1.1====
17592 <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>
17594 <li class="toclevel-1 tocsection-1"><a href="#Section_1"><span class="tocnumber">1</span> <span class="toctext">Section 1</span></a>
17596 <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>
17599 <li class="toclevel-1 tocsection-5"><a href="#Section_2"><span class="tocnumber">2</span> <span class="toctext">Section 2</span></a></li>
17603 <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>
17604 <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>
17605 <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>
17606 <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>
17607 <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>
17613 Resolving duplicate section names
17618 <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>
17619 <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>
17624 Resolving duplicate section names with differing case (T12721)
17629 <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>
17630 <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>
17642 Template with sections, __NOTOC__
17649 <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>
17650 <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>
17651 <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>
17652 <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>
17657 __NOEDITSECTION__ keyword
17663 <h2><span class="mw-headline" id="Section_1">Section 1</span></h2>
17664 <h2><span class="mw-headline" id="Section_2">Section 2</span></h2>
17669 Link inside a section heading
17671 ==Section with a [[Main Page|link]] in it==
17673 <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>
17678 TOC regression (T14077)
17685 <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>
17687 <li class="toclevel-1 tocsection-1"><a href="#title_1"><span class="tocnumber">1</span> <span class="toctext">title 1</span></a>
17689 <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>
17692 <li class="toclevel-1 tocsection-3"><a href="#title_2"><span class="tocnumber">2</span> <span class="toctext">title 2</span></a></li>
17696 <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>
17697 <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>
17698 <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>
17703 T3219 URL next to image (good)
17705 http://example.com [[File:Foobar.jpg]]
17707 <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" decoding="async" width="1941" height="220" /></a>
17710 <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>
17713 # Parsoid doesn't wt2wt this cleanly because it adds <nowiki>s.
17715 Short headings with trailing space should match behavior of Parser::doHeadings (T21910)
17717 parsoid=wt2html,html2html
17720 The line above must have a trailing space!
17723 But just in case it doesn't...
17725 <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>
17726 <p>The line above must have a trailing space!
17728 <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>
17729 <p>But just in case it doesn't...
17732 <h1 id="="><span id=".3D" typeof="mw:FallbackId"></span>=</h1>
17733 <p>The line above must have a trailing space!</p>
17734 <h1 id="=_2"><span id=".3D_2" typeof="mw:FallbackId"></span>=</h1> <!--
17736 <p>But just in case it doesn't...</p>
17740 Header with special characters (T27462)
17742 The tooltips shall not show entities to the user (ie. be double escaped)
17759 <p>The tooltips shall not show entities to the user (ie. be double escaped)
17761 <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>
17763 <li class="toclevel-1 tocsection-1"><a href="#text_.3E_text"><span class="tocnumber">1</span> <span class="toctext">text > text</span></a></li>
17764 <li class="toclevel-1 tocsection-2"><a href="#text_.3C_text"><span class="tocnumber">2</span> <span class="toctext">text < text</span></a></li>
17765 <li class="toclevel-1 tocsection-3"><a href="#text_.26_text"><span class="tocnumber">3</span> <span class="toctext">text & text</span></a></li>
17766 <li class="toclevel-1 tocsection-4"><a href="#text_.27_text"><span class="tocnumber">4</span> <span class="toctext">text ' text</span></a></li>
17767 <li class="toclevel-1 tocsection-5"><a href="#text_.22_text"><span class="tocnumber">5</span> <span class="toctext">text " text</span></a></li>
17771 <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>
17774 <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>
17777 <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>
17780 <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>
17783 <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>
17787 <p>The tooltips shall not show entities to the user (ie. be double escaped)</p>
17789 <h2 id="text_>_text"><span id="text_.3E_text" typeof="mw:FallbackId"></span>text > text</h2>
17792 <h2 id="text_<_text"><span id="text_.3C_text" typeof="mw:FallbackId"></span>text < text</h2>
17795 <h2 id="text_&_text"><span id="text_.26_text" typeof="mw:FallbackId"></span>text & text</h2>
17798 <h2 id="text_'_text"><span id="text_.27_text" typeof="mw:FallbackId"></span>text ' text</h2>
17801 <h2 id='text_"_text'><span id="text_.22_text" typeof="mw:FallbackId"></span>text " text</h2>
17806 Header with space, plus and underscore as entity
17808 Id should not contain + for spaces
17810 ==Space between Text==
17813 ==Space-Entity between Text==
17816 ==Plus+between+Text==
17819 ==Plus-Entity+between+Text==
17822 ==Underscore_between_Text==
17825 ==Underscore-Entity_between_Text==
17828 [[#Space between Text]]
17829 [[#Space-Entity between Text]]
17830 [[#Plus+between+Text]]
17831 [[#Plus-Entity+between+Text]]
17832 [[#Underscore_between_Text]]
17833 [[#Underscore-Entity_between_Text]]
17835 <p>Id should not contain + for spaces
17837 <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>
17839 <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>
17840 <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>
17841 <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>
17842 <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>
17843 <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>
17844 <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>
17848 <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>
17851 <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>
17854 <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>
17857 <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>
17860 <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>
17863 <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>
17865 </p><p><a href="#Space_between_Text">#Space between Text</a>
17866 <a href="#Space-Entity_between_Text">#Space-Entity between Text</a>
17867 <a href="#Plus.2Bbetween.2BText">#Plus+between+Text</a>
17868 <a href="#Plus-Entity.2Bbetween.2BText">#Plus-Entity+between+Text</a>
17869 <a href="#Underscore_between_Text">#Underscore_between_Text</a>
17870 <a href="#Underscore-Entity_between_Text">#Underscore-Entity_between_Text</a>
17873 <p>Id should not contain + for spaces</p>
17875 <h2 id="Space_between_Text">Space between Text</h2>
17878 <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>
17881 <h2 id="Plus+between+Text"><span id="Plus.2Bbetween.2BText" typeof="mw:FallbackId"></span>Plus+between+Text</h2>
17884 <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>
17887 <h2 id="Underscore_between_Text">Underscore_between_Text</h2>
17890 <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>
17893 <p><a rel="mw:WikiLink" href="./Parser_test#Space_between_Text" data-parsoid='{"stx":"simple","a":{"href":"./Parser_test#Space_between_Text"},"sa":{"href":"#Space between Text"}}'>#Space between Text</a>
17894 <a rel="mw:WikiLink" href="./Parser_test#Space-Entity_between_Text" data-parsoid='{"stx":"simple","a":{"href":"./Parser_test#Space-Entity_between_Text"},"sa":{"href":"#Space-Entity&#32;between&#32;Text"}}'>#Space-Entity between Text</a>
17895 <a rel="mw:WikiLink" href="./Parser_test#Plus+between+Text" data-parsoid='{"stx":"simple","a":{"href":"./Parser_test#Plus+between+Text"},"sa":{"href":"#Plus+between+Text"}}'>#Plus+between+Text</a>
17896 <a rel="mw:WikiLink" href="./Parser_test#Plus-Entity+between+Text" data-parsoid='{"stx":"simple","a":{"href":"./Parser_test#Plus-Entity+between+Text"},"sa":{"href":"#Plus-Entity&#43;between&#43;Text"}}'>#Plus-Entity+between+Text</a>
17897 <a rel="mw:WikiLink" href="./Parser_test#Underscore_between_Text" data-parsoid='{"stx":"simple","a":{"href":"./Parser_test#Underscore_between_Text"},"sa":{"href":"#Underscore_between_Text"}}'>#Underscore_between_Text</a>
17898 <a rel="mw:WikiLink" href="./Parser_test#Underscore-Entity_between_Text" data-parsoid='{"stx":"simple","a":{"href":"./Parser_test#Underscore-Entity_between_Text"},"sa":{"href":"#Underscore-Entity&#95;between&#95;Text"}}'>#Underscore-Entity_between_Text</a></p>
17901 # Parsoid html2wt disabled because it adds padding spaces around =
17903 Headers with excess '=' characters
17904 (Are similar tests necessary beyond the 1st level?)
17906 parsoid=wt2html,wt2wt,html2html
17910 =''italic'' heading==
17911 ==''italic'' heading=
17913 <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>
17915 <li class="toclevel-1 tocsection-1"><a href="#foo.3D"><span class="tocnumber">1</span> <span class="toctext">foo=</span></a></li>
17916 <li class="toclevel-1 tocsection-2"><a href="#.3Dfoo"><span class="tocnumber">2</span> <span class="toctext">=foo</span></a></li>
17917 <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>
17918 <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>
17922 <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>
17923 <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>
17924 <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>
17925 <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>
17928 <h1 id="foo="><span id="foo.3D" typeof="mw:FallbackId"></span>foo=</h1>
17929 <h1 id="=foo"><span id=".3Dfoo" typeof="mw:FallbackId"></span>=foo</h1>
17930 <h1 id="italic_heading="><span id="italic_heading.3D" typeof="mw:FallbackId"></span><i>italic</i> heading=</h1>
17931 <h1 id="=italic_heading"><span id=".3Ditalic_heading" typeof="mw:FallbackId"></span>=<i>italic</i> heading</h1>
17935 HTML headers vs TOC (T25393)
17936 (__NOEDITSECTION__ for clearer output, doesn't matter here)
17948 <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>
17950 <li class="toclevel-1"><a href="#Header_1"><span class="tocnumber">1</span> <span class="toctext">Header 1</span></a>
17952 <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>
17953 <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>
17956 <li class="toclevel-1"><a href="#Header_2"><span class="tocnumber">2</span> <span class="toctext">Header 2</span></a>
17958 <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>
17959 <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>
17965 <h1><span class="mw-headline" id="Header_1">Header 1</span></h1>
17966 <h2><span class="mw-headline" id="Header_1.1">Header 1.1</span></h2>
17967 <h2><span class="mw-headline" id="Header_1.2">Header 1.2</span></h2>
17968 <h1><span class="mw-headline" id="Header_2">Header 2
17970 <h2><span class="mw-headline" id="Header_2.1">Header 2.1</span></h2>
17971 <h2><span class="mw-headline" id="Header_2.2">Header 2.2</span></h2>
17974 <h1 id="Header_1" data-parsoid='{"stx":"html"}'>Header 1</h1>
17975 <h2 id="Header_1.1" data-parsoid='{}'>Header 1.1</h2>
17976 <h2 id="Header_1.2" data-parsoid='{}'>Header 1.2</h2>
17978 <h1 id="Header_2" data-parsoid='{"stx":"html"}'>Header 2
17980 <h2 id="Header_2.1" data-parsoid='{}'>Header 2.1</h2>
17981 <h2 id="Header_2.2" data-parsoid='{}'>Header 2.2</h2>
17982 <meta property="mw:PageProp/noeditsection"/>
17986 Single-line or multiline-comments can follow headings
17988 parsoid=wt2html,wt2wt
17996 <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>
17997 <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>
17998 <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>
18001 <h2 id="foo">foo</h2><!---->
18002 <h2 id="bar">bar</h2><!--c1-->
18003 <h2 id="baz">baz</h2><!--
18009 T3219 URL next to image (broken)
18011 http://example.com[[File:Foobar.jpg]]
18013 <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" decoding="async" width="1941" height="220" /></a>
18016 <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>
18020 T3186 news: in the middle of text
18022 http://en.wikinews.org/wiki/Wikinews:Workplace
18024 <p><a rel="nofollow" class="external free" href="http://en.wikinews.org/wiki/Wikinews:Workplace">http://en.wikinews.org/wiki/Wikinews:Workplace</a>
18030 Namespaced link must have a title
18039 Namespaced link must have a title (bad fragment version)
18041 [[Project:#fragment]]
18043 <p>[[Project:#fragment]]
18049 ### HTML tags and HTML attributes
18053 div with no attributes
18055 <div>HTML rocks</div>
18057 <div>HTML rocks</div>
18062 div with double-quoted attribute
18064 <div id="rock">HTML rocks</div>
18066 <div id="rock">HTML rocks</div>
18071 div with single-quoted attribute
18073 <div id='rock'>HTML rocks</div>
18075 <div id="rock">HTML rocks</div>
18080 div with unquoted attribute
18082 <div id=rock>HTML rocks</div>
18084 <div id="rock">HTML rocks</div>
18089 div with illegal double attributes
18091 <div id="a" id="b">HTML rocks</div>
18093 <div id="b">HTML rocks</div>
18098 div with empty attribute value, space before equals
18100 parsoid=wt2html,html2html
18102 <div class =>HTML rocks</div>
18104 <div class="">HTML rocks</div>
18107 <div class="" data-parsoid='{"stx":"html"}'>HTML rocks</div>
18111 div with multiple empty attribute values
18113 wgFragmentMode=[ 'html5', 'legacy' ]
18115 parsoid=wt2html,html2html
18117 <div id= title=>HTML rocks</div>
18119 <div id="title=">HTML rocks</div>
18122 <div id="title=" data-parsoid='{"stx":"html"}'>HTML rocks</div>
18125 # FIXME Parsoid doesn't actually match PHP here.
18127 Extension tag in attribute value
18131 <span title="<html><div>123</div></html>">ok</span>
18133 <p><span title="<div>123</div>">ok</span>
18136 <p><span title="123" about="#mwt4" typeof="mw:ExpandedAttrs" data-parsoid='{"stx":"html","a":{"title":"123"},"sa":{"title":"<html><div>123</div></html>"}}' data-mw='{"attribs":[[{"txt":"title"},{"html":"<div typeof=\"mw:Extension/html\" about=\"#mwt3\" data-parsoid='{\"dsr\":[13,40,2,2]}' data-mw='{\"name\":\"html\",\"attrs\":{},\"body\":{\"extsrc\":\"&lt;div>123&lt;/div>\"}}'>123</div>"}]]}'>ok</span></p>
18140 table with multiple empty attribute values
18142 parsoid=wt2html,html2html
18148 <table title="id=">
18154 <table title="id=">
18155 <tbody><tr><td>hi</td></tr>
18160 div with braces in attribute value
18162 <div title="{}">Foo</div>
18164 <div title="{}">Foo</div>
18167 <div title="{}">Foo</div>
18171 div with empty attribute value, no space before equals
18173 parsoid=wt2html,html2html
18175 <div class=>HTML rocks</div>
18177 <div class="">HTML rocks</div>
18180 <div class="">HTML rocks</div>
18184 HTML multiple attributes correction
18186 <p class="error" class="awesome">Awesome!</p>
18188 <p class="awesome">Awesome!</p>
18193 Table multiple attributes correction
18196 !+ class="error" class="awesome"|status
18201 <th class="awesome">status
18209 <DIV ID="x">HTML ROCKS</DIV>
18211 <div id="x">HTML ROCKS</div>
18216 Non-ASCII pseudo-tags are rendered as text
18225 Pseudo-tag with URL 'name' renders as url link
18227 <http://example.com/>
18229 <p><<a rel="nofollow" class="external free" href="http://example.com/">http://example.com/</a>>
18234 text with amp in the middle of nowhere
18238 <p>Remember AT&T?
18243 text with character entity: eacute
18245 I always thought é was a cute letter.
18247 <p>I always thought é was a cute letter.
18252 text with entity-escaped character entity-like string: eacute
18254 I always thought &eacute; was a cute letter.
18256 <p>I always thought &eacute; was a cute letter.
18261 text with undefined character entity: xacute
18263 I always thought &xacute; was a cute letter.
18265 <p>I always thought &xacute; was a cute letter.
18272 <data value="5">five</data>
18273 <time datetime="2000-01-01T00:00Z">The new millenium started</time>
18274 <mark>This highlighted text</mark>
18276 <p><data value="5">five</data>
18277 <time datetime="2000-01-01T00:00Z">The new millenium started</time>
18278 <mark>This highlighted text</mark>
18283 HTML tag with leading space is parsed as text
18287 <p>< div>foo< /div>
18291 ## FIXME: The untrimmed attribute in Parsoid is T205737
18293 Element with broken attribute syntax
18297 <div style=" style="123">hi</div>
18300 <div style="style=">hi</div>
18304 <div style=" style=" data-parsoid='{"stx":"html","a":{"123\"":null},"sa":{"123\"":""}}'>hi</div>
18305 <div data-parsoid='{"stx":"html","a":{"=":null},"sa":{"=":""}}'>ho</div>
18309 ### Nesting tests (see T43545, T52604, T53081)
18312 # This test case is fixed in Parsoid by domino 1.0.12. (T52604)
18313 # Note that html2wt is considerably more difficult if we use <b> in
18314 # the test case, instead of <small>
18316 Ensure that HTML adoption agency algorithm is properly implemented.
18318 <small>X<small>Y</small>Z</small>
18320 <p><small>X<small>Y</small>Z</small>
18324 # This was T43545 in the PHP parser.
18328 <kbd>X<kbd>Y</kbd>Z</kbd>
18330 <p><kbd>X<kbd>Y</kbd>Z</kbd>
18334 # The following cases were T53081 in the PHP parser.
18335 # Note that there are some other nestable tags (b, i, etc) which are
18336 # not covered; see T53081 for discussion.
18341 <em>X<em>Y</em>Z</em>
18343 <p><em>X<em>Y</em>Z</em>
18348 Nesting of <strong>
18350 <strong>X<strong>Y</strong>Z</strong>
18352 <p><strong>X<strong>Y</strong>Z</strong>
18361 <p><q>X<q>Y</q>Z</q>
18368 <ruby>X<ruby>Y</ruby>Z</ruby>
18370 <p><ruby>X<ruby>Y</ruby>Z</ruby>
18377 <bdo>X<bdo>Y</bdo>Z</bdo>
18379 <p><bdo>X<bdo>Y</bdo>Z</bdo>
18391 [[Media:Foobar.jpg]]
18392 [[Media:Video.ogv]]
18393 [[:Media:Video.ogv]]
18395 <p><a href="http://example.com/images/3/3a/Foobar.jpg" class="internal" title="Foobar.jpg">Media:Foobar.jpg</a>
18396 <a href="http://example.com/images/0/00/Video.ogv" class="internal" title="Video.ogv">Media:Video.ogv</a>
18397 <a href="http://example.com/images/0/00/Video.ogv" class="internal" title="Video.ogv">Media:Video.ogv</a>
18400 <p><a rel="mw:MediaLink" href="//example.com/images/3/3a/Foobar.jpg" resource="./Media:Foobar.jpg" title="Foobar.jpg">Media:Foobar.jpg</a>
18401 <a rel="mw:MediaLink" href="//example.com/images/0/00/Video.ogv" resource="./Media:Video.ogv" title="Video.ogv">Media:Video.ogv</a>
18402 <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>
18406 Media link with text
18408 [[Media:Foobar.jpg|A neat file to look at]]
18410 <p><a href="http://example.com/images/3/3a/Foobar.jpg" class="internal" title="Foobar.jpg">A neat file to look at</a>
18413 <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>
18417 Localized media link
18421 [[Miðill:Foobar.jpg]]
18423 [[Miðill:Foobar.jpg|Icelandic]]
18425 <p><a href="http://example.com/images/3/3a/Foobar.jpg" class="internal" title="Foobar.jpg">Miðill:Foobar.jpg</a>
18426 </p><p><a href="http://example.com/images/3/3a/Foobar.jpg" class="internal" title="Foobar.jpg">Icelandic</a>
18429 <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>
18430 <p><a rel="mw:MediaLink" href="//example.com/images/3/3a/Foobar.jpg" resource="./Miðill:Foobar.jpg" title="Foobar.jpg">Icelandic</a></p>
18433 # FIXME: this is still bad HTML tag nesting
18434 # FIXME: doBlockLevels won't wrap this in a paragraph because it contains a div
18435 # Parsoid & Remex fix the p-wrapping since they operate on the DOM.
18437 Media link with nasty text
18439 parsoid=wt2html,html2html
18441 [[Media:Foobar.jpg|Safe Link<div style=display:none>" onmouseover="alert(document.cookie)" onfoo="</div>]]
18443 <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>
18446 <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>
18448 <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>
18452 Media link from missing resource (parsoid-only)
18456 <a rel="mw:MediaLink" href="http://example.com/images/3/3a/Foobar.jpg">Bat!</a>
18458 [[Media:Foobar.jpg|Bat!]]
18462 Media link from missing resource, localized (parsoid-only)
18467 <a rel="mw:MediaLink" href="http://example.com/images/3/3a/Foobar.jpg">Bat!</a>
18469 [[Miðill:Foobar.jpg|Bat!]]
18472 # This is a sanity test to ensure we don't crash or choke when given
18473 # old cached 1.7.0 HTML for media links; we don't require that the
18474 # result be "valid" because wt2wt was completely broken in 1.7.0
18476 Media link from old 1.7.0 DOM spec (crash test, parsoid-only) T198511
18480 <p>This is what Parsoid would emit (and we still handle this HTML fine):</p>
18481 <p><a rel="mw:MediaLink" href="//example.com/images/3/3a/Foobar.jpg" title="Foobar.jpg">A neat file to look at</a></p>
18482 <p>But VisualEditor would mangle the rel attribute, and give us back this:</p>
18483 <p><a rel="mw:ExtLink" href="//example.com/images/3/3a/Foobar.jpg" title="Foobar.jpg">A neat file to look at</a></p>
18484 <p>But at least we don't crash when trying to handle the mangled HTML!</p>
18486 This is what Parsoid would emit (and we still handle this HTML fine):
18488 [[Media:Foobar.jpg|A neat file to look at]]
18490 But VisualEditor would mangle the rel attribute, and give us back this:
18492 [//example.com/images/3/3a/Foobar.jpg A neat file to look at]
18494 But at least we don't crash when trying to handle the mangled HTML!
18498 Media link to nonexistent file (T3702)
18500 [[Media:No such.jpg]]
18501 [[Media:No_such file.jpg]]
18503 <p><a href="/index.php?title=Special:Upload&wpDestFile=No_such.jpg" class="new" title="No such.jpg">Media:No such.jpg</a>
18504 <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>
18507 <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>
18508 <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>
18512 Image link to nonexistent file (T3850 - good)
18514 [[File:No_such.jpg]]
18516 <p><a href="/index.php?title=Special:Upload&wpDestFile=No_such.jpg" class="new" title="File:No such.jpg">File:No such.jpg</a>
18519 <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>
18523 :Image link to nonexistent file (T3850 - bad)
18525 [[:Image:No such.jpg]]
18527 <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>
18530 <p><a rel="mw:WikiLink" href="./File:No_such.jpg" title="File:No such.jpg">Image:No such.jpg</a></p>
18534 Character reference normalization in link text (T3938)
18536 [[Main Page|this&that]]
18538 <p><a href="/wiki/Main_Page" title="Main Page">this&that</a>
18545 Test for unicode normalization
18547 The page's name is U+05d0 U+05b7, with non-canonical form U+FB2E
18551 (T21451) Links should refer to the normalized form.
18559 <p><a href="/wiki/%D7%90%D6%B7" title="אַ">אַ</a>
18560 <a href="/wiki/%D7%90%D6%B7" title="אַ">אַ</a>
18561 <a href="/wiki/%D7%90%D6%B7" title="אַ">אַ</a>
18562 <a href="/wiki/%D7%90%D6%B7" title="אַ">אַ</a>
18563 <a href="/wiki/%D7%90%D6%B7" title="אַ">אַ</a>
18568 Empty attribute crash test (T4067)
18570 <font color="">foo</font>
18572 <p><font color="">foo</font>
18577 Empty attribute crash test single-quotes (T4067)
18579 <font color=''>foo</font>
18581 <p><font color="">foo</font>
18586 Attribute test: equals, then nothing
18588 parsoid=wt2html,html2html
18590 <font color=>foo</font>
18592 <p><font color="">foo</font>
18595 <p><font color="" data-parsoid='{"stx":"html"}'>foo</font></p>
18599 Attribute test: unquoted value
18601 parsoid=wt2html,html2html
18603 <font color=x>foo</font>
18605 <p><font color="x">foo</font>
18608 <p><font color="x" data-parsoid='{"stx":"html"}'>foo</font></p>
18612 Attribute test: unquoted but illegal value (hash)
18614 <font color=#x>foo</font>
18616 <p><font color="#x">foo</font>
18620 # Parsoid does not serialize to empty attribute syntax,
18621 # so wt2wt and html2wt cases are skipped
18623 Attribute test: no value (T54330)
18625 parsoid=wt2html,html2html
18627 <font color>foo</font>
18629 <p><font color="">foo</font>
18632 <p><font color="">foo</font></p>
18636 T4095: link with three closing brackets
18640 <p><a href="/wiki/Main_Page" title="Main Page">Main Page</a>]
18643 <p><a rel="mw:WikiLink" href="./Main_Page" title="Main Page">Main Page</a>]</p>
18647 T4095: link with pipe and three closing brackets
18649 [[Main Page|link]]]
18651 <p><a href="/wiki/Main_Page" title="Main Page">link</a>]
18654 <p><a rel="mw:WikiLink" href="./Main_Page" title="Main Page">link</a>]</p>
18658 T4095: link with pipe and three closing brackets, version 2
18660 [[Main Page|[http://example.com/]]]
18662 <p><a href="/wiki/Main_Page" title="Main Page">[http://example.com/]</a>
18665 <p><a rel="mw:WikiLink" href="./Main_Page" title="Main Page">[http://example.com/]</a></p>
18674 Template:Dangerous attribute
18676 " onmouseover="alert(document.cookie)
18680 Template:Dangerous style attribute
18682 border-size: expression(alert(document.cookie))
18688 <div style="float: right; {{{1}}}">Magic div</div>
18692 T4304: HTML attribute safety (safe template; regression T4309)
18694 <div title="{{test}}"></div>
18696 <div title="This is a test template"></div>
18699 <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>
18702 # Parsoid has enough context to handle this case
18704 T4304: HTML attribute safety (dangerous template; 2309)
18706 <div title="{{dangerous attribute}}"></div>
18708 <div title=""></div>
18711 <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>
18715 T4304: HTML attribute safety (dangerous style template; 2309)
18717 <div style="{{dangerous style attribute}}"></div>
18719 <div style="/* insecure input */"></div>
18722 <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>
18726 T4304: HTML attribute safety (safe parameter; 2309)
18728 {{div style|width: 200px}}
18730 <div style="float: right; width: 200px">Magic div</div>
18733 <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>
18737 T4304: HTML attribute safety (unsafe parameter; 2309)
18739 {{div style|width: expression(alert(document.cookie))}}
18741 <div style="/* insecure input */">Magic div</div>
18744 <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>
18747 ## Parsoid output here differs; needs investigation.
18749 T4304: HTML attribute safety (unsafe breakout parameter; 2309)
18751 {{div style|"><script>alert(document.cookie)</script>}}
18753 <div style="float: right;"><script>alert(document.cookie)</script>">Magic div</div>
18757 ## Parsoid output here differs; needs investigation.
18759 T4304: HTML attribute safety (unsafe breakout parameter 2; 2309)
18761 {{div style|" ><script>alert(document.cookie)</script>}}
18763 <div style="float: right;"><script>alert(document.cookie)</script>">Magic div</div>
18768 T4304: HTML attribute safety (link)
18770 <div title="[[Main Page]]"></div>
18772 <div title="[[Main Page]]"></div>
18775 <div title="[[Main Page]]"></div>
18779 T4304: HTML attribute safety (italics)
18781 <div title="''foobar''"></div>
18783 <div title="''foobar''"></div>
18788 T4304: HTML attribute safety (bold)
18790 <div title="'''foobar'''"></div>
18792 <div title="'''foobar'''"></div>
18797 T4304: HTML attribute safety (ISBN)
18799 <div title="ISBN 1234567890"></div>
18801 <div title="ISBN 1234567890"></div>
18806 T4304: HTML attribute safety (RFC)
18808 <div title="RFC 1234"></div>
18810 <div title="RFC 1234"></div>
18815 T4304: HTML attribute safety (PMID)
18817 <div title="PMID 1234567890"></div>
18819 <div title="PMID 1234567890"></div>
18824 T4304: HTML attribute safety (web link)
18826 <div title="http://example.com/"></div>
18828 <div title="http://example.com/"></div>
18833 T4304: HTML attribute safety (named web link)
18835 <div title="[http://example.com/ link]"></div>
18837 <div title="[http://example.com/ link]"></div>
18840 <div title="[http://example.com/ link]"></div>
18844 T5244: HTML attribute safety (extension; safe)
18846 <div style="<nowiki>background:blue</nowiki>"></div>
18848 <div style="background:blue"></div>
18851 <div style="background:blue" about="#mwt3" typeof="mw:ExpandedAttrs" data-parsoid='{"stx":"html","a":{"style":"background:blue"},"sa":{"style":"<nowiki>background:blue</nowiki>"}}' data-mw='{"attribs":[[{"txt":"style"},{"html":"<span typeof=\"mw:Nowiki\" data-parsoid='{\"dsr\":[12,44,8,9]}'>background:blue</span>"}]]}'></div>
18855 T5244: HTML attribute safety (extension; unsafe)
18857 <div style="<nowiki>border-left:expression(alert(document.cookie))</nowiki>"></div>
18859 <div style="/* insecure input */"></div>
18862 <div style="/* insecure input */" about="#mwt3" typeof="mw:ExpandedAttrs" data-parsoid='{"stx":"html","a":{"style":"/* insecure input */"},"sa":{"style":"<nowiki>border-left:expression(alert(document.cookie))</nowiki>"}}' data-mw='{"attribs":[[{"txt":"style"},{"html":"<span typeof=\"mw:Nowiki\" data-parsoid='{\"dsr\":[12,75,8,9]}'>border-left:expression(alert(document.cookie))</span>"}]]}'></div>
18865 # More MSIE fun discovered by Tom Gilder
18868 MSIE CSS safety test: spurious slash
18870 <div style="background-image:u\rl(javascript:alert('boo'))">evil</div>
18872 <div style="/* insecure input */">evil</div>
18875 <div style="/* insecure input */" data-parsoid='{"stx":"html","a":{"style":"/* insecure input */"},"sa":{"style":"background-image:u\\rl(javascript:alert('boo'))"}}'>evil</div>
18879 MSIE CSS safety test: hex code
18881 <div style="background-image:u\72l(javascript:alert('boo'))">evil</div>
18883 <div style="/* insecure input */">evil</div>
18886 <div style="/* insecure input */" data-parsoid='{"stx":"html","a":{"style":"/* insecure input */"},"sa":{"style":"background-image:u\\72l(javascript:alert('boo'))"}}'>evil</div>
18890 MSIE CSS safety test: comment in url
18892 <div style="background-image:u/**/rl(javascript:alert('boo'))">evil</div>
18894 <div style="background-image:u rl(javascript:alert('boo'))">evil</div>
18897 <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>
18901 MSIE CSS safety test: comment in expression
18903 <div style="background-image:expres/**/sion(alert('boo4'))">evil4</div>
18905 <div style="background-image:expres sion(alert('boo4'))">evil4</div>
18908 <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>
18912 CSS safety test (all browsers): vertical tab (T57332 / CVE-2013-4567)
18914 <p style="font-size: 100px; background-image:url\b(https://www.google.com/images/srpr/logo6w.png)">A</p>
18916 <p style="/* invalid control char */">A</p>
18919 <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>
18923 MSIE 6 CSS safety test: Fullwidth (T57332)
18925 <p style="font-size: 100px; color: expression((title='XSSed'),'red')">A</p>
18926 <div style="top:EXPRESSION(alert())">B</div>
18928 <p style="/* insecure input */">A</p>
18929 <div style="/* insecure input */">B</div>
18932 <p style="/* insecure input */" data-parsoid='{"stx":"html","a":{"style":"/* insecure input */"},"sa":{"style":"font-size: 100px; color: expression((title='XSSed'),'red')"}}'>A</p>
18933 <div style="/* insecure input */" data-parsoid='{"stx":"html","a":{"style":"/* insecure input */"},"sa":{"style":"top:EXPRESSION(alert())"}}'>B</div>
18937 MSIE 6 CSS safety test: IPA extensions (T57332)
18939 <div style="background-image:uʀʟ(javascript:alert())">A</div>
18940 <p style="font-size: 100px; color: expʀessɪoɴ((title='XSSed'),'red')">B</p>
18942 <div style="/* insecure input */">A</div>
18943 <p style="/* insecure input */">B</p>
18946 <div style="/* insecure input */" data-parsoid='{"stx":"html","a":{"style":"/* insecure input */"},"sa":{"style":"background-image:uʀʟ(javascript:alert())"}}'>A</div>
18947 <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>
18951 MSIE 6 CSS safety test: sup/sub script (T57332)
18953 <div style="background-image:url⁽javascript:alert())">A</div>
18954 <div style="background-image:url₍javascript:alert())">B</div>
18955 <p style="font-size: 100px; color: expressioⁿ((title='XSSed'),'red')">C</p>
18957 <div style="/* insecure input */">A</div>
18958 <div style="/* insecure input */">B</div>
18959 <p style="/* insecure input */">C</p>
18962 <div style="/* insecure input */" data-parsoid='{"stx":"html","a":{"style":"/* insecure input */"},"sa":{"style":"background-image:url⁽javascript:alert())"}}'>A</div>
18963 <div style="/* insecure input */" data-parsoid='{"stx":"html","a":{"style":"/* insecure input */"},"sa":{"style":"background-image:url₍javascript:alert())"}}'>B</div>
18964 <p style="/* insecure input */" data-parsoid='{"stx":"html","a":{"style":"/* insecure input */"},"sa":{"style":"font-size: 100px; color: expressioⁿ((title='XSSed'),'red')"}}'>C</p>
18970 parsoid=wt2html,html2html
18973 title="data:text/html,<img src=1 onerror=alert(1)>"
18974 style="-o-link:attr(title);-o-link-source:current">X</div>
18976 <div title="data:text/html,<img src=1 onerror=alert(1)>" style="/* insecure input */">X</div>
18979 <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>
18983 MSIE 6 CSS safety test: Repetition markers (T57332)
18985 <p style="font-size: 100px; color: expres〱ion((title='XSSed'),'red')">A</p>
18986 <p style="font-size: 100px; color: expresゝion((title='XSSed'),'red')">B</p>
18987 <p style="font-size: 100px; color: expresーion((title='XSSed'),'red')">C</p>
18988 <p style="font-size: 100px; color: expresヽion((title='XSSed'),'red')">D</p>
18989 <p style="font-size: 100px; color: expresﹽion((title='XSSed'),'red')">E</p>
18990 <p style="font-size: 100px; color: expresﹼion((title='XSSed'),'red')">F</p>
18991 <p style="font-size: 100px; color: expresーion((title='XSSed'),'red')">G</p>
18993 <p style="/* insecure input */">A</p>
18994 <p style="/* insecure input */">B</p>
18995 <p style="/* insecure input */">C</p>
18996 <p style="/* insecure input */">D</p>
18997 <p style="/* insecure input */">E</p>
18998 <p style="/* insecure input */">F</p>
18999 <p style="/* insecure input */">G</p>
19002 <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>
19003 <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>
19004 <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>
19005 <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>
19006 <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>
19007 <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>
19008 <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>
19012 Table attribute legitimate extension
19015 !+ style="<nowiki>color:blue</nowiki>"|status
19020 <th style="color:blue">status
19026 Table attribute safety
19029 !+ style="<nowiki>border-width:expression(0+alert(document.cookie))</nowiki>"|status
19034 <th style="/* insecure input */">status
19040 CSS line continuation 1
19042 <div style="background-image: u\ rl(test.jpg);"></div>
19044 <div style="/* insecure input */"></div>
19049 CSS line continuation 2
19051 <div style="background-image: u\ rl(test.jpg); "></div>
19053 <div style="/* invalid control char */"></div>
19064 Expansion of multi-line templates in attribute values (T8255)
19066 <div style="background: {{identity|#00FF00}}">-</div>
19068 <div style="background: #00FF00">-</div>
19073 Expansion of multi-line templates in attribute values (T8255 sanity check)
19075 <div style="background:
19078 <div style="background: #00FF00">-</div>
19081 <div style="background:
19086 Expansion of multi-line templates in attribute values (T8255 sanity check 2)
19088 <div style="background: #00FF00">-</div>
19090 <div style="background: #00FF00">-</div>
19095 Tags which are hidden from tidiers cannot pass through the Sanitizer
19097 <mw:toc><script>alert();</script></mw:toc>
19099 <p><mw:toc><script>alert();</script></mw:toc>
19104 ### Parser hooks (see tests/parser/ParserTestParserHook.php for the <tag> extension)
19108 Parser hook: empty input
19119 <pre typeof="mw:Extension/tag" data-mw='{"name":"tag","attrs":{},"body":{"extsrc":""}}' data-parsoid='{}' about="#mwt2"></pre>
19122 ## Don't expect parsoid to rt this form.
19124 Parser hook: empty input using terminated empty elements
19126 parsoid=wt2html,html2html
19137 <pre typeof="mw:Extension/tag" data-mw='{"name":"tag","attrs":{}}' data-parsoid='{}' about="#mwt2"></pre>
19141 Parser hook: empty input using terminated empty elements (space before)
19152 <pre typeof="mw:Extension/tag" data-mw='{"name":"tag","attrs":{}}' data-parsoid='{}' about="#mwt2"></pre>
19156 Parser hook: basic input
19167 <pre typeof="mw:Extension/tag" data-mw='{"name":"tag","attrs":{},"body":{"extsrc":"input"}}' data-parsoid='{}' about="#mwt2"></pre>
19170 ## Don't expect parsoid to rt this form.
19172 Parser hook: case insensitive
19174 parsoid=wt2html,html2html
19185 <pre typeof="mw:Extension/tag" data-mw='{"name":"tag","attrs":{},"body":{"extsrc":"input"}}' data-parsoid='{}' about="#mwt2"></pre>
19188 ## Don't expect parsoid to rt this form.
19190 Parser hook: case insensitive, redux
19192 parsoid=wt2html,html2html
19203 <pre typeof="mw:Extension/tag" data-mw='{"name":"tag","attrs":{},"body":{"extsrc":"input"}}' data-parsoid='{}' about="#mwt2"></pre>
19207 Parser hook: nested tags
19211 <tag><tag></tag></tag>
19223 </tag></pre><p></tag>
19226 <pre typeof="mw:Extension/tag" about="#mwt2" data-mw='{"name":"tag","attrs":{},"body":{"extsrc":"<tag>"}}'></pre><p></tag></p>
19230 Parser hook: basic arguments
19232 <tag width="200" height="100" depth="50" square=""></tag>
19245 <pre typeof="mw:Extension/tag" data-mw='{"name":"tag","attrs":{"width":"200","height":"100","depth":"50","square":""},"body":{"extsrc":""}}' data-parsoid='{}' about="#mwt2"></pre>
19248 ## Don't expect parsoid to rt this form.
19250 Parser hook: basic arguments, variations
19252 parsoid=wt2html,html2html
19254 <tag width=200 height = "100" depth = '50' square></tag>
19267 <pre typeof="mw:Extension/tag" data-mw='{"name":"tag","attrs":{"width":"200","height":"100","depth":"50","square":""},"body":{"extsrc":""}}' data-parsoid='{}' about="#mwt2"></pre>
19271 Parser hook: argument containing a forward slash (T7344)
19273 <tag filename="/tmp/bla"></tag>
19278 'filename' => '/tmp/bla',
19283 <pre typeof="mw:Extension/tag" data-mw='{"name":"tag","attrs":{"filename":"/tmp/bla"},"body":{"extsrc":""}}' data-parsoid='{}' about="#mwt2"></pre>
19286 ## Don't expect parsoid to rt this form.
19288 Parser hook: empty input using terminated empty elements (T4374)
19290 parsoid=wt2html,html2html
19302 <pre typeof="mw:Extension/tag" about="#mwt2" data-mw='{"name":"tag","attrs":{"foo":"bar"}}'></pre><p>text</p>
19305 ## </tag> should be output literally since there is no matching tag that begins it
19306 ## Don't expect parsoid to rt this form.
19308 Parser hook: basic arguments using terminated empty elements (T4374)
19312 <tag width=200 height = "100" depth = '50' square/>
19329 <pre typeof="mw:Extension/tag" data-mw='{"name":"tag","attrs":{"width":"200","height":"100","depth":"50","square":""}}' about="#mwt2"></pre><p>other stuff
19333 ## Don't expect parsoid to rt this form.
19335 Parser hook: Don't allow unclosed extension tags
19341 this is a '''test'''
19343 <p>test <tag>123
19344 </p><p>this is a <b>test</b>
19347 <p>test <tag>123</p>
19349 <p>this is a <b>test</b></p>
19353 Parser hook: horizontal rule inside extension tag that outputs <pre>
19374 ### (see tests/parser/ParserTestParserHook.php for the <statictag> extension)
19378 Parser hook: static parser hook not inside a comment
19380 <statictag>hello, world</statictag>
19382 <statictag action="flush" />
19388 <p><span typeof="mw:Extension/statictag" data-mw='{"name":"statictag","attrs":{},"body":{"extsrc":"hello, world"}}' about="#mwt2"></span></p>
19389 <p><span typeof="mw:Extension/statictag" data-mw='{"name":"statictag","attrs":{"action":"flush"}}' about="#mwt4">hello, world</span></p>
19393 Parser hook: static parser hook inside a comment
19395 <!-- <statictag>hello, world</statictag> -->
19396 <statictag action="flush" />
19401 <!-- <statictag>hello, world</statictag> -->
19402 <p><span typeof='mw:Extension/statictag' data-mw='{"name":"statictag","attrs":{"action":"flush"}}' data-parsoid='{}' about='#mwt2'></span></p>
19405 # Nested template calls; this case was broken by Parser.php rev 1.506,
19409 Template:One-parameter
19411 (My parameter is: {{{1}}})
19415 Template:Map-one-parameter
19417 {{{{{1}}}|{{{2}}}}}
19421 Nested template calls
19423 {{Map-one-parameter|One-parameter|param}}
19425 <p>(My parameter is: param)
19435 Sanitizer: Closing of open tags
19437 <s></s><table></table>
19439 <p><s></s></p><table></table>
19441 <p><s data-parsoid='{"stx":"html"}'></s></p><table data-parsoid='{"stx":"html"}'></table>
19445 Sanitizer: Closing of open but not closed tags
19454 Sanitizer: Closing of closed but not open tags
19460 <p class="mw-empty-elt">
19465 Sanitizer: Closing of closed but not open table tags
19469 Table not started</td></tr></table>
19471 <p>Table not started
19476 Sanitizer: Escaping of spaces, multibyte characters, colons & other stuff in id=""
19478 title=[[Main Page]]
19480 wgFragmentMode=[ 'html5', 'legacy' ]
19482 <span id="æ: v">byte</span>[[#æ: v|backlink]]
19484 <p><span id="æ:_v">byte</span><a href="#æ:_v">backlink</a>
19487 <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>
19491 Sanitizer: Escaping of spaces, multibyte characters, colons & other stuff in id="" (legacy)
19493 wgFragmentMode=[ 'legacy' ]
19495 <span id="æ: v">byte</span>[[#æ: v|backlink]]
19497 <p><span id=".C3.A6:_v">byte</span><a href="#.C3.A6:_v">backlink</a>
19501 # In HTML5, the restrictions are that id must contain at least one character,
19502 # and must not contain any space characters.
19504 Sanitizer: Validating the contents of the id attribute (T6515)
19508 <br id="" /><br id="a space" />
19513 # In HTML5, id must be unique amongst all the ids in the element's home subtree.
19515 Sanitizer: Validating id attribute uniqueness (T6515, T8301)
19519 <br id="foo" /><br id="foo" />
19521 Something need to be done. foo-2 ?
19525 Sanitizer: Validating that <meta> and <link> work, but only for Microdata
19528 <meta itemprop="hello" content="world">
19529 <meta http-equiv="refresh" content="5">
19530 <meta itemprop="hello" http-equiv="refresh" content="5">
19531 <link itemprop="hello" href="{{SERVER}}">
19532 <link rel="stylesheet" href="{{SERVER}}">
19533 <link rel="stylesheet" itemprop="hello" href="{{SERVER}}">
19537 <p> <meta itemprop="hello" content="world" />
19538 <meta http-equiv="refresh" content="5">
19539 <meta itemprop="hello" content="5" />
19540 <link itemprop="hello" href="http://example.org" />
19541 <link rel="stylesheet" href="<a rel="nofollow" class="external free" href="http://example.org">http://example.org</a>">
19542 <link itemprop="hello" href="http://example.org" />
19549 Sanitizer: Strip comments from CSS attributes
19551 parsoid=wt2html,wt2wt
19553 <span style="margin:/*negate mbox-text padding */-0.125em -0.45em; /*rainbow*/rgba(255, 0, 0, 0.3)">2013</span>
19555 <p><span style="margin: -0.125em -0.45em; rgba(255, 0, 0, 0.3)">2013</span>
19558 <p><span style="margin: -0.125em -0.45em; rgba(255, 0, 0, 0.3)">2013</span></p>
19562 Sanitizer: Avoid unnecessary percent encoded characters in interwiki links
19564 [[meatball:Soft"Security]]
19566 <p><a href="http://www.usemod.com/cgi-bin/mb.pl?Soft%22Security" class="extiw" title="meatball:Soft"Security">meatball:Soft"Security</a>
19569 <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>
19573 Sanitizer: angle brackets are invalid, even in interwiki links (T182338)
19575 [[meatball:Foo<Bar]]
19576 [[meatball:Foo>Bar]]
19577 [[meatball:Foo<bar]]
19578 [[meatball:Foo>bar]]
19580 <p>[[meatball:Foo<Bar]]
19581 [[meatball:Foo>Bar]]
19582 [[meatball:Foo<bar]]
19583 [[meatball:Foo>bar]]
19586 <p>[[meatball:Foo<Bar]]
19587 [[meatball:Foo>Bar]]
19588 [[meatball:Foo<span typeof="mw:Entity" data-parsoid='{"src":"&lt;","srcContent":"<"}'><</span>bar]]
19589 [[meatball:Foo<span typeof="mw:Entity" data-parsoid='{"src":"&gt;","srcContent":">"}'>></span>bar]]</p>
19593 Language converter: output gets cut off unexpectedly (T7757)
19597 this bit is safe: }-
19599 but if we add a conversion instance: -{zh-cn:xxx;zh-tw:yyy}-
19601 then we get cut off here: }-
19603 all additional text is vanished
19605 <p>this bit is safe: }-
19606 </p><p>but if we add a conversion instance: xxx
19607 </p><p>then we get cut off here: }-
19608 </p><p>all additional text is vanished
19611 <p>this bit is safe: }-</p>
19612 <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>
19613 <p>then we get cut off here: }-</p>
19614 <p>all additional text is vanished</p>
19618 Language converter glossary rules inside attributes (T119158)
19620 language=sr variant=sr-el
19622 -{H|foAjrjvi=>sr-el:" onload="alert(1)" data-foo="}-
19624 [[File:Foobar.jpg|alt=-{}-foAjrjvi-{}-]]
19627 </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" decoding="async" width="1941" height="220" /></a>
19630 <p><meta typeof="mw:LanguageVariant" data-mw-variant='{"add":true,"oneway":[{"f":"foAjrjvi","l":"sr-el","t":"\" onload=\"alert(1)\" data-foo=\""}]}'/></p>
19632 <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>
19636 Self closed html pairs (T7487)
19638 <center><font id="bug" />Centered text</center>
19639 <div><font id="bug2" />In div text</div>
19641 <center><font id="bug"></font>Centered text</center>
19642 <div><font id="bug2"></font>In div text</div>
19646 Punctuation: nbsp before exclamation
19650 <p>C'est grave !
19655 Punctuation: CSS !important (T13874)
19657 <div style="width:50% !important">important</div>
19659 <div style="width:50% !important">important</div>
19664 Punctuation: CSS ! important (T13874; with space after)
19666 <div style="width:50% ! important">important</div>
19668 <div style="width:50% ! important">important</div>
19673 HTML bullet list, closed tags (T7497)
19686 <ul data-parsoid='{"stx":"html"}'>
19687 <li data-parsoid='{"stx":"html"}'>One</li>
19688 <li data-parsoid='{"stx":"html"}'>Two</li>
19694 HTML bullet list, unclosed tags (T7497)
19706 <ul data-parsoid='{"stx":"html"}'>
19707 <li data-parsoid='{"stx":"html","autoInsertedEnd":true}'>One</li>
19708 <li data-parsoid='{"stx":"html","autoInsertedEnd":true}'>Two</li>
19714 HTML ordered list, closed tags (T7497)
19727 <ol data-parsoid='{"stx":"html"}'>
19728 <li data-parsoid='{"stx":"html"}'>One</li>
19729 <li data-parsoid='{"stx":"html"}'>Two</li>
19735 HTML ordered list, unclosed tags (T7497)
19748 <ol data-parsoid='{"stx":"html"}'>
19749 <li data-parsoid='{"stx":"html","autoInsertedEnd":true}'>One</li>
19750 <li data-parsoid='{"stx":"html","autoInsertedEnd":true}'>Two</li>
19756 HTML nested bullet list, closed tags (T7497)
19779 <ul data-parsoid='{"stx":"html"}'>
19780 <li data-parsoid='{"stx":"html"}'>One</li>
19781 <li data-parsoid='{"stx":"html"}'>Two:
19782 <ul data-parsoid='{"stx":"html"}'>
19783 <li data-parsoid='{"stx":"html"}'>Sub-one</li>
19784 <li data-parsoid='{"stx":"html"}'>Sub-two</li>
19791 HTML nested bullet list, open tags (T7497)
19813 HTML nested ordered list, closed tags (T7497)
19838 HTML nested ordered list, open tags (T7497)
19875 HTML ordered list item with parameters oddity
19877 <ol><li id="fragment">One</li>
19880 <ol><li id="fragment">One</li>
19885 # parsoid doesn't explicitly mark autonumbered links, see T55505
19887 T7918: autonumbering
19889 [http://first/] [http://second] [ftp://ftp]
19893 [mailto:enclosed@mail.tld With target]
19895 [mailto:enclosed@mail.tld]
19897 mailto:inline@mail.tld
19899 <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>
19900 </p><p><a rel="nofollow" class="external free" href="ftp://inlineftp">ftp://inlineftp</a>
19901 </p><p><a rel="nofollow" class="external text" href="mailto:enclosed@mail.tld">With target</a>
19902 </p><p><a rel="nofollow" class="external autonumber" href="mailto:enclosed@mail.tld">[4]</a>
19903 </p><p><a rel="nofollow" class="external free" href="mailto:inline@mail.tld">mailto:inline@mail.tld</a>
19906 <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>
19907 <p><a rel="mw:ExtLink" class="external free" href="ftp://inlineftp">ftp://inlineftp</a></p>
19908 <p><a rel="mw:ExtLink" class="external text" href="mailto:enclosed@mail.tld">With target</a></p>
19909 <p><a rel="mw:ExtLink" class="external autonumber" href="mailto:enclosed@mail.tld"></a></p>
19910 <p><a rel="mw:ExtLink" class="external free" href="mailto:inline@mail.tld">mailto:inline@mail.tld</a></p>
19915 # Security and HTML correctness
19916 # From Nick Jenkins' fuzz testing
19920 Fuzz testing: Parser13
19934 # Note that Parsoid output differs from the PHP parser here: the PHP
19935 # parser breaks the URL for the magic word, while in Parsoid the URL
19936 # production takes precedence.
19938 Fuzz testing: Parser14
19943 <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>
19944 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>
19946 <li class="toclevel-1 tocsection-1"><a href="#onmouseover.3D"><span class="tocnumber">1</span> <span class="toctext">onmouseover=</span></a></li>
19952 <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>
19953 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>
19955 <li class="toclevel-1 tocsection-1"><a href="#onmouseover.3D"><span class="tocnumber">1</span> <span class="toctext">onmouseover=</span></a></li>
19959 <h2 id="onmouseover="><span id="onmouseover.3D" typeof="mw:FallbackId"></span>onmouseover=</h2>
19960 <p><a rel="mw:ExtLink" class="external free" href="http://__TOC__" data-parsoid='{"stx":"url"}'>http://__TOC__</a></p>
19964 Fuzz testing: Parser14-table
19966 parsoid=wt2html,html2html
19971 <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>
19972 <table style="__TOC__">
19977 <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>
19978 <table style="__TOC__">
19979 <tbody><tr><td></td></tr>
19983 <table style="__TOC__"></table>
19986 # Known to produce bogus xml (extra </td>)
19987 # Don't add the html/php section since it generates broken HTML
19989 Fuzz testing: Parser16
20006 Fuzz testing: Parser21
20009 !irc://{{ftp://a" onmouseover="alert('hello world');"
20014 <th><a rel="nofollow" class="external free" href="irc://{{ftp://a">irc://{{ftp://a</a>" onmouseover="alert('hello world');"
20024 Fuzz testing: Parser22
20026 http://===r:::https://b
20030 <p><a rel="nofollow" class="external free" href="http://===r:::https://b">http://===r:::https://b</a>
20038 ## Remex doesn't account for fostered content.
20039 ## Known to produce bad XML for now
20041 Fuzz testing: Parser24
20048 | {{{{SSSll!!!!!!!VVVV)]]][[Special:*xxxxxxx--><noinclude>}}}} >
20049 <br style="onmouseover='alert(document.cookie);' " />
20051 MOVE YOUR MOUSE CURSOR OVER THIS TEXT
20056 <u class="|">}}}} >
20057 <br style="onmouseover='alert(document.cookie);'" />
20059 MOVE YOUR MOUSE CURSOR OVER THIS TEXT
20069 <u class="|">}}}} >
20070 <br style="onmouseover='alert(document.cookie);'" />
20072 MOVE YOUR MOUSE CURSOR OVER THIS TEXT
20073 </u><table><tbody><tr>
20077 </tbody></table><p><u class="|">
20080 <p data-parsoid='{"fostered":true,"autoInsertedEnd":true,"autoInsertedStart":true}'>
20082 <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>"}'/>}}}} >
20083 <br style="onmouseover='alert(document.cookie);' " data-parsoid='{"stx":"html","selfClose":true}'/>
20085 MOVE YOUR MOUSE CURSOR OVER THIS TEXT</u></p>
20086 <table data-parsoid='{"autoInsertedEnd":true}'><tbody><tr data-parsoid='{"autoInsertedStart":true}'><td></td></tr></tbody></table>
20089 # Note: the current result listed for this is not what the original one was,
20090 # but the original bug was JavaScript injection, which is fixed in any case.
20091 # It's not clear that the original result listed was any more correct than the
20092 # current one. Original result:
20095 # <li class="||">
20096 # }}}blah" onmouseover="alert('hello world');" align="left"<b>MOVE MOUSE CURSOR OVER HERE</b>
20098 Fuzz testing: Parser25 (T8055)
20104 }}}blah" onmouseover="alert('hello world');" align="left"'''MOVE MOUSE CURSOR OVER HERE
20106 <p><LI CLASS=blah" onmouseover="alert('hello world');" align="left"<b>MOVE MOUSE CURSOR OVER HERE</b>
20109 <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"]}'>
20110 </span><p about="#mwt1"><LI CLASS=blah" onmouseover="alert('hello world');" align="left"<b>MOVE MOUSE CURSOR OVER HERE</b></p>
20114 Fuzz testing: URL adjacent extension (with space, clean)
20116 http://example.com <nowiki>junk</nowiki>
20118 <p><a rel="nofollow" class="external free" href="http://example.com">http://example.com</a> junk
20121 <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>
20125 Fuzz testing: URL adjacent extension (no space, dirty; nowiki)
20127 http://example.com<nowiki>junk</nowiki>
20129 <p><a rel="nofollow" class="external free" href="http://example.com">http://example.com</a>junk
20132 <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>
20136 Fuzz testing: URL adjacent extension (no space, dirty; pre)
20138 http://example.com<pre>junk</pre>
20140 <a rel="nofollow" class="external free" href="http://example.com">http://example.com</a><pre>junk</pre>
20143 <p><a rel="nofollow" class="external free" href="http://example.com">http://example.com</a></p><pre>junk</pre>
20145 <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>
20149 Fuzz testing: image with bogus manual thumbnail
20151 [[Image:foobar.jpg|thumbnail= ]]
20153 <div class="thumb tright"><div class="thumbinner" style="width:182px;">Error creating thumbnail: <div class="thumbcaption"></div></div></div>
20156 <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>
20159 # Parsoid will emit the newline literally in wt2wt; see next test case.
20161 Fuzz testing: encoded newline in generated HTML replacements (T8577)
20165 <pre dir=" "></pre>
20167 <pre dir=" "></pre>
20171 " typeof="mw:Extension/pre" about="#mwt2"data-mw='{"name":"pre","attrs":{"dir":"\n"},"body":{"extsrc":""}}'></pre>
20175 Fuzz testing: encoded newline in generated HTML replacements, html2wt (T8577)
20179 <pre typeof="mw:Extension/pre" about="#mwt2" dir="
20180 " data-mw='{"name":"pre","attrs":{"dir":"\n"},"body":{"extsrc":""}}'></pre>
20190 Templates in extension attributes are not expanded
20192 <pre dir="{{echo|ltr}}"></pre>
20194 <pre dir="{{echo|ltr}}"></pre>
20197 <pre dir="{{echo|ltr}}" typeof="mw:Extension/pre" about="#mwt2" data-mw='{"name":"pre","attrs":{"dir":"{{echo|ltr}}"},"body":{"extsrc":""}}'></pre>
20201 Parsing optional HTML elements (T8171)
20206 <td> Some tabular data</td>
20207 <td> More tabular data ...
20208 <td> And yet som tabular data</td>
20214 <td> Some tabular data</td>
20215 <td> More tabular data ...
20216 </td><td> And yet som tabular data</td>
20223 Correct handling of <td>, <tr> (T8171)
20228 <td> Some tabular data</td>
20229 <td> More tabular data ...</td>
20230 <td> And yet som tabular data</td>
20236 <td> Some tabular data</td>
20237 <td> More tabular data ...</td>
20238 <td> And yet som tabular data</td>
20246 Parsing crashing regression (fr:JavaScript)
20250 <p></body></x>
20255 Inline wiki vs wiki block nesting
20261 <p><b>Bold paragraph</b>
20262 </p><p>New wiki paragraph
20266 # FIXME: The current php output is documented
20267 # and desired output is the parsoid target.
20269 Inline HTML vs wiki block nesting
20275 <p><b>Bold paragraph
20276 </p><p>New wiki paragraph</b>
20279 <p><b>Bold paragraph
20280 </b></p><p><b>New wiki paragraph
20283 <p><b>Bold paragraph</b>
20284 </p><p>New wiki paragraph
20288 # Original result was this:
20289 # <p><b>bold</b><b>bold<i>bolditalics</i></b>
20291 # While that might be marginally more intuitive, maybe, the six-apostrophe
20292 # construct is clearly pathological and the result stated here (which is what
20293 # the parser actually does) is about as reasonable as anything.
20295 Mixing markup for italics and bold
20298 '''bold''''''bold''bolditalics'''''
20300 <p>'<i>bold'</i><b>bold<i>bolditalics</i></b>
20308 Article for special page transclusion test
20312 Special page transclusion
20315 {{Special:Prefixindex/Xyzzyx}}
20317 <ul class="mw-prefixindex-list"><li><a href="/wiki/Xyzzyx" title="Xyzzyx">Xyzzyx</a></li>
20323 Special page transclusion twice (T7021)
20326 {{Special:Prefixindex/Xyzzyx}}
20327 {{Special:Prefixindex/Xyzzyx}}
20329 <ul class="mw-prefixindex-list"><li><a href="/wiki/Xyzzyx" title="Xyzzyx">Xyzzyx</a></li>
20331 <ul class="mw-prefixindex-list"><li><a href="/wiki/Xyzzyx" title="Xyzzyx">Xyzzyx</a></li>
20337 Transclusion of default MediaWiki message
20339 {{MediaWiki:Mainpage}}
20346 Transclusion of nonexistent MediaWiki message
20348 {{MediaWiki:Mainpagexxx}}
20350 <p><a href="/index.php?title=MediaWiki:Mainpagexxx&action=edit&redlink=1" class="new" title="MediaWiki:Mainpagexxx (page does not exist)">MediaWiki:Mainpagexxx</a>
20355 Transclusion of MediaWiki message with underscore
20357 {{MediaWiki:history_short}}
20364 Transclusion of MediaWiki message with space
20366 {{MediaWiki:history short}}
20373 Invalid header with following text
20383 Section extraction test (section 0)
20403 Section extraction test (section 1)
20425 Section extraction test (section 2)
20446 Section extraction test (section 3)
20466 Section extraction test (section 4)
20490 Section extraction test (section 5)
20510 Section extraction test (section 6)
20531 Section extraction test (section 7)
20551 Section extraction test (section 8)
20571 Section extraction test (section 9)
20592 Section extraction test (section 10)
20612 Section extraction test (nonexistent section 11)
20631 Section extraction test with bogus heading (section 1)
20636 ==bogus== not a legal section
20640 ==bogus== not a legal section
20644 Section extraction test with bogus heading (section 2)
20649 ==bogus== not a legal section
20656 Section extraction test with comment after heading (section 1)
20668 Section extraction test with comment after heading (section 2)
20680 Section extraction test with bogus <nowiki> heading (section 1)
20685 ==bogus== <nowiki>not a legal section</nowiki>
20689 ==bogus== <nowiki>not a legal section</nowiki>
20693 Section extraction test with bogus <nowiki> heading (section 2)
20698 ==bogus== <nowiki>not a legal section</nowiki>
20704 # Formerly testing for T4587, now resolved by the use of unmarked sections
20705 # instead of respecting commented sections
20707 Section extraction prefixed by comment (section 1)
20718 Section extraction prefixed by comment (section 2)
20728 # Formerly testing for T4607, now resolved by the use of unmarked sections
20729 # instead of respecting HTML-style headings
20731 Section extraction, mixed wiki and html (section 1)
20747 Section extraction, mixed wiki and html (section 2)
20763 # Formerly testing for T5342
20765 Section extraction, heading surrounded by <noinclude>
20769 <noinclude>==unmarked==</noinclude>
20775 # Test behavior of T21910
20777 Sectiion with all-equals
20782 The line above must have a trailing space
20785 But just in case it doesn't...
20789 But just in case it doesn't...
20793 Section replacement test (section 0)
20824 Section replacement test (section 1)
20853 Section replacement test (section 2)
20883 Section replacement test (section 3)
20914 Section replacement test (section 4)
20941 Section replacement test (section 5)
20972 Section replacement test (section 6)
21002 Section replacement test (section 7)
21033 Section replacement test (section 8)
21064 Section replacement test (section 9)
21093 Section replacement test (section 10)
21123 Section replacement test with initial whitespace (T15728)
21127 Preformatted initial line
21131 Preformatted initial line
21138 Section extraction, heading followed by pre with 20 spaces (T8398)
21150 Section extraction, heading followed by pre with 19 spaces (T8398 sanity check)
21163 Section extraction, <pre> around bogus header (T12309)
21180 Section replacement, <pre> around bogus header (T12309)
21201 Handling of 
 in URLs
21205 <ul><li><a rel="nofollow" class="external free" href="irc://%0Aa">irc://%0Aa</a></li></ul>
21208 <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>
21212 Handling of %0A in URLs
21216 <ul><li><a rel="nofollow" class="external free" href="irc://%0Aa">irc://%0Aa</a></li></ul>
21219 <ul><li><a rel="mw:ExtLink" class="external free" href="irc://%0Aa">irc://%0Aa</a></li></ul>
21222 # The PHP parser strips the empty tags out for giggles; parsoid doesn't.
21224 5 quotes, code coverage +1 line
21231 <p><b><i></i></b></p>
21234 # same html as previous, but wikitext adjusted to match parsoid html2wt
21235 # note that wt2html and html2html will put the <i> before the <b>
21237 5 quotes, code coverage +1 line w/ nowiki (1)
21239 parsoid=wt2wt,html2wt
21241 '''''<nowiki/>'''''
21246 <p><b><i></i></b></p>
21249 # same as previous, just swapping the <i> and <b>
21251 5 quotes, code coverage +1 line w/ nowiki (2)
21253 '''''<nowiki/>'''''
21258 <p><i><b></b></i></p>
21262 Special:Search page linking.
21266 <p><a href="/wiki/Special:Search" title="Special:Search">Special:Search</a>
21271 {{!}} is a magic word
21273 {{!}} is a magic word there and {{!}} is still a magic word here
21274 | is not a magic word here but {{!}} is still a magic word here
21276 <p>| is a magic word there and | is still a magic word here
21277 | is not a magic word here but | is still a magic word here
21280 <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
21281 | 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>
21287 title=[[Parser test]]
21301 *{{SUBJECTPAGENAME}}
21302 *{{SUBJECTPAGENAMEE}}
21305 *{{NAMESPACENUMBER}}
21310 *{{Dynamic|{{NUMBEROFUSERS}}|{{NUMBEROFPAGES}}|{{CURRENTVERSION}}|{{CONTENTLANGUAGE}}|{{DIRECTIONMARK}}|{{CURRENTTIMESTAMP}}|{{NUMBEROFARTICLES}}}}
21312 <ul><li>Parser test</li>
21313 <li>Parser_test</li>
21314 <li>Parser test</li>
21315 <li>Parser_test</li>
21316 <li>Parser test</li>
21317 <li>Parser_test</li>
21318 <li>Parser test</li>
21319 <li>Parser_test</li>
21320 <li>Parser test</li>
21321 <li>Parser_test</li>
21322 <li>Talk:Parser test</li>
21323 <li>Talk:Parser_test</li>
21324 <li>Parser test</li>
21325 <li>Parser_test</li>
21333 <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>
21336 ### Note: Above tests excludes the "{{NUMBEROFADMINS}}" magic word because it generates a MySQL error when included.
21339 Gallery with valid attributes
21341 <gallery type="123" summary="345">
21342 File:File:Foobar.jpg
21345 <ul class="gallery mw-gallery-traditional" type="123">
21346 <li class="gallerybox" style="width: 155px"><div style="width: 155px">
21347 <div class="thumb" style="height: 150px;">File:Foobar.jpg</div>
21348 <div class="gallerytext">
21354 <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"}}'>
21355 <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>
21359 ## Parsoid thinks the "centre" here is a property, not a caption.
21364 "modes": ["wt2html"],
21365 "nativeGallery": true
21373 image4 |300px| centre
21374 image5.svg| http://///////
21379 <ul class="gallery mw-gallery-traditional">
21380 <li class="gallerybox" style="width: 155px"><div style="width: 155px">
21381 <div class="thumb" style="height: 150px;">Image1.png</div>
21382 <div class="gallerytext">
21385 <li class="gallerybox" style="width: 155px"><div style="width: 155px">
21386 <div class="thumb" style="height: 150px;">Image2.gif</div>
21387 <div class="gallerytext">
21390 <li class="gallerybox" style="width: 155px"><div style="width: 155px">
21391 <div class="thumb" style="height: 150px;">Image3</div>
21392 <div class="gallerytext">
21395 <li class="gallerybox" style="width: 155px"><div style="width: 155px">
21396 <div class="thumb" style="height: 150px;">Image4</div>
21397 <div class="gallerytext">
21402 <li class="gallerybox" style="width: 155px"><div style="width: 155px">
21403 <div class="thumb" style="height: 150px;">Image5.svg</div>
21404 <div class="gallerytext">
21405 <p><a rel="nofollow" class="external free" href="http://///////">http://///////</a>
21409 <li class="gallerybox" style="width: 155px"><div style="width: 155px">
21410 <div class="thumb" style="height: 150px;">* image6</div>
21411 <div class="gallerytext">
21417 <ul class="gallery mw-gallery-traditional" typeof="mw:Extension/gallery" about="#mwt3" data-mw='{"name":"gallery","attrs":{},"body":{}}'>
21418 <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>
21419 <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>
21420 <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>
21421 <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>
21422 <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>
21423 <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>
21428 Gallery (with options, html)
21431 "modes": ["wt2html", "html2html"],
21432 "nativeGallery": true
21435 <gallery widths="70px" heights="40px" perrow="2" caption="Foo [[Main Page]]">
21436 File:Nonexistent.jpg|caption
21437 File:Nonexistent.jpg
21438 image:foobar.jpg|some '''caption''' [[Main Page]]
21440 image:foobar.jpg|Blabla|alt=This is a foo-bar.|blabla.
21443 <ul class="gallery mw-gallery-traditional" style="max-width: 226px;_width: 226px;">
21444 <li class='gallerycaption'>Foo <a href="/wiki/Main_Page" title="Main Page">Main Page</a></li>
21445 <li class="gallerybox" style="width: 105px"><div style="width: 105px">
21446 <div class="thumb" style="height: 70px;">Nonexistent.jpg</div>
21447 <div class="gallerytext">
21452 <li class="gallerybox" style="width: 105px"><div style="width: 105px">
21453 <div class="thumb" style="height: 70px;">Nonexistent.jpg</div>
21454 <div class="gallerytext">
21457 <li class="gallerybox" style="width: 105px"><div style="width: 105px">
21458 <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" decoding="async" 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>
21459 <div class="gallerytext">
21460 <p>some <b>caption</b> <a href="/wiki/Main_Page" title="Main Page">Main Page</a>
21464 <li class="gallerybox" style="width: 105px"><div style="width: 105px">
21465 <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" decoding="async" 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>
21466 <div class="gallerytext">
21469 <li class="gallerybox" style="width: 105px"><div style="width: 105px">
21470 <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" decoding="async" 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>
21471 <div class="gallerytext">
21479 <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":{}}'>
21480 <li class="gallerycaption">Foo <a rel="mw:WikiLink" href="./Main_Page" title="Main Page">Main Page</a></li>
21481 <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>
21482 <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>
21483 <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>
21484 <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>
21485 <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>
21490 Gallery (with options, extsrc)
21493 "nativeGallery": false
21496 <gallery widths="70px" heights="40px" perrow="2" caption="Foo [[Main Page]]">
21497 File:Nonexistent.jpg|caption
21498 File:Nonexistent.jpg
21499 image:foobar.jpg|some '''caption''' [[Main Page]]
21501 image:foobar.jpg|Blabla|alt=This is a foo-bar.|blabla.
21504 <ul class="gallery mw-gallery-traditional" style="max-width: 226px;_width: 226px;">
21505 <li class='gallerycaption'>Foo <a href="/wiki/Main_Page" title="Main Page">Main Page</a></li>
21506 <li class="gallerybox" style="width: 105px"><div style="width: 105px">
21507 <div class="thumb" style="height: 70px;">Nonexistent.jpg</div>
21508 <div class="gallerytext">
21513 <li class="gallerybox" style="width: 105px"><div style="width: 105px">
21514 <div class="thumb" style="height: 70px;">Nonexistent.jpg</div>
21515 <div class="gallerytext">
21518 <li class="gallerybox" style="width: 105px"><div style="width: 105px">
21519 <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" decoding="async" 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>
21520 <div class="gallerytext">
21521 <p>some <b>caption</b> <a href="/wiki/Main_Page" title="Main Page">Main Page</a>
21525 <li class="gallerybox" style="width: 105px"><div style="width: 105px">
21526 <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" decoding="async" 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>
21527 <div class="gallerytext">
21530 <li class="gallerybox" style="width: 105px"><div style="width: 105px">
21531 <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" decoding="async" 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>
21532 <div class="gallerytext">
21540 <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"}}'>
21541 <li class="gallerycaption">Foo <a rel="mw:WikiLink" href="./Main_Page" title="Main Page">Main Page</a></li>
21542 <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>
21543 <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>
21544 <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>
21545 <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>
21546 <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>
21551 Gallery (without px units)
21553 <gallery widths="70" heights="40">
21557 <ul class="gallery mw-gallery-traditional">
21558 <li class="gallerybox" style="width: 105px"><div style="width: 105px">
21559 <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" decoding="async" 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>
21560 <div class="gallerytext">
21566 <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"}}'>
21567 <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>
21572 Gallery (with invalid units)
21574 <gallery widths="70em" heights="40em">
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/File:Foobar.jpg" class="image"><img alt="Foobar.jpg" src="http://example.com/images/thumb/3/3a/Foobar.jpg/120px-Foobar.jpg" decoding="async" 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":{"widths":"70em","heights":"40em"},"body":{"extsrc":"\nFile:Foobar.jpg\n"}}'>
21588 <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>
21593 Gallery with link that has fragment
21596 "modes": ["wt2html", "html2html"],
21597 "nativeGallery": true
21601 image:foobar.jpg|link=Main_Page
21602 image:foobar.jpg|link=Main_Page#section
21603 image:foobar.jpg|link=Main Page#section|caption
21606 <ul class="gallery mw-gallery-traditional">
21607 <li class="gallerybox" style="width: 155px"><div style="width: 155px">
21608 <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" decoding="async" 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>
21609 <div class="gallerytext">
21612 <li class="gallerybox" style="width: 155px"><div style="width: 155px">
21613 <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" decoding="async" 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>
21614 <div class="gallerytext">
21617 <li class="gallerybox" style="width: 155px"><div style="width: 155px">
21618 <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" decoding="async" 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>
21619 <div class="gallerytext">
21627 <ul class="gallery mw-gallery-traditional" typeof="mw:Extension/gallery" about="#mwt2" data-mw='{"name":"gallery","attrs":{},"body":{}}'>
21628 <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>
21629 <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>
21630 <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>
21635 Gallery with template inside caption
21638 "nativeGallery": true
21641 <gallery caption="{{echo|hi}}">
21642 File:Foobar.jpg|{{echo|ho}}
21645 <ul class="gallery mw-gallery-traditional">
21646 <li class='gallerycaption'>hi</li>
21647 <li class="gallerybox" style="width: 155px"><div style="width: 155px">
21648 <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" decoding="async" 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>
21649 <div class="gallerytext">
21657 <ul class="gallery mw-gallery-traditional" typeof="mw:Extension/gallery" about="#mwt6" data-mw='{"name":"gallery","attrs":{},"body":{}}'>
21658 <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>
21659 <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>
21664 Gallery with wikitext inside gallery caption
21666 <gallery caption="# List item
21668 Text '''bold''' [[link]] {{ns:-1}}
21670 [[File:Foobar.jpg|thumb|File in gallery caption]]">
21671 File:Foobar.jpg|Image caption
21674 <ul class="gallery mw-gallery-traditional">
21675 <li class='gallerycaption'># List item Text <b>bold</b> <a href="/index.php?title=Link&action=edit&redlink=1" class="new" title="Link (page does not exist)">link</a> Special <div class="thumb tright"><div class="thumbinner" style="width:182px;"><a href="/wiki/File:Foobar.jpg" class="image"><img alt="" src="http://example.com/images/thumb/3/3a/Foobar.jpg/180px-Foobar.jpg" decoding="async" width="180" height="20" class="thumbimage" srcset="http://example.com/images/thumb/3/3a/Foobar.jpg/270px-Foobar.jpg 1.5x, http://example.com/images/thumb/3/3a/Foobar.jpg/360px-Foobar.jpg 2x" /></a> <div class="thumbcaption"><div class="magnify"><a href="/wiki/File:Foobar.jpg" class="internal" title="Enlarge"></a></div>File in gallery caption</div></div></div></li>
21676 <li class="gallerybox" style="width: 155px"><div style="width: 155px">
21677 <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" decoding="async" 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>
21678 <div class="gallerytext">
21688 Gallery with wikitext inside caption
21691 "nativeGallery": true
21695 File:Foobar.jpg|alt=galleryalt|[[File:Foobar.jpg|alt=inneralt|20x20px|desc]]
21696 File:Foobar.jpg|alt=galleryalt|{{Test|unamedParam|alt=param}}
21699 <ul class="gallery mw-gallery-traditional">
21700 <li class="gallerybox" style="width: 155px"><div style="width: 155px">
21701 <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" decoding="async" 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>
21702 <div class="gallerytext">
21703 <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" decoding="async" 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>
21707 <li class="gallerybox" style="width: 155px"><div style="width: 155px">
21708 <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" decoding="async" 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>
21709 <div class="gallerytext">
21710 <p>This is a test template
21717 <ul class="gallery mw-gallery-traditional" typeof="mw:Extension/gallery" about="#mwt6" data-mw='{"name":"gallery","attrs":{},"body":{}}'>
21718 <li class="gallerybox" style="width: 155px;"><div class="thumb" style="width: 150px; height: 150px;"><figure-inline typeof="mw:Image"><a href="./File:Foobar.jpg"><img 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>
21719 <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>
21724 Gallery (with showfilename option)
21727 "nativeGallery": true
21730 <gallery showfilename="">
21731 File:Nonexistent.jpg|caption
21732 File:Nonexistent.jpg
21733 File:Foobar.jpg|some '''caption''' [[Main Page]]
21737 <ul class="gallery mw-gallery-traditional">
21738 <li class="gallerybox" style="width: 155px"><div style="width: 155px">
21739 <div class="thumb" style="height: 150px;">Nonexistent.jpg</div>
21740 <div class="gallerytext">
21741 <p><a href="/wiki/File:Nonexistent.jpg" class="galleryfilename galleryfilename-truncate" title="File:Nonexistent.jpg">Nonexistent.jpg</a>
21746 <li class="gallerybox" style="width: 155px"><div style="width: 155px">
21747 <div class="thumb" style="height: 150px;">Nonexistent.jpg</div>
21748 <div class="gallerytext">
21749 <p><a href="/wiki/File:Nonexistent.jpg" class="galleryfilename galleryfilename-truncate" title="File:Nonexistent.jpg">Nonexistent.jpg</a>
21753 <li class="gallerybox" style="width: 155px"><div style="width: 155px">
21754 <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" decoding="async" 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>
21755 <div class="gallerytext">
21756 <p><a href="/wiki/File:Foobar.jpg" class="galleryfilename galleryfilename-truncate" title="File:Foobar.jpg">Foobar.jpg</a>
21757 some <b>caption</b> <a href="/wiki/Main_Page" title="Main Page">Main Page</a>
21761 <li class="gallerybox" style="width: 155px"><div style="width: 155px">
21762 <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" decoding="async" 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>
21763 <div class="gallerytext">
21764 <p><a href="/wiki/File:Foobar.jpg" class="galleryfilename galleryfilename-truncate" title="File:Foobar.jpg">Foobar.jpg</a>
21771 <ul class="gallery mw-gallery-traditional" typeof="mw:Extension/gallery" about="#mwt3" data-mw='{"name":"gallery","attrs":{"showfilename":""},"body":{}}'>
21772 <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>
21773 <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>
21774 <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>
21775 <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>
21779 ## Should Parsoid be preserving these variations? See T151367
21781 Gallery (with namespace-less filenames)
21784 "modes": ["wt2html", "html2html"],
21785 "nativeGallery": true
21789 File:Nonexistent.jpg
21795 <ul class="gallery mw-gallery-traditional">
21796 <li class="gallerybox" style="width: 155px"><div style="width: 155px">
21797 <div class="thumb" style="height: 150px;">Nonexistent.jpg</div>
21798 <div class="gallerytext">
21801 <li class="gallerybox" style="width: 155px"><div style="width: 155px">
21802 <div class="thumb" style="height: 150px;">Nonexistent.jpg</div>
21803 <div class="gallerytext">
21806 <li class="gallerybox" style="width: 155px"><div style="width: 155px">
21807 <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" decoding="async" 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>
21808 <div class="gallerytext">
21811 <li class="gallerybox" style="width: 155px"><div style="width: 155px">
21812 <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" decoding="async" 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>
21813 <div class="gallerytext">
21819 <ul class="gallery mw-gallery-traditional" typeof="mw:Extension/gallery" about="#mwt2" data-mw='{"name":"gallery","attrs":{},"body":{}}'>
21820 <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>
21821 <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>
21822 <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>
21823 <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>
21828 Gallery override link with wikilink (T36852)
21831 "nativeGallery": true
21835 File:Foobar.jpg|alt=galleryalt|link=Wikilink
21838 <ul class="gallery mw-gallery-traditional">
21839 <li class="gallerybox" style="width: 155px"><div style="width: 155px">
21840 <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" decoding="async" 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>
21841 <div class="gallerytext">
21847 <ul class="gallery mw-gallery-traditional" typeof="mw:Extension/gallery" about="#mwt2" data-mw='{"name":"gallery","attrs":{},"body":{}}'>
21848 <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>
21853 Gallery override link with absolute external link (T36852)
21856 "nativeGallery": true
21860 File:Foobar.jpg|alt=galleryalt|link=http://www.example.org
21863 <ul class="gallery mw-gallery-traditional">
21864 <li class="gallerybox" style="width: 155px"><div style="width: 155px">
21865 <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" decoding="async" 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>
21866 <div class="gallerytext">
21872 <ul class="gallery mw-gallery-traditional" typeof="mw:Extension/gallery" about="#mwt2" data-mw='{"name":"gallery","attrs":{},"body":{}}'>
21873 <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>
21878 Gallery override link with absolute external link with LanguageConverter
21883 File:foobar.jpg|caption|alt=galleryalt|link=http://www.example.org
21886 <ul class="gallery mw-gallery-traditional">
21887 <li class="gallerybox" style="width: 155px"><div style="width: 155px">
21888 <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" decoding="async" 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>
21889 <div class="gallerytext">
21897 <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"}}'>
21898 <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>
21903 Gallery override link with malicious javascript (T36852)
21906 "modes": ["wt2html", "html2html"],
21907 "nativeGallery": true
21911 File:Foobar.jpg|alt=galleryalt|link=" onclick="alert('malicious javascript code!');
21914 <ul class="gallery mw-gallery-traditional">
21915 <li class="gallerybox" style="width: 155px"><div style="width: 155px">
21916 <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" decoding="async" 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>
21917 <div class="gallerytext">
21923 <ul class="gallery mw-gallery-traditional" typeof="mw:Extension/gallery" about="#mwt2" data-mw='{"name":"gallery","attrs":{},"body":{}}'>
21924 <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>
21928 # Note that parsoid uses the invalid link as a caption, PHP does not.
21930 Gallery with invalid title as link (T45964)
21933 "modes": ["wt2html", "html2html"],
21934 "nativeGallery": true
21938 File:Foobar.jpg|link=<
21941 <ul class="gallery mw-gallery-traditional">
21942 <li class="gallerybox" style="width: 155px"><div style="width: 155px">
21943 <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" decoding="async" 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>
21944 <div class="gallerytext">
21950 <ul class="gallery mw-gallery-traditional" typeof="mw:Extension/gallery" about="#mwt2" data-mw='{"name":"gallery","attrs":{},"body":{}}'>
21951 <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>
21956 Serialize gallery without attrs in data-mw
21959 "modes": ["html2wt"],
21960 "nativeGallery": true
21963 <ul class="gallery mw-gallery-traditional" typeof="mw:Extension/gallery" about="#mwt2" data-mw='{"name":"gallery","body":{}}'>
21964 <li class="gallerycaption">123</li>
21965 <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>
21968 <gallery caption="123">
21974 Gallery with class and style attributes
21977 "nativeGallery": true
21980 <gallery class="center" style="text-align: center;">
21984 <ul class="gallery mw-gallery-traditional center" style="text-align: center;">
21985 <li class="gallerybox" style="width: 155px"><div style="width: 155px">
21986 <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" decoding="async" 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>
21987 <div class="gallerytext">
21993 <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":{}}'>
21994 <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>
21999 Gallery in slideshow mode
22002 "nativeGallery": true
22005 <gallery mode="slideshow" showthumbnails="">
22009 <ul class="gallery mw-gallery-slideshow" data-showthumbnails="1">
22010 <li class="gallerybox" style="width: 155px"><div style="width: 155px">
22011 <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" decoding="async" 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>
22012 <div class="gallerytext">
22018 <ul class="gallery mw-gallery-slideshow" data-showthumbnails="1" typeof="mw:Extension/gallery" about="#mwt2" data-mw='{"name":"gallery","attrs":{"mode":"slideshow","showthumbnails":""},"body":{}}'>
22019 <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>
22024 Serialize gallery image captions on a line
22027 "modes": ["html2wt"],
22028 "nativeGallery": true
22031 <ul class="gallery mw-gallery-traditional" typeof="mw:Extension/gallery" about="#mwt2" data-mw='{"name":"gallery","attrs":{},"body":{}}'>
22032 <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>
22033 <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>
22037 File:Foobar.jpg| hi ho
22038 File:Foobar.jpg|hi<br />ho
22043 HTML Hex character encoding (spells the word "JavaScript")
22045 parsoid=wt2html,wt2wt,html2html
22047 JavaScript
22049 <p>JavaScript
22052 <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>
22056 HTML Hex character encoding bogus encoding (T28437 regression check)
22060 <p>&#xsee;&#XSEE;
22065 HTML Hex character encoding mixed case
22067 parsoid=wt2html,wt2wt,html2html
22074 <p><span typeof="mw:Entity">î</span><span typeof="mw:Entity">î</span></p>
22077 # See: https://www.w3.org/TR/html5/syntax.html#character-references
22078 # Note that U+000C (form feed) is not a valid XML character, so
22079 # it is banned even though allowed in HTML5.
22081 Illegal character references (T106578)
22086 ; Control (low): 
22087 ; Control (high):  Ÿ
22088 ; Surrogate: ��
22089 ; This is an okay astral character: 💩
22097 <dt>Control (low)</dt>
22099 <dt>Control (high)</dt>
22100 <dd>&#x7F; &#x9F;</dd>
22102 <dd>&#xD83D;&#xDCA9;</dd>
22103 <dt>This is an okay astral character</dt>
22104 <dd>💩</dd></dl>
22108 __FORCETOC__ override
22120 ISBN 978-0-1234-56 789
22122 <p><a href="/wiki/Special:BookSources/9780123456" class="internal mw-magiclink-isbn">ISBN 978-0-1234-56</a> 789
22125 <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>
22129 ISBN followed by 5 spaces
22140 ISBN ISBN 1234567890
22142 <p>ISBN <a href="/wiki/Special:BookSources/1234567890" class="internal mw-magiclink-isbn">ISBN 1234567890</a>
22145 <p>ISBN <a href="./Special:BookSources/1234567890" rel="mw:WikiLink" data-parsoid='{"stx":"magiclink"}'>ISBN 1234567890</a></p>
22148 # Uppercase X and lowercase x as well
22159 <p><a href="/wiki/Special:BookSources/346204561X" class="internal mw-magiclink-isbn">ISBN 3-462-04561-X</a>
22160 <a href="/wiki/Special:BookSources/346204561X" class="internal mw-magiclink-isbn">ISBN 3-462-04561-x</a>
22161 <a href="/wiki/Special:BookSources/080442957X" class="internal mw-magiclink-isbn">ISBN 080442957X</a>
22162 <a href="/wiki/Special:BookSources/080442957X" class="internal mw-magiclink-isbn">ISBN 080442957x</a>
22163 <a href="/wiki/Special:BookSources/978080442957X" class="internal mw-magiclink-isbn">ISBN 978080442957X</a>
22164 <a href="/wiki/Special:BookSources/978080442957X" class="internal mw-magiclink-isbn">ISBN 978080442957x</a>
22167 <p><a href="./Special:BookSources/346204561X" rel="mw:WikiLink" data-parsoid='{"stx":"magiclink"}'>ISBN 3-462-04561-X</a>
22168 <a href="./Special:BookSources/346204561X" rel="mw:WikiLink" data-parsoid='{"stx":"magiclink"}'>ISBN 3-462-04561-x</a>
22169 <a href="./Special:BookSources/080442957X" rel="mw:WikiLink" data-parsoid='{"stx":"magiclink"}'>ISBN 080442957X</a>
22170 <a href="./Special:BookSources/080442957X" rel="mw:WikiLink" data-parsoid='{"stx":"magiclink"}'>ISBN 080442957x</a>
22171 <a href="./Special:BookSources/978080442957X" rel="mw:WikiLink" data-parsoid='{"stx":"magiclink"}'>ISBN 978080442957X</a>
22172 <a href="./Special:BookSources/978080442957X" rel="mw:WikiLink" data-parsoid='{"stx":"magiclink"}'>ISBN 978080442957x</a></p>
22176 ISBN with empty prefix (parsoid test)
22180 <p><a href="/wiki/Special:BookSources/1234567890" class="internal mw-magiclink-isbn">ISBN 1234567890</a>
22183 <p><a href="./Special:BookSources/1234567890" rel="mw:WikiLink">ISBN 1234567890</a></p>
22187 T24905: <abbr> followed by ISBN followed by </a>
22189 <abbr>(fr)</abbr> ISBN 2753300917 [http://www.example.com example.com]
22191 <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>
22194 <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>
22202 <p>RFC <a class="external mw-magiclink-rfc" rel="nofollow" href="https://tools.ietf.org/html/rfc1234">RFC 1234</a>
22205 <p>RFC <a href="https://tools.ietf.org/html/rfc1234" rel="mw:ExtLink" class="external mw-magiclink">RFC 1234</a></p>
22209 Double RFC with a wiki link
22213 <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>
22216 <p>RFC <a rel="mw:WikiLink" href="./RFC_1234" title="RFC 1234">RFC 1234</a></p>
22224 <p><a class="external mw-magiclink-rfc" rel="nofollow" href="https://tools.ietf.org/html/rfc983">RFC 983</a> 987
22227 <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>
22231 Centre-aligned image
22233 [[Image:foobar.jpg|centre]]
22235 <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" decoding="async" width="1941" height="220" /></a></div></div>
22238 <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>
22244 [[Image:foobar.jpg|none]]
22246 <div class="floatnone"><a href="/wiki/File:Foobar.jpg" class="image"><img alt="Foobar.jpg" src="http://example.com/images/3/3a/Foobar.jpg" decoding="async" width="1941" height="220" /></a></div>
22249 <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>
22253 Width + Height sized image (using px) (height is ignored)
22255 [[Image:foobar.jpg|640x480px]]
22257 <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" decoding="async" 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>
22260 <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>
22264 Width-sized image (using px, no following whitespace)
22266 [[Image:foobar.jpg|640px]]
22268 <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" decoding="async" 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>
22271 <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>
22275 Width-sized image (using px, with following whitespace - test regression from r39467)
22277 [[Image:foobar.jpg|640px ]]
22279 <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" decoding="async" 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>
22282 <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>
22286 Width-sized image (using px, with preceding whitespace - test regression from r39467)
22288 [[Image:foobar.jpg| 640px]]
22290 <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" decoding="async" 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>
22293 <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>
22297 Image with page parameter
22301 [[File:LoremIpsum.djvu|page=2]]
22303 <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" decoding="async" 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>
22306 <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>
22310 Another italics / bold test
22318 # FIXME: The php output seems broken. It's interleaving some open/close tags.
22324 <dl><dd><dl><dt><dl><dt><dl><dt><dl><dd><dl><dd></dt></dl></dd></dl></dd></dl></dd></dl></dd></dl></dd></dl>
22327 <dl><dd><dl><dt><dl><dt><dl><dt><dl><dd><dl><dd></dd></dl></dd></dl></dt></dl></dt></dl></dt></dl></dd></dl>
22331 # Images with the "|" character in external URLs in comment tags; Eats half the comment, leaves unmatched "</a>" tag.
22333 Images with the "|" character in the comment
22335 [[File:Foobar.jpg|thumb|An [http://test/?param1=|left|¶m2=|x external] URL]]
22337 <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" decoding="async" 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>
22340 <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>
22344 [Before] HTML without raw HTML enabled ($wgRawHtml==false)
22346 <html><script>alert(1);</script></html>
22348 <p><html><script>alert(1);</script></html>
22353 HTML with raw HTML ($wgRawHtml==true)
22357 <html><script>alert(1);</script></html>
22359 <p><script>alert(1);</script>
22362 <p><script typeof="mw:Extension/html" about="#mwt3" data-mw='{"name":"html","attrs":{},"body":{"extsrc":"<script>alert(1);</script>"}}'>alert(1);</script></p>
22366 Parents of subpages, one level up
22368 subpage title=[[Subpage test/L1/L2/L3]]
22372 <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>
22378 Parents of subpages, one level up, not named
22380 subpage title=[[Subpage test/L1/L2/L3]]
22384 <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>
22391 Parents of subpages, two levels up
22393 subpage title=[[Subpage test/L1/L2/L3]]
22399 <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
22400 </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>
22405 Parents of subpages, two levels up, without trailing slash or name.
22407 subpage title=[[Subpage test/L1/L2/L3]]
22416 Parents of subpages, two levels up, with lots of extra trailing slashes.
22418 subpage title=[[Subpage test/L1/L2/L3]]
22422 <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>
22427 Subpage test/L1/L2/L3Sibling
22433 Transclusion of a sibling page (one level up)
22435 subpage title=[[Subpage test/L1/L2/L3]]
22444 Transclusion of a child page
22446 subpage title=[[Subpage test/L1/L2]]
22454 # This is wt2html only in Parsoid because we add <nowiki>
22455 # because of {{..}} and we don't expect to fix that to
22456 # eliminate the nowikis selective for {{..}} markup.
22458 Non-transclusion because of too many up levels
22460 subpage title=[[Subpage test/L1/L2/L3]]
22463 {{../../../../More than parent}}
22465 <p>{{../../../../More than parent}}
22468 <p>{{../../../../More than parent}}</p>
22472 Definition list code coverage
22486 <dl><dt>title </dt><dd>def</dd>
22487 <dt>title </dt><dd>def</dd>
22488 <dt>title</dt><dd>def</dd></dl>
22492 Don't fall for the self-closing div
22494 <div>hello world</div/>
22496 <div>hello world</div>
22505 <p>[[:Template:Msg]]
22514 <p><a href="/index.php?title=Template:QUERTY&action=edit&redlink=1" class="new" title="Template:QUERTY (page does not exist)">Template:QUERTY</a>
22518 # This isn't needed for XHTML conformance, but would be handy as a fallback security measure
22520 Always escape literal '>' in output, not just after '<'
22534 <p>This is a test template
22535 This is a test template
22547 Inclusion of !userCanEdit() content
22551 <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>
22557 Out-of-order TOC heading levels
22566 <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>
22568 <li class="toclevel-1 tocsection-1"><a href="#2"><span class="tocnumber">1</span> <span class="toctext">2</span></a>
22570 <li class="toclevel-2 tocsection-2"><a href="#6"><span class="tocnumber">1.1</span> <span class="toctext">6</span></a></li>
22571 <li class="toclevel-2 tocsection-3"><a href="#3"><span class="tocnumber">1.2</span> <span class="toctext">3</span></a></li>
22574 <li class="toclevel-1 tocsection-4"><a href="#1"><span class="tocnumber">2</span> <span class="toctext">1</span></a>
22576 <li class="toclevel-2 tocsection-5"><a href="#5"><span class="tocnumber">2.1</span> <span class="toctext">5</span></a></li>
22577 <li class="toclevel-2 tocsection-6"><a href="#2_2"><span class="tocnumber">2.2</span> <span class="toctext">2</span></a></li>
22583 <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>
22584 <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>
22585 <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>
22586 <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>
22587 <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>
22588 <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>
22594 ISBN with a dummy number
22604 ISBN with space-delimited number
22608 <p><a href="/wiki/Special:BookSources/9290170328" class="internal mw-magiclink-isbn">ISBN 92 9017 032 8</a>
22611 <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>
22616 ISBN with multiple spaces, no number
22635 </p><p><a href="/wiki/Special:BookSources/1234567890" class="internal mw-magiclink-isbn">ISBN 1234567890</a>
22636 </p><p>ISBN 12345678901
22639 <p>ISBN 123456789</p>
22641 <p><a href="./Special:BookSources/1234567890" rel="mw:WikiLink" data-parsoid='{"stx":"magiclink"}'>ISBN 1234567890</a></p>
22643 <p>ISBN 12345678901</p>
22648 ISBN with trailing year (T9110)
22650 ISBN 1-234-56789-0 - 2006
22652 ISBN 1 234 56789 0 - 2006
22654 <p><a href="/wiki/Special:BookSources/1234567890" class="internal mw-magiclink-isbn">ISBN 1-234-56789-0</a> - 2006
22655 </p><p><a href="/wiki/Special:BookSources/1234567890" class="internal mw-magiclink-isbn">ISBN 1 234 56789 0</a> - 2006
22658 <p><a href="./Special:BookSources/1234567890" rel="mw:WikiLink" data-parsoid='{"stx":"magiclink"}'>ISBN 1-234-56789-0</a> - 2006</p>
22660 <p><a href="./Special:BookSources/1234567890" rel="mw:WikiLink" data-parsoid='{"stx":"magiclink"}'>ISBN 1 234 56789 0</a> - 2006</p>
22667 wgFragmentMode=[ 'html5', 'legacy' ]
22669 {{anchorencode:foo bar©#%n}}
22674 <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>
22678 anchorencode (legacy)
22680 wgFragmentMode=[ 'legacy' ]
22682 {{anchorencode:foo bar©#%n}}
22684 <p>foo_bar.C2.A9.23.25n
22689 anchorencode trims spaces
22691 wgFragmentMode=[ 'html5', 'legacy' ]
22693 {{anchorencode: __pretty__please__}}
22698 <p about="#mwt1" typeof="mw:Transclusion" data-mw='{"parts":[{"template":{"target":{"wt":"anchorencode: __pretty__please__","function":"anchorencode"},"params":{},"i":0}}]}'>pretty_please</p>
22702 anchorencode deals with links
22704 wgFragmentMode=[ 'html5', 'legacy' ]
22706 {{anchorencode: [[hello|world]] [[hi]]}}
22711 <p about="#mwt1" typeof="mw:Transclusion" data-mw='{"parts":[{"template":{"target":{"wt":"anchorencode: [[hello|world]] [[hi]]","function":"anchorencode"},"params":{},"i":0}}]}'>world_hi</p>
22715 anchorencode deals with templates
22717 wgFragmentMode=[ 'html5', 'legacy' ]
22719 {{anchorencode: {{Foo}} x}}
22724 <p about="#mwt2" typeof="mw:Transclusion" data-mw='{"parts":[{"template":{"target":{"wt":"anchorencode: {{Foo}} x","function":"anchorencode"},"params":{},"i":0}}]}'>FOO_x</p>
22728 anchorencode encodes like the TOC generator: (T20431)
22730 wgFragmentMode=[ 'html5', 'legacy' ]
22732 ===_ +:.3A%3A _ &&]] x===
22733 {{anchorencode: _ +:.3A%3A _ &&]] x}}
22736 <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>
22737 <p>+:.3A%3A_&&]]_x
22740 <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>
22741 <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>
22742 <meta property="mw:PageProp/noeditsection"/>
22746 anchorencode encodes like the TOC generator: (T20431) (legacy)
22748 wgFragmentMode=[ 'legacy' ]
22750 ===_ +:.3A%3A&&]]===
22751 {{anchorencode: _ +:.3A%3A&&]] }}
22754 <h3><span class="mw-headline" id=".2B:.3A.253A.26.26.5D.5D">_ +:.3A%3A&&]]</span></h3>
22755 <p>.2B:.3A.253A.26.26.5D.5D
22760 T8200: blockquotes and paragraph formatting
22781 T10293: Use of center tag ruins paragraph formatting
22802 Parsing of overlapping (improperly nested) inline html tags
22804 <span><s>x</span></s>
22806 <p><span><s>x</span></s></span>
22809 <p><span><s>x</s></span>
22814 ### Language variants related tests
22817 # Parsoid does not mark self-links.
22818 # Parsoid does not convert links; PHP will do any necessary redirects.
22821 Self-link in language variants
22823 title=[[Dunav]] language=sr
22825 Both [[Dunav]] and [[Дунав]] are names for this river.
22827 <p>Both <a class="mw-selflink selflink">Dunav</a> and <a class="mw-selflink selflink">Дунав</a> are names for this river.
22830 <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>
22840 Link to another existing title shouldn't be parsed as self-link even if it's a variant of this title
22842 title=[[Duna]] language=sr
22844 [[Дуна]] is not a self-link while [[Duna]] and [[Dуна]] are still self-links.
22846 <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.
22849 <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>
22853 Link to a section of a variant of this title shouldn't be parsed as self-link
22855 title=[[Duna]] language=sr
22857 [[Dуна]] is a self-link while [[Dunа#Foo]] and [[Dуна#Foo]] are not self-links.
22859 <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.
22862 <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>
22866 Link to pages in language variants
22870 Main Page can be written as [[Маин Паге]]
22872 <p>Main Page can be written as <a href="/wiki/Main_Page" title="Main Page">Маин Паге</a>
22875 <p>Main Page can be written as <a rel="mw:WikiLink" href="./Маин_Паге" title="Маин Паге">Маин Паге</a></p>
22880 Multiple links to pages in language variants
22884 [[Main Page]] can be written as [[Маин Паге]] same as [[Маин Паге]].
22886 <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>.
22889 <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>
22894 Simple template in language variants
22900 <p>This is a test template
22906 Template with explicit namespace in language variants
22912 <p>This is a test template
22918 Basic test for template parameter in language variants
22922 {{парамтест|param=foo}}
22924 <p>This is a test template with parameter foo
22929 Simple category in language variants
22933 [[Category:МедиаWики Усер'с Гуиде]]
22935 cat=МедиаWики_Усер'с_Гуиде sort=
22937 <link rel="mw:PageProp/Category" href="./Категорија:МедиаWики_Усер'с_Гуиде" data-parsoid='{"stx":"simple","a":{"href":"./Категорија:МедиаWики_Усер'с_Гуиде"},"sa":{"href":"Category:МедиаWики Усер'с Гуиде"}}'/>
22952 ## We used to, but no longer wt2wt this test since the default serializer
22953 ## will normalize all categories to serialize on their own line.
22954 ## This wikitext usage is going to be fairly uncommon in production and
22955 ## selser will take care of preserving formatting in those scenarios.
22957 Don't convert blue categorylinks to another variant (T35210)
22963 [[A]][[Category:分类]]
22967 <p><a rel="mw:WikiLink" href="./A" title="A">A</a></p>
22968 <link rel="mw:PageProp/Category" href="./Category:分类"/>
22972 Stripping -{}- tags (language variants)
22976 Latin proverb: -{Ne nuntium necare}-
22978 <p>Latin proverb: Ne nuntium necare
22981 <p>Latin proverb: <span typeof="mw:LanguageVariant" data-mw-variant='{"disabled":{"t":"Ne nuntium necare"}}'></span></p>
22986 Prevent conversion with -{}- tags (language variants)
22988 language=sr variant=sr-ec
22990 Latinski: -{Ne nuntium necare}-
22992 <p>Латински: Ne nuntium necare
22995 <p>Latinski: <span typeof="mw:LanguageVariant" data-mw-variant='{"disabled":{"t":"Ne nuntium necare"}}'></span></p>
23000 Prevent conversion of text with -{}- tags (language variants)
23002 language=sr variant=sr-ec
23004 Latinski: -{Ne nuntium necare}-
23006 <p>Латински: Ne nuntium necare
23009 <p>Latinski: <span typeof="mw:LanguageVariant" data-mw-variant='{"disabled":{"t":"Ne nuntium necare"}}'></span></p>
23014 Prevent conversion of links with -{}- tags (language variants)
23016 language=sr variant=sr-ec
23020 <p><a href="/wiki/Main_Page" title="Main Page">Main Page</a>
23023 <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>
23028 -{}- tags within headlines (within html for parserConvert())
23030 wgFragmentMode=[ 'html5', 'legacy' ]
23032 language=sr variant=sr-ec
23036 Note that even an unprotected headline ID is not affected by language
23041 <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>
23042 <p>Ноте тхат евен ан унпротецтед хеадлине ИД ис нот аффецтед бy лангуаге
23045 <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>
23048 <h2 id="-{Naslov}-"><span id="-.7BNaslov.7D-" typeof="mw:FallbackId"></span><span typeof="mw:LanguageVariant" data-mw-variant='{"disabled":{"t":"Naslov"}}'></span></h2>
23050 <p>Note that even an unprotected headline ID is not affected by language
23053 <h2 id="Latinski">Latinski</h2>
23057 Explicit definition of language variant alternatives
23059 language=zh variant=zh-tw
23061 -{zh:China;zh-tw:Taiwan}-, not China
23063 <p>Taiwan, not China
23066 <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>
23070 Explicit definition of language variant alternatives (BCP 47 codes)
23072 language=zh variant=zh-tw
23074 -{zh:China;zh-Hant-TW:Taiwan}-, not China
23076 <p>Taiwan, not China
23079 <p><span typeof="mw:LanguageVariant" data-parsoid='{"tSp":[6]}' data-mw-variant='{"twoway":[{"l":"zh","t":"China"},{"l":"zh-Hant-TW","t":"Taiwan"}]}'></span>, not China</p>
23083 Filter syntax for language variants
23085 language=zh variant=zh-tw
23087 foo-{zh;zh-hans;zh-hant|blog, WEBJOURNAL, WEBLOG}-quux
23089 <p>fooblog, WEBJOURNAL, WEBLOGquux
23092 <p>foo<span typeof="mw:LanguageVariant" data-mw-variant='{"filter":{"l":["zh","zh-hans","zh-hant"],"t":"blog, WEBJOURNAL, WEBLOG"}}'></span>quux</p>
23095 # Note that Parsoid post-processing for language variants needs to
23096 # update the `title` attribute here, based on the mw:ExpandedAttrs property
23098 Conversion around HTML tags
23100 language=sr variant=sr-ec
23102 -{H|span=>sr-ec:script;title=>sr-ec:src}-
23103 <span title="La-{sr-el:L;sr-ec:C}-tin">ski</span>
23106 <span title="ЛаCтин">ски</span>
23109 <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"}]}'/>
23110 <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>
23114 Explicit session-wise two-way language variant mapping (A flag and - flag)
23116 language=zh variant=zh-tw
23118 This is -{zh:China; zh-tw:Taiwan}-, but we'll forget that now.
23120 Taiwan is not China.
23122 But -{A|zh:China; zh-tw:Taiwan}- is China,
23124 (This-{-|zh:China; zh-tw:Taiwan}- should be stripped!)
23126 and -{China}- is China.
23128 <p>This is Taiwan, but we'll forget that now.
23129 </p><p>Taiwan is not China.
23130 </p><p>But Taiwan is Taiwan,
23131 </p><p>(This should be stripped!)
23132 </p><p>and China is China.
23135 <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>
23136 <p>Taiwan is not China.</p>
23137 <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>
23138 <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>
23139 <p>and <span typeof="mw:LanguageVariant" data-mw-variant='{"disabled":{"t":"China"}}'></span> is China.</p>
23143 Explicit session-wise one-way language variant mapping (A flag and - flag)
23145 language=zh variant=zh-tw
23147 This is -{COUNTRY=>zh:China;COUNTRY=>zh-tw:Taiwan}-, but we'll forget that now.
23149 COUNTRY is China or Taiwan.
23151 But -{A|COUNTRY=>zh:China;COUNTRY=>zh-tw:Taiwan}- is COUNTRY,
23153 (This-{-|COUNTRY=>zh:China;COUNTRY=>zh-tw:Taiwan}- should be stripped!)
23155 and -{COUNTRY}- is COUNTRY.
23157 <p>This is Taiwan, but we'll forget that now.
23158 </p><p>COUNTRY is China or Taiwan.
23159 </p><p>But Taiwan is Taiwan,
23160 </p><p>(This should be stripped!)
23161 </p><p>and COUNTRY is COUNTRY.
23164 <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>
23165 <p>COUNTRY is China or Taiwan.</p>
23166 <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>
23167 <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>
23168 <p>and <span typeof="mw:LanguageVariant" data-mw-variant='{"disabled":{"t":"COUNTRY"}}'></span> is COUNTRY.</p>
23172 Explicit session-wise two-way language variant mapping (H flag for hide)
23174 language=zh variant=zh-tw
23176 (This-{H|zh:China;zh-tw:Taiwan}- should be stripped!)
23180 <p>(This should be stripped!)
23181 </p><p>Taiwan is Taiwan.
23184 <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>
23185 <p>Taiwan is China.</p>
23189 Explicit session-wise one-way language variant mapping (H flag for hide)
23191 language=zh variant=zh-tw
23193 (This-{H|COUNTRY=>zh:China;COUNTRY=>zh-tw:Taiwan}- should be stripped!)
23195 COUNTRY is Taiwan or China.
23197 <p>(This should be stripped!)
23198 </p><p>Taiwan is Taiwan or China.
23201 <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>
23202 <p>COUNTRY is Taiwan or China.</p>
23205 ## Note that parsoid test runner does not support 'showtitle' option.
23207 Adding explicit conversion rule for title (T flag)
23209 language=zh variant=zh-tw showtitle
23211 Should be stripped-{T|zh:China;zh-tw:Taiwan}-!
23216 <p>Should be stripped!
23217 </p><p>Taiwan is China.
23220 <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>
23221 <p>Taiwan is China.</p>
23225 Code coverage: T combined with H flag
23227 language=zh variant=zh-tw showtitle
23229 Should be stripped-{T;H|zh:China; zh-tw:Taiwan}-!
23234 <p>Should be stripped!
23235 </p><p>Taiwan is Taiwan.
23238 <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>
23239 <p>Taiwan is China.</p>
23243 Code coverage: T with no variants
23245 language=zh variant=zh-tw showtitle
23247 -{H|zh:China; zh-tw:Taiwan}-
23248 Taiwan is China.-{T|Taiwan is China}-
23255 <p><meta typeof="mw:LanguageVariant" data-mw-variant='{"add":true,"twoway":[{"l":"zh","t":"China"},{"l":"zh-tw","t":"Taiwan"}]}'/>
23256 Taiwan is China.<meta typeof="mw:LanguageVariant" data-mw-variant='{"disabled":{"t":"Taiwan is China"},"title":true}'/></p>
23260 Code coverage: rules with no variants
23262 language=zh variant=zh-tw
23264 -{H|zh:China; zh-tw:Taiwan}-
23275 <p><meta typeof="mw:LanguageVariant" data-mw-variant='{"add":true,"twoway":[{"l":"zh","t":"China"},{"l":"zh-tw","t":"Taiwan"}]}'/>
23277 <meta typeof="mw:LanguageVariant" data-mw-variant='{"add":true,"twoway":[{"l":"*","t":"China"}]}'/>
23278 Taiwan is China.</p>
23283 Code coverage: D flag for conversion rule
23285 language=zh variant=zh-tw
23287 -{D|zh-cn:XA; zh-tw:YA}-
23288 -{A;D|zh-cn:XB; zh-tw:YB}-
23289 -{D;H|zh-cn:XC; zh-tw:YC}-
23291 -{D;H|FOO=>zh-tw:BAR;FOO=>zh-cn:BAT}-
23297 XA XB XC YA YB YC FOO BAR BAT 012345
23302 </p><p>FOO⇒台灣:BAR;FOO⇒大陆:BAT;
23306 </p><p>XA YB YC YA YB YC BAR BAR BAT 013355
23309 <p><span typeof="mw:LanguageVariant" data-mw-variant='{"describe":true,"twoway":[{"l":"zh-cn","t":"XA"},{"l":"zh-tw","t":"YA"}]}'></span>
23310 <meta typeof="mw:LanguageVariant" data-mw-variant='{"add":true,"describe":true,"twoway":[{"l":"zh-cn","t":"XB"},{"l":"zh-tw","t":"YB"}]}'/>
23311 <span typeof="mw:LanguageVariant" data-mw-variant='{"add":true,"describe":true,"twoway":[{"l":"zh-cn","t":"XC"},{"l":"zh-tw","t":"YC"}]}'></span></p>
23312 <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>
23313 <p><span typeof="mw:LanguageVariant" data-mw-variant='{"describe":true,"oneway":[{"f":"0","l":"zh-tw","t":"1"}]}'></span>
23314 <meta typeof="mw:LanguageVariant" data-mw-variant='{"add":true,"describe":true,"oneway":[{"f":"2","l":"zh-tw","t":"3"}]}'/>
23315 <span typeof="mw:LanguageVariant" data-mw-variant='{"add":true,"describe":true,"oneway":[{"f":"4","l":"zh-tw","t":"5"}]}'></span></p>
23316 <p>XA XB XC YA YB YC FOO BAR BAT 012345</p>
23320 Code coverage: N flag for conversion rule
23322 language=zh variant=zh-cn
23332 </p><p>српски (ћирилица)
23335 <p><span typeof="mw:LanguageVariant" data-mw-variant='{"name":{"t":"zh-cn"}}'></span></p>
23336 <p><span typeof="mw:LanguageVariant" data-mw-variant='{"name":{"t":"zh-tw"}}'></span></p>
23337 <p><span typeof="mw:LanguageVariant" data-mw-variant='{"name":{"t":"sr-ec"}}'></span></p>
23340 # html2wt suppresses the bogus 'D' flag, so this is wt2html only
23342 Code coverage: N flag for conversion rule (wt2html only)
23344 language=zh variant=zh-cn
23345 parsoid=wt2html,html2html
23352 <p><span typeof="mw:LanguageVariant" data-mw-variant='{"name":{"t":"en"}}' data-parsoid='{"fl":["D","N"]}'></span></p>
23356 Testing that changing the language variant here in the tests actually works
23358 language=zh variant=zh showtitle
23360 Should be stripped-{T|zh:China; zh-tw:Taiwan}-!
23363 <p>Should be stripped!
23366 <p>Should be stripped<meta typeof="mw:LanguageVariant" data-mw-variant='{"title":true,"twoway":[{"l":"zh","t":"China"},{"l":"zh-tw","t":"Taiwan"}]}'/>!</p>
23370 Recursive conversion of alt and title attrs shouldn't clear converter state
23372 language=zh variant=zh-cn
23375 -{H|zh-cn:Exclamation; zh-tw:exclamation}-
23376 Should be stripped-{T|zh-cn:China; zh-tw:Taiwan}-<span title="exclamation">!</span>
23380 Should be stripped<span title="Exclamation">!</span>
23383 <p><meta typeof="mw:LanguageVariant" data-mw-variant='{"add":true,"twoway":[{"l":"zh-cn","t":"Exclamation"},{"l":"zh-tw","t":"exclamation"}]}'/>
23384 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>
23388 T26072: more test on conversion rule for title
23390 language=zh variant=zh-tw showtitle
23392 This should be stripped-{T|zh:China; zh-tw:Taiwan}-!
23394 This won't take interferes with the title rule-{H|zh:Beijing; zh-tw:Taipei}-.
23397 <p>This should be stripped!
23398 </p><p>This won't take interferes with the title rule.
23401 <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>
23402 <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>
23406 Partly disable title conversion if variant == main language code
23408 language=zh variant=zh title=[[ZH]] showtitle
23410 -{T|zh-cn:CN;zh-tw:TW}-
23416 <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>
23420 Partly disable title conversion if variant == main language code, more
23422 language=zh variant=zh title=[[ZH]] showtitle
23430 <p><meta typeof="mw:LanguageVariant" data-mw-variant='{"disabled":{"t":"TW"},"title":true}'/></p>
23434 Raw output of variant escape tags (R flag)
23436 language=zh variant=zh-tw
23438 Raw: -{R|zh:China;zh-tw:Taiwan}-
23440 <p>Raw: zh:China;zh-tw:Taiwan
23443 <p>Raw: <span typeof="mw:LanguageVariant" data-mw-variant='{"disabled":{"t":"zh:China;zh-tw:Taiwan"}}'></span></p>
23446 # html2wt suppresses the bogus 'D' flags, so this is wt2html only
23448 Raw output of variant escape tags (R flag) (wt2html only)
23450 language=zh variant=zh-tw
23451 parsoid=wt2html,html2html
23453 -{Variant}- -{D|syntax}- -{D;R|options}-
23455 <p>Variant syntax options
23458 <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>
23462 Nested markup inside raw output of variant escape tags (R flag)
23464 language=zh variant=zh-tw
23466 Nested raw: -{R|nested -{zh:China;zh-tw:Taiwan}- nested}-
23468 <p>Nested raw: nested Taiwan nested
23471 <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>
23475 Nested markup and spaces inside raw output of variant escape tags (R flag)
23477 language=zh variant=zh-tw
23479 X-{ outer -{ inner }- outer }-X
23481 <p>X outer inner outer X
23484 <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>
23488 Templates inside raw output of variant escape tags (R flag)
23490 language=zh variant=zh-tw
23492 Nested raw: -{R|nested {{echo|hi}} templates}-
23494 <p>Nested raw: nested hi templates
23497 <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>
23501 Strings evaluating false shouldn't be ignored by Language converter (T51072)
23503 language=zh variant=zh-cn
23505 -{zh-cn:0;zh-sg:1;zh-tw:2;zh-hk:3}-
23510 <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>
23514 Conversion rules from [numeric-only string] to [something else] (T48634)
23516 language=zh variant=zh-cn
23518 -{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
23523 <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>
23527 Two-way converter rule entries with an empty value should be ignored (T53551)
23529 language=zh variant=zh-cn
23531 -{H|zh-cn:foo;zh-tw:;}-foobar
23536 <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>
23540 One-way converter rule entries with an empty "from" string should be ignored (T53551)
23542 language=zh variant=zh-cn
23544 -{H|=>zh-cn:foo;}-foobar
23549 <p><meta typeof="mw:LanguageVariant" data-parsoid='{"tSp":[5]}' data-mw-variant='{"add":true,"oneway":[{"f":"","l":"zh-cn","t":"foo"}]}'/>foobar</p>
23553 Empty converter rule entries shouldn't be inserted into the conversion table (T53551)
23555 language=zh variant=zh-cn
23562 <p><meta typeof="mw:LanguageVariant" data-mw-variant='{"add":true,"twoway":[{"l":"*","t":""}]}'/>foobar</p>
23566 Nested using of manual convert syntax
23568 language=zh variant=zh-hk
23570 Nested: -{zh-hans:Hi -{zh-cn:China;zh-sg:Singapore;}-;zh-hant:Hello -{zh-tw:Taiwan;zh-hk:H-{ong}- K-{}-ong;}-;}-!
23572 <p>Nested: Hello Hong Kong!
23575 <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>
23579 HTML markups with conversion syntax in attribs, nested in other conversion blocks
23581 language=zh variant=zh-cn
23583 -{zh;zh-hans;zh-hant|<span title="-{X}-">A</span>}-
23585 <p><span title="X">A</span>
23588 <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>
23592 HTML markups with conversion syntax in attribs, nested in other conversion blocks (not working yet in PHP parser)
23594 language=zh variant=zh-cn
23596 -{<span title="-{X}-">A</span>}-
23597 !! html/php+disabled
23598 <p><span title="X">A</span>
23601 <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>
23604 # Parsoid and PHP disagree on how to parse this example: Parsoid
23605 # insists that the content of a language converter element be a valid
23606 # DOM fragment or attribute string
23608 Language converter markup with block content
23610 language=zh variant=zh-cn
23612 <span>a-{b<div>c}-d
23614 <span>a-{zh;zh-hans;zh-hant|b<div>c}-d
23616 <span>a-{H|0=>zh-cn:x<span>y;0=>zh-tw:b<div>c}-d
23621 </span></div></span></div></span>
23623 <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
23625 <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
23627 <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>
23631 LanguageConverter selser (1)
23633 language=zh variant=zh-cn
23635 "modes": ["wt2wt", "selser"],
23637 ["span[typeof]", "attr", "data-mw-variant", "{\"disabled\":{\"t\":\"edited\"}}"]
23647 LanguageConverter selser (2)
23649 language=zh variant=zh-cn
23651 "modes": ["wt2wt", "selser"],
23653 ["span[class='x']", "contents", "text", "-{foo}-"],
23654 ["a", "contents", "text", "-{"],
23655 ["span[typeof]", "attr", "data-mw", "{\"parts\":[{\"template\":{\"target\":{\"wt\":\"1x\",\"href\":\"./Template:1x\"},\"params\":{\"1\":{\"wt\":\"-{\"}},\"i\":0}}]}"]
23659 <span class="x">TEXT1</span>
23660 [http://example.com TEXT2]
23664 <span class="x"><nowiki>-{foo}-</nowiki></span>
23665 [http://example.com -{]
23666 [[Foo|<nowiki>-{</nowiki>]]
23667 {{1x|<nowiki>-{</nowiki>}}
23670 # Tests LanguageVariantText in ConstrainedText
23672 LanguageConverter selser (3)
23674 language=zh variant=zh-cn
23676 "modes": ["wt2wt", "selser"],
23678 ["td > span", "attr", "typeof", "mw:LanguageVariant"],
23679 ["td > span", "attr", "data-mw-variant", "{\"disabled\":{\"t\":\"edited\"}}"]
23690 |<nowiki/>-{edited}-
23694 # Tests LanguageVariantText._fromSelSer
23696 LanguageConverter selser (4)
23698 language=zh variant=zh-cn
23700 "modes": ["wt2wt", "selser"],
23702 ["td > span.x", "remove"]
23708 |<span class="x">Foo</span>-{Bar}-
23709 ||<span class="x">Foo</span>-{Bar}-
23719 # Since Parsoid is starting to emit canonical wikitext for links,
23720 # [http://example.com http://example.com] will not RT back to that
23722 # Parsoid does not language-convert links (it is done in a
23723 # post-processing step)
23725 Proper conversion of text in external links
23727 language=sr variant=sr-ec
23730 http://www.google.com
23731 gopher://www.google.com
23732 [http://www.google.com http://www.google.com]
23733 [gopher://www.google.com gopher://www.google.com]
23734 [https://www.google.com irc://www.google.com]
23735 [ftp://www.google.com www.google.com/ftp://dir]
23736 [//www.google.com www.google.com]
23738 <p><a rel="nofollow" class="external free" href="http://www.google.com">http://www.google.com</a>
23739 <a rel="nofollow" class="external free" href="gopher://www.google.com">gopher://www.google.com</a>
23740 <a rel="nofollow" class="external text" href="http://www.google.com">http://www.google.com</a>
23741 <a rel="nofollow" class="external text" href="gopher://www.google.com">gopher://www.google.com</a>
23742 <a rel="nofollow" class="external text" href="https://www.google.com">irc://www.google.com</a>
23743 <a rel="nofollow" class="external text" href="ftp://www.google.com">www.гоогле.цом/фтп://дир</a>
23744 <a rel="nofollow" class="external text" href="//www.google.com">www.гоогле.цом</a>
23747 <p><a rel="mw:ExtLink" class="external free" href="http://www.google.com">http://www.google.com</a>
23748 <a rel="mw:ExtLink" class="external free" href="gopher://www.google.com">gopher://www.google.com</a>
23749 <a rel="mw:ExtLink" class="external text" href="http://www.google.com">http://www.google.com</a>
23750 <a rel="mw:ExtLink" class="external text" href="gopher://www.google.com">gopher://www.google.com</a>
23751 <a rel="mw:ExtLink" class="external text" href="https://www.google.com">irc://www.google.com</a>
23752 <a rel="mw:ExtLink" class="external text" href="ftp://www.google.com">www.google.com/ftp://dir</a>
23753 <a rel="mw:ExtLink" class="external text" href="//www.google.com">www.google.com</a></p>
23757 Do not convert roman numbers to language variants
23759 language=sr variant=sr-ec
23763 <p>Фридрих IV је цар.
23766 <p>Fridrih IV je car.</p>
23770 Unclosed language converter markup "-{"
23781 Don't convert raw rule "-{R|=>}-" to "=>"
23790 <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>
23794 Don't break link parsing if language converter markup is in the caption.
23796 language=sr variant=sr-ec
23798 [[Main Page|-{R|main page}-]]
23800 <p><a href="/wiki/Main_Page" title="Маин Паге">main page</a>
23803 <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>
23807 T146304: Don't break template parsing if language converter markup is in the parameter.
23809 language=sr variant=sr-ec
23816 <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>
23820 T146305: Don't break image parsing if language converter markup is in the caption.
23824 [[Датотека:Foobar.jpg|thumb|-{R|caption:}-]]
23826 <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" decoding="async" 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>
23829 <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>
23833 T146305: Don't break image parsing if nested language converter markup is in the caption.
23835 language=zh variant=zh-cn
23837 [[File:Foobar.jpg|thumb|-{|zh-cn:blog (hk: -{zh-hans|WEBJOURNAL}-, tw: -{zh-hans|WEBLOG}-)}-]]
23839 <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" decoding="async" 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>
23842 <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>
23845 # XXX html2wt disabled because rich markup in alt is not preserved.
23847 Don't break gallery if language converter markup is inside.
23852 File:foobar.jpg|[[File:foobar.jpg|20px|desc|alt=-{R|foo}-|-{R|bar}-]]|alt=-{R|bat}-
23853 File:foobar.jpg|{{Test|unamedParam|alt=-{R|param}-}}|alt=galleryalt
23856 <ul class="gallery mw-gallery-traditional">
23857 <li class="gallerybox" style="width: 155px"><div style="width: 155px">
23858 <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" decoding="async" 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>
23859 <div class="gallerytext">
23860 <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" decoding="async" 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>
23864 <li class="gallerybox" style="width: 155px"><div style="width: 155px">
23865 <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" decoding="async" 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>
23866 <div class="gallerytext">
23867 <p>This is a test template
23874 <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"}}'>
23875 <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>
23876 <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>
23881 T153135: Don't break list handling if language converter markup is in the item.
23883 language=zh variant=zh-cn
23885 ;-{zh-cn:AAA;zh-tw:BBB}-
23889 <dt>foo:bar</dt></dl>
23892 <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>
23893 <dt data-parsoid='{"dsr":[25,39,1,0]}'><span typeof="mw:LanguageVariant" data-mw-variant='{"disabled":{"t":"foo:bar"}}'></span></dt>
23897 // Note that parsoid does not protect colons unless language converter
23898 // markup is properly nested, because it is a backtracking parser.
23900 T153135: Unclosed markup in definition list (code coverage)
23902 language=zh variant=zh-cn
23907 <dl><dt><b>foo:bar</b></dt><b>
23908 <dt>-{zh-cn:AAA</dt></b></dl><p><b>
23911 <dl><dt data-parsoid='{}'><b data-parsoid='{"stx":"html","autoInsertedEnd":true}'>foo:bar</b></dt><b data-parsoid='{"stx":"html","autoInsertedEnd":true,"autoInsertedStart":true}'>
23912 <dt data-parsoid='{}'>-{zh-cn</dt><dd data-parsoid='{"stx":"row"}'>AAA</dd></b></dl>
23916 T153135: Nested language converter markup in definition list (code coverage)
23918 language=zh variant=zh-cn
23920 ;-{|zh-cn:AAA -{zh-hans|foo:bar}- -{R|bat:baz}-}-:def
23922 <dl><dt>AAA foo:bar bat:baz</dt>
23926 <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>
23927 <dd data-parsoid='{"stx":"row","dsr":[49,53,1,0]}'>def</dd>
23931 # html2wt mode disabled due to <nowiki> insertion.
23933 T153140: Don't break table handling if language converter markup is in the cell.
23935 language=sr variant=sr-ec
23936 parsoid=wt2html,wt2wt,html2html
23953 <td><span typeof="mw:LanguageVariant" data-mw-variant='{"disabled":{"t":"B"}}'></span></td>
23960 Language converter tricky html2wt cases (1)
23963 parsoid=html2wt,wt2wt
23965 <p><span typeof="mw:LanguageVariant" data-mw-variant='{"disabled":{"t":"}-"}}'></span></p>
23967 -{<nowiki>}-</nowiki>}-
23974 Language converter tricky html2wt cases (2)
23977 parsoid=html2wt,wt2wt
23981 <nowiki>-{foo}-</nowiki>
23983 <p>-{foo}-
23988 Language converter tricky html2wt cases (3)
23991 parsoid=html2wt,wt2wt
23993 <p><span typeof="mw:LanguageVariant" data-mw-variant='{"disabled":{"t":"|"}}'></span></p>
23994 <p><span typeof="mw:LanguageVariant" data-mw-variant='{"disabled":{"t":"R|raw"}}'></span></p>
23995 <p><span typeof="mw:LanguageVariant" data-mw-variant='{"disabled":{"t":"-{foo}-"}}'></span></p>
24001 -{<nowiki>-{foo}-</nowiki>}-
24005 </p><p>-{foo}-
24010 Language converter tricky html2wt cases (4)
24013 parsoid=html2wt,wt2wt
24015 <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>
24023 # Note that the <nowiki> escaping added by parsoid for source text,
24024 # destination text, and language names only works on the PHP side
24025 # for *destination text*. (HTML entity escaping wouldn't work
24026 # any better.) This is probably a bug, at least for source texts.
24027 # (For language names PHP uses a precise regexp based on the languages
24028 # it currently knows have variants, which is fragile since this set
24029 # can grow/shrink over time.)
24031 Language converter tricky html2wt cases (5)
24033 language=zh variant=zh-cn
24035 <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>
24036 <p><meta typeof="mw:LanguageVariant" data-mw-variant='{"add":true,"oneway":[{"f":"A","l":"bo:g;us","t":"B"}]}'/></p>
24037 <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>
24038 <p><span typeof="mw:LanguageVariant" data-mw-variant='{"twoway":[{"l":"bo:g;us","t":"xyz"},{"l":"zh-cn","t":"abc"}]}'></span></p>
24041 -{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
24043 -{H|A=><nowiki>bo:g;us</nowiki>:B}-
24045 -{A|zh-tw:xyz; zh-cn:<nowiki>0;zh-tw:bar</nowiki>}-
24047 -{<nowiki>bo:g;us</nowiki>:xyz; zh-cn:abc}-
24050 !! html/php+disabled
24051 <p>foobat;xyz=>zh-cn:abc
24055 </p><p>a:b=>c 0;zh-tw:bar
24060 T179579: Nowiki and lc interaction
24067 -{123<nowiki>|</nowiki>456}-
24069 <p><span typeof="mw:LanguageVariant" data-mw-variant='{"disabled":{"t":"&lt;/nowiki>123"}}' data-parsoid='{"fl":[],"src":"-{</nowiki>123}-"}'></span></p>
24071 <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>
24075 T2529: Uncovered bullet
24085 T2529: Uncovered bullet in a deeply nested list
24087 *******Foo {{bullet}}
24089 <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>
24095 T2529: Uncovered table already at line-start
24118 T2529: Uncovered bullet in parser function result
24120 *Foo {{lc:{{bullet}} }}
24128 T7678: Double-parsed template argument
24130 {{lc:{{{1}}}|hello}}
24137 T7678: Double-parsed template invocation
24139 {{lc:{{paramtest {{!}} param = hello }} }}
24141 <p>{{paramtest | param = hello }}
24146 Case insensitivity of parser functions for non-ASCII characters (T10143)
24149 title=[[Main Page]]
24151 {{PRVNÍVELKÉ:ěščř}}
24152 {{prvnívelké:ěščř}}
24172 Morwen/13: Unclosed link followed by heading
24179 <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>
24184 HHP2.1: Heuristics for headings in preprocessor parenthetical structures
24191 <h1><span class="mw-headline" id="heading">heading</span></h1>
24196 HHP2.2: Heuristics for headings in preprocessor parenthetical structures
24203 <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>
24218 Paragraphs inside divs (no extra line breaks)
24230 Paragraphs inside divs (extra line break on open)
24245 Paragraphs inside divs (extra line break on close)
24260 Paragraphs inside divs (extra line break on open and close)
24276 # doBlockLevels screws up this output and Remex cleans up as much as it can.
24278 Nesting tags, paragraphs on lines which begin with <div>
24280 <div></div><strong>A
24283 <div></div><p><strong>A
24284 </strong></p><strong></strong><p><strong>B</strong>
24287 <div data-parsoid='{"stx":"html"}'></div><p><strong data-parsoid='{"stx":"html","autoInsertedEnd":true}'>A</strong></p>
24288 <p><strong data-parsoid='{"stx":"html","autoInsertedStart":true}'>B</strong></p>
24291 # T8200: <blockquote> should behave like <div> with respect to line breaks
24293 T8200: paragraphs inside blockquotes (no extra line breaks)
24295 <blockquote>Line one
24297 Line two</blockquote>
24299 <blockquote>Line one
24300 Line two</blockquote>
24303 <blockquote><p>Line one
24304 Line two</p></blockquote>
24308 T8200: paragraphs inside blockquotes (extra line break on open)
24313 Line two</blockquote>
24318 Line two</blockquote>
24324 Line two</p></blockquote>
24328 T8200: paragraphs inside blockquotes (extra line break on close)
24330 <blockquote>Line one
24335 <blockquote>Line one
24341 <blockquote><p>Line one
24348 T8200: paragraphs inside blockquotes (extra line break on open and close)
24364 ## This is a corner case interaction between the paragraph wrapping in the
24365 ## php parser's BlockLevelPass and Remex. `doBlockLevels` has a notion of
24366 ## some tags which close paragraphs (and thus prevent wrapping on their line),
24367 ## of which "div" is one, but do p-wrapping inside them. These are referred
24368 ## to as "never suppressing". Remex, for its part, doesn't traverse into
24369 ## "div"s to p-wrap. Hence, we only get this partial wrapping.
24371 Paragraphs inside blockquotes/divs (no extra line breaks)
24373 <blockquote><div>Line one
24375 Line two</div></blockquote>
24377 <blockquote><div>Line one
24378 Line two</div></blockquote>
24383 Paragraphs inside blockquotes/divs (extra line break on open)
24388 Line two</div></blockquote>
24393 Line two</div></blockquote>
24398 Paragraphs inside blockquotes/divs (extra line break on close)
24400 <blockquote><div>Line one
24403 </div></blockquote>
24405 <blockquote><div>Line one
24408 </div></blockquote>
24413 Paragraphs inside blockquotes/divs (extra line break on open and close)
24419 </div></blockquote>
24425 </div></blockquote>
24430 Interwiki links trounced by replaceExternalLinks after early LinkHolderArray expansion
24432 wgLinkHolderBatchSize=0
24438 <p><a href="http://www.usemod.com/cgi-bin/mb.pl?1" class="extiw" title="meatball:1">meatball:1</a>
24439 <a href="http://www.usemod.com/cgi-bin/mb.pl?2" class="extiw" title="meatball:2">meatball:2</a>
24440 <a href="http://www.usemod.com/cgi-bin/mb.pl?3" class="extiw" title="meatball:3">meatball:3</a>
24445 Free external link invading image caption
24447 [[Image:Foobar.jpg|thumb|http://x|hello]]
24449 <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" decoding="async" 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>
24452 <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>
24456 T17196: localised external link numbers
24460 [http://en.wikipedia.org/]
24462 <p><a rel="nofollow" class="external autonumber" href="http://en.wikipedia.org/">[۱]</a>
24465 <p><a rel="mw:ExtLink" class="external autonumber" href="http://en.wikipedia.org/"></a></p>
24469 Multibyte character in padleft
24471 {{padleft:-Hello|7|Æ}}
24476 <p typeof="mw:Transclusion" data-mw='{"parts":[{"template":{"target":{"wt":"padleft:-Hello","function":"padleft"},"params":{"1":{"wt":"7"},"2":{"wt":"Æ"}},"i":0}}]}'>Æ-Hello</p>
24480 Multibyte character in padright
24482 {{padright:Hello-|7|Æ}}
24487 <p typeof="mw:Transclusion" data-mw='{"parts":[{"template":{"target":{"wt":"padright:Hello-","function":"padright"},"params":{"1":{"wt":"7"},"2":{"wt":"Æ"}},"i":0}}]}'>Hello-Æ</p>
24491 formatdate parser function
24493 {{#formatdate:2009-03-24}}
24495 <p><span class="mw-formatted-date" title="2009-03-24">2009-03-24</span>
24500 formatdate parser function, with default format
24502 {{#formatdate:2009-03-24|mdy}}
24504 <p><span class="mw-formatted-date" title="2009-03-24">March 24, 2009</span>
24509 Spacing of numbers in formatted dates
24511 {{#formatdate:January 15}}
24513 <p><span class="mw-formatted-date" title="01-15">January 15</span>
24518 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
24520 language=nl title=[[MediaWiki:Common.css]]
24522 {{#formatdate:2009-03-24|dmy}}
24524 <p><span class="mw-formatted-date" title="2009-03-24">24 March 2009</span>
24537 Edit comment with link
24541 I like the [[Main Page]] a lot
24543 I like the <a href="/wiki/Main_Page" title="Main Page">Main Page</a> a lot
24547 Edit comment with link and link text
24551 I like the [[Main Page|best pages]] a lot
24553 I like the <a href="/wiki/Main_Page" title="Main Page">best pages</a> a lot
24557 Edit comment with link and link text with suffix
24561 I like the [[Main Page|best page]]s a lot
24563 I like the <a href="/wiki/Main_Page" title="Main Page">best pages</a> a lot
24567 Edit comment with section link (non-local, eg in history list)
24569 comment title=[[Main Page]]
24571 /* External links */ removed bogus entries
24573 <span dir="auto"><span class="autocomment"><a href="/wiki/Main_Page#External_links" title="Main Page">→External links</a>: </span> removed bogus entries</span>
24577 Edit comment with section link and text before it (non-local, eg in history list)
24579 comment title=[[Main Page]]
24581 pre-comment text /* External links */ removed bogus entries
24583 pre-comment text <span dir="auto"><span class="autocomment"><a href="/wiki/Main_Page#External_links" title="Main Page">→External links</a>: </span> removed bogus entries</span>
24587 Edit comment with section link (local, eg in diff view)
24589 comment local title=[[Main Page]]
24591 /* External links */ removed bogus entries
24593 <span dir="auto"><span class="autocomment"><a href="#External_links">→External links</a>: </span> removed bogus entries</span>
24597 Edit comment with section link that has a link in it
24599 comment local title=[[Main Page]]
24603 <span dir="auto"><span class="autocomment"><a href="#A_link">→[[A link]]</a></span></span>
24607 Edit comment with section link that has a template in it
24609 comment local title=[[Main Page]]
24611 /* {{foobar|param}} */
24613 <span dir="auto"><span class="autocomment"><a href="#.7B.7Bfoobar.7Cparam.7D.7D">→{{foobar|param}}</a></span></span>
24617 Edit comment with subpage link (T16080)
24621 title=[[Subpage test]]
24623 Poked at a [[/subpage]] here...
24625 Poked at a <a href="/wiki/Subpage_test/subpage" title="Subpage test/subpage">/subpage</a> here...
24629 Edit comment with subpage link and link text (T16080)
24633 title=[[Subpage test]]
24635 Poked at a [[/subpage|neat little page]] here...
24637 Poked at a <a href="/wiki/Subpage_test/subpage" title="Subpage test/subpage">neat little page</a> here...
24641 Edit comment with bogus subpage link in non-subpage NS (T16080)
24644 title=[[Subpage test]]
24646 Poked at a [[/subpage]] here...
24648 Poked at a <a href="/index.php?title=/subpage&action=edit&redlink=1" class="new" title="/subpage (page does not exist)">/subpage</a> here...
24652 Edit comment with bare anchor link (local, as on diff)
24656 title=[[Main Page]]
24660 <a href="#section">#section</a>
24664 Edit comment with bare anchor link (non-local, as on history)
24667 title=[[Main Page]]
24671 <a href="/wiki/Main_Page#section" title="Main Page">#section</a>
24675 Anchor starting with underscore
24681 <p><a href="#_ref">One</a>
24684 <p><a rel="mw:WikiLink" href="./Foo#_ref" data-parsoid='{"stx":"piped","a":{"href":"./Foo#_ref"},"sa":{"href":"#_ref"}}'>One</a></p>
24688 Id starting with underscore
24690 <div id="_ref"></div>
24692 <div id="_ref"></div>
24697 Edit comment with link with more than one pipe (T99346)
24701 [[Main Page|Many|pipes]]
24703 <a href="/wiki/Main_Page" title="Main Page">Many|pipes</a>
24707 Complex edit comment with link with more than one pipe (T99346)
24711 Created page with "<noinclude>[[Category:Requests for permissions/Bot|{{subst:#titleparts:{{subst:PAGENAME}}|1|3}}]]</noinclude> === [[User:MineoBot|]] 8=== {{Request for permissions/links|Mineo..."
24713 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..."
24717 Space normalisation on autocomment (T24784)
24720 title=[[Main Page]]
24722 /* __hello__world__ */
24724 <span dir="auto"><span class="autocomment"><a href="/wiki/Main_Page#hello_world" title="Main Page">→__hello__world__</a></span></span>
24728 percent-encoding and + signs in comments (T28410)
24732 [[ABC%33D% ++]] [[ABC%33D% ++|+%20]]
24734 <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>
24737 # Parsoid doesn't support this yet: see T75581
24738 # but it *should* omit the 'src' attribute if the image is bad.
24739 # PHP side of tests was disabled in
24740 # mediawiki/core:6bd31e7d95161a6e88fa86df60871051da997c3c
24741 # because of issues in the PHP parserTests infrastructure
24742 # (but the output below is indeed what the PHP side emits)
24744 Bad images - basic functionality
24747 !! html/php+disabled
24749 <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>
24753 Bad images - T18039: text after bad image disappears
24758 !! html/php+disabled
24764 <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>
24769 Verify that displaytitle works (T24501) no displaytitle
24773 wgAllowDisplayTitle=true
24774 wgRestrictDisplayTitle=false
24776 this is not the the title
24779 <p>this is not the the title
24784 Verify that displaytitle works (T24501) RestrictDisplayTitle=false
24789 wgAllowDisplayTitle=true
24790 wgRestrictDisplayTitle=false
24792 this is not the the title
24793 {{DISPLAYTITLE:whatever}}
24796 <p>this is not the the title
24801 Verify that displaytitle works (T24501) RestrictDisplayTitle=true mismatch
24806 wgAllowDisplayTitle=true
24807 wgRestrictDisplayTitle=true
24809 this is not the the title
24810 {{DISPLAYTITLE:whatever}}
24813 <p>this is not the the title
24818 Verify that displaytitle works (T24501) RestrictDisplayTitle=true matching
24823 wgAllowDisplayTitle=true
24824 wgRestrictDisplayTitle=true
24826 this is not the the title
24827 {{DISPLAYTITLE:screen}}
24830 <p>this is not the the title
24835 Verify that displaytitle works (T24501) AllowDisplayTitle=false
24840 wgAllowDisplayTitle=false
24842 this is not the the title
24843 {{DISPLAYTITLE:screen}}
24846 <p>this is not the the title
24847 <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>
24852 Verify that displaytitle works (T24501) AllowDisplayTitle=false no DISPLAYTITLE
24857 wgAllowDisplayTitle=false
24859 this is not the the title
24862 <p>this is not the the title
24867 Verify that displaytitle handles inline CSS styles (T28547) - rejected value
24872 wgAllowDisplayTitle=true
24873 wgRestrictDisplayTitle=true
24875 this is not the the title
24876 {{DISPLAYTITLE:<span style="display: none;">s</span>creen}}
24878 <span style="/* attempt to bypass $wgRestrictDisplayTitle */">s</span>creen
24879 <p>this is not the the title
24884 Verify that displaytitle handles inline CSS styles (T28547) - accepted value
24889 wgAllowDisplayTitle=true
24890 wgRestrictDisplayTitle=true
24892 this is not the the title
24893 {{DISPLAYTITLE:<span style="color: red;">s</span>creen}}
24895 <span style="color: red;">s</span>creen
24896 <p>this is not the the title
24901 Page status indicators: Empty name is invalid
24905 <indicator name=" "></indicator>
24906 <indicator></indicator>
24908 <p><span class="error"><strong>Error:</strong> Page status indicators' <code>name</code> attribute must not be empty.</span>
24909 <span class="error"><strong>Error:</strong> Page status indicators' <code>name</code> attribute must not be empty.</span>
24914 Page status indicators: Weird syntaxes that are okay
24918 <indicator name="empty" />
24919 <indicator name="name"></indicator>
24928 Page status indicators: Torture test
24932 <indicator name="01">hello world</indicator>
24933 <indicator name="02">[[Main Page]]</indicator>
24934 <indicator name="03">[[File:Foobar.jpg|25px|link=]]</indicator>
24935 <indicator name="04">[[File:Foobar.jpg|25px]]</indicator>
24936 <indicator name="05">*foo
24938 <indicator name="06"><nowiki>foo</nowiki></indicator>
24939 <indicator name="07"> Preformatted</indicator>
24940 <indicator name="08"><div>Broken tag</indicator>
24941 <indicator name="09">{| class=wikitable
24944 <indicator name="10">Two
24946 paragraphs</indicator>
24949 02=<a href="/wiki/Main_Page" title="Main Page">Main Page</a>
24950 03=<img alt="Foobar.jpg" src="http://example.com/images/thumb/3/3a/Foobar.jpg/25px-Foobar.jpg" decoding="async" 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" />
24951 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" decoding="async" 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>
24952 05=<ul><li>foo</li>
24956 07=<pre>Preformatted
24958 08=<div>Broken tag</div>
24960 09=<table class="wikitable">
24977 preload: check <noinclude> and <includeonly>
24981 Hello <noinclude>cruel</noinclude><includeonly>kind</includeonly> world.
24987 preload: check <onlyinclude>
24991 Goodbye <onlyinclude>Hello world</onlyinclude>
24997 preload: can pass tags through if we want to
25001 <includeonly><</includeonly>includeonly>Hello world<includeonly><</includeonly>/includeonly>
25003 <includeonly>Hello world</includeonly>
25007 preload: check that it doesn't try to do tricks
25011 * <!-- Hello --> ''{{world}}'' {{<includeonly>subst:</includeonly>How are you}}{{ {{{|safesubst:}}} #if:1|2|3}}
25013 * <!-- Hello --> ''{{world}}'' {{subst:How are you}}{{ {{{|safesubst:}}} #if:1|2|3}}
25017 Play a bit with r67090 and T5158
25019 <div style="width:50% !important"> </div>
25020 <div style="width:50% !important"> </div>
25021 <div style="width:50% !important"> </div>
25022 <div style="border : solid;"> </div>
25024 <div style="width:50% !important"> </div>
25025 <div style="width:50% !important"> </div>
25026 <div style="width:50% !important"> </div>
25027 <div style="border : solid;"> </div>
25030 <div style="width:50% !important" data-parsoid='{"stx":"html"}'><span typeof="mw:Entity" data-parsoid='{"srcContent":" "}'> </span></div>
25031 <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>
25032 <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>
25033 <div style="border : solid;" data-parsoid='{"stx":"html"}'><span typeof="mw:Entity" data-parsoid='{"srcContent":" "}'> </span></div>
25038 French spaces in wikitext
25040 foo ! bar ? bat 50 % is less than 75 %.
25042 Hello : this ; is « something ‹ else › again »
25044 <p>foo ! bar ? bat 50 % is less than 75 %.
25045 </p><p>Hello : this ; is « something ‹ else › again »
25049 # It would be reasonable for Parsoid and PHP to differ here.
25050 # The PHP behavior is arguably a bug.
25052 Corner case: french spaces in definition list
25056 <dl><dt>foo </dt>
25061 T5158: Test for French spaces in attributes
25063 <br style=" clear : both ; " />
25065 <p><br style="clear : both ;" />
25070 HTML5 data attributes
25072 <span data-foo="bar">Baz</span>
25073 <p data-abc-def_hij="">Quuz</p>
25075 <p><span data-foo="bar">Baz</span>
25077 <p data-abc-def_hij="">Quuz</p>
25080 <p><span data-foo="bar" data-parsoid='{"stx":"html"}'>Baz</span></p>
25081 <p data-abc-def_hij="" data-parsoid='{"stx":"html"}'>Quuz</p>
25085 Strip reserved data attributes
25087 <div data-mw="foo" data-parsoid="bar" data-mw-someext="baz" data-ok="fred" data-ooui="xyzzy" data-bad:ns="ns">d</div>
25089 <div data-ok="fred">d</div>
25092 <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>
25096 percent-encoding and + signs in internal links (T28410)
25098 [[User:+%]] [[Page+title%]]
25099 [[%+]] [[%+|%20]] [[%+ ]] [[%+r]]
25100 [[%]] [[+]] [[File:%+abc%39|foo|[[bar]]]]
25101 [[%33%45]] [[%33%45+]]
25103 <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>
25104 <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>
25105 <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>
25106 <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>
25109 <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>
25110 <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>
25111 <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>
25112 <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>
25116 Special characters in embedded file links (T29679)
25118 [[File:Contains & ampersand.jpg]]
25119 [[File:Does not exist.jpg|Title with & ampersand]]
25121 <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>
25122 <a href="/index.php?title=Special:Upload&wpDestFile=Does_not_exist.jpg" class="new" title="File:Does not exist.jpg">Title with & ampersand</a>
25125 <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>
25126 <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>
25130 Confirm that 'apos' named character reference doesn't make it to output (not legal in HTML 4)
25132 Text's been normalized?
25134 <p>Text's been normalized?
25139 T21052 U+3000 IDEOGRAPHIC SPACE should terminate free external links
25141 http://www.example.org/ <-- U+3000 (vim: ^Vu3000)
25143 <p><a rel="nofollow" class="external free" href="http://www.example.org/">http://www.example.org/</a> <-- U+3000 (vim: ^Vu3000)
25148 T21052 U+3000 IDEOGRAPHIC SPACE should terminate bracketed external links
25150 [http://www.example.org/ ideograms]
25152 <p><a rel="nofollow" class="external text" href="http://www.example.org/">ideograms</a>
25157 T21052 U+3000 IDEOGRAPHIC SPACE should terminate external images links
25159 http://www.example.org/pic.png <-- U+3000 (vim: ^Vu3000)
25161 <p><img src="http://www.example.org/pic.png" alt="pic.png"/> <-- U+3000 (vim: ^Vu3000)
25185 T33098 Template which includes system messages which includes the template
25189 <p><span class="error">Template loop detected: <a href="/wiki/Template:Identical" title="Template:Identical">Template:Identical</a></span>
25190 <span class="error">Template loop detected: <a href="/wiki/Template:Identical" title="Template:Identical">Template:Identical</a></span>
25195 T33490 Turkish: ucfirst 'blah'
25206 T33490 Turkish: ucfirst 'ix'
25217 T33490 Turkish: lcfirst 'BLAH'
25228 T33490 Turkish: ucfırst (with a dotless i)
25234 <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>
25239 T33490 ucfırst (with a dotless i) with English language
25245 <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>
25249 # Note that Parsoid doesn't emit an explicit TOC.
25250 # Note also that the html2wt direction tends to emit an extra newline
25251 # between the __TOC__ magicword and the first heading unless *both*
25252 # the <meta> and the <h2> have a data-parsoid attribute set (even if
25256 T28375: TOC with italics
25258 title=[[Main Page]]
25261 ==''Lost'' episodes==
25263 <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>
25265 <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>
25269 <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>
25272 <meta property="mw:PageProp/toc" data-parsoid='{}'/>
25273 <h2 id="Lost_episodes" data-parsoid='{}'><i>Lost</i> episodes</h2>
25277 T28375: TOC with bold
25279 title=[[Main Page]]
25282 =='''should be bold''' then normal text==
25284 <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>
25286 <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>
25290 <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>
25293 <meta property="mw:PageProp/toc" data-parsoid='{}'/>
25294 <h2 id="should_be_bold_then_normal_text" data-parsoid='{}'><b>should be bold</b> then normal text</h2>
25298 T35845: Headings become cursive in TOC when they contain an image
25300 title=[[Main Page]]
25303 ==Image [[Image:foobar.jpg]]==
25305 <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>
25307 <li class="toclevel-1 tocsection-1"><a href="#Image"><span class="tocnumber">1</span> <span class="toctext">Image</span></a></li>
25311 <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" decoding="async" 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>
25314 <meta property="mw:PageProp/toc" data-parsoid='{}'/>
25315 <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>
25319 T35845 (2): Headings become bold in TOC when they contain a blockquote
25321 title=[[Main Page]]
25324 ==<blockquote>Quote</blockquote>==
25326 <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>
25328 <li class="toclevel-1 tocsection-1"><a href="#Quote"><span class="tocnumber">1</span> <span class="toctext">Quote</span></a></li>
25332 <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>
25335 <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>
25337 <li class="toclevel-1 tocsection-1"><a href="#Quote"><span class="tocnumber">1</span> <span class="toctext">Quote</span></a></li>
25341 <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>
25343 <meta property="mw:PageProp/toc" data-parsoid='{}'/>
25344 <h2 id="Quote" data-parsoid='{}'><blockquote><p>Quote</p></blockquote></h2>
25348 Unclosed tags in TOC
25350 wgFragmentMode=[ 'html5', 'legacy' ]
25352 title=[[Main Page]]
25356 <small>Hanc marginis exiguitas non caperet.</small>
25359 <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>
25361 <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>
25365 <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>
25366 <p><small>Hanc marginis exiguitas non caperet.</small>
25370 <meta property="mw:PageProp/toc" data-parsoid='{}'/>
25371 <h2 id="Proof:_2_<_3" data-parsoid='{}'><span id="Proof:_2_.3C_3" typeof="mw:FallbackId"></span>Proof: 2 < 3</h2>
25372 <p><small>Hanc marginis exiguitas non caperet.</small>
25377 Multiple tags in TOC
25380 ==<i>Foo</i> <b>Bar</b>==
25382 ==<i>Foo</i> <blockquote>Bar</blockquote>==
25384 <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>
25386 <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>
25387 <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>
25391 <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>
25392 <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>
25395 <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>
25397 <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>
25398 <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>
25402 <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>
25403 <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>
25405 <meta property="mw:PageProp/toc" data-parsoid='{}'/>
25406 <h2 id="Foo_Bar" data-parsoid='{}'><i data-parsoid='{"stx":"html"}'>Foo</i> <b data-parsoid='{"stx":"html"}'>Bar</b></h2>
25408 <h2 id="Foo_Bar_2" data-parsoid='{}'><i data-parsoid='{"stx":"html"}'>Foo</i> <blockquote><p>Bar</p></blockquote></h2>
25411 # Don't expect Parsoid to roundtrip this until the php parser comes closer to
25412 # html5 tag parsing.
25414 Tags with parameters in TOC
25419 ==<sup class="in-h2">Hello</sup>==
25421 ==<sup class="a > b">Evilbye</sup>==
25423 <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>
25425 <li class="toclevel-1 tocsection-1"><a href="#Hello"><span class="tocnumber">1</span> <span class="toctext"><sup>Hello</sup></span></a></li>
25426 <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>
25430 <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>
25431 <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>
25434 <meta property="mw:PageProp/toc" />
25435 <h2 id="Hello"><sup class="in-h2" data-parsoid='{"stx":"html"}'>Hello</sup></h2>
25437 <h2 id='b">Evilbye'><span id="b.22.3EEvilbye" typeof="mw:FallbackId"></span><sup class="a " data-parsoid='{"stx":"html"}'> b">Evilbye</sup></h2>
25441 span tags with directionality in TOC
25444 ==<span dir="ltr">C++</span>==
25446 ==<span dir="rtl">זבנג!</span>==
25448 ==<span style="font-style: italic">The attributes on these span tags must be deleted from the TOC</span>==
25450 ==<span style="font-style: italic" dir="ltr">All attributes on these span tags must be deleted from the TOC</span>==
25452 ==<span dir="ltr" style="font-style: italic">Attributes after dir on these span tags must be deleted from the TOC</span>==
25454 <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>
25456 <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>
25457 <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>
25458 <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>
25459 <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>
25460 <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>
25464 <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>
25465 <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>
25466 <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>
25467 <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>
25468 <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>
25471 <meta property="mw:PageProp/toc" data-parsoid='{}'/>
25472 <h2 id="C++" data-parsoid='{}'><span id="C.2B.2B" typeof="mw:FallbackId"></span><span dir="ltr">C++</span></h2>
25473 <h2 id="זבנג!"><span id=".D7.96.D7.91.D7.A0.D7.92.21" typeof="mw:FallbackId"></span><span dir="rtl">זבנג!</span></h2>
25474 <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>
25475 <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>
25476 <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>
25480 T74884: bdi element in ToC
25483 ==<bdi>test</bdi>==
25485 <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>
25487 <li class="toclevel-1 tocsection-1"><a href="#test"><span class="tocnumber">1</span> <span class="toctext"><bdi>test</bdi></span></a></li>
25491 <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>
25494 <meta property="mw:PageProp/toc" data-parsoid='{}'/>
25495 <h2 id="test" data-parsoid='{}'><bdi>test</bdi></h2>
25499 T35715: s/strike element in ToC
25502 ==<s>test</s> test <strike>test</strike>==
25504 <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>
25506 <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>
25510 <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>
25513 <meta property="mw:PageProp/toc" data-parsoid='{}'/>
25514 <h2 id="test_test_test" data-parsoid='{}'><s>test</s> test <strike>test</strike></h2>
25518 T198618: style element in ToC
25523 ==<style>.foo {}</style>Style<style>.bar {}</style>==
25525 <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>
25527 <li class="toclevel-1 tocsection-1"><a href="#Style"><span class="tocnumber">1</span> <span class="toctext">Style</span></a></li>
25531 <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>
25534 <meta property="mw:PageProp/toc" data-parsoid="{}"/>
25535 <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>
25539 T198618: script element in ToC
25544 ==<html><script>alert(1);</script></html>Script<html><script>alert(1);</script></html>==
25546 <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>
25548 <li class="toclevel-1 tocsection-1"><a href="#Script"><span class="tocnumber">1</span> <span class="toctext">Script</span></a></li>
25552 <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>
25555 <meta property="mw:PageProp/toc" data-parsoid='{}'/>
25556 <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>
25560 Empty <p> tag in TOC, removed by Sanitizer (T92892)
25565 <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>
25567 <li class="toclevel-1 tocsection-1"><a href="#x"><span class="tocnumber">1</span> <span class="toctext">x</span></a></li>
25571 <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>
25574 <meta property="mw:PageProp/toc" data-parsoid='{}'/>
25575 <h2 id="x" data-parsoid='{}'>x</h2>
25581 == {{int:headline_sample}} ==
25585 T34057: Title needed when expanding <h> nodes.
25587 title=[[Main Page]]
25591 <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>
25596 Strip marker in urlencode
25598 {{urlencode:x<nowiki/>y}}
25599 {{urlencode:x<nowiki/>y|wiki}}
25600 {{urlencode:x<nowiki/>y|path}}
25601 {{urlencode:x<pre id="one">two</pre>y}}
25629 Strip marker in formatNum
25631 {{formatnum:1<nowiki/>2}}
25632 {{formatnum:1<nowiki/>2|R}}
25640 Check noCommafy in formatNum
25644 {{formatnum:123456.78}}
25645 {{formatnum:123456.78|NOSEP}}
25653 Wrong option for formatNum (T58199)
25655 {{formatnum:1,234.56|Random}}
25656 {{formatnum:1,234.56|EVERYTHING}}
25657 {{formatnum:1234.56|any argument that has the string 'NOSEP'}}
25666 Strip marker in grammar
25670 {{grammar:elative|foo<nowiki/>bar}}
25677 Strip marker in padleft
25679 {{padleft:|2|x<nowiki/>y}}
25686 Strip marker in padright
25688 {{padright:|2|x<nowiki/>y}}
25695 Strip marker in anchorencode
25697 {{anchorencode:x<nowiki/>y}}
25702 <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>
25706 nowiki inside link inside heading (T20295)
25708 ==[[foo|x<nowiki>y</nowiki>z]]==
25710 <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>
25715 new support for bdi element (T33817)
25717 <p dir="rtl" lang="he">ולדימיר לנין (ברוסית: <bdi lang="ru">Владимир Ленин</bdi>, 24 באפריל 1870–22 בינואר 1924) הוא מנהיג פוליטי קומוניסטי רוסי.</p>
25719 <p dir="rtl" lang="he">ולדימיר לנין (ברוסית: <bdi lang="ru">Владимир Ленин</bdi>, 24 באפריל 1870–22 בינואר 1924) הוא מנהיג פוליטי קומוניסטי רוסי.</p>
25724 Ignore pipe between table row attributes
25728 |- id=foo | style='color: red'
25736 <tr id="foo" style="color: red">
25743 Language parser function
25752 Padleft and padright (default 0-padding)
25761 <p><span typeof="mw:Transclusion" data-mw='{"parts":[{"template":{"target":{"wt":"padleft:xyz","function":"padleft"},"params":{"1":{"wt":"5"}},"i":0}}]}'>00xyz</span>
25762 <span typeof="mw:Transclusion" data-mw='{"parts":[{"template":{"target":{"wt":"padright:xyz","function":"padright"},"params":{"1":{"wt":"5"}},"i":0}}]}'>xyz00</span></p>
25766 Padleft and padright (partial fill)
25768 {{padleft:xyz|6|ab}}
25769 {{padright:xyz|6|ab}}
25775 <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>
25776 <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>
25780 Padleft and padright as substr
25782 {{padleft:|3|abcde}}
25783 {{padright:|3|abcde}}
25789 <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>
25790 <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>
25794 Padleft and padright with non-numerical length (T180403)
25796 {{padleft:abcdef|junk}}
25797 {{padright:abcdef|junk}}
25805 Special parser function
25807 {{#special:RandomPage}}
25808 {{#special:BaDtItLe}}
25809 {{#special:Foobar}}
25818 T36939 - Case insensitive link parsing ([HttP://])
25820 [HttP://MediaWiki.Org/]
25822 <p><a rel="nofollow" class="external autonumber" href="HttP://MediaWiki.Org/">[1]</a>
25825 <p><a rel="mw:ExtLink" class="external autonumber" href="HttP://MediaWiki.Org/"></a></p>
25829 T36939 - Case insensitive link parsing ([HttP:// title])
25831 [HttP://MediaWiki.Org/ MediaWiki]
25833 <p><a rel="nofollow" class="external text" href="HttP://MediaWiki.Org/">MediaWiki</a>
25838 T36939 - Case insensitive link parsing (HttP://)
25840 HttP://MediaWiki.Org/
25842 <p><a rel="nofollow" class="external free" href="HttP://MediaWiki.Org/">HttP://MediaWiki.Org/</a>
25845 <p><a rel="mw:ExtLink" class="external free" href="HttP://MediaWiki.Org/">HttP://MediaWiki.Org/</a></p>
25863 <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>
25864 <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>
25865 <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>
25866 <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>
25867 <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>
25873 ### Parsoid-specific tests
25874 ### Parsoid-PHP parser incompatibilities
25877 1. SOL-sensitive wikitext tokens as template-args
25879 parsoid=wt2html,wt2wt
25885 <ul><li>a</li></ul>
25886 <ol><li>a</li></ol>
25887 <dl><dd>a</dd></dl>
25889 <span about="#mwt1" typeof="mw:Transclusion">
25890 </span><ul about="#mwt1"><li>a</li>
25892 <span about="#mwt2" typeof="mw:Transclusion">
25893 </span><ol about="#mwt2"><li>a</li>
25895 <span about="#mwt3" typeof="mw:Transclusion">
25896 </span><dl about="#mwt3"><dd>a</dd>
25900 #### -----------------------------------------------------------------
25901 #### Parsoid-specific functionality tests
25902 #### -----------------------------------------------------------------
25904 # T65642/T68749: Formatting elt fixup around images.
25905 # We know wt2wt will fail, but we expect selser to pass.
25906 # Due to the nature of our testing, wt2wt and selser tests will enter the
25907 # blacklist and we'll catch selser regressions based on changes to the
25908 # blacklist entries for selser tests.
25910 1. Treebuilder fixup of formatting elt
25912 parsoid=wt2html,wt2wt
25917 [[Image:Foobar.jpg|right|Test]]
25925 </small></p><small>
25926 <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" decoding="async" width="1941" height="220" /></a></div>
25927 </small><p><small></small>
25929 </td></tr></tbody></table>
25933 <p><small data-parsoid='{"stx":"html","autoInsertedEnd":true}'></small></p><small data-parsoid='{"stx":"html","autoInsertedEnd":true,"autoInsertedStart":true}'>
25934 <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>
25935 <p><small data-parsoid='{"stx":"html","autoInsertedStart":true}'></small></p></td></tr>
25940 2. Treebuilder fixup of formatting elt
25942 parsoid=wt2html,wt2wt
25944 '''foo[[File:Foobar.jpg|thumb|caption]]bar'''
25946 <small>[[Image:Foobar.jpg|right|300px]]</small>
25948 <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" decoding="async" 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>
25949 </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" decoding="async" 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>
25951 <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>
25953 <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>
25957 3. Treebuilder fixup of formatting elt
25959 parsoid=wt2html,wt2wt
25961 <small>'''foo[[File:Foobar.jpg|thumb|caption]]bar'''</small>
25963 <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" decoding="async" 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>
25966 <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>
25970 4. Treebuilder fixup of formatting elt: formatting tags around captionless images
25972 parsoid=wt2html,wt2wt
25974 '''<small>[[Image:Foobar.jpg|right|300px]]</small>'''
25976 <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" decoding="async" 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>
25978 <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>
25981 #### ----------------------------------------------------------------
25982 #### Parsoid-only testing of Parsoid's impl of LST
25983 #### Not implemented yet, see
25984 #### https://www.mediawiki.org/wiki/Parsoid/HTML_based_LST
25985 #### ----------------------------------------------------------------
25987 ## We still need to support serializing the older format while content is stored.
25989 LST Sections: Backwards compatibility
25992 "suppressErrors": true,
25993 "modes": ["html2wt"]
25996 <section begin="2011-05-16" />
25997 <section end="2014-04-10 (MW 1.23wmf22)" />
25999 <p><meta typeof="mw:Extension/LabeledSectionTransclusion/begin" content="2011-05-16"/>
26000 <meta typeof="mw:Extension/LabeledSectionTransclusion/end" content="2014-04-10 (MW 1.23wmf22)"/></p>
26004 LST Sections: Newfangled approach
26006 <section begin="2011-05-16" />
26007 <section end="2014-04-10 (MW 1.23wmf22)" />
26009 <p><span typeof="mw:Extension/section" about="#mwt4" data-mw='{"name":"section","attrs":{"begin":"2011-05-16"}}'>
26011 <span typeof="mw:Extension/section" about="#mwt6" data-mw='{"name":"section","attrs":{"end":"2014-04-10 (MW 1.23wmf22)"}}'>
26015 #--------- Test stripping of empty nodes in template content ----------
26018 Empty LI and TR nodes should be stripped from template content
26023 <ul about="#mwt1" typeof="mw:Transclusion" data-mw='{"parts":[{"template":{"target":{"wt":"EmptyLITest","href":"./Template:EmptyLITest"},"params":{},"i":0}}]}'>
26027 <table about="#mwt2" typeof="mw:Transclusion" data-mw='{"parts":[{"template":{"target":{"wt":"EmptyTRTest","href":"./Template:EmptyTRTest"},"params":{},"i":0}}]}'>
26040 Empty LI and TR nodes should not be stripped from top-level content
26054 <li class='mw-empty-elt'></li>
26059 <tr class='mw-empty-elt'></tr>
26068 Empty TR nodes should not be stripped if they have any attributes set
26070 {{EmptyTRWithHTMLAttrTest}}
26072 <table about="#mwt1" typeof="mw:Transclusion" data-mw='{"parts":[{"template":{"target":{"wt":"EmptyTRWithHTMLAttrTest","href":"./Template:EmptyTRWithHTMLAttrTest"},"params":{},"i":0}}]}'>
26073 <tr align='center'></tr>
26074 <tr><td>foo</td></tr>
26075 <tr align='center'></tr>
26076 <tr><td>bar</td></tr>
26080 #### ----------------------------------------------------------------
26081 #### The following section of tests are primarily to test
26082 #### wikitext escaping capabilities of Parsoid. Given that
26083 #### escaping can be done any number of ways, the wikitext (input)
26084 #### is always adjusted to reflect how Parsoid adds nowiki
26087 #### We are marking several tests as parsoid-only since the
26088 #### HTML in the result section is different from what the
26089 #### PHP parser generates for it.
26090 #### ----------------------------------------------------------------
26093 #### --------------- Headings ---------------
26095 #### 1. Nested inside html <h1>=foo=</h1>
26096 #### 2. Outside heading nest on a single line <h1>foo</h1>*bar
26097 #### 3. Nested inside html with wikitext split by html tags
26098 #### 4. No escape needed
26099 #### 5. Empty headings <h1></h1>
26100 #### 6. Heading chars in SOL context
26101 #### ----------------------------------------
26103 Headings: 0. Unnested
26113 <p>=foo<i>a</i>=</p>
26115 <nowiki>=foo=</nowiki>
26117 <nowiki> </nowiki>=foo=
26119 <nowiki>=foo=</nowiki>
26121 =foo''a''<nowiki>=</nowiki>
26124 # New headings and existing headings are handled differently
26126 Headings: 1. Nested inside html
26134 <h1 data-parsoid=''>=foo=</h1>
26135 <h2 data-parsoid=''>=foo=</h2>
26136 <h3 data-parsoid=''>=foo=</h3>
26137 <h4 data-parsoid=''>=foo=</h4>
26138 <h5 data-parsoid=''>=foo=</h5>
26139 <h6 data-parsoid=''>=foo=</h6>
26147 =<nowiki>=foo=</nowiki>=
26148 ==<nowiki>=foo=</nowiki>==
26149 ===<nowiki>=foo=</nowiki>===
26150 ====<nowiki>=foo=</nowiki>====
26151 =====<nowiki>=foo=</nowiki>=====
26152 ======<nowiki>=foo=</nowiki>======
26157 Headings: 2. Outside heading nest on a single line <h1>foo</h1>*bar
26166 <nowiki>*</nowiki>bar
26172 <nowiki>=bar=</nowiki>
26176 Headings: 3. Nested inside html with wikitext split by html tags
26180 <h1>=<b>bold</b>foo=</h1>
26182 = ='''bold'''foo= =
26186 Headings: 4a. No escaping needed (testing just h1 and h2)
26197 <h1><i>=</i>foo=</h1>
26217 Headings: 4b. No escaping needed (inside p-tags)
26234 Headings: 4c. Short headings (1)
26241 <nowiki>===</nowiki>
26247 # in the html2wt direction we emit '= = =' or '=<nowiki>=</nowiki>='
26249 Headings: 4d. Short headings (2)
26251 parsoid=wt2html,html2html
26262 <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>
26263 <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>
26264 <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>
26269 <h1 id="="><span id=".3D" typeof="mw:FallbackId"></span>=</h1>
26270 <h1 id="=="><span id=".3D.3D" typeof="mw:FallbackId"></span>==</h1>
26271 <h2 id="=_2"><span id=".3D_2" typeof="mw:FallbackId"></span>=</h2>
26275 Headings: 5. Empty headings
26279 <h1 data-parsoid='{}'></h1>
26281 <h2 data-parsoid='{}'></h2>
26283 <h3 data-parsoid='{}'></h3>
26285 <h4 data-parsoid='{}'></h4>
26287 <h5 data-parsoid='{}'></h5>
26289 <h6 data-parsoid='{}'></h6>
26299 =====<nowiki/>=====
26301 ======<nowiki/>======
26305 Headings: 6a. Heading chars in SOL context (with trailing spaces)
26315 <nowiki>=a=</nowiki>
26317 <nowiki>=a=</nowiki>
26319 <nowiki>=a=</nowiki>
26323 Headings: 6b. Heading chars in SOL context (with trailing newlines)
26336 <nowiki>=a=</nowiki>
26339 <nowiki>=a=</nowiki>
26342 <nowiki>=a=</nowiki>
26347 Headings: 6c. Heading chars in SOL context (leading newline break)
26355 <nowiki>=b=</nowiki>
26359 Headings: 6d. Heading chars in SOL context (with interspersed comments)
26363 <!--c0--><p>=a=</p>
26365 <!--c1--><p>=a=</p> <!--c2--> <!--c3-->
26367 <!--c0--><nowiki>=a=</nowiki>
26369 <!--c1--><nowiki>=a=</nowiki> <!--c2--> <!--c3-->
26373 Headings: 6d. Heading chars in SOL context (No escaping needed)
26383 Headings: 7. Insert a newline between new content and headings
26389 <h2 data-parsoid='{}'>A</h2>
26390 <p data-parsoid='{}'>a</p>
26401 Headings: Used as horizontal rule
26403 wgFragmentMode=[ 'html5', 'legacy' ]
26409 <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>
26412 <h6 id="==="><span id=".3D.3D.3D" typeof="mw:FallbackId"></span>===</h6>
26415 #### --------------- Lists ---------------
26416 #### 0. Outside nests (*foo, etc.)
26417 #### 1. Nested inside html <ul><li>*foo</li></ul>
26418 #### 2. Inside definition lists
26419 #### 3. Only bullets at start should be escaped
26420 #### 4. No escapes needed
26421 #### 5. No unnecessary escapes
26422 #### 6. Escape bullets in SOL position
26423 #### 7. Escape bullets in a multi-line context
26424 #### ----------------------------------------
26427 Lists: 0. Outside nests
26437 <nowiki>*</nowiki>foo
26439 <nowiki>#</nowiki>foo
26441 <nowiki>;</nowiki>Foo<nowiki>:</nowiki>bar
26444 ## Making these next 3 tests Parsoid-only since they are html2wt tests
26445 ## to test wikitext escaping, and insignificant whitespace diffs
26446 ## cause PHP parser tests to barf
26448 Lists: 1. Nested inside html (No unnecessary escapes)
26457 <li data-parsoid='{}'>*foo</li>
26458 <li data-parsoid='{}'>#foo</li>
26459 <li data-parsoid='{}'>:foo</li>
26460 <li data-parsoid='{}'>;foo</li>
26468 <li data-parsoid='{}'>*foo</li>
26469 <li data-parsoid='{}'>#foo</li>
26470 <li data-parsoid='{}'>:foo</li>
26471 <li data-parsoid='{}'>;foo</li>
26478 *<nowiki>*foo</nowiki>
26479 *<nowiki>#foo</nowiki>
26480 *<nowiki>:foo</nowiki>
26481 *<nowiki>;foo</nowiki>
26487 #<nowiki>*foo</nowiki>
26488 #<nowiki>#foo</nowiki>
26489 #<nowiki>:foo</nowiki>
26490 #<nowiki>;foo</nowiki>
26494 Lists: 2. Inside definition lists
26498 <dl><dt>;foo</dt></dl>
26499 <dl><dt>:foo</dt></dl>
26502 <dl><dd>:foo</dd></dl>
26506 ; <nowiki>:foo</nowiki>
26508 ; <nowiki>:foo</nowiki>
26515 Lists: 3. Only bullets at start of text in wikitext-generated HTML should be escaped
26521 <li data-parsoid='{}'>*foo<i>it</i>*bar</li>
26525 *<nowiki>*foo</nowiki>''it''*bar
26529 Lists: 4. No escapes needed
26542 <li><a rel="mw:WikiLink" href="Foo" title="Foo">Foo</a>: bar
26546 <li><a rel="mw:WikiLink" href="Foo" title="Foo">Foo</a>*bar
26560 Lists: 5. No unnecessary escapes
26564 <ul><li> bar <span>[[foo]]</span></li></ul>
26565 <ul><li> =bar <span>[[foo]]</span></li></ul>
26566 <ul><li> [[bar <span>[[foo]]</span></li></ul>
26567 <ul><li> ]]bar <span>[[foo]]</span></li></ul>
26568 <ul><li> =bar <span>foo]]</span>=</li></ul>
26569 <ul><li> <s></s>: a</li></ul>
26570 <ul><li> <i>* foo</i></li></ul>
26573 * bar <span><nowiki>[[foo]]</nowiki></span>
26575 * =bar <span><nowiki>[[foo]]</nowiki></span>
26577 * [[bar <span><nowiki>[[foo]]</nowiki></span>
26579 * ]]bar <span><nowiki>[[foo]]</nowiki></span>
26581 * =bar <span>foo]]</span>=
26589 Lists: 6. Escape bullets in SOL position
26593 <p><!--cmt-->*foo</p>
26595 <!--cmt--><nowiki>*</nowiki>foo
26599 Lists: 7. Escape bullets in a multi-line context
26608 <nowiki>*</nowiki>b
26612 Lists: 8. Escape colons only if not present in tags
26616 <dl><dt>a:b<i>c:d</i></dt></dl>
26618 ; <nowiki>a:b</nowiki>''c:d''
26621 #### --------------- HRs ---------------
26622 #### 1. Single line
26623 #### -----------------------------------
26626 HRs: 1. Single line
26634 ----<nowiki>----</nowiki>
26639 #### --------------- Tables ---------------
26640 #### 1a. Simple example
26641 #### 1b. No escaping needed (!foo)
26642 #### 1c. No escaping needed (|foo)
26643 #### 1d. No escaping needed (|}foo)
26645 #### 2a. Nested in td (<td>foo|bar</td>)
26646 #### 2b. Nested in td (<td>foo||bar</td>)
26647 #### 2c. Nested in td -- no escaping needed(<td>foo!!bar</td>)
26649 #### 3a. Nested in th (<th>foo!bar</th>)
26650 #### 3b. Nested in th (<th>foo!!bar</th>)
26651 #### 3c. Nested in th -- no escaping needed(<th>foo||bar</th>)
26655 #### 4c. No escaping needed
26656 #### --------------------------------------
26659 Tables: 1a. Simple example
26667 <nowiki>{|</nowiki>
26672 Tables: 1b. No escaping needed
26683 Tables: 1c. No escaping needed
26694 Tables: 1d. No escaping needed
26705 Tables: 2a. Nested in td
26710 <td>foo|bar</td></tr>
26711 <tr><td>x<div>a|b</div></td>
26715 |<nowiki>foo|bar</nowiki>
26717 |x<div><nowiki>a|b</nowiki></div>
26725 <td>x<div>a|b</div>
26726 </td></tr></tbody></table>
26730 Tables: 2b. Nested in td
26736 <td>a<i>b||c</i></td>
26737 <td>a<i><div>b||c</div></i></td>
26738 </tr></tbody></table>
26741 |<nowiki>foo||bar</nowiki>
26742 |a''<nowiki>b||c</nowiki>''
26743 |a''<div><nowiki>b||c</nowiki></div>''
26752 <td>a<i><div>b||c</div></i>
26758 Tables: 2c. Nested in td -- no escaping needed
26774 Tables: 3a. Nested in th
26790 Tables: 3b. Nested in th
26795 <tr><th>foo!!bar</th>
26796 <th><i>foo|bar</i></th>
26797 <th><i>foo!!bar</i></th>
26798 <th><i><span>foo!!bar</span></i></th>
26799 </tr></tbody></table>
26802 !<nowiki>foo!!bar</nowiki>
26803 !''<nowiki>foo|bar</nowiki>''
26804 !''<nowiki>foo!!bar</nowiki>''
26805 !''<span><nowiki>foo!!bar</nowiki></span>''
26814 <th><i>foo!!bar</i>
26816 <th><i><span>foo!!bar</span></i>
26822 Tables: 3c. Nested in th
26827 <tr><th>foo||bar</th>
26828 <th><span typeof="mw:Nowiki">foo||bar</span></th>
26829 </tr></tbody></table>
26832 !<nowiki>foo||bar</nowiki>
26833 !<nowiki>foo||bar</nowiki>
26846 Tables: 4a. Escape -
26862 |<nowiki>-bar</nowiki>
26867 Tables: 4b. Escape +
26883 |<nowiki>+bar</nowiki>
26888 Tables: 4c. No escaping needed
26893 <tr><td>foo-bar</td><td>foo+bar</td></tr>
26894 <tr><td><i>foo</i>-bar</td><td><i>foo</i>+bar</td></tr>
26900 <div>a|b</div></td>
26945 Tables: 4d. No escaping needed
26950 <tbody><tr><td><a rel="mw:WikiLink" href="./Foo" title="Foo">Foo</a>-bar</td>
26951 <td data-parsoid='{"startTagSrc":"|","attrSepSrc":"|"}'>+1</td>
26952 <td data-parsoid='{"startTagSrc":"|","attrSepSrc":"|"}'>-2</td></tr>
26963 <td><a href="/wiki/Foo" title="Foo">Foo</a>-bar
26973 Tables: 4e. Escape }
26978 <tr><td>}</td></tr>
26979 <tr><td>x</td><td data-parsoid='{"stx":"row"}'>}</td></tr></table>
26983 |<nowiki>}</nowiki>
27000 Tables: 5. Empty table cells should get whitespace to avoid need for nowikis
27004 <table><tr><td></td><td align="center" data-parsoid='{"stx":"row"}'></td><td data-parsoid='{"stx":"row"}'></td></tr></table>
27006 <table><tr><td></td><td align="center"></td><td></td></tr></table>
27008 <table><tr><td></td><td align="center" data-parsoid='{"stx":"row", "startTagSrc":"{{!}}{{!}}"}'></td><td data-parsoid='{"stx":"row"}'></td></tr></table>
27010 <table><tr><th></th><th align="center" data-parsoid='{"stx":"row"}'></th><th data-parsoid='{"stx":"row"}'></th></tr></table>
27013 | || align="center" | ||
27023 | {{!}}{{!}} align="center" | ||
27027 ! !! align="center" | !!
27033 <td align="center"></td>
27035 </td></tr></tbody></table>
27040 <td align="center">
27043 </td></tr></tbody></table>
27047 <td align="center"></td>
27049 </td></tr></tbody></table>
27053 <th align="center"></th>
27055 </th></tr></tbody></table>
27059 T97430: Don't emit empty nowiki pairs around marker meta tags
27063 <p>*This is a long sentence here that will make the nowiki algo split up the nowikis into multiple pairs
27064 |** Make this another long long long sentence forcing the nowiki algo to split up the nowikis.</p>
27066 <nowiki>*</nowiki>This is a long sentence here that will make the nowiki algo split up the nowikis into multiple pairs
27067 |** Make this another long long long sentence forcing the nowiki algo to split up the nowikis.
27071 Unclosed xmlish element in table line shouldn't eat end delimiters
27076 <tbody><tr><td> <foo</td>
27077 <td> bar></td></tr>
27094 #### --------------- Links ----------------
27095 #### 1. Quote marks in link text
27096 #### 2. Wikilinks: Escapes needed
27097 #### 3. Wikilinks: No escapes needed
27098 #### 4. Extlinks: Escapes needed
27099 #### 5. Extlinks: No escapes needed
27100 #### --------------------------------------
27102 Links 1. WikiLinks: No escapes needed
27106 <p><a rel="mw:WikiLink" href="Foo" title="Foo">Foo<i>boo</i></a>
27107 <a rel="mw:WikiLink" href="Foo" title="Foo">[Foobar]</a>
27108 <a rel="mw:WikiLink" href="Foo" title="Foo">x [Foobar] x</a></p>
27112 [[Foo|x [Foobar] x]]
27114 <p><a href="/wiki/Foo" title="Foo">Foo<i>boo</i></a>
27115 <a href="/wiki/Foo" title="Foo">[Foobar]</a>
27116 <a href="/wiki/Foo" title="Foo">x [Foobar] x</a>
27121 Links 2. WikiLinks: Escapes needed
27125 <a href="Foo" rel="mw:WikiLink">Foobar]</a>
27126 <a href="Foo" rel="mw:WikiLink">x [http://google.com g] x</a>
27127 <a href="Foo" rel="mw:WikiLink">[[Bar]]</a>
27128 <a href="Foo" rel="mw:WikiLink">x [[Bar]] x</a>
27129 <a href="Foo" rel="mw:WikiLink">|Bar</a>
27130 <a href="Foo" rel="mw:WikiLink">]]bar</a>
27131 <a href="Foo" rel="mw:WikiLink">[[bar</a>
27132 <a href="Foo" rel="mw:WikiLink">x [[ y</a>
27133 <a href="Foo" rel="mw:WikiLink">x ]] y</a>
27134 <a href="Foo" rel="mw:WikiLink">x ]] y [[ z</a>
27136 [[Foo|<nowiki>Foobar]</nowiki>]]
27137 [[Foo|x <nowiki>[http://google.com g]</nowiki> x]]
27138 [[Foo|<nowiki>[[Bar]]</nowiki>]]
27139 [[Foo|<nowiki>x [[Bar]] x</nowiki>]]
27140 [[Foo|<nowiki>|Bar</nowiki>]]
27141 [[Foo|<nowiki>]]bar</nowiki>]]
27142 [[Foo|<nowiki>[[bar</nowiki>]]
27143 [[Foo|<nowiki>x [[ y</nowiki>]]
27144 [[Foo|<nowiki>x ]] y</nowiki>]]
27145 [[Foo|<nowiki>x ]] y [[ z</nowiki>]]
27147 <p><a href="/wiki/Foo" title="Foo">Foobar]</a>
27148 <a href="/wiki/Foo" title="Foo">x [http://google.com g] x</a>
27149 <a href="/wiki/Foo" title="Foo">[[Bar]]</a>
27150 <a href="/wiki/Foo" title="Foo">x [[Bar]] x</a>
27151 <a href="/wiki/Foo" title="Foo">|Bar</a>
27152 <a href="/wiki/Foo" title="Foo">]]bar</a>
27153 <a href="/wiki/Foo" title="Foo">[[bar</a>
27154 <a href="/wiki/Foo" title="Foo">x [[ y</a>
27155 <a href="/wiki/Foo" title="Foo">x ]] y</a>
27156 <a href="/wiki/Foo" title="Foo">x ]] y [[ z</a>
27161 Links 3. WikiLinks: No escapes needed
27165 <p><a rel="mw:WikiLink" href="Foo">[Foobar</a>
27166 <a rel="mw:WikiLink" href="Foo" title="Foo">foo|bar</a></p>
27171 <p><a href="/wiki/Foo" title="Foo">[Foobar</a>
27172 <a href="/wiki/Foo" title="Foo">foo|bar</a>
27177 Links 4. ExtLinks: Escapes needed
27181 <p><a rel="mw:ExtLink" href="http://google.com">[google]</a>
27182 <a rel="mw:ExtLink" href="http://google.com">google]</a>
27183 <a rel="mw:ExtLink" href="http://google.com">goog] le</a></p>
27184 <p>[http://google.com]</p>
27185 <p>[http://google.com google]</p>
27186 <p>[<a rel="mw:ExtLink" href="http://google.com">http://google.com</a>]</p>
27187 <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>
27189 [http://google.com <nowiki>[google]</nowiki>]
27190 [http://google.com <nowiki>google]</nowiki>]
27191 [http://google.com <nowiki>goog] le</nowiki>]
27193 <nowiki>[http://google.com]</nowiki>
27195 <nowiki>[http://google.com google]</nowiki>
27197 [http://google.com<nowiki>]</nowiki>
27199 [{{echo|http://google.com}}<nowiki>]</nowiki>
27201 <p><a rel="nofollow" class="external text" href="http://google.com">[google]</a>
27202 <a rel="nofollow" class="external text" href="http://google.com">google]</a>
27203 <a rel="nofollow" class="external text" href="http://google.com">goog] le</a>
27204 </p><p>[http://google.com]
27205 </p><p>[http://google.com google]
27206 </p><p>[<a rel="nofollow" class="external free" href="http://google.com">http://google.com</a>]
27207 </p><p>[<a rel="nofollow" class="external free" href="http://google.com">http://google.com</a>]
27212 Links 5. ExtLinks: No escapes needed
27216 <p><a rel="mw:ExtLink" href="http://google.com">[google</a></p>
27217 <p>[<a ref="mw:ExtLink" href="http://google.com"></a>]</p>
27219 [http://google.com [google]
27221 [[http://google.com]]
27223 <p><a rel="nofollow" class="external text" href="http://google.com">[google</a>
27224 </p><p>[<a rel="nofollow" class="external autonumber" href="http://google.com">[1]</a>]
27229 Links 6. Add <nowiki/>s between text-nodes and url-links when required (T66300)
27233 <p>x<a rel="mw:ExtLink" href="http://example.com" data-parsoid='{"stx":"url"}'>http://example.com</a>y
27234 <a rel="mw:ExtLink" href="http://example.com" data-parsoid='{"stx":"url"}'>http://example.com</a>?x
27235 <a rel="mw:ExtLink" href="http://example.com" data-parsoid='{"stx":"url"}'>http://example.com</a>&x
27236 <a rel="mw:ExtLink" href="http://example.com" data-parsoid='{"stx":"url"}'>http://example.com</a>'x
27237 <a rel="mw:ExtLink" href="http://example.com" data-parsoid='{"stx":"url"}'>http://example.com</a>,x
27238 <a rel="mw:ExtLink" href="http://example.com" data-parsoid='{"stx":"url"}'>http://example.com</a>.x
27239 <a rel="mw:ExtLink" href="http://example.com" data-parsoid='{"stx":"url"}'>http://example.com</a>;x
27240 <a rel="mw:ExtLink" href="http://example.com" data-parsoid='{"stx":"url"}'>http://example.com</a>:x
27241 <a rel="mw:ExtLink" href="http://example.com" data-parsoid='{"stx":"url"}'>http://example.com</a>;x
27242 <a rel="mw:ExtLink" href="http://example.com" data-parsoid='{"stx":"url"}'>http://example.com</a>!x
27243 <a rel="mw:ExtLink" href="http://example.com" data-parsoid='{"stx":"url"}'>http://example.com</a>=x
27244 <a rel="mw:ExtLink" href="http://example.com" data-parsoid='{"stx":"url"}'>http://example.com</a>(x)
27245 <a rel="mw:ExtLink" href="http://example.com(x" data-parsoid='{"stx":"url"}'>http://example.com(x</a>)
27248 x<nowiki/>http://example.com<nowiki/>y
27249 http://example.com<nowiki/>?x
27250 http://example.com<nowiki/>&x
27251 http://example.com<nowiki/>'x
27252 http://example.com<nowiki/>,x
27253 http://example.com<nowiki/>.x
27254 http://example.com<nowiki/>;x
27255 http://example.com<nowiki/>:x
27256 http://example.com<nowiki/>;x
27257 http://example.com<nowiki/>!x
27258 http://example.com<nowiki/>=x
27259 http://example.com<nowiki/>(x)
27260 http://example.com(x<nowiki/>)
27264 Links 7a. Don't add spurious <nowiki/>s between text-nodes and url-links (T66300)
27269 <a rel="mw:ExtLink" href="http://example.com" data-parsoid='{"stx":"url"}'>http://example.com</a>
27271 "<a rel="mw:ExtLink" href="http://example.com" data-parsoid='{"stx":"url"}'>http://example.com</a>"
27272 (<a rel="mw:ExtLink" href="http://example.com" data-parsoid='{"stx":"url"}'>http://example.com</a>)
27273 (<a rel="mw:ExtLink" href="http://example.com" data-parsoid='{"stx":"url"}'>http://example.com</a>) foo
27274 <a rel="mw:ExtLink" href="http://example.com" data-parsoid='{"stx":"url"}'>http://example.com</a>,
27275 <a rel="mw:ExtLink" href="http://example.com" data-parsoid='{"stx":"url"}'>http://example.com</a>, foo
27281 "http://example.com"
27282 (http://example.com)
27283 (http://example.com) foo
27284 http://example.com,
27285 http://example.com, foo
27288 <a rel="nofollow" class="external free" href="http://example.com">http://example.com</a>
27290 "<a rel="nofollow" class="external free" href="http://example.com">http://example.com</a>"
27291 (<a rel="nofollow" class="external free" href="http://example.com">http://example.com</a>)
27292 (<a rel="nofollow" class="external free" href="http://example.com">http://example.com</a>) foo
27293 <a rel="nofollow" class="external free" href="http://example.com">http://example.com</a>,
27294 <a rel="nofollow" class="external free" href="http://example.com">http://example.com</a>, foo
27299 Links 7b. Don't add spurious <nowiki/>s between text-nodes and url-links (T66300)
27303 <p><a rel="mw:ExtLink" href="http://example.com" data-parsoid='{"stx":"url"}'>http://example.com</a>.,;:!?\
27304 -<a rel="mw:ExtLink" href="http://example.com">http://example.com</a>:</p>
27306 http://example.com.,;:!?\
27307 -http://example.com:
27309 <p><a rel="nofollow" class="external free" href="http://example.com">http://example.com</a>.,;:!?\
27310 -<a rel="nofollow" class="external free" href="http://example.com">http://example.com</a>:
27315 Links 8. Add <nowiki/>s between text-nodes and RFC-links when required (T66300)
27319 <p><a href="https://tools.ietf.org/html/rfc123" rel="mw:ExtLink" data-parsoid='{"stx":"magiclink"}'>RFC 123</a>4
27320 <a href="https://tools.ietf.org/html/rfc123" rel="mw:ExtLink" data-parsoid='{"stx":"magiclink"}'>RFC 123</a>y
27321 X<a href="https://tools.ietf.org/html/rfc123" rel="mw:ExtLink" data-parsoid='{"stx":"magiclink"}'>RFC 123</a>y</p>
27325 X<nowiki/>RFC 123<nowiki/>y
27329 Links 9. Don't add spurious <nowiki/>s between text-nodes and RFC-links (T66300)
27333 <p><a href="https://tools.ietf.org/html/rfc123" rel="mw:ExtLink" data-parsoid='{"stx":"magiclink"}'>RFC 123</a>?foo
27334 <a href="https://tools.ietf.org/html/rfc123" rel="mw:ExtLink" data-parsoid='{"stx":"magiclink"}'>RFC 123</a>&foo
27335 -<a href="https://tools.ietf.org/html/rfc123" rel="mw:ExtLink" data-parsoid='{"stx":"magiclink"}'>RFC 123</a>-
27342 <p><a class="external mw-magiclink-rfc" rel="nofollow" href="https://tools.ietf.org/html/rfc123">RFC 123</a>?foo
27343 <a class="external mw-magiclink-rfc" rel="nofollow" href="https://tools.ietf.org/html/rfc123">RFC 123</a>&foo
27344 -<a class="external mw-magiclink-rfc" rel="nofollow" href="https://tools.ietf.org/html/rfc123">RFC 123</a>-
27349 Links 10. Add <nowiki/>s between text-nodes and PMID-links when required (T66300)
27353 <p><a href="//www.ncbi.nlm.nih.gov/pubmed/123?dopt=Abstract" rel="mw:ExtLink" data-parsoid='{"stx":"magiclink"}'>PMID 123</a>4
27354 <a href="//www.ncbi.nlm.nih.gov/pubmed/123?dopt=Abstract" rel="mw:ExtLink" data-parsoid='{"stx":"magiclink"}'>PMID 123</a>y
27355 X<a href="//www.ncbi.nlm.nih.gov/pubmed/123?dopt=Abstract" rel="mw:ExtLink" data-parsoid='{"stx":"magiclink"}'>PMID 123</a>y
27359 X<nowiki/>PMID 123<nowiki/>y
27363 Links 11. Don't add spurious <nowiki/>s between text-nodes and PMID-links (T66300)
27367 <p><a href="//www.ncbi.nlm.nih.gov/pubmed/123?dopt=Abstract" rel="mw:ExtLink" data-parsoid='{"stx":"magiclink"}'>PMID 123</a>?foo
27368 <a href="//www.ncbi.nlm.nih.gov/pubmed/123?dopt=Abstract" rel="mw:ExtLink" data-parsoid='{"stx":"magiclink"}'>PMID 123</a>&foo
27369 -<a href="//www.ncbi.nlm.nih.gov/pubmed/123?dopt=Abstract" rel="mw:ExtLink" data-parsoid='{"stx":"magiclink"}'>PMID 123</a>-
27376 <p><a class="external mw-magiclink-pmid" rel="nofollow" href="//www.ncbi.nlm.nih.gov/pubmed/123?dopt=Abstract">PMID 123</a>?foo
27377 <a class="external mw-magiclink-pmid" rel="nofollow" href="//www.ncbi.nlm.nih.gov/pubmed/123?dopt=Abstract">PMID 123</a>&foo
27378 -<a class="external mw-magiclink-pmid" rel="nofollow" href="//www.ncbi.nlm.nih.gov/pubmed/123?dopt=Abstract">PMID 123</a>-
27383 Links 12. Add <nowiki/>s between text-nodes and ISBN-links when required (T66300)
27387 <p><a href="./Special:BookSources/1234567890" rel="mw:WikiLink" data-parsoid='{"stx":"magiclink"}'>ISBN 1234567890</a>1
27388 <a href="./Special:BookSources/1234567890" rel="mw:WikiLink" data-parsoid='{"stx":"magiclink"}'>ISBN 1234567890</a>x
27389 a<a href="./Special:BookSources/1234567890" rel="mw:WikiLink" data-parsoid='{"stx":"magiclink"}'>ISBN 1234567890</a>b
27392 ISBN 1234567890<nowiki/>1
27393 ISBN 1234567890<nowiki/>x
27394 a<nowiki/>ISBN 1234567890<nowiki/>b
27398 Links 13. Don't add spurious <nowiki/>s between text-nodes and ISBN-links (T66300)
27402 <p>-<a href="./Special:BookSources/1234567890" rel="mw:WikiLink" data-parsoid='{"stx":"magiclink"}'>ISBN 1234567890</a>'s
27406 <p>-<a href="/wiki/Special:BookSources/1234567890" class="internal mw-magiclink-isbn">ISBN 1234567890</a>'s
27411 Links 14. Protect link-like plain text. (Parsoid bug T78425)
27415 <p>this is not a link: http://example.com
27418 this is not a link: <nowiki>http://example.com</nowiki>
27422 Links 15. Link trails can't become link prefixes.
27427 <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>
27429 [[Söfnuður]]-[[00]]
27431 <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>
27435 #### --------------- Quotes ---------------
27436 #### 1. Quotes inside <b> and <i>
27437 #### 2. Link fragments separated by <i> and <b> tags
27438 #### 3. Link fragments inside <i> and <b>
27439 #### 4. No escaping needed
27440 #### --------------------------------------
27442 1a. Quotes inside <b> and <i>
27453 <b>foo'<i>bar'</i>baz</b>
27462 <i>fools'<span> errand</span></i>
27463 <i><span>fool</span>'s errand</i>
27464 '<i>foo</i> bar '<i>baz</i>
27465 a|!*#-:;+-~[]{}b'<i>x</i>
27469 ''<nowiki>''foo''</nowiki>''
27470 ''<nowiki>'''foo'''</nowiki>''
27472 '''<nowiki/>'foo''''
27473 '''<nowiki>''foo''</nowiki>'''
27474 '''<nowiki>'''foo'''</nowiki>'''
27475 '''foo'<nowiki/>''bar'<nowiki/>''baz'''
27476 '''foo'''<nowiki/>'s
27482 '''foo'''<nowiki/>'
27483 ''''foo'''<nowiki/>'
27484 ''fools'<span> errand</span>''
27485 ''<span>fool</span>'s errand''
27486 '<nowiki/>''foo'' bar '''baz''
27487 a|!*#-:;+-~[]{}b'''x''
27491 1b. Quotes inside <b> and <i> with other tags on same line
27495 '<i>a</i> foo <i><a rel="mw:WikiLink" href="Bar" title="Bar">bar</a></i>
27496 <i>a'</i> foo <i><a rel="mw:WikiLink" href="Bar" title="Bar">bar</a></i>
27497 <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>
27498 <a rel="mw:WikiLink" href="Foo" title="Foo">foo</a> x'<i><a href="Bar" rel="mw:WikiLink" title="Bar">bar</a></i>
27499 '<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>
27500 '<i>foo</i> <div title="name">test</div>
27501 '<i>foo</i> and <br data-parsoid='{"stx":"html","noClose":true}'/> bar
27502 <ol class="mw-references references" typeof="mw:Extension/references" about="#mwt5" data-mw='{"name":"references","attrs":{}}'>
27503 <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>
27506 '''a'' foo ''[[bar]]''
27507 ''a''' foo ''[[bar]]''
27508 ''a''' foo '''{{echo|[[bar]]}}'''
27509 [[foo]] x'''[[bar]]''
27510 '''foo'' <ref>test</ref>
27511 '''foo'' <div title="name">test</div>
27512 '''foo'' and <br> bar
27517 2. Link fragments separated by <i> and <b> tags
27521 <p>[[<i>foo</i>hello]]</p>
27522 <p>[[<b>foo</b>hello]]</p>
27524 [[''foo''<nowiki>hello]]</nowiki>
27526 [['''foo'''<nowiki>hello]]</nowiki>
27529 # FIXME: Escaping one or both of [[ and ]] is also acceptable --
27530 # this is one of the shortcomings of this format
27532 3. Link fragments inside <i> and <b>
27536 <p><i>[[foo</i>]]</p>
27537 <p><b>[[foo</b>]]</p>
27539 ''[[foo''<nowiki>]]</nowiki>
27541 '''[[foo'''<nowiki>]]</nowiki>
27545 4. No escaping needed
27549 <p>'<span><i>bar</i></span>'
27550 '<span><b>bar</b></span>'
27554 '<span>''bar''</span>'
27555 '<span>'''bar'''</span>'
27559 #### ----------- Paragraphs ---------------
27560 #### 1. No unnecessary escapes
27561 #### --------------------------------------
27564 1. No unnecessary escapes
27568 <p>bar <span>[[foo]]</span>
27569 </p><p>=bar <span>[[foo]]</span>
27570 </p><p>[[bar <span>[[foo]]</span>
27571 </p><p>]]bar <span>[[foo]]</span>
27572 </p><p>=bar <span>foo]]</span>=
27575 bar <span><nowiki>[[foo]]</nowiki></span>
27577 =bar <span><nowiki>[[foo]]</nowiki></span>
27579 [[bar <span><nowiki>[[foo]]</nowiki></span>
27581 ]]bar <span><nowiki>[[foo]]</nowiki></span>
27583 =bar <span>foo]]</span><nowiki>=</nowiki>
27586 #### ----------------------- PRE --------------------------
27588 1. Leading whitespace in SOL context should be escaped
27611 <nowiki> </nowiki>a
27613 <nowiki> </nowiki> a
27617 <nowiki> </nowiki> a
27619 <nowiki> </nowiki>a
27622 <nowiki> </nowiki>b
27645 2. Leading whitespace in non-indent-pre contexts should not be escaped
27649 <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>
27650 <ol class="mw-references references" typeof="mw:Extension/references" about="#mwt4" data-mw='{"name":"references","attrs":{}}'>
27651 <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>
27661 3. Leading whitespace in indent-pre suppressing contexts should not be escaped
27680 4. Leading whitespace in indent-pre suppressing contexts should not be escaped
27684 <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>
27686 [[File:Foobar.jpg|thumb|caption]]
27690 5. Nowiki escaping should account for indent-pres
27700 T95794: nowiki escaping should account for leading space at start-of-line in an indent-pre block
27714 Whitespace scrubbing in SOL position should account for SOL-sensitive wikitext markup
27717 "modes": ["html2wt"],
27718 "scrubWikitext": true
27726 <p><link rel="mw:PageProp/Category" href="./Category:Foo" data-parsoid="{}"> *foo</p>
27727 <p> <link rel="mw:PageProp/Category" href="./Category:Foo" data-parsoid="{}">*foo</p>
27728 <p> <!--boo-->*foo</p>
27729 <p><!--boo--> *foo</p>
27730 <p><!--a--> <!--b--> <!--c--> <!--d--> <!--e--> foo</p>
27731 <p><!--a--> <!--b--> <!--c--> <!--d--> <!--e--> *foo</p>
27747 <nowiki>*</nowiki>foo
27749 <nowiki/><!--boo-->*foo
27751 <!--boo--><nowiki/>*foo
27753 <!--a--><!--b--><!--c--><!--d--><!--e-->foo
27755 <!--a--><nowiki/><!--b--><!--c--><!--d--><!--e-->*foo
27758 #### --------------- Behavior Switches --------------------
27761 1. Valid behavior switches should be escaped
27768 <nowiki>__TOC__</nowiki>
27769 ''<nowiki>__TOC__</nowiki>''
27773 2. Invalid behavior switches should not be escaped
27784 # We use indent-pre as an indirect way to test for sol-transparent behavior.
27786 Behavior switches should be SOL-transparent
27790 <meta property="mw:PageProp/toc" />
27792 <!-- this one's bogus -->
27795 <pre data-parsoid='{}'><meta property="mw:PageProp/toc" data-parsoid='{"src":"__TOC__","magicSrc":"__TOC__"}'/> foo</pre>
27797 <meta property="mw:PageProp/toc" data-parsoid='{"src":"__TOC__","magicSrc":"__TOC__"}'/><pre data-parsoid='{}'>bar</pre>
27801 <!-- this one's bogus -->
27810 #### --------------- HTML tags ---------------
27813 #### 3. multi-line html tag
27814 #### 4. extension tags
27815 #### -----------------------------------------
27821 <a href="http://google.com">google</a>
27823 <a href="http://google.com">google</a>
27831 <ul><li> <div>foo</div></li>
27832 <li> <div style="color:red">foo</div></li>
27833 <li> <td></li></ul>
27836 * <nowiki><div>foo</div></nowiki>
27837 * <nowiki><div style="color:red">foo</div></nowiki>
27838 * <nowiki><td></nowiki>
27842 3. multi-line html tag
27861 <p><ref>foo</ref>
27862 </p><p><ref>bar
27863 </p><p>baz</ref>
27866 <nowiki><ref>foo</ref></nowiki>
27868 <nowiki><ref>bar</nowiki>
27870 baz<nowiki></ref></nowiki>
27874 Parsoid: newline inducing block nodes don't suppress <nowiki>
27880 <nowiki> </nowiki>a
27885 #### --------------- Others ---------------
27891 <p><nowiki>foo</nowiki>
27894 <nowiki>foo</nowiki>
27897 ## The quote-char in the input is necessary for triggering the bug
27899 (T54035) Nowiki-escaping should not get tripped by " :" in text
27908 #----------- End of wikitext escaping tests --------------
27912 Tag-like HTML structures are passed through as text
27934 </p><p>1<d e>f
27939 HTML tag with necessary entities in attributes
27941 <span title="&amp;">foo</span>
27943 <p><span title="&amp;">foo</span>
27948 HTML tag with 'unnecessary' entity encoding in attributes
27950 <span title="&">foo</span>
27952 <p><span title="&">foo</span>
27957 HTML tag with broken attribute value quoting
27959 parsoid=wt2html,html2html
27961 <span title="Hello world>Foo</span>
27963 <p><span title="Hello world">Foo</span>
27966 <p><span title="Hello world">Foo</span></p>
27970 Self-closed tag with broken attribute value quoting
27972 parsoid=wt2html,html2html
27974 <div title="Hello world />Foo
27976 <div title="Hello world"></div><p>Foo
27979 <div title="Hello world " data-parsoid='{"stx":"html","selfClose":true}'></div><p>Foo</p>
27983 Table with broken attribute value quoting
27985 parsoid=wt2html,html2html
27988 | title="Hello world|Foo
27993 <td title="Hello world">Foo
27999 <td title="Hello world">Foo
28005 Table with broken attribute value quoting on consecutive lines
28007 parsoid=wt2html,html2html
28010 | title="Hello world|Foo
28011 | style="color:red|Bar
28016 <td title="Hello world">Foo
28018 <td style="color:red">Bar
28024 <td title="Hello world">Foo
28025 </td><td style="color: red">Bar
28026 </td></tr></tbody></table>
28031 Accept empty td cell attribute
28034 | align="center" |foo|| |
28039 <td align="center">foo</td>
28046 Non-empty attributes in th-cells
28049 !Foo!! style="color: red" |Bar
28055 <th style="color: red">Bar
28061 Accept empty attributes in th-cells
28076 Empty table rows go away
28097 ### Parsoid-centric tests for testing RTing of inter-element separators
28098 ### Edge cases not tested by existing parser tests and specific to
28099 ### Parsoid-specific serialization strategies.
28103 RT-ed inter-element separators should be valid separators
28115 <tbody><tr class='mw-empty-elt' data-parsoid='{"startTagSrc":"|-","a":{"[[foo]]":null},"sa":{"[[foo]]":""},"autoInsertedEnd":true}'></tr>
28119 # Parsoid-only test of a DOM pass
28121 Trailing newlines in a deep dom-subtree that ends a wikitext line should be migrated out
28133 <tbody><tr data-parsoid='{"autoInsertedEnd":true,"autoInsertedStart":true}'><td data-parsoid='{"autoInsertedEnd":true}'><small data-parsoid='{"stx":"html","autoInsertedEnd":true}'>foo
28134 <p>bar</p></small></td></tr>
28138 <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>
28142 # Note that the "style" attribute is really a template parameter here.
28143 # The = would have to be {{=}} if you wanted the literal.
28145 Empty TD followed by TD with tpl-generated attribute
28150 |{{echo|style='color:red'}}|foo
28164 Indented table with an empty td
28183 Indented table with blank lines in between (T85627)
28202 <br /></p></td></tr>
28207 Indented block & table
28221 <div data-parsoid='{"stx":"html"}'>foo</div>
28223 <tr data-parsoid='{"autoInsertedEnd":true,"autoInsertedStart":true}'><td data-parsoid='{"autoInsertedEnd":true}'>foo</td></tr>
28228 Indent and comment before table row
28243 <!--hi--><tbody><tr data-parsoid='{"startTagSrc":"|-","autoInsertedEnd":true}'>
28244 <td data-parsoid='{"autoInsertedEnd":true}'> there</td></tr>
28248 # PHP parser omits empty TR
28250 Empty TR followed by a template-generated TR
28254 {{echo|<tr><td>foo</td></tr>}}
28259 <tbody><tr><td>foo</td></tr>
28264 <tr class='mw-empty-elt'></tr>
28265 <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}}]}'>
28270 ## PHP and parsoid output differ for this; as usual PHP omits empty
28271 ## elements, and since it strips the comments the TR is empty.
28273 Empty TR followed by mixed-ws-comment line should RT correctly
28289 <tr class='mw-empty-elt'></tr>
28292 <!--c--> </tr><!--d-->
28298 Multi-line image caption generated by templates with/without trailing newlines
28300 [[File:Foobar.jpg|thumb|300x300px|foo\n{{echo|A}}\n{{echo|B}}\n{{echo|C}}]]
28301 [[File:Foobar.jpg|thumb|300x300px|foo\n{{echo|A}}\n{{echo|B}}\n{{echo|C}}\n\n]]
28303 <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>
28304 <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>
28308 New element inserted (without intervening newlines) after an old sol-transparent node should serialize correctly
28312 <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>
28314 <link rel="mw:PageProp/Category" href="./Category:Foo" data-parsoid='{}'/><h1>new heading</h1>
28316 <includeonly>foo</includeonly>
28324 ## PHP emits broken html for this, and since this is primarily
28325 ## a Parsoid serializer test, marking this Parsoid only
28327 Improperly nested inline or quotes tags with whitespace in between
28329 <span> <s>x</span> </s>
28332 <p><span> <s>x</s></span><s> </s>
28333 <b> <i>x</i></b><i> </i>
28338 Encapsulate protected attributes from wt
28340 <div typeof="mw:placeholder stuff" data-mw="whoo" data-parsoid="weird" data-parsoid-other="no" about="time" rel="mw:true">foo</div>
28342 {| typeof="mw:placeholder stuff" data-mw="whoo" data-parsoid="weird" data-parsoid-other="no" about="time" rel="mw:true"
28346 <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>
28348 <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">
28349 <tbody><tr><td data-parsoid='{"autoInsertedEnd":true}'>ok</td></tr>
28353 ## Currently the p-wrapper is fragile in how it adds / removes transformations.
28354 ## Having nested or stray pre tags results in the attempt to add duplicates,
28355 ## causing an assertion fail. This test tries to prevent that situation.
28357 Ensure ParagraphWrapper can deal with stray closing pre tags
28366 ## Remex doesn't account for fostered content.
28368 1. Ensure fostered text content is wrapped in element nodes
28372 <table>hi</table><table>ho</table>
28374 hi<table></table>ho<table></table>
28376 <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>
28379 ## Remex doesn't account for fostered content.
28381 2. Ensure fostered text content is wrapped in element nodes (traps regressions around fostered marker on the element getting lost)
28383 parsoid=wt2html,wt2wt
28393 </td></tr></tbody></table>
28395 <p data-parsoid='{"fostered":true,"autoInsertedEnd":true,"autoInsertedStart":true}'> || ||</p>
28396 <table data-parsoid='{"stx":"html"}'>
28397 <tbody><tr data-parsoid='{"stx":"html","autoInsertedEnd":true}'><td data-parsoid='{"stx":"html","autoInsertedEnd":true}'> a
28398 </td></tr></tbody></table>
28401 ## Remex doesn't account for fostered content.
28403 Encapsulation properly handles null DSR information from foster box
28405 parsoid=wt2html,wt2wt
28407 {{echo|<table>foo<tr><td>bar</td></tr></table>}}
28409 <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>
28412 ## Remex doesn't account for fostered content.
28414 1. Encapsulate foster-parented transclusion content
28416 parsoid=wt2wt,wt2html
28418 <table>{{echo|foo<tr><td>bar</td></tr>}}</table>
28420 foo<table><tbody><tr><td>bar</td></tr></tbody></table>
28422 <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>
28426 2. Encapsulate foster-parented transclusion content
28428 parsoid=wt2wt,wt2html
28430 <table><div>{{echo|foo}}</div><tr><td>bar</td></tr></table>
28432 <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>
28443 3. Encapsulate foster-parented transclusion content
28445 parsoid=wt2wt,wt2html
28447 <table><div><p>{{echo|foo</p></div><tr><td>}}bar</td></tr></table>
28449 <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>"]}">
28462 4. Encapsulate foster-parented transclusion content
28464 parsoid=wt2wt,wt2html
28466 <table><div><p>{{echo|foo</p></div><tr><td>}}bar</td></tr></table>
28468 <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>"]}">
28480 ## Remex doesn't account for fostered content.
28482 5. Encapsulate foster-parented transclusion content
28484 parsoid=wt2wt,wt2html
28486 <table><tr><td><div><p>{{echo|foo</p></div></td>foo}}</tr></table>
28488 foo<table><tbody><tr><td><div><p>foo</p></div></td></tr></tbody></table>
28490 <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>
28493 ## Remex doesn't account for fostered content.
28495 6. Encapsulate foster-parented transclusion content
28497 parsoid=wt2wt,wt2html
28499 <table><tr><td><div><p>{{echo|foo</p></div></td>foo</tr></table>}}<p>ok</p>
28501 foo<table><tbody><tr><td><div><p>foo</p></div></td></tr></tbody></table><p>ok</p>
28503 <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>
28507 7. Encapsulate foster-parented transclusion content
28509 parsoid=wt2wt,wt2html
28511 <table>{{echo|<p>foo</p>}}<td>bar</td></table>
28513 <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>
28523 ## Remex doesn't account for fostered content.
28524 # Note that the wt is broken on purpose: the = should be {{=}} if you
28525 # don't want it to be a template parameter key.
28527 8. Encapsulate foster-parented transclusion content
28529 parsoid=wt2wt,wt2html
28532 }}{|{{echo|style='color:red'}}
28543 </td></tr></tbody></table>
28545 <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">
28546 </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">
28549 </td></tr></tbody></table>
28552 ## Remex doesn't account for fostered content.
28554 9. Encapsulate foster-parented transclusion content
28556 parsoid=wt2wt,wt2html
28558 <table>{{echo|hi</table>hello}}
28560 hi<table></table><p>hello
28563 <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>
28567 Table in fosterable position
28578 <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">
28580 <table about="#mwt1" data-parsoid='{"autoInsertedEnd":true}'></table>
28586 # Parsoid only for T66747
28588 Properly encapsulate empty-content transclusions in fosterable positions
28596 <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"}]]}'>
28601 ## No longer captures its original intention
28603 Always encapsulate foster box when template range is expanded to table
28617 T115289: Unclosed table
28619 {{echo|<table>}}<!--c-->[[Category:Two]]
28621 <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>
28625 T115289: Don't migrate newlines out of tables with fostered content
28627 <table><td></td>{{echo|<tr>[[Category:One]]}}<!--c-->[[Category:Two]]
28629 <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>
28633 T73074: More fostering fun
28635 <table><td></td>{{echo|<tr>}}<!--c-->[[Category:Two]]
28637 <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>
28641 Support <object> element with .data attribute
28645 <object data="test.swf"></object>
28647 <object data="test.swf"></object>
28651 Don't block XML namespace declaration
28653 <span xmlns:dct="http://purl.org/dc/terms/" property="dct:title">MediaWiki</span>
28655 <p><span xmlns:dct="http://purl.org/dc/terms/" property="dct:title">MediaWiki</span>
28658 <p><span xmlns:dct="http://purl.org/dc/terms/" data-x-property="dct:title" data-parsoid='{"stx":"html"}'>MediaWiki</span></p>
28661 # -----------------------------------------------------------------
28662 # The following section of tests are primarily to spec requirements
28663 # around Parsoid's serialization (old, new, edited content)
28665 # All these tests are marked Parsoid html2wt and html2html only
28666 # ----------------------------------------------------------------
28669 Ignore rel attribute in a-tags during serialization to url-links
28673 <a href='http://en.wikipedia.org/wiki/Foobar'>http://en.wikipedia.org/wiki/Foobar</a>
28674 <a href='http://en.wikipedia.org/wiki/Foobar' rel='mw:ExtLink'>http://en.wikipedia.org/wiki/Foobar</a>
28675 <a href='http://en.wikipedia.org/wiki/Foobar' rel='mw:WikiLink'>http://en.wikipedia.org/wiki/Foobar</a>
28677 http://en.wikipedia.org/wiki/Foobar
28678 http://en.wikipedia.org/wiki/Foobar
28679 http://en.wikipedia.org/wiki/Foobar
28682 # 'mi' is a localinterwiki prefix as well as a language
28684 Serialize interwiki links pointing to the current wiki as plain wiki links (T67869)
28688 <p><a rel="mw:ExtLink" href="http://mi.wikipedia.org/wiki/Foo">Foo</a></p>
28694 Parsoid should accept interwiki shortcuts
28698 <p><a rel='mw:WikiLink' href='./fr:Foo'>Foo</a>
28699 <a rel='mw:ExtLink' href='./fr:Foo'>Foo</a>
28700 <a href='./fr:Foo'>Foo</a></p>
28701 <p><a rel='mw:WikiLink' href='fr%3AFoo'>Foo</a>
28702 <a rel='mw:ExtLink' href='fr%3AFoo'>Foo</a>
28703 <a href='fr%3AFoo'>Foo</a></p>
28704 <p><a href='FR%3AFoo'>Foo</a>
28705 <a href='./FR:Foo'>Foo</a></p>
28720 Parsoid should not accept invalid interwiki shortcuts
28724 <p><a rel='mw:WikiLink' href='news:Foo'>Foo</a>
28725 <a rel='mw:ExtLink' href='news:Foo'>Foo</a>
28726 <a href='news:Foo'>Foo</a></p>
28735 New wikilinks should be serialized properly
28739 <a rel="mw:WikiLink" href="./Foo" title="Foo" data-parsoid='{}'>Foo</a>
28740 <a rel="mw:WikiLink" href="./Foo" title="Foo">Foo</a>
28741 <a href="//en.wikipedia.org/wiki/Foo">//en.wikipedia.org/wiki/Foo</a>
28742 <a href="http://en.wikipedia.org/wiki/Foo">http://en.wikipedia.org/wiki/Foo</a>
28743 <a href="//en.wikipedia.org/wiki/Foo_bar">//en.wikipedia.org/wiki/Foo bar</a>
28747 [[:en:Foo|//en.wikipedia.org/wiki/Foo]]
28748 http://en.wikipedia.org/wiki/Foo
28749 [[:en:Foo_bar|//en.wikipedia.org/wiki/Foo bar]]
28753 New wiki links (href variations)
28757 <a rel="mw:WikiLink" href="./Foo_bar">Foo_bar</a>
28758 <a rel="mw:WikiLink" href="Foo_bar">Foo_bar</a>
28759 <a rel="mw:WikiLink" href="Foo bar">Foo_bar</a>
28760 <a rel="mw:WikiLink" href="./Toxine_bact%C3%A9rienne">Toxine bactérienne</a>
28765 [[Toxine bactérienne]]
28769 New wiki links (content string variations)
28773 <a rel="mw:WikiLink" href="./Foo_bar">Foo_bar</a>
28774 <a rel="mw:WikiLink" href="./Foo_bar">Foo bar</a>
28775 <a rel="mw:WikiLink" href="./Foo_bar">./Foo_bar</a>
28779 [[Foo_bar|./Foo_bar]]
28783 New category links (href variations)
28787 <link rel="mw:PageProp/Category" href="./Category:Toxine_bactérienne" />
28788 <link rel="mw:PageProp/Category" href="./Category:Toxine_bact%C3%A9rienne" />
28789 <link rel="mw:PageProp/Category" href="Category:Toxine_bact%C3%A9rienne" />
28791 [[Category:Toxine bactérienne]]
28792 [[Category:Toxine bactérienne]]
28793 [[Category:Toxine bactérienne]]
28797 New sol transparent links don't need indent-pre nowiki protection
28802 <link rel="mw:PageProp/redirect" href="./Main_Page">
28803 <!-- this is good --> <link rel="mw:PageProp/Category" href="./Category:Good" />
28804 <!-- this is great --> <link rel="mw:PageProp/Category" href="./Kategorie:Great" />
28806 #WEITERLEITUNG [[Main Page]]
28807 <!-- this is good --> [[Category:Good]]
28808 <!-- this is great --> [[Kategorie:Great]]
28812 New interlanguage links (href variations)
28816 <link rel="mw:PageProp/Language" href="http://es.wikipedia.org/wiki/Toxine bactérienne" />
28817 <link rel="mw:PageProp/Language" href="http://es.wikipedia.org/wiki/Toxine_bactérienne" />
28818 <link rel="mw:PageProp/Language" href="http://es.wikipedia.org/wiki/Toxine_bact%C3%A9rienne" />
28820 [[es:Toxine bactérienne]]
28821 [[es:Toxine_bactérienne]]
28822 [[es:Toxine_bactérienne]]
28826 Image: Modifying size of an image (1)
28829 "modes": ["wt2wt"],
28831 ["img[height]", "attr", "height", "22"],
28832 ["img[width]", "attr", "width", "200"]
28836 [[Image:Foobar.jpg|230x230px]]
28838 [[Image:Foobar.jpg|200x200px]]
28842 Image: Modifying size of an image (2)
28845 "modes": ["wt2wt"],
28847 ["img[height]", "attr", "height", "100"],
28848 ["img[width]", "attr", "width", "500"]
28852 [[Image:Foobar.jpg|230x230px]]
28854 [[Image:Foobar.jpg|500x500px]]
28857 # Change in size is ignored so long as class='mw-default-size'
28859 Image: Modifying size of an image (3)
28862 "modes": ["wt2wt"],
28864 ["figure[class]", "removeClass", "mw-default-size"],
28865 ["figure img", "attr", "height", "19"],
28866 ["figure img", "attr", "width", "170"]
28870 [[Image:Foobar.jpg|thumb]]
28872 [[Image:Foobar.jpg|thumb|170x170px]]
28876 Image: Modifying alignment of an image (T50665)
28879 "modes": ["wt2wt"],
28881 ["figure[class]", "removeClass", "mw-halign-right"],
28882 ["figure[class]", "addClass", "mw-halign-left"]
28886 [[Image:Foobar.jpg|thumb|caption|right]]
28888 [[Image:Foobar.jpg|thumb|caption|left]]
28892 Image: Modifying mw-default-size of an frameless image (T64805)
28895 "modes": ["wt2wt"],
28897 ["figure.mw-default-size", "removeClass", "mw-default-size"]
28901 [[Image:Foobar.jpg|frameless|right]]
28903 [[Image:Foobar.jpg|frameless|right|220x220px]]
28907 Image: Modifying valign of an image (T51221)
28910 "modes": ["wt2wt"],
28912 ["*[typeof=\"mw:Image\"]", "removeClass", "mw-valign-middle"],
28913 ["*[typeof=\"mw:Image\"]", "addClass", "mw-valign-text-top"]
28917 [[File:Foobar.jpg|20px|middle]]
28919 [[File:Foobar.jpg|20px|text-top]]
28923 Image: Modifying alt attribute of an image (T58400)
28926 "modes": ["wt2wt"],
28928 ["img[alt]", "attr", "alt", "some alternate edited text"]
28932 [[File:Foobar.jpg|thumb|some caption|alt=some alternate text]]
28934 [[File:Foobar.jpg|thumb|some caption|alt=some alternate edited text]]
28938 Image: Modifying caption of an image
28941 "modes": ["wt2wt"],
28943 ["figcaption", "text", "new caption"]
28947 [[Image:Foobar.jpg|thumb|original caption]]
28949 [[Image:Foobar.jpg|thumb|new caption]]
28953 Image: empty alt attribute (T50924)
28955 [[File:Foobar.jpg|thumb|alt=|bar]]
28957 <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" decoding="async" 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>
28959 <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>
28963 Image: new attributes should be serialized in wiki's language for RTL languages (T53852)
28969 <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>
28971 [[Imagen:Foobar.jpg|derecha|miniaturadeimagen]]
28975 Image: Block level image should have \n before and after
28978 [[File:Foobar.jpg|right|thumb|150x150px]]
28982 <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>
28987 Image: New block level image should have \n before and after (existing content)
28990 [[File:Foobar.jpg|right|thumb|150x150px]]
28994 <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>
28999 Image: upright option (parsoid)
29001 [[File:Foobar.jpg|thumb|upright|caption]]
29002 [[File:Foobar.jpg|thumb|upright=0.5|caption]]
29003 [[File:Foobar.jpg|thumb|500x500px|upright=0.5|caption]]
29005 <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>
29006 <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>
29007 <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>
29011 Image: upright option is ignored on inline and frame images (parsoid)
29013 [[File:Foobar.jpg|500x500px|upright=0.5|caption]]
29015 <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>
29019 Image: in template parameter with empty parameter
29021 {{echo|[[File:Foobar.jpg|link=]]}}
29023 <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>
29027 Image: from basic HTML (1)
29031 <span typeof="mw:Image">
29032 <img src="./File:Foobar.jpg" width=100 height=100 alt="Alt">
29035 [[File:Foobar.jpg|link=|alt=Alt|100x100px]]
29039 Image: from basic HTML (2)
29043 <img src="./File:Foobar.jpg" width=100 height=100 alt="Alt">
29045 [[File:Foobar.jpg|link=|alt=Alt|100x100px]]
29049 Image: from basic HTML (3)
29053 <a href="Main"><img src="./File:Foobar.jpg" width=100 height=100 alt="Alt"></a>
29055 [[File:Foobar.jpg|link=Main|alt=Alt|100x100px]]
29059 Image: from basic HTML (4)
29063 <img src="./File:Foobar.jpg">
29065 [[File:Foobar.jpg|link=]]
29069 Image: Invalid title as link
29071 [[File:Foobar.jpg|link=<]]
29073 <p><a href="/wiki/File:Foobar.jpg" class="image" title="link=<"><img alt="link=<" src="http://example.com/images/3/3a/Foobar.jpg" decoding="async" width="1941" height="220" /></a>
29076 <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>
29080 Various link types in alt and link options
29082 [[File:Foobar.jpg|link=[[Main Page]]|alt=[[Main Page]]|caption]]
29084 [[File:Foobar.jpg|link=[[Media:Thumb.png]]|alt=[[Media:Thumb.png]]|caption]]
29086 [[File:Foobar.jpg|link=[[wikipedia:Foo]]|alt=[[wikipedia:Foo]]|caption]]
29088 <p><a href="/wiki/Main_Page" title="caption"><img alt="Main Page" src="http://example.com/images/3/3a/Foobar.jpg" decoding="async" width="1941" height="220" /></a>
29089 </p><p><a href="/wiki/Media:Thumb.png" title="caption"><img alt="Media:Thumb.png" src="http://example.com/images/3/3a/Foobar.jpg" decoding="async" width="1941" height="220" /></a>
29090 </p><p><a href="http://en.wikipedia.org/wiki/Foo" title="caption"><img alt="wikipedia:Foo" src="http://example.com/images/3/3a/Foobar.jpg" decoding="async" width="1941" height="220" /></a>
29093 <p><figure-inline class="mw-default-size" typeof="mw:Image" data-mw='{"caption":"caption"}'><a href="./Main_Page" data-parsoid='{"a":{"href":"./Main_Page"},"sa":{"href":"link=[[Main Page]]"}}'><img alt="Main Page" resource="./File:Foobar.jpg" src="//example.com/images/3/3a/Foobar.jpg" data-file-width="1941" data-file-height="220" data-file-type="bitmap" height="220" width="1941" data-parsoid='{"a":{"alt":"Main Page","resource":"./File:Foobar.jpg","height":"220","width":"1941"},"sa":{"alt":"alt=[[Main Page]]","resource":"File:Foobar.jpg"}}'/></a></figure-inline></p>
29095 <p><figure-inline class="mw-default-size" typeof="mw:Image" data-mw='{"caption":"caption"}'><a href="./Media:Thumb.png" data-parsoid='{"a":{"href":"./Media:Thumb.png"},"sa":{"href":"link=[[Media:Thumb.png]]"}}'><img alt="Media:Thumb.png" resource="./File:Foobar.jpg" src="//example.com/images/3/3a/Foobar.jpg" data-file-width="1941" data-file-height="220" data-file-type="bitmap" height="220" width="1941" data-parsoid='{"a":{"alt":"Media:Thumb.png","resource":"./File:Foobar.jpg","height":"220","width":"1941"},"sa":{"alt":"alt=[[Media:Thumb.png]]","resource":"File:Foobar.jpg"}}'/></a></figure-inline></p>
29097 <p><figure-inline class="mw-default-size" typeof="mw:Image" data-mw='{"caption":"caption"}'><a href="http://en.wikipedia.org/wiki/Foo" data-parsoid='{"a":{"href":"http://en.wikipedia.org/wiki/Foo"},"sa":{"href":"link=[[wikipedia:Foo]]"}}'><img alt="wikipedia:Foo" resource="./File:Foobar.jpg" src="//example.com/images/3/3a/Foobar.jpg" data-file-width="1941" data-file-height="220" data-file-type="bitmap" height="220" width="1941" data-parsoid='{"a":{"alt":"wikipedia:Foo","resource":"./File:Foobar.jpg","height":"220","width":"1941"},"sa":{"alt":"alt=[[wikipedia:Foo]]","resource":"File:Foobar.jpg"}}'/></a></figure-inline></p>
29101 Lists: Serialize correctly even when list content is wrapped in p-tags (like VE does)
29106 <li><p>foo</p></li>
29113 Lists: Serialize correctly even when list tags has unneeded whitespace between tags
29117 <ul> <li>foo</li></ul>
29123 Don't strip leading whitespace when handling indent-pre suppressing tags
29128 <tr><td> indented row</td></tr>
29131 <b>This is very bold of you!</b>
29134 indented cell (no pre-wrapping!)
29144 '''This is very bold of you!'''
29148 indented cell (no pre-wrapping!)
29156 Nowiki-wrap leading whitespace when handling indent-pre inducing tags
29178 <nowiki> </nowiki></span>bar2
29181 <nowiki> </nowiki><span>bar</span>
29184 <nowiki> </nowiki><span>foo</span>
29189 Lists: Dont insert newlines in a serialized list item.
29193 <ul><li>a<br>b</li><li>c</li></ul>
29200 1. Headings: Force sol-transparent links and behavior switches to serialize before/after
29203 "modes": ["html2wt"],
29204 "scrubWikitext": false
29207 <h2>hello there<link href="./Category:A1" rel="mw:PageProp/Category" /></h2>
29208 <h2><link href="./Category:A2" rel="mw:PageProp/Category" />hi pal</h2>
29210 <h2><!--foo--> <link href="./Category:A3" rel="mw:PageProp/Category" /> how goes it</h2>
29211 <h2>it goes well <link href="./Category:A4" rel="mw:PageProp/Category" /> <!--bar--></h2>
29213 <h2 data-parsoid='{}'>howdy<link href="./Category:A5" rel="mw:PageProp/Category" /></h2>
29215 <h2><meta property="mw:PageProp/toc" /> ok</h2>
29217 == hello there [[Category:A1]] ==
29219 == [[Category:A2]] hi pal ==
29221 == <!--foo--> [[Category:A3]] how goes it ==
29223 == it goes well [[Category:A4]] <!--bar--> ==
29225 ==howdy [[Category:A5]]==
29231 2. Headings: Force sol-transparent links and behavior switches to serialize before/after
29234 "modes": ["html2wt"],
29235 "scrubWikitext": true
29238 <h2>hello there<link href="./Category:A1" rel="mw:PageProp/Category" /></h2>
29239 <h2><link href="./Category:A2" rel="mw:PageProp/Category" />hi pal</h2>
29241 <h2><!--foo--> <link href="./Category:A3" rel="mw:PageProp/Category" /> how goes it</h2>
29242 <h2>it goes well <link href="./Category:A4" rel="mw:PageProp/Category" /> <!--bar--></h2>
29244 <h2><meta property="mw:PageProp/toc" /> ok</h2>
29252 <!--foo-->[[Category:A3]]
29257 [[Category:A4]] <!--bar-->
29265 Headings: Don't hoist metas that come from templates
29268 "modes": ["html2wt"],
29269 "scrubWikitext": true
29272 <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>
29274 == {{echo|foo [[Category:Foo]]}} ==
29278 Headings: Category in ref isn't hoisted
29281 "modes": ["html2wt"],
29282 "scrubWikitext": true
29285 <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>
29287 <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>
29290 [[Category:Baz]] </ref> ==
29296 Parsoid: Serialize positional parameters with = in them as named parameter
29300 <p about="#mwt1" typeof="mw:Transclusion"
29301 data-mw='{"parts":[{"template":{"target":{"wt":"echo","href":"./Template:Echo"},"params":{"1":{"wt":"f=oo"}},"i":0}}]}'>foo</p>
29303 <p about="#mwt1" typeof="mw:Transclusion"
29304 data-mw='{"parts":[{"template":{"target":{"wt":"echo","href":"./Template:Echo"},"params":{"1":{"wt":"f=oo"}, "2":{"wt":"bar"}},"i":0}}]}'>foo</p>
29306 <!--Orig params with data-parsoid has heuristics for handling = chars-->
29307 <!--FIXME: But maybe the heuristic needs fixing to apply to new params as well-->
29308 <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>
29312 {{echo|1=f=oo|2=bar}}
29314 <!--Orig params with data-parsoid has heuristics for handling = chars-->
29315 <!--FIXME: But maybe the heuristic needs fixing to apply to new params as well-->
29316 {{echo|<nowiki>f=oo</nowiki>|bar}}
29320 Parsoid: Serialize positional parameters with = in extlink as named parameter
29324 <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>
29326 {{echo|1=http://stuff?is=ok}}
29330 Parsoid: Correctly serialize block-node children when they are a combination of text and p-nodes
29334 <div>a<p>b</p></div>
29355 Substrings resembling wikitext in hrefs should not get nowiki escapes
29359 <a rel="mw:WikiLink" href="./Foo''bar''baz">Foo''bar''baz</a>
29365 Enforce single-line context in the serializer
29372 <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">
29373 </span><span about="#mwt1">you</span> </h2>
29375 <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>
29377 <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
29378 there</span></li></ol>
29390 ho </dt><dd data-parsoid='{"stx":"row"}'> hi
29397 </tbody></table></dd></dl>
29401 == hi {{bogus|there
29412 * foo '''bar''' baz
29424 Serialize new placeholder space without spans
29428 <p>foo<span typeof="mw:Placeholder"> </span>: bar</p>
29430 <p>foo<span typeof="mw:DisplaySpace mw:Placeholder" data-parsoid='{"src":" ","isDisplayHack":true}'> </span>: bar</p>
29432 <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>
29438 <ref>foo : bar</ref>ok
29442 #-----------------------
29443 # Tag minimization tests
29444 #-----------------------
29447 1. I/B quote minimization: wikitext-only tags should be combined
29451 <p><i>A</i><i>B</i></p>
29452 <p><b>A</b><b>B</b></p>
29453 <p><i>A</i><b><i>B</i></b></p>
29454 <p><b>A</b><i><b>B</b></i></p>
29455 <p><b>A</b><i><b>B</b><b>C</b></i><b>D</b></p>
29456 <p><i><b>A</b></i><i><b>B</b></i></p>
29457 <p><i><b>A</b></i><b><i>B</i></b></p>
29458 <p><b><i>A</i></b><i><b>B</b></i></p>
29478 2. I/B quote minimization: wikitext and html tags should not be combined
29482 <p><i>A</i><i data-parsoid='{"stx":"html"}'>B</i></p>
29483 <p><i>A</i><b><i data-parsoid='{"stx":"html"}'>B</i></b></p>
29487 ''A''<nowiki/>'''<i>B</i>'''
29491 3. I/B quote minimization: templated content stops minimization
29495 <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>
29496 <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>
29498 ''A''{{echo|''B''}}
29500 ''A''{{echo|'''''B'''''}}
29504 4. I/B quote minimization: new content should be mimimized with adjacent old content
29508 <p><i>A</i><i>B</i></p>
29509 <p><b>A</b><b>B</b></p>
29510 <p><i>A</i><b><i>B</i></b></p>
29520 5a. Merge adjacent quote nodes if they've been edited
29523 "modes": ["wt2wt", "selser"],
29525 ["p", "contents", "remove", ":contains('b')"]
29535 5b. Merge adjacent quote nodes if they've been edited
29538 "modes": ["wt2wt", "selser"],
29544 ''a''<span id="x">b</span>''c''
29550 1. Merge adjacent link nodes as long as at least one element is new
29553 "modes": ["html2wt"],
29554 "scrubWikitext": true
29557 <a rel="mw:WikiLink" href="./Football">Foot</a><a rel="mw:WikiLink" href="./Football">ball</a>
29558 <a data-parsoid="{}" rel="mw:WikiLink" href="./Football">Foot</a><a rel="mw:WikiLink" href="./Football">ball</a>
29559 <a data-parsoid="{}" rel="mw:WikiLink" href="./Football">Foot</a><a data-parsoid="{}" rel="mw:WikiLink" href="./Football">ball</a>
29563 [[Football|Foot]][[Football|ball]]
29567 2. Merge adjacent link nodes and enable additional normalizations
29570 "modes": ["html2wt"],
29571 "scrubWikitext": true
29574 <a rel="mw:WikiLink" href="./Football"><i>Foot</i></a><a rel="mw:WikiLink" href="./Football"><i>ball</i></a>
29580 3. Don't merge adjacent link nodes if scrubWikitext is false
29583 "modes": ["html2wt"],
29584 "scrubWikitext": false
29587 <a rel="mw:WikiLink" href="./Football">Foot</a><a rel="mw:WikiLink" href="./Football">ball</a>
29589 [[Football|Foot]][[Football|ball]]
29593 1. Move format tags outside of WikiLink
29596 "modes": ["html2wt"],
29597 "scrubWikitext": true
29600 <a rel="mw:WikiLink" href="./Football"><i>Football</i></a>
29601 <a rel="mw:WikiLink" href="./Football"><i><b>Football</b></i></a>
29602 <a rel="mw:WikiLink" href="./Football"><u><i><b>Football</b></i></u></a>
29605 '''''[[Football]]'''''
29606 <u>'''''[[Football]]'''''</u>
29610 2. Move format tags outside of WikiLink with mergable A tags
29613 "modes": ["html2wt"],
29614 "scrubWikitext": true
29617 <a rel="mw:WikiLink" href="./Football"><i><b>Foot</b></i></a><a rel="mw:WikiLink" href="./Football"><i><b>ball</b></i></a>
29619 '''''[[Football]]'''''
29623 3. Move format tags outside of WikiLink while preserving formats already outside WikiLink
29626 "modes": ["html2wt"],
29627 "scrubWikitext": true
29630 <font color="red"><a rel="mw:WikiLink" href="./Foo" title="Foo" class="mw-redirect"><u><b>Foo</b></u></a></font>
29632 <font color="red"><u>'''[[Foo]]'''</u></font>
29636 4. Do not move format tags outside of WikiLink which includes attributes color, style and class
29639 "modes": ["html2wt"],
29640 "scrubWikitext": true
29643 <a rel="mw:WikiLink" href="./Foo" title="Foo" class="mw-redirect"><font color="red">Foo</font></a>
29644 <a rel="mw:WikiLink" href="./Foo" title="Foo" class="mw-redirect"><span style="color: blue; font-size: 46px;">Foo></span></a>
29645 <a rel="mw:WikiLink" href="./Foo" title="Foo" class="mw-redirect"><span class="Bar">Foo</span></a>
29647 [[Foo|<font color="red">Foo</font>]]
29648 [[Foo|<span style="color: blue; font-size: 46px;">Foo></span>]]
29649 [[Foo|<span class="Bar">Foo</span>]]
29653 5. T194083 Regression test: Manual edit test that also enables scrubWikitext to move format tags outside wikilinks
29656 "modes": ["selser"],
29657 "scrubWikitext": true,
29659 ["a", "html", "<i>Foo</i>"]
29669 6. Regression test: Manual edit test to ensure diff markers are not lost
29672 "modes": ["selser"],
29673 "scrubWikitext": true,
29675 ["i", "wrap", "<a href='./Foo' rel='mw:WikiLink'></a>"]
29685 7. T194083 Regression test: Manual edit test to ensure nested diff markers aren't inserted
29688 "modes": ["selser"],
29689 "scrubWikitext": true,
29691 ["div", "after", "\n<p><a href='./Foo' rel='mw:WikiLink'>Foo </a>, placeholder</p>"]
29695 <div>placeholder</div>
29697 <div>placeholder</div>
29698 [[Foo]] , placeholder
29701 #------------------------------
29702 # End of tag minimization tests
29703 #------------------------------
29706 T56262: New entities
29710 <span typeof="mw:Entity"> </span>
29715 ## Note that there is no wikitext output for 'unknownproperty' ##
29716 ## Unknown magic words are silently dropped ##
29723 <meta property='mw:PageProp/toc' />
29724 <meta property='mw:PageProp/notoc' />
29725 <meta property='mw:PageProp/forcetoc' />
29726 <meta property='mw:PageProp/index' />
29727 <meta property='mw:PageProp/noindex' />
29728 <meta property='mw:PageProp/nogallery' />
29729 <meta property='mw:PageProp/noeditsection' />
29730 <meta property='mw:PageProp/notitleconvert' />
29731 <meta property='mw:PageProp/nocontentconvert' />
29732 <meta property='mw:PageProp/unknownproperty' />
29742 __NOCONTENTCONVERT__
29746 Consecutive <pre>s should not get merged
29748 parsoid=html2wt,html2html
29750 <pre>a</pre><pre>b</pre>
29778 Edited ISBN links not serializable as ISBN links should serialize as wikilinks
29782 <a href="./Special:BookSources/1234567890" rel="mw:ExtLink">ISBN 1234567895</a>
29784 [[Special:BookSources/1234567890|ISBN 1234567895]]
29788 Edited RFC links not serializable as RFC links should serialize as extlinks
29792 <a href="https://tools.ietf.org/html/rfc123" rel="mw:ExtLink">New RFC</a>
29794 [https://tools.ietf.org/html/rfc123 New RFC]
29798 Edited PMID links not serializable as PMID links should serialize as extlinks
29802 <a href="//www.ncbi.nlm.nih.gov/pubmed/123?dopt=Abstract" rel="mw:ExtLink">New PMID</a>
29804 [//www.ncbi.nlm.nih.gov/pubmed/123?dopt=Abstract New PMID]
29808 WTS of autolinks with trailing/surrounding context
29812 <p><a href="http://cscott.net">http://cscott.net</a><b>foo</b></p>
29813 <p><a href="http://cscott.net">http://cscott.net</a><b data-parsoid='{"stx":"html"}'>foo</b></p>
29814 <p><b><a href="http://cscott.net">http://cscott.net</a></b></p>
29815 <p><b><a href="http://cscott.net">http://cscott.net</a> </b></p>
29816 <p><b><a href="http://cscott.net">http://cscott.net</a>x</b></p>
29817 <p><a href="http://cscott.net">http://cscott.net</a>x</p>
29819 http://cscott.net'''foo'''
29821 http://cscott.net<b>foo</b>
29823 '''http://cscott.net'''
29825 '''http://cscott.net '''
29827 '''http://cscott.net<nowiki/>x'''
29829 http://cscott.net<nowiki/>x
29833 WTS of autolinks with nowikis (round-trip)
29835 x<nowiki/>http://cscott.net<nowiki/>x
29837 <p>x<a rel="mw:ExtLink" class="external free" href="http://cscott.net">http://cscott.net</a>x</p>
29840 # this is the "easy" test because it leaves in place all the
29841 # data-parsoid information indicating this is an autolink
29843 WTS of autolinks with escapes (editing)
29846 "modes": ["wt2wt"],
29848 [ "span", "remove" ]
29852 x<nowiki/>http://cscott.net<nowiki/>x
29854 x<nowiki/>http://cscott.net<nowiki/>x
29858 WTS of edited autolink-like text (T103364)
29861 "modes": ["wt2wt"],
29863 [ "span[typeof]", "removeAttr", "typeof" ]
29867 Not a link: <nowiki>http://example.com</nowiki>.
29869 Not a link: <span><nowiki>http://example.com</nowiki></span>.
29873 WTS of newly-authored autolink-like text (T103364)
29877 <p>http://example.com is not a link.</p>
29879 <nowiki>http://example.com</nowiki> is not a link.
29883 WTS of autolink-like text after an autolink (T108563)
29887 <p><a rel="mw:ExtLink" href="http://example.com">http://example.com</a> http://example.com is not a link.</p>
29889 http://example.com <nowiki>http://example.com</nowiki> is not a link.
29893 Magic links inside links (not autolinked)
29895 [[Foo|http://example.com]]
29898 [[Foo|ISBN 123456789x]]
29900 [http://foo.com http://example.com]
29901 [http://foo.com RFC 1234]
29902 [http://foo.com PMID 1234]
29903 [http://foo.com ISBN 123456789x]
29905 <p><a href="/wiki/Foo" title="Foo">http://example.com</a>
29906 <a href="/wiki/Foo" title="Foo">RFC 1234</a>
29907 <a href="/wiki/Foo" title="Foo">PMID 1234</a>
29908 <a href="/wiki/Foo" title="Foo">ISBN 123456789x</a>
29909 </p><p><a rel="nofollow" class="external text" href="http://foo.com">http://example.com</a>
29910 <a rel="nofollow" class="external text" href="http://foo.com">RFC 1234</a>
29911 <a rel="nofollow" class="external text" href="http://foo.com">PMID 1234</a>
29912 <a rel="nofollow" class="external text" href="http://foo.com">ISBN 123456789x</a>
29915 <p><a rel="mw:WikiLink" href="./Foo" title="Foo">http://example.com</a>
29916 <a rel="mw:WikiLink" href="./Foo" title="Foo">RFC 1234</a>
29917 <a rel="mw:WikiLink" href="./Foo" title="Foo">PMID 1234</a>
29918 <a rel="mw:WikiLink" href="./Foo" title="Foo">ISBN 123456789x</a></p>
29920 <p><a rel="mw:ExtLink" class="external text" href="http://foo.com">http://example.com</a>
29921 <a rel="mw:ExtLink" class="external text" href="http://foo.com">RFC 1234</a>
29922 <a rel="mw:ExtLink" class="external text" href="http://foo.com">PMID 1234</a>
29923 <a rel="mw:ExtLink" class="external text" href="http://foo.com">ISBN 123456789x</a></p>
29927 Magic links inside image captions (autolinked)
29929 [[File:Foobar.jpg|thumb|http://example.com]]
29930 [[File:Foobar.jpg|thumb|RFC 1234]]
29931 [[File:Foobar.jpg|thumb|PMID 1234]]
29932 [[File:Foobar.jpg|thumb|ISBN 123456789x]]
29934 <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" decoding="async" 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>
29935 <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" decoding="async" 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>
29936 <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" decoding="async" 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>
29937 <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" decoding="async" 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>
29939 <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>
29940 <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>
29941 <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>
29942 <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>
29946 WTS of magic word text (T109371)
29951 <p><a href="http://foo.com" rel="mw:ExtLink">RFC 1234</a></p>
29952 <p><a href="./Foo" rel="mw:WikiLink">RFC 1234</a></p>
29954 <nowiki>RFC 1234</nowiki>
29956 [http://foo.com RFC 1234]
29962 Edited Redirect link should emit a non-piped wikitext link
29966 <link rel="mw:PageProp/redirect" href="Bar" data-parsoid='{"a":{"href":"./Foo"},"sa":{"href":"Foo"}}'>
29972 T75121: Infer extension name from typeOf if data-mw is not present
29974 parsoid={ "modes": ["html2wt"], "suppressErrors": true }
29976 <div typeOf="mw:Extension/foo"></div>
29981 # Note that the <p> wrapping isn't present in PHP parser output
29982 # The important thing for this test is that P-wrapping doesn't
29983 # interfere with the <nowiki> protection for leading - in <td>
29984 # (which isn't necessary for <th>).
29986 T88318: p-wrapped dash in table.
29988 parsoid=html2wt,wt2wt
29991 <tr><th><p>-</p></th><th><p>- </p></th></tr>
29992 <tr><td><p>-</p></td><td><p>- </p></td></tr>
29993 <tr><td><small>-</small></td><td><br/><p>-</p></td><td><br/>-</td></tr>
30000 |<nowiki>-</nowiki>
30001 |<nowiki>- </nowiki>
30021 <td><small>-</small>
30028 </td></tr></tbody></table>
30032 T149209: WTS: Handle newlines in table cells properly
30040 </td><td data-parsoid='{"stx":"row"}'>c</td></tr>
30042 </td><td data-parsoid='{"stx":"row", "startTagSrc": "{{!}}{{!}}"}'>y</td></tr>
30048 </th><th data-parsoid='{"stx":"row"}'>c</th></tr>
30050 </th><th data-parsoid='{"stx":"row"}'>y</th></tr>
30072 T149209: Selser: Handle newlines in table cells properly
30075 "modes": ["selser"],
30077 [ "#h1", "html", "a\nb\n" ],
30078 [ "#h2", "html", "a\nb\n" ],
30079 [ "#c1", "html", "a\nb\n" ],
30080 [ "#c2", "html", "<p>a</p>" ],
30081 [ "#c3", "html", "<p>a</p>" ],
30082 [ "#c4", "html", "edit-me<p>a</p>" ]
30087 ! id="h1" |edit-me!!1
30089 ! id="h2" |edit-me||2
30091 | id="c1" |edit-me||3
30093 | id="c2" |edit-me||4
30095 | id="c3" |edit-me||p||q||r
30097 | id="c4" |edit-me||p||q||r
30126 HTML id attribute with Parsoid-like element ids should not be serialized to wikitext
30131 <td id='mwAc'>foo</td>
30132 <td id='serialize-this'>bar</td>
30137 | id="serialize-this" |bar
30142 Parsoid-like element ids should not be serialized to wikitext unless shadowed
30146 <div id="mwAQ" data-parsoid='{"stx":"html","a":{"id":"mwAQ"},"sa":{"id":"hello"}}'>ok</div>
30148 <div id="hello">ok</div>
30152 Testing serialization after deletion in references
30155 "modes": ["wt2wt"],
30161 hi <ref><div id="x">ho</div></ref>
30171 Testing serialization after deletion of table cells
30174 "modes": ["wt2wt", "selser"],
30182 | id="x" |c1 {{!}}{{!}}{{!}}c2 |||c3
30192 Testing selser after addition of new row before first row (T125419)
30195 "modes": ["wt2wt", "selser"],
30197 [ "tr", "before", "<tr><td>X</td></tr>" ]
30213 Serialize new table rows in a HTML table using HTML tags
30216 "modes": ["wt2wt", "selser"],
30218 [ "tr", "before", "<tr><td>X</td></tr>" ]
30222 <table><tr><td>a</td></tr></table>
30224 <table><tr><td>X</td></tr><tr><td>a</td></tr></table>
30228 Serialize new table cells in a HTML row using HTML tags
30231 "modes": ["wt2wt", "selser"],
30233 [ "td", "before", "<td>X</td>" ]
30237 <table><tr><td>a</td></tr></table>
30239 <table><tr><td>X</td><td>a</td></tr></table>
30243 Serialize wikitext list items as HTML list items when embedded in a HTML list
30247 <ul data-parsoid='{"stx": "html"}'>
30248 <li data-parsoid='{}'>a</li>
30263 # Nested list should be inside <li>, that is
30264 # <ul><li>foo<ul>..</ul></li></ul> instead of
30265 # <ul><li>foo</li><ul>..</ul></ul>
30266 # See https://stackoverflow.com/questions/5899337/proper-way-to-make-html-nested-list
30268 Wikitext lists can be nested inside HTML lists
30272 <ul data-parsoid='{"stx": "html"}'>
30273 <li data-parsoid='{"stx": "html"}'>a
30274 <ul><li>b</li></ul>
30278 <ul data-parsoid='{"stx": "html"}'>
30280 <ul><li>y</li></ul>
30298 <ul><li>b</li></ul>
30303 <ul><li>y</li></ul>
30312 "modes": ["wt2wt"],
30314 [ "#xyz", "before", "<b>before</b> stuff " ],
30315 [ "#xyz", "after", " stuff <i>after</i>" ],
30316 [ "#xyz", "html", "x <b>y</b> z" ]
30320 <span id="xyz">hello</span>
30322 '''before''' stuff <span id="xyz">x '''y''' z</span> stuff ''after''
30326 Never serialize a-tag as html, regardless of what data-parsoid has to say
30328 parsoid={ "modes": ["html2wt"], "suppressErrors": true }
30330 <a rel="mw:WikiLink" href="./Foo" title="Foo" data-parsoid='{"stx":"html"}'>Foo</a>
30335 ## SSS FIXME: This is broken output nevertheless.
30336 ## What might be a reasonable non-broken output for this?
30337 ## This is an edge case unlikely to be seen in production
30338 ## that I am not wasting more time on this right now.
30340 Never serialize a-tag as html, no matter what attributes it has
30342 parsoid={ "modes": ["html2wt"], "suppressErrors": true }
30344 <a bad='true' href='http://boo.org'><img src='http://boohoo.org' /></a>
30346 [http://boo.org http://boohoo.org]
30349 # Misnested is an indication that selser can reuse the source but these have
30350 # shown to sneak through on occasion. See T101768.
30351 # The original wikitext here is: [http://test.com [[one]] two three]
30353 Strip span tags added to mark misnested links
30357 <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>
30359 [http://test.com][[one]] two three
30363 Catch regression when unpacking misnested links
30367 {{echo|hi}}[http://example.com [[ho]]]
30369 <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>
30373 Catch regression when unpacking with trailing content
30375 {{echo|Foo <references/> bar}}
30377 <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>
30381 Use data-parsoid.firstWikitextNode to compute newline constraints for template content
30385 <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|}"]}'>
30397 ## This test verifies the presence and computation of this attribute indirectly
30398 ## by making an edit and ensuring that the serialization is correct (which it would be
30399 ## only if firstWikitextNode is properly set).
30401 data-parsoid.firstWikitextNode should be computed properly in the presence of fostered content
30404 "modes": ["wt2wt"],
30406 [ "div#x", "remove" ],
30407 [ "div", "before", "<div>new</div>" ]
30411 <div id="x">foo</div>
30413 {{echo|<div>boo</div>
30421 {{echo|<div>boo</div>
30427 # --------------------------------------------
30428 # Tests spec'ing wikitext serialization norms |
30429 # --------------------------------------------
30432 Serialize multi-line indent-pre starting with wikitext syntax
30446 1. Categories should always be serialized on their own line
30450 foo<link rel="mw:PageProp/Category" href="./Category:Foo">bar
30458 2. Categories that are part of templates should not introduce a line break
30460 foo {{echo|<span>bar</span> [[Category:baz]]}} bar
30462 <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>
30465 # Careful while editing these next 2 tests. There are \u200f characters
30466 # before and after the <link> tags in the HTML and following some
30467 # of the categories in wikitext
30468 # Do not remove these characters in edits.
30470 # As part of the serialization, these bidi characters will get stripped.
30472 RTL (\u200f) and LTR (\u200e) markers around category tags should be stripped
30475 "modes": ["html2wt"],
30476 "scrubWikitext": true
30479 <p><link rel="mw:PageProp/Category" href="./קטגוריה:טקסים" />
30480 <link rel="mw:PageProp/Category" href="./קטגוריה:_שיטות_משפט" /></p>
30483 [[קטגוריה: שיטות משפט]]
30487 RTL (\u200f) and LTR (\u200e) markers should not be stripped if followed by a text node
30490 "modes": ["html2wt"],
30491 "scrubWikitext": true
30494 <p><link rel="mw:PageProp/Category" href="./קטגוריה:טקסים" />y</p>
30501 Lists: Add space after bullets
30508 <li><span> baz</span></li>
30513 * <span> baz</span>
30517 1. Headings: Add space before/after == (T53744)
30524 <h2><span> baz</span></h2>
30532 == <span> baz</span> ==
30536 2. Headings: Add space before/after == even after hoisted content
30539 "modes": ["html2wt"],
30540 "scrubWikitext": true
30543 <h2> <link href="./Category:A2" rel="mw:PageProp/Category" />ok</h2>
30551 1. Headings: suppress newly created empty headings
30554 "modes": ["html2wt"],
30555 "scrubWikitext": true
30563 2. Headings: don't suppress empty headings if scrubWikitext is false
30573 3. Headings: suppress empty headings on edits
30576 "modes": ["selser"],
30577 "scrubWikitext": true,
30583 ==<span id="x">foo</span>==
30588 Headings: Replace <br/> with a single whitespace char (when scrubWikitext = true)
30591 "modes": ["html2wt"],
30592 "scrubWikitext": true
30595 <h2>foo<br/>bar</h2>
30596 <h2>foo <span><br/>bar</span> baz</h2>
30600 == foo <span> bar</span> baz ==
30604 Headings: Replace <br/> with a single whitespace char (when scrubWikitext = false)
30607 "modes": ["html2wt"],
30608 "scrubWikitext": false
30611 <h2>foo<br/>bar</h2>
30617 1. WT Quote Tags: suppress newly created empty style tags
30620 "modes": ["html2wt"],
30621 "scrubWikitext": true
30629 2. WT Quote Tags: don't suppress empty style tags if scrubWikitext is false
30635 ''<nowiki/>'''''<nowiki/>'''
30639 3. WT Quote Tags: suppress empty style tags on edits
30642 "modes": ["selser"],
30643 "scrubWikitext": true,
30649 '''<span id="x">foo</span>'''
30654 1. Anchors: suppress newly created empty anchors
30657 "modes": ["html2wt"],
30658 "scrubWikitext": true
30661 <a rel="mw:WikiLink" href="./Test" title="Test"></a>
30666 2. Anchors: don't suppress empty anchors if scrubWikitext is false
30669 "modes": ["html2wt"],
30670 "scrubWikitext": false
30673 <a rel="mw:WikiLink" href="./Test" title="Test"></a>
30679 3. Anchors: suppress empty anchors on edits
30682 "modes": ["selser"],
30683 "scrubWikitext": true,
30689 [[Test|<span id="x">foo</span>]]
30694 3a. Anchors: do not suppress numbered extlinks
30697 "modes": ["wt2wt"],
30698 "scrubWikitext": true
30703 <a rel="mw:ExtLink" href="http://foo.com"></a>
30707 3b. Anchors: do not suppress numbered extlinks
30710 "modes": ["wt2wt"],
30711 "scrubWikitext": true,
30717 [http://foo.com <span id="x">foo</span>]
30723 Normalizations should be restricted to edited content
30726 "modes": ["selser"],
30727 "scrubWikitext": true,
30729 [ "h1", "before", "<i></i>"]
30743 1. Multiple normalizations (html2wt)
30746 "modes": ["html2wt"],
30747 "scrubWikitext": true
30751 <p><a href='Foo' rel='mw:WikiLink'>foo<i></i>
30752 </a><b><i></i></b>x</p>
30761 2. Multiple normalizations (selser)
30764 "modes": ["selser"],
30765 "scrubWikitext": true,
30767 [ "#x", "after", "<h1><i></i></h1>\n<p> bar<b></b></p>"]
30771 <div id="x">foo</div>
30773 <div id="x">foo</div>
30778 1. Indent Pre Nowiki: suppress whitespace at the start of new paragraph
30781 "modes": ["html2wt"],
30782 "scrubWikitext": true
30794 2. Indent Pre Nowiki: don't suppress whitespace at the start of new paragraph if scrubWikitext is false
30801 <nowiki> </nowiki>hi
30803 <nowiki> </nowiki> hello
30807 3. Indent Pre Nowiki: suppress whitespace after newlines in new paragraph or table cell
30810 "modes": ["html2wt"],
30811 "scrubWikitext": true
30820 baz bang</td></tr></table>
30826 bar<span>boo</span></p>
30842 bar<span>boo</span>
30846 4. Indent Pre Nowiki: suppress leading whitespace in edited paragraphs
30849 "modes": ["selser"],
30850 "scrubWikitext": true,
30852 [ "p", "html", " a\n b" ]
30863 1. New links that end in spaces
30866 "modes": ["html2wt"],
30867 "scrubWikitext": false
30870 <p><a rel="mw:WikiLink" href="./Berlin" title="Berlin">Berlin </a>is the capital of Germany.</p>
30871 <p><a rel="mw:WikiLink" href="./Foo" title="Foo">Foo </a><b>bar</b></p>
30872 <p><a rel="mw:WikiLink" href="./Boston" title="Boston">Boston </a> is a city.</p>
30874 [[Berlin ]]<nowiki/>is the capital of Germany.
30878 [[Boston ]] is a city.
30882 2. New links that end in spaces
30885 "modes": ["html2wt"],
30886 "scrubWikitext": true
30889 <p><a rel="mw:WikiLink" href="./Berlin" title="Berlin">Berlin </a>is the capital of Germany.</p>
30890 <p><a rel="mw:WikiLink" href="./Foo" title="Foo">Foo </a><b>bar</b></p>
30891 <p><a rel="mw:WikiLink" href="./Boston" title="Boston">Boston </a> is a city.</p>
30893 [[Berlin]] is the capital of Germany.
30897 [[Boston]] is a city.
30901 1. Table cells with escapable prefixes
30904 "modes": ["html2wt"],
30905 "scrubWikitext": false
30909 <tr><td>a</td></tr>
30910 <tr><td>-</td></tr>
30911 <tr><td>+</td></tr>
30912 <tr><td>}</td></tr>
30918 |<nowiki>-</nowiki>
30920 |<nowiki>+</nowiki>
30922 |<nowiki>}</nowiki>
30927 2. Table cells with escapable prefixes
30930 "modes": ["html2wt"],
30931 "scrubWikitext": true
30935 <tr><td>a</td></tr>
30936 <tr><td>-</td></tr>
30937 <tr><td>+</td></tr>
30938 <tr><td>}</td></tr>
30953 3a. Table cells with escapable prefixes after edits
30956 "modes": ["selser"],
30957 "scrubWikitext": true,
30959 [ "table tbody tr:first-child td:first-child", "remove"]
30973 3b. Table cells with escapable prefixes after edits
30976 "modes": ["selser"],
30977 "scrubWikitext": true,
30979 [ "table tbody tr:first-child td:first-child", "html", "-" ],
30986 |<span id="x">foo</span>+
30995 # FIXME: This test will fail because
30996 # normalization doesn't realize that the id attribute
30997 # will eliminate the escapable scenario
30999 4a. Table cells without escapable prefixes after edits
31002 "modes": ["selser"],
31003 "scrubWikitext": true,
31005 [ "#x", "html", "-" ]
31018 ## This tests normalizer's ability to discriminate between
31019 ## cells having identical content.
31021 4b. Table cells without escapable prefixes after edits
31024 "modes": ["selser"],
31025 "scrubWikitext": true,
31027 [ "td", "html", "-" ]
31040 ## This tests normalizer's ability to not be tripped by
31041 ## comments (and whitespace)
31043 4c. Table cells without escapable prefixes after edits
31046 "modes": ["selser"],
31047 "scrubWikitext": true,
31049 [ "table tbody tr td:first-child", "remove" ]
31064 ## This tests normalizer's ability to handle HTML cells
31066 4d. Table cells without escapable prefixes after edits
31069 "modes": ["selser"],
31070 "scrubWikitext": true,
31072 [ "td", "html", "-" ]
31077 <tr><td>a</td></tr>
31081 <tr><td>-</td></tr>
31085 ## T111151 Remove font elements without attributes
31087 5a. font tags without attributes should be dropped in scrubWikitext mode
31090 "modes": ["html2wt"],
31091 "scrubWikitext": true
31095 <font><font>bar</font></font>
31096 <font class="x">boo</font>
31100 <font class="x">boo</font>
31104 5b. font tags should not be dropped without scrubWikitext being enabled
31107 "modes": ["html2wt"],
31108 "scrubWikitext": false
31117 Ignore empty <p></p> when scrubWikitext is false
31120 "modes": ["html2wt"],
31121 "scrubWikitext": false
31125 <p>a</p><p></p><p>b</p>
31166 Normalize empty paragraphs to HTML form that html2wt expects
31169 "modes": ["html2wt"],
31170 "scrubWikitext": true
31174 <p>a</p><p></p><p>b</p>
31239 Empty paragraphs (marked with mw-empty-elt) found in source should not be normalized away
31242 "modes": ["html2wt"],
31243 "scrubWikitext": true
31251 <p class="mw-empty-elt"></p>
31255 <caption></caption>
31266 Templated content should be skipped over by normalization
31269 "modes": ["html2wt"],
31270 "scrubWikitext": true
31273 <p about="#mwt1" typeof="mw:Transclusion" data-mw='{"parts":[{"template":{"target":{"wt":"SomeTemplate1","href":"./Template:SomeTemplate1"},"params":{"1":{"wt":"boo"}},"i":0}}]}'>foobar</p><p about="#mwt2" typeof="mw:Transclusion" data-mw='{"parts":[{"template":{"target":{"wt":"SomeTemplate2","href":"./Template:SomeTemplate2"},"params":{"1":{"wt":"booboo"}},"i":0}}]}'>foobar</p><span about="#mwt2">
31274 </span><p about="#mwt2"></p><span about="#mwt2">
31277 {{SomeTemplate1|boo}}{{SomeTemplate2|booboo}}
31281 Escape nowiki DOM elements
31285 <nowiki><i>foo</i></nowiki>
31287 <nowiki>''foo''</nowiki>
31290 # This is meant to be an interim fix while we go about figuring out
31291 # how to not introduce these trailing <nowiki/>s in the first place.
31293 T115717: Strip trailing <nowiki/>s (without affecting valid uses)
31297 <p>x<meta typeof="mw:Placeholder" data-parsoid='{"src":"<nowiki/>"}'/><meta typeof="mw:Placeholder" data-parsoid='{"src":"<nowiki/>"}'/>
31299 <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>
31300 <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>
31314 New list is serialized on newlines
31318 <p>The quick brown fox jumps over the lazy dog.</p><ul>
31322 </ul><p>The quick onyx goblin jumps over the lazy dwarf.</p>
31324 The quick brown fox jumps over the lazy dog.
31330 The quick onyx goblin jumps over the lazy dwarf.
31334 New lists in formatting elements serialized w/o newlines
31346 <small><ul><li>hi</li></ul></small>
31358 New list in table doesn't need newlines
31362 <table><tr><td><ul><li>test</li><li>123</li></td></tr></table>
31371 # ---------------------------------------------------
31372 # End of tests spec'ing wikitext serialization norms |
31373 # ---------------------------------------------------
31377 Bare inline nodes not wrapped inside p-tags should be treated as p-wrapped
31385 <td><b>c</b><p>d</p></td>
31404 Anchor without href scenarios
31406 parsoid={ "modes": ["html2wt"], "suppressErrors": true }
31409 <a class="no">dice</a>
31414 <span name="foo"></span>
31418 New transclusion added after a list should be serialized after the list
31422 <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>
31428 # -----------------------------------------------------------------
31429 # End of section for Parsoid-only html2wt tests for serialization
31431 # -----------------------------------------------------------------
31433 # -----------------------------------------------------------------
31434 # The following section of tests are primarily to spec behavior of
31435 # the selective serializer. All these tests have manual selser
31436 # changes. The automated selser changes for all tests handle the
31437 # wide variation of changes, but these tests here capture specs
31438 # deterministically.
31439 # ----------------------------------------------------------------
31443 Selser: New comments should not be lost
31446 "modes": ["selser"],
31448 [ "#a", "after", "<!--c1-->" ],
31449 [ "#b", "before", "<!--c2-->" ]
31453 <span id="a">a</span>
31455 <span id="b">b</span>
31457 <span id="a">a</span><!--c1-->
31459 <!--c2--><span id="b">b</span>
31464 Selser: Check for validity of DSR before using it
31467 "modes": ["selser"],
31469 [ "#a", "before", "<meta property='mw:PageProp/displaytitle' content='foo'>" ]
31473 <span id="a">a</span>
31475 {{DISPLAYTITLE:foo}}
31476 <span id="a">a</span>
31480 1. DOMDiff: Changes to <ref> content should be looked up using id
31483 "modes": ["selser"],
31485 ["#X", "after", "bar"],
31486 ["#Y", "after", "baz"]
31490 X <ref><span id="X">foo</span></ref>
31493 <ref name="a"><span id="Y">foo</span></ref>
31496 X <ref><span id="X">foo</span>bar</ref>
31499 <ref name="a"><span id="Y">foo</span>baz</ref>
31504 2. DOMDiff: Changes to <ref> content should be looked up using id
31507 "modes": ["selser"],
31509 ["#Z", "after", "bar"]
31513 A <ref>foo bar for a</ref>
31514 B <ref group="X" name="b" />
31518 <references group="X">
31519 <ref name="b"><span id="Z">foo</span></ref>
31522 A <ref>foo bar for a</ref>
31523 B <ref group="X" name="b" />
31527 <references group="X">
31528 <ref name="b"><span id="Z">foo</span>bar</ref>
31533 DOMDiff: Edits to content nested in elements with templated attributes should not be lost (T139388)
31536 "modes": ["selser"],
31538 [ "div:first-child", "text", "bar" ]
31542 <div style="{{1x|color:red;}}%">foo</div>
31544 <div style="{{1x|color:red;}}%">bar</div>
31556 <li class="mw-empty-elt"></li>
31557 <li class="mw-empty-elt"></li>
31564 [[File:Thumb.png|thumb]]
31566 <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" decoding="async" 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>
31568 <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>
31572 unclosed internal link XSS (T137264)
31574 [[#%3Cscript%3Ealert(1)%3C/script%3E|
31576 <p>[[#<script>alert(1)</script>|
31579 <p>[[#%3Cscript%3Ealert(1)%3C/script%3E|</p>
31583 Validating that <style> isn't eaten by tidy (T167349)
31588 <style>.foo::before { content: "<foo>"; }</style>
31589 <style data-mw-foobar="baz">.foo::after { content: "<bar>"; }</style>
31593 <style>.foo::before { content: "<foo>"; }</style>
31594 <style data-mw-foobar="baz">.foo::after { content: "<bar>"; }</style>
31598 <style typeof="mw:Extension/style" data-mw='{"name":"style","attrs":{},"body":{"extsrc":".foo::before { content: \"<foo>\"; }"}}'>.foo::before { content: "<foo>"; }</style>
31599 <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>
31603 ## Right now, Parsoid doesn't de-duplicate style tags.
31604 ## So, we shouldn't see link tags that need to bypass the sanitizer.
31605 ## In a followup patch, when we de-duplicate style tags and
31606 ## introduce link tags, we'll add a hook for link tags in
31607 ## the parser test runner script.
31609 Validating that <style> isn't wrapped in a paragraph (T186965)
31613 A style tag, by itself or with other style/link tags, shouldn't be wrapped in a paragraph
31615 <style>.foo::before { content: "<foo>"; }</style>
31617 <style>.foo::before { content: "<foo>"; }</style> <link rel="foo" href="bar"/><style>.foo::before { content: "<foo>"; }</style>
31619 But if it's on a line with other content, let it be wrapped.
31621 <style>.foo::before { content: "<foo>"; }</style> bar
31623 foo <style>.foo::before { content: "<foo>"; }</style>
31625 foo <style>.foo::before { content: "<foo>"; }</style> bar
31627 And the same if we have non-paragraph-breaking whitespace
31630 <style>.foo::before { content: "<foo>"; }</style>
31633 <p>A style tag, by itself or with other style/link tags, shouldn't be wrapped in a paragraph
31635 <style>.foo::before { content: "<foo>"; }</style>
31636 <style>.foo::before { content: "<foo>"; }</style> <link rel="foo" href="bar"/><style>.foo::before { content: "<foo>"; }</style>
31637 <p>But if it's on a line with other content, let it be wrapped.
31638 </p><p><style>.foo::before { content: "<foo>"; }</style> bar
31639 </p><p>foo <style>.foo::before { content: "<foo>"; }</style>
31640 </p><p>foo <style>.foo::before { content: "<foo>"; }</style> bar
31641 </p><p>And the same if we have non-paragraph-breaking whitespace
31643 <style>.foo::before { content: "<foo>"; }</style>
31647 <p>A style tag, by itself or with other style/link tags, shouldn't be wrapped in a paragraph</p>
31649 <style typeof="mw:Extension/style" data-mw='{"name":"style","attrs":{},"body":{"extsrc":".foo::before { content: \"<foo>\"; }"}}'>.foo::before { content: "<foo>"; }</style>
31651 <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>
31653 <p>But if it's on a line with other content, let it be wrapped.</p>
31655 <p><style typeof="mw:Extension/style" data-mw='{"name":"style","attrs":{},"body":{"extsrc":".foo::before { content: \"<foo>\"; }"}}'>.foo::before { content: "<foo>"; }</style> bar</p>
31657 <p>foo <style typeof="mw:Extension/style" data-mw='{"name":"style","attrs":{},"body":{"extsrc":".foo::before { content: \"<foo>\"; }"}}'>.foo::before { content: "<foo>"; }</style></p>
31659 <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>
31661 <p>And the same if we have non-paragraph-breaking whitespace</p>
31664 <style typeof="mw:Extension/style" data-mw='{"name":"style","attrs":{},"body":{"extsrc":".foo::before { content: \"<foo>\"; }"}}'>.foo::before { content: "<foo>"; }</style>
31669 Validating that <link> isn't wrapped in a paragraph (T186965)
31673 A link tag, by itself or with other style/link tags, shouldn't be wrapped in a paragraph
31675 <link rel="foo" href="bar"/>
31677 <link rel="foo" href="bar"/> <style>.foo::before { content: "<foo>"; }</style><link rel="foo" href="bar"/>
31679 But if it's on a line with other content, let it be wrapped.
31681 <link rel="foo" href="bar"/> bar
31683 foo <link rel="foo" href="bar"/>
31685 foo <link rel="foo" href="bar"/> bar
31687 And the same if we have non-paragraph-breaking whitespace
31690 <link rel="foo" href="bar"/>
31693 <p>A link tag, by itself or with other style/link tags, shouldn't be wrapped in a paragraph
31695 <link rel="foo" href="bar"/>
31696 <link rel="foo" href="bar"/> <style>.foo::before { content: "<foo>"; }</style><link rel="foo" href="bar"/>
31697 <p>But if it's on a line with other content, let it be wrapped.
31698 </p><p><link rel="foo" href="bar"/> bar
31699 </p><p>foo <link rel="foo" href="bar"/>
31700 </p><p>foo <link rel="foo" href="bar"/> bar
31701 </p><p>And the same if we have non-paragraph-breaking whitespace
31703 <link rel="foo" href="bar"/>
31709 Extension returning multiple nodes starting with a style tag roundtrips
31714 {{echo|<html><style>.hi { color: red; }</style>
31716 <tr><td class="hi">ho</td></tr>
31719 <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">
31720 </span></p><table about="#mwt5" data-parsoid='{"stx":"html"}'>
31722 <tbody><tr><td class="hi">ho</td></tr>
31727 Decoding of HTML entities in headings and links for IDs and link fragments (T103714)
31729 wgFragmentMode=[ 'html5', 'legacy' ]
31731 ==A&B&C&amp;D&amp;amp;E==
31732 [[#A&B&C&amp;D&amp;amp;E]]
31734 <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>
31735 <p><a href="#A&B&C&amp;D&amp;amp;E">#A&B&C&amp;D&amp;amp;E</a>
31738 <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>
31739 <p><a rel="mw:WikiLink" href="./Parser_test#A&B&C&amp;D&amp;amp;E" data-parsoid='{"stx":"simple","a":{"href":"./Parser_test#A&B&C&amp;D&amp;amp;E"},"sa":{"href":"#A&B&amp;C&amp;amp;D&amp;amp;amp;E"}}'>#A&B&C&amp;D&amp;amp;E</a></p>
31743 Decoding of HTML entities in headings and links for IDs and link fragments (T103714) (legacy)
31745 wgFragmentMode=[ 'legacy' ]
31747 ==A&B&C&amp;D&amp;amp;E==
31748 [[#A&B&C&amp;D&amp;amp;E]]
31750 <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>
31751 <p><a href="#A.26B.26C.26amp.3BD.26amp.3Bamp.3BE">#A&B&C&amp;D&amp;amp;E</a>
31756 Decoding of HTML entities in embedded HTML tags
31758 <table class="1&2&3&amp;4&amp;amp;5"><tr><td>x</td></tr></table>
31760 <table class="1&2&3&amp;4&amp;amp;5"><tr><td>x</td></tr></table>
31763 <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>
31767 Decoding of HTML entities in indicator names for IDs (T104196)
31769 parsoid=wt2html,html2html
31772 <indicator name="1&2&3&amp;4&amp;amp;5">Indicator</indicator>
31774 1&2&3&4&amp;5=Indicator
31777 <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>
31780 # this version of the test strips out the ambiguity so Parsoid rts cleanly
31782 Decoding of HTML entities in indicator names for IDs (unambiguous) (T104196)
31786 <indicator name="1&2&3&amp;4&amp;amp;5">Indicator</indicator>
31788 1&2&3&4&amp;5=Indicator
31791 <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>
31794 # This fragment mode is what Parsoid supports.
31796 HTML5 ids: fallback to legacy
31798 wgFragmentMode=[ 'html5', 'legacy' ]
31810 ==Hey < # " > % : '==
31811 [[#Foo bar]] [[#foo Bar]] [[#Тест]] [[#тест]] [[#Hey < # " > % : ']]
31813 {{anchorencode:💩}} <span id="{{anchorencode:💩}}"></span>
31815 <!-- These two links should produce identical HTML -->
31816 [[#啤酒]] [[#%E5%95%A4%E9%85%92]]
31819 <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>
31821 <li class="toclevel-1 tocsection-1"><a href="#Foo_bar"><span class="tocnumber">1</span> <span class="toctext">Foo bar</span></a></li>
31822 <li class="toclevel-1 tocsection-2"><a href="#foo_Bar_2"><span class="tocnumber">2</span> <span class="toctext">foo Bar</span></a></li>
31823 <li class="toclevel-1 tocsection-3"><a href="#Тест"><span class="tocnumber">3</span> <span class="toctext">Тест</span></a></li>
31824 <li class="toclevel-1 tocsection-4"><a href="#Тест_2"><span class="tocnumber">4</span> <span class="toctext">Тест</span></a></li>
31825 <li class="toclevel-1 tocsection-5"><a href="#тест"><span class="tocnumber">5</span> <span class="toctext">тест</span></a></li>
31826 <li class="toclevel-1 tocsection-6"><a href="#Hey_<_#_"_>_%_:_'"><span class="tocnumber">6</span> <span class="toctext">Hey < # " > % : '</span></a></li>
31830 <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>
31831 <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>
31832 <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>
31833 <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>
31834 <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>
31835 <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>
31836 <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>
31837 </p><p>💩 <span id="💩"></span>
31838 </p><p><a href="#啤酒">#啤酒</a> <a href="#啤酒">#啤酒</a>
31841 <h2 id="Foo_bar">Foo bar</h2>
31843 <h2 id="foo_Bar_2">foo Bar</h2>
31845 <h2 id="Тест"><span id=".D0.A2.D0.B5.D1.81.D1.82" typeof="mw:FallbackId"></span>Тест</h2>
31847 <h2 id="Тест_2"><span id=".D0.A2.D0.B5.D1.81.D1.82_2" typeof="mw:FallbackId"></span>Тест</h2>
31849 <h2 id="тест"><span id=".D1.82.D0.B5.D1.81.D1.82" typeof="mw:FallbackId"></span>тест</h2>
31851 <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>
31852 <p><a rel="mw:WikiLink" href="./Parser_test#Foo_bar">#Foo bar</a> <a rel="mw:WikiLink" href="./Parser_test#foo_Bar">#foo Bar</a> <a rel="mw:WikiLink" href="./Parser_test#Тест">#Тест</a> <a rel="mw:WikiLink" href="./Parser_test#тест">#тест</a> <a rel="mw:WikiLink" href="./Parser_test#Hey_<_#_"_>_%_:_'" data-parsoid='{"stx":"simple","a":{"href":"./Parser_test#Hey_<_#_\"_>_%_:_'"},"sa":{"href":"#Hey < # \" > % : '"}}'>#Hey < # " > % : '</a></p>
31854 <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>
31856 <!-- These two links should produce identical HTML -->
31857 <p><a rel="mw:WikiLink" href="./Parser_test#啤酒">#啤酒</a> <a rel="mw:WikiLink" href="./Parser_test#啤酒" data-parsoid='{"stx":"simple","a":{"href":"./Parser_test#啤酒"},"sa":{"href":"#%E5%95%A4%E9%85%92"}}'>#啤酒</a></p>
31860 # Parsoid doesn't support this mode
31862 HTML5 ids: legacy with a fallback to modern
31864 wgFragmentMode=[ 'legacy', 'html5' ]
31876 ==Hey < # " > % : '==
31877 [[#Foo bar]] [[#foo Bar]] [[#Тест]] [[#тест]] [[#Hey < # " > % : ']]
31879 {{anchorencode:💩}} <span id="{{anchorencode:💩}}"></span>
31881 <!-- These two links should produce identical HTML -->
31882 [[#啤酒]] [[#%E5%95%A4%E9%85%92]]
31885 <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>
31887 <li class="toclevel-1 tocsection-1"><a href="#Foo_bar"><span class="tocnumber">1</span> <span class="toctext">Foo bar</span></a></li>
31888 <li class="toclevel-1 tocsection-2"><a href="#foo_Bar_2"><span class="tocnumber">2</span> <span class="toctext">foo Bar</span></a></li>
31889 <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>
31890 <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>
31891 <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>
31892 <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>
31896 <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>
31897 <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>
31898 <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>
31899 <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>
31900 <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>
31901 <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>
31902 <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>
31903 </p><p>.F0.9F.92.A9 <span id=".F0.9F.92.A9"></span>
31904 </p><p><a href="#.E5.95.A4.E9.85.92">#啤酒</a> <a href="#.E5.95.A4.E9.85.92">#啤酒</a>
31908 # Parsoid doesn't support this mode.
31910 HTML5 ids: no legacy
31912 wgFragmentMode=[ 'html5' ]
31924 ==Hey < # " > % : '==
31925 [[#Foo bar]] [[#foo Bar]] [[#Тест]] [[#тест]] [[#Hey < # " > % : ']]
31927 {{anchorencode:💩}} <span id="{{anchorencode:💩}}"></span>
31929 <!-- These two links should produce identical HTML -->
31930 [[#啤酒]] [[#%E5%95%A4%E9%85%92]]
31933 <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>
31935 <li class="toclevel-1 tocsection-1"><a href="#Foo_bar"><span class="tocnumber">1</span> <span class="toctext">Foo bar</span></a></li>
31936 <li class="toclevel-1 tocsection-2"><a href="#foo_Bar_2"><span class="tocnumber">2</span> <span class="toctext">foo Bar</span></a></li>
31937 <li class="toclevel-1 tocsection-3"><a href="#Тест"><span class="tocnumber">3</span> <span class="toctext">Тест</span></a></li>
31938 <li class="toclevel-1 tocsection-4"><a href="#Тест_2"><span class="tocnumber">4</span> <span class="toctext">Тест</span></a></li>
31939 <li class="toclevel-1 tocsection-5"><a href="#тест"><span class="tocnumber">5</span> <span class="toctext">тест</span></a></li>
31940 <li class="toclevel-1 tocsection-6"><a href="#Hey_<_#_"_>_%_:_'"><span class="tocnumber">6</span> <span class="toctext">Hey < # " > % : '</span></a></li>
31944 <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>
31945 <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>
31946 <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>
31947 <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>
31948 <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>
31949 <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>
31950 <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>
31951 </p><p>💩 <span id="💩"></span>
31952 </p><p><a href="#啤酒">#啤酒</a> <a href="#啤酒">#啤酒</a>
31957 T90902: Normalize weird characters in section IDs
31959 wgFragmentMode=[ 'html5', 'legacy' ]
31965 <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>
31966 <p><a href="#Foo_bar">#Foo bar</a>
31969 <h2 id="Foo_bar"> Foo<span typeof="mw:Entity" data-parsoid='{"src":"&nbsp;","srcContent":" "}'> </span>bar </h2>
31970 <p><a rel="mw:WikiLink" href="./Parser_test#Foo_bar" data-parsoid='{"stx":"simple","a":{"href":"./Parser_test#Foo_bar"},"sa":{"href":"#Foo&nbsp;bar"}}'>#Foo bar</a></p>
31974 T51672: Test for brackets in attributes of elements in external link texts
31976 [http://example.com/ link <span title="title with [brackets]">span</span>]
31977 [http://example.com/ link <span title="title with [brackets]">span</span>]
31980 <p><a rel="nofollow" class="external text" href="http://example.com/">link <span title="title with [brackets]">span</span></a>
31981 <a rel="nofollow" class="external text" href="http://example.com/">link <span title="title with [brackets]">span</span></a>
31984 <p><a rel="mw:ExtLink" class="external text" href="http://example.com/">link <span title="title with [brackets]">span</span></a>
31985 <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>
31989 T72875: Test for brackets in attributes of elements in internal link texts
31991 [[Foo|link <span title="title with [[double brackets]]">span</span>]]
31992 [[Foo|link <span title="title with [[double brackets]]">span</span>]]
31995 <p><a href="/wiki/Foo" title="Foo">link <span title="title with [[double brackets]]">span</span></a>
31996 <a href="/wiki/Foo" title="Foo">link <span title="title with [[double brackets]]">span</span></a>
31999 <p><a rel="mw:WikiLink" href="./Foo" title="Foo">link <span title="title with [[double brackets]]">span</span></a>
32000 <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>
32004 T199926: html arrow wt: Parsoid sometimes trips up on verticalbar chars in hrefs
32007 "modes": ["html2wt"]
32010 <a href="https://stats.wikimedia.org/v2/#/fr.wikipedia.org/reading/page-views-by-country/normal|map|2-Year~2016060100~2018071100|~total">9</a>
32011 <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>
32013 [https://stats.wikimedia.org/v2/#/fr.wikipedia.org/reading/page-views-by-country/normal|map|2-Year~2016060100~2018071100|~total 9]
32014 [[stats:v2/#/fr.wikipedia.org/reading/page-views-by-country/normal%7Cmap%7C2-Year~2016060100~2018071100%7C~total|10]]
32018 T179544: {{anchorencode:}} output should be always usable in links
32020 wgFragmentMode=[ 'html5' ]
32022 <span id="{{anchorencode:[foo]}}"></span>[[#{{anchorencode:[foo]}}]]
32024 <p><span id="[foo]"></span><a href="#[foo]">#[foo]</a>
32027 <p><span id="[foo]" about="#mwt3" typeof="mw:ExpandedAttrs" data-parsoid='{"stx":"html","a":{"id":"[foo]"},"sa":{"id":"{{anchorencode:[foo]}}"}}' data-mw='{"attribs":[[{"txt":"id"},{"html":"<span typeof=\"mw:Transclusion mw:Entity\" about=\"#mwt1\" data-parsoid='{\"srcContent\":\"[\",\"dsr\":[10,32,null,null],\"pi\":[[]]}' data-mw='{\"parts\":[{\"template\":{\"target\":{\"wt\":\"anchorencode:[foo]\",\"function\":\"anchorencode\"},\"params\":{},\"i\":0}}]}'>[</span><span about=\"#mwt1\" data-parsoid=\"{}\">foo</span><span typeof=\"mw:Entity\" about=\"#mwt1\" data-parsoid='{\"src\":\"&amp;#x5D;\",\"srcContent\":\"]\"}'>]</span>"}]]}'></span><a typeof="mw:ExpandedAttrs" about="#mwt4" rel="mw:WikiLink" href="./Parser_test#[foo]" data-parsoid='{"stx":"simple","a":{"href":"./Parser_test#[foo]"},"sa":{"href":"#{{anchorencode:[foo]}}"}}' data-mw='{"attribs":[[{"txt":"href"},{"html":"#<span typeof=\"mw:Transclusion mw:Entity\" about=\"#mwt2\" data-parsoid='{\"srcContent\":\"[\",\"dsr\":[44,66,null,null],\"pi\":[[]]}' data-mw='{\"parts\":[{\"template\":{\"target\":{\"wt\":\"anchorencode:[foo]\",\"function\":\"anchorencode\"},\"params\":{},\"i\":0}}]}'>[</span><span about=\"#mwt2\" data-parsoid=\"{}\">foo</span><span typeof=\"mw:Entity\" about=\"#mwt2\" data-parsoid='{\"src\":\"&amp;#x5D;\",\"srcContent\":\"]\"}'>]</span>"}]]}'>#[foo]</a></p>
32030 ## ------------------------------
32031 ## Parsoid section-wrapping tests
32032 ## ------------------------------
32034 Section wrapping for well-nested sections (no leading content)
32037 "wrapSections": true
32058 <section data-mw-section-id="0"></section><section data-mw-section-id="1"><h1 id="1">1</h1>
32061 </section><section data-mw-section-id="2"><h1 id="2">2</h1>
32064 <section data-mw-section-id="3"><h2 id="2.1">2.1</h2>
32067 </section><section data-mw-section-id="4"><h2 id="2.2">2.2</h2>
32070 <section data-mw-section-id="5"><h3 id="2.2.1">2.2.1</h3>
32073 </section></section></section><section data-mw-section-id="6"><h1 id="3">3</h1>
32080 Section wrapping for well-nested sections (with leading content)
32083 "wrapSections": true
32088 Para 2 with a <div>nested in it</div>
32101 <section data-mw-section-id="0"><p>Para 1.</p>
32103 <p>Para 2 with a </p><div>nested in it</div>
32107 </section><section data-mw-section-id="1"><h1 id="1">1</h1>
32110 </section><section data-mw-section-id="2"><h1 id="2">2</h1>
32113 <section data-mw-section-id="3"><h2 id="2.1">2.1</h2>
32116 </section></section>
32120 Section wrapping with template-generated sections (good nesting 1)
32123 "wrapSections": true
32140 <section data-mw-section-id="0"></section><section data-mw-section-id="1"><h1 id="1">1</h1>
32143 <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">
32144 </span><p about="#mwt1">b</p>
32145 </section><section data-mw-section-id="3"><h2 id="1.2">1.2</h2>
32148 </section></section><section data-mw-section-id="4"><h1 id="2">2</h1>
32152 # In this example, the template scope is mildly expanded to incorporate the
32153 # trailing newline after the transclusion since that is part of section 1.1.1
32155 Section wrapping with template-generated sections (good nesting 2)
32158 "wrapSections": true,
32159 "modes": ["wt2html", "wt2wt"]
32174 <section data-mw-section-id="0"></section><section data-mw-section-id="1"><h1 id="1">1</h1>
32177 <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">
32178 </span><p about="#mwt1">b</p><span about="#mwt1">
32179 </span><section data-mw-section-id="-1" about="#mwt1"><h3 about="#mwt1" id="1.1.1">1.1.1</h3><span about="#mwt1">
32180 </span><p about="#mwt1">d</p><span about="#mwt1">
32181 </span></section></section></section><section data-mw-section-id="4" data-parsoid="{}"><h1 id="2">2</h1>
32185 # In this example, the template scope is mildly expanded to incorporate the
32186 # trailing newline after the transclusion since that is part of section 1.2.1
32188 Section wrapping with template-generated sections (good nesting 3)
32191 "wrapSections": true,
32192 "modes": ["wt2html", "wt2wt"]
32210 <section data-mw-section-id="0"></section><section data-mw-section-id="1" data-parsoid="{}"><h1 id="1"> 1 </h1>
32213 <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">
32214 </span><section data-mw-section-id="-1" about="#mwt1"><h2 about="#mwt1" id="1.1">1.1</h2><span about="#mwt1">
32215 </span><p about="#mwt1">b</p><span about="#mwt1">
32216 </span></section><section data-mw-section-id="-1" about="#mwt1"><h2 about="#mwt1" id="1.2">1.2</h2><span about="#mwt1">
32217 </span><p about="#mwt1">c</p><span about="#mwt1">
32218 </span><section data-mw-section-id="-1" about="#mwt1"><h3 about="#mwt1" id="1.2.1">1.2.1</h3><span about="#mwt1">
32219 </span><p about="#mwt1">d</p><span about="#mwt1">
32220 </span></section></section></section><section data-mw-section-id="5"><h1 id="2">2</h1>
32224 # Because of section-wrapping and template-wrapping interactions,
32225 # the scope of the template is expanded so that the template markup
32226 # is valid in the presence of <section> tags.
32227 # This exercises the s1 is null scenario in the wrapSections code
32229 Section wrapping with template-generated sections (bad nesting 1)
32232 "wrapSections": true
32246 <section data-mw-section-id="-1"></section><section data-mw-section-id="-2"><div data-parsoid='{"stx":"html"}'>
32249 <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"]}'>
32250 </span><section data-mw-section-id="-1" about="#mwt1"><h1 about="#mwt1" id="1">1</h1><span about="#mwt1">
32251 </span><p about="#mwt1">b
32252 </p><span about="#mwt1">
32254 </span><p about="#mwt1">c</p><span about="#mwt1">
32255 </span></section></div></section>
32258 # Because of section-wrapping and template-wrapping interactions,
32259 # the scope of the template is expanded so that the template markup
32260 # is valid in the presence of <section> tags.
32261 # This exercises the s1 is ancestor of s2 scenario in the wrapSections code
32263 Section wrapping with template-generated sections (bad nesting 2)
32266 "wrapSections": true
32284 <section data-mw-section-id="0"></section><section data-mw-section-id="1"><h1 id="1">1</h1>
32287 </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">
32288 </span><p about="#mwt1">b</p><span about="#mwt1">
32289 </span><section data-mw-section-id="-1" about="#mwt1"><h2 about="#mwt1" id="2.1">2.1</h2><span about="#mwt1">
32290 </span><p about="#mwt1">c</p><span about="#mwt1">
32292 </span><p about="#mwt1">d</p><span about="#mwt1">
32294 </span></section></section><section data-mw-section-id="4"><h1 id="3">3</h1>
32298 # Because of section-wrapping and template-wrapping interactions,
32299 # additional template wrappers are added to <section> tags
32300 # so that template wrapping semantics are valid whether section
32301 # tags are retained or stripped. But, the template scope can expand
32302 # greatly when accounting for section tags.
32303 # This exercises the s1 and s2 are in different subtrees scenario
32305 Section wrapping with template-generated sections (bad nesting 3)
32308 "wrapSections": true,
32309 "modes": ["wt2html", "wt2wt"]
32327 <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>
32330 <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">
32331 </span><p about="#mwt1">b</p><span about="#mwt1">
32332 </span></section></section><section data-mw-section-id="-1" about="#mwt1"><h1 about="#mwt1" id="2">2</h1><span about="#mwt1">
32333 </span><p about="#mwt1">c</p>
32336 </section><section data-mw-section-id="4" data-parsoid="{}"><h1 id="3">3</h1>
32341 Section wrapping with uneditable lead section + div wrapping multiple sections
32344 "wrapSections": true
32349 <div style="border:1px solid red;">
32366 <section data-mw-section-id="-1"><p>foo</p>
32368 </section><section data-mw-section-id="-2"><div style="border:1px solid red;">
32369 <section data-mw-section-id="1"><h1 id="1">1</h1>
32372 <section data-mw-section-id="2"><h2 id="1.1">1.1</h2>
32375 </section></section><section data-mw-section-id="-1"><h1 id="2">2</h1>
32379 </section><section data-mw-section-id="4"><h1 id="3">3</h1>
32382 <section data-mw-section-id="5"><h2 id="3.1">3.1</h2>
32384 </section></section>
32388 Section wrapping with editable lead section + div overlapping multiple sections
32391 "wrapSections": true
32398 <div style="border:1px solid red;">
32415 <section data-mw-section-id="0"><p>foo</p>
32417 </section><section data-mw-section-id="-1"><h1 id="1">1</h1>
32419 </section><section data-mw-section-id="-2"><div style="border:1px solid red;">
32422 <section data-mw-section-id="2"><h2 id="1.1">1.1</h2>
32425 </section><section data-mw-section-id="-1"><h1 id="2">2</h1>
32430 </section><section data-mw-section-id="4"><h1 id="3">3</h1>
32433 <section data-mw-section-id="5"><h2 id="3.1">3.1</h2>
32435 </section></section>
32439 HTML header tags should not be wrapped in section tags
32442 "wrapSections": true
32455 <section data-mw-section-id="0"><p>foo</p>
32457 <h1 id="a" data-parsoid='{"stx":"html"}'>a</h1>
32459 </section><section data-mw-section-id="1"><h1 id="b">b</h1>
32461 <h1 id="c" data-parsoid='{"stx":"html"}'>c</h1>
32463 </section><section data-mw-section-id="2"><h1 id="d">d</h1></section>
32467 Lead section containing only whitespace and comments.
32470 "wrapSections": true
32474 <!-- this is a comment, presumably significant to editors -->
32481 <section data-mw-section-id="0" data-parsoid="{}">
32482 <!-- this is a comment, presumably significant to editors -->
32483 </section><section data-mw-section-id="1"><h1 id="1">1</h1>
32486 </section><section data-mw-section-id="2"><h1 id="2">2</h1>
32491 Pseudo-sections emitted by templates should have id -2
32494 "wrapSections": true
32504 <section data-mw-section-id="-1"><p>foo</p>
32505 </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}}]}'>
32506 <section data-mw-section-id="-1"><h2 id="a">a</h2>
32507 </section><section data-mw-section-id="-1"><h2 id="b">b</h2>
32508 </section></div><span about="#mwt1">
32512 ##########################################################################
32513 Tests demonstrating white-space insensitivity in input wikitext
32514 for wikitext headings, wikitext list items, and wikitext table captions,
32515 headings, and cells. HTML versions of the same should preserve whitespace.
32516 ##########################################################################
32518 Trim whitespace in wikitext headings, list items, table captions, headings, and cells
32521 "modes": ["wt2html"],
32522 "preserveIEW": true
32526 == <!--c1--> <!--c2--> Spaces <!--c3--> <!--c4--> ==
32527 == <!--c1--> <!--c2--> Tabs <!--c3--><!--c4--> ==
32528 == <!--Headings with fallback ids--> Личная жизнь ==
32529 * <!--c1--> <!--c2--> List item <!--c3--> <!--c4-->
32530 ; <!--term to define--> term : <!--term's definition--> definition
32532 |+ <!--c1--> <!--c2--> Table Caption <!--c3--> <!--c4-->
32534 ! <!--c1--> <!--c2--> Table Heading 1 <!--c3--> <!--c4--> !! Table Heading 2 <!--c5-->
32536 | <!--c1--> <!--c2--> Table Cell 1 <!--c3--> <!--c4--> || Table Cell 2 <!--c5-->
32538 | class="foo" || <!--c1--> <!--c2--> Table Cell 3 <!--c3--> <!--c4-->
32540 | <!--c1--> testing [[one|two]] <!--c2--> | <!--c3--> some content
32543 | <!--c1--> <!--c2--> Table Cell 1 <!--c3--> <!--c4--> || Table Cell 2 <!--c5-->
32546 <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>
32547 <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>
32548 <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>
32549 <ul><li>List item</li></ul>
32550 <dl><dt>term </dt>
32551 <dd>definition</dd></dl>
32553 <caption>Table Caption
32556 <th>Table Heading 1</th>
32557 <th>Table Heading 2
32560 <td>Table Cell 1</td>
32564 <td>class="foo"</td>
32568 <td>testing <a href="/index.php?title=One&action=edit&redlink=1" class="new" title="One (page does not exist)">two</a> | some content
32569 </td></tr></tbody></table>
32572 <td>Table Cell 1</td>
32574 </td></tr></tbody></table> foo</dd></dl>
32576 <meta property="mw:PageProp/notoc">
32577 <h2 id="Spaces"><!--c1--><!--c2-->Spaces<!--c3--><!--c4--></h2>
32578 <h2 id="Tabs"><!--c1--><!--c2-->Tabs<!--c3--><!--c4--></h2>
32579 <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>
32580 <ul><li><!--c1--><!--c2-->List item<!--c3--><!--c4--></li></ul>
32581 <dl><dt><!--term to define-->term </dt><dd><!--term's definition-->definition</dd></dl>
32583 <caption><!--c1--><!--c2-->Table Caption<!--c3--><!--c4--></caption>
32585 <th><!--c1--><!--c2-->Table Heading 1<!--c3--><!--c4--></th><th>Table Heading 2<!--c5--></th></tr>
32587 <td><!--c1--><!--c2-->Table Cell 1<!--c3--><!--c4--></td><td>Table Cell 2<!--c5--></td></tr>
32589 <td>class="foo"</td><td><!--c1--><!--c2-->Table Cell 3<!--c3--><!--c4--></td></tr>
32591 <td><!--c1-->testing <a rel="mw:WikiLink" href="./One" title="One">two</a> <!--c2--> | <!--c3--> some content</td></tr>
32594 <tbody><tr><td><!--c1--><!--c2-->Table Cell 1<!--c3--><!--c4--></td><td>Table Cell 2<!--c5--></td></tr>
32595 </tbody></table> foo<!--c1--></dd></dl>
32598 # Looks like <caption> is not accepted in HTML
32600 Do not trim whitespace in HTML headings, list items, table captions, headings, and cells
32603 "modes": ["wt2html"],
32604 "preserveIEW": true
32608 <h2> <!--c1--> <!--c2--> Heading <!--c3--> <!--c4--> </h2>
32609 <ul><li> <!--c1--> <!--c2--> List item <!--c3--> <!--c4--> </li></ul>
32611 <tr><th> <!--c1--> <!--c2--> Table Heading <!--c3--> <!--c4--> <th></tr>
32612 <tr><td> <!--c1--> <!--c2--> Table Cell <!--c3--> <!--c4--> <th></tr>
32615 <h2><span class="mw-headline" id="Heading"> Heading </span></h2>
32616 <ul><li> List item </li></ul>
32618 <tbody><tr><th> Table Heading </th><th></th></tr>
32619 <tr><td> Table Cell </td><th></th></tr>
32622 <meta property="mw:PageProp/notoc"/>
32623 <h2 id="Heading"> <!--c1--> <!--c2--> Heading <!--c3--> <!--c4--> </h2>
32624 <ul><li> <!--c1--> <!--c2--> List item <!--c3--> <!--c4--> </li></ul>
32626 <tbody><tr><th> <!--c1--> <!--c2--> Table Heading <!--c3--> <!--c4--> </th><th></th></tr>
32627 <tr><td> <!--c1--> <!--c2--> Table Cell <!--c3--> <!--c4--> </td><th></th></tr>
32632 Do not trim whitespace in links and quotes
32635 "modes": ["wt2html"],
32636 "preserveIEW": true
32639 foo '' <!--c1--> italic <!--c2--> '' and ''' <!--c3--> bold <!--c4--> '''
32640 [[Foo| some text ]]
32642 <p>foo <i> italic </i> and <b> bold </b>
32643 <a href="/wiki/Foo" title="Foo"> some text </a>
32646 <p>foo <i> <!--c1--> italic <!--c2--> </i> and <b> <!--c3--> bold <!--c4--> </b>
32647 <a rel="mw:WikiLink" href="./Foo" title="Foo"> some text </a></p>
32651 Remove p tags surrounding a single element in a figcaption
32655 [[File:Foobar.jpg|right|200x200px|Caption]]
32657 <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>
32661 Selser preserves lack of newline before list and allows newline after the list
32664 "modes": ["selser"],
32665 "scrubWikitext": true,
32667 [ "ul", "after", "<p>footer</p>" ]
32684 Selser does not introduce newlines between unedited paragraph preceding the list
32687 "modes": ["selser"],
32689 [ "table tbody tr td p:last-child", "empty" ]
32711 Selser does not introduce newlines between unedited paragraph following the list
32714 "modes": ["selser"],
32716 [ "table tbody tr td p:first-child", "empty" ]
32738 Remove a list item but do not insert newline above list
32741 "modes": ["selser"],
32743 [ "ul li:last-child", "remove" ]