1 # MediaWiki Parser test cases
2 # Some taken from https://meta.wikimedia.org/wiki/Parser_testing
3 # All (C) their respective authors and released under the GPL
5 # The syntax should be fairly self-explanatory.
7 # Currently supported test options:
8 # One of the following three:
10 # (default) generate HTML output
11 # pst apply pre-save transform
12 # msg apply message transform
14 # Plus any combination of these:
16 # cat add category links
17 # (ignored by Parsoid, since it emits <link>s)
18 # ill add inter-language links
19 # (ignored by Parsoid, since it emits <link>s)
20 # subpage enable subpages (disabled by default)
21 # title=[[XXX]] run test using article title XXX
22 # language=XXX set content language to XXX for this test
23 # variant=XXX set the variant of language for this test (eg zh-tw)
24 # disabled do not run test
25 # parsoid parsoid-specific options (not run by PHP parser unless
26 # the test includes an html/php section)
27 # php php-only test (not run by the parsoid parser unless
28 # the test includes an html/parsoid section)
29 # showtitle make the first line the title
30 # showindicators make the first lines the page status indicators
31 # comment run through Linker::formatComment() instead of main parser
32 # local format section links in edit comment text as local links
33 # notoc disable table of contents
34 # thumbsize=NNN set the default thumb size to NNNpx for this test
35 # wrap include the normal wrapper <div class="mw-parser-output"> (since 1.30)
37 # You can also set the following parser properties via test options:
38 # wgEnableUploads, wgAllowExternalImages, wgMaxTocLevel,
39 # wgLinkHolderBatchSize, wgRawHtml, wgInterwikiMagic,
40 # wgEnableMagicLinks, wgMediaInTargetLanguage
42 # For testing purposes, temporary articles can created:
43 # !!article / NAMESPACE:TITLE / !!text / ARTICLE TEXT / !!endarticle
44 # where '/' denotes a newline.
46 # This is the standard article assumed to exist.
62 Article titles can contain single quotes!
72 Template:redirect to foo
74 #REDIRECT [[Template:Foo]]
95 MediaWiki:bad image list
97 * [[File:Bad.jpg]] except [[Nasty page]]
132 // For Serbian; localize Template namespace
140 Template:echo_with_span
146 Template:echo_with_div
152 Template:echo with depth
165 Template:table_attribs
168 |</noinclude>style="color:red;"|Foo
172 Template:table_attribs_2
175 |</noinclude>style="color:red;"|Foo
180 Template:table_attribs_3
183 |</noinclude>style{{=}}"background:#f9f9f9;"|Foo
187 Template:table_attribs_4
189 | style="background-color:#DC241f;" width="10px" |
193 Template:table_attribs_5
196 |</noinclude>style="color:red;"||Bar
200 Template:table_attribs_6
202 style="background: <nowiki>
209 Template:table_attribs_7
212 |</noinclude>style{{=}}"background:#f9f9f9;"|Foo<ref>foo</ref>
216 Template:table_header_cells
218 {{table_attribs}}!!style='color:red;'|''Bar''||style='color:brown;'|''Foo'' and Baz
224 {{table_attribs}}||style='color:red;'|''Bar''||style='color:brown;'|''Foo'' and Baz
228 Template:PartialTable
235 Template:image_attribs
238 [[File:foobar.jpg|</noinclude>right|Caption text<noinclude>]]</noinclude>
241 ## See T48811 for details
243 Template:mixed_attr_content_template
245 style="color:red;" title="T48811"
251 Template:definition_list
298 Template:EmptyTRWithHTMLAttrTest
301 <tr align="center"></tr>
302 <tr><td>foo</td></tr>
303 <tr align="center"></tr>
304 <tr><td>bar</td></tr>
327 This is a simple paragraph.
329 <p>This is a simple paragraph.
334 Paragraphs with extra newline spacing
365 Paragraphs with newline spacing with comment lines in between
373 <!--foo--><!--More than 1 comment, still stripped-->
377 <!--foo--> <!----> <!-- bar -->
438 Paragraphs with newline spacing with non-empty white-space lines in between
465 Paragraphs with newline spacing with non-empty mixed comment and white-space lines in between
473 <!--foo--><!--More than 1 comment doesn't disable stripping of this line!-->
512 Extra newlines: More paragraphs with indented comment
527 Extra newlines followed by heading
541 <h1><span class="mw-headline" id="b">b</span><span class="mw-editsection"><span class="mw-editsection-bracket">[</span><a href="/index.php?title=Parser_test&action=edit&section=1" title="Edit section: b">edit</a><span class="mw-editsection-bracket">]</span></span></h1>
542 <p><a href="/index.php?title=A&action=edit&redlink=1" class="new" title="A (page does not exist)">a</a>
545 <h1><span class="mw-headline" id="b_2">b</span><span class="mw-editsection"><span class="mw-editsection-bracket">[</span><a href="/index.php?title=Parser_test&action=edit&section=2" title="Edit section: b">edit</a><span class="mw-editsection-bracket">]</span></span></h1>
550 Extra newlines between heading and content are swallowed (Parsoid does not)
558 <h1><span class="mw-headline" id="b">b</span><span class="mw-editsection"><span class="mw-editsection-bracket">[</span><a href="/index.php?title=Parser_test&action=edit&section=1" title="Edit section: b">edit</a><span class="mw-editsection-bracket">]</span></span></h1>
559 <p><a href="/index.php?title=A&action=edit&redlink=1" class="new" title="A (page does not exist)">a</a>
566 <p><a rel="mw:WikiLink" href="./A" title="A">a</a></p>
570 Extra new lines before and after lists are preserved
597 # Parsoid regression test
599 Multiple newlines after tables are converted to p-br-p tags
601 parsoid=wt2html,wt2wt
615 </td></tr></tbody></table>
619 <h1><span class="mw-headline" id="b">b</span><span class="mw-editsection"><span class="mw-editsection-bracket">[</span><a href="/index.php?title=Parser_test&action=edit&section=1" title="Edit section: b">edit</a><span class="mw-editsection-bracket">]</span></span></h1>
634 Heading with line break in nowiki
638 wgFragmentMode=[ 'html5', 'legacy' ]
643 <h2><span id="A_B.0AC"></span><span class="mw-headline" id="A_B
645 C</span><span class="mw-editsection"><span class="mw-editsection-bracket">[</span><a href="/index.php?title=Parser_test&action=edit&section=1" title="Edit section: A B C">edit</a><span class="mw-editsection-bracket">]</span></span></h2>
649 C"><span id="A_B.0AC" typeof="mw:FallbackId"></span>A <span typeof="mw:Nowiki">B
656 http://fr.wikipedia.org/wiki/🍺
657 <!-- EasterEgg we love beer, better be able be able to link to it -->
659 <p><a rel="nofollow" class="external free" href="http://fr.wikipedia.org/wiki/🍺">http://fr.wikipedia.org/wiki/🍺</a>
678 *plain''italic''plain
679 *plain''italic''plain''italic''plain
680 *plain'''bold'''plain
681 *plain'''bold'''plain'''bold'''plain
682 *plain''italic''plain'''bold'''plain
683 *plain'''bold'''plain''italic''plain
684 *plain''italic'''bold-italic'''italic''plain
685 *plain'''bold''bold-italic''bold'''plain
686 *plain'''''bold-italic'''italic''plain
687 *plain'''''bold-italic''bold'''plain
688 *plain''italic'''bold-italic'''''plain
689 *plain'''bold''bold-italic'''''plain
690 *plain l'''italic''plain
691 *plain l''''bold''' plain
694 <li>plain<i>italic</i>plain</li>
695 <li>plain<i>italic</i>plain<i>italic</i>plain</li>
696 <li>plain<b>bold</b>plain</li>
697 <li>plain<b>bold</b>plain<b>bold</b>plain</li>
698 <li>plain<i>italic</i>plain<b>bold</b>plain</li>
699 <li>plain<b>bold</b>plain<i>italic</i>plain</li>
700 <li>plain<i>italic<b>bold-italic</b>italic</i>plain</li>
701 <li>plain<b>bold<i>bold-italic</i>bold</b>plain</li>
702 <li>plain<i><b>bold-italic</b>italic</i>plain</li>
703 <li>plain<b><i>bold-italic</i>bold</b>plain</li>
704 <li>plain<i>italic<b>bold-italic</b></i>plain</li>
705 <li>plain<b>bold<i>bold-italic</i></b>plain</li>
706 <li>plain l'<i>italic</i>plain</li>
707 <li>plain l'<b>bold</b> plain</li></ul>
711 # this example taken from the [[simple:Moon]] article (T49326)
713 Italics and possessives (1)
715 obtained by ''[[Lunar Prospector]]'''s gamma-ray spectrometer
717 <p>obtained by <i><a href="/index.php?title=Lunar_Prospector&action=edit&redlink=1" class="new" title="Lunar Prospector (page does not exist)">Lunar Prospector</a>'</i>s gamma-ray spectrometer
721 # this example taken from [[en:Flaming Pie]] (T51926)
723 Italics and possessives (2)
725 '''''Flaming Pie''''' is ... released in 1997. In ''Flaming Pie'''s liner notes
727 <p><i><b>Flaming Pie</b></i> is ... released in 1997. In <i>Flaming Pie'</i>s liner notes
731 # this example taken from [[en:Dictionary]] (T51926)
733 Italics and possessives (3)
735 The first monolingual dictionary written in a Romance language was ''Sebastián Covarrubias''' ''Tesoro de la lengua castellana o española'', published in 1611 in Madrid. In 1612 the first edition of the ''Vocabolario dell'[[Accademia della Crusca]]'', for Italian, was published. In 1690 in Rotterdam was published, posthumously, the ''Dictionnaire Universel''.
737 <p>The first monolingual dictionary written in a Romance language was <i>Sebastián Covarrubias'</i> <i>Tesoro de la lengua castellana o española</i>, published in 1611 in Madrid. In 1612 the first edition of the <i>Vocabolario dell'<a href="/index.php?title=Accademia_della_Crusca&action=edit&redlink=1" class="new" title="Accademia della Crusca (page does not exist)">Accademia della Crusca</a></i>, for Italian, was published. In 1690 in Rotterdam was published, posthumously, the <i>Dictionnaire Universel</i>.
743 ### 2-quote opening sequence tests
746 Italics and bold: 2-quote opening sequence: (2,2)
755 Italics and bold: 2-quote opening sequence: (2,3)
764 Italics and bold: 2-quote opening sequence: (2,4)
774 # same html as previous, but wikitext adjusted to match parsoid html2wt
776 Italics and bold: 2-quote opening sequence: (2,4) w/ nowiki
778 ''foo<nowiki>''</nowiki>''
784 # The PHP parser strips the empty tags out for giggles; parsoid doesn't.
786 Italics and bold: 2-quote opening sequence: (2,5)
799 # same html as previous, but wikitext adjusted to match parsoid html2wt
801 Italics and bold: 2-quote opening sequence: (2,5+3) w/ nowiki
803 ''foo'''''<nowiki/>'''
814 ### 3-quote opening sequence tests
818 Italics and bold: 3-quote opening sequence: (3,2)
827 Italics and bold: 3-quote opening sequence: (3,3)
836 Italics and bold: 3-quote opening sequence: (3,4)
844 # The PHP parser strips the empty tags out for giggles; parsoid doesn't.
846 Italics and bold: 3-quote opening sequence: (3,5)
859 # same html as previous, but wikitext adjusted to match parsoid html2wt
861 Italics and bold: 3-quote opening sequence: (3,5+2) w/ nowiki
863 '''foo'''''<nowiki/>''
874 ### 4-quote opening sequence tests
878 Italics and bold: 4-quote opening sequence: (4,2)
888 # same html as previous, but wikitext adjusted to match parsoid html2wt
890 Italics and bold: 4-quote opening sequence: (4,2) w/ nowiki
892 <nowiki>''</nowiki>''foo''
899 Italics and bold: 4-quote opening sequence: (4,3)
908 Italics and bold: 4-quote opening sequence: (4,4)
918 # same html as previous, but wikitext adjusted to match parsoid html2wt
920 Italics and bold: 4-quote opening sequence: (4,4) w/ nowiki
928 # The PHP parser strips the empty tags out for giggles; parsoid doesn't.
930 Italics and bold: 4-quote opening sequence: (4,5)
939 <p>'<b>foo</b><i></i>
943 # same html as previous, but wikitext adjusted to match parsoid html2wt
945 Italics and bold: 4-quote opening sequence: (4,5+2) w/ nowiki
947 '<nowiki/>'''foo'''''<nowiki/>''
952 <p>'<b>foo</b><i></i>
958 ### 5-quote opening sequence tests
962 Italics and bold: 5-quote opening sequence: (5,2)
972 # same html as previous, but wikitext adjusted to match parsoid html2wt
974 Italics and bold: 5-quote opening sequence: (5,2+3)
983 Italics and bold: 5-quote opening sequence: (5,3)
993 # same html as previous, but wikitext adjusted to match parsoid html2wt
995 Italics and bold: 5-quote opening sequence: (5,3+2)
1004 Italics and bold: 5-quote opening sequence: (5,4)
1010 <p><i><b>foo'</b></i>
1015 Italics and bold: 5-quote opening sequence: (5,5)
1019 <p><i><b>foo</b></i>
1024 Italics and bold: 5-quote opening sequence: (5,6)
1028 <p><i><b>foo'</b></i>
1033 ### multiple quote sequences in a line
1037 Italics and bold: multiple quote sequences: (2,4,2)
1043 <p><i>foo'<b>bar</b></i>
1047 # same html as previous, but wikitext adjusted to match parsoid html2wt
1049 Italics and bold: multiple quote sequences: (2,4,2+3) w/ nowiki
1051 ''foo'<nowiki/>'''bar'''''
1053 <p><i>foo'<b>bar</b></i>
1058 Italics and bold: multiple quote sequences: (2,4,3)
1064 <p><i>foo'<b>bar</b></i>
1068 # same html as previous, but wikitext adjusted to match parsoid html2wt
1070 Italics and bold: multiple quote sequences: (2,4,3+2) w/ nowiki
1072 ''foo'<nowiki/>'''bar'''''
1074 <p><i>foo'<b>bar</b></i>
1079 Italics and bold: multiple quote sequences: (2,4,4)
1085 <p><i>foo'<b>bar'</b></i>
1089 # same html as previous, but wikitext adjusted to match parsoid html2wt
1091 Italics and bold: multiple quote sequences: (2,4,4+2) w/ nowiki
1093 ''foo'<nowiki/>'''bar'<nowiki/>'''''
1095 <p><i>foo'<b>bar'</b></i>
1099 # The PHP parser strips the empty tags out for giggles; parsoid doesn't.
1101 Italics and bold: multiple quote sequences: (3,4,2)
1110 <p><b>foo'</b>bar<i></i>
1114 # same html as previous, but wikitext adjusted to match parsoid html2wt
1116 Italics and bold: multiple quote sequences: (3,4,2+2) w/ nowiki
1118 '''foo''''bar''<nowiki/>''
1123 <p><b>foo'</b>bar<i></i>
1127 # The PHP parser strips the empty tags out for giggles; parsoid doesn't.
1129 Italics and bold: multiple quote sequences: (3,4,3)
1138 <p><b>foo'</b>bar<b></b>
1142 # same html as previous, but wikitext adjusted to match parsoid html2wt
1144 Italics and bold: multiple quote sequences: (3,4,3+3) w/ nowiki
1146 '''foo''''bar'''<nowiki/>'''
1151 <p><b>foo'</b>bar<b></b>
1156 ### other quote tests
1159 Italics and bold: other quote tests: (2,3,5)
1161 ''this is about '''foo's family'''''
1163 <p><i>this is about <b>foo's family</b></i>
1169 Italics and bold: other quote tests: (2,(3,3),2)
1171 ''this is about '''foo's''' family''
1173 <p><i>this is about <b>foo's</b> family</i>
1179 Italics and bold: other quote tests: (3,2,3,2)
1183 '''this is about ''foo'''s family''
1185 <p><b>this is about <i>foo</i></b><i>s family</i>
1190 # same html as previous, but wikitext adjusted to match parsoid html2wt
1192 Italics and bold: other quote tests: (3,2,3+2+2,2)
1194 '''this is about ''foo'''''<nowiki/>''s family''
1196 <p><b>this is about <i>foo</i></b><i>s family</i>
1202 Italics and bold: other quote tests: (3,2,3,3)
1204 '''this is about ''foo'''s family'''
1206 <p>'<i>this is about </i>foo<b>s family</b>
1212 Italics and bold: other quote tests: (3,(2,2),3)
1214 '''this is about ''foo's'' family'''
1216 <p><b>this is about <i>foo's</i> family</b>
1222 Italicized possessive
1224 The ''[[Main Page]]'''s talk page.
1226 <p>The <i><a href="/wiki/Main_Page" title="Main Page">Main Page</a>'</i>s talk page.
1229 <p>The <i><a rel="mw:WikiLink" href="./Main_Page" title="Main Page">Main Page</a>'</i>s talk page.</p>
1233 Quote balancing context should be restricted to td/th cells on the same wikitext line
1235 parsoid=wt2html,wt2wt
1249 </td></tr></tbody></table>
1257 Non-html5 tags should be accepted
1259 <center>''foo''</center>
1261 <font>''foo''</font>
1262 <strike>''foo''</strike>
1265 <center><i>foo</i></center>
1266 <p><big><i>foo</i></big>
1267 <font><i>foo</i></font>
1268 <strike><i>foo</i></strike>
1274 <wbr> is valid wikitext (T54468)
1282 # <strike> is HTML4, <s> is HTML4/5.
1284 <s> or <strike> for strikethrough
1286 <strike>strike</strike>
1290 <p><strike>strike</strike>
1298 Text-level semantic html elements in wikitext
1301 <strong>text</strong>
1317 <ruby><rb>明日</rb><rp>(</rp><rt>Ashita</rt><rp> </rp><rtc>あした</rtc><rp>)</rp></ruby>
1324 <strong>text</strong>
1340 <ruby><rb>明日</rb><rp>(</rp><rt>Ashita</rt><rp> </rp><rtc>あした</rtc><rp>)</rp></ruby>
1348 # test cases taken from
1349 # https://www.w3.org/TR/html5/text-level-semantics.html#the-ruby-element
1351 Ruby markup (W3C-style)
1353 ;Mono-ruby for individual base characters
1354 :<ruby>日<rt>に</rt>本<rt>ほん</rt>語<rt>ご</rt></ruby>
1356 :<ruby>今日<rt>きょう</rt></ruby>
1358 :<ruby>法<rb>華</rb><rb>経</rb><rt>ほ</rt><rt>け</rt><rt>きょう</rt></ruby>
1360 :<ruby>東<rb>京</rb><rp>(</rp><rt>とう</rt><rt>きょう</rt><rp>)</rp></ruby>
1362 :<ruby><rb>旧</rb><rb>金</rb><rb>山</rb><rt>jiù</rt><rt>jīn</rt><rt>shān</rt><rtc>San Francisco</rtc></ruby>
1365 <rb>♥</rb><rtc><rt>Heart</rt></rtc><rtc lang="fr"><rt>Cœur</rt></rtc>
1366 <rb>☘</rb><rtc><rt>Shamrock</rt></rtc><rtc lang="fr"><rt>Trèfle</rt></rtc>
1367 <rb>✶</rb><rtc><rt>Star</rt></rtc><rtc lang="fr"><rt>Étoile</rt></rtc>
1370 <dl><dt>Mono-ruby for individual base characters</dt>
1371 <dd><ruby>日<rt>に</rt>本<rt>ほん</rt>語<rt>ご</rt></ruby></dd>
1373 <dd><ruby>今日<rt>きょう</rt></ruby></dd>
1374 <dt>Jukugo ruby</dt>
1375 <dd><ruby>法<rb>華</rb><rb>経</rb><rt>ほ</rt><rt>け</rt><rt>きょう</rt></ruby></dd>
1376 <dt>Inline ruby</dt>
1377 <dd><ruby>東<rb>京</rb><rp>(</rp><rt>とう</rt><rt>きょう</rt><rp>)</rp></ruby></dd>
1378 <dt>Double-sided ruby</dt>
1379 <dd><ruby><rb>旧</rb><rb>金</rb><rb>山</rb><rt>jiù</rt><rt>jīn</rt><rt>shān</rt><rtc>San Francisco</rtc></ruby></dd></dl>
1381 <rb>♥</rb><rtc><rt>Heart</rt></rtc><rtc lang="fr"><rt>Cœur</rt></rtc>
1382 <rb>☘</rb><rtc><rt>Shamrock</rt></rtc><rtc lang="fr"><rt>Trèfle</rt></rtc>
1383 <rb>✶</rb><rtc><rt>Star</rt></rtc><rtc lang="fr"><rt>Étoile</rt></rtc>
1388 # The next two test different paths in the sanitizer.
1390 Non-word characters don't terminate tag names (T19663, T42670, T54022)
1392 <blockquote|>a</blockquote>
1394 <b→> doesn't terminate </b→>
1396 <bä> doesn't terminate </bä>
1398 <boo> doesn't terminate </boo>
1400 <s.foo> doesn't terminate </s.foo>
1404 <p><blockquote|>a</blockquote>
1405 </p><p><b→> doesn't terminate </b→>
1406 </p><p><bä> doesn't terminate </bä>
1407 </p><p><boo> doesn't terminate </boo>
1408 </p><p><s.foo> doesn't terminate </s.foo>
1409 </p><p><sub-ID#1>
1414 Non-word characters don't terminate tag names
1416 <blockquote|>a</blockquote>
1418 <b→> doesn't terminate </b→>
1420 <bä> doesn't terminate </bä>
1422 <boo> doesn't terminate </boo>
1424 <s.foo> doesn't terminate </s.foo>
1428 <p><blockquote|>a
1429 </p><p><b→> doesn't terminate </b→>
1430 </p><p><bä> doesn't terminate </bä>
1431 </p><p><boo> doesn't terminate </boo>
1432 </p><p><s.foo> doesn't terminate </s.foo>
1433 </p><p><sub-ID#1>
1438 ### See tests/parser/parserTestsParserHook.php for the <tåg> extension)
1439 ### This checks that HTML5 tags (with non-word characters in the tag
1440 ### name) make it safely through the parser -- the Sanitizer will
1441 ### munge them later, as it should.
1444 Non-word characters are valid in extension tags (T19663)
1455 <pre typeof="mw:Extension/tåg" data-mw='{"name":"tåg","attrs":{},"body":{"extsrc":"tåg"}}' data-parsoid='{}' about="#mwt2"></pre>
1459 Isolated close tags should be treated as literal text (T54760)
1467 <p class="mw-empty-elt">
1468 </p><p><s.foo>s
1473 ### Special characters
1477 Bare pipe character (T54363)
1486 Bare pipe character from a template (T54363)
1495 ### <nowiki> test cases
1499 <nowiki> unordered list
1501 <nowiki>* This is not an unordered list item.</nowiki>
1503 <p>* This is not an unordered list item.
1506 <p><span typeof="mw:Nowiki">* This is not an unordered list item.</span></p>
1512 <nowiki>Lorem ipsum dolor
1520 <p>Lorem ipsum dolor
1529 <p><span typeof="mw:Nowiki">Lorem ipsum dolor
1539 Don't parse <nowiki><span class="error"></nowiki> (T149622)
1541 <nowiki><span class="error"></nowiki>
1543 <p><span class="error">
1546 <p><span typeof="mw:Nowiki"><span class="error"></span></p>
1552 :There is not nowiki.
1553 :There is <nowiki>nowiki</nowiki>.
1555 #There is not nowiki.
1556 #There is <nowiki>nowiki</nowiki>.
1558 *There is not nowiki.
1559 *There is <nowiki>nowiki</nowiki>.
1561 <dl><dd>There is not nowiki.</dd>
1562 <dd>There is nowiki.</dd></dl>
1563 <ol><li>There is not nowiki.</li>
1564 <li>There is nowiki.</li></ol>
1565 <ul><li>There is not nowiki.</li>
1566 <li>There is nowiki.</li></ul>
1569 <dl><dd data-parsoid='{}'>There is not nowiki.</dd>
1570 <dd data-parsoid='{}'>There is <span typeof="mw:Nowiki">nowiki</span>.</dd></dl>
1572 <ol><li data-parsoid='{}'>There is not nowiki.</li>
1573 <li data-parsoid='{}'>There is <span typeof="mw:Nowiki">nowiki</span>.</li></ol>
1575 <ul><li data-parsoid='{}'>There is not nowiki.</li>
1576 <li data-parsoid='{}'>There is <span typeof="mw:Nowiki">nowiki</span>.</li></ul>
1580 Entities inside <nowiki>
1582 <nowiki><</nowiki>
1587 <p><span typeof="mw:Nowiki"><span typeof="mw:Entity" data-parsoid='{"src":"&lt;","srcContent":"<"}'><</span></span></p>
1591 Entities inside template parameters
1598 <p><span typeof="mw:Transclusion mw:Entity" data-mw='{"parts":[{"template":{"target":{"wt":"echo","href":"./Template:Echo"},"params":{"1":{"wt":"&ndash;"}},"i":0}}]}'>–</span></p>
1602 Properly escape nowiki when combined with other wiki markup
1606 <p>* </nowiki> tag</p>
1608 <nowiki>*</nowiki> <nowiki></nowiki></nowiki> tag
1612 T93824: Put escaped HTML tags inside nowiki
1616 <p><h2>foo</h2></p>
1618 <nowiki><h2>foo</h2></nowiki>
1622 T71950: 1. Put nowiki as close to cause as possible, even with non-quote escapable chars
1626 <p>This text: L'<a rel="mw:WikiLink" href="./Foo">Foo</a>
1627 This text: L''<a rel="mw:WikiLink" href="./Foo">Foo</a>
1628 This text: L'''<a rel="mw:WikiLink" href="./Foo">Foo</a>''</p>
1630 This text: L'[[Foo]]
1631 This text: L<nowiki>''</nowiki>[[Foo]]
1632 This text: L<nowiki>'''</nowiki>[[Foo]]<nowiki>''</nowiki>
1635 # This test fails because wikitext whitespace is not normalized before comparing.
1637 T71950: 2. Put nowiki as close to cause as possible, after ' :'
1641 <p>This text : L''<a rel="mw:WikiLink" href="./Foo">Foo</a>
1644 This text : L<nowiki>''</nowiki>[[Foo]]
1647 # This test and the next one are html2wt only as they test that incorrect wikitext
1648 # passed in template arguments gets escaped or wrapped in nowikis where required.
1650 T71482: Use {{!}} instead of nowiki for single pipe in template argument
1654 <p><span typeof="mw:Transclusion" data-mw="{"parts":[{"template":{"target":{"wt":"echo","href":"./Template:Echo"},"params":{"1":{"wt":"foo|bar"}},"i":0}}]}" about="#mwt1"></span>
1655 <span typeof="mw:Transclusion" data-mw="{"parts":[{"template":{"target":{"wt":"echo","href":"./Template:Echo"},"params":{"1":{"wt":"foo|bar |[["}},"i":0}}]}" about="#mwt2"></p>
1657 {{echo|foo{{!}}bar}}
1658 {{echo|<nowiki>foo|bar |[[</nowiki>}}
1662 T53961: Output correct nowikis in template arguments
1666 <p><span typeof="mw:Transclusion" data-mw="{"parts":[{"template":{"target":{"wt":"echo","href":"./Template:Echo"},"params":{"1":{"wt":"a [ b"}},"i":0}}]}" about="#mwt1"></span>
1667 <span typeof="mw:Transclusion" data-mw="{"parts":[{"template":{"target":{"wt":"echo","href":"./Template:Echo"},"params":{"1":{"wt":"a }} b"}},"i":0}}]}" about="#mwt2"></span>
1668 <span typeof="mw:Transclusion" data-mw="{"parts":[{"template":{"target":{"wt":"echo","href":"./Template:Echo"},"params":{"1":{"wt":"a [[ b"}},"i":0}}]}" about="#mwt3"></span>
1669 <span typeof="mw:Transclusion" data-mw="{"parts":[{"template":{"target":{"wt":"echo","href":"./Template:Echo"},"params":{"1":{"wt":"a | {{ ]]"}},"i":0}}]}" about="#mwt4"></span>
1670 <span typeof="mw:Transclusion" data-mw="{"parts":[{"template":{"target":{"wt":"echo","href":"./Template:Echo"},"params":{"1":{"wt":"a }"}},"i":0}}]}" about="#mwt5"></span></p>
1673 {{echo|<nowiki>a }} b</nowiki>}}
1674 {{echo|<nowiki>a [[ b</nowiki>}}
1675 {{echo|<nowiki>a | {{ ]]</nowiki>}}
1676 {{echo|a <nowiki>}</nowiki>}}
1680 Cases where "!!" needs nowiki protection
1685 <tr><th>this needs protection !! here</th></tr>
1689 <tr><th>this does not need
1690 protection !! here</th></tr>
1694 !<nowiki>this needs protection !! here</nowiki>
1707 Comments and Indent-Pre
1709 <!-- comment 1 --> asdf
1711 <!-- comment 1 --> asdf
1714 <!-- comment 1 --> asdf
1715 <!-- comment 2 -->xyz
1717 <!-- comment 1 --> asdf
1718 <!-- comment 2 --> xyz
1774 asdf<!-- comment 1 -->jkl
1784 <!-- foo --> b <!-- bar -->
1798 <!-- returns a single newline, not nothing, since the newline after > is not stripped -->
1804 Comment semantics and delimiters
1806 <!-- --><!----><!-----><!------>
1810 <!-- --><!----><!-----><!------>
1814 Comment semantics and delimiters, redux
1816 <!-- In SGML every "foo" here would actually show up in the text -- foo -- bar
1817 -- foo -- funky huh? ... -->
1821 <!-- In SGML every "foo" here would actually show up in the text -- foo -- bar
1822 -- foo -- funky huh? ... -->
1826 Comment semantics and delimiters: directors cut
1828 <!-- ... However we like to keep things simple and somewhat XML-ish so we eat
1829 everything starting with < followed by !-- until the first -- and > we see,
1830 that wouldn't be valid XML however, since in XML -- has to terminate a comment
1836 <!-- ... However we like to keep things simple and somewhat XML-ish so we eat
1837 everything starting with < followed by !-- until the first -- and > we see,
1838 that wouldn't be valid XML however, since in XML -- has to terminate a comment
1843 Comment semantics: nesting
1845 <!--<!-- no, we're not going to do anything fancy here -->-->
1850 <!--<!-- no, we're not going to do anything fancy here --><p>--></p>
1853 # Parsoid closes the unclosed comment, even if it means a slight
1856 Comment semantics: unclosed comment at end
1858 parsoid=wt2html,html2html
1860 <!--This comment will run out to the end of the document
1864 <!--This comment will run out to the end of the document-->
1868 Comment semantics: normalize comments to play nice with XML and browsers
1870 <!-- Browsers --!> think this is closed -->
1871 <!--> This would normally be text -->
1872 <!---> As would this -->
1873 <!-- XML doesn't like trailing dashes -------->
1874 <!-- Nor doubled hyphens -- anywhere in the data -->
1875 But this is not a comment.
1877 <p>But this is not a comment.
1880 <!-- Browsers --!> think this is closed -->
1881 <!--> This would normally be text -->
1882 <!---> As would this -->
1883 <!-- XML doesn't like trailing dashes -------->
1884 <!-- Nor doubled hyphens -- anywhere in the data -->
1885 <p>But this is not a comment.</p>
1889 Comment semantics: round-trip even text which contains encoded -->
1891 <!-- hello & goodbye - > --> --&gt; --&xx -->
1893 <!-- hello & goodbye - > --> --&gt; --&xx -->
1897 Comment in template title
1906 Comment on its own line post-expand
1918 Comment on its own line post-expand with non-significant whitespace
1930 post-expand include size being exceeded
1934 {{echo3|1234567890}}
1936 <p><a href="/wiki/Template:Echo3" title="Template:Echo3">Template:Echo3</a><!-- WARNING: template omitted, post-expand include size too large -->
1941 max template depth being reached
1945 {{echo with depth|too deep!}}
1947 <p><span class="error">Template recursion depth limit exceeded (1)</span>
1952 multiple templates that are redirects
1963 Multiple comments should still parse as SOL-transparent
1965 parsoid=wt2html,wt2wt
1968 <!--c2--><!--c3--><!--c4-->*b
1977 <!--c2--><!--c3--><!--c4-->
1983 ## Make sure ">" gets escaped in comments to avoid XSS
1985 IE conditional comments
1988 <script>alert('hi');</script>
1991 <!--[if lt IE 9]>
1992 <script>alert('hi');</script>
1997 ### paragraph wrapping tests
2013 Block tag on one line (<div>)
2023 <p>a </p><div>foo</div>
2029 No p-wrappable content
2031 parsoid=wt2html,html2html
2033 <span><div>x</div></span>
2034 <span><s><div>x</div></s></span>
2035 <small><em></em></small><span><s><div>x</div></s></span>
2037 <span><div>x</div></span>
2038 <span><s><div>x</div></s></span>
2039 <p><small><em></em></small></p><span><s><div>x</div></s></span>
2042 # T177612: Parsoid-only test
2044 Transclusion meta tags shouldn't trip Parsoid's useless p-wrapper stripping code
2046 {{echo|<span><div>x</div></span>}}
2049 <span about="#mwt1" typeof="mw:Transclusion" data-parsoid='{"stx":"html","pi":[[{"k":"1"}]]}' data-mw='{"parts":[{"template":{"target":{"wt":"echo","href":"./Template:Echo"},"params":{"1":{"wt":"<span><div>x</div></span>"}},"i":0}}]}'><div>x</div></span>
2054 Block tag on one line (<blockquote>)
2056 a <blockquote>foo</blockquote>
2060 a <blockquote>foo</blockquote>
2064 <p>a </p><blockquote><p>foo</p></blockquote>
2070 Block tag on both lines (<div>)
2080 <p>a </p><div>foo</div><p>
2081 b </p><div>foo</div>
2085 Block tag on both lines (<blockquote>)
2087 a <blockquote>foo</blockquote>
2089 b <blockquote>foo</blockquote>
2091 a <blockquote>foo</blockquote>
2092 b <blockquote>foo</blockquote>
2095 <p>a </p><blockquote><p>foo</p></blockquote><p>
2096 b </p><blockquote><p>foo</p></blockquote>
2100 Multiple lines without block tags
2121 x </p><div>foo</div><p> z
2126 Empty lines between lines with block tags
2161 </p><div>b</div><p>d
2166 <div data-parsoid='{"stx":"html"}'></div>
2169 <div data-parsoid='{"stx":"html"}'></div><p>a</p>
2172 <div data-parsoid='{"stx":"html"}'>a</div><p>b</p>
2174 <div data-parsoid='{"stx":"html"}'>b</div><p>d</p>
2177 <div data-parsoid='{"stx":"html"}'>e</div>
2181 Unclosed HTML p-tags should be handled properly
2188 <div><p>foo</p></div>
2193 <div data-parsoid='{"stx":"html"}'><p data-parsoid='{"stx":"html", "autoInsertedEnd":true}'>foo</p></div>
2198 ## SSS FIXME: I can come up with other scenarios where this doesn't work because
2199 ## of eager output of buffered tokens in the p-wrapper. But, I'm going to ignore
2202 1. P-wrapping should leave sol-transparent tags outside p-tags where possible
2206 a [[Category:A1]] [[Category:A2]]
2211 <link rel="mw:PageProp/Category" href="./Category:A1"/> <link rel="mw:PageProp/Category" href="./Category:A2"/> <link rel="mw:PageProp/Category" href="./Category:A3"/> <link rel="mw:PageProp/Category" href="./Category:A4"/>
2215 2. P-wrapping should leave sol-transparent tags outside p-tags where possible
2221 <link rel="mw:PageProp/Category" href="./Category:A1"/><p>a</p>
2225 No paragraph necessary for SOL transparent template
2227 <span><div>foo</div></span>
2230 <span><div>foo</div></span>
2231 {{echo|[[Category:Foo]]}}
2233 <span><div>foo</div></span>
2234 <span><div>foo</div></span>
2237 <span data-parsoid='{"stx":"html"}'><div data-parsoid='{"stx":"html"}'>foo</div></span>
2238 <link rel="mw:PageProp/Category" href="./Category:Foo"/>
2240 <span data-parsoid='{"stx":"html"}'><div data-parsoid='{"stx":"html"}'>foo</div></span>
2241 <link rel="mw:PageProp/Category" href="./Category:Foo" about="#mwt1" typeof="mw:Transclusion" data-mw='{"parts":[{"template":{"target":{"wt":"echo","href":"./Template:Echo"},"params":{"1":{"wt":"[[Category:Foo]]"}},"i":0}}]}'/>
2245 Avoid expanding multiline sol transparent template ranges unnecessarily
2263 <br about="#mwt1" typeof="mw:Transclusion" data-parsoid='{}' data-mw='{"parts":[{"template":{"target":{"wt":"echo","href":"./Template:Echo"},"params":{"1":{"wt":"<br/>\n"}},"i":0}}]}'/><span about="#mwt1">
2266 <link rel="mw:PageProp/Category" href="./Category:Ho" />
2270 Paragraph wrapping following unclosed table
2272 parsoid=wt2html,html2html
2293 </td></tr></tbody></table>
2299 <table data-parsoid='{"autoInsertedEnd":true}'>
2300 <tbody><tr class="mw-empty-elt" data-parsoid='{"startTagSrc":"|-"}'></tr>
2302 </tbody></table><table>
2303 <tbody><tr data-parsoid='{"autoInsertedStart":true}'><td>x</td></tr>
2314 Paragraph wrapping suppressed in html p
2316 parsoid=wt2html,html2html
2336 <p data-parsoid='{"stx":"html"}'>
2347 Dangling table row doesn't prevent p-wrapping
2349 parsoid=wt2html,html2html
2357 <tbody><tr><td>hi</td></tr>
2358 <tr class="mw-empty-elt"></tr>
2359 </tbody></table><p> ho</p>
2363 ### Preformatted text
2373 And a [[Main Page|link]]
2379 And a <a href="/wiki/Main_Page" title="Main Page">link</a>
2384 Tabs don't trigger preformatted text
2388 This is preformatted text.
2394 <pre>This is preformatted text.
2399 preformatted text.</p>
2400 <pre>This is preformatted text.
2405 Space before tab needs nowiki pre protection
2411 <nowiki> </nowiki> a
2415 Ident preformatting with inline content
2426 <pre> with <nowiki> inside (compatibility with 1.6 and earlier)
2443 Regression with preformatted in <center>
2457 T54763: Preformatted in <blockquote>
2463 indented cell (no pre-wrapping!)
2473 <p> indented cell (no pre-wrapping!)
2481 T53086: Double newlines in blockquotes should be turned into paragraphs
2498 T17491: <ins>/<del> in blockquote
2501 Foo <del>bar</del> <ins>baz</ins> quux
2505 <p>Foo <del>bar</del> <ins>baz</ins> quux
2511 <p>Foo <del>bar</del> <ins>baz</ins> quux
2517 T17491: <ins>/<del> in blockquote (2)
2519 <blockquote>Foo <del>bar</del> <ins>baz</ins> quux
2522 <blockquote>Foo <del>bar</del> <ins>baz</ins> quux
2526 <blockquote><p>Foo <del>bar</del> <ins>baz</ins> quux
2531 <pre> with attributes (T5202)
2533 <pre style="background: blue; color:white">Bluescreen of WikiDeath</pre>
2535 <pre style="background: blue; color:white">Bluescreen of WikiDeath</pre>
2540 <pre> with width attribute (T5202)
2542 <pre width="8">Narrow screen goodies</pre>
2544 <pre width="8">Narrow screen goodies</pre>
2549 <pre> with forbidden attribute (T5202)
2551 <pre width="8" onmouseover="alert(document.cookie)">Narrow screen goodies</pre>
2553 <pre width="8">Narrow screen goodies</pre>
2558 Entities inside <pre>
2567 <pre> with forbidden attribute values (T5202)
2569 <pre width="8" style="border-width: expression(alert(document.cookie))">Narrow screen goodies</pre>
2571 <pre width="8" style="/* insecure input */">Narrow screen goodies</pre>
2576 <nowiki> inside <pre> (T15238)
2584 <pre><nowiki><nowiki></nowiki>Foo<nowiki></nowiki></nowiki></pre>
2592 <pre><nowiki>Foo</nowiki></pre>
2597 <nowiki> inside of #tag:pre
2599 {{#tag:pre|Foo <nowiki>→bar</nowiki>}}
2601 <pre>Foo →bar</pre>
2604 <pre about="#mwt1" typeof="mw:Transclusion" data-parsoid='{"pi":[[{"k":"1"}]]}' data-mw='{"parts":[{"template":{"target":{"wt":"#tag:pre","function":"tag"},"params":{"1":{"wt":"Foo <nowiki>&rarr;bar</nowiki>"}},"i":0}}]}'>Foo <span typeof="mw:Entity">→</span>bar</pre>
2607 ## Don't expect this to rt, Parsoid drops the unmatched closing pre tags that
2608 ## aren't enclosed in nowikis.
2610 <nowiki> and <pre> preference (first one wins)
2641 <pre typeof="mw:Extension/pre" about="#mwt2" data-mw='{"name":"pre","attrs":{},"body":{"extsrc":"\n<nowiki>\n"}}'><nowiki>
2646 <p><span typeof="mw:Nowiki">
2654 </pre> inside nowiki
2656 <nowiki></pre></nowiki>
2663 Empty pre; pre inside other HTML tags (T56946)
2680 <div data-parsoid='{"stx":"html"}'><pre typeof="mw:Extension/pre" about="#mwt2" data-parsoid='{"stx":"html"}' data-mw='{"name":"pre","attrs":{},"body":{"extsrc":"\nfoo\n"}}'>foo
2682 <pre typeof="mw:Extension/pre" about="#mwt4" data-parsoid='{"stx":"html"}' data-mw='{"name":"pre","attrs":{},"body":{"extsrc":""}}'></pre>
2686 HTML pre followed by indent-pre
2699 <p><pre>foo</pre></p>
2701 <p class="mw-empty-elt"></p><pre>foo</pre><p class="mw-empty-elt"></p>
2703 <p class='mw-empty-elt' data-parsoid='{"stx":"html","autoInsertedEnd":true}'></p><pre typeof="mw:Extension/pre" about="#mwt2" data-parsoid='{"stx":"html"}' data-mw='{"name":"pre","attrs":{},"body":{"extsrc":"foo"}}'>foo</pre><p class='mw-empty-elt' data-parsoid='{"autoInsertedStart":true,"stx":"html"}'></p>
2707 Templates: Indent-Pre: 1a. Templates that break a line should suppress <pre>
2715 Templates: Indent-Pre: 1b. Templates that break a line should suppress <pre>
2725 Templates: Indent-Pre: 1c: Wrapping should be based on expanded content
2737 Templates: Indent-Pre: 1d: Wrapping should be based on expanded content
2758 Templates: Indent-Pre: 1e. Wrapping should be based on expanded content
2762 {{echo| foo}}{{echo| bar}}
2767 {{echo|<!--cmt--> foo}}
2769 <!--cmt-->{{echo| foo}}
2771 {{echo|{{echo| }}bar}}
2789 Templates: Indent-Pre: 1f: Wrapping should be based on expanded content
2825 ## Hmm, should Parsoid rt this?
2827 Pres with newline attributes
2829 parsoid=wt2html,html2html
2834 <pre class="one two">hi</pre>
2837 <pre typeof="mw:Extension/pre" about="#mwt2" class="one two" data-mw='{"name":"pre","attrs":{"class":"one two"},"body":{"extsrc":"hi"}}'>hi</pre>
2841 Things that look like <pre> tags aren't treated as such
2843 Barack Obama <President> of the United States
2844 <President></President>
2846 <p>Barack Obama <President> of the United States
2847 <President></President>
2851 ## Remex doesn't account for fostered content.
2852 ## The difference between Parsoid and the PHP parser can be attributed to core
2853 ## commit 674e8388cba and 710618f89af in Parsoid's repo. Parsoid doesn't
2854 ## tokenize unmatched extension tags that shadow html tags as strings to ease
2855 ## an escaping mechanism. See the comment in `maybeExtensionTag`.
2857 Handle broken pre-like tags (T66025)
2861 {{echo|<pre <pre>x</pre>}}
2863 <table><pre </table>
2866 <table><pre </table>
2870 <pre <table></table>
2872 <pre typeof="mw:Transclusion mw:Extension/pre" about="#mwt2" data-parsoid='{"stx":"html","a":{"<pre":null},"sa":{"<pre":""},"pi":[[{"k":"1"}]]}' data-mw='{"parts":[{"template":{"target":{"wt":"echo","href":"./Template:Echo"},"params":{"1":{"wt":"<pre <pre>x</pre>"}},"i":0}}]}'>x</pre>
2874 <pre data-parsoid='{"stx":"html","src":"<pre </table>","tagWidths":[13,0],"a":{"<":null,"table":null},"sa":{"<":"","table":""},"fostered":true,"autoInsertedEnd":true}'></pre><table data-parsoid='{"stx":"html","autoInsertedEnd":true}'></table>
2877 ## Similar to the above, but shows the difference between extension and html tags
2879 Less than in attribute position
2886 <div </p><div>123</div>
2888 <pre typeof="mw:Extension/pre" about="#mwt2" data-mw='{"name":"pre","attrs":{"<pre":""},"body":{"extsrc":"123"}}'>123</pre><p>
2890 <div </p><div>123</div>
2894 Parsoid: handle pre with space after attribute
2898 <pre style="width:50%;" >{{echo|foo}}</pre>
2900 <pre style="width:50%;">{{echo|foo}}</pre>
2903 <pre typeof="mw:Extension/pre" about="#mwt2" style="width:50%;" data-mw='{"name":"pre","attrs":{"style":"width:50%;"},"body":{"extsrc":"{{echo|foo}}"}}'>{{echo|foo}}</pre>
2914 <pre typeof="mw:Extension/pre" about="#mwt2" data-mw='{"name":"pre","attrs":{}}'></pre>
2918 Parsoid: Don't paragraph-wrap fosterable content even if table syntax is unbalanced
2946 #--------------------------------------------------------------------
2947 # Transclusion parameter whitespace stripping tests
2948 # Behavior is different for positional and named parameters
2949 #--------------------------------------------------------------------
2951 Templates: Strip leading and trailing whitespace from named-param values
2955 {{echo|1= {{echo|b}} }}
2973 Templates: Don't strip whitespace from positional-param values
2977 {{echo|{{echo|b}} }}
3017 Templates: Don't recognize targets split by newlines
3033 Templates: Recognize targets when newlines and comments don't split the target
3038 <!--X--> ech<!--X-->o<!--X-->
3046 <p typeof="mw:Transclusion" data-mw='{"parts":[{"template":{"target":{"wt":"ech<!--X-->o<!--X--> \n <!--X--> <!--X-->\n\n ","href":"./Template:Echo"},"params":{"1":{"wt":"foo"}},"i":0}}]}'>foo</p>
3050 Templates: Handle empty comment-and-ws-only lines correctly
3053 <!--should be ignored-->
3054 <!--should be ignored as well-->
3061 <p typeof="mw:Transclusion" data-mw='{"parts":[{"template":{"target":{"wt":"echo","href":"./Template:Echo"},"params":{"1":{"wt":"foo\n<!--should be ignored-->\n <!--should be ignored as well-->\nbar"}},"i":0}}]}'>foo <!--should be ignored--> <!--should be ignored as well--> bar</p>
3065 Templates: Handle comments in the target
3068 <!-- should be ignored -->
3072 <!-- should be ignored and spaces on next line should not trip us up (T147742) -->
3075 {{echo<!-- should be ignored -->
3078 {{echo<!-- should be ignored -->|foo}}
3080 {{<!-- should be ignored -->echo|foo}}
3089 <p typeof="mw:Transclusion" data-mw='{"parts":[{"template":{"target":{"wt":"echo\n<!-- should be ignored -->\n","href":"./Template:Echo"},"params":{"1":{"wt":"foo"}},"i":0}}]}'>foo</p>
3091 <p typeof="mw:Transclusion" data-mw='{"parts":[{"template":{"target":{"wt":"echo\n<!-- should be ignored and spaces on next line should not trip us up (T147742) -->\n ","href":"./Template:Echo"},"params":{"1":{"wt":"foo"}},"i":0}}]}'>foo</p>
3093 <p typeof="mw:Transclusion" data-mw='{"parts":[{"template":{"target":{"wt":"echo<!-- should be ignored -->\n","href":"./Template:Echo"},"params":{"1":{"wt":"foo"}},"i":0}}]}'>foo</p>
3095 <p typeof="mw:Transclusion" data-mw='{"parts":[{"template":{"target":{"wt":"echo<!-- should be ignored -->","href":"./Template:Echo"},"params":{"1":{"wt":"foo"}},"i":0}}]}'>foo</p>
3097 <p typeof="mw:Transclusion" data-mw='{"parts":[{"template":{"target":{"wt":"echo","href":"./Template:Echo"},"params":{"1":{"wt":"foo"}},"i":0}}]}'>foo</p>
3101 Templates: Handle comments in parameter names (T69657)
3104 <!-- should be ignored -->
3108 <!-- should be ignored -->
3111 {{echo|1<!-- should be ignored -->=foo}}
3113 {{echo|<!-- should be ignored -->1=foo}}
3121 <p typeof="mw:Transclusion" data-mw='{"parts":[{"template":{"target":{"wt":"echo","href":"./Template:Echo"},"params":{"1":{"wt":"foo","key":{"wt":"1\n<!-- should be ignored -->"}}},"i":0}}]}'>foo</p>
3123 <p typeof="mw:Transclusion" data-mw='{"parts":[{"template":{"target":{"wt":"echo","href":"./Template:Echo"},"params":{"1":{"wt":"foo","key":{"wt":"<!-- should be ignored -->\n1"}}},"i":0}}]}'>foo</p>
3125 <p typeof="mw:Transclusion" data-mw='{"parts":[{"template":{"target":{"wt":"echo","href":"./Template:Echo"},"params":{"1":{"wt":"foo","key":{"wt":"1<!-- should be ignored -->"}}},"i":0}}]}'>foo</p>
3127 <p typeof="mw:Transclusion" data-mw='{"parts":[{"template":{"target":{"wt":"echo","href":"./Template:Echo"},"params":{"1":{"wt":"foo","key":{"wt":"<!-- should be ignored -->1"}}},"i":0}}]}'>foo</p>
3131 Templates: Other wikitext in parameter names (T69657)
3138 <p typeof="mw:Transclusion" data-mw='{"parts":[{"template":{"target":{"wt":"echo","href":"./Template:Echo"},"params":{"''1''":{"wt":"foo"}},"i":0}}]}'>{{{1}}}</p>
3142 Templates: With colons
3146 <p>Template with colon
3149 <p about="#mwt1" typeof="mw:Transclusion" data-mw='{"parts":[{"template":{"target":{"wt":"With: Colon","href":"./Template:With:_Colon"},"params":{},"i":0}}]}'>Template with colon</p>
3152 #--------------------------------------------------------------------
3153 # Transclusion parameter escaping tests
3154 #--------------------------------------------------------------------
3157 Templates: Parsoid parameter escaping test 1
3159 {{echo|[foo]|{{echo|[bar]}}}}
3164 <p about="#mwt1" typeof="mw:Transclusion"
3165 data-mw='{"parts":[{"template":{"target":{"wt":"echo","href":"./Template:Echo"},"params":{"1":{"wt":"[foo]"},"2":{"wt":"{{echo|[bar]}}"}},"i":0}}]}'>[foo]</p>
3169 Parsoid: Pipes in external links in template parameter
3171 {{echo|[{{echo|http://example.com}} link]}}
3173 <p><a rel="nofollow" class="external text" href="http://example.com">link</a>
3176 <p><a rel="mw:ExtLink" class="external text" href="http://example.com" about="#mwt31" typeof="mw:Transclusion" data-mw='{"parts":[{"template":{"target":{"wt":"echo","href":"./Template:Echo"},"params":{"1":{"wt":"[{{echo|http://example.com}} link]"}},"i":0}}]}'>link</a></p>
3180 Parsoid: pipe in transclusion parameter
3182 {{echo|http://foo.com/a|b}}
3184 <p><a rel="nofollow" class="external free" href="http://foo.com/a%7Cb">http://foo.com/a%7Cb</a>
3187 <p><a rel="mw:ExtLink" class="external free" href="http://foo.com/a%7Cb" about="#mwt1" typeof="mw:Transclusion" data-mw='{"parts":[{"template":{"target":{"wt":"echo","href":"./Template:Echo"},"params":{"1":{"wt":"http://foo.com/a&#124;b"}},"i":0}}]}'>http://foo.com/a%7Cb</a></p>
3191 Parsoid: Pipe in external link target and content in template parameter
3193 parsoid=html2wt,wt2wt
3195 {{echo|[http://foo.com/a|b a|b]}}
3197 <p><a rel="nofollow" class="external text" href="http://foo.com/a%7Cb">a|b</a>
3200 <p><a rel="mw:ExtLink" href="http://foo.com/a|b" about="#mwt1"
3201 typeof="mw:Transclusion"
3202 data-mw='{"parts":[{"template":{"target":{"wt":"echo","href":"./Template:Echo"},
3203 "params":{"1":{"wt":"[http://foo.com/a|b a|b]"}},"i":0}}]}'>a|b</a></p>
3207 Parsoid: Pipe in template with nested template in external link target in template parameter (seriously)
3211 {{echo|[{{fullurl:{{FULLPAGENAME}}|action=edit}} bar]}}
3213 <p typeof="mw:Transclusion" data-mw='{"parts":[{"template":{"target":{"wt":"echo","href":"./Template:Echo"},"params":{"1":{"wt":"[{{fullurl:{{FULLPAGENAME}}|action=edit}} bar]"}},"i":0}}]}'>[Main Page bar]</p>
3217 Templates: Don't escape already nowiki-escaped text in template parameters
3219 parsoid=html2wt,wt2wt
3221 {{echo|foo<nowiki>|</nowiki>bar}}
3222 {{echo|<nowiki><div></nowiki>}}
3223 {{echo|<nowiki></nowiki>}}
3230 <p><span about="#mwt1" typeof="mw:Transclusion" data-mw='{"parts":[{"template":{"target":{"wt":"echo","href":"./Template:Echo"},"params":{"1":{"wt":"foo<nowiki>|</nowiki>bar"}},"i":0}}]}'}'>foo</span><span typeof="mw:Nowiki" about="#mwt1">|</span><span about="#mwt1">bar</span>
3231 <span typeof="mw:Transclusion mw:Nowiki" about="#mwt2" data-mw='{"parts":[{"template":{"target":{"wt":"echo","href":"./Template:Echo"},"params":{"1":{"wt":"<nowiki>&lt;div&gt;</nowiki>"}},"i":0}}]}'><span typeof="mw:Entity"><</span>div<span typeof="mw:Entity">></span></span>
3232 <span typeof="mw:Transclusion mw:Nowiki" about="#mwt3" data-mw='{"parts":[{"template":{"target":{"wt":"echo","href":"./Template:Echo"},"params":{"1":{"wt":"<nowiki></nowiki>"}},"i":0}}]}'></span>
3238 Templates: '=' char in nested transclusions should not trigger nowiki escapes or conversion to named param
3240 parsoid=html2wt,wt2wt
3242 {{echo|{{echo|1=bar}}}}
3247 <p about="#mwt1" typeof="mw:Transclusion" data-mw='{"parts":[{"template":{"target":{"wt":"echo","href":"./Template:Echo"},"params":{"1":{"wt":"{{echo|1=bar}}"}},"i":0}}]}'>bar</p>
3252 Templates parameters with special tokenizing behavior dont get modified because of arg escaping
3259 <p about="#mwt1" typeof="mw:Transclusion" data-mw='{"parts":[{"template":{"target":{"wt":"echo","href":"./Template:Echo"},"params":{"1":{"wt":"a : b"}},"i":0}}]}'>a<span typeof="mw:DisplaySpace mw:Placeholder" data-parsoid='{"isDisplayHack":true}'> </span>: b</p>
3264 Templates: Preserve blank parameter names
3271 <p about="#mwt1" typeof="mw:Transclusion" data-mw='{"parts":[{"template":{"target":{"wt":"echo","href":"./Template:Echo"},"params":{"":{"wt":"foo"}},"i":0}}]}'>{{{1}}}</p>
3275 Templates: Preserve blank parameter names in other positions
3277 {{blank_param|bar|=foo}}
3283 <p about="#mwt1" typeof="mw:Transclusion" data-parsoid='{"pi":[[{"k":"1"},{"k":"","named":true}]]}' data-mw='{"parts":[{"template":{"target":{"wt":"blank_param","href":"./Template:Blank_param"},"params":{"1":{"wt":"bar"},"":{"wt":"foo"}},"i":0}}]}'>bar
3288 ### Parsoid-centric tests for testing RT edge cases for pre
3292 1a. Indent-Pre and Comments
3305 1b. Indent-Pre and Comments
3318 1c. Indent-Pre and Comments
3331 1d. Indent-Pre and Comments
3332 (Pre-handler currently cannot distinguish between comment/ws order and normalizes them to [comment,ws] order)
3345 2a. Indent-Pre and tables
3366 2b. Indent-Pre and tables
3382 2c. Indent-Pre and tables (T44252)
3399 2d. Indent-Pre and tables
3416 <tbody><tr><td> b</td></tr>
3421 2e. Indent-Pre and table-line syntax
3434 2f. Indent-pre started by table-line syntax
3453 2g. Indented table markup mixed with indented pre content (proposed in T8200)
3458 Text that should be rendered preformatted
3466 <pre>Text that should be rendered preformatted
3475 2h. Indent pre in tables
3477 parsoid=wt2html,html2html
3520 </td><td data-parsoid='{"startTagSrc":"{{!}}"}'>
3522 </td></tr></tbody></table>
3526 3a. Indent-Pre and block tags (single-line html)
3530 c <blockquote> foo </blockquote>
3535 c <blockquote> foo </blockquote>
3536 <pre><span> foo </span>
3539 <p> a </p><p> foo </p><p>
3540 b </p><div> foo </div><p>
3541 c </p><blockquote><p> foo </p></blockquote>
3542 <pre><span> foo </span>
3545 <p> a </p><p data-parsoid='{"stx":"html"}'> foo </p><p>
3546 b </p><div data-parsoid='{"stx":"html"}'> foo </div><p>
3547 c </p><blockquote data-parsoid='{"stx":"html"}'><p> foo </p></blockquote>
3548 <pre><span data-parsoid='{"stx":"html"}'> foo </span></pre>
3552 3b. Indent-Pre and block tags (multi-line html)
3555 <!-- comment --> b <div> foo </div>
3557 <pre>a <span>foo</span>
3562 <pre>a <span data-parsoid='{"stx":"html"}'>foo</span></pre>
3563 <!-- comment --> <p>b </p><div data-parsoid='{"stx":"html"}'> foo </div>
3565 <pre>a <span>foo</span>
3567 b </p><div> foo </div>
3571 3c. Indent-Pre and block tags (pre-content on separate line)
3635 4. Indent-Pre and extension tags
3637 parsoid=wt2html,html2html
3646 <p> a </p><pre typeof="mw:Extension/tag" about="#mwt2" data-mw='{"name":"tag","attrs":{}}'></pre>
3650 5. Indent-Pre and html pre
3652 <pre class="123">hi</pre>
3654 <pre class="123">hi</pre>
3657 <pre typeof="mw:Extension/pre" about="#mwt2" class="123" data-mw='{"name":"pre","attrs":{"class":"123"},"body":{"extsrc":"hi"}}'>hi</pre>
3661 Render paragraphs when indent-pre is suppressed in blocklevels
3678 4. Multiple spaces at start-of-line
3696 ## NOTE: the leading white-space chars on empty line are significant
3698 5a. White-space in indent-pre
3710 ## NOTE: the leading white-space chars on empty line are significant
3712 5b. White-space in indent-pre
3731 5c. White-space in indent-pre
3744 6. Pre-blocks should extend across lines with leading WS even when there is no wrappable content
3767 7a. Indent-pre and category links
3769 parsoid=wt2html,wt2wt
3771 [[Category:foo]] <!-- No pre-wrapping -->
3772 {{echo| [[Category:foo]]}} <!-- No pre-wrapping -->
3775 <link rel="mw:PageProp/Category" href="./Category:Foo"> <!-- No pre-wrapping -->
3776 <span about="#mwt1" typeof="mw:Transclusion" data-mw='{"parts":[{"template":{"target":{"wt":"echo","href":"./Template:Echo"},"params":{"1":{"wt":" [[Category:foo]]"}},"i":0}}]}'> </span><link rel="mw:PageProp/Category" href="./Category:Foo" about="#mwt1"> <!-- No pre-wrapping -->
3779 ## We used to, but no longer wt2wt this test since the default serializer
3780 ## will normalize all categories to serialize on their own line.
3781 ## This wikitext usage is going to be fairly uncommon in production and
3782 ## selser will take care of preserving formatting in those scenarios.
3784 7b. Indent-pre and category links
3789 [[Category:foo]] {{echo|b}}
3791 <pre><link rel="mw:PageProp/Category" href="./Category:Foo"> a
3792 <link rel="mw:PageProp/Category" href="./Category:Foo"> <span about="#mwt1" typeof="mw:Transclusion" data-mw='{"parts":[{"template":{"target":{"wt":"echo","href":"./Template:Echo"},"params":{"1":{"wt":"b"}},"i":0}}]}'>b</span></pre>
3796 Indent-Pre: Newlines in comments shouldn't affect sol state
3811 ### HTML-pre (some to spec PHP parser behavior and some Parsoid-RT-centric)
3815 HTML-pre: 1. embedded newlines
3847 <pre typeof="mw:Extension/pre" about="#mwt2" data-mw='{"name":"pre","attrs":{},"body":{"extsrc":"foo"}}'>foo</pre>
3849 <pre typeof="mw:Extension/pre" about="#mwt4" data-mw='{"name":"pre","attrs":{},"body":{"extsrc":"\nfoo\n"}}'>foo
3852 <pre typeof="mw:Extension/pre" about="#mwt6" data-mw='{"name":"pre","attrs":{},"body":{"extsrc":"\n\nfoo\n"}}'>
3857 <pre typeof="mw:Extension/pre" about="#mwt8" data-mw='{"name":"pre","attrs":{},"body":{"extsrc":"\n\n\nfoo\n"}}'>
3865 HTML-pre: big spaces
3901 <pre typeof="mw:Extension/pre" about="#mwt2" data-parsoid='{"stx":"html"}' data-mw='{"name":"pre","attrs":{},"body":{"extsrc":"\n\n\n\n\nhaha\n\n\n\n\nhaha\n\n\n\n\n"}}'>
3920 HTML-pre: 2: indented text
3933 HTML-pre: 3: other wikitext
3952 <pre typeof="mw:Extension/pre" about="#mwt2" data-mw='{"name":"pre","attrs":{},"body":{"extsrc":"\n* foo\n# bar\n= no-h =\n'' no-italic ''\n[[ NoLink ]]\n"}}'>* foo
3961 ### Definition lists
3969 <dd>Definition</dd></dl>
3974 Definition list for indentation only
3978 <dl><dd>Indented text</dd></dl>
3983 Definition list with no space
3988 <dd>Definition</dd></dl>
3993 Definition list with URL link
3995 ;http://example.com/ :definition
3997 <dl><dt><a rel="nofollow" class="external free" href="http://example.com/">http://example.com/</a></dt>
3998 <dd>definition</dd></dl>
4003 Definition list with bracketed URL link
4005 ;[http://www.example.com/ Example]:Something about it
4007 <dl><dt><a rel="nofollow" class="external text" href="http://www.example.com/">Example</a></dt>
4008 <dd>Something about it</dd></dl>
4013 Definition list with wikilink containing colon
4015 ;[[Help:FAQ]]:The least-read page on Wikipedia
4017 <dl><dt><a href="/index.php?title=Help:FAQ&action=edit&redlink=1" class="new" title="Help:FAQ (page does not exist)">Help:FAQ</a></dt>
4018 <dd>The least-read page on Wikipedia</dd></dl>
4022 # At Brion's and JeLuF's insistence... :)
4024 Definition list with news link containing colon
4026 ;news:alt.wikipedia.rox :This isn't even a real newsgroup!
4028 <dl><dt><a rel="nofollow" class="external free" href="news:alt.wikipedia.rox">news:alt.wikipedia.rox</a></dt>
4029 <dd>This isn't even a real newsgroup!</dd></dl>
4032 <dl><dt><a rel="mw:ExtLink" class="external free" href="news:alt.wikipedia.rox" data-parsoid='{"stx":"url"}'>news:alt.wikipedia.rox</a></dt><dd data-parsoid='{"stx":"row"}'>This isn't even a real newsgroup!</dd></dl>
4036 Malformed definition list with colon
4038 ;news:alt.wikipedia.rox -- don't crash or enter an infinite loop
4040 <dl><dt><a rel="nofollow" class="external free" href="news:alt.wikipedia.rox">news:alt.wikipedia.rox</a> -- don't crash or enter an infinite loop</dt></dl>
4045 Definition lists: colon in external link text
4047 ;[http://www.wikipedia2.org/ Wikipedia :The Next Generation] :OK, I made that up
4049 <dl><dt><a rel="nofollow" class="external text" href="http://www.wikipedia2.org/">Wikipedia :The Next Generation</a></dt>
4050 <dd>OK, I made that up</dd></dl>
4055 Definition lists: colon in HTML attribute
4057 ;<b style="display: inline">bold</b>
4059 <dl><dt><b style="display: inline">bold</b></dt></dl>
4064 Definition lists: self-closed tag
4066 ;one<br/>two :two-line fun
4068 <dl><dt>one<br />two</dt>
4069 <dd>two-line fun</dd></dl>
4074 Definition lists: ignore colons inside tags
4076 ;one <b>two : tag <i>fun:</i>:</b>:def
4078 <dl><dt>one <b>two : tag <i>fun:</i>:</b></dt>
4084 Definition lists: excess closed tags
4086 ;one</b>two :bad tag fun
4089 <dd>bad tag fun</dd></dl>
4093 <dd>bad tag fun</dd>
4098 T13748: Literal closing tags
4102 <dd>test test test test test</dd>
4104 <dd>test test test test test</dd>
4109 <dd>test test test test test</dd>
4111 <dd>test test test test test</dd>
4117 Definition and unordered list using wiki syntax nested in unordered list using html tags.
4126 <dd>description</dd></dl>
4127 <ul><li>unordered</li></ul>
4133 Definition list with empty definition and following paragraph
4146 Nested definition lists using html syntax
4159 Definition Lists: No nesting: Multiple dd's
4172 Definition Lists: Indentation: Regular
4180 <dl><dd>i3</dd></dl></dd></dl></dd></dl>
4185 Definition Lists: Indentation: Missing 1st level
4191 <dl><dd>i3</dd></dl></dd></dl></dd></dl>
4196 Definition Lists: Indentation: Multi-level indent
4200 <dl><dd><dl><dd><dl><dd>i3</dd></dl></dd></dl></dd></dl>
4205 Definition Lists: Hacky use to indent tables
4212 should be left alone
4214 <dl><dd><dl><dd><table>
4219 </td></tr></table></dd></dl></dd></dl>
4221 should be left alone
4226 Definition Lists: Hacky use to indent tables (with content following table)
4231 |} <!--c1--> this text should be part of the dl
4238 </td></tr></tbody></table> this text should be part of the dl</dd></dl>
4245 </td></tr></tbody></table> <!--c1--> this text should be part of the dl</dd></dl>
4249 Definition Lists: Hacky use to indent tables, with comments (T65979)
4257 should be left alone
4260 <dl><dd><dl><dd><table><tr>
4263 </tr></table><!-- bar --></dd></dl></dd></dl>
4265 should be left alone</p>
4269 Definition Lists: Hacky use to indent tables, with comment before table
4277 <dl><dd><dl><dd><!-- foo --><table><tr>
4279 </tr></table></dd></dl></dd></dl>
4282 # The trailing whitespace in this test is to catch a regression in
4283 # Parsoid after T54473.
4285 Definition Lists: Hacky use to indent tables (WS-insensitive)
4294 </td></tr></table></dd></dl>
4298 <tbody><tr><td>a</td></tr>
4299 </tbody></table></dd></dl>
4302 ## The PHP parser treats : items (dd) without a corresponding ; item (dt)
4303 ## as an empty dt item. It also ignores all but the last ";" when followed
4304 ## by ":" later on. So, ";" are not ignored in ";;;t3" but are ignored in
4305 ## ";;;t3 :d1". So, PHP parser behavior is a little inconsistent wrt multiple
4308 ## Ex: ";;t2 ::d2" is transformed into:
4320 ## But, Parsoid treats "; :" as a tight atomic unit and excess ":" as plain text
4321 ## So, the same wikitext above (;;t2 ::d2) is transformed into:
4332 ## All Parsoid only definition list tests have this difference.
4334 ## See also: https://phabricator.wikimedia.org/T8569
4335 ## and https://lists.wikimedia.org/pipermail/wikitext-l/2011-November/000483.html
4338 Table / list interaction: indented table with lists in table contents
4360 </td></tr></table></dd></dl>
4365 Table / list interaction: lists nested in tables nested in indented lists
4388 </td></tr></table></dd></dl>
4395 Definition Lists: Nesting: Multi-level (Parsoid only)
4423 Definition Lists: Nesting: Test 2
4430 <dl><dd>d2</dd></dl></dd></dl>
4435 Definition Lists: Nesting: Test 3
4440 <dl><dd><dl><dt>t1</dt>
4442 <dl><dd><dl><dd>d2</dd></dl></dd></dl></dd></dl></dd></dl>
4447 Definition Lists: Nesting: Test 4
4452 <dl><dd><dl><dd><dl><dt>t3</dt>
4453 <dd>d3</dd></dl></dd></dl></dd></dl>
4458 ## The Parsoid team believes the following three test exposes a
4459 ## bug in the PHP parser. (Parsoid team thinks the PHP parser is
4460 ## wrong to close the <dl> after the <dt> containing the <ul>.)
4461 ## It also exposes a "misfeature" in tidy, which doesn't like
4462 ## <dl> tags with a single <dt> child; it converts the <dt> into
4463 ## a <dd> in that case. (Parsoid leaves the <dt> alone!)
4465 Definition Lists: Mixed Lists: Test 1
4471 <dl><dd><dl><dt><ul><li>foo</li>
4472 <li>bar</li></ul></dt></dl>
4473 <dl><dt>baz</dt></dl></dd></dl>
4476 <dl><dd><dl><dt><ul><li>foo</li>
4477 <li>bar</li></ul></dt></dl>
4478 <dl><dt>baz</dt></dl></dd></dl>
4496 Definition Lists: Mixed Lists: Test 2
4501 <ul><li><dl><dd>d1</dd>
4502 <dd>d2</dd></dl></li></ul>
4508 Definition Lists: Mixed Lists: Test 3
4513 <ul><li><dl><dd><dl><dd><dl><dd>d1</dd>
4514 <dd>d2</dd></dl></dd></dl></dd></dl></li></ul>
4520 Definition Lists: Mixed Lists: Test 4
4525 <ul><li><dl><dt>d1</dt>
4528 <dd>d4</dd></dl></li></ul>
4534 Definition Lists: Mixed Lists: Test 5
4540 <dl><dd>d2</dd></dl></dd></dl></li></ul>
4546 Definition Lists: Mixed Lists: Test 6
4551 <ol><li><ul><li><dl><dd>d1
4552 <dl><dd><dl><dd>d3</dd></dl></dd></dl></dd></dl></li></ul></li></ol>
4558 Definition Lists: Mixed Lists: Test 7
4563 <dl><dd><ul><li>d1</li>
4564 <li>d2</li></ul></dd></dl>
4570 Definition Lists: Mixed Lists: Test 8
4575 <dl><dd><ul><li>d1</li></ul>
4576 <dl><dd><ul><li>d2</li></ul></dd></dl></dd></dl>
4582 Definition Lists: Mixed Lists: Test 9
4586 <ul><li><dl><dt>foo</dt>
4587 <dd>bar</dd></dl></li></ul>
4593 Definition Lists: Mixed Lists: Test 10
4597 <ul><li><ol><li><dl><dt>foo</dt>
4598 <dd>bar</dd></dl></li></ol></li></ul>
4602 # The Parsoid team disagrees with the PHP parser's seemingly-random
4603 # rules regarding dd/dt on the next few tests. Parsoid is more
4604 # consistent, and recognizes the shared nesting and keeps the
4605 # still-open tags around until the nesting is complete.
4607 # This is a regression test for T175099
4609 Definition Lists: Mixed Lists: Test 11
4616 <ul><li>b</li></ul></dd></dl>
4620 <dd><ul><li>b</li></ul></dd></dl>
4623 # FIXME: Maybe get rid of this test?
4625 Definition Lists: Mixed Lists: Test 12
4630 <ul><li><ol><li><ul><li><ol><li><dl><dt>foo</dt>
4631 <dd><ul><li><dl><dt><dl><dt>bar</dt></dl></dd></dl></li></ul></dd></dl>
4633 <dd>baz</dd></dl></li></ol></li></ul></li></ol></li></ul>
4636 <ul><li><ol><li><ul><li><ol><li><dl><dt>foo</dt>
4637 <dd><ul><li><dl><dt><dl><dt>bar</dt></dl></dt></dl></li></ul></dd></dl></li></ol></li></ul>
4639 <dd>baz</dd></dl></li></ol></li></ul>
4657 <dd data-parsoid='{"stx":"row"}'>bar</dd>
4662 <dd data-parsoid='{"stx":"row"}'>baz</dd>
4671 Definition Lists: Mixed Lists: Test 13
4676 <ul><li><ol><li><ul><li><ol><li><dl><dt>foo </dt>
4677 <dd><ul><li><dl><dt><dl><dt>bar</dt></dl></dt></dl></li></ul></dd></dl></li></ol></li></ul>
4678 <dl><dt>boo </dt>
4679 <dd>baz</dd></dl></li></ol></li></ul>
4682 # FIXME: Maybe get rid of this test?
4684 # * The test is wrong, there are two colons where there should be :;
4685 # * The PHP parser is wrong to close the <dl> after the <dt> containing the <ul>.
4687 Definition Lists: Weird Ones: Test 1
4689 *#;*::;;foo :bar (who uses this?)
4691 <ul><li><ol><li><dl><dt>foo</dt>
4692 <dd><ul><li><dl><dd><dl><dd><dl><dt><dl><dt>bar (who uses this?)</dt></dl></dt></dl></dd></dl></dd></dl></li></ul></dd></dl></li></ol></li></ul>
4710 <dd data-parsoid='{"stx":"row"}'>bar (who uses this?)</dd>
4722 Definition Lists: colons occurring in tags
4739 <dt><span>a:b</span></dt>
4740 <dt><div>a:b</div></dt>
4741 <dt><div>a</div></dt>
4745 <dt><i>a:b</i></dt></dl>
4746 <dl><dt><dl><dt><dl><dt><i>a:b</i></dt></dl></dt></dl></dt></dl>
4748 <dl><dt>a</dt><dd data-parsoid='{"stx":"row"}'>b</dd>
4750 <dt><i data-parsoid='{"stx":"html"}'>a:b</i></dt>
4751 <dt><span data-parsoid='{"stx":"html"}'>a:b</span></dt>
4752 <dt><div data-parsoid='{"stx":"html"}'>a:b</div></dt>
4753 <dt><div data-parsoid='{"stx":"html","autoInsertedEnd":true}'>a</div></dt>
4755 <dt><span about="#mwt1" typeof="mw:Transclusion" data-parsoid='{"pi":[[{"k":"1"}]]}' data-mw='{"parts":[{"template":{"target":{"wt":"echo","href":"./Template:Echo"},"params":{"1":{"wt":"a:b"}},"i":0}}]}'>a:b</span></dt>
4756 <dt><i about="#mwt2" typeof="mw:Transclusion" data-parsoid='{"pi":[[{"k":"1"}]]}' data-mw='{"parts":[{"template":{"target":{"wt":"echo","href":"./Template:Echo"},"params":{"1":{"wt":"''a:b''"}},"i":0}}]}'>a:b</i>
4757 <dl><dt><dl><dt><i>a:b</i></dt></dl></dt></dl></dt></dl>
4760 # Parsoid's output differs here again because it shares
4761 # nesting between the two lists unlike the PHP parser.
4762 # Unsure which is more desirable.
4764 Definition Lists: colons and tables 1
4776 </td></tr></table></dd></dl>
4780 </td></tr></table></dd></dl>
4786 </td></tr></table></dd>
4790 </td></tr></table></dd></dl>
4793 # FIXME: Does this need a html/php section?
4795 Definition Lists: template interaction
4797 ::{{definition_list}}
4800 ::{{definition_list}}
4805 <dl><dd><dl data-parsoid='{}'><dd about="#mwt1" typeof="mw:Transclusion" data-parsoid='{"pi":[[]]}' data-mw='{"parts":[":",{"template":{"target":{"wt":"definition_list","href":"./Template:Definition_list"},"params":{},"i":0}}]}'>one</dd><span about="#mwt1">
4806 </span><dd about="#mwt1">two</dd></dl></dd></dl>
4808 <dl><dd data-parsoid='{}'>one
4809 <dl><dd about="#mwt2" typeof="mw:Transclusion" data-parsoid='{"pi":[[]]}' data-mw='{"parts":["::",{"template":{"target":{"wt":"definition_list","href":"./Template:Definition_list"},"params":{},"i":0}},"\n:::two\n:::three"]}'>one</dd><span about="#mwt2">
4810 </span><dd about="#mwt2">two
4812 <dd>three</dd></dl></dd>
4813 <dd data-parsoid='{}'>four</dd></dl></dd></dl>
4821 External links: non-bracketed
4823 Non-bracketed: http://example.com
4825 <p>Non-bracketed: <a rel="nofollow" class="external free" href="http://example.com">http://example.com</a>
4829 # parsoid doesn't explicitly mark autonumbered links, see T55505
4831 External links: numbered
4833 Numbered: [http://example.com]
4834 Numbered: [http://example.net]
4835 Numbered: [http://example.com]
4837 <p>Numbered: <a rel="nofollow" class="external autonumber" href="http://example.com">[1]</a>
4838 Numbered: <a rel="nofollow" class="external autonumber" href="http://example.net">[2]</a>
4839 Numbered: <a rel="nofollow" class="external autonumber" href="http://example.com">[3]</a>
4842 <p>Numbered: <a rel="mw:ExtLink" class="external autonumber" href="http://example.com"></a>
4843 Numbered: <a rel="mw:ExtLink" class="external autonumber" href="http://example.net"></a>
4844 Numbered: <a rel="mw:ExtLink" class="external autonumber" href="http://example.com"></a></p>
4848 External links: specified text
4850 Specified text: [http://example.com link]
4852 <p>Specified text: <a rel="nofollow" class="external text" href="http://example.com">link</a>
4857 External links: trail
4859 Linktrails should not work for external links: [http://example.com link]s
4861 <p>Linktrails should not work for external links: <a rel="nofollow" class="external text" href="http://example.com">link</a>s
4866 External links: dollar sign in URL
4868 http://example.com/1$2345
4870 <p><a rel="nofollow" class="external free" href="http://example.com/1$2345">http://example.com/1$2345</a>
4874 # parsoid doesn't explicitly mark autonumbered links, see T55505
4876 External links: dollar sign in URL (autonumber)
4878 [http://example.com/1$2345]
4880 <p><a rel="nofollow" class="external autonumber" href="http://example.com/1$2345">[1]</a>
4883 <p><a rel="mw:ExtLink" class="external autonumber" href="http://example.com/1$2345"></a></p>
4887 External links: open square bracket forbidden in URL (T6377)
4889 parsoid=wt2html,wt2wt,html2html
4891 http://example.com/1[2345
4893 <p><a rel="nofollow" class="external free" href="http://example.com/1">http://example.com/1</a>[2345
4896 <p><a rel="mw:ExtLink" class="external free" href="http://example.com/1">http://example.com/1</a>[2345</p>
4900 External links: open square bracket forbidden in URL (named) (T6377)
4902 parsoid=wt2html,html2html
4904 [http://example.com/1[2345]
4906 <p><a rel="nofollow" class="external text" href="http://example.com/1">[2345</a>
4909 <p><a rel="mw:ExtLink" class="external text" href="http://example.com/1">[2345</a></p>
4912 # parsoid adds a space before the link name
4914 External links: open square bracket forbidden in URL (named) (T6377)
4917 [http://example.com/1 [2345]
4919 <p><a rel="nofollow" class="external text" href="http://example.com/1">[2345</a>
4924 External links: nowiki in URL link text (T8230)
4926 [http://example.com/ <nowiki>''example site''</nowiki>]
4928 <p><a rel="nofollow" class="external text" href="http://example.com/">''example site''</a>
4933 External links: newline forbidden in text (T8230 regression check)
4935 [http://example.com/ first
4938 <p>[<a rel="nofollow" class="external free" href="http://example.com/">http://example.com/</a> first
4944 External links: Pipe char between url and text
4946 [http://example.com | link]
4948 <p><a rel="nofollow" class="external text" href="http://example.com">| link</a>
4953 External links: protocol-relative URL in brackets
4955 [//example.com/ Test]
4957 <p><a rel="nofollow" class="external text" href="//example.com/">Test</a>
4961 # parsoid doesn't explicitly mark autonumbered links, see T55505
4963 External links: protocol-relative URL in brackets without text
4967 <p><a rel="nofollow" class="external autonumber" href="//example.com">[1]</a>
4970 <p><a rel="mw:ExtLink" class="external autonumber" href="//example.com"></a></p>
4974 External links: protocol-relative URL in free text is left alone
4978 <p>//example.com/Foo
4983 External links: protocol-relative URL in the middle of a word is left alone (T32269)
4985 foo//example.com/Foo
4987 <p>foo//example.com/Foo
4991 ## html2wt and html2html will fail because we will prefer the :en: interwiki prefix over wikipedia:
4993 External links: with no contents
4995 parsoid=wt2html,wt2wt
4997 [http://en.wikipedia.org/wiki/Foo]
4999 [[wikipedia:Foo|Bar]]
5001 [[wikipedia:Foo|<span>Bar</span>]]
5003 <p><a rel="nofollow" class="external autonumber" href="http://en.wikipedia.org/wiki/Foo">[1]</a>
5004 </p><p><a href="http://en.wikipedia.org/wiki/Foo" class="extiw" title="wikipedia:Foo">Bar</a>
5005 </p><p><a href="http://en.wikipedia.org/wiki/Foo" class="extiw" title="wikipedia:Foo"><span>Bar</span></a>
5008 <p><a rel="mw:ExtLink" class="external autonumber" href="http://en.wikipedia.org/wiki/Foo"></a></p>
5009 <p><a rel="mw:WikiLink/Interwiki" href="http://en.wikipedia.org/wiki/Foo" title="wikipedia:Foo">Bar</a></p>
5010 <p><a rel="mw:WikiLink/Interwiki" href="http://en.wikipedia.org/wiki/Foo" title="wikipedia:Foo"><span>Bar</span></a></p>
5014 External links: Free with trailing punctuation
5024 http://example.com/url_with_(brackets)
5025 (http://example.com/url_without_brackets)
5026 http://example.com/url_with_entity&
5027 http://example.com/url_with_entity&
5028 http://example.com/url_with_entity&
5029 http://example.com/url_with_entity
5030 http://example.com/url_with_entity 
5031 http://example.com/url_with_entity 
5032 http://example.com/url_with_entity<
5033 http://example.com/url_with_entity<
5034 http://example.com/url_with_entity<
5036 <p><a rel="nofollow" class="external free" href="http://example.com">http://example.com</a>,
5037 <a rel="nofollow" class="external free" href="http://example.com">http://example.com</a>;
5038 <a rel="nofollow" class="external free" href="http://example.com">http://example.com</a>\
5039 <a rel="nofollow" class="external free" href="http://example.com">http://example.com</a>.
5040 <a rel="nofollow" class="external free" href="http://example.com">http://example.com</a>:
5041 <a rel="nofollow" class="external free" href="http://example.com">http://example.com</a>!
5042 <a rel="nofollow" class="external free" href="http://example.com">http://example.com</a>?
5043 <a rel="nofollow" class="external free" href="http://example.com">http://example.com</a>)
5044 <a rel="nofollow" class="external free" href="http://example.com/url_with_(brackets)">http://example.com/url_with_(brackets)</a>
5045 (<a rel="nofollow" class="external free" href="http://example.com/url_without_brackets">http://example.com/url_without_brackets</a>)
5046 <a rel="nofollow" class="external free" href="http://example.com/url_with_entity&">http://example.com/url_with_entity&</a>
5047 <a rel="nofollow" class="external free" href="http://example.com/url_with_entity&">http://example.com/url_with_entity&</a>
5048 <a rel="nofollow" class="external free" href="http://example.com/url_with_entity&">http://example.com/url_with_entity&</a>
5049 <a rel="nofollow" class="external free" href="http://example.com/url_with_entity">http://example.com/url_with_entity</a> 
5050 <a rel="nofollow" class="external free" href="http://example.com/url_with_entity">http://example.com/url_with_entity</a> 
5051 <a rel="nofollow" class="external free" href="http://example.com/url_with_entity">http://example.com/url_with_entity</a> 
5052 <a rel="nofollow" class="external free" href="http://example.com/url_with_entity">http://example.com/url_with_entity</a><
5053 <a rel="nofollow" class="external free" href="http://example.com/url_with_entity">http://example.com/url_with_entity</a><
5054 <a rel="nofollow" class="external free" href="http://example.com/url_with_entity">http://example.com/url_with_entity</a><
5057 <p><a rel="mw:ExtLink" class="external free" href="http://example.com">http://example.com</a>,
5058 <a rel="mw:ExtLink" class="external free" href="http://example.com">http://example.com</a>;
5059 <a rel="mw:ExtLink" class="external free" href="http://example.com">http://example.com</a>\
5060 <a rel="mw:ExtLink" class="external free" href="http://example.com">http://example.com</a>.
5061 <a rel="mw:ExtLink" class="external free" href="http://example.com">http://example.com</a>:
5062 <a rel="mw:ExtLink" class="external free" href="http://example.com">http://example.com</a>!
5063 <a rel="mw:ExtLink" class="external free" href="http://example.com">http://example.com</a>?
5064 <a rel="mw:ExtLink" class="external free" href="http://example.com">http://example.com</a>)
5065 <a rel="mw:ExtLink" class="external free" href="http://example.com/url_with_(brackets)">http://example.com/url_with_(brackets)</a>
5066 (<a rel="mw:ExtLink" class="external free" href="http://example.com/url_without_brackets">http://example.com/url_without_brackets</a>)
5067 <a rel="mw:ExtLink" class="external free" href="http://example.com/url_with_entity&">http://example.com/url_with_entity&</a>
5068 <a rel="mw:ExtLink" class="external free" href="http://example.com/url_with_entity&">http://example.com/url_with_entity&</a>
5069 <a rel="mw:ExtLink" class="external free" href="http://example.com/url_with_entity&">http://example.com/url_with_entity&</a>
5070 <a rel="mw:ExtLink" class="external free" href="http://example.com/url_with_entity">http://example.com/url_with_entity</a><span typeof="mw:Entity" data-parsoid='{"src":"&nbsp;","srcContent":" "}'> </span>
5071 <a rel="mw:ExtLink" class="external free" href="http://example.com/url_with_entity">http://example.com/url_with_entity</a><span typeof="mw:Entity" data-parsoid='{"src":"&#xA0;","srcContent":" "}'> </span>
5072 <a rel="mw:ExtLink" class="external free" href="http://example.com/url_with_entity">http://example.com/url_with_entity</a><span typeof="mw:Entity" data-parsoid='{"src":"&#160;","srcContent":" "}'> </span>
5073 <a rel="mw:ExtLink" class="external free" href="http://example.com/url_with_entity">http://example.com/url_with_entity</a><span typeof="mw:Entity" data-parsoid='{"src":"&lt;","srcContent":"<"}'><</span>
5074 <a rel="mw:ExtLink" class="external free" href="http://example.com/url_with_entity">http://example.com/url_with_entity</a><span typeof="mw:Entity" data-parsoid='{"src":"&#x3C;","srcContent":"<"}'><</span>
5075 <a rel="mw:ExtLink" class="external free" href="http://example.com/url_with_entity">http://example.com/url_with_entity</a><span typeof="mw:Entity" data-parsoid='{"src":"&#60;","srcContent":"<"}'><</span></p>
5079 External links: tricky Parsoid html2html case
5081 parsoid=wt2html,wt2wt,html2html
5083 http://example.com/url_with_entity&amp;
5085 <p><a rel="nofollow" class="external free" href="http://example.com/url_with_entity&amp">http://example.com/url_with_entity&amp</a>;
5088 <p><a rel="mw:ExtLink" class="external free" href="http://example.com/url_with_entity&amp">http://example.com/url_with_entity&amp</a>;</p>
5092 External links: Free with trailing quotes (T113666)
5094 '''News:''' Stuff here
5098 <p><b>News:</b> Stuff here
5099 </p><p><a rel="nofollow" class="external free" href="news:'a'b">news:'a'b</a><i>c</i>d e
5102 <p><b>News:</b> Stuff here</p>
5103 <p><a rel="mw:ExtLink" class="external free" href="news:'a'b">news:'a'b</a><i>c</i>d e</p>
5107 External links: with entity
5109 [http:// www.librarieswithoutborders.org Libraries without borders]
5111 <p><a rel="nofollow" class="external text" href="http://+www.librarieswithoutborders.org">Libraries without borders</a>
5114 <p><a rel="mw:ExtLink" class="external text" href="http://+www.librarieswithoutborders.org" data-parsoid='{"a":{"href":"http://+www.librarieswithoutborders.org"},"sa":{"href":"http://&#x20;www.librarieswithoutborders.org"}}'>Libraries without borders</a></p>
5118 External links: Lone protocols are never linked (T105697)
5137 External links: No preceding word characters allowed (T67278)
5139 NOPEhttp://example.com
5140 N0http://example.com
5141 ok:http://example.com
5142 ok-http://example.com
5144 <p>NOPEhttp://example.com
5145 N0http://example.com
5146 ok:<a rel="nofollow" class="external free" href="http://example.com">http://example.com</a>
5147 ok-<a rel="nofollow" class="external free" href="http://example.com">http://example.com</a>
5152 External links: nofollow domain exception
5154 A [https://no-nofollow.org/foobar link], and another [https://example.org link].
5156 <p>A <a class="external text" href="https://no-nofollow.org/foobar">link</a>, and another <a rel="nofollow" class="external text" href="https://example.org">link</a>.
5163 External image: http://meta.wikimedia.org/upload/f/f1/Ncwikicol.png
5165 <p>External image: <img src="http://meta.wikimedia.org/upload/f/f1/Ncwikicol.png" alt="Ncwikicol.png"/>
5170 External image from https
5172 External image from https: https://meta.wikimedia.org/upload/f/f1/Ncwikicol.png
5174 <p>External image from https: <img src="https://meta.wikimedia.org/upload/f/f1/Ncwikicol.png" alt="Ncwikicol.png"/>
5179 External image (when not allowed)
5181 wgAllowExternalImages=0
5183 External image: http://meta.wikimedia.org/upload/f/f1/Ncwikicol.png
5185 <p>External image: <a rel="nofollow" class="external free" href="http://meta.wikimedia.org/upload/f/f1/Ncwikicol.png">http://meta.wikimedia.org/upload/f/f1/Ncwikicol.png</a>
5190 Link to non-http image, no img tag
5192 Link to non-http image, no img tag: ftp://example.com/test.jpg
5194 <p>Link to non-http image, no img tag: <a rel="nofollow" class="external free" href="ftp://example.com/test.jpg">ftp://example.com/test.jpg</a>
5199 External links: terminating separator
5201 Terminating separator: http://example.com/thing,
5203 <p>Terminating separator: <a rel="nofollow" class="external free" href="http://example.com/thing">http://example.com/thing</a>,
5208 External links: intervening separator
5210 Intervening separator: http://example.com/1,2,3
5212 <p>Intervening separator: <a rel="nofollow" class="external free" href="http://example.com/1,2,3">http://example.com/1,2,3</a>
5217 External links: old bug with URL in query
5219 Old bug with URL in query: [http://example.com/thing?url=http://example.com link]
5221 <p>Old bug with URL in query: <a rel="nofollow" class="external text" href="http://example.com/thing?url=http://example.com">link</a>
5226 External links: old URL-in-URL bug, mixed protocols
5228 And again with mixed protocols: [ftp://example.com?url=http://example.com link]
5230 <p>And again with mixed protocols: <a rel="nofollow" class="external text" href="ftp://example.com?url=http://example.com">link</a>
5234 # Since Parsoid is starting to emit canonical wikitext for links,
5235 # [http://example.com http://example.com] will not RT back to that
5238 External links: URL in text
5242 URL in text: [http://example.com http://example.com]
5244 <p>URL in text: <a rel="nofollow" class="external text" href="http://example.com">http://example.com</a>
5247 <p>URL in text: <a rel="mw:ExtLink" class="external text" href="http://example.com">http://example.com</a></p>
5251 External links: Clickable images
5253 ja-style clickable images: [http://example.com http://meta.wikimedia.org/upload/f/f1/Ncwikicol.png]
5255 <p>ja-style clickable images: <a rel="nofollow" class="external text" href="http://example.com"><img src="http://meta.wikimedia.org/upload/f/f1/Ncwikicol.png" alt="Ncwikicol.png"/></a>
5258 <p>ja-style clickable images: <a rel="mw:ExtLink" class="external text" href="http://example.com"><img src="http://meta.wikimedia.org/upload/f/f1/Ncwikicol.png" alt="Ncwikicol.png" data-parsoid='{"type":"extlink"}'/></a></p>
5262 External links: raw ampersand
5264 Old & use: http://x&y
5266 <p>Old & use: <a rel="nofollow" class="external free" href="http://x&y">http://x&y</a>
5271 External links: encoded ampersand
5273 Old & use: http://x&y
5275 <p>Old & use: <a rel="nofollow" class="external free" href="http://x&y">http://x&y</a>
5278 <p>Old <span typeof="mw:Entity">&</span> use: <a rel="mw:ExtLink" class="external free" href="http://x&y">http://x&y</a></p>
5282 External links: encoded equals (T8102)
5284 http://example.com/?foo=bar
5286 <p><a rel="nofollow" class="external free" href="http://example.com/?foo=bar">http://example.com/?foo=bar</a>
5289 <p><a rel="mw:ExtLink" class="external free" href="http://example.com/?foo=bar">http://example.com/?foo=bar</a></p>
5293 ## Note that parsoid doesn't explicit mark autonumbered links, nor
5294 ## does it number them. As discussed in T55505, we can identify
5295 ## autonumbered links via CSS.
5299 External links: [raw ampersand]
5301 Old & use: [http://x&y]
5303 <p>Old & use: <a rel="nofollow" class="external autonumber" href="http://x&y">[1]</a>
5306 <p>Old <span typeof="mw:Entity">&</span> use: <a rel="mw:ExtLink" class="external autonumber" href="http://x&y"></a></p>
5309 # note that parsoid html is identical to [raw ampersand] case; so html2wt
5310 # mode will return the [raw ampersand] wikitext
5312 External links: [encoded ampersand]
5314 parsoid=wt2html,wt2wt,html2html
5316 Old & use: [http://x&y]
5318 <p>Old & use: <a rel="nofollow" class="external autonumber" href="http://x&y">[1]</a>
5321 <p>Old <span typeof="mw:Entity">&</span> use: <a rel="mw:ExtLink" class="external autonumber" href="http://x&y"></a></p>
5325 External links: [raw equals]
5327 [http://example.com/?foo=bar]
5329 <p><a rel="nofollow" class="external autonumber" href="http://example.com/?foo=bar">[1]</a>
5332 <p><a rel="mw:ExtLink" class="external autonumber" href="http://example.com/?foo=bar"></a></p>
5335 # note that parsoid html is identical to [raw equals] case; so html2wt
5336 # mode will return the [raw equals] wikitext
5338 External links: [encoded equals] (T8102)
5340 parsoid=wt2html,wt2wt,html2html
5342 [http://example.com/?foo=bar]
5344 <p><a rel="nofollow" class="external autonumber" href="http://example.com/?foo=bar">[1]</a>
5347 <p><a rel="mw:ExtLink" class="external autonumber" href="http://example.com/?foo=bar"></a></p>
5350 # xxx parsoid strips the IDN character, so the round-trip tests will
5351 # obviously fail and are disabled. --cscott
5353 External links: [IDN ignored character reference in hostname; strip it right off]
5355 parsoid=wt2html,wt2wt,html2html
5357 [http://e‌xample.com/]
5359 <p><a rel="nofollow" class="external autonumber" href="http://example.com/">[1]</a>
5362 <p><a rel="mw:ExtLink" class="external autonumber" href="http://example.com/"></a></p>
5365 # FIXME: This test (the IDN characters in the text of a link) is an inconsistency.
5366 # Where an external link could easily circumvent the sanitization of the text of
5367 # a link like this (where an IDN-ignore character is in the URL somewhere), this
5368 # test demands a higher standard. That's a bit strange.
5372 # http://example.com -> [http://example.com|http://example.com]
5373 # [http://example.com|http://example.com] -> [http://example.com|http://example.com]
5375 # The first example is sanitized, but the second is not. Any security benefits
5376 # from this production are trivial to circumvent. Either remove this test and
5377 # let the parser(s) do their thing unaccosted, or fix the inconsistency and change
5378 # the test accordingly.
5382 # xxx parsoid strips the IDN character, so the round-trip tests will
5383 # obviously fail and are disabled. --cscott
5385 External links: IDN ignored character reference in hostname; strip it right off
5387 parsoid=wt2html,html2html
5389 http://e‌xample.com/
5391 <p><a rel="nofollow" class="external free" href="http://example.com/">http://example.com/</a>
5394 <p><a rel="mw:ExtLink" class="external free" href="http://example.com/">http://example.com/</a></p>
5398 External links: www.jpeg.org (T2554)
5402 <p><a rel="nofollow" class="external free" href="http://www.jpeg.org">http://www.jpeg.org</a>
5406 # parsoid doesn't explicitly mark autonumbered links, see T55505
5408 External links: URL within URL (T2002)
5410 [http://www.unausa.org/newindex.asp?place=http://www.unausa.org/programs/mun.asp]
5412 <p><a rel="nofollow" class="external autonumber" href="http://www.unausa.org/newindex.asp?place=http://www.unausa.org/programs/mun.asp">[1]</a>
5415 <p><a rel="mw:ExtLink" class="external autonumber" href="http://www.unausa.org/newindex.asp?place=http://www.unausa.org/programs/mun.asp"></a></p>
5419 T2361: URL inside bracketed URL
5421 [http://www.example.com/foo http://www.example.com/bar]
5423 <p><a rel="nofollow" class="external text" href="http://www.example.com/foo">http://www.example.com/bar</a>
5428 T2361: URL within URL, not bracketed
5430 http://www.example.com/foo?=http://www.example.com/bar
5432 <p><a rel="nofollow" class="external free" href="http://www.example.com/foo?=http://www.example.com/bar">http://www.example.com/foo?=http://www.example.com/bar</a>
5437 T2289: ">"-token in URL-tail
5439 http://www.example.com/<hello>
5441 <p><a rel="nofollow" class="external free" href="http://www.example.com/">http://www.example.com/</a><hello>
5446 T2289: literal ">"-token in URL-tail
5448 http://www.example.com/<b>html</b>
5450 <p><a rel="nofollow" class="external free" href="http://www.example.com/">http://www.example.com/</a><b>html</b>
5453 <p><a rel="mw:ExtLink" class="external free" href="http://www.example.com/" data-parsoid='{"stx":"url"}'>http://www.example.com/</a><b data-parsoid='{"stx":"html"}'>html</b></p>
5457 T2289: ">"-token in bracketed URL
5459 [http://www.example.com/<hello> stuff]
5461 <p><a rel="nofollow" class="external text" href="http://www.example.com/"><hello> stuff</a>
5466 T2289: literal ">"-token in bracketed URL
5468 [http://www.example.com/<b>html</b> stuff]
5470 <p><a rel="nofollow" class="external text" href="http://www.example.com/"><b>html</b> stuff</a>
5475 T2289: literal double quote at end of URL
5477 http://www.example.com/"hello"
5479 <p><a rel="nofollow" class="external free" href="http://www.example.com/">http://www.example.com/</a>"hello"
5484 T2289: literal double quote in bracketed URL
5486 [http://www.example.com/"hello" stuff]
5488 <p><a rel="nofollow" class="external text" href="http://www.example.com/">"hello" stuff</a>
5493 External links: multiple legal whitespace is fine, Magnus. Don't break it please. (T7081)
5495 [http://www.example.com test]
5497 <p><a rel="nofollow" class="external text" href="http://www.example.com">test</a>
5502 External links: link text with spaces
5504 [http://www.example.com a b c]
5505 [http://www.example.com ''a'' ''b'']
5507 <p><a rel="nofollow" class="external text" href="http://www.example.com">a b c</a>
5508 <a rel="nofollow" class="external text" href="http://www.example.com"><i>a</i> <i>b</i></a>
5512 # Note edge case difference between PHP and Parsoid here.
5514 External links: wiki links within external link (T5695)
5516 parsoid=wt2html,html2html
5518 [http://example.com [[wikilink]] embedded in ext link]
5520 [http://example.com test [[wikilink]] embedded in ext link]
5522 <p><a rel="nofollow" class="external text" href="http://example.com"></a><a href="/index.php?title=Wikilink&action=edit&redlink=1" class="new" title="Wikilink (page does not exist)">wikilink</a><a rel="nofollow" class="external text" href="http://example.com"> embedded in ext link</a>
5523 </p><p><a rel="nofollow" class="external text" href="http://example.com">test </a><a href="/index.php?title=Wikilink&action=edit&redlink=1" class="new" title="Wikilink (page does not exist)">wikilink</a><a rel="nofollow" class="external text" href="http://example.com"> embedded in ext link</a>
5526 <p><a rel="mw:ExtLink" class="external autonumber" href="http://example.com"></a><a rel="mw:WikiLink" href="./Wikilink" title="Wikilink">wikilink</a><span> embedded in ext link</span></p>
5527 <p><a rel="mw:ExtLink" class="external text" href="http://example.com">test </a><a rel="mw:WikiLink" href="./Wikilink" title="Wikilink">wikilink</a><span> embedded in ext link</span></p>
5531 T2787: Links with one slash after the url protocol are invalid
5535 [http:/example.com title]
5537 <p>http:/example.com
5538 </p><p>[http:/example.com title]
5543 Bracketed external links with template-generated invalid target
5545 [{{echo|http:/example.com}} title]
5547 <p>[http:/example.com title]
5551 # wt2html only because Parsoid would want to add <nowiki>s coming from html
5553 Broken wikilinks (but not external links) prevent templates from closing
5557 [http://example.com x
5559 {{echo|[http://example.com x}}
5565 <p>[<a rel="nofollow" class="external free" href="http://example.com">http://example.com</a> x
5566 </p><p>[<a rel="nofollow" class="external free" href="http://example.com">http://example.com</a> x
5568 </p><p>{{echo|[[Foo}}
5571 <p>[<a rel="mw:ExtLink" class="external free" href="http://example.com">http://example.com</a> x</p>
5572 <p typeof="mw:Transclusion" data-mw='{"parts":[{"template":{"target":{"wt":"echo","href":"./Template:Echo"},"params":{"1":{"wt":"[http://example.com x"}},"i":0}}]}'>[<a rel="mw:ExtLink" class="external free" href="http://example.com">http://example.com</a> x</p>
5574 <p>{{echo|[[Foo}}</p>
5578 Wikilinks with embedded newlines are not broken
5589 <p typeof="mw:Transclusion" data-mw='{"parts":[{"template":{"target":{"wt":"echo","href":"./Template:Echo"},"params":{"1":{"wt":"[[ Foo\nB\nC]]"}},"i":0}}]}'>[[ Foo B C]]</p>
5601 <p>{{echo|<a href="/wiki/Foo" title="Foo">}}</a>
5605 <p>{{echo|<a rel="mw:WikiLink" href="./Foo" title="Foo">}}</a></p>
5606 <p>[[Foo|<span typeof="mw:Transclusion" data-mw='{"parts":[{"template":{"target":{"wt":"echo","href":"./Template:Echo"},"params":{"1":{"wt":"]]"}},"i":0}}]}'>]]</span></p>
5610 T4702: Mismatched <i>, <b> and <a> tags are invalid
5612 ''[http://example.com text'']
5613 [http://example.com '''text]'''
5614 ''Something [http://example.com in italic'']
5615 ''Something [http://example.com mixed''''', even bold]'''
5616 '''''Now [http://example.com both''''']
5618 <p><a rel="nofollow" class="external text" href="http://example.com"><i>text</i></a>
5619 <a rel="nofollow" class="external text" href="http://example.com"><b>text</b></a>
5620 <i>Something </i><a rel="nofollow" class="external text" href="http://example.com"><i>in italic</i></a>
5621 <i>Something </i><a rel="nofollow" class="external text" href="http://example.com"><i>mixed</i><b>, even bold</b></a>
5622 <i><b>Now </b></i><a rel="nofollow" class="external text" href="http://example.com"><i><b>both</b></i></a>
5630 http://www.example.com/?title=AT%26T
5632 <p><a rel="nofollow" class="external free" href="http://www.example.com/?title=AT%26T">http://www.example.com/?title=AT%26T</a>
5635 <p><a rel="mw:ExtLink" class="external free" href="http://www.example.com/?title=AT%26T">http://www.example.com/?title=AT%26T</a></p>
5638 # According to https://www.w3.org/TR/2011/WD-html5-20110525/Overview.html#parsing-urls a plain
5639 # % is actually legal in HTML5. Any change in output would need testing though.
5641 T6781, T7267: %25 in URL
5643 http://www.example.com/?title=100%25_Bran
5645 <p><a rel="nofollow" class="external free" href="http://www.example.com/?title=100%25_Bran">http://www.example.com/?title=100%25_Bran</a>
5648 <p><a rel="mw:ExtLink" class="external free" href="http://www.example.com/?title=100%25_Bran">http://www.example.com/?title=100%25_Bran</a></p>
5652 T6781, T7267: %28, %29 in URL
5654 http://www.example.com/?title=Ben-Hur_%281959_film%29
5656 <p><a rel="nofollow" class="external free" href="http://www.example.com/?title=Ben-Hur_%281959_film%29">http://www.example.com/?title=Ben-Hur_%281959_film%29</a>
5659 <p><a rel="mw:ExtLink" class="external free" href="http://www.example.com/?title=Ben-Hur_%281959_film%29">http://www.example.com/?title=Ben-Hur_%281959_film%29</a></p>
5664 T6781: %26 in autonumber URL
5666 [http://www.example.com/?title=AT%26T]
5668 <p><a rel="nofollow" class="external autonumber" href="http://www.example.com/?title=AT%26T">[1]</a>
5671 <p><a rel="mw:ExtLink" class="external autonumber" href="http://www.example.com/?title=AT%26T"></a></p>
5675 T6781, T7267: %26 in autonumber URL
5677 [http://www.example.com/?title=100%25_Bran]
5679 <p><a rel="nofollow" class="external autonumber" href="http://www.example.com/?title=100%25_Bran">[1]</a>
5682 <p><a rel="mw:ExtLink" class="external autonumber" href="http://www.example.com/?title=100%25_Bran"></a></p>
5686 T6781, T7267: %28, %29 in autonumber URL
5688 [http://www.example.com/?title=Ben-Hur_%281959_film%29]
5690 <p><a rel="nofollow" class="external autonumber" href="http://www.example.com/?title=Ben-Hur_%281959_film%29">[1]</a>
5693 <p><a rel="mw:ExtLink" class="external autonumber" href="http://www.example.com/?title=Ben-Hur_%281959_film%29"></a></p>
5698 T6781: %26 in bracketed URL
5700 [http://www.example.com/?title=AT%26T link]
5702 <p><a rel="nofollow" class="external text" href="http://www.example.com/?title=AT%26T">link</a>
5705 <p><a rel="mw:ExtLink" class="external text" href="http://www.example.com/?title=AT%26T">link</a></p>
5709 T6781, T7267: %25 in bracketed URL
5711 [http://www.example.com/?title=100%25_Bran link]
5713 <p><a rel="nofollow" class="external text" href="http://www.example.com/?title=100%25_Bran">link</a>
5718 T6781, T7267: %28, %29 in bracketed URL
5720 [http://www.example.com/?title=Ben-Hur_%281959_film%29 link]
5722 <p><a rel="nofollow" class="external text" href="http://www.example.com/?title=Ben-Hur_%281959_film%29">link</a>
5725 <p><a rel="mw:ExtLink" class="external text" href="http://www.example.com/?title=Ben-Hur_%281959_film%29">link</a></p>
5729 External link containing a period in the anchor. (T65947)
5731 [//foo.org/bar#baz. bang]
5733 [//foo.org/bar. bang]
5735 <p><a rel="nofollow" class="external text" href="//foo.org/bar#baz.">bang</a>
5736 </p><p><a rel="nofollow" class="external text" href="//foo.org/bar.">bang</a>
5739 <p><a rel="mw:ExtLink" class="external text" href="//foo.org/bar#baz.">bang</a></p>
5740 <p><a rel="mw:ExtLink" class="external text" href="//foo.org/bar.">bang</a></p>
5744 External link containing a single quote. (T65947)
5748 [//foo.org/bar'baz bang]
5750 <p><a rel="nofollow" class="external autonumber" href="//foo.org/bar'baz">[1]</a>
5751 </p><p><a rel="nofollow" class="external text" href="//foo.org/bar'baz">bang</a>
5754 <p><a rel="mw:ExtLink" class="external autonumber" href="//foo.org/bar'baz"></a></p>
5755 <p><a rel="mw:ExtLink" class="external text" href="//foo.org/bar'baz">bang</a></p>
5759 External link containing double-single-quotes in text '' (T6598 sanity check)
5761 Some [http://example.com/ pretty ''italics'' and stuff]!
5763 <p>Some <a rel="nofollow" class="external text" href="http://example.com/">pretty <i>italics</i> and stuff</a>!
5768 External link containing double-single-quotes in text embedded in italics (T6598 sanity check)
5770 ''Some [http://example.com/ pretty ''italics'' and stuff]!''
5772 <p><i>Some </i><a rel="nofollow" class="external text" href="http://example.com/"><i>pretty </i>italics<i> and stuff</i></a><i>!</i>
5776 # Don't add the html/php section since the output is broken and there isn't any reason to spec it
5778 External link containing double-single-quotes with no space separating the url from text in italics
5780 [http://www.musee-picasso.fr/pages/page_id18528_u1l2.htm''La muerte de Casagemas'' (1901) en el sitio de [[Museo Picasso (París)|Museo Picasso]].]
5782 <p><a rel="nofollow" class="external text" href="http://www.musee-picasso.fr/pages/page_id18528_u1l2.htm"><i>La muerte de Casagemas</i> (1901) en el sitio de </a><a href="/index.php?title=Museo_Picasso_(Par%C3%ADs)&action=edit&redlink=1" class="new" title="Museo Picasso (París) (page does not exist)">Museo Picasso</a>.
5785 <p><a rel="mw:ExtLink" class="external text" href="http://www.musee-picasso.fr/pages/page_id18528_u1l2.htm"><i>La muerte de Casagemas</i> (1901) en el sitio de </a><a rel="mw:WikiLink" href="./Museo_Picasso_(París)" title="Museo Picasso (París)">Museo Picasso</a><span>.</span></p>
5789 External link with comments in link text
5791 [http://www.google.com Google <!-- comment -->]
5793 <p><a rel="nofollow" class="external text" href="http://www.google.com">Google </a>
5796 <p><a rel="mw:ExtLink" class="external text" href="http://www.google.com">Google <!-- comment --></a></p>
5800 External link to bare IPv4 address
5802 [http://192.168.0.1 Link]
5804 <p><a rel="nofollow" class="external text" href="http://192.168.0.1">Link</a>
5807 <p><a rel="mw:ExtLink" class="external text" href="http://192.168.0.1">Link</a></p>
5811 URL-encoding in URL functions (single parameter)
5813 {{localurl:Some page|amp=&}}
5815 <p>/index.php?title=Some_page&amp=&
5820 URL-encoding in URL functions (multiple parameters)
5822 {{localurl:Some page|q=?&=&}}
5824 <p>/index.php?title=Some_page&q=?&amp=&
5831 http://example.com/index.php?foozoid%5B%5D=bar
5833 http://example.com/index.php?foozoid[]=bar
5835 <p><a rel="nofollow" class="external free" href="http://example.com/index.php?foozoid%5B%5D=bar">http://example.com/index.php?foozoid%5B%5D=bar</a>
5836 </p><p><a rel="nofollow" class="external free" href="http://example.com/index.php?foozoid%5B%5D=bar">http://example.com/index.php?foozoid%5B%5D=bar</a>
5839 <p><a rel="mw:ExtLink" class="external free" href="http://example.com/index.php?foozoid%5B%5D=bar">http://example.com/index.php?foozoid%5B%5D=bar</a></p>
5841 <p><a rel="mw:ExtLink" class="external free" href="http://example.com/index.php?foozoid%5B%5D=bar" data-parsoid='{"stx":"url","a":{"href":"http://example.com/index.php?foozoid%5B%5D=bar"},"sa":{"href":"http://example.com/index.php?foozoid&#x5B;&#x5D;=bar"}}'>http://example.com/index.php?foozoid%5B%5D=bar</a></p>
5845 IPv6 urls, autolink format (T23261)
5847 http://[2404:130:0:1000::187:2]/index.php
5849 Examples from RFC 2373, section 2.2:
5851 *http://[1080::8:800:200C:417A]/unicast
5852 *http://[FF01::101]/multicast
5853 *http://[::1]/loopback
5854 *http://[::]/unspecified
5855 *http://[::13.1.68.3]/ipv4compat
5856 *http://[::FFFF:129.144.52.38]/ipv4compat
5858 Examples from RFC 2732, section 2:
5860 *http://[FEDC:BA98:7654:3210:FEDC:BA98:7654:3210]:80/index.html
5861 *http://[1080:0:0:0:8:800:200C:417A]/index.html
5862 *http://[3ffe:2a00:100:7031::1]
5863 *http://[1080::8:800:200C:417A]/foo
5864 *http://[::192.9.5.5]/ipng
5865 *http://[::FFFF:129.144.52.38]:80/index.html
5866 *http://[2010:836B:4179::836B:4179]
5868 <p><a rel="nofollow" class="external free" href="http://[2404:130:0:1000::187:2]/index.php">http://[2404:130:0:1000::187:2]/index.php</a>
5869 </p><p>Examples from <a class="external mw-magiclink-rfc" rel="nofollow" href="https://tools.ietf.org/html/rfc2373">RFC 2373</a>, section 2.2:
5871 <ul><li><a rel="nofollow" class="external free" href="http://[1080::8:800:200C:417A]/unicast">http://[1080::8:800:200C:417A]/unicast</a></li>
5872 <li><a rel="nofollow" class="external free" href="http://[FF01::101]/multicast">http://[FF01::101]/multicast</a></li>
5873 <li><a rel="nofollow" class="external free" href="http://[::1]/loopback">http://[::1]/loopback</a></li>
5874 <li><a rel="nofollow" class="external free" href="http://[::]/unspecified">http://[::]/unspecified</a></li>
5875 <li><a rel="nofollow" class="external free" href="http://[::13.1.68.3]/ipv4compat">http://[::13.1.68.3]/ipv4compat</a></li>
5876 <li><a rel="nofollow" class="external free" href="http://[::FFFF:129.144.52.38]/ipv4compat">http://[::FFFF:129.144.52.38]/ipv4compat</a></li></ul>
5877 <p>Examples from <a class="external mw-magiclink-rfc" rel="nofollow" href="https://tools.ietf.org/html/rfc2732">RFC 2732</a>, section 2:
5879 <ul><li><a rel="nofollow" class="external free" href="http://[FEDC:BA98:7654:3210:FEDC:BA98:7654:3210]:80/index.html">http://[FEDC:BA98:7654:3210:FEDC:BA98:7654:3210]:80/index.html</a></li>
5880 <li><a rel="nofollow" class="external free" href="http://[1080:0:0:0:8:800:200C:417A]/index.html">http://[1080:0:0:0:8:800:200C:417A]/index.html</a></li>
5881 <li><a rel="nofollow" class="external free" href="http://[3ffe:2a00:100:7031::1]">http://[3ffe:2a00:100:7031::1]</a></li>
5882 <li><a rel="nofollow" class="external free" href="http://[1080::8:800:200C:417A]/foo">http://[1080::8:800:200C:417A]/foo</a></li>
5883 <li><a rel="nofollow" class="external free" href="http://[::192.9.5.5]/ipng">http://[::192.9.5.5]/ipng</a></li>
5884 <li><a rel="nofollow" class="external free" href="http://[::FFFF:129.144.52.38]:80/index.html">http://[::FFFF:129.144.52.38]:80/index.html</a></li>
5885 <li><a rel="nofollow" class="external free" href="http://[2010:836B:4179::836B:4179]">http://[2010:836B:4179::836B:4179]</a></li></ul>
5888 <p><a rel="mw:ExtLink" class="external free" href="http://[2404:130:0:1000::187:2]/index.php">http://[2404:130:0:1000::187:2]/index.php</a></p>
5890 <p>Examples from <a href="https://tools.ietf.org/html/rfc2373" rel="mw:ExtLink" class="external mw-magiclink">RFC 2373</a>, section 2.2:</p>
5891 <ul><li><a rel="mw:ExtLink" class="external free" href="http://[1080::8:800:200C:417A]/unicast">http://[1080::8:800:200C:417A]/unicast</a></li>
5892 <li><a rel="mw:ExtLink" class="external free" href="http://[FF01::101]/multicast">http://[FF01::101]/multicast</a></li>
5893 <li><a rel="mw:ExtLink" class="external free" href="http://[::1]/loopback">http://[::1]/loopback</a></li>
5894 <li><a rel="mw:ExtLink" class="external free" href="http://[::]/unspecified">http://[::]/unspecified</a></li>
5895 <li><a rel="mw:ExtLink" class="external free" href="http://[::13.1.68.3]/ipv4compat">http://[::13.1.68.3]/ipv4compat</a></li>
5896 <li><a rel="mw:ExtLink" class="external free" href="http://[::FFFF:129.144.52.38]/ipv4compat">http://[::FFFF:129.144.52.38]/ipv4compat</a></li></ul>
5898 <p>Examples from <a href="https://tools.ietf.org/html/rfc2732" rel="mw:ExtLink" class="external mw-magiclink">RFC 2732</a>, section 2:</p>
5899 <ul><li><a rel="mw:ExtLink" class="external free" href="http://[FEDC:BA98:7654:3210:FEDC:BA98:7654:3210]:80/index.html">http://[FEDC:BA98:7654:3210:FEDC:BA98:7654:3210]:80/index.html</a></li>
5900 <li><a rel="mw:ExtLink" class="external free" href="http://[1080:0:0:0:8:800:200C:417A]/index.html">http://[1080:0:0:0:8:800:200C:417A]/index.html</a></li>
5901 <li><a rel="mw:ExtLink" class="external free" href="http://[3ffe:2a00:100:7031::1]">http://[3ffe:2a00:100:7031::1]</a></li>
5902 <li><a rel="mw:ExtLink" class="external free" href="http://[1080::8:800:200C:417A]/foo">http://[1080::8:800:200C:417A]/foo</a></li>
5903 <li><a rel="mw:ExtLink" class="external free" href="http://[::192.9.5.5]/ipng">http://[::192.9.5.5]/ipng</a></li>
5904 <li><a rel="mw:ExtLink" class="external free" href="http://[::FFFF:129.144.52.38]:80/index.html">http://[::FFFF:129.144.52.38]:80/index.html</a></li>
5905 <li><a rel="mw:ExtLink" class="external free" href="http://[2010:836B:4179::836B:4179]">http://[2010:836B:4179::836B:4179]</a></li></ul>
5909 IPv6 urls, bracketed format (T23261)
5911 [http://[2404:130:0:1000::187:2]/index.php test]
5913 Examples from RFC 2373, section 2.2:
5915 *[http://[1080::8:800:200C:417A] unicast]
5916 *[http://[FF01::101] multicast]
5917 *[http://[::1]/ loopback]
5918 *[http://[::] unspecified]
5919 *[http://[::13.1.68.3] ipv4compat]
5920 *[http://[::FFFF:129.144.52.38] ipv4compat]
5922 Examples from RFC 2732, section 2:
5924 *[http://[FEDC:BA98:7654:3210:FEDC:BA98:7654:3210]:80/index.html 1]
5925 *[http://[1080:0:0:0:8:800:200C:417A]/index.html 2]
5926 *[http://[3ffe:2a00:100:7031::1] 3]
5927 *[http://[1080::8:800:200C:417A]/foo 4]
5928 *[http://[::192.9.5.5]/ipng 5]
5929 *[http://[::FFFF:129.144.52.38]:80/index.html 6]
5930 *[http://[2010:836B:4179::836B:4179] 7]
5932 <p><a rel="nofollow" class="external text" href="http://[2404:130:0:1000::187:2]/index.php">test</a>
5933 </p><p>Examples from <a class="external mw-magiclink-rfc" rel="nofollow" href="https://tools.ietf.org/html/rfc2373">RFC 2373</a>, section 2.2:
5935 <ul><li><a rel="nofollow" class="external text" href="http://[1080::8:800:200C:417A]">unicast</a></li>
5936 <li><a rel="nofollow" class="external text" href="http://[FF01::101]">multicast</a></li>
5937 <li><a rel="nofollow" class="external text" href="http://[::1]/">loopback</a></li>
5938 <li><a rel="nofollow" class="external text" href="http://[::]">unspecified</a></li>
5939 <li><a rel="nofollow" class="external text" href="http://[::13.1.68.3]">ipv4compat</a></li>
5940 <li><a rel="nofollow" class="external text" href="http://[::FFFF:129.144.52.38]">ipv4compat</a></li></ul>
5941 <p>Examples from <a class="external mw-magiclink-rfc" rel="nofollow" href="https://tools.ietf.org/html/rfc2732">RFC 2732</a>, section 2:
5943 <ul><li><a rel="nofollow" class="external text" href="http://[FEDC:BA98:7654:3210:FEDC:BA98:7654:3210]:80/index.html">1</a></li>
5944 <li><a rel="nofollow" class="external text" href="http://[1080:0:0:0:8:800:200C:417A]/index.html">2</a></li>
5945 <li><a rel="nofollow" class="external text" href="http://[3ffe:2a00:100:7031::1]">3</a></li>
5946 <li><a rel="nofollow" class="external text" href="http://[1080::8:800:200C:417A]/foo">4</a></li>
5947 <li><a rel="nofollow" class="external text" href="http://[::192.9.5.5]/ipng">5</a></li>
5948 <li><a rel="nofollow" class="external text" href="http://[::FFFF:129.144.52.38]:80/index.html">6</a></li>
5949 <li><a rel="nofollow" class="external text" href="http://[2010:836B:4179::836B:4179]">7</a></li></ul>
5952 <p><a rel="mw:ExtLink" class="external text" href="http://[2404:130:0:1000::187:2]/index.php">test</a></p>
5954 <p>Examples from <a href="https://tools.ietf.org/html/rfc2373" rel="mw:ExtLink" class="external mw-magiclink">RFC 2373</a>, section 2.2:</p>
5955 <ul><li><a rel="mw:ExtLink" class="external text" href="http://[1080::8:800:200C:417A]">unicast</a></li>
5956 <li><a rel="mw:ExtLink" class="external text" href="http://[FF01::101]">multicast</a></li>
5957 <li><a rel="mw:ExtLink" class="external text" href="http://[::1]/">loopback</a></li>
5958 <li><a rel="mw:ExtLink" class="external text" href="http://[::]">unspecified</a></li>
5959 <li><a rel="mw:ExtLink" class="external text" href="http://[::13.1.68.3]">ipv4compat</a></li>
5960 <li><a rel="mw:ExtLink" class="external text" href="http://[::FFFF:129.144.52.38]">ipv4compat</a></li></ul>
5962 <p>Examples from <a href="https://tools.ietf.org/html/rfc2732" rel="mw:ExtLink" class="external mw-magiclink">RFC 2732</a>, section 2:</p>
5963 <ul><li><a rel="mw:ExtLink" class="external text" href="http://[FEDC:BA98:7654:3210:FEDC:BA98:7654:3210]:80/index.html">1</a></li>
5964 <li><a rel="mw:ExtLink" class="external text" href="http://[1080:0:0:0:8:800:200C:417A]/index.html">2</a></li>
5965 <li><a rel="mw:ExtLink" class="external text" href="http://[3ffe:2a00:100:7031::1]">3</a></li>
5966 <li><a rel="mw:ExtLink" class="external text" href="http://[1080::8:800:200C:417A]/foo">4</a></li>
5967 <li><a rel="mw:ExtLink" class="external text" href="http://[::192.9.5.5]/ipng">5</a></li>
5968 <li><a rel="mw:ExtLink" class="external text" href="http://[::FFFF:129.144.52.38]:80/index.html">6</a></li>
5969 <li><a rel="mw:ExtLink" class="external text" href="http://[2010:836B:4179::836B:4179]">7</a></li></ul>
5973 Non-extlinks in brackets
5982 [{{echo|foo}} ''bar'']
5983 [{{echo|foo}}l's] errand
5984 [{{echo|foo}}l's errand]
5986 [url=http://example.com]
5987 [http:// bare protocols don't count]
6000 [url=<a rel="nofollow" class="external free" href="http://example.com">http://example.com</a>]
6001 [http:// bare protocols don't count]
6009 [<span about="#mwt19" typeof="mw:Transclusion" data-mw='{"parts":[{"template":{"target":{"wt":"echo","href":"./Template:Echo"},"params":{"1":{"wt":"foo"}},"i":0}}]}'>foo</span>]
6010 [<span about="#mwt20" typeof="mw:Transclusion" data-mw='{"parts":[{"template":{"target":{"wt":"echo","href":"./Template:Echo"},"params":{"1":{"wt":"foo"}},"i":0}}]}'>foo</span> bar]
6011 [<span about="#mwt21" typeof="mw:Transclusion" data-mw='{"parts":[{"template":{"target":{"wt":"echo","href":"./Template:Echo"},"params":{"1":{"wt":"foo"}},"i":0}}]}'>foo</span> <i>bar</i>]
6012 [<span about="#mwt22" typeof="mw:Transclusion" data-mw='{"parts":[{"template":{"target":{"wt":"echo","href":"./Template:Echo"},"params":{"1":{"wt":"foo"}},"i":0}}]}'>foo</span>l's] errand
6013 [<span about="#mwt23" typeof="mw:Transclusion" data-mw='{"parts":[{"template":{"target":{"wt":"echo","href":"./Template:Echo"},"params":{"1":{"wt":"foo"}},"i":0}}]}'>foo</span>l's errand]
6014 [url=<span about="#mwt24" typeof="mw:Transclusion" data-mw='{"parts":[{"template":{"target":{"wt":"echo","href":"./Template:Echo"},"params":{"1":{"wt":"foo"}},"i":0}}]}'>foo</span>]
6015 [url=<a rel="mw:ExtLink" class="external free" href="http://example.com">http://example.com</a>]
6016 [http:// bare protocols don't count]</p>
6020 Percent encoding in external links
6022 [https://github.com/search?l=&q=ResourceLoader+%40wikimedia Search]
6024 <p><a rel="nofollow" class="external text" href="https://github.com/search?l=&q=ResourceLoader+%40wikimedia">Search</a>
6027 <p><a rel="mw:ExtLink" class="external text" href="https://github.com/search?l=&q=ResourceLoader+%40wikimedia">Search</a></p>
6031 Use url link syntax for links where the content is equal the link target
6035 <p><a rel="nofollow" class="external free" href="http://example.com">http://example.com</a>
6038 <p><a rel="mw:ExtLink" class="external free" href="http://example.com">http://example.com</a></p>
6042 Parenthesis in external links, especially URL links
6046 http://example.com/test)
6048 http://example.com/(test)
6050 http://example.com/((test)
6052 (http://example.com/(test))
6054 (http://example.com/(test)))))
6056 http://example.com/a)b
6058 [http://example.com) foo]
6060 <p><a rel="nofollow" class="external free" href="http://example.com">http://example.com</a>)
6061 </p><p><a rel="nofollow" class="external free" href="http://example.com/test">http://example.com/test</a>)
6062 </p><p><a rel="nofollow" class="external free" href="http://example.com/(test)">http://example.com/(test)</a>
6063 </p><p><a rel="nofollow" class="external free" href="http://example.com/((test)">http://example.com/((test)</a>
6064 </p><p>(<a rel="nofollow" class="external free" href="http://example.com/(test))">http://example.com/(test))</a>
6065 </p><p>(<a rel="nofollow" class="external free" href="http://example.com/(test)))))">http://example.com/(test)))))</a>
6066 </p><p><a rel="nofollow" class="external free" href="http://example.com/a)b">http://example.com/a)b</a>
6067 </p><p><a rel="nofollow" class="external text" href="http://example.com)">foo</a>
6070 <p><a rel="mw:ExtLink" class="external free" href="http://example.com">http://example.com</a>)</p>
6071 <p><a rel="mw:ExtLink" class="external free" href="http://example.com/test">http://example.com/test</a>)</p>
6072 <p><a rel="mw:ExtLink" class="external free" href="http://example.com/(test)">http://example.com/(test)</a></p>
6073 <p><a rel="mw:ExtLink" class="external free" href="http://example.com/((test)">http://example.com/((test)</a></p>
6074 <p>(<a rel="mw:ExtLink" class="external free" href="http://example.com/(test))">http://example.com/(test))</a></p>
6075 <p>(<a rel="mw:ExtLink" class="external free" href="http://example.com/(test)))))">http://example.com/(test)))))</a></p>
6076 <p><a rel="mw:ExtLink" class="external free" href="http://example.com/a)b">http://example.com/a)b</a></p>
6077 <p><a rel="mw:ExtLink" class="external text" href="http://example.com)">foo</a></p>
6081 Parenthesis in external links, w/ transclusion or comment
6083 (http://example.com/{{echo|hi}})
6085 (http://example.com<!-- hi -->)
6087 <p>(<a rel="nofollow" class="external free" href="http://example.com/hi">http://example.com/hi</a>)
6088 </p><p>(<a rel="nofollow" class="external free" href="http://example.com">http://example.com</a>)
6091 <p>(<a typeof="mw:ExpandedAttrs" about="#mwt2" rel="mw:ExtLink" class="external free" href="http://example.com/hi" data-parsoid='{"stx":"url","a":{"href":"http://example.com/hi"},"sa":{"href":"http://example.com/{{echo|hi}}"}}' data-mw='{"attribs":[[{"txt":"href"},{"html":"http://example.com/<span about=\"#mwt1\" typeof=\"mw:Transclusion\" data-parsoid='{\"pi\":[[{\"k\":\"1\"}]],\"dsr\":[20,31,null,null]}' data-mw='{\"parts\":[{\"template\":{\"target\":{\"wt\":\"echo\",\"href\":\"./Template:Echo\"},\"params\":{\"1\":{\"wt\":\"hi\"}},\"i\":0}}]}'>hi</span>"}]]}'>http://example.com/hi</a>)</p>
6093 <p>(<a rel="mw:ExtLink" class="external free" href="http://example.com" data-parsoid='{"stx":"url","a":{"href":"http://example.com"},"sa":{"href":"http://example.com<!-- hi -->"}}'>http://example.com</a>)</p>
6097 Serialize <a> tags with invalid link targets as plain text
6099 parsoid={ "modes": ["html2wt"], "suppressErrors": true }
6101 <a rel="mw:WikiLink" href="[[foo]]">text</a>
6102 <a rel="mw:WikiLink" href="[[foo]]">*text</a>
6103 <a rel="mw:WikiLink" href="[[foo]]">[[foo]]</a>
6104 <a rel="mw:WikiLink" href="[[foo]]">*a [[foo]]</a>
6107 <nowiki>*</nowiki>text
6108 <nowiki>[[foo]]</nowiki>
6109 <nowiki>*</nowiki>a <nowiki>[[foo]]</nowiki>
6113 mw:ExtLink -vs- mw:WikiLink (T94723)
6117 <a rel="mw:WikiLink" href="./Foo" title="Foo" data-parsoid='{"stx":"piped","a":{"href":"./Foo"},"sa":{"href":"Foo"}}'>Bar</a>
6118 <a rel="mw:WikiLink" href="./Foo" title="Foo">Bar</a>
6119 <a rel="mw:WikiLink" href="http://en.wikipedia.org/wiki/Foo" title="Foo">Bar</a>
6120 <a rel="mw:ExtLink" href="http://en.wikipedia.org/wiki/Foo" title="Foo">Bar</a>
6122 <a rel="mw:ExtLink" href="http://en.wikipedia.org/wiki/European_Robin">European Robin</a>
6123 <a rel="mw:WikiLink" href="http://en.wikipedia.org/wiki/European_Robin">European Robin</a>
6131 [[:en:European_Robin|European Robin]]
6132 [[:en:European_Robin|European Robin]]
6136 mw:ExtLink linking to a interwiki URL can be round-tripped losslessly (T94723)
6140 [http://en.wikipedia.org/wiki/European_Robin European Robin]
6142 THIS SECTION IS NOT USED (but Parsoid won't run the test without it)
6153 Normal text. '''Bold text.''' Normal text. ''Italic text.''
6155 Normal text. '''''Bold italic text.''''' Normal text.
6157 <p>Normal text. <b>Bold text.</b> Normal text. <i>Italic text.</i>
6158 </p><p>Normal text. <i><b>Bold italic text.</b></i> Normal text.
6163 Quotes wrapping HTML table
6165 '''<table><tr><td>hi</td></tr></table>'''
6167 <b><table><tbody><tr><td>hi</td></tr></tbody></table></b>
6169 <b><table data-parsoid='{"stx":"html"}'><tbody><tr data-parsoid='{"stx":"html"}'><td data-parsoid='{"stx":"html"}'>hi</td></tr></tbody></table></b>
6172 # Parsoid inserts an empty bold tag pair at the end of the line, that the PHP
6173 # parser strips. The wikitext contains just the first half of the bold
6176 Unclosed and unmatched quotes
6178 '''''Bold italic text '''with bold deactivated''' in between.'''''
6180 '''''Bold italic text ''with italic deactivated'' in between.'''''
6184 ..spanning two paragraphs (should not work).'''
6186 '''Bold tag left open
6188 ''Italic tag left open
6192 <!-- Unmatching number of opening, closing tags: -->
6193 '''This year''''s election ''should'' beat '''last year''''s.
6195 ''Tom'''s car is bigger than ''Susan'''s.
6197 Plain ''italic'''s plain
6199 <p><i><b>Bold italic text </b>with bold deactivated<b> in between.</b></i>
6200 </p><p><b><i>Bold italic text </i>with italic deactivated<i> in between.</i></b>
6201 </p><p><b>Bold text..</b>
6202 </p><p>..spanning two paragraphs (should not work).
6203 </p><p><b>Bold tag left open</b>
6204 </p><p><i>Italic tag left open</i>
6206 </p><p><b>This year'</b>s election <i>should</i> beat <b>last year'</b>s.
6207 </p><p><i>Tom<b>s car is bigger than </b></i><b>Susan</b>s.
6208 </p><p>Plain <i>italic'</i>s plain
6211 <p><i><b>Bold italic text </b>with bold deactivated<b> in between.</b></i>
6212 </p><p><b><i>Bold italic text </i>with italic deactivated<i> in between.</i></b>
6213 </p><p><b>Bold text..</b>
6214 </p><p>..spanning two paragraphs (should not work).<b></b>
6215 </p><p><b>Bold tag left open</b>
6216 </p><p><i>Italic tag left open</i>
6219 <!-- Unmatching number of opening, closing tags: -->
6220 <p><b>This year'</b>s election <i>should</i> beat <b>last year'</b>s.
6221 </p><p><i>Tom<b>s car is bigger than </b></i><b>Susan</b>s.
6222 </p><p>Plain <i>italic'</i>s plain
6229 ### some content taken from http://meta.wikimedia.org/wiki/MediaWiki_User%27s_Guide:_Using_tables
6232 # This should not produce <table></table> as <table><tr><td></td></tr></table>
6233 # is the bare minimum required by the spec, see:
6234 # https://www.w3.org/TR/xhtml-modularization/dtd_module_defs.html#a_module_Basic_Tables
6235 # Parsoid team replies: empty table tags are legal in HTML5
6237 A table with no data.
6250 A table with stray table end tags on start tag line (wt2html)
6254 {|style="color: red;"|}
6256 {|style="color: red;" |}
6260 {|style="color: red;"|} id="foo"
6264 {|style="color: red;" |} id="foo"
6268 <table style="color: red;"></table>
6270 <table style="color: red;">
6276 <table style="color: red;" id="foo">
6282 <table style="color: red;" id="foo">
6291 A table with no data (take 2)
6299 # A table with nothing but a caption is invalid XHTML, we might want to render
6300 # this as <p>caption</p>
6301 # Parsoid team replies: table with only a caption is legal in HTML5
6303 A table with nothing but a caption
6311 </caption><tr><td></td></tr></table>
6314 <table><caption>caption</caption></table>
6318 A table with caption with default-spaced attributes and a table row
6321 |+ style="color: red;" |caption1
6327 <caption style="color: red;">caption1
6336 A table with captions with non-default spaced attributes and a table row
6339 |+style="color: red;"|caption2
6340 |+ style="color: red;"|caption3
6346 <caption style="color: red;">caption2
6348 <caption style="color: red;">caption3
6357 Table td-cell syntax variations
6362 |style='color:red;'|baz
6363 |style='color:red;'||baz
6370 <td>foo bar foo</td>
6373 <td style="color:red;">baz
6375 <td>style='color:red;'</td>
6403 Simple table but with multiple dashes for row wikitext
6422 Multiplication table
6424 {| border="1" cellpadding="2"
6425 |+Multiplication table
6445 <table border="1" cellpadding="2">
6446 <caption>Multiplication table
6493 Accept "||" in table headings
6508 Accept "!!" in table data
6522 <tbody><tr data-parsoid='{"autoInsertedEnd":true,"autoInsertedStart":true}'><td data-parsoid='{"autoInsertedEnd":true}'> Foo!! </td><td data-parsoid='{"stx":"row","autoInsertedEnd":true}'></td></tr>
6527 Accept "||" in indented table headings
6537 </th></tr></table></dd></dl>
6542 Accept "!!" in templates
6556 <tbody><tr><th typeof="mw:Transclusion" about="#mwt1" data-parsoid='{"autoInsertedEnd":true,"pi":[[{"k":"1"}]]}' data-mw='{"parts":["!a ",{"template":{"target":{"wt":"echo","href":"./Template:Echo"},"params":{"1":{"wt":"b!!c"}},"i":0}}]}'>a b</th><th about="#mwt1">c</th></tr>
6560 Accept "!!" in table headings after newline
6577 <p>b!!c</p></th></tr>
6582 Accept "!!" in table data of mixed wikitext / html syntax
6586 <tr><td>b!!c</td></tr>
6592 </th></tr><tr><td>b!!c</td></tr>
6596 <tbody><tr><th>a</th></tr>
6597 <tr data-parsoid='{"stx":"html"}'><td data-parsoid='{"stx":"html"}'>b!!c</td></tr>
6602 Accept empty attributes in td/th cells (td/th cells starting with leading ||)
6619 Accept "| !" at start of line in tables (ignore !-attribute)
6623 |!style="color:red"|bar
6635 Allow +/- in 2nd and later cells in a row, in 1st cell when td-attrs are present, or in 1st cell when there is a space between "|" and +/-
6639 |style='color:red;'|+1
6640 |style='color:blue;'|-1
6652 <td style="color:red;">+1
6654 <td style="color:blue;">-1
6678 |rowspan=2|Cell 2, row 1 (and 2)
6689 <td rowspan="2">Cell 2, row 1 (and 2)
6707 {| bgcolor=#ABCDEF border=2
6712 |the original table again
6720 <table bgcolor="#ABCDEF" border="2">
6728 <td>the original table again
6734 Invalid attributes in table cell (T3830)
6748 Table cell attributes: Pipes protected by nowikis should be treated as a plain character
6752 |title="foo<nowiki>|</nowiki>" |bar
6753 |title="foo<nowiki>|</nowiki>" bar
6760 <td title="foo|">bar
6762 <td>title="foo|" bar
6767 <tbody><tr><td title="foo">bar</td>
6768 <td title="foo|" data-parsoid='{"a":{"title":"foo|"},"sa":{"title":"foo<nowiki>|</nowiki>"},"autoInsertedEnd":true}'>bar</td>
6769 <td> title="foo<span typeof="mw:Nowiki">|</span>" bar</td></tr>
6773 # See: http://lists.wikimedia.org/mailman/htdig/wikitech-l/2006-April/022293.html
6774 # N.B. The "|}" to close the table is missing from the input, so parsoid's
6775 # *2wt modes will fail.
6777 Table security: embedded pipes
6779 parsoid=wt2html,html2html
6782 | |[ftp://|x||]" onmouseover="alert(document.cookie)">test
6786 <td>[<a rel="nofollow" class="external free" href="ftp://%7Cx">ftp://%7Cx</a></td>
6787 <td>]" onmouseover="alert(document.cookie)">test
6795 <td data-parsoid='{"startTagSrc":"| ","attrSepSrc":"|","autoInsertedEnd":true}'>[<a rel="mw:ExtLink" class="external free" href="ftp://%7Cx" data-parsoid='{"stx":"url","a":{"href":"ftp://%7Cx"},"sa":{"href":"ftp://|x"}}'>ftp://%7Cx</a></td><td data-parsoid='{"stx":"row","autoInsertedEnd":true}'>]" onmouseover="alert(document.cookie)">test</td></tr></tbody></table>
6799 Element attributes with double ! should not be broken up by <th>
6802 !hi <div class="!!">ha</div> ho
6807 <th>hi <div class="!!">ha</div> ho
6812 <tbody><tr><th>hi <div class="!!" data-parsoid='{"stx":"html"}'>ha</div> ho</th></tr>
6817 ! and || in element attributes should not be parsed as <th>/<td>
6820 |<div style="color: red !important;" data-contrived="put this here ||">hi</div>
6825 <td><div style="color: red !important;" data-contrived="put this here ||">hi</div>
6830 <tbody><tr><td><div style="color: red !important;" data-contrived="put this here ||" data-parsoid='{"stx":"html"}'>hi</div></td></tr>
6834 # FIXME: The output seems broken. Filed as T110268.
6836 ! and || in td attributes should not be parsed as <th>/<td>
6841 |style="color: red !important;" data-contrived="put this here ||"|foo
6846 <td>style="color: red !important;" data-contrived="put this here</td>
6852 <tbody><tr><td>style="color: red !important;" data-contrived="put this here</td><td data-parsoid='{"stx":"row","a":{"\"":null},"sa":{"\"":""},"autoInsertedEnd":true}'>foo</td></tr>
6857 Break on | in element attribute in template
6859 parsoid=wt2html,html2html
6861 {{echo|1=<div class="hi|ho">ha</div>}}
6863 <p>ho">ha</div>
6866 <p about="#mwt1" typeof="mw:Transclusion" data-mw='{"parts":[{"template":{"target":{"wt":"echo","href":"./Template:Echo"},"params":{"1":{"wt":"ho\">ha</div>"}},"i":0}}]}'>ho">ha</p>
6870 Break on | in element attribute name in template
6872 {{echo|<div cla|ss="hiho">ha</div>}}
6874 <p about="#mwt1" typeof="mw:Transclusion" data-parsoid='{"pi":[[{"k":"1"},{"k":"ss","named":true}]]}' data-mw='{"parts":[{"template":{"target":{"wt":"echo","href":"./Template:Echo"},"params":{"1":{"wt":"<div cla"},"ss":{"wt":"\"hiho\">ha</div>"}},"i":0}}]}'><div cla</p>
6878 Don't break on | in extension attribute in template
6880 {{echo|<ref name="hi|ho">ha</ref>}}
6884 <p><sup about="#mwt2" class="mw-ref" id="cite_ref-hi|ho_1-0" rel="dc:references" typeof="mw:Transclusion mw:Extension/ref" data-mw='{"parts":[{"template":{"target":{"wt":"echo","href":"./Template:Echo"},"params":{"1":{"wt":"<ref name=\"hi|ho\">ha</ref>"}},"i":0}}]}'><a href="./Main_Page#cite_note-hi|ho-1" style="counter-reset: mw-Ref 1;"><span class="mw-reflink-text">[1]</span></a></sup></p>
6886 <ol class="mw-references references" typeof="mw:Extension/references" about="#mwt5" data-mw='{"name":"references","attrs":{}}'><li about="#cite_note-hi|ho-1" id="cite_note-hi|ho-1"><a href="./Main_Page#cite_ref-hi|ho_1-0" rel="mw:referencedBy"><span class="mw-linkback-text">↑ </span></a> <span id="mw-reference-text-cite_note-hi|ho-1" class="mw-reference-text">ha</span></li></ol>
6889 ## We don't support roundtripping of these attributes in Parsoid.
6890 ## Selective serialization takes care of preventing dirty diffs.
6891 ## But, on edits, we dirty-diff the invalid attribute text.
6893 Invalid text in table attributes should be discarded
6897 {| <span>boo</span> style='border:1px solid black'
6898 | <span>boo</span> style='color:blue' |1
6899 |<span>boo</span> style='color:blue'|2
6902 <table style="border:1px solid black">
6904 <td style="color:blue">1
6906 <td style="color:blue">2
6910 <table style="border:1px solid black">
6912 <td style="color:blue">1</td>
6913 <td style="color:blue">2</td>
6919 Invalid text in table attributes should be preserved by selective serializer
6922 "modes": ["selser"],
6924 ["td:first-child", "text", "abc"],
6925 ["td + td", "text", "xyz"]
6929 {| <span>boo</span> style='border:1px solid black'
6930 | <span>boo</span> style='color:blue' | 1
6931 |<span>boo</span> style='color:blue'| 2
6934 {| <span>boo</span> style='border:1px solid black'
6935 | <span>boo</span> style='color:blue' | abc
6936 |<span>boo</span> style='color:blue'| xyz
6941 1. Template-generated table cell attributes and cell content
6946 || {{table_attribs_5}}
6947 | <!--foo--> <!--bar--> <!--baz--> {{table_attribs}}
6948 |align=center {{table_attribs}}
6949 | <!--foo--> align=center <!--bar--> {{table_attribs}}
6954 <td style="color:red;">Foo
6956 <td style="color:red;">Foo
6958 <td>style="color:red;"</td>
6961 <td style="color:red;">Foo
6963 <td align="center" style="color:red;">Foo
6965 <td align="center" style="color:red;">Foo
6971 2. Template-generated table cell attributes and cell content
6974 |{{table_attribs_2}}
6979 <td style="color:red;">Foo
6987 <tbody><tr><td about="#mwt1" typeof="mw:Transclusion" style="color:red;" data-mw='{"parts":["|",{"template":{"target":{"wt":"table_attribs_2","href":"./Template:Table_attribs_2"},"params":{},"i":0}}]}'>Foo</td>
6988 <td about="#mwt1">Bar</td><td about="#mwt1">Baz</td></tr>
6993 3. Template-generated table cell attributes and cell content
6996 !align=center {{table_header_cells}}
6998 |align=center {{table_cells}}
7003 <th align="center" style="color:red;">Foo</th>
7004 <th style="color:red;"><i>Bar</i></th>
7005 <th style="color:brown;"><i>Foo</i> and Baz
7008 <td align="center" style="color:red;">Foo</td>
7009 <td style="color:red;"><i>Bar</i></td>
7010 <td style="color:brown;"><i>Foo</i> and Baz
7015 <tbody><tr><th align="center" style="color:red;" typeof="mw:Transclusion" about="#mwt1" data-mw='{"parts":["!align=center ",{"template":{"target":{"wt":"table_header_cells","href":"./Template:Table_header_cells"},"params":{},"i":0}}]}'>Foo</th><th about="#mwt1" style="color:red;"><i about="#mwt1">Bar</i></th><th about="#mwt1" style="color:brown;"><i about="#mwt1">Foo</i> and Baz</th></tr><tr>
7016 <td align="center" style="color:red;" typeof="mw:Transclusion" about="#mwt1" data-mw='{"parts":["|align=center ",{"template":{"target":{"wt":"table_cells","href":"./Template:Table_cells"},"params":{},"i":0}}]}'>Foo</td><td about="#mwt1" style="color:red;"><i about="#mwt1">Bar</i></td><td about="#mwt1" style="color:brown;"><i about="#mwt1">Foo</i> and Baz</td></tr>
7021 4. Template-generated table cell attributes and cell content inside a templated table
7024 !align=center {{table_header_cells}}
7026 |align=center {{table_cells}}
7031 <th align="center" style="color:red;">Foo</th>
7032 <th style="color:red;"><i>Bar</i></th>
7033 <th style="color:brown;"><i>Foo</i> and Baz
7036 <td align="center" style="color:red;">Foo</td>
7037 <td style="color:red;"><i>Bar</i></td>
7038 <td style="color:brown;"><i>Foo</i> and Baz
7042 <table about="#mwt1" typeof="mw:Transclusion" data-parsoid='{"pi":[[],[],[],[]]}' data-mw='{"parts":[{"template":{"target":{"wt":"tbl-start","href":"./Template:Tbl-start"},"params":{},"i":0}},"\n!align=center ",{"template":{"target":{"wt":"table_header_cells","href":"./Template:Table_header_cells"},"params":{},"i":1}},"\n|-\n|align=center ",{"template":{"target":{"wt":"table_cells","href":"./Template:Table_cells"},"params":{},"i":2}},"\n",{"template":{"target":{"wt":"tbl-end","href":"./Template:Tbl-end"},"params":{},"i":3}}]}'>
7043 <tbody><tr><th align="center" style="color:red;">Foo</th><th style="color:red;"><i>Bar</i></th><th style="color:brown;"><i>Foo</i> and Baz</th></tr>
7045 <td align="center" style="color:red;">Foo</td><td style="color:red;"><i>Bar</i></td><td style="color:brown;"><i>Foo</i> and Baz</td></tr>
7049 ## Edge case fix to prevent future regressions
7051 T107652: <ref>s in templates that also generate table cell attributes should be rendered properly
7054 |{{table_attribs_7}}
7059 <tbody><tr><td style="background:#f9f9f9;" typeof="mw:Transclusion" about="#mwt1" data-mw='{"parts":["|",{"template":{"target":{"wt":"table_attribs_7","href":"./Template:Table_attribs_7"},"params":{},"i":0}}]}'>Foo<sup class="mw-ref" id="cite_ref-1" rel="dc:references" typeof="mw:Extension/ref" data-mw='{"name":"ref","attrs":{},"body":{"id":"mw-reference-text-cite_note-1"}}'><a href="./Main_Page#cite_note-1" style="counter-reset: mw-Ref 1;"><span class="mw-reflink-text">[1]</span></a></s></td></tr>
7061 <ol class="mw-references references" typeof="mw:Extension/references" about="#mwt5" data-mw='{"name":"references","attrs":{}}'><li about="#cite_note-1" id="cite_note-1"><a href="./Main_Page#cite_ref-1" rel="mw:referencedBy"><span class="mw-linkback-text">↑ </span></a> <span id="mw-reference-text-cite_note-1" class="mw-reference-text" data-parsoid="{}">foo</span></li></ol>
7065 Table with row followed by newlines and table heading
7067 parsoid=wt2html,html2html
7085 Table with empty line following the start tag
7087 parsoid=wt2html,html2html
7105 Table attributes with empty value
7107 parsoid=wt2html,html2html
7120 <tbody><tr><td style="">hello</td></tr>
7125 Wikitext table with a lot of comments
7148 Wikitext table comments represented in parsoid dom
7150 {|<!--c1--><!--c2-->
7159 </td></tr></tbody></table>
7161 <table><!--c1--><!--c2-->
7162 <tbody><tr data-parsoid='{"startTagSrc":"|-","autoInsertedEnd":true}'><!--c3-->
7163 <td data-parsoid='{"autoInsertedEnd":true}'>x</td></tr>
7168 Wikitext table with double-line table cell
7185 Table cell with a single comment
7202 Table-cell after a comment-only-empty-line
7219 <tbody><tr data-parsoid='{"autoInsertedEnd":true,"autoInsertedStart":true}'><td data-parsoid='{"autoInsertedEnd":true}'>a</td>
7221 <!--c2--><td data-parsoid='{"autoInsertedEnd":true}'>b</td></tr>
7227 Build table with {{!}}
7229 {{{!}} class="wikitable"
7232 {{!}}- style="color:red;"
7233 {{!}}data{{!}}{{!}} style="color:red;" {{!}}second data
7236 <table class="wikitable">
7242 <tr style="color:red;">
7244 <td style="color:red;">second data
7250 Build table with pipe as data
7252 {| class="wikitable"
7255 |- style="color:red;"
7256 |data|| style="color:red;" |second data
7258 | style="color:red;" |data with | || style="color:red;" | second data with |
7260 ||data with | |||second data with |
7263 <table class="wikitable">
7269 <tr style="color:red;">
7271 <td style="color:red;">second data
7274 <td style="color:red;">data with |</td>
7275 <td style="color:red;">second data with |
7278 <td>data with |</td>
7279 <td>second data with |
7285 Build table with wikilink
7287 {| class="wikitable"
7288 !header||second header
7289 |- style="color:red;"
7290 |data [[Main Page|linktext]]||second data [[Main Page|linktext]]
7292 |data||second data [[Main Page|link|text with pipe]]
7295 <table class="wikitable">
7300 <tr style="color:red;">
7301 <td>data <a href="/wiki/Main_Page" title="Main Page">linktext</a></td>
7302 <td>second data <a href="/wiki/Main_Page" title="Main Page">linktext</a>
7306 <td>second data <a href="/wiki/Main_Page" title="Main Page">link|text with pipe</a>
7311 # The expected HTML structure in this test is debatable. The PHP parser does
7312 # not parse this kind of table at all. The main focus for Parsoid is on
7313 # round-tripping, so this output is ok for now. TODO: revisit!
7315 Wikitext table with html-syntax row
7325 <td>foo</td></tr></tbody></table>
7328 ## Remex doesn't account for fostered content.
7330 Fostered content in tables: Plain text
7350 <p data-parsoid='{"fostered":true,"autoInsertedEnd":true,"autoInsertedStart":true}'>
7353 <tbody><tr class="mw-empty-elt" data-parsoid='{"startTagSrc":"|-"}'></tr></tbody></table>
7357 Fostered content in tables: Lists
7359 parsoid=wt2html,html2html
7372 <ul><li>a</li></ul><table>
7377 <ul data-parsoid='{"fostered":true,"autoInsertedEnd":true}'><li>a</li></ul><table>
7378 <tbody><tr data-parsoid='{"startTagSrc":"|-","autoInsertedEnd":true}'>
7380 </tr></tbody></table>
7384 Template generated table cell with attributes
7388 {{table_attribs_4}} ||a||b
7394 <td style="background-color:#DC241f;" width="10px"></td>
7397 </td></tr></tbody></table>
7400 <tbody><tr data-parsoid='{"startTagSrc":"|-","autoInsertedEnd":true}'>
7401 <td style="background-color:#DC241f;" width="10px" about="#mwt1" typeof="mw:Transclusion" data-parsoid='{"autoInsertedEnd":true,"pi":[[]]}' data-mw='{"parts":[{"template":{"target":{"wt":"table_attribs_4","href":"./Template:Table_attribs_4"},"params":{},"i":0}}," ||a||b"]}'></td><td about="#mwt1">a</td><td about="#mwt1">b</td></tr>
7405 Parsoid: Round-trip tables directly followed by content (T53219)
7407 parsoid=wt2html,wt2wt
7420 </td></tr></tbody></table><p> bar
7424 </td></tr></tbody></table><p><b>quux</b>
7429 Parsoid: Default to a newline after tables in new content (T53219)
7434 <tr><td>foo</td></tr></tbody></table> bar
7436 <tr><td>baz</td></tr></tbody></table><b>quux</b>
7441 <nowiki> </nowiki>bar
7449 Parsoid: Row-syntax table headings followed by comment & table cells
7451 parsoid=wt2html,wt2wt
7455 <!-- foo --> ||baz||quux
7469 <tbody><tr><th>foo</th><th>bar
7470 <!-- foo --></th><td> baz </td><td>quux</td></tr>
7475 Parsoid: Recover better from broken table attributes
7489 </td></tr></tbody></table>
7494 <p>foo</p></td></tr>
7499 Tables: Digest broken attributes on table and tr tag
7510 <tr class='mw-empty-elt'></tr>
7511 <tr class='mw-empty-elt'></tr>
7516 Table with missing opening <tr> tag
7518 parsoid=wt2html,wt2wt
7526 <tbody><tr><td>foo</td>
7531 # T137406: Whitespace in the HTML
7533 1. Generate correct wikitext for tables with thead/tbody/tfoot
7538 <caption>Test</caption>
7600 </td></tr></tbody></table>
7603 # T137406: No whitespace in the HTML
7605 2. Generate correct wikitext for tables with thead/tbody/tfoot
7609 <table><thead><tr><th>heading</th></tr></thead><tbody><tr><td>foo</td></tr></tbody></table>
7619 Wikitext tables can be nested inside HTML tables
7623 <table data-parsoid='{"stx":"html"}'>
7626 <tr><td>foo</td></tr>
7644 Plain link, capitalized
7648 <p><a href="/wiki/Main_Page" title="Main Page">Main Page</a>
7653 Plain link, uncapitalized
7657 <p><a href="/wiki/Main_Page" title="Main Page">main Page</a>
7664 [[Main Page|The Main Page]]
7666 <p><a href="/wiki/Main_Page" title="Main Page">The Main Page</a>
7671 Piped link with comment in link text
7673 [[Main Page|The Main<!--front--> Page]]
7675 <p><a href="/wiki/Main_Page" title="Main Page">The Main Page</a>
7680 Piped link with multiple pipe characters in link text
7682 [[Main Page||The|Main|Page|]]
7684 <p><a href="/wiki/Main_Page" title="Main Page">|The|Main|Page|</a>
7687 <p><a rel="mw:WikiLink" href="./Main_Page" title="Main Page">|The|Main|Page|</a></p>
7691 Piped link with no link text
7693 [[Thomas Bek (bishop of St David's)|]]
7695 <p>[[Thomas Bek (bishop of St David's)|]]
7698 <p>[[Thomas Bek (bishop of St David's)|]]</p>
7702 Piped link with empty link text
7704 [[Main Page|<nowiki/>]] - empty nowiki
7705 [[Main Page| ]] - empty space
7706 [[Main Page| ]] - empty non breaking space
7708 <p><a href="/wiki/Main_Page" title="Main Page"></a> - empty nowiki
7709 <a href="/wiki/Main_Page" title="Main Page"> </a> - empty space
7710 <a href="/wiki/Main_Page" title="Main Page"> </a> - empty non breaking space
7713 <p><a rel="mw:WikiLink" href="./Main_Page" title="Main Page"><span typeof="mw:Nowiki"></span></a> - empty nowiki
7714 <a rel="mw:WikiLink" href="./Main_Page" title="Main Page"> </a> - empty space
7715 <a rel="mw:WikiLink" href="./Main_Page" title="Main Page"><span typeof="mw:Entity" data-parsoid='{"src":"&nbsp;","srcContent":" "}'> </span></a> - empty non breaking space</p>
7723 <p><a href="/index.php?title=Zigzagzogzagzig&action=edit&redlink=1" class="new" title="Zigzagzogzagzig (page does not exist)">Zigzagzogzagzig</a>
7728 Broken link with fragment
7730 [[Zigzagzogzagzig#zug]]
7732 <p><a href="/index.php?title=Zigzagzogzagzig&action=edit&redlink=1" class="new" title="Zigzagzogzagzig (page does not exist)">Zigzagzogzagzig#zug</a>
7737 Special page link with fragment
7739 [[Special:Version#anchor]]
7741 <p><a href="/wiki/Special:Version#anchor" title="Special:Version">Special:Version#anchor</a>
7746 Nonexistent special page link with fragment
7748 [[Special:ThisNameWillHopefullyNeverBeUsed#anchor]]
7750 <p><a href="/wiki/Special:ThisNameWillHopefullyNeverBeUsed" class="new" title="Special:ThisNameWillHopefullyNeverBeUsed (page does not exist)">Special:ThisNameWillHopefullyNeverBeUsed#anchor</a>
7757 xxx[[main Page]], xxx[[Main Page]], Xxx[[main Page]] XXX[[main Page]], XXX[[Main Page]]
7759 <p>xxx<a href="/wiki/Main_Page" title="Main Page">main Page</a>, xxx<a href="/wiki/Main_Page" title="Main Page">Main Page</a>, Xxx<a href="/wiki/Main_Page" title="Main Page">main Page</a> XXX<a href="/wiki/Main_Page" title="Main Page">main Page</a>, XXX<a href="/wiki/Main_Page" title="Main Page">Main Page</a>
7766 [[Main Page]]xxx, [[Main Page]]XXX, [[Main Page]]!!!
7768 <p><a href="/wiki/Main_Page" title="Main Page">Main Pagexxx</a>, <a href="/wiki/Main_Page" title="Main Page">Main Page</a>XXX, <a href="/wiki/Main_Page" title="Main Page">Main Page</a>!!!
7779 T45661: Piped links with identical prefixes
7781 [[prefixed article|prefixed articles with spaces]]
7783 [[prefixed article|prefixed articlesaoeu]]
7785 [[Main Page|Main Page test]]
7787 <p><a href="/wiki/Prefixed_article" title="Prefixed article">prefixed articles with spaces</a>
7788 </p><p><a href="/wiki/Prefixed_article" title="Prefixed article">prefixed articlesaoeu</a>
7789 </p><p><a href="/wiki/Main_Page" title="Main Page">Main Page test</a>
7795 Link with HTML entity in suffix / tail
7797 [[Main Page]]", [[Main Page]]a
7799 <p><a href="/wiki/Main_Page" title="Main Page">Main Page</a>", <a href="/wiki/Main_Page" title="Main Page">Main Page</a>a
7802 <p><a rel="mw:WikiLink" href="./Main_Page" title="Main Page">Main Page</a><span typeof="mw:Entity" data-parsoid='{"src":"&quot;","srcContent":"\""}'>"</span>, <a rel="mw:WikiLink" href="./Main_Page" title="Main Page">Main Page</a><span typeof="mw:Entity" data-parsoid='{"src":"&#97;","srcContent":"a"}'>a</span></p>
7806 Link with 3 brackets
7817 Link with 4 brackets
7821 <p>[[<a href="/wiki/Main_Page" title="Main Page">Main Page</a>]]
7826 Piped link with 3 brackets
7828 [[[main page|the main page]]]
7830 <p>[[[main page|the main page]]]
7835 Piped link with extlink-like text
7838 [[Main Page|This is a [bar]]]
7841 <p><a href="/wiki/Main_Page" title="Main Page">[bar]</a>
7842 <a href="/wiki/Main_Page" title="Main Page">This is a [bar]</a>
7843 <a href="/wiki/Main_Page" title="Main Page">[bar</a>
7846 <p><a rel="mw:WikiLink" href="./Main_Page" title="Main Page" data-parsoid='{"stx":"piped"}'>[bar]</a>
7847 <a rel="mw:WikiLink" href="./Main_Page" title="Main Page" data-parsoid='{"stx":"piped"}'>This is a [bar]</a>
7848 <a rel="mw:WikiLink" href="./Main_Page" title="Main Page" data-parsoid='{"stx":"piped"}'>[bar</a></p>
7852 Link with multiple pipes
7854 [[Main Page|The|Main|Page]]
7856 <p><a href="/wiki/Main_Page" title="Main Page">The|Main|Page</a>
7861 Anchor containing a #. (T65430)
7863 wgFragmentMode=[ 'html5', 'legacy' ]
7865 [[Main Page#And#Link]]
7867 <p><a href="/wiki/Main_Page#And#Link" title="Main Page">Main Page#And#Link</a>
7870 <p><a rel="mw:WikiLink" href="./Main_Page#And#Link" title="Main Page" data-parsoid='{"stx":"simple","a":{"href":"./Main_Page#And#Link"},"sa":{"href":"Main Page#And#Link"}}'>Main Page#And#Link</a></p>
7876 [[Talk:Parser testing]], [[Meta:Disclaimers]]
7878 <p><a href="/index.php?title=Talk:Parser_testing&action=edit&redlink=1" class="new" title="Talk:Parser testing (page does not exist)">Talk:Parser testing</a>, <a href="/index.php?title=Meta:Disclaimers&action=edit&redlink=1" class="new" title="Meta:Disclaimers (page does not exist)">Meta:Disclaimers</a>
7883 Link with space in namespace
7885 [[User talk:Foo bar]]
7887 <p><a href="/index.php?title=User_talk:Foo_bar&action=edit&redlink=1" class="new" title="User talk:Foo bar (page does not exist)">User talk:Foo bar</a>
7892 MemoryAlpha:AlphaTest
7894 This is an article in the MemoryAlpha namespace
7895 (which shadows the memoryalpha interwiki link).
7899 Namespace takes precedence over interwiki link (T53680)
7901 [[MemoryAlpha:AlphaTest]]
7903 <p><a href="/wiki/MemoryAlpha:AlphaTest" title="MemoryAlpha:AlphaTest">MemoryAlpha:AlphaTest</a>
7907 # The previous test doesn't work correctly in html2*, due to not recognizing the
7908 # link as an internal one. This one checks for the correct behavior.
7910 Link to namespace preferred over interwiki with correct rel attribute
7912 parsoid=html2wt,html2html
7914 <p><a rel="mw:WikiLink" href="./MemoryAlpha:AlphaTest" title="MemoryAlpha:AlphaTest">MemoryAlpha:AlphaTest</a></p>
7916 [[MemoryAlpha:AlphaTest]]
7920 Piped link to namespace
7922 [[Meta:Disclaimers|The disclaimers]]
7924 <p><a href="/index.php?title=Meta:Disclaimers&action=edit&redlink=1" class="new" title="Meta:Disclaimers (page does not exist)">The disclaimers</a>
7931 [[Usually caused by a typo (oops}]]
7933 <p>[[Usually caused by a typo (oops}]]
7940 Just a test of an article title containing a percent.
7944 Link containing % (not as a hex sequence)
7947 [[7% Solution|7%25 Solution]]
7949 <p><a href="/wiki/7%25_Solution" title="7% Solution">7% Solution</a>
7950 <a href="/wiki/7%25_Solution" title="7% Solution">7%25 Solution</a>
7953 <p><a rel="mw:WikiLink" href="./7%25_Solution" title="7% Solution">7% Solution</a>
7954 <a rel="mw:WikiLink" href="./7%25_Solution" title="7% Solution">7%25 Solution</a></p>
7957 # note that the parsoid HTML is identical to the previous test output,
7958 # so the previous test ensures that the html2wt mode will generate the
7959 # "not as a hex sequence" wikitext.
7961 Link containing % as a single hex sequence interpreted to char
7963 parsoid=wt2wt,wt2html,html2html
7966 [[7%25 Solution|7%25 Solution]]
7968 <p><a href="/wiki/7%25_Solution" title="7% Solution">7% Solution</a>
7969 <a href="/wiki/7%25_Solution" title="7% Solution">7%25 Solution</a>
7972 <p><a rel="mw:WikiLink" href="./7%25_Solution" title="7% Solution">7% Solution</a>
7973 <a rel="mw:WikiLink" href="./7%25_Solution" title="7% Solution">7%25 Solution</a></p>
7977 Link containing % as a double hex sequence interpreted to hex sequence
7981 <p>[[7%2525 Solution]]
7985 ## Example for such a section: == < ==
7987 Link containing "#<" and "#>" % as a hex sequences- these are valid section anchors
7989 wgFragmentMode=[ 'html5', 'legacy' ]
7991 [[%23%3c]][[%23%3e]]
7993 <p><a href="#<">#<</a><a href="#>">#></a>
7996 <p><a rel="mw:WikiLink" href="./Main_Page#<" title="Main Page" data-parsoid='{"stx":"simple","a":{"href":"./Main_Page#<"},"sa":{"href":"%23%3c"}}'>#<</a><a rel="mw:WikiLink" href="./Main_Page#>" title="Main Page" data-parsoid='{"stx":"simple","a":{"href":"./Main_Page#>"},"sa":{"href":"%23%3e"}}'>#></a></p>
7999 ## Example for such a section: == < ==
8001 Link containing "#<" and "#>" % as a hex sequences- these are valid section anchors (legacy)
8003 wgFragmentMode=[ 'legacy' ]
8005 [[%23%3c]][[%23%3e]]
8007 <p><a href="#.3C">#<</a><a href="#.3E">#></a>
8012 Link containing "<#" and ">#" as a hex sequences
8014 [[%3c%23]][[%3e%23]]
8016 <p>[[%3c%23]][[%3e%23]]
8021 Link containing an equals sign
8023 [[Special:BookSources/isbn=4-00-026157-6]]
8025 <p><a href="/wiki/Special:BookSources/isbn%3D4-00-026157-6" title="Special:BookSources/isbn=4-00-026157-6">Special:BookSources/isbn=4-00-026157-6</a>
8028 <p><a rel="mw:WikiLink" href="./Special:BookSources/isbn=4-00-026157-6" title="Special:BookSources/isbn=4-00-026157-6">Special:BookSources/isbn=4-00-026157-6</a></p>
8034 Just a test of an article title containing an ampersand
8038 Link containing an ampersand
8044 [[Foo &amp; bar]]
8046 <p><a href="/wiki/Foo_%26_bar" title="Foo & bar">Foo & bar</a>
8047 </p><p><a href="/wiki/Foo_%26_bar" title="Foo & bar">Foo & bar</a>
8048 </p><p>[[Foo &amp; bar]]
8051 <p><a rel="mw:WikiLink" href="./Foo_&_bar" title="Foo & bar">Foo & bar</a></p>
8052 <p><a rel="mw:WikiLink" href="./Foo_&_bar" title="Foo & bar" data-parsoid='{"stx":"simple","a":{"href":"./Foo_&_bar"},"sa":{"href":"Foo &amp; bar"}}'>Foo & bar</a></p>
8053 <p>[[Foo <span typeof="mw:Entity" data-parsoid='{"src":"&amp;","srcContent":"&"}'>&</span>amp; bar]]</p>
8059 Just a test of an article title containing a tilde.
8062 # note that links containing signatures, like [[Foo~~~~]], are
8063 # massaged by the pre-save transform (PST) and so the tildes are never
8064 # seen by the parser.
8066 Link containing a tilde
8070 <p><a href="/wiki/Foo~bar" title="Foo~bar">Foo~bar</a>
8073 <p><a rel="mw:WikiLink" href="./Foo~bar" title="Foo~bar">Foo~bar</a></p>
8077 Link containing double-single-quotes '' (T6598)
8079 [[Lista d''e paise d''o munno]]
8081 <p><a href="/index.php?title=Lista_d%27%27e_paise_d%27%27o_munno&action=edit&redlink=1" class="new" title="Lista d''e paise d''o munno (page does not exist)">Lista d''e paise d''o munno</a>
8084 <p><a rel="mw:WikiLink" href="./Lista_d''e_paise_d''o_munno" title="Lista d''e paise d''o munno">Lista d''e paise d''o munno</a></p>
8088 Link containing double quotes and spaces
8092 <p><a href="/index.php?title=Cool_%22Gator%22&action=edit&redlink=1" class="new" title="Cool "Gator" (page does not exist)">Cool "Gator"</a>
8095 <p><a rel="mw:WikiLink" href='./Cool_"Gator"' title='Cool "Gator"'>Cool "Gator"</a></p>
8099 File containing double quotes and spaces
8101 [[File:Cool "Gator".png]]
8103 <p><figure-inline class="mw-default-size" typeof="mw:Error mw:Image" data-parsoid='{"optList":[]}' data-mw='{"errors":[{"key":"apierror-filedoesnotexist","message":"This image does not exist."}]}'><a href="./File:Cool_%22Gator%22.png" data-parsoid='{"a":{"href":"./File:Cool_%22Gator%22.png"},"sa":{"href":"File:Cool \"Gator\".png"}}'><img resource='./File:Cool_"Gator".png' src="./Special:FilePath/Cool_%22Gator%22.png" height="220" width="220" data-parsoid='{"a":{"resource":"./File:Cool_\"Gator\".png","height":"220","width":"220","src":"./Special:FilePath/Cool_%22Gator%22.png"},"sa":{"resource":"File:Cool \"Gator\".png","src":"./Special:FilePath/Cool_\"Gator\".png"}}'/></a></figure-inline></p>
8107 Redirect containing double quotes and spaces
8109 #REDIRECT [[Cool "Gator"]]
8111 <link rel="mw:PageProp/redirect" href="./Cool_%22Gator%22" data-parsoid='{"src":"#REDIRECT ","a":{"href":"./Cool_%22Gator%22"},"sa":{"href":"Cool \"Gator\""}}'/>
8115 Link containing double-single-quotes '' in text (T6598 sanity check)
8117 Some [[Link|pretty ''italics'' and stuff]]!
8119 <p>Some <a href="/index.php?title=Link&action=edit&redlink=1" class="new" title="Link (page does not exist)">pretty <i>italics</i> and stuff</a>!
8122 <p>Some <a rel="mw:WikiLink" href="./Link" title="Link">pretty <i>italics</i> and stuff</a>!</p>
8126 Link containing double-single-quotes '' in text embedded in italics (T6598 sanity check)
8128 ''Some [[Link|pretty ''italics'' and stuff]]!''
8130 <p><i>Some <a href="/index.php?title=Link&action=edit&redlink=1" class="new" title="Link (page does not exist)">pretty <i>italics</i> and stuff</a>!</i>
8135 Link with double quotes in title part (literal) and alternate part (interpreted)
8137 [[File:Denys_Savchenko_''Pentecoste''.jpg]]
8141 [[''Pentecoste''|Pentecoste]]
8143 [[''Pentecoste''|''Pentecoste'']]
8145 <p><a href="/index.php?title=Special:Upload&wpDestFile=Denys_Savchenko_%27%27Pentecoste%27%27.jpg" class="new" title="File:Denys Savchenko ''Pentecoste''.jpg">File:Denys Savchenko <i>Pentecoste</i>.jpg</a>
8146 </p><p><a href="/index.php?title=%27%27Pentecoste%27%27&action=edit&redlink=1" class="new" title="''Pentecoste'' (page does not exist)">''Pentecoste''</a>
8147 </p><p><a href="/index.php?title=%27%27Pentecoste%27%27&action=edit&redlink=1" class="new" title="''Pentecoste'' (page does not exist)">Pentecoste</a>
8148 </p><p><a href="/index.php?title=%27%27Pentecoste%27%27&action=edit&redlink=1" class="new" title="''Pentecoste'' (page does not exist)"><i>Pentecoste</i></a>
8151 <p><figure-inline class="mw-default-size" typeof="mw:Error mw:Image" data-mw='{"errors":[{"key":"apierror-filedoesnotexist","message":"This image does not exist."}]}'><a href="./File:Denys_Savchenko_''Pentecoste''.jpg"><img resource="./File:Denys_Savchenko_''Pentecoste''.jpg" src="./Special:FilePath/Denys_Savchenko_''Pentecoste''.jpg" height="220" width="220"/></a></figure-inline></p>
8152 <p><a rel="mw:WikiLink" href="./''Pentecoste''" title="''Pentecoste''">''Pentecoste''</a></p>
8153 <p><a rel="mw:WikiLink" href="./''Pentecoste''" title="''Pentecoste''">Pentecoste</a></p>
8154 <p><a rel="mw:WikiLink" href="./''Pentecoste''" title="''Pentecoste''"><i>Pentecoste</i></a></p>
8158 Broken image links with HTML captions (T41700)
8160 [[File:Nonexistent|<script></script>]]
8161 [[File:Nonexistent|100x100px|<script></script>]]
8162 [[File:Nonexistent|<]]
8163 [[File:Nonexistent|a<i>b</i>c]]
8165 <p><a href="/index.php?title=Special:Upload&wpDestFile=Nonexistent" class="new" title="File:Nonexistent"><script></script></a>
8166 <a href="/index.php?title=Special:Upload&wpDestFile=Nonexistent" class="new" title="File:Nonexistent"><script></script></a>
8167 <a href="/index.php?title=Special:Upload&wpDestFile=Nonexistent" class="new" title="File:Nonexistent"><</a>
8168 <a href="/index.php?title=Special:Upload&wpDestFile=Nonexistent" class="new" title="File:Nonexistent">abc</a>
8171 <p><figure-inline class="mw-default-size" typeof="mw:Error mw:Image" data-parsoid='{"optList":[{"ck":"caption","ak":"<script></script>"}]}' data-mw='{"errors":[{"key":"apierror-filedoesnotexist","message":"This image does not exist."}],"caption":"&lt;script>&lt;/script>"}'><a href="./File:Nonexistent" data-parsoid='{"a":{"href":"./File:Nonexistent"},"sa":{}}'><img resource="./File:Nonexistent" src="./Special:FilePath/Nonexistent" height="220" width="220" data-parsoid='{"a":{"resource":"./File:Nonexistent","height":"220","width":"220"},"sa":{"resource":"File:Nonexistent"}}'/></a></figure-inline>
8172 <figure-inline typeof="mw:Error mw:Image" data-parsoid='{"optList":[{"ck":"width","ak":"100x100px"},{"ck":"caption","ak":"<script></script>"}]}' data-mw='{"errors":[{"key":"apierror-filedoesnotexist","message":"This image does not exist."}],"caption":"&lt;script>&lt;/script>"}'><a href="./File:Nonexistent" data-parsoid='{"a":{"href":"./File:Nonexistent"},"sa":{}}'><img resource="./File:Nonexistent" src="./Special:FilePath/Nonexistent" height="100" width="100" data-parsoid='{"a":{"resource":"./File:Nonexistent","height":"100","width":"100"},"sa":{"resource":"File:Nonexistent"}}'/></a></figure-inline>
8173 <figure-inline class="mw-default-size" typeof="mw:Error mw:Image" data-parsoid='{"optList":[{"ck":"caption","ak":"&lt;"}]}' data-mw='{"errors":[{"key":"apierror-filedoesnotexist","message":"This image does not exist."}],"caption":"<span typeof=\"mw:Entity\" data-parsoid='{\"src\":\"&amp;lt;\",\"srcContent\":\"&lt;\",\"dsr\":[107,111,null,null]}'>&lt;</span>"}'><a href="./File:Nonexistent" data-parsoid='{"a":{"href":"./File:Nonexistent"},"sa":{}}'><img resource="./File:Nonexistent" src="./Special:FilePath/Nonexistent" height="220" width="220" data-parsoid='{"a":{"resource":"./File:Nonexistent","height":"220","width":"220"},"sa":{"resource":"File:Nonexistent"}}'/></a></figure-inline>
8174 <figure-inline class="mw-default-size" typeof="mw:Error mw:Image" data-parsoid='{"optList":[{"ck":"caption","ak":"a<i>b</i>c"}]}' data-mw='{"errors":[{"key":"apierror-filedoesnotexist","message":"This image does not exist."}],"caption":"a<i data-parsoid='{\"stx\":\"html\",\"dsr\":[134,142,3,4]}'>b</i>c"}'><a href="./File:Nonexistent" data-parsoid='{"a":{"href":"./File:Nonexistent"},"sa":{}}'><img resource="./File:Nonexistent" src="./Special:FilePath/Nonexistent" height="220" width="220" data-parsoid='{"a":{"resource":"./File:Nonexistent","height":"220","width":"220"},"sa":{"resource":"File:Nonexistent"}}'/></a></figure-inline></p>
8180 [[http://www.example.com]]
8182 <p>[<a rel="nofollow" class="external autonumber" href="http://www.example.com">[1]</a>]
8185 <p>[<a rel="mw:ExtLink" class="external autonumber" href="http://www.example.com"></a>]</p>
8189 Plain link to URL with link text
8191 [[http://www.example.com Link text]]
8193 <p>[<a rel="nofollow" class="external text" href="http://www.example.com">Link text</a>]
8198 Plain link to protocol-relative URL
8200 [[//www.example.com]]
8202 <p>[<a rel="nofollow" class="external autonumber" href="//www.example.com">[1]</a>]
8205 <p>[<a rel="mw:ExtLink" class="external autonumber" href="//www.example.com"></a>]</p>
8209 Plain link to protocol-relative URL with link text
8211 [[//www.example.com Link text]]
8213 <p>[<a rel="nofollow" class="external text" href="//www.example.com">Link text</a>]
8218 Plain link to page with question mark in title
8224 <p><a href="/wiki/A%3Fb" title="A?b">A?b</a>
8225 </p><p><a href="/wiki/A%3Fb" title="A?b">Baz</a>
8229 # I'm fairly sure the expected result here is wrong.
8230 # We want these to be URL links, not pseudo-pages with URLs for titles....
8231 # However the current output is also pretty screwy.
8234 # I'm changing it to match the current output--it arguably makes more
8235 # sense in the light of the test above. Old expected result was:
8236 #<p>Piped link to URL: <a href="/index.php?title=Http://www.example.com&action=edit" class="new">an example URL</a>
8238 # But I think this test is bordering on "garbage in, garbage out" anyway.
8243 Piped link to URL: [[http://www.example.com|an example URL]]
8245 <p>Piped link to URL: [<a rel="nofollow" class="external text" href="http://www.example.com%7Can">example URL</a>]
8248 <p>Piped link to URL: [<a rel="mw:ExtLink" class="external text" href="http://www.example.com%7Can" data-parsoid='{"a":{"href":"http://www.example.com%7Can"},"sa":{"href":"http://www.example.com|an"}}'>example URL</a>]</p>
8252 Plain link in template argument
8256 {{echo|[http://www.example.com |123]}}
8258 {{echo|[[http://www.example.com |123]]}}
8260 {{echo|[[http://www.example.com |123]}}
8262 {{echo|[http://www.example.com |123]]}}
8264 <p>[<a rel="nofollow" class="external free" href="http://www.example.com">http://www.example.com</a>
8265 </p><p>[<a rel="nofollow" class="external text" href="http://www.example.com">|123</a>]
8266 </p><p>{{echo|[<a rel="nofollow" class="external text" href="http://www.example.com">|123</a>}}
8267 </p><p>[<a rel="nofollow" class="external free" href="http://www.example.com">http://www.example.com</a>
8270 <p about="#mwt1" typeof="mw:Transclusion" data-mw='{"parts":[{"template":{"target":{"wt":"echo","href":"./Template:Echo"},"params":{"1":{"wt":"[http://www.example.com "},"2":{"wt":"123]"}},"i":0}}]}'>[<a rel="mw:ExtLink" class="external free" href="http://www.example.com">http://www.example.com</a> </p>
8272 <p about="#mwt2" typeof="mw:Transclusion" data-mw='{"parts":[{"template":{"target":{"wt":"echo","href":"./Template:Echo"},"params":{"1":{"wt":"[[http://www.example.com |123]]"}},"i":0}}]}'>[<a rel="mw:ExtLink" class="external text" href="http://www.example.com">|123</a>]</p>
8274 <p>{{echo|[<a rel="mw:ExtLink" class="external text" href="http://www.example.com" data-parsoid='{"targetOff":114,"contentOffsets":[114,118],"dsr":[90,119,24,1]}'>|123</a>}}</p>
8276 <p about="#mwt3" typeof="mw:Transclusion" data-mw='{"parts":[{"template":{"target":{"wt":"echo","href":"./Template:Echo"},"params":{"1":{"wt":"[http://www.example.com "},"2":{"wt":"123]]"}},"i":0}}]}'>[<a rel="mw:ExtLink" class="external free" href="http://www.example.com">http://www.example.com</a> </p>
8280 T2002: [[page|http://url/]] should link to page, not http://url/
8282 [[Main Page|http://url/]]
8284 <p><a href="/wiki/Main_Page" title="Main Page">http://url/</a>
8287 <p><a rel="mw:WikiLink" href="./Main_Page" title="Main Page">http://url/</a></p>
8290 # Parsoid does not mark self-links, by design.
8292 T2337: Escaped self-links should be bold
8296 [[Bug462]] [[Bug462]]
8298 <p><a class="mw-selflink selflink">Bug462</a> <a class="mw-selflink selflink">Bug462</a>
8301 <p><a rel="mw:WikiLink" href="./Bug462" title="Bug462">Bug462</a> <a rel="mw:WikiLink" href="./Bug462" title="Bug462">Bug462</a></p>
8305 Self-link to section should not be bold
8309 [[Main Page#section]]
8311 <p><a href="/wiki/Main_Page#section" title="Main Page">Main Page#section</a>
8322 Self-link to numeric title
8328 <p><a class="mw-selflink selflink">0</a>
8333 Link to numeric-equivalent title
8339 <p><a href="/wiki/00" title="00">00</a>
8344 <nowiki> inside a link
8346 [[Main<nowiki> Page</nowiki>]] [[Main Page|the main page <nowiki>[it's not very good]</nowiki>]]
8348 <p>[[Main Page]] <a href="/wiki/Main_Page" title="Main Page">the main page [it's not very good]</a>
8353 Non-breaking spaces in title
8355 [[ Main Page ]]
8357 <p><a href="/wiki/Main_Page" title="Main Page">  Main   Page  </a>
8361 # Add new article for the test below so that it doesn't red-link
8369 Multiple spaces in titles should normalize to a single underscore
8371 parsoid=wt2html,wt2wt
8377 <p><a href="/wiki/Foo_bar_baz" title="Foo bar baz">x</a>
8378 <a href="/wiki/Foo_bar_baz" title="Foo bar baz">x</a>
8379 <a href="/wiki/Foo_bar_baz" title="Foo bar baz">x</a>
8382 <p><a rel="mw:WikiLink" href="./Foo_bar_baz" title="Foo bar baz">x</a>
8383 <a rel="mw:WikiLink" href="./Foo_bar_baz" title="Foo bar baz">x</a>
8384 <a rel="mw:WikiLink" href="./Foo_bar_baz" title="Foo bar baz">x</a>
8389 Internal link with ca linktrail, surrounded by bold apostrophes (T29473 primary issue)
8395 <p><b><a href="/wiki/Main_Page" title="Main Page">Main Page</a></b>
8400 Internal link with ca linktrail, surrounded by italic apostrophes (T29473 primary issue)
8406 <p><i><a href="/wiki/Main_Page" title="Main Page">Main Page</a></i>
8411 Internal link with en linktrail: no apostrophes (T29473)
8417 <p><a href="/index.php?title=Something&action=edit&redlink=1" class="new" title="Something (page does not exist)">Something</a>'nice
8422 Internal link with ca linktrail with apostrophes (T29473)
8428 <p><a href="/index.php?title=Something&action=edit&redlink=1" class="new" title="Something (encara no existeix)">Something'nice</a>
8433 Internal link with kaa linktrail with apostrophes (T29473)
8439 <p><a href="/index.php?title=Something&action=edit&redlink=1" class="new" title="Something (bet ele jaratılmag'an)">Something'nice</a>
8444 Link with multiple ":" in a subpage-supporting namespace (T65636)
8446 [[User:Foo/Test/63636:Bar|Test]]
8448 <p><a href="/index.php?title=User:Foo/Test/63636:Bar&action=edit&redlink=1" class="new" title="User:Foo/Test/63636:Bar (page does not exist)">Test</a>
8451 <p><a rel="mw:WikiLink" href="./User:Foo/Test/63636:Bar" title="User:Foo/Test/63636:Bar">Test</a></p>
8454 ## Mainly a sanity check for Parsoid
8456 Handle title parsing for subpages
8476 Link to a subpage from a namespace other than main
8483 <p><a href="/wiki/User:Test/123" title="User:Test/123">/123</a>
8486 <p><a rel="mw:WikiLink" href="./User:Test/123" title="User:Test/123" data-parsoid='{"stx":"simple","a":{"href":"./User:Test/123"},"sa":{"href":"/123"}}'>/123</a></p>
8490 Ensure that transclusion titles are not url-decoded
8492 subpage title=[[Test]]
8495 {{Bar%C3%A9}} {{/Bar%C3%A9}}
8497 <p>{{Bar%C3%A9}} {{/Bar%C3%A9}}
8500 <p>{{Bar%C3%A9}} {{/Bar%C3%A9}}</p>
8504 Purely hash wikilink
8506 title=[[User:Test/123]]
8511 <p><a href="#a">b</a>
8514 <p><a rel="mw:WikiLink" href="./User:Test/123#a" data-parsoid='{"stx":"piped","a":{"href":"./User:Test/123#a"},"sa":{"href":"#a"}}'>b</a></p>
8518 Serialization of purely hash wikilink
8520 title=[[User:Test/123]]
8524 <p><a href="#a">[[</a></p>
8526 [[#a|<nowiki>[[</nowiki>]]
8528 <p><a href="#a">[[</a>
8533 1. Interaction of linktrail and template encapsulation
8537 <p><a rel="mw:WikiLink" href="./Foo" title="Foo" typeof="mw:Transclusion" data-mw='{"parts":[{"template":{"target":{"wt":"echo","href":"./Template:Echo"},"params":{"1":{"wt":"[[Foo]]"}},"i":0}},"l"]}'>Fool</a></p>
8541 2. Interaction of linktrail and template encapsulation
8545 {{echo|Some [[Fool]]}}s
8547 <p><span about="#mwt1" typeof="mw:Transclusion" data-mw='{"parts":[{"template":{"target":{"wt":"echo","href":"./Template:Echo"},"params":{"1":{"wt":"Some [[Fool]]"}},"i":0}},"s"]}' data-parsoid='{"pi":[[{"k":"1"}]]}'>Some </span><a rel="mw:WikiLink" href="./Fool" title="Fool" about="#mwt1" data-parsoid='{"stx":"simple","a":{"href":"./Fool"},"sa":{"href":"Fool"},"tail":"s"}'>Fools</a></p>
8551 3. Interaction of linktrail and template encapsulation
8555 {{echo|Some [[Fool]]s are '''bold and foolish'''}}
8557 <p about="#mwt1" typeof="mw:Transclusion" data-mw='{"parts":[{"template":{"target":{"wt":"echo","href":"./Template:Echo"},"params":{"1":{"wt":"Some [[Fool]]s are '''bold and foolish'''"}},"i":0}}]}' data-parsoid='{"pi":[[{"k":"1"}]]}'>Some <a rel="mw:WikiLink" href="./Fool" title="Fool" data-parsoid='{"stx":"simple","a":{"href":"./Fool"},"sa":{"href":"Fool"},"tail":"s"}'>Fools</a> are <b>bold and foolish</b></p>
8567 Internal link with is link prefix
8571 Aðrir mótmælenda[[söfnuður|söfnuðir]] og
8573 <p>Aðrir <a href="/wiki/S%C3%B6fnu%C3%B0ur" title="Söfnuður">mótmælendasöfnuðir</a> og
8584 Internal link with is link trail and link prefix
8588 [[mótmælendatrú|xxx]]ar
8590 mótmælenda[[söfnuður]]
8591 mótmælenda[[söfnuður|söfnuðir]]
8592 mótmælenda[[söfnuður|söfnuðir]]xxx
8594 <p><a href="/wiki/M%C3%B3tm%C3%A6lendatr%C3%BA" title="Mótmælendatrú">xxxar</a>
8595 <a href="/wiki/M%C3%B3tm%C3%A6lendatr%C3%BA" title="Mótmælendatrú">mótmælendatrúar</a>
8596 <a href="/wiki/S%C3%B6fnu%C3%B0ur" title="Söfnuður">mótmælendasöfnuður</a>
8597 <a href="/wiki/S%C3%B6fnu%C3%B0ur" title="Söfnuður">mótmælendasöfnuðir</a>
8598 <a href="/wiki/S%C3%B6fnu%C3%B0ur" title="Söfnuður">mótmælendasöfnuðirxxx</a>
8603 Parsoid link trail escaping
8605 parsoid=html2wt,html2html
8607 <p><a rel="mw:WikiLink" href="./Apple" title="Apple">apple</a>s</p>
8613 Parsoid link prefix escaping
8616 parsoid=html2wt,html2html
8618 <p>Aðrir mótmælenda<a rel="mw:WikiLink" href="./Söfnuður" title="Söfnuður">söfnuður</a></p>
8620 Aðrir mótmælenda<nowiki/>[[söfnuður]]
8624 Parsoid link bracket escaping
8626 parsoid=html2wt,html2html
8628 <p><a rel="mw:WikiLink" href="./Test" title="Test">Test</a></p>
8629 <p>[<a rel="mw:WikiLink" href="./Test" title="Test">Test</a>]</p>
8630 <p>[[<a rel="mw:WikiLink" href="./Test" title="Test">Test</a>]]</p>
8631 <p>[[[<a rel="mw:WikiLink" href="./Test" title="Test">Test</a>]]]</p>
8632 <p>[[[[<a rel="mw:WikiLink" href="./Test" title="Test">Test</a>]]]]</p>
8633 <p>[[[[[<a rel="mw:WikiLink" href="./Test" title="Test">Test</a>]]]]]</p>
8641 [[[<nowiki/>[[Test]]]]]
8645 [[[[[<nowiki/>[[Test]]]]]]]
8649 Parsoid-centric test: Whitespace in ext- and wiki-links should be preserved
8657 [http://wp.org ''foo'']
8659 <p><a href="/wiki/Foo" title="Foo"> bar</a>
8660 </p><p><a href="/wiki/Foo" title="Foo"> <i>bar</i></a>
8661 </p><p><a rel="nofollow" class="external text" href="http://wp.org">foo</a>
8662 </p><p><a rel="nofollow" class="external text" href="http://wp.org"><i>foo</i></a>
8667 Parsoid: Scoped parsing should handle mixed transclusions and plain text
8669 [[Foo|{{echo|a}} b {{echo|c}}]]
8671 <p><a rel="mw:WikiLink" href="./Foo" title="Foo"><span about="#mwt2" typeof="mw:Transclusion" data-mw='{"parts":[{"template":{"target":{"wt":"echo","href":"./Template:Echo"},"params":{"1":{"wt":"a"}},"i":0}}]}'>a</span> b <span about="#mwt3" typeof="mw:Transclusion" data-mw='{"parts":[{"template":{"target":{"wt":"echo","href":"./Template:Echo"},"params":{"1":{"wt":"c"}},"i":0}}]}'>c</span></a></p>
8675 Link with angle bracket after anchor
8677 wgFragmentMode=[ 'html5', 'legacy' ]
8681 <p><a href="/wiki/Foo#<bar>" title="Foo">Foo#<bar></a>
8684 <p><a rel="mw:WikiLink" href="./Foo#<bar>" title="Foo" data-parsoid='{"stx":"simple","a":{"href":"./Foo#<bar>"},"sa":{"href":"Foo#<bar>"}}'>Foo#<bar></a></p>
8688 Link with angle bracket after anchor (legacy)
8690 wgFragmentMode=[ 'legacy' ]
8694 <p><a href="/wiki/Foo#.3Cbar.3E" title="Foo">Foo#<bar></a>
8699 ### Interwiki links (see maintenance/interwiki.sql)
8703 Inline interwiki link
8705 parsoid=wt2html,wt2wt,html2html
8707 [[MeatBall:SoftSecurity]]
8709 <p><a href="http://www.usemod.com/cgi-bin/mb.pl?SoftSecurity" class="extiw" title="meatball:SoftSecurity">MeatBall:SoftSecurity</a>
8712 <p><a rel="mw:WikiLink/Interwiki" href="http://www.usemod.com/cgi-bin/mb.pl?SoftSecurity" title="meatball:SoftSecurity">MeatBall:SoftSecurity</a></p>
8716 Inline interwiki link with empty title (T4372)
8718 parsoid=wt2html,wt2wt,html2html
8722 <p><a href="http://www.usemod.com/cgi-bin/mb.pl" class="extiw" title="meatball:">MeatBall:</a>
8725 <p><a rel="mw:WikiLink/Interwiki" href="http://www.usemod.com/cgi-bin/mb.pl?" title="meatball:">MeatBall:</a></p>
8728 ## html2wt and html2html will fail because we will prefer the :en: interwiki prefix over wikipedia:
8730 Interwiki link encoding conversion (T3636)
8732 parsoid=wt2html,wt2wt
8734 *[[Wikipedia:ro:Olteniţa]]
8735 *[[Wikipedia:ro:Olteniţa]]
8737 <ul><li><a href="http://en.wikipedia.org/wiki/ro:Olteni%C5%A3a" class="extiw" title="wikipedia:ro:Olteniţa">Wikipedia:ro:Olteniţa</a></li>
8738 <li><a href="http://en.wikipedia.org/wiki/ro:Olteni%C5%A3a" class="extiw" title="wikipedia:ro:Olteniţa">Wikipedia:ro:Olteniţa</a></li></ul>
8742 <li><a href="http://en.wikipedia.org/wiki/ro:Olteni%C5%A3a" class="extiw" title="wikipedia:ro:Olteniţa">Wikipedia:ro:Olteniţa</a></li>
8743 <li><a href="http://en.wikipedia.org/wiki/ro:Olteni%C5%A3a" class="extiw" title="wikipedia:ro:Olteniţa">Wikipedia:ro:Olteniţa</a></li>
8747 <li><a rel="mw:WikiLink/Interwiki" href="http://en.wikipedia.org/wiki/ro:Olteniţa" title="wikipedia:ro:Olteniţa">Wikipedia:ro:Olteniţa</a></li>
8748 <li><a rel="mw:WikiLink/Interwiki" href="http://en.wikipedia.org/wiki/ro:Olteniţa" title="wikipedia:ro:Olteniţa">Wikipedia:ro:Olteniţa</a></li>
8753 Interwiki link with fragment (T4130)
8755 [[MeatBall:SoftSecurity#foo]]
8757 <p><a href="http://www.usemod.com/cgi-bin/mb.pl?SoftSecurity#foo" class="extiw" title="meatball:SoftSecurity">MeatBall:SoftSecurity#foo</a>
8762 Link scenarios with escaped fragments
8764 wgFragmentMode=[ 'html5', 'legacy' ]
8767 [[Foo#Is this great?]]
8768 [[meatball:Foo#Is this great?]]
8770 <p><a href="#Is_this_great?">#Is this great?</a>
8771 <a href="/wiki/Foo#Is_this_great?" title="Foo">Foo#Is this great?</a>
8772 <a href="http://www.usemod.com/cgi-bin/mb.pl?Foo#Is_this_great.3F" class="extiw" title="meatball:Foo">meatball:Foo#Is this great?</a>
8775 <p><a rel="mw:WikiLink" href="./Main_Page#Is_this_great?" data-parsoid='{"stx":"simple","a":{"href":"./Main_Page#Is_this_great?"},"sa":{"href":"#Is this great?"}}'>#Is this great?</a>
8776 <a rel="mw:WikiLink" href="./Foo#Is_this_great?" title="Foo" data-parsoid='{"stx":"simple","a":{"href":"./Foo#Is_this_great?"},"sa":{"href":"Foo#Is this great?"}}'>Foo#Is this great?</a>
8777 <a rel="mw:WikiLink/Interwiki" href="http://www.usemod.com/cgi-bin/mb.pl?Foo#Is_this_great?" title="meatball:Foo" data-parsoid='{"stx":"simple","a":{"href":"http://www.usemod.com/cgi-bin/mb.pl?Foo#Is_this_great?"},"sa":{"href":"meatball:Foo#Is this great?"},"isIW":true}'>meatball:Foo#Is this great?</a></p>
8781 Link scenarios with escaped fragments (legacy)
8783 wgFragmentMode=[ 'legacy' ]
8786 [[Foo#Is this great?]]
8787 [[meatball:Foo#Is this great?]]
8789 <p><a href="#Is_this_great.3F">#Is this great?</a>
8790 <a href="/wiki/Foo#Is_this_great.3F" title="Foo">Foo#Is this great?</a>
8791 <a href="http://www.usemod.com/cgi-bin/mb.pl?Foo#Is_this_great.3F" class="extiw" title="meatball:Foo">meatball:Foo#Is this great?</a>
8795 # Ideally the wikipedia: prefix here should be proto-relative too
8796 # [CSA]: this is kind of a bogus test, as the PHP parser test doesn't
8797 # define the 'en' prefix, and originally the test used 'wikipedia',
8798 # which isn't a localinterwiki prefix hence the links to the 'en:Foo'
8801 Different interwiki prefixes mapping to the same URL
8809 [[:wikipedia:Foo|Foo]]
8811 [[wikipedia:en:Foo]]
8813 [[:wikipedia:en:Foo]]
8817 <p><a rel="mw:WikiLink/Interwiki" href="//en.wikipedia.org/wiki/Foo" data-parsoid='{"stx":"simple","a":{"href":"//en.wikipedia.org/wiki/Foo"},"sa":{"href":":en:Foo"},"isIW":true}' title="en:Foo">en:Foo</a></p>
8819 <p><a rel="mw:WikiLink/Interwiki" href="//en.wikipedia.org/wiki/Foo" data-parsoid='{"stx":"piped","a":{"href":"//en.wikipedia.org/wiki/Foo"},"sa":{"href":":en:Foo"},"isIW":true}' title="en:Foo">Foo</a></p>
8821 <p><a rel="mw:WikiLink/Interwiki" href="http://en.wikipedia.org/wiki/Foo" data-parsoid='{"stx":"simple","a":{"href":"http://en.wikipedia.org/wiki/Foo"},"sa":{"href":"wikipedia:Foo"},"isIW":true}' title="wikipedia:Foo">wikipedia:Foo</a></p>
8823 <p><a rel="mw:WikiLink/Interwiki" href="http://en.wikipedia.org/wiki/Foo" data-parsoid='{"stx":"piped","a":{"href":"http://en.wikipedia.org/wiki/Foo"},"sa":{"href":":wikipedia:Foo"},"isIW":true}' title="wikipedia:Foo">Foo</a></p>
8825 <p><a rel="mw:WikiLink/Interwiki" href="http://en.wikipedia.org/wiki/en:Foo" data-parsoid='{"stx":"simple","a":{"href":"http://en.wikipedia.org/wiki/en:Foo"},"sa":{"href":"wikipedia:en:Foo"},"isIW":true}' title="wikipedia:en:Foo">wikipedia:en:Foo</a></p>
8827 <p><a rel="mw:WikiLink/Interwiki" href="http://en.wikipedia.org/wiki/en:Foo" data-parsoid='{"stx":"simple","a":{"href":"http://en.wikipedia.org/wiki/en:Foo"},"sa":{"href":":wikipedia:en:Foo"},"isIW":true}' title="wikipedia:en:Foo">wikipedia:en:Foo</a></p>
8829 <p><a rel="mw:WikiLink/Interwiki" href="http://en.wikipedia.org/wiki/Foo" data-parsoid='{"stx":"simple","a":{"href":"http://en.wikipedia.org/wiki/Foo"},"sa":{"href":" wikiPEdia :Foo"},"isIW":true}' title="wikipedia:Foo"> wikiPEdia :Foo</a></p>
8833 Interwiki links that cannot be represented in wiki syntax
8836 [[meatball:ok#foo|ok with fragment]]
8837 [[meatball:ok_as_well?|ok ending with ? mark]]
8838 [http://de.wikipedia.org/wiki/Foo?action=history has query]
8839 [http://de.wikipedia.org/wiki/#foo is just fragment]
8842 <p><a href="http://www.usemod.com/cgi-bin/mb.pl?ok" class="extiw" title="meatball:ok">meatball:ok</a>
8843 <a href="http://www.usemod.com/cgi-bin/mb.pl?ok#foo" class="extiw" title="meatball:ok">ok with fragment</a>
8844 <a href="http://www.usemod.com/cgi-bin/mb.pl?ok_as_well%3F" class="extiw" title="meatball:ok as well?">ok ending with ? mark</a>
8845 <a rel="nofollow" class="external text" href="http://de.wikipedia.org/wiki/Foo?action=history">has query</a>
8846 <a rel="nofollow" class="external text" href="http://de.wikipedia.org/wiki/#foo">is just fragment</a>
8849 <p><a rel="mw:WikiLink/Interwiki" href="http://www.usemod.com/cgi-bin/mb.pl?ok" title="meatball:ok">meatball:ok</a>
8850 <a rel="mw:WikiLink/Interwiki" href="http://www.usemod.com/cgi-bin/mb.pl?ok#foo" title="meatball:ok">ok with fragment</a>
8851 <a rel="mw:WikiLink/Interwiki" href="http://www.usemod.com/cgi-bin/mb.pl?ok_as_well%3F" title="meatball:ok as well?">ok ending with ? mark</a>
8852 <a rel="mw:ExtLink" class="external text" href="http://de.wikipedia.org/wiki/Foo?action=history">has query</a>
8853 <a rel="mw:ExtLink" class="external text" href="http://de.wikipedia.org/wiki/#foo">is just fragment</a></p>
8857 Interwiki links: trail
8859 [[wikipedia:Foo|Ba]]r
8861 <p><a href="http://en.wikipedia.org/wiki/Foo" class="extiw" title="wikipedia:Foo">Bar</a>
8864 <p><a rel="mw:WikiLink/Interwiki" href="http://en.wikipedia.org/wiki/Foo" data-parsoid='{"stx":"piped","a":{"href":"http://en.wikipedia.org/wiki/Foo"},"sa":{"href":"wikipedia:Foo"},"isIW":true,"tail":"r"}' title="wikipedia:Foo">Bar</a></p>
8868 Local interwiki link
8870 parsoid=wt2html,wt2wt,html2html
8872 [[local:Template:Foo]]
8874 <p><a href="/wiki/Template:Foo" title="Template:Foo">local:Template:Foo</a>
8877 <p><a rel="mw:WikiLink" href="./Template:Foo" title="Template:Foo">local:Template:Foo</a></p>
8880 # Parsoid does not mark self-links, by design.
8882 Local interwiki link: self-link to current page
8885 parsoid=wt2html,wt2wt,html2html
8889 <p><a class="mw-selflink selflink">local:Main Page</a>
8892 <p><a rel="mw:WikiLink" href="./Main_Page" title="Main Page">local:Main Page</a></p>
8896 Local interwiki link: prefix only (T66167)
8898 parsoid=wt2html,wt2wt,html2html
8902 <p><a href="/wiki/Main_Page" title="Main Page">local:</a>
8905 <p><a rel="mw:WikiLink" href="./Main_Page" title="Main Page">local:</a></p>
8909 Local interwiki link: with additional interwiki prefix (T63357)
8911 parsoid=wt2html,wt2wt,html2html
8913 [[local:meatball:Hello]]
8915 <p><a href="http://www.usemod.com/cgi-bin/mb.pl?Hello" class="extiw" title="meatball:Hello">local:meatball:Hello</a>
8918 <p><a rel="mw:WikiLink/Interwiki" href="http://www.usemod.com/cgi-bin/mb.pl?Hello" title="meatball:Hello">local:meatball:Hello</a></p>
8922 Multiple local interwiki link prefixes
8924 [[local:local:local:local:mi:local:Foo]]
8926 parsoid=wt2html,wt2wt,html2html
8928 <p><a href="/wiki/Foo" title="Foo">local:local:local:local:mi:local:Foo</a>
8931 <p><a rel="mw:WikiLink" href="./Foo" title="Foo">local:local:local:local:mi:local:Foo</a></p>
8935 Interwiki link with percent encoded target
8937 [[:es:Nueva Guip%C3%BAzcoa|Nueva Guipúzcoa]]
8939 <p><a href="http://es.wikipedia.org/wiki/Nueva_Guip%C3%BAzcoa" class="extiw" title="es:Nueva Guipúzcoa">Nueva Guipúzcoa</a>
8942 <p><a rel="mw:WikiLink/Interwiki" href="http://es.wikipedia.org/wiki/Nueva%20Guipúzcoa" title="es:Nueva Guipúzcoa" data-parsoid='{"stx":"piped","a":{"href":"http://es.wikipedia.org/wiki/Nueva%20Guipúzcoa"},"sa":{"href":":es:Nueva Guip%C3%BAzcoa"},"isIW":true}'>Nueva Guipúzcoa</a></p>
8946 ### Interlanguage links
8947 ### Language links (so that searching for '### language' matches..)
8959 <p>Blah blah blah</p>
8960 <link rel="mw:PageProp/Language" href="http://zh.wikipedia.org/wiki/Chinese"/>
8963 ## parsoid html2wt will lose the space variations
8965 Interlanguage link with spacing
8967 parsoid=wt2html,wt2wt,html2html
8975 <p>Blah blah blah</p>
8976 <link rel="mw:PageProp/Language" href="http://zh.wikipedia.org/wiki/Chinese"/>
8980 Double interlanguage link
8989 <p>Blah blah blah</p>
8990 <link rel="mw:PageProp/Language" href="http://es.wikipedia.org/wiki/Spanish"/>
8991 <link rel="mw:PageProp/Language" href="http://zh.wikipedia.org/wiki/Chinese"/>
8994 ## parsoid html2wt will lose the space variations
8996 Interlanguage link variations
8998 parsoid=wt2html,wt2wt,html2html
9008 <p>Blah blah blah</p>
9009 <link rel="mw:PageProp/Language" href="http://es.wikipedia.org/wiki/Spanish" />
9010 <link rel="mw:PageProp/Language" href="http://zh.wikipedia.org/wiki/Chinese" />
9011 <link rel="mw:PageProp/Language" href="http://es.wikipedia.org/wiki/Foo_bar" />
9015 Escaping of interlanguage links (T129218, T156308)
9019 [[ : zh : Chinese ]]
9022 <a href="http://es.wikipedia.org/wiki/Spanish" class="extiw" title="es:Spanish">es:Spanish</a>
9023 <a href="http://zh.wikipedia.org/wiki/Chinese" class="extiw" title="zh:Chinese"> zh : Chinese </a>
9027 <a rel="mw:WikiLink/Interwiki" href="http://es.wikipedia.org/wiki/Spanish" title="es:Spanish">es:Spanish</a>
9028 <a rel="mw:WikiLink/Interwiki" href="http://zh.wikipedia.org/wiki/Chinese" title="zh:Chinese"> zh : Chinese </a></p>
9032 Multiple colons escaping interlanguage links
9040 <p><a href="http://es.wikipedia.org/wiki/Spanish" class="extiw" title="es:Spanish">es:Spanish</a>
9045 <p><a rel="mw:WikiLink/Interwiki" href="http://es.wikipedia.org/wiki/Spanish" title="es:Spanish">es:Spanish</a>
9047 [[:::es:Spanish]]</p>
9050 ## parsoid html2wt will normalize the space to _
9052 Space and question mark encoding in interlanguage links (T95473)
9054 parsoid=wt2html,wt2wt,html2html
9062 <p>Blah blah blah</p>
9063 <link rel="mw:PageProp/Language" href="http://es.wikipedia.org/wiki/Foo_bar%3F" />
9067 Interlanguage link, with prefix links
9077 <p>Blah blah blah</p>
9078 <link rel="mw:PageProp/Language" href="http://zh.wikipedia.org/wiki/Chinese"/>
9082 Double interlanguage link, with prefix links (T10897)
9093 <p>Blah blah blah</p>
9094 <link rel="mw:PageProp/Language" href="http://es.wikipedia.org/wiki/Spanish"/>
9095 <link rel="mw:PageProp/Language" href="http://zh.wikipedia.org/wiki/Chinese"/>
9099 "Extra" interlanguage links (T34189 / gerrit 111390)
9107 <p>Blah blah blah</p>
9108 <link rel="mw:PageProp/Language" title="Multilingual" href="http://wikisource.org/wiki/Article"/>
9111 ## PHP parser tests script needs an update
9112 ## Parsoid html2wt will normalize output to [[:zh:Chinese]]
9114 Language links render as inline links if $wgInterwikiMagic=false
9116 wgInterwikiMagic=false
9117 parsoid=wt2html,wt2wt,html2html
9122 <p>Blah blah blah <a rel="mw:WikiLink/Interwiki" href="http://zh.wikipedia.org/wiki/Chinese" title="zh:Chinese">zh:Chinese</a></p>
9125 ## PHP parser tests script needs an update
9126 ## Parsoid html2wt will normalize output to [[:zh:Chinese]]
9128 Language links render as inline links in the Talk namespace
9131 parsoid=wt2html,wt2wt,html2html
9136 <p>Blah blah blah <a rel="mw:WikiLink/Interwiki" href="http://zh.wikipedia.org/wiki/Chinese" title="zh:Chinese">zh:Chinese</a></p>
9140 Parsoid-specific test: Wikilinks with should RT properly
9146 <p><a href="/index.php?title=WW_II&action=edit&redlink=1" class="new" title="WW II (lonkásá ezalí tɛ̂)">WW II</a>
9151 Parsoid T55221: Wikilinks should be properly entity-escaped
9153 parsoid={ "modes": ["html2wt"], "suppressErrors": true }
9155 <p>He&nbsp;llo <a href="./Foo" rel="mw:WikiLink">He&nbsp;llo</a></p>
9156 <p>He&nbsp;llo <a href="./He&nbsp;llo" rel="mw:WikiLink">He&nbsp;llo</a></p>
9158 He&nbsp;llo [[Foo|He&nbsp;llo]]
9160 He&nbsp;llo He&nbsp;llo
9162 <p>He&nbsp;llo <a href="/wiki/Foo" title="Foo">He&nbsp;llo</a>
9163 </p><p>He&nbsp;llo He&nbsp;llo
9167 # html2wt will fail because of title normalization without data-parsoid
9169 Parsoid: handle constructor well
9171 parsoid=wt2html,wt2wt
9177 <p><a href="/index.php?title=Constructor&action=edit&redlink=1" class="new" title="Constructor (page does not exist)">constructor</a>
9178 </p><p><a href="/index.php?title=Constructor:foo&action=edit&redlink=1" class="new" title="Constructor:foo (page does not exist)">constructor:foo</a>
9181 <p><a rel="mw:WikiLink" href="./Constructor" title="Constructor" data-parsoid='{"stx":"simple","a":{"href":"./Constructor"},"sa":{"href":"constructor"}}'>constructor</a></p>
9183 <p><a rel="mw:WikiLink" href="./Constructor:foo" title="Constructor:foo" data-parsoid='{"stx":"simple","a":{"href":"./Constructor:foo"},"sa":{"href":"constructor:foo"}}'>constructor:foo</a></p>
9187 Template parameter named "constructor"
9189 {{echo| constructor = |hi}}
9191 <p about="#mwt1" typeof="mw:Transclusion" data-parsoid='{"pi":[[{"k":"constructor","named":true,"spc":[" "," ",""," "]},{"k":"1"}]]}' data-mw='{"parts":[{"template":{"target":{"wt":"echo","href":"./Template:Echo"},"params":{"1":{"wt":"hi"},"constructor":{"wt":""}},"i":0}}]}'>hi</p>
9200 # Note that `ko` isn't a known interlanguage prefix
9202 Parsoid: recognize interlanguage links without a target page
9212 <link rel="mw:PageProp/Language" href="http://es.wikipedia.org/wiki/"/>
9214 <p><a rel="mw:WikiLink" href="./Ko:" title="Ko:">ko:</a></p>
9217 # Note that `ko` isn't a known interwiki prefix
9219 Parsoid: recognize interwiki links without a target page
9221 parsoid=wt2html,wt2wt,html2html
9227 <p><a href="http://es.wikipedia.org/wiki/" class="extiw" title="es:">es:</a>
9228 </p><p><a href="/wiki/Ko:" title="Ko:">ko:</a>
9231 <p><a rel="mw:WikiLink/Interwiki" href="http://es.wikipedia.org/wiki/" title="es:">es:</a></p>
9232 <p><a rel="mw:WikiLink" href="./Ko:" title="Ko:">ko:</a></p>
9236 Handle interwiki links pointing to the current wiki as plain wiki links (T47209)
9240 <p><a href="/wiki/Foo" title="Foo">mi:Foo</a>
9243 <p><a rel="mw:WikiLink" href="./Foo" title="Foo" data-parsoid='{"stx":"simple","a":{"href":"./Foo"},"sa":{"href":"mi:Foo"}}'>mi:Foo</a></p>
9247 Interlanguage link with preceding local interwiki link (T70085)
9249 parsoid=wt2html,wt2wt,html2html
9252 [[local:es:Spanish]]
9255 <a href="http://es.wikipedia.org/wiki/Spanish" class="extiw" title="es:Spanish">local:es:Spanish</a>
9259 <a rel="mw:WikiLink/Interwiki" href="http://es.wikipedia.org/wiki/Spanish" title="es:Spanish">local:es:Spanish</a></p>
9263 Looks like an interlanguage link, but is actually a local interwiki
9265 parsoid=wt2html,wt2wt,html2html
9271 <a href="/wiki/Template:Foo" title="Template:Foo">mi:Template:Foo</a>
9275 <a rel="mw:WikiLink" href="./Template:Foo" title="Template:Foo">mi:Template:Foo</a></p>
9279 ### Redirects, Parsoid-only
9283 1. Simple redirect to page
9285 #REDIRECT [[Main Page]]
9287 <link rel="mw:PageProp/redirect" href="./Main_Page"/>
9291 2. Other redirect variants
9293 #REDIRECT [[Main_Page]]
9295 <link rel="mw:PageProp/redirect" href="./Main_Page" data-parsoid='{"src":"#REDIRECT ","a":{"href":"./Main_Page"},"sa":{"href":"Main_Page"}}'/>
9298 # Not a valid redirect in PHP (although perhaps it was, once upon a time)
9299 # This tests the Parsoid bail-out code.
9301 3. Other redirect variants
9305 #REDIRECT [[<nowiki>[[Bar]]</nowiki>]]
9307 <ol><li>REDIRECT [[<span typeof="mw:Nowiki">[[Bar]]</span>]]</li></ol>
9311 4. Redirect to a templated destination
9313 #REDIRECT [[{{echo|Foo}}bar]]
9315 <link about="#mwt2" typeof="mw:ExpandedAttrs" rel="mw:PageProp/redirect" href="./Foobar" data-parsoid='{"a":{"href":"./Foobar"},"sa":{"href":"{{echo|Foo}}bar"}}' data-mw='{"attribs":[[{"txt":"href"},{"html":"<span about=\"#mwt1\" typeof=\"mw:Transclusion\" data-parsoid='{\"pi\":[[{\"k\":\"1\"}]],\"dsr\":[12,24,null,null]}' data-mw='{\"parts\":[{\"template\":{\"target\":{\"wt\":\"echo\",\"href\":\"./Template:Echo\"},\"params\":{\"1\":{\"wt\":\"Foo\"}},\"i\":0}}]}'>Foo</span>bar"}]]}'/>
9321 parsoid=wt2html,wt2wt
9326 <li>REDIRECT [[]]</li></ol>
9330 Optional colon in #REDIRECT
9332 # the colon is archaic syntax. we support it for wt2html, but we
9333 # don't care that it roundtrips back to the modern syntax.
9334 parsoid=wt2html,html2html
9336 #REDIRECT:[[Main Page]]
9338 <link rel="mw:PageProp/redirect" href="./Main_Page"/>
9342 Whitespace in #REDIRECT with optional colon
9344 # the colon and gratuitous whitespace is archaic syntax. we support
9345 # it for wt2html, but we don't care that it roundtrips back to the
9346 # modern syntax (without extra whitespace)
9347 parsoid=wt2html,html2html
9354 <link rel="mw:PageProp/redirect" href="./Main_Page"/>
9358 Piped link in #REDIRECT
9360 # content after piped link is ignored. we support this syntax,
9361 # but don't care that the piped link is lost when we roundtrip this.
9364 #REDIRECT [[Main Page|bar]]
9366 <link rel="mw:PageProp/redirect" href="./Main_Page"/>
9370 Redirect to category (T104502)
9372 parsoid=wt2html,wt2wt
9374 #REDIRECT [[Category:Foo]]
9376 <link rel="mw:PageProp/redirect" href="./Category:Foo"/>
9380 Redirect to category with URL encoding (T104502)
9384 #REDIRECT [[Category%3AFoo]]
9386 <link rel="mw:PageProp/redirect" href="./Category:Foo"/>
9390 Redirect to category page
9392 #REDIRECT [[:Category:Foo]]
9394 <link rel="mw:PageProp/redirect" href="./Category:Foo"/>
9398 Redirect to image page (1)
9400 #REDIRECT [[File:Wiki.png]]
9402 <link rel="mw:PageProp/redirect" href="./File:Wiki.png"/>
9406 Redirect to image page (2)
9408 #REDIRECT [[Image:Wiki.png]]
9410 <link rel="mw:PageProp/redirect" href="./File:Wiki.png" data-parsoid='{"src":"#REDIRECT ","a":{"href":"./File:Wiki.png"},"sa":{"href":"Image:Wiki.png"}}'/>
9413 # html2wt disabled because wts serializes as "#REDIRECT [[:en:File:Wiki.png]]"
9414 # Next test confirms this.
9416 Redirect to language (1) (T104918)
9418 parsoid=wt2html,wt2wt,html2html
9420 #REDIRECT [[en:File:Wiki.png]]
9422 <link rel="mw:PageProp/redirect" href="//en.wikipedia.org/wiki/File:Wiki.png"/>
9426 Redirect to language (2) (T104918)
9428 #REDIRECT [[:en:File:Wiki.png]]
9430 <link rel="mw:PageProp/redirect" href="//en.wikipedia.org/wiki/File:Wiki.png"/>
9434 Redirect to interwiki (T104918)
9436 #REDIRECT [[meatball:File:Wiki.png]]
9438 <link rel="mw:PageProp/redirect" href="http://www.usemod.com/cgi-bin/mb.pl?File:Wiki.png"/>
9442 Non-English #REDIRECT
9446 #TILVÍSUN [[Main Page]]
9448 <link rel="mw:PageProp/redirect" href="./Main_Page" data-parsoid='{"src":"#TILVÍSUN ","a":{"href":"./Main_Page"},"sa":{"href":"Main Page"}}'/>
9452 Redirect syntax under text isn't considered a redirect
9456 #redirect [[Main Page]]
9459 <ol data-parsoid='{}'><li data-parsoid='{}'>redirect <a rel="mw:WikiLink" href="./Main_Page" title="Main Page" data-parsoid='{"stx":"simple","a":{"href":"./Main_Page"},"sa":{"href":"Main Page"}}'>Main Page</a></li></ol>
9467 <p>Foo<link rel="mw:PageProp/redirect" href="./Foo"/></p>
9474 Redirect followed by block on the same line
9478 #REDIRECT [[Main Page]]<!-- haha -->==hi==
9480 <link rel="mw:PageProp/redirect" href="./Main_Page"/><!-- haha --><h2 id="hi">hi</h2>
9484 Redirect followed by a newline
9486 #REDIRECT [[Main Page]]
9489 <link rel="mw:PageProp/redirect" href="./Main_Page"/>
9494 Redirect followed by multiple newlines
9496 #REDIRECT [[Main Page]]
9501 <link rel="mw:PageProp/redirect" href="./Main_Page"/>
9508 Drop duplicate redirects
9512 <link rel="mw:PageProp/redirect" href="./Foo"/>
9513 <link rel="mw:PageProp/redirect" href="./Bar"/>
9514 <link rel="mw:PageProp/redirect" href="./Baz"/>
9533 Broken br tag sanitization
9541 # TODO: Fix html2html mode (T53055)!
9543 Parsoid: Broken br tag recognition
9557 Incorrecly removing closing slashes from correctly formed XHTML
9559 <br style="clear:both;" />
9561 <p><br style="clear:both;" />
9566 Failing to transform badly formed HTML into correct XHTML
9568 <br style="clear: left;">
9569 <br style="clear: right;">
9570 <br style="clear: both;">
9572 <p><br style="clear: left;" />
9573 <br style="clear: right;" />
9574 <br style="clear: both;" />
9578 ## FIXME: Is Parsoid's acceptance of self-closing html-tags
9579 ## a feature or a bug? See https://phabricator.wikimedia.org/T76962
9581 Handling html with a div self-closing tag
9590 <p><div title />
9594 <p><div title=bar />
9595 <div title=bar/>
9597 <div title="bar/"></div>
9601 <div title="" data-parsoid='{"stx":"html","selfClose":true}'></div>
9602 <div title="" data-parsoid='{"stx":"html","selfClose":true}'></div>
9603 <div title="" data-parsoid='{"stx":"html","autoInsertedEnd":true}'>
9604 <div title="bar" data-parsoid='{"stx":"html","selfClose":true}'></div>
9605 <div title="bar" data-parsoid='{"stx":"html","selfClose":true}'></div>
9606 <div title="bar/" data-parsoid='{"stx":"html","autoInsertedEnd":true}'></div></div>
9610 Elements with solidus in various attribute positions
9612 parsoid=wt2html,html2html
9614 <div cla/ss="123">ha</div>
9616 <div / class="123">ha</div>
9618 <div class= / "123">ha</div>
9621 <div class="123">ha</div>
9622 <div class="/">ha</div>
9624 <div data-parsoid='{"stx":"html","a":{"cla":null,"ss":null},"sa":{"cla":"","ss":"123"}}'>ha</div>
9626 <div class="123" data-parsoid='{"stx":"html"}'>ha</div>
9628 <div class="/" data-parsoid='{"stx":"html","a":{"\"123\"":null},"sa":{"\"123\"":""}}'>ha</div>
9632 Handling html with a br self-closing tag
9659 Horizontal ruler (should it add that extra space?)
9668 foo </p><hr /><p> bar
9673 Horizontal ruler -- 4+ dashes render hr
9682 Horizontal ruler -- eats additional dashes on the same line
9691 Horizontal ruler -- does not collapse dashes on consecutive lines
9702 Horizontal ruler -- <4 dashes render as plain text
9711 Horizontal ruler -- Supports content following dashes on same line
9723 ### Block-level elements
9732 <ul><li>Common list</li>
9734 <li>item 3</li></ul>
9745 <ol><li>Numbered list</li>
9747 <li>item 3</li></ol>
9751 # the switch from level 3 to ordered should not introduce a newline between
9762 ***#Number on level 4
9764 **#Number on level 3
9765 **#Number on level 3
9769 #**Level 3, but ordered
9772 <ol><li>with numbers</li></ol>
9773 <ul><li>and bullets</li></ul>
9774 <ol><li>and numbers</li></ol></li>
9776 <ul><li>bullet level 2
9777 <ul><li>bullet level 3
9778 <ol><li>Number on level 4</li></ol></li></ul></li>
9780 <ol><li>Number on level 3</li>
9781 <li>Number on level 3</li></ol></li></ul>
9782 <ol><li>number level 2</li></ol></li>
9784 <ul><li><ul><li>Level 3</li></ul></li></ul></li></ul>
9785 <ol><li><ul><li><ul><li>Level 3, but ordered</li></ul></li></ul></li></ol>
9790 1. Nested mixed wikitext and html list
9793 *<ul><li>ho</li></ul>
9798 <li><ul><li>ho</li></ul></li>
9800 <ul><li>ho</li></ul></li></ul>
9804 <li><ul data-parsoid='{"stx":"html"}'><li data-parsoid='{"stx":"html"}'>ho</li></ul></li>
9806 <ul><li>ho</li></ul></li></ul>
9810 2. Nested mixed wikitext and html list (incompatible)
9813 :{{echo|<li>ho</li>}}
9816 <dd><li>ho</li></dd></dl>
9820 <dd><li about="#mwt1" typeof="mw:Transclusion" data-parsoid='{"stx":"html","pi":[[{"k":"1"}]]}' data-mw='{"parts":[{"template":{"target":{"wt":"echo","href":"./Template:Echo"},"params":{"1":{"wt":"<li>ho</li>"}},"i":0}}]}'>ho</li></dd></dl>
9830 <ul><li>bar</li></ul></li></ul>
9840 <ul><li><ul><li>foo</li></ul></li>
9846 Nested lists 3 (first element empty)
9852 <ul><li>bar</li></ul></li></ul>
9857 Nested lists 4 (first element empty)
9862 <ul><li><ul><li></li></ul></li>
9868 Nested lists 5 (both elements empty)
9873 <ul><li><ul><li></li></ul></li>
9879 Nested lists 6 (both elements empty)
9885 <ul><li></li></ul></li></ul>
9890 Nested lists 7 (skip initial nesting levels)
9894 <ul><li><ul><li><ul><li>foo</li></ul></li></ul></li></ul>
9899 Nested lists 8 (multiple nesting transitions)
9907 <ul><li><ul><li>bar</li></ul></li>
9908 <li>baz</li></ul></li>
9914 Nested lists 9 (extension interaction)
9920 <ul><li data-parsoid='{}'><ol class="mw-references references" typeof="mw:Extension/references" about="#mwt2" data-parsoid='{}' data-mw='{"name":"references","attrs":{}}'></ol></li></ul>
9924 1. Lists with start-of-line-transparent tokens before bullets: Comments
9937 Nested lists 10 (list and span siblings: wt2wt regression)
9942 <ul><li>a <span>x</span>
9943 <ul><li>b <span>y</span></li></ul></li></ul>
9947 2. Lists with start-of-line-transparent tokens before bullets: Template close
9952 <ul><li>foo bar</li>
9958 List items are not parsed correctly following a <pre> block (T2785)
9964 <ul><li><pre>foo</pre></li>
9965 <li><pre>bar</pre></li>
9969 <ul><li><pre typeof="mw:Extension/pre" about="#mwt2" data-mw='{"name":"pre","attrs":{},"body":{"extsrc":"foo"}}'>foo</pre></li>
9970 <li><pre typeof="mw:Extension/pre" about="#mwt4" data-mw='{"name":"pre","attrs":{},"body":{"extsrc":"bar"}}'>bar</pre></li>
9974 # FIXME: Might benefit from a html/parsoid since this has a template
9976 List items from template
9987 *notSOL{{inner list}}
9991 <li>item 2</li></ul>
9994 <li>item 2</li></ul>
9998 <li>item 2</li></ul>
10003 List interrupted by empty line or heading
10011 <ul><li>foo</li></ul>
10012 <ul><li><ul><li>bar</li></ul></li></ul>
10013 <h2><span class="mw-headline" id="A_heading">A heading</span><span class="mw-editsection"><span class="mw-editsection-bracket">[</span><a href="/index.php?title=Parser_test&action=edit&section=1" title="Edit section: A heading">edit</a><span class="mw-editsection-bracket">]</span></span></h2>
10014 <ul><li>Another list item</li></ul>
10019 Multiple list tags generated by templates
10038 <li about="#mwt1" typeof="mw:Transclusion" data-parsoid='{"stx":"html","autoInsertedEnd":true,"pi":[[{"k":"1"}]]}' data-mw='{"parts":[{"template":{"target":{"wt":"echo","href":"./Template:Echo"},"params":{"1":{"wt":"<li>"}},"i":0}},"a"]}'>a</li>
10039 <li about="#mwt2" typeof="mw:Transclusion" data-parsoid='{"stx":"html","autoInsertedEnd":true,"pi":[[{"k":"1"}]]}' data-mw='{"parts":[{"template":{"target":{"wt":"echo","href":"./Template:Echo"},"params":{"1":{"wt":"<li>"}},"i":0}},"b"]}'>b</li>
10040 <li about="#mwt3" typeof="mw:Transclusion" data-parsoid='{"stx":"html","autoInsertedEnd":true,"pi":[[{"k":"1"}]]}' data-mw='{"parts":[{"template":{"target":{"wt":"echo","href":"./Template:Echo"},"params":{"1":{"wt":"<li>"}},"i":0}},"c"]}'>c</li>
10044 Multiple newlines in between HTML list items don't induce paragraph wrapping
10057 <dd>ho<div>123</div>
10073 <dd>ho<div>123</div>
10081 Single-comment whitespace lines dont break lists, and neither do multi-comment whitespace lines
10084 <!--This line will NOT split the list-->
10086 <!--This line will NOT split the list either-->
10088 <!--foo--> <!----> <!--This line NOT split the list either-->
10099 Replacing whitespace with tabs still doesn't break the list (gerrit 78327)
10102 <!--This line will NOT split the list-->
10104 <!--This line will NOT split the list either-->
10106 <!--foo--> <!----> <!--This line NOT split the list
10117 # FIXME: Parsoid has a dedicated DOM pass to mimic this Tidy-specific li-hack
10118 # That pass could possibly be removed.
10120 Test the li-hack (a hack from Tidy days, but doesn't work as advertised with Remex)
10122 parsoid=wt2html,wt2wt
10126 *{{echo|<li>templated li-hack}}
10127 *<!--foo--><li> unsupported li-hack with preceding comments
10130 <li><li>not a li-hack
10135 <li class="mw-empty-elt"></li><li>li-hack</li>
10136 <li class="mw-empty-elt"></li><li>templated li-hack</li>
10137 <li class="mw-empty-elt"></li><li> unsupported li-hack with preceding comments</li></ul>
10139 <li class="mw-empty-elt"></li><li>not a li-hack
10144 <li data-parsoid='{"stx":"html","autoInsertedEnd":true,"liHackSrc":"*"}'>li-hack</li>
10145 <li about="#mwt1" typeof="mw:Transclusion" data-parsoid='{"stx":"html","autoInsertedEnd":true,,"pi":[[{"k":"1"}]]}' data-mw='{"parts":["*",{"template":{"target":{"wt":"echo","href":"./Template:Echo"},"params":{"1":{"wt":"<li>templated li-hack"}},"i":0}}]}'>templated li-hack</li>
10146 <li data-parsoid='{"autoInsertedEnd":true}'><!--foo--></li><li data-parsoid='{"stx":"html","autoInsertedEnd":true}'>unsupported li-hack with preceding comments</li></ul>
10148 <ul data-parsoid='{"stx":"html"}'>
10149 <li class="mw-empty-elt" data-parsoid='{"stx":"html","autoInsertedEnd":true}'></li><li data-parsoid='{"stx":"html"}'>not a li-hack
10156 Parsoid: Make sure nested lists are serialized on their own line even if HTML contains no newlines
10185 Parsoid: Test of whitespace serialization with Templated bullets
10192 <li class="mw-empty-elt"> </li><li about="#mwt1" typeof="mw:Transclusion" data-mw='{"parts":[{"template":{"target":{"wt":"bullet","href":"./Template:Bullet"},"params":{},"i":0}}]}'> Bar</li>
10196 # ------------------------------------------------------------------------
10197 # The next set of tests are about Parsoid's ability to handle badly nested
10198 # tags (parse, minimize scope of fixup, and roundtrip back)
10199 # ------------------------------------------------------------------------
10201 # Remex and Parsoid output stems from list handling diffs because Parsoid & PHP parser.
10202 # Parsoid's list handling is more aware of block structure.
10204 Unbalanced closing block tags break a list
10211 <ul><li>a</li></ul></div><div>
10223 Unbalanced closing non-block tags don't break a list
10225 parsoid=wt2html,html2html
10233 <ul><li>a<span></span></li>
10236 <p><span data-parsoid='{"stx":"html","autoInsertedEnd":true}'></span></p>
10237 <ul><li>a<span data-parsoid='{"stx":"html","autoInsertedEnd":true}'></span></li>
10241 # Parsoid does some post-dom-building cleanup
10242 # which is why its output differs from Remex.
10244 Unclosed formatting tags that straddle lists are closed and reopened
10246 parsoid=wt2html,wt2wt,html2html
10251 <ol><li><s> a</s></li><s>
10252 </s><li><s>b </s></li></ol>
10254 <ol><li><s> a</s></li>
10255 <li><s>b </s></li></ol>
10258 # Output is ugly because of all the misnested tag fixups.
10260 1. List embedded in a formatting tag
10267 </small></p><small><ul><li>foo</li></ul></small><small></small><p><small></small>
10270 <p><small data-parsoid='{"stx":"html","autoInsertedEnd":true}'></small></p><small data-parsoid='{"stx":"html","autoInsertedEnd":true,"autoInsertedStart":true}'>
10271 <ul><li data-parsoid='{}'>foo</li></ul></small>
10272 <p><small data-parsoid='{"stx":"html","autoInsertedStart":true}'></small></p>
10275 # Output is ugly because of all the misnested tag fixups.
10277 2. List embedded in a formatting tag in a misnested way
10284 </small></p><small></small><ul><small><li>a</li>
10285 </small><li><small>b</small></li></ul>
10287 <p><small data-parsoid='{"stx":"html","autoInsertedEnd":true}'></small></p>
10288 <ul><small data-parsoid='{"stx":"html","autoInsertedEnd":true,"autoInsertedStart":true}'><li>a</li></small>
10289 <li><small data-parsoid='{"stx":"html","autoInsertedStart":true}'>b</small></li></ul>
10292 # Output is ugly because of all the misnested tag fixups.
10294 3. List embedded in a formatting tag in a misnested way
10301 </small></p><small></small><ul><small></small><li><small></small><ul><small></small><li><small>123</small></li></ul></li></ul>
10303 <p><small data-parsoid='{"stx":"html","autoInsertedEnd":true}'></small></p>
10305 <ul><li><ul><li data-parsoid='{}'><small data-parsoid='{"stx":"html","autoInsertedStart":true}'> 123</small></li></ul></li></ul>
10312 # Note that the current date is hard-coded as
10313 # 1970-01-01T00:02:03Z (a Thursday)
10314 # when running parser tests. The timezone is also fixed to GMT, so
10315 # local date will be identical to current date.
10318 Magic Word: {{CURRENTDAY}}
10327 Magic Word: {{CURRENTDAY2}}
10336 Magic Word: {{CURRENTDAYNAME}}
10345 Magic Word: {{CURRENTDOW}}
10354 Magic Word: {{CURRENTMONTH}}
10363 Magic Word: {{CURRENTMONTH1}}
10372 Magic Word: {{CURRENTMONTHABBREV}}
10374 {{CURRENTMONTHABBREV}}
10381 Magic Word: {{CURRENTMONTHNAME}}
10383 {{CURRENTMONTHNAME}}
10390 Magic Word: {{CURRENTMONTHNAMEGEN}}
10392 {{CURRENTMONTHNAMEGEN}}
10399 Magic Word: {{CURRENTTIME}}
10408 Magic Word: {{CURRENTHOUR}}
10417 Magic Word: {{CURRENTWEEK}} (T6594)
10426 Magic Word: {{CURRENTYEAR}}
10435 Magic Word: {{CURRENTTIMESTAMP}}
10437 {{CURRENTTIMESTAMP}}
10444 Magic Words LOCAL (UTC)
10448 *{{LOCALMONTHNAME}}
10449 *{{LOCALMONTHNAMEGEN}}
10450 *{{LOCALMONTHABBREV}}
10459 *{{LOCALTIMESTAMP}}
10474 <li>19700101000203</li></ul>
10479 Magic Word: {{FULLPAGENAME}}
10481 title=[[User:Ævar Arnfjörð Bjarmason]]
10482 parsoid={ "modes": ["wt2html","wt2wt"], "normalizePhp": true }
10486 <p>User:Ævar Arnfjörð Bjarmason
10491 Magic Word: {{FULLPAGENAMEE}}
10493 title=[[User:Ævar Arnfjörð Bjarmason]]
10494 parsoid={ "modes": ["wt2html","wt2wt"], "normalizePhp": true }
10498 <p>User:%C3%86var_Arnfj%C3%B6r%C3%B0_Bjarmason
10503 Magic Word: {{TALKSPACE}}
10505 title=[[User:Ævar Arnfjörð Bjarmason]]
10506 parsoid={ "modes": ["wt2html","wt2wt"], "normalizePhp": true }
10515 Magic Word: {{TALKSPACE}}, same namespace
10517 title=[[User talk:Ævar Arnfjörð Bjarmason]]
10518 parsoid={ "modes": ["wt2html","wt2wt"], "normalizePhp": true }
10527 Magic Word: {{TALKSPACE}}, main namespace
10529 title=[[Parser Test]]
10530 parsoid={ "modes": ["wt2html","wt2wt"], "normalizePhp": true }
10539 Magic Word: {{TALKSPACEE}}
10541 title=[[User:Ævar Arnfjörð Bjarmason]]
10542 parsoid={ "modes": ["wt2html","wt2wt"], "normalizePhp": true }
10551 Magic Word: {{SUBJECTSPACE}}
10553 title=[[User talk:Ævar Arnfjörð Bjarmason]]
10554 parsoid={ "modes": ["wt2html","wt2wt"], "normalizePhp": true }
10563 Magic Word: {{SUBJECTSPACE}}, same namespace
10565 title=[[User:Ævar Arnfjörð Bjarmason]]
10566 parsoid={ "modes": ["wt2html","wt2wt"], "normalizePhp": true }
10575 Magic Word: {{SUBJECTSPACE}}, main namespace
10577 title=[[Parser Test]]
10578 parsoid={ "modes": ["wt2html","wt2wt"], "normalizePhp": true }
10586 Magic Word: {{SUBJECTSPACEE}}
10588 title=[[User talk:Ævar Arnfjörð Bjarmason]]
10589 parsoid={ "modes": ["wt2html","wt2wt"], "normalizePhp": true }
10598 Magic Word: {{NAMESPACE}}
10600 title=[[User:Ævar Arnfjörð Bjarmason]]
10601 parsoid={ "modes": ["wt2html","wt2wt"], "normalizePhp": true }
10610 Magic Word: {{NAMESPACEE}}
10612 title=[[User:Ævar Arnfjörð Bjarmason]]
10613 parsoid={ "modes": ["wt2html","wt2wt"], "normalizePhp": true }
10622 Magic Word: {{NAMESPACENUMBER}}
10624 title=[[User:Ævar Arnfjörð Bjarmason]]
10625 parsoid={ "modes": ["wt2html","wt2wt"], "normalizePhp": true }
10627 {{NAMESPACENUMBER}}
10634 Magic Word: {{SUBPAGENAME}}
10636 title=[[Ævar Arnfjörð Bjarmason/sub ö]] subpage
10637 parsoid={ "modes": ["wt2html","wt2wt"], "normalizePhp": true }
10646 Magic Word: {{SUBPAGENAMEE}}
10648 title=[[Ævar Arnfjörð Bjarmason/sub ö]] subpage
10649 parsoid={ "modes": ["wt2html","wt2wt"], "normalizePhp": true }
10658 Magic Word: {{ROOTPAGENAME}}
10660 title=[[Ævar Arnfjörð Bjarmason/sub/sub2]] subpage
10661 parsoid={ "modes": ["wt2html","wt2wt"], "normalizePhp": true }
10665 <p>Ævar Arnfjörð Bjarmason
10670 Magic Word: {{ROOTPAGENAMEE}}
10672 title=[[Ævar Arnfjörð Bjarmason/sub/sub2]] subpage
10673 parsoid={ "modes": ["wt2html","wt2wt"], "normalizePhp": true }
10677 <p>%C3%86var_Arnfj%C3%B6r%C3%B0_Bjarmason
10682 Magic Word: {{BASEPAGENAME}}
10684 title=[[Ævar Arnfjörð Bjarmason/sub]] subpage
10685 parsoid={ "modes": ["wt2html","wt2wt"], "normalizePhp": true }
10689 <p>Ævar Arnfjörð Bjarmason
10694 Magic Word: {{BASEPAGENAMEE}}
10696 title=[[Ævar Arnfjörð Bjarmason/sub]] subpage
10697 parsoid={ "modes": ["wt2html","wt2wt"], "normalizePhp": true }
10701 <p>%C3%86var_Arnfj%C3%B6r%C3%B0_Bjarmason
10706 Magic Word: {{TALKPAGENAME}}
10708 title=[[User:Ævar Arnfjörð Bjarmason]]
10709 parsoid={ "modes": ["wt2html","wt2wt"], "normalizePhp": true }
10713 <p>User talk:Ævar Arnfjörð Bjarmason
10718 Magic Word: {{TALKPAGENAMEE}}
10720 title=[[User:Ævar Arnfjörð Bjarmason]]
10721 parsoid={ "modes": ["wt2html","wt2wt"], "normalizePhp": true }
10725 <p>User_talk:%C3%86var_Arnfj%C3%B6r%C3%B0_Bjarmason
10730 Magic Word: {{SUBJECTPAGENAME}}
10732 title=[[User talk:Ævar Arnfjörð Bjarmason]]
10733 parsoid={ "modes": ["wt2html","wt2wt"], "normalizePhp": true }
10735 {{SUBJECTPAGENAME}}
10737 <p>User:Ævar Arnfjörð Bjarmason
10742 Magic Word: {{SUBJECTPAGENAMEE}}
10744 title=[[User talk:Ævar Arnfjörð Bjarmason]]
10745 parsoid={ "modes": ["wt2html","wt2wt"], "normalizePhp": true }
10747 {{SUBJECTPAGENAMEE}}
10749 <p>User:%C3%86var_Arnfj%C3%B6r%C3%B0_Bjarmason
10754 Magic Word: {{NUMBEROFFILES}}
10756 parsoid={ "modes": ["wt2html","wt2wt"], "normalizePhp": true }
10765 Magic Word: {{PAGENAME}}
10767 title=[[User:Ævar Arnfjörð Bjarmason]]
10768 parsoid={ "modes": ["wt2html","wt2wt"], "normalizePhp": true }
10772 <p>Ævar Arnfjörð Bjarmason
10777 Magic Word: {{PAGENAME}} with metacharacters
10779 title=[['foo & bar = baz']]
10780 parsoid={ "modes": ["wt2html","wt2wt"], "normalizePhp": true }
10784 <p><i>'foo & bar = baz'</i>
10789 Magic Word: {{PAGENAME}} with metacharacters (T28781)
10791 title=[[*RFC 1234 http://example.com/]]
10792 parsoid={ "modes": ["wt2html","wt2wt"], "normalizePhp": true }
10796 <p>*RFC 1234 http://example.com/
10801 Magic Word: {{PAGENAMEE}}
10803 title=[[User:Ævar Arnfjörð Bjarmason]]
10804 parsoid={ "modes": ["wt2html","wt2wt"], "normalizePhp": true }
10808 <p>%C3%86var_Arnfj%C3%B6r%C3%B0_Bjarmason
10813 Magic Word: {{PAGENAMEE}} with metacharacters (T28781)
10815 title=[[*RFC 1234 http://example.com/]]
10816 parsoid={ "modes": ["wt2html","wt2wt"], "normalizePhp": true }
10820 <p>*RFC_1234_http://example.com/
10825 Magic Word: {{REVISIONID}}
10827 parsoid={ "modes": ["wt2html","wt2wt"], "normalizePhp": true }
10834 flags=vary-revision-id
10838 Magic Word: {{SCRIPTPATH}}
10840 parsoid={ "modes": ["wt2html","wt2wt"], "normalizePhp": true }
10848 Magic Word: {{STYLEPATH}}
10850 parsoid={ "modes": ["wt2html","wt2wt"], "normalizePhp": true }
10859 Magic Word: {{SERVER}}
10861 parsoid={ "modes": ["wt2html","wt2wt"], "normalizePhp": true }
10865 <p><a rel="nofollow" class="external free" href="http://example.org">http://example.org</a>
10870 Magic Word: {{SERVERNAME}}
10872 parsoid={ "modes": ["wt2html","wt2wt"], "normalizePhp": true }
10881 Magic Word: {{SITENAME}}
10883 parsoid={ "modes": ["wt2html","wt2wt"], "normalizePhp": true }
10892 Magic Word: {{PAGELANGUAGE}}
10895 parsoid={ "modes": ["wt2html","wt2wt"], "normalizePhp": true }
10904 Magic Word: {{PAGELANGUAGE}} on a page with no explicitly set language
10906 parsoid={ "modes": ["wt2html","wt2wt"], "normalizePhp": true }
10915 Case-sensitive magic words, when cased differently, should just be template transclusions
10922 <p><a href="/index.php?title=Template:CurrentMonth&action=edit&redlink=1" class="new" title="Template:CurrentMonth (page does not exist)">Template:CurrentMonth</a>
10923 <a href="/index.php?title=Template:Currentday&action=edit&redlink=1" class="new" title="Template:Currentday (page does not exist)">Template:Currentday</a>
10924 <a href="/index.php?title=Template:CURreNTweEK&action=edit&redlink=1" class="new" title="Template:CURreNTweEK (page does not exist)">Template:CURreNTweEK</a>
10925 <a href="/index.php?title=Template:CurrentHour&action=edit&redlink=1" class="new" title="Template:CurrentHour (page does not exist)">Template:CurrentHour</a>
10930 Case-insensitive magic words should still work with weird casing.
10940 <a rel="nofollow" class="external free" href="http://example.org">http://example.org</a>
10944 # From plwiki:PLOS_ONE
10946 Parsoid: Page property magic word with magic word contents
10948 {{DISPLAYTITLE:''{{PAGENAME}}''}}
10950 <meta property="mw:PageProp/displaytitle" content="Main Page" about="#mwt3" typeof="mw:ExpandedAttrs" data-parsoid='{"src":"{{DISPLAYTITLE:''{{PAGENAME}}''}}"}' data-mw='{"attribs":[[{"txt":"content"},{"html":"DISPLAYTITLE:<i data-parsoid='{\"dsr\":[15,31,2,2]}'><span about=\"#mwt1\" typeof=\"mw:Transclusion\" data-parsoid='{\"pi\":[[]],\"dsr\":[17,29,null,null]}' data-mw='{\"parts\":[{\"template\":{\"target\":{\"wt\":\"PAGENAME\",\"function\":\"pagename\"},\"params\":{},\"i\":0}}]}'>Main Page</span></i>"}]]}'/>
10953 # NOTE: mw:ExpandedAttrs is not the best typeof here. mw:Transclusion is better.
10954 # But, this is a limitation of our representation and is documented in
10955 # TemplateHandler.js in processSpecialMagicWord
10957 Parsoid: Template-generated DISPLAYTITLE
10959 {{{{echo|DISPLAYTITLE}}:Foo}}
10963 wgAllowDisplayTitle=true
10964 wgRestrictDisplayTitle=false
10969 <meta property="mw:PageProp/displaytitle" content="Foo" about="#mwt1" typeof="mw:ExpandedAttrs" data-parsoid='{"pi":[[]]}' data-mw='{"attribs":[[{"txt":"content"},{"html":"<span about=\"#mwt1\" typeof=\"mw:Transclusion\" data-parsoid='{\"pi\":[[{\"k\":\"1\"}]],\"dsr\":[2,23,null,null]}' data-mw='{\"parts\":[{\"template\":{\"target\":{\"wt\":\"echo\",\"href\":\"./Template:Echo\"},\"params\":{\"1\":{\"wt\":\"DISPLAYTITLE\"}},\"i\":0}}]}'>DISPLAYTITLE</span>:Foo"}]]}'/>
10973 Namespace 1 {{ns:1}}
10982 Namespace 1 {{ns:01}}
10991 Namespace 0 {{ns:0}} (T6783)
10999 Namespace 0 {{ns:00}} (T6783)
11007 Namespace -1 {{ns:-1}}
11016 Namespace User {{ns:User}}
11025 Namespace User talk {{ns:User_talk}}
11034 Namespace User talk {{ns:uSeR tAlK}}
11043 Namespace File {{ns:File}}
11052 Namespace File {{ns:Image}}
11061 Namespace (lang=de) Benutzer {{ns:User}}
11072 Namespace (lang=de) Benutzer Diskussion {{ns:3}}
11078 <p>Benutzer Diskussion
11085 {{urlencode:hi world?!}}
11086 {{urlencode:hi world?!|WIKI}}
11087 {{urlencode:hi world?!|PATH}}
11088 {{urlencode:hi world?!|QUERY}}
11098 Magic Word: prioritize type info over data-parsoid
11102 <meta property="mw:PageProp/forcetoc" data-parsoid='{"magicSrc":"__NOTOC__"}'/>
11108 Magic Word: serialize on separate line (parsoid)
11110 parsoid=wt2wt,html2wt
11116 foo<meta property="mw:PageProp/notoc"/>bar
11120 Magic Word: rt non-english wikis
11127 <meta property="mw:PageProp/noeditsection" data-parsoid='{"magicSrc":"__NOEDITSECTION__"}'/>
11131 __proto__ is treated as normal wikitext (T105997)
11143 Magic links: internal link to RFC (T2479)
11147 <p><a href="/index.php?title=RFC_123&action=edit&redlink=1" class="new" title="RFC 123 (page does not exist)">RFC 123</a>
11150 <p><a rel="mw:WikiLink" href="./RFC_123" title="RFC 123">RFC 123</a></p>
11154 Magic links: RFC (T2479)
11158 <p><a class="external mw-magiclink-rfc" rel="nofollow" href="https://tools.ietf.org/html/rfc822">RFC 822</a>
11161 <p><a href="https://tools.ietf.org/html/rfc822" rel="mw:ExtLink" class="external mw-magiclink">RFC 822</a></p>
11165 Magic links: RFC (T67278)
11167 This is RFC 822 but thisRFC 822 is not RFC 822linked.
11169 <p>This is <a class="external mw-magiclink-rfc" rel="nofollow" href="https://tools.ietf.org/html/rfc822">RFC 822</a> but thisRFC 822 is not RFC 822linked.
11172 <p>This is <a href="https://tools.ietf.org/html/rfc822" rel="mw:ExtLink" class="external mw-magiclink">RFC 822</a> but thisRFC 822 is not RFC 822linked.</p>
11176 Magic links: RFC (w/ non-newline whitespace, T30950/T31025)
11178 RFC      822
11182 <p><a class="external mw-magiclink-rfc" rel="nofollow" href="https://tools.ietf.org/html/rfc822">RFC 822</a>
11187 <p><a href="https://tools.ietf.org/html/rfc822" rel="mw:ExtLink" class="external mw-magiclink">RFC <span typeof="mw:Entity" data-parsoid='{"src":"&nbsp;","srcContent":" "}'> </span><span typeof="mw:Entity" data-parsoid='{"src":"&#160;","srcContent":" "}'> </span><span typeof="mw:Entity" data-parsoid='{"src":"&#0160;","srcContent":" "}'> </span><span typeof="mw:Entity" data-parsoid='{"src":"&#xA0;","srcContent":" "}'> </span><span typeof="mw:Entity" data-parsoid='{"src":"&#Xa0;","srcContent":" "}'> </span> 822</a>
11193 Magic links: ISBN (T3937)
11197 <p><a href="/wiki/Special:BookSources/0306406152" class="internal mw-magiclink-isbn">ISBN 0-306-40615-2</a>
11200 <p><a href="./Special:BookSources/0306406152" rel="mw:WikiLink">ISBN 0-306-40615-2</a></p>
11204 Magic links: ISBN (T67278)
11206 This is ISBN 978-0-316-09811-3 but thisISBN 978-0-316-09811-3 is not ISBN 978-0-316-09811-3linked.
11208 <p>This is <a href="/wiki/Special:BookSources/9780316098113" class="internal mw-magiclink-isbn">ISBN 978-0-316-09811-3</a> but thisISBN 978-0-316-09811-3 is not ISBN 978-0-316-09811-3linked.
11211 <p>This is <a href="./Special:BookSources/9780316098113" rel="mw:WikiLink">ISBN 978-0-316-09811-3</a> but thisISBN 978-0-316-09811-3 is not ISBN 978-0-316-09811-3linked.</p>
11215 Magic links: ISBN (w/ non-newline whitespace, T30950/T31025)
11217 ISBN      978 0 316 09811 3
11223 <p><a href="/wiki/Special:BookSources/9780316098113" class="internal mw-magiclink-isbn">ISBN 978 0 316 09811 3</a>
11230 <p><a href="./Special:BookSources/9780316098113" rel="mw:WikiLink">ISBN <span typeof="mw:Entity" data-parsoid='{"src":"&nbsp;","srcContent":" "}'> </span><span typeof="mw:Entity" data-parsoid='{"src":"&#160;","srcContent":" "}'> </span><span typeof="mw:Entity" data-parsoid='{"src":"&#0160;","srcContent":" "}'> </span><span typeof="mw:Entity" data-parsoid='{"src":"&#xA0;","srcContent":" "}'> </span><span typeof="mw:Entity" data-parsoid='{"src":"&#Xa0;","srcContent":" "}'> </span> 978<span typeof="mw:Entity" data-parsoid='{"src":"&nbsp;","srcContent":" "}'> </span>0<span typeof="mw:Entity" data-parsoid='{"src":"&#160;","srcContent":" "}'> </span>316<span typeof="mw:Entity" data-parsoid='{"src":"&#0160;","srcContent":" "}'> </span>09811<span typeof="mw:Entity" data-parsoid='{"src":"&#xA0;","srcContent":" "}'> </span>3</a>
11238 Magic links: PMID incorrectly converts space to underscore
11242 <p><a class="external mw-magiclink-pmid" rel="nofollow" href="//www.ncbi.nlm.nih.gov/pubmed/1234?dopt=Abstract">PMID 1234</a>
11245 <p><a href="//www.ncbi.nlm.nih.gov/pubmed/1234?dopt=Abstract" rel="mw:ExtLink" class="external mw-magiclink">PMID 1234</a></p>
11249 Magic links: PMID (T67278)
11251 This is PMID 1234 but thisPMID 1234 is not PMID 1234linked.
11253 <p>This is <a class="external mw-magiclink-pmid" rel="nofollow" href="//www.ncbi.nlm.nih.gov/pubmed/1234?dopt=Abstract">PMID 1234</a> but thisPMID 1234 is not PMID 1234linked.
11256 <p>This is <a href="//www.ncbi.nlm.nih.gov/pubmed/1234?dopt=Abstract" rel="mw:ExtLink" class="external mw-magiclink">PMID 1234</a> but thisPMID 1234 is not PMID 1234linked.</p>
11260 Magic links: PMID (w/ non-newline whitespace, T30950/T31025)
11262 PMID      1234
11266 <p><a class="external mw-magiclink-pmid" rel="nofollow" href="//www.ncbi.nlm.nih.gov/pubmed/1234?dopt=Abstract">PMID 1234</a>
11271 <p><a href="//www.ncbi.nlm.nih.gov/pubmed/1234?dopt=Abstract" rel="mw:ExtLink" class="external mw-magiclink">PMID <span typeof="mw:Entity" data-parsoid='{"src":"&nbsp;","srcContent":" "}'> </span><span typeof="mw:Entity" data-parsoid='{"src":"&#160;","srcContent":" "}'> </span><span typeof="mw:Entity" data-parsoid='{"src":"&#0160;","srcContent":" "}'> </span><span typeof="mw:Entity" data-parsoid='{"src":"&#xA0;","srcContent":" "}'> </span><span typeof="mw:Entity" data-parsoid='{"src":"&#Xa0;","srcContent":" "}'> </span> 1234</a>
11276 # <nowiki> nodes shouldn't be inserted during html2wt by Parsoid,
11277 # since these are ExtLinkText, not MagicLinkText
11279 Magic links: use appropriate serialization for "almost" magic links.
11281 X[[Special:BookSources/0978739256|foo]]
11283 X[https://tools.ietf.org/html/rfc1234 foo]
11285 <p>X<a href="/wiki/Special:BookSources/0978739256" title="Special:BookSources/0978739256">foo</a>
11286 </p><p>X<a rel="nofollow" class="external text" href="https://tools.ietf.org/html/rfc1234">foo</a>
11289 <p>X<a rel="mw:WikiLink" href="./Special:BookSources/0978739256" title="Special:BookSources/0978739256">foo</a></p>
11290 <p>X<a rel="mw:ExtLink" class="external text" href="https://tools.ietf.org/html/rfc1234">foo</a></p>
11294 Magic links: All disabled (T47942)
11296 wgEnableMagicLinks={"ISBN":false, "PMID":false, "RFC":false}
11302 <p>ISBN 0-306-40615-2
11313 Nonexistent template
11315 {{thistemplatedoesnotexist}}
11317 <p><a href="/index.php?title=Template:Thistemplatedoesnotexist&action=edit&redlink=1" class="new" title="Template:Thistemplatedoesnotexist (page does not exist)">Template:Thistemplatedoesnotexist</a>
11322 Template with invalid target containing tags
11324 {{a<b>b</b>|{{echo|foo}}|{{echo|a}}={{echo|b}}|a = b}}
11326 <p>{{a<b>b</b>|foo|a=b|a = b}}
11331 Template with invalid target containing unclosed tag
11333 {{a<b>|{{echo|foo}}|{{echo|a}}={{echo|b}}|a = b}}
11335 <p>{{a<b>|foo|a=b|a = b}}</b>
11340 Template with invalid target containing wikilink
11344 <p>{{<a href="/wiki/Main_Page" title="Main Page">Main Page</a>}}
11347 <p><span typeof="mw:Transclusion" about="#mwt1" data-mw='{"parts":[{"template":{"target":{"wt":"[[Main Page]]"},"params":{},"i":0}}]}'>{{</span><a rel="mw:WikiLink" href="./Main_Page" about="#mwt1">Main Page</a><span about="#mwt1">}}</span></p>
11351 Template with just whitespace in it, T70421
11355 <p about="#mwt1" typeof="mw:Transclusion" data-parsoid='{"pi":[[{"k":"1"}]]}' data-mw='{"parts":[{"template":{"target":{"wt":"echo","href":"./Template:Echo"},"params":{"1":{"wt":"{{ }}"}},"i":0}}]}'>{{ }}</p>
11361 This is a test template
11369 <p>This is a test template
11374 Template with explicit namespace
11378 <p>This is a test template
11386 This is a test template with parameter {{{param}}}
11392 {{paramtest|param=foo}}
11394 <p>This is a test template with parameter foo
11399 Template:paramtestnum
11401 [[{{{1}}}|{{{2}}}]]
11405 Template unnamed parameter
11407 {{paramtestnum|Main Page|the main page}}
11409 <p><a href="/wiki/Main_Page" title="Main Page">the main page</a>
11414 Template:templatesimple
11420 Template:templateredirect
11422 #redirect [[Template:templatesimple]]
11426 Template:templateasargtestnum
11432 Template:templateasargtest
11434 {{template{{{templ}}}}}
11438 Template:templateasargtest2
11444 Template with template name as unnamed argument
11446 {{templateasargtestnum|templatesimple}}
11453 Template with template name as argument
11455 {{templateasargtest|templ=simple}}
11462 Template with template name as argument (2)
11464 {{templateasargtest2|templ=templatesimple}}
11471 Template:templateasargtestdefault
11473 {{{{{templ|templatesimple}}}}}
11483 Template with default value
11485 {{templateasargtestdefault}}
11492 Template with default value (value set)
11494 {{templateasargtestdefault|templ=templa}}
11503 {{templateredirect}}
11508 <link rel="mw:PageProp/redirect" href="./Template:Templatesimple" typeof="mw:Transclusion" data-mw='{"parts":[{"template":{"target":{"wt":"templateredirect","href":"./Template:Templateredirect"},"params":{},"i":0}}]}'/>
11512 Template with argument in separate line
11514 {{ templateasargtest |
11522 Template with complex template as argument
11525 param ={{ templateasargtest |
11526 templ = simple }}}}
11528 <p>This is a test template with parameter (test)
11533 Templates with templated name
11535 {{{{echo|echo}}|foo}}
11536 {{{{echo|inner list}} }}
11540 <ul><li>item 1</li></ul>
11543 <p about="#mwt2" typeof="mw:Transclusion" data-mw='{"parts":[{"template":{"target":{"wt":"{{echo|echo}}","href":"./Template:Echo"},"params":{"1":{"wt":"foo"}},"i":0}}]}'>foo</p>
11544 <ul about="#mwt4" typeof="mw:Transclusion" data-mw='{"parts":[{"template":{"target":{"wt":"{{echo|inner list}} ","href":"./Template:Inner_list"},"params":{},"i":0}}]}'><li>item 1</li></ul>
11547 ## Regression test; the output here isn't really that interesting.
11549 Templates with templated name and top level template args
11551 {{1{{2{{{3}}}|4=5}}}}
11553 <p about="#mwt2" typeof="mw:Transclusion" data-mw='{"parts":[{"template":{"target":{"wt":"1{{2{{{3}}}|4=5}}"},"params":{},"i":0}}]}'>{{1{{2{{{3}}}|4=5}}}}</p>
11556 # Parsoid markup is deliberate "broken". This is an edge case.
11557 # See long comment in TemplateHandler.js:convertAttribsToString.
11559 Templates with invalid templated targets
11570 <p typeof="mw:Transclusion" data-mw='{"parts":[{"template":{"target":{"wt":"echo\n{{echo|foo}}\n"},"params":{},"i":0}}]}'>{{echo
11575 Template with thumb image (with link in description)
11577 {{paramtest|param=[[Image:noimage.png|thumb|[[no link|link]] [[no link|caption]]]]}}
11579 This is a test template with parameter <div class="thumb tright"><div class="thumbinner" style="width:182px;"><a href="/index.php?title=Special:Upload&wpDestFile=Noimage.png" class="new" title="File:Noimage.png">File:Noimage.png</a> <div class="thumbcaption"><a href="/index.php?title=No_link&action=edit&redlink=1" class="new" title="No link (page does not exist)">link</a> <a href="/index.php?title=No_link&action=edit&redlink=1" class="new" title="No link (page does not exist)">caption</a></div></div></div>
11582 <p>This is a test template with parameter </p><div class="thumb tright"><div class="thumbinner" style="width:182px;"><a href="/index.php?title=Special:Upload&wpDestFile=Noimage.png" class="new" title="File:Noimage.png">File:Noimage.png</a> <div class="thumbcaption"><a href="/index.php?title=No_link&action=edit&redlink=1" class="new" title="No link (page does not exist)">link</a> <a href="/index.php?title=No_link&action=edit&redlink=1" class="new" title="No link (page does not exist)">caption</a></div></div></div>
11584 <p about="#mwt1" typeof="mw:Transclusion" data-mw='{"parts":[{"template":{"target":{"wt":"paramtest","href":"./Template:Paramtest"},"params":{"param":{"wt":"[[Image:noimage.png|thumb|[[no link|link]] [[no link|caption]]]]"}},"i":0}}]}'>This is a test template with parameter </p><figure class="mw-default-size" typeof="mw:Error mw:Image/Thumb" about="#mwt1" data-mw='{"errors":[{"key":"apierror-filedoesnotexist","message":"This image does not exist."}]}'><a href="./File:Noimage.png" ><img resource="./File:Noimage.png" src="./Special:FilePath/Noimage.png" height="220" width="220"/></a><figcaption><a rel="mw:WikiLink" href="./No_link" title="No link">link</a> <a rel="mw:WikiLink" href="./No_link" title="No link">caption</a></figcaption></figure>
11588 Template:complextemplate
11590 {{{1}}} {{paramtest|
11591 param ={{{param}}}}}
11595 Template with complex arguments
11598 param ={{ templateasargtest |
11599 templ = simple }}|[[Template:complextemplate|link]]}}
11601 <p><a href="/wiki/Template:Complextemplate" title="Template:Complextemplate">link</a> This is a test template with parameter (test)
11606 T2553: link with two variables in a piped link
11609 |[[{{{1}}}|{{{2}}}]]
11614 <td>[[{{{1}}}|{{{2}}}]]
11619 <tbody><tr><td>[[<span about="#mwt5" typeof="mw:Param" data-mw='{"parts":[{"templatearg":{"target":{"wt":"1"},"params":{},"i":0}}]}'>{{{1}}}</span>|<span about="#mwt2" typeof="mw:Param" data-mw='{"parts":[{"templatearg":{"target":{"wt":"2"},"params":{},"i":0}}]}'>{{{2}}}</span>]]</td></tr>
11625 Abort table cell attribute parsing on wikilink
11628 |testing [[one|two]] |three||four
11629 |testing one two |three||four
11630 |testing="[[one|two]]" |three||four
11635 <td>testing <a href="/index.php?title=One&action=edit&redlink=1" class="new" title="One (page does not exist)">two</a> |three</td>
11641 <td>testing="<a href="/index.php?title=One&action=edit&redlink=1" class="new" title="One (page does not exist)">two</a>" |three</td>
11647 <tbody><tr data-parsoid='{"autoInsertedEnd":true,"autoInsertedStart":true}'><td data-parsoid='{"autoInsertedEnd":true}'>testing <a rel="mw:WikiLink" href="./One" title="One" data-parsoid='{"stx":"piped","a":{"href":"./One"},"sa":{"href":"one"}}'>two</a> |three</td><td data-parsoid='{"stx":"row","autoInsertedEnd":true}'>four</td>
11648 <td data-parsoid='{"a":{"testing":null,"one":null,"two":null},"sa":{"testing":"","one":"","two":""},"autoInsertedEnd":true}'>three</td><td data-parsoid='{"stx":"row","autoInsertedEnd":true}'>four</td>
11649 <td>testing="<a rel="mw:WikiLink" href="./One" title="One" data-parsoid='{"stx":"piped","a":{"href":"./One"},"sa":{"href":"one"}}'>two</a>" |three</td><td data-parsoid='{"stx":"row","autoInsertedEnd":true}'>four</td></tr>
11654 Don't abort table cell attribute parsing if wikilink is found in template arg
11657 |Test {{#tag:ref|One two "[[three]]" four}}
11661 <tbody><tr><td>Test <ref about="#mwt1" typeof="mw:Transclusion" data-parsoid='{"pi":[[{"k":"1"}]]}' data-mw='{"parts":[{"template":{"target":{"wt":"#tag:ref","function":"tag"},"params":{"1":{"wt":"One two \"[[three]]\" four"}},"i":0}}]}'>One two "<a rel="mw:WikiLink" href="./Three" title="Three">three</a>" four</ref></td></tr>
11666 Magic variable as template parameter
11668 {{paramtest|param={{SITENAME}}}}
11670 <p>This is a test template with parameter MediaWiki
11677 [[{{{param}}}|link]]
11681 Template parameter as link source
11683 {{linktest|param=Main Page}}
11685 <p><a href="/wiki/Main_Page" title="Main Page">link</a>
11690 Template:paramtest2
11692 including another template, {{paramtest|param={{{arg}}}}}
11696 Template passing argument to another template
11698 {{paramtest2|arg='hmm'}}
11700 <p>including another template, This is a test template with parameter 'hmm'
11711 Template as link source
11715 [[{{linktest2}}|Main Page]]
11717 [[{{linktest2}}]]Page
11719 <p><a href="/wiki/Main_Page" title="Main Page">Main Page</a>
11720 </p><p><a href="/wiki/Main_Page" title="Main Page">Main Page</a>
11721 </p><p><a href="/wiki/Main_Page" title="Main Page">Main Page</a>Page
11739 Template infinite loop
11743 <p><span class="error">Template loop detected: <a href="/wiki/Template:Loop1" title="Template:Loop1">Template:Loop1</a></span>
11748 Template from main namespace
11757 Template from non-includable namespace
11759 wgNonincludableNamespaces=10
11763 <p><a href="/wiki/Template:Echo" title="Template:Echo">Template:Echo</a>
11778 T2529: Template with table, not included at beginning of line
11797 T2523: Template shouldn't eat newline (or add an extra one before table)
11817 T2041: Template parameters shown as broken links
11826 Template with targets containing wikilinks
11832 {{[[{{echo|foo}}]]}}
11834 {{{{echo|[[foo}}]]}}
11836 <p>{{<a href="/wiki/Foo" title="Foo">foo</a>}}
11837 </p><p>{{<a href="/wiki/Foo" title="Foo">foo</a>}}
11841 <p>{{<a rel="mw:WikiLink" href="./Foo" title="Foo">foo</a>}}</p>
11842 <p>{{<a typeof="mw:ExpandedAttrs" rel="mw:WikiLink" href="./Foo" title="Foo" data-mw='{"attribs":[[{"txt":"href"},{"html":"<span about=\"#mwt3\" typeof=\"mw:Transclusion\" data-parsoid='{\"pi\":[[{\"k\":\"1\"}]],\"dsr\":[17,29,null,null]}' data-mw='{\"parts\":[{\"template\":{\"target\":{\"wt\":\"echo\",\"href\":\"./Template:Echo\"},\"params\":{\"1\":{\"wt\":\"foo\"}},\"i\":0}}]}'>foo</span>"}]]}'>foo</a>}}</p>
11843 <p>{{<span typeof="mw:Transclusion" data-mw='{"parts":[{"template":{"target":{"wt":"echo","href":"./Template:Echo"},"params":{"1":{"wt":"[[foo}}]]"}},"i":0}}]}'>[[foo}}]]</span></p>
11853 Templates: Double quotes as template target
11860 <p>foo <span about="#mwt1" typeof="mw:Transclusion" data-mw='{"parts":[{"template":{"target":{"wt":"''","href":"./Template:''"},"params":{},"i":0}}]}'>bar</span> baz
11864 ## This test is about making sure Parsoid's data-mw is well formed in the
11865 ## face of multiple templates with intersecting and overlapping ranges. The
11866 ## wikitext itself is wretched.
11868 Templates with intersecting and overlapping ranges
11879 </table><p>ho</p><table>
11883 </td></tr></tbody></table>
11885 <p about="#mwt1" typeof="mw:Transclusion" data-parsoid='{"stx":"html","autoInsertedEnd":true,"pi":[[{"k":"1"}],[{"k":"1"}],[{"k":"1"}]],"firstWikitextNode":"table"}' data-mw='{"parts":["{|",{"template":{"target":{"wt":"echo","href":"./Template:Echo"},"params":{"1":{"wt":"\n<p>ha</p>"}},"i":0}},"\n","{|",{"template":{"target":{"wt":"echo","href":"./Template:Echo"},"params":{"1":{"wt":"\n<p>ho</p>"}},"i":1}},"\n",{"template":{"target":{"wt":"echo","href":"./Template:Echo"},"params":{"1":{"wt":"{{!}}hi"}},"i":2}},"\n|}"]}'>ha</p><table about="#mwt1" typeof="mw:ExpandedAttrs" data-mw='{"attribs":[[{"txt":"","html":""},{"html":""}]]}'>
11887 </table><p about="#mwt1">ho</p><table about="#mwt1" typeof="mw:ExpandedAttrs" data-mw='{"attribs":[[{"txt":"","html":""},{"html":""}]]}'>
11889 <tbody><tr><td>hi</td></tr>
11894 Template:MSGNW test
11896 ''None'' of '''this''' should be
11898 but rather passed unmodified
11906 # hmm, fix this or just deprecate msgnw and document its behavior?
11910 {{msgnw:MSGNW test}}
11912 <p>''None'' of '''this''' should be
11914  but rather passed unmodified
11915 {{test}}
11919 <!-- comment -->
11926 {{int:youhavenewmessages|lots of money|not!}}
11928 <p>You have lots of money (not!).
11933 int keyword - non-existing message
11944 Foo<noinclude>zar</noinclude><includeonly>bar</includeonly>
11948 <includeonly> and <noinclude> being included
11959 <onlyinclude>Foo</onlyinclude>bar
11963 <onlyinclude> being included
11975 <onlyinclude>Foo</onlyinclude>bar<includeonly>zar</includeonly>
11979 <onlyinclude> and <includeonly> being included
11988 <includeonly> and <noinclude> on a page
11990 Foo<noinclude>zar</noinclude><includeonly>bar</includeonly>
11997 Un-closed <noinclude>
12004 <onlyinclude> on a page
12006 <onlyinclude>Foo</onlyinclude>bar
12013 Un-closed <onlyinclude>
12020 Self-closed noinclude, includeonly, onlyinclude tags
12031 Unbalanced includeonly and noinclude tags
12035 |b</noinclude></noinclude>
12036 |c</noinclude></includeonly>
12037 |d</includeonly></includeonly>
12046 <td>c</includeonly>
12048 <td>d</includeonly></includeonly>
12054 Template:Includeonly section
12057 ==Includeonly section==
12063 T8563: Edit link generation for section shown by <includeonly>
12065 {{includeonly section}}
12067 <h2><span class="mw-headline" id="Includeonly_section">Includeonly section</span><span class="mw-editsection"><span class="mw-editsection-bracket">[</span><a href="/index.php?title=Template:Includeonly_section&action=edit&section=T-1" title="Template:Includeonly section">edit</a><span class="mw-editsection-bracket">]</span></span></h2>
12068 <h2><span class="mw-headline" id="Section_T-1">Section T-1</span><span class="mw-editsection"><span class="mw-editsection-bracket">[</span><a href="/index.php?title=Template:Includeonly_section&action=edit&section=T-2" title="Template:Includeonly section">edit</a><span class="mw-editsection-bracket">]</span></span></h2>
12072 # Uses same input as the contents of [[Template:Includeonly section]]
12074 T8563: Section extraction for section shown by <includeonly>
12079 ==Includeonly section==
12087 T8563: Edit link generation for section suppressed by <includeonly>
12090 ==Includeonly section==
12094 <h2><span class="mw-headline" id="Section_1">Section 1</span><span class="mw-editsection"><span class="mw-editsection-bracket">[</span><a href="/index.php?title=Parser_test&action=edit&section=1" title="Edit section: Section 1">edit</a><span class="mw-editsection-bracket">]</span></span></h2>
12099 T8563: Section extraction for section suppressed by <includeonly>
12104 ==Includeonly section==
12112 Un-closed <includeonly>
12117 <meta typeof="mw:Includes/IncludeOnly" data-parsoid='{"src":"<includeonly>"}' data-mw='{"src":"<includeonly>"}'/>
12120 ## We used to, but no longer wt2wt this test since the default serializer
12121 ## will normalize the include directives to serialize on their own line.
12122 ## Selser will take care of preserving formatting in scenarios where they
12123 ## intermingled with other wikitext.
12125 Includes and comments at SOL
12127 parsoid=wt2html,html2html
12129 <!-- comment --><noinclude><!-- comment --></noinclude><!-- comment -->==hu==
12137 some</noinclude>* stuff
12140 <includeonly>can have stuff</includeonly>===here===
12143 <h2><span class="mw-headline" id="hu">hu</span></h2>
12151 <ul><li>here</li></ul>
12152 <h3><span class="mw-headline" id="here">here</span></h3>
12155 <!-- comment --><meta typeof="mw:Includes/NoInclude" data-parsoid='{"src":"<noinclude>"}'/><!-- comment --><meta typeof="mw:Includes/NoInclude/End" data-parsoid='{"src":"</noinclude>"}'/><!-- comment --><h2 id="hu">hu</h2>
12157 <meta typeof="mw:Includes/NoInclude" data-parsoid='{"src":"<noinclude>"}'/>
12159 <meta typeof="mw:Includes/NoInclude/End" data-parsoid='{"src":"</noinclude>"}'/><ul><li>stuff</li>
12162 <meta typeof="mw:Includes/NoInclude" data-parsoid='{"src":"<noinclude>"}'/>
12163 <p>some<meta typeof="mw:Includes/NoInclude/End" data-parsoid='{"src":"</noinclude>"}'/>* stuff</p>
12164 <ul><li>here</li></ul>
12166 <meta typeof="mw:Includes/IncludeOnly" data-parsoid='{"src":"<includeonly>can have stuff</includeonly>"}' data-mw='{"src":"<includeonly>can have stuff</includeonly>"}'/><meta typeof="mw:Includes/IncludeOnly/End" data-parsoid='{"src":""}'/><h3 id="here">here</h3>
12170 # TODO: test with DOM fragment reuse!
12172 Parsoid: DOM fragment reuse
12174 parsoid=wt2wt,wt2html
12176 a{{echo|b<table></table>c}}d
12188 <p about="#mwt1" typeof="mw:Transclusion" data-mw='{"parts":["a",{"template":{"target":{"wt":"echo","href":"./Template:Echo"},"params":{"1":{"wt":"b<table></table>c"}},"i":0}},"d"]}' data-parsoid='{"pi":[[{"k":"1"}]]}'>ab</p><table about="#mwt1" data-parsoid='{"stx":"html"}'></table><p about="#mwt1">cd</p>
12190 <p about="#mwt2" typeof="mw:Transclusion" data-mw='{"parts":["a",{"template":{"target":{"wt":"echo","href":"./Template:Echo"},"params":{"1":{"wt":"b\n<table></table>\nc"}},"i":0}},"d"]}' data-parsoid='{"pi":[[{"k":"1"}]]}'>ab</p><span about="#mwt2">
12191 </span><table about="#mwt2" data-parsoid='{"stx":"html"}'></table><span about="#mwt2">
12192 </span><p about="#mwt2">cd</p>
12194 <p about="#mwt3" typeof="mw:Transclusion" data-mw='{"parts":[{"template":{"target":{"wt":"echo","href":"./Template:Echo"},"params":{"1":{"wt":"a\n\n<table></table>\n\nb"}},"i":0}}]}' data-parsoid='{"pi":[[{"k":"1"}]]}'>a</p><span about="#mwt3">
12196 </span><table about="#mwt3" data-parsoid='{"stx":"html"}'></table><span about="#mwt3">
12198 </span><p about="#mwt3">b</p>
12202 Parsoid: Merge double tds (T52603)
12207 |{{echo|{{!}} foo}}
12211 <tr><td about="#mwt1" typeof="mw:Transclusion" data-mw='{"parts":["|",{"template":{"target":{"wt":"echo","href":"./Template:Echo"},"params":{"1":{"wt":"{{!}} foo"}},"i":0}}]}'> foo</td></tr>
12216 Parsoid: Merge double tds in nested transclusion content (T52603)
12222 |{{echo|{{!}} foo}}
12226 <div about="#mwt1" typeof="mw:Transclusion" data-mw='{"parts":[{"template":{"target":{"wt":"echo","href":"./Template:Echo"},"params":{"1":{"wt":"<div>"}},"i":0}},"\n{|\n|",{"template":{"target":{"wt":"echo","href":"./Template:Echo"},"params":{"1":{"wt":"{{!}} foo"}},"i":1}},"\n|}\n",{"template":{"target":{"wt":"echo","href":"./Template:Echo"},"params":{"1":{"wt":"</div>"}},"i":2}}]}'>
12228 <tr><td data-mw='{"parts":["|"]}'> foo</td></tr>
12234 ### <includeonly> and <noinclude> in attributes
12237 0. includeonly around the entire attribute
12239 <span <includeonly>id="v1"</includeonly><noinclude>id="v2"</noinclude>>bar</span>
12241 <p><span id="v2">bar</span>
12246 1. includeonly in html attr key
12248 <span <noinclude>id</noinclude><includeonly>about</includeonly>="foo">bar</span>
12250 <p><span id="foo">bar</span>
12255 2. includeonly in html attr value
12257 <span id="<noinclude>v1</noinclude><includeonly>v2</includeonly>">bar</span>
12258 <span id=<noinclude>"v1"</noinclude><includeonly>"v2"</includeonly>>bar</span>
12260 <p><span id="v1">bar</span>
12261 <span id="v1">bar</span>
12266 3. includeonly in part of an attr value
12268 <span style="color:<noinclude>red</noinclude><includeonly>blue</includeonly>;">bar</span>
12270 <p><span style="color:red;">bar</span>
12275 4. includeonly in table attributes
12299 ### Preprocessor precedence tests
12300 ### See: https://www.mediawiki.org/wiki/Preprocessor_ABNF
12302 ##{{[[-{{{{{{[[Foo|bar}}]]}-}}}}}]]
12304 Preprocessor precedence 1: link is rightmost opening
12310 But close-brace is not a valid character in a link title:
12313 However, we can still tell this was handled as a link in the preprocessor:
12314 {{echo|[[Foo}}|bar]]|bat}}
12316 <p>{{<a href="/wiki/Foo" title="Foo">bar}}</a>
12317 </p><p>But close-brace is not a valid character in a link title:
12319 </p><p>However, we can still tell this was handled as a link in the preprocessor:
12323 <p>{{<a rel="mw:WikiLink" href="./Foo" title="Foo">bar}}</a></p>
12324 <p>But close-brace is not a valid character in a link title: {{[[Foo}}|bar]]</p>
12325 <p>However, we can still tell this was handled as a link in the preprocessor: <span typeof="mw:Transclusion" data-mw='{"parts":[{"template":{"target":{"wt":"echo","href":"./Template:Echo"},"params":{"1":{"wt":"[[Foo}}|bar]]"},"2":{"wt":"bat"}},"i":0}}]}'>[[Foo}}|bar]]</span></p>
12329 Preprocessor precedence 2: template is rightmost opening
12338 <p>-<span typeof="mw:Transclusion" data-mw='{"parts":[{"template":{"target":{"wt":"echo","href":"./Template:Echo"},"params":{"1":{"wt":"foo}-"}},"i":0}}]}'>foo}-</span>-</p>
12342 Preprocessor precedence 3: language converter is rightmost opening
12358 <p typeof="mw:Transclusion" data-mw='{"parts":[{"template":{"target":{"wt":"echo","href":"./Template:Echo"},"params":{"1":{"wt":"hi"}},"i":0}}]}'>hi</p>
12359 <p>{{<span typeof="mw:LanguageVariant" data-mw-variant='{"disabled":{"t":"echo|hi}}"}}'></span></p>
12360 <p>[[<span typeof="mw:LanguageVariant" data-mw-variant='{"disabled":{"t":"raw]]"}}'></span></p>
12364 Preprocessor precedence 4: left-most angle bracket
12375 Template:Precedence5
12381 Preprocessor precedence 5: tplarg takes precedence over template
12383 {{Precedence5|Bullet}}
12385 <ul><li>Bar</li></ul>
12388 <ul typeof="mw:Transclusion" data-mw='{"parts":[{"template":{"target":{"wt":"Precedence5","href":"./Template:Precedence5"},"params":{"1":{"wt":"Bullet"}},"i":0}}]}'><li>Bar</li></ul>
12392 Preprocessor precedence 6: broken link is rightmost opening
12398 {{echo|[[Foo|bar|bat=baz}}
12401 </p><p>{{echo|[[Foo|bar|bat=baz}}
12404 <p>{{echo|[[Foo}}</p>
12405 <p>{{echo|[[Foo|bar|bat=baz}}</p>
12408 # This next test exposes a difference between PHP and Parsoid:
12409 # Given [[Foo|{{echo|Bar]]x}}y]]z:
12410 # 1) Both PHP and Parsoid ignore the `]]` inside the `echo` in the
12411 # "preprocessor" stage. The `{{echo` extends until the `x}}`, and the
12412 # outer `[[Foo` extends until the `y]]`
12413 # 2a) But then the PHP preprocessor emits `[[Foo|Bar]]xy]]z` as an
12414 # intermediate result (after template expansion), and link processing
12415 # happens on this intermediate result, which moves the wikilink
12416 # boundary leftward to `[[Foo|Bar]]`
12417 # 2b) Parsoid works in a single step, so it's going to keep the
12418 # wikilink as extending to the `y]]`
12419 # 3a) Then PHP does linktrail processing which slurps up the trailing
12420 # `xy` inside the link.
12421 # 3b) Parsoid will do linktrail processing to slurp up the trailing
12422 # `z` inside the link.
12423 # This is "correct" behavior. Parsoid's basic worldview is that the
12424 # `]]` inside the template shouldn't be allowed to leak out to affect
12425 # the surrounding wikilink. PHP may match Parsoid (in the future)
12426 # if you use {{#balance}} (T114445).
12429 Preprocessor precedence 7: broken template is rightmost opening
12435 [[Foo|{{echo|Bar]]-x}}-y]]-z
12437 Careful: linktrails can move the end of the wikilink:
12438 [[Foo|{{echo|y']]a}}l]]l
12440 <p><a href="/wiki/Foo" title="Foo">{{echo|Bar</a>
12441 </p><p><a href="/wiki/Foo" title="Foo">Bar</a>-x-y]]-z
12442 </p><p>Careful: linktrails can move the end of the wikilink:
12443 <a href="/wiki/Foo" title="Foo">y'al</a>]]l
12446 <p>[[Foo|{{echo|Bar]]</p>
12447 <p><a rel="mw:WikiLink" href="./Foo" title="Foo"><span typeof="mw:Transclusion" data-mw='{"parts":[{"template":{"target":{"wt":"echo","href":"./Template:Echo"},"params":{"1":{"wt":"Bar]]-x"}},"i":0}}]}'>Bar]]-x</span>-y</a>-z</p>
12448 <p>Careful: linktrails can move the end of the wikilink:
12449 <a rel="mw:WikiLink" href="./Foo" title="Foo"><span typeof="mw:Transclusion" data-mw='{"parts":[{"template":{"target":{"wt":"echo","href":"./Template:Echo"},"params":{"1":{"wt":"y']]a"}},"i":0}}]}'>y']]a</span>ll</a></p>
12453 Preprocessor precedence 8: broken language converter is rightmost opening
12464 Template:Preprocessor_precedence_9
12469 ;7: {{{{{{{4}}}}}}}
12473 Preprocessor precedence 9: groups of braces
12475 {{Preprocessor precedence 9|Four|Bullet|1|2}}
12481 <ul><li>Bar</li></ul>
12485 <dd>{Bullet}</dd></dl>
12488 <dl about="#mwt1" typeof="mw:Transclusion" data-mw='{"parts":[{"template":{"target":{"wt":"Preprocessor precedence 9","href":"./Template:Preprocessor_precedence_9"},"params":{"1":{"wt":"Four"},"2":{"wt":"Bullet"},"3":{"wt":"1"},"4":{"wt":"2"}},"i":0}}]}'>
12493 </dl><ul about="#mwt1">
12495 </ul><span about="#mwt1"> </span><dl about="#mwt1">
12504 Template:Preprocessor_precedence_10
12511 ;6: -{{{{{{4}}}}}}-
12512 ;7: -{{{{{{{5}}}}}}}-
12516 Preprocessor precedence 10: groups of braces with leading dash
12520 {{Preprocessor precedence 10|Three|raw2|Bullet|1|2}}
12526 <ul><li>Bar-</li></ul>
12533 <ul><li>Bar-</li></ul>
12540 <dl about="#mwt1" typeof="mw:Transclusion" data-mw='{"parts":[{"template":{"target":{"wt":"Preprocessor precedence 10","href":"./Template:Preprocessor_precedence_10"},"params":{"1":{"wt":"Three"},"2":{"wt":"raw2"},"3":{"wt":"Bullet"},"4":{"wt":"1"},"5":{"wt":"2"}},"i":0}}]}'>
12542 <dd><span typeof="mw:LanguageVariant" data-mw-variant='{"disabled":{"t":"raw"}}'></span></dd>
12545 </dl><ul about="#mwt1">
12547 </ul><span about="#mwt1"> </span><dl about="#mwt1">
12551 <dd><span typeof="mw:LanguageVariant" data-mw-variant='{"disabled":{"t":"raw2"}}'></span></dd>
12554 </dl><ul about="#mwt1">
12556 </ul><span about="#mwt1"> </span><dl about="#mwt1">
12560 <dd><span typeof="mw:LanguageVariant" data-mw-variant='{"disabled":{"t":"raw2"}}'></span></dd>
12565 Preprocessor precedence 11: found during visual diff testing
12567 {{#tag:span|-{{#tag:span|-{{echo|x}}}}}}
12569 {{echo|-{{echo|-{{echo|x}}}}}}
12571 {{echo|-{{echo|x}}}}
12573 <p><span>-<span>-x</span></span>
12578 <p><span about="#mwt1" typeof="mw:Transclusion" data-mw='{"parts":[{"template":{"target":{"wt":"#tag:span","function":"tag"},"params":{"1":{"wt":"-{{#tag:span|-{{echo|x}}}}"}},"i":0}}]}'>-<span>-x</span></span></p>
12580 <p about="#mwt4" typeof="mw:Transclusion" data-mw='{"parts":[{"template":{"target":{"wt":"echo","href":"./Template:Echo"},"params":{"1":{"wt":"-{{echo|-{{echo|x}}}}"}},"i":0}}]}'>--x</p>
12582 <p about="#mwt7" typeof="mw:Transclusion" data-mw='{"parts":[{"template":{"target":{"wt":"echo","href":"./Template:Echo"},"params":{"1":{"wt":"-{{echo|x}}"}},"i":0}}]}'>-x</p>
12586 Preprocessor precedence 12: broken language converter closed by brace.
12590 This form breaks the template, which is unfortunate:
12591 *{{echo|foo-{bar}bat}}
12593 But if the broken language converter markup is inside an extension
12594 tag, nothing bad happens:
12595 *<nowiki>foo-{bar}bat</nowiki>
12596 *{{echo|<nowiki>foo-{bar}bat</nowiki>}}
12597 *<pre>foo-{bar}bat</pre>
12598 *{{echo|<pre>foo-{bar}bat</pre>}}
12600 <tag>foo-{bar}bat</tag>
12601 {{echo|<tag>foo-{bar}bat</tag>}}
12604 <p>This form breaks the template, which is unfortunate:
12606 <ul><li>{{echo|foo-{bar}bat}}</li></ul>
12607 <p>But if the broken language converter markup is inside an extension
12608 tag, nothing bad happens:
12610 <ul><li>foo-{bar}bat</li>
12611 <li>foo-{bar}bat</li>
12612 <li><pre>foo-{bar}bat</pre></li>
12613 <li><pre>foo-{bar}bat</pre></li></ul>
12614 <pre>'foo-{bar}bat'
12618 <pre>'foo-{bar}bat'
12623 <p>This form breaks the template, which is unfortunate:</p>
12625 <li>{{echo|foo-{bar}bat}}</li>
12627 <p>But if the broken language converter markup is inside an extension tag, nothing bad happens:</p>
12629 <li><span typeof="mw:Nowiki">foo-{bar}bat</span></li>
12630 <li><span typeof="mw:Transclusion mw:Nowiki" data-mw='{"parts":[{"template":{"target":{"wt":"echo","href":"./Template:Echo"},"params":{"1":{"wt":"<nowiki>foo-{bar}bat</nowiki>"}},"i":0}}]}'>foo-{bar}bat</span></li>
12631 <li><pre typeof="mw:Extension/pre" data-mw='{"name":"pre","attrs":{},"body":{"extsrc":"foo-{bar}bat"}}'>foo-{bar}bat</pre></li>
12632 <li><pre typeof="mw:Transclusion mw:Extension/pre" data-mw='{"parts":[{"template":{"target":{"wt":"echo","href":"./Template:Echo"},"params":{"1":{"wt":"<pre>foo-{bar}bat</pre>"}},"i":0}}]}'>foo-{bar}bat</pre></li>
12634 <pre typeof="mw:Extension/tag" data-mw='{"name":"tag","attrs":{},"body":{"extsrc":"foo-{bar}bat"}}'></pre> <pre typeof="mw:Extension/tag mw:Transclusion" data-mw='{"parts":[{"template":{"target":{"wt":"echo","href":"./Template:Echo"},"params":{"1":{"wt":"<tag>foo-{bar}bat</tag>"}},"i":0}}]}'></pre>
12638 Preprocessor precedence 13: broken language converter in external link
12642 *[http://example.com/-{foo Example in URL]
12643 *[http://example.com Example in -{link} description]
12644 *{{echo|[http://example.com/-{foo Breaks template, however]}}
12646 <ul><li><a rel="nofollow" class="external text" href="http://example.com/-{foo">Example in URL</a></li>
12647 <li><a rel="nofollow" class="external text" href="http://example.com">Example in -{link} description</a></li>
12648 <li>{{echo|<a rel="nofollow" class="external text" href="http://example.com/-{foo">Breaks template, however</a>}}</li></ul>
12651 <li><a rel="mw:ExtLink" class="external text" href="http://example.com/-{foo">Example in URL</a></li>
12652 <li><a rel="mw:ExtLink" class="external text" href="http://example.com">Example in -{link} description</a></li>
12653 <li>{{echo|<a rel="mw:ExtLink" class="external text" href="http://example.com/-{foo">Breaks template, however</a>}}</li>
12658 Preprocessor precedence 14: broken language converter in comment
12660 *<!--{{foo}}-->...should be ok
12661 *<!---{{foo}}-->...extra dashes
12662 *{{echo|foo<!-- -{bar} -->bat}}...should be ok
12664 <ul><li>...should be ok</li>
12665 <li>...extra dashes</li>
12666 <li>foobat...should be ok</li></ul>
12669 <li><!--{{foo}}-->...should be ok</li>
12670 <li><!---{{foo}}-->...extra dashes</li>
12671 <li><span about="#mwt1" typeof="mw:Transclusion" data-mw='{"parts":[{"template":{"target":{"wt":"echo","href":"./Template:Echo"},"params":{"1":{"wt":"foo<!-- -{bar} -->bat"}},"i":0}}]}'>foo</span><span about="#mwt1"><!-- -{bar} --></span><span about="#mwt1">bat</span>...should be ok</li>
12676 Preprocessor precedence 15: broken brace markup in headings
12678 wgFragmentMode=[ 'html5', 'legacy' ]
12682 __NOTOC__ __NOEDITSECTION__
12691 ===5 foo{{{bar 5===
12696 <h3><span id="1_foo.5Bbar_1"></span><span class="mw-headline" id="1_foo[bar_1">1 foo[bar 1</span></h3>
12699 <h3><span id="2_foo.5B.5Bbar_2"></span><span class="mw-headline" id="2_foo[[bar_2">2 foo[[bar 2</span></h3>
12702 <h3><span id="3_foo.7Bbar_3"></span><span class="mw-headline" id="3_foo{bar_3">3 foo{bar 3</span></h3>
12705 <h3><span id="4_foo.7B.7Bbar_4"></span><span class="mw-headline" id="4_foo{{bar_4">4 foo{{bar 4</span></h3>
12708 <h3><span id="5_foo.7B.7B.7Bbar_5"></span><span class="mw-headline" id="5_foo{{{bar_5">5 foo{{{bar 5</span></h3>
12711 <h3><span id="6_foo-.7Bbar_6"></span><span class="mw-headline" id="6_foo-{bar_6">6 foo-{bar 6</span></h3>
12715 <meta property="mw:PageProp/notoc"/> <meta property="mw:PageProp/noeditsection"/>
12716 <h3 id="1_foo[bar_1"><span id="1_foo.5Bbar_1" typeof="mw:FallbackId"></span>1 foo[bar 1</h3>
12718 <h3 id="2_foo[[bar_2"><span id="2_foo.5B.5Bbar_2" typeof="mw:FallbackId"></span>2 foo[[bar 2</h3>
12720 <h3 id="3_foo{bar_3"><span id="3_foo.7Bbar_3" typeof="mw:FallbackId"></span>3 foo{bar 3</h3>
12722 <h3 id="4_foo{{bar_4"><span id="4_foo.7B.7Bbar_4" typeof="mw:FallbackId"></span>4 foo{{bar 4</h3>
12724 <h3 id="5_foo{{{bar_5"><span id="5_foo.7B.7B.7Bbar_5" typeof="mw:FallbackId"></span>5 foo{{{bar 5</h3>
12726 <h3 id="6_foo-{bar_6"><span id="6_foo-.7Bbar_6" typeof="mw:FallbackId"></span>6 foo-{bar 6</h3>
12731 Preprocessor precedence 16: matching closing braces to opening braces
12736 -{{{echo|foo}}bar}-
12741 <p><span typeof="mw:LanguageVariant" data-mw-variant='{"disabled":{"t":"<span about=\"#mwt1\" typeof=\"mw:Transclusion\" data-parsoid='{\"pi\":[[{\"k\":\"1\"}]],\"dsr\":[2,14,null,null]}' data-mw='{\"parts\":[{\"template\":{\"target\":{\"wt\":\"echo\",\"href\":\"./Template:Echo\"},\"params\":{\"1\":{\"wt\":\"foo\"}},\"i\":0}}]}'>foo</span>bar"}}'></span></p>
12745 Preprocessor precedence 17: template w/o target shouldn't prevent closing
12754 <p about="#mwt1" typeof="mw:Transclusion" data-mw='{"parts":[{"template":{"target":{"wt":"echo","href":"./Template:Echo"},"params":{"1":{"wt":"hi {{}}"}},"i":0}}]}'>hi {{}}</p>
12757 # Ensure we're using a language without variants for this test; even
12758 # if $wgUsePigLatinVariant is true. We've picked `de` arbitrarily.
12760 Preprocessor precedence 18: another rightmost wins scenario
12765 {{ -{{{{1|tplarg}}} }} }-
12767 <p>{{ -{tplarg }} }-
12770 <p>{{ -{<span about="#mwt1" typeof="mw:Param" data-mw='{"parts":[{"templatearg":{"target":{"wt":"1"},"params":{"1":{"wt":"tplarg"}},"i":0}}]}'>tplarg</span> }} }-</p>
12774 Preprocessor precedence 19: break syntax
12787 ### Token Stream Patcher tests
12789 ### These tests won't always pass wt2wt and other modes because
12790 ### on serialization, the table will be output on a new line.
12791 ### For now, we are blacklisting them, and using this to test selser.
12795 1. Table tag in SOL posn. should get reparsed correctly with valid TSR
12797 parsoid=wt2html,wt2wt
12799 {{echo|}}{| width = '100%'
12803 <span typeof="mw:Transclusion" data-mw='{"parts":[{"template":{"target":{"wt":"echo","href":"./Template:Echo"},"params":{"1":{"wt":""}},"i":0}}]}'></span><table width="100%">
12804 <tbody><tr><td>foo</td></tr>
12808 ## We used to, but no longer wt2wt this test since the default serializer
12809 ## will normalize the include directives to serialize on their own line.
12810 ## Selser will take care of preserving formatting in scenarios where they
12811 ## intermingled with other wikitext.
12813 2. Table tag in SOL posn. should get reparsed correctly with valid TSR
12817 <includeonly>a</includeonly>{| {{{b}}}
12821 <meta typeof="mw:Includes/IncludeOnly" data-parsoid='{"src":"<includeonly>a</includeonly>"}' data-mw='{"src":"<includeonly>a</includeonly>"}'/><meta typeof="mw:Includes/IncludeOnly/End" data-parsoid='{"src":""}'/><table about="#mwt2" typeof="mw:ExpandedAttrs" data-parsoid='{"a":{"{{{b}}}":null},"sa":{"{{{b}}}":""}}' data-mw='{"attribs":[[{"txt":"{{{b}}}","html":"<span about=\"#mwt1\" typeof=\"mw:Param\" data-parsoid='{\"pi\":[[]],\"dsr\":[31,38,null,null]}' data-mw='{\"parts\":[{\"templatearg\":{\"target\":{\"wt\":\"b\"},\"params\":{},\"i\":0}}]}'>{{{b}}}</span>"},{"html":""}]]}'>
12822 <tbody><tr><td>c</td></tr>
12827 Table wikitext syntax outside wiki-tables
12831 ! not a table heading
12834 | class="foo bar" | baz
12842 ! not a table heading
12845 | class="foo bar" | baz
12854 ### Testing parsing of templates where a template arg
12855 ### has the same name as the template itself.
12861 {{{quote|{{{1}}}}}}
12865 Templates: Template Name/Arg clash: 1. Use of positional param
12874 Templates: Template Name/Arg clash: 2. Use of named param
12876 {{quote|quote=foo}}
12883 Templates: Template Name/Arg clash: 3. Use of named param with empty input
12892 ### Parsoid-centric tests to stress Parsoid's ability to RT them unchanged
12896 Templates: 1. Simple use
12905 Templates: 2. Inside a block tag
12907 <div>{{echo|Foo}}</div>
12908 <blockquote>{{echo|Foo}}</blockquote>
12911 <blockquote>Foo</blockquote>
12915 <blockquote><p>Foo</p></blockquote>
12919 Templates: P-wrapping: 1a. Templates on consecutive lines
12930 Templates: P-wrapping: 1b. Templates on consecutive lines
12944 Templates: P-wrapping: 1c. Templates on consecutive lines
12947 {{echo|bar}} <div>baz</div>
12956 bar </p><div>baz</div>
12960 Templates: P-wrapping: 1d. Template preceded by comment-only line
12969 <p about="#mwt223" typeof="mw:Transclusion" data-mw='{"parts":[{"template":{"target":{"wt":"echo","href":"./Template:Echo"},"params":{"1":{"wt":"Bar"}},"i":0}}]}'>Bar</p>
12973 Templates: Scopes should not be expanded unnecessarily
12975 parsoid=wt2html,wt2wt
12977 {{echo|<div>a</div>}}b{{echo|
12980 <div about="#mwt1" typeof="mw:Transclusion" data-mw='{"parts":[{"template":{"target":{"wt":"echo","href":"./Template:Echo"},"params":{"1":{"wt":"<div>a</div>"}},"i":0}}]}'>a</div><p>b</p><span about="#mwt2" typeof="mw:Transclusion" data-mw='{"parts":[{"template":{"target":{"wt":"echo","href":"./Template:Echo"},"params":{"1":{"wt":"\n<div>c</div>"}},"i":0}}]}'>
12981 </span><div about="#mwt2">c</div>
12985 Templates: Inline Text: 1. Multiple template uses
12987 {{echo|Foo}}bar{{echo|baz}}
12994 Templates: Inline Text: 2. Back-to-back template uses
12996 {{echo|Foo}}{{echo|bar}}
13003 Templates: Block Tags: 1. Multiple template uses
13005 {{echo|<div>Foo</div>}}<div>bar</div>{{echo|<div>baz</div>}}
13007 <div>Foo</div><div>bar</div><div>baz</div>
13012 Templates: Block Tags: 2. Back-to-back template uses
13014 {{echo|<div>Foo</div>}}{{echo|<div>bar</div>}}
13016 <div>Foo</div><div>bar</div>
13020 ## Parsoid drops empty elements in templates.
13022 Templates: Correctly encapsulate templates producing </p> tag without a corresponding <p> tag
13029 b</p><p class="mw-empty-elt"></p>
13031 <p about="#mwt1" typeof="mw:Transclusion" data-mw='{"parts":[{"template":{"target":{"wt":"echo","href":"./Template:Echo"},"params":{"1":{"wt":"a\nb</p>"}},"i":0}}]}'>a</p><span about="#mwt1">
13032 </span><p about="#mwt1">b</p>
13036 Templates: Links: 1. Simple example
13038 {{echo|[[Foo|bar]]}}
13040 <p><a href="/wiki/Foo" title="Foo">bar</a>
13045 Templates: Links: 2. Generation of link href
13047 [[{{echo|Foo}}|bar]]
13049 <p><a href="/wiki/Foo" title="Foo">bar</a>
13054 Templates: Links: 3. Generation of part of a link href
13056 [[Fo{{echo|o}}|bar]]
13058 [[Foo{{echo|bar}}]]
13060 [[Foo{{echo|bar}}baz]]
13062 [[Foo{{echo|bar}}|bar]]
13064 [[:Foo{{echo|bar}}]]
13066 [[:Foo{{echo|bar}}|bar]]
13068 <p><a href="/wiki/Foo" title="Foo">bar</a>
13069 </p><p><a href="/index.php?title=Foobar&action=edit&redlink=1" class="new" title="Foobar (page does not exist)">Foobar</a>
13070 </p><p><a href="/index.php?title=Foobarbaz&action=edit&redlink=1" class="new" title="Foobarbaz (page does not exist)">Foobarbaz</a>
13071 </p><p><a href="/index.php?title=Foobar&action=edit&redlink=1" class="new" title="Foobar (page does not exist)">bar</a>
13072 </p><p><a href="/index.php?title=Foobar&action=edit&redlink=1" class="new" title="Foobar (page does not exist)">Foobar</a>
13073 </p><p><a href="/index.php?title=Foobar&action=edit&redlink=1" class="new" title="Foobar (page does not exist)">bar</a>
13078 Templates: Links: 4. Multiple templates generating link href
13080 [[{{echo|F}}{{echo|o}}ob{{echo|ar}}]]
13082 <p><a href="/index.php?title=Foobar&action=edit&redlink=1" class="new" title="Foobar (page does not exist)">Foobar</a>
13087 Templates: Links: 5. Generation of link text
13089 [[Foo|{{echo|bar}}]]
13091 <p><a href="/wiki/Foo" title="Foo">bar</a>
13096 Templates: Links: 5. Nested templates (only outermost template should be marked)
13098 {{echo|[[{{echo|Foo}}|bar]]}}
13100 <p><a href="/wiki/Foo" title="Foo">bar</a>
13105 Templates: HTML Tag: 1. Generation of HTML attr. key
13107 <div {{echo|style}}="color:red;">foo</div>
13109 <div style="color:red;">foo</div>
13114 Templates: HTML Tag: 2. Generation of HTML attr. value
13116 <div style={{echo|'color:red;'}}>foo</div>
13118 <div style="color:red;">foo</div>
13123 Templates: HTML Tag: 3. Generation of HTML attr key and value
13125 <div {{echo|style}}={{echo|'color:red;'}}>foo</div>
13127 <div style="color:red;">foo</div>
13132 Templates: HTML Tag: 4. Generation of starting piece of HTML attr value
13134 <div title="{{echo|This is a long title}} with just one piece templated">foo</div>
13136 <div title="This is a long title with just one piece templated">foo</div>
13141 Templates: HTML Tag: 5. Generation of middle piece of HTML attr value
13143 <div title="This is a long title with just {{echo|one piece}} templated">foo</div>
13145 <div title="This is a long title with just one piece templated">foo</div>
13150 Templates: HTML Tag: 6. Generation of end piece of HTML attr value
13152 <div title="This is a long title with just one piece {{echo|templated}}">foo</div>
13154 <div title="This is a long title with just one piece templated">foo</div>
13158 # SSS FIXME: While it is great we added support for all this,
13159 # do we want to make this part of the spec? Maybe we want to
13160 # deprecate this kind of usage in the future?
13162 Templates: HTML Tag: 7. Generation of partial attribute key string
13164 <div st{{echo|yle}}="color:red;">foo</div>
13166 <div style="color:red;">foo</div>
13171 Templates: HTML Tag: 8. Template-generated attribute (k=v)
13173 <div {{echo|1=id="v1"}}>bar</div>
13175 <div id="v1">bar</div>
13180 Templates: HTML Tag: 9. Multiple template-generated attributes
13182 <div {{echo|1=id="v1" title="foo"}}>bar</div>
13184 <div id="v1" title="foo">bar</div>
13189 Templates: Support for templates generating attributes and content
13191 {| {{mixed_attr_content_template}}
13196 <table style="color:red;" title="T48811">
13206 <table style="color:red;" title="T48811" about="#mwt1" typeof="mw:Transclusion mw:ExpandedAttrs" data-mw='{"parts":["{| ",{"template":{"target":{"wt":"mixed_attr_content_template","href":"./Template:Mixed_attr_content_template"},"params":{},"i":0}},"\n|-\n|bar\n|}"]}'>
13215 Template:attribute_from_template
13221 Table cell with attribute before expanded attribute
13224 | align="center" {{attribute_from_template}} |456
13228 <tbody><tr><td align="center" class="123" about="#mwt2" typeof="mw:ExpandedAttrs" data-mw='{"attribs":[[{"txt":"class","html":"<span about=\"#mwt1\" typeof=\"mw:Transclusion\" data-parsoid='{\"pi\":[[]],\"dsr\":[20,47,null,null]}' data-mw='{\"parts\":[{\"template\":{\"target\":{\"wt\":\"attribute_from_template\",\"href\":\"./Template:Attribute_from_template\"},\"params\":{},\"i\":0}}]}'>class=\"123\"</span>"},{"html":""}]]}'>456</td></tr>
13233 1. Entities and nowikis inside templated attributes should be handled correctly
13235 <div {{echo|style{{=}}"background:#f9f9f9;"}}>foo</div>
13237 <div style="background:#f9f9f9;">foo</div>
13240 <div style="background:#f9f9f9;" about="#mwt3" typeof="mw:ExpandedAttrs" data-parsoid='{"stx":"html"}' data-mw='{"attribs":[[{"txt":"style","html":"<span about=\"#mwt1\" typeof=\"mw:Transclusion\" data-parsoid='{\"pi\":[[{\"k\":\"1\"}]],\"dsr\":[5,49,null,null]}' data-mw='{\"parts\":[{\"template\":{\"target\":{\"wt\":\"echo\",\"href\":\"./Template:Echo\"},\"params\":{\"1\":{\"wt\":\"style{{=}}\\\"background:&amp;#35;f9f9f9;\\\"\"}},\"i\":0}}]}'>style</span><span typeof=\"mw:Nowiki\" about=\"#mwt1\" data-parsoid=\"{}\">=</span><span about=\"#mwt1\" data-parsoid=\"{}\">\"background:</span><span typeof=\"mw:Entity\" about=\"#mwt1\" data-parsoid='{\"src\":\"&amp;#35;\",\"srcContent\":\"#\"}'>#</span><span about=\"#mwt1\" data-parsoid=\"{}\">f9f9f9;\"</span>"},{"html":""}]]}'>foo</div>
13244 2. Entities and nowikis inside templated attributes should be handled correctly
13247 |{{table_attribs_3}}
13252 <td style="background:#f9f9f9;">Foo
13257 <tbody><tr data-parsoid='{"autoInsertedEnd":true,"autoInsertedStart":true}'><td style="background:#f9f9f9;" typeof="mw:Transclusion" about="#mwt1" data-parsoid='{"autoInsertedEnd":true,"pi":[[]]}' data-mw='{"parts":["|",{"template":{"target":{"wt":"table_attribs_3","href":"./Template:Table_attribs_3"},"params":{},"i":0}}]}'>Foo</td></tr>
13262 3. Entities and nowikis inside templated attributes should be handled correctly inside templated tables
13265 |{{table_attribs_3}}
13270 <td style="background:#f9f9f9;">Foo
13274 <table about="#mwt1" typeof="mw:Transclusion" data-parsoid='{"pi":[[],[],[]]}' data-mw='{"parts":[{"template":{"target":{"wt":"tbl-start","href":"./Template:Tbl-start"},"params":{},"i":0}},"\n|",{"template":{"target":{"wt":"table_attribs_3","href":"./Template:Table_attribs_3"},"params":{},"i":1}},"\n",{"template":{"target":{"wt":"tbl-end","href":"./Template:Tbl-end"},"params":{},"i":2}}]}'>
13275 <tbody><tr><td style="background:#f9f9f9;">Foo</td></tr>
13281 4. Entities and nowikis inside templated attributes should be handled correctly inside templated tables
13284 |{{table_attribs_6}} hi
13289 <td style="background: red;">hi
13294 <tbody><tr><td style="background: red;" typeof="mw:Transclusion" about="#mwt1" data-parsoid='{"autoInsertedEnd":true,"pi":[[]]}' data-mw='{"parts":["|",{"template":{"target":{"wt":"table_attribs_6","href":"./Template:Table_attribs_6"},"params":{},"i":0}}," hi"]}'> hi</td></tr>
13299 Templates: HTML Tables: 1. Generating start of a HTML table
13301 {{echo|<table><tr><td>foo</td>}}</tr></table>
13303 <table><tr><td>foo</td></tr></table>
13308 Templates: HTML Tables: 2a. Generating middle of a HTML table
13310 <table><tr>{{echo|<td>foo</td>}}</tr></table>
13312 <table><tr><td>foo</td></tr></table>
13317 Templates: HTML Tables: 2b. Generating middle of a HTML table
13319 <table>{{echo|<tr><td>foo</td></tr>}}</table>
13321 <table><tr><td>foo</td></tr></table>
13326 Templates: HTML Tables: 3. Generating end of a HTML table
13328 <table><tr>{{echo|<td>foo</td></tr></table>}}
13330 <table><tr><td>foo</td></tr></table>
13335 Templates: HTML Tables: 4a. Generating a single tag of a HTML table
13337 {{echo|<table>}}<tr><td>foo</td></tr></table>
13339 <table><tr><td>foo</td></tr></table>
13344 Templates: HTML Tables: 4b. Generating a single tag of a HTML table
13346 <table>{{echo|<tr>}}<td>foo</td></tr></table>
13348 <table><tr><td>foo</td></tr></table>
13353 Templates: HTML Tables: 4c. Generating a single tag of a HTML table
13355 <table><tr>{{echo|<td>}}foo</td></tr></table>
13357 <table><tr><td>foo</td></tr></table>
13362 Templates: HTML Tables: 4d. Generating a single tag of a HTML table
13364 <table><tr><td>foo{{echo|</td>}}</tr></table>
13366 <table><tr><td>foo</td></tr></table>
13371 Templates: HTML Tables: 4e. Generating a single tag of a HTML table
13373 <table><tr><td>foo</td>{{echo|</tr>}}</table>
13375 <table><tr><td>foo</td></tr></table>
13380 Templates: HTML Tables: 4f. Generating a single tag of a HTML table
13382 <table><tr><td>foo</td></tr>{{echo|</table>}}
13384 <table><tr><td>foo</td></tr></table>
13389 Templates: HTML Tables: 5. Proper fostering of categories from inside
13391 parsoid=wt2html,wt2wt
13393 <table>[[Category:foo1]]<tr><td>foo</td></tr></table>
13394 <!--Two categories (T52330)-->
13395 <table>[[Category:bar1]][[Category:bar2]]<tr><td>foo</td></tr></table>
13397 <link rel="mw:PageProp/Category" href="./Category:Foo1"><table><tbody><tr><td>foo</td></tr></tbody></table>
13398 <!--Two categories (T52330)-->
13399 <link rel="mw:PageProp/Category" href="./Category:Bar1"><link rel="mw:PageProp/Category" href="./Category:Bar2"><table><tbody><tr><td>foo</td></tr></tbody></table>
13402 ## Remex doesn't account for fostered content.
13404 Templates: Wiki Tables: 1a. Fostering of entire template content
13412 <tr><td></td></tr></table>
13417 <table><tbody><tr><td></td></tr></tbody></table>
13419 <p about="#mwt2" typeof="mw:Transclusion" data-parsoid='{"fostered":true,"autoInsertedEnd":true,"autoInsertedStart":true,"firstWikitextNode":"TABLE","pi":[[{"k":"1"}]]}' data-mw='{"parts":["{|\n",{"template":{"target":{"wt":"echo","href":"./Template:Echo"},"params":{"1":{"wt":"a"}},"i":0}},"\n|}"]}'>a</p><table about="#mwt2">
13425 Templates: Wiki Tables: 1b. Fostering of entire template content
13438 <tr><td></td></tr></table>
13446 <tbody><tr><td></td></tr></tbody></table>
13448 <div about="#mwt3" typeof="mw:Transclusion" data-parsoid='{"stx":"html","fostered":true,"autoInsertedEnd":true,"firstWikitextNode":"TABLE","pi":[[{"k":"1"}],[{"k":"1"}]]}' data-mw='{"parts":["{|\n",{"template":{"target":{"wt":"echo","href":"./Template:Echo"},"params":{"1":{"wt":"<div>"}},"i":0}},"\nfoo\n",{"template":{"target":{"wt":"echo","href":"./Template:Echo"},"params":{"1":{"wt":"</div>"}},"i":1}},"\n|}"]}'>
13450 </div><table about="#mwt3">
13455 ## Remex doesn't account for fostered content.
13457 Templates: Wiki Tables: 2. Fostering of partial template content
13467 <tr><td></td></tr></table>
13472 <div>b</div><table>
13473 <tbody><tr><td></td></tr></tbody></table>
13475 <p about="#mwt2" typeof="mw:Transclusion" data-parsoid='{"fostered":true,"autoInsertedEnd":true,"autoInsertedStart":true,"firstWikitextNode":"TABLE","pi":[[{"k":"1"}]]}' data-mw='{"parts":["{|\n",{"template":{"target":{"wt":"echo","href":"./Template:Echo"},"params":{"1":{"wt":"a\n<div>b</div>"}},"i":0}},"\n|}"]}'>a</p><div about="#mwt2">b</div><table about="#mwt2">
13482 Templates: Wiki Tables: 3. td-content via multiple templates
13485 {{echo|{{pipe}}a}}{{echo|b}}
13496 Templates: Wiki Tables: 4. Templated tags, no content
13502 <tr><td></td></tr></table>
13507 Templates: Wiki Tables: 5. Templated tags, regular td-tags
13521 Templates: Wiki Tables: 6. Templated tags, templated td-tags
13534 ## This test case is very specific to Parsoid's internals
13535 ## and is hence only tested for Parsoid's code. Parsoid uses
13536 ## a <meta> marker tag for <ref> tags and they are expanded
13537 ## much later. We are verifying that this <meta> tag usage
13538 ## doesn't prevent foster parenting.
13540 Templates: Wiki Tables: 7. Fosterable <ref>s should get fostered
13542 {{PartialTable}}<ref>foo</ref>
13547 <p about="#mwt2" typeof="mw:Transclusion" data-mw='{"parts":[{"template":{"target":{"wt":"PartialTable","href":"./Template:PartialTable"},"params":{},"i":0}},"<ref>foo</ref>\n|}"]}'><sup about="#mwt3" class="mw-ref" id="cite_ref-1" rel="dc:references" typeof="mw:Extension/ref" data-mw='{"name":"ref","attrs":{},"body":{"id":"mw-reference-text-cite_note-1"}}'><a href="./Main_Page#cite_note-1" style="counter-reset: mw-Ref 1;"><span class="mw-reflink-text">[1]</span></a></sup></p><table about="#mwt2">
13551 <ol class="mw-references references" typeof="mw:Extension/references" about="#mwt5" data-mw='{"name":"references","attrs":{}}'><li about="#cite_note-1" id="cite_note-1"><a href="./Main_Page#cite_ref-1" rel="mw:referencedBy"><span class="mw-linkback-text">↑ </span></a> <span id="mw-reference-text-cite_note-1" class="mw-reference-text">foo</span></li></ol>
13555 Templates: Wiki Tables: 8. Fosterable meta-tags should get fostered
13565 <span about="#mwt1" typeof="mw:Transclusion" data-mw='{"parts":[{"template":{"target":{"wt":"echo","href":"./Template:Echo"},"params":{"1":{"wt":"\n{{{!}}\n{{!}}-"}},"i":0}},"\n<onlyinclude>\n|foo\n</onlyinclude>\n{{!}}}"]}'>
13566 </span><meta typeof="mw:Includes/OnlyInclude" about="#mwt1"/><table about="#mwt1">
13570 <meta typeof="mw:Includes/OnlyInclude/End"/></td></tr>
13575 Templates: Lists: Multi-line list-items via templates
13577 *{{echo|a {{nonexistent|
13579 *{{echo|b {{nonexistent|
13582 <ul><li>a <a href="/index.php?title=Template:Nonexistent&action=edit&redlink=1" class="new" title="Template:Nonexistent (page does not exist)">Template:Nonexistent</a></li>
13583 <li>b <a href="/index.php?title=Template:Nonexistent&action=edit&redlink=1" class="new" title="Template:Nonexistent (page does not exist)">Template:Nonexistent</a></li></ul>
13588 Templates: Ugly nesting: 1. Quotes opened/closed across templates (echo)
13590 {{echo|''a}}{{echo|b''c''d}}{{echo|''e}}
13592 <p><i>ab</i>c<i>d</i>e
13597 Templates: Ugly nesting: 2. Quotes opened/closed across templates (echo_with_span)
13598 (PHP parser generates misnested html)
13600 {{echo_with_span|''a}}{{echo_with_span|b''c''d}}{{echo_with_span|''e}}
13602 <p><span about="#mwt1" typeof="mw:Transclusion" data-mw="{"parts":[{"template":{"target":{"wt":"echo_with_span","href":"./Template:Echo_with_span"},"params":{"1":{"wt":"''a"}},"i":0}}]}"><i>a</i></span><i about="#mwt2" typeof="mw:Transclusion" data-mw="{"parts":[{"template":{"target":{"wt":"echo_with_span","href":"./Template:Echo_with_span"},"params":{"1":{"wt":"b''c''d"}},"i":0}},{"template":{"target":{"wt":"echo_with_span","href":"./Template:Echo_with_span"},"params":{"1":{"wt":"''e"}},"i":1}}]}"><span>b</span></i><span about="#mwt2">c</span><i about="#mwt2">d<span></span></i><span about="#mwt2">e</span></p>
13606 Templates: Ugly nesting: 3. Quotes opened/closed across templates (echo_with_div)
13607 (PHP parser generates misnested html; Parsoid html2wt mode adds newlines between {{echo}}s)
13609 parsoid=wt2html,wt2wt
13611 {{echo_with_div|''a}}{{echo_with_div|b''c''d}}{{echo_with_div|''e}}
13613 <div about="#mwt1" typeof="mw:Transclusion" data-mw="{"parts":[{"template":{"target":{"wt":"echo_with_div","href":"./Template:Echo_with_div"},"params":{"1":{"wt":"''a"}},"i":0}}]}"><i>a</i></div>
13614 <div about="#mwt2" typeof="mw:Transclusion" data-mw="{"parts":[{"template":{"target":{"wt":"echo_with_div","href":"./Template:Echo_with_div"},"params":{"1":{"wt":"b''c''d"}},"i":0}}]}"><i>b</i>c<i>d</i></div>
13615 <div about="#mwt3" typeof="mw:Transclusion" data-mw="{"parts":[{"template":{"target":{"wt":"echo_with_div","href":"./Template:Echo_with_div"},"params":{"1":{"wt":"''e"}},"i":0}}]}">e</div>
13619 Templates: Ugly nesting: 4. Divs opened/closed across templates
13621 a<div>b{{echo|c</div>d}}e
13626 <p>a</p><div>bc</div><p>de
13631 Templates: Ugly templates: 3. newline-only template parameter
13640 # This looks like a bug: a single newline triggers p/br for some reason.
13642 Templates: Ugly templates: 4. newline-only template parameter inconsistency
13651 # T66017 -- ugly wikitext with fostered content generates two template ranges that
13652 # have a true overlap (T1-start - T2-start - T1-end - T2-end).
13654 Templates: Ugly templates: 5. Template encapsulation test: Non-trivial overlap of template ranges is properly handled
13660 <div about="#mwt1" typeof="mw:Transclusion" data-parsoid='{"stx":"html","autoInsertedEnd":true,"pi":[[{"k":"1"}],[{"k":"1"}],[{"k":"1"}]]}' data-mw='{"parts":[{"template":{"target":{"wt":"echo","href":"./Template:Echo"},"params":{"1":{"wt":"<table>"}},"i":0}},"\n",{"template":{"target":{"wt":"echo","href":"./Template:Echo"},"params":{"1":{"wt":"<div>foo"}},"i":1}},"\n",{"template":{"target":{"wt":"echo","href":"./Template:Echo"},"params":{"1":{"wt":"</table>"}},"i":2}}]}'>foo</div><span about="#mwt1">
13661 </span><table about="#mwt1">
13665 # T66017 -- ugly wikitext with fostered content generates two template ranges
13666 # that are "identical" and generate nesting cycles in the algorithm
13668 Templates: Ugly templates: 6. Template encapsulation test: Cyclical nesting of template ranges is properly handled
13670 {{echo|<table><tr><td><table>}}
13674 <table about="#mwt1" typeof="mw:Transclusion" data-mw='{"parts":[{"template":{"target":{"wt":"echo","href":"./Template:Echo"},"params":{"1":{"wt":"<table><tr><td><table>"}},"i":0}},"\n",{"template":{"target":{"wt":"echo","href":"./Template:Echo"},"params":{"1":{"wt":"<div>"}},"i":1}},"\n",{"template":{"target":{"wt":"echo","href":"./Template:Echo"},"params":{"1":{"wt":"</div>"}},"i":2}}]}' data-parsoid='{"stx":"html","autoInsertedEnd":true,"pi":[[{"k":"1"}],[{"k":"1"}],[{"k":"1"}]]}'><tbody><tr data-parsoid='{"stx":"html"}'><td data-parsoid='{"stx":"html"}'><div data-parsoid='{"stx":"html"}'>
13675 </div><table about="#mwt1" data-parsoid='{"stx":"html"}'>
13676 </table></td></tr></tbody></table>
13680 Templates: Parameters substituted at the top-level
13682 {{{foo|''who'' {{echo|me}}? '''never!'''}}}
13686 <p><i>who</i> me? <b>never!</b>
13690 <p about="#mwt2" typeof="mw:Param" data-mw='{"parts":[{"templatearg":{"target":{"wt":"foo"},"params":{"1":{"wt":"''who'' {{echo|me}}? '''never!'''"}},"i":0}}]}'><i>who</i> me? <b>never!</b></p>
13692 <p about="#mwt3" typeof="mw:Param" data-mw='{"parts":[{"templatearg":{"target":{"wt":"foo"},"params":{"1":{"wt":"bar"},"2":{"wt":"baz"}},"i":0}}]}'>bar</p>
13696 Templates: Param with empty arg in the final position
13700 <span about="#mwt1" typeof="mw:Param" data-mw='{"parts":[{"templatearg":{"target":{"wt":"hi"},"params":{"1":{"wt":""}},"i":0}}]}'></span>
13704 Parser Functions: 1. Simple example
13713 Parser Functions: 2. Nested use (only outermost should be marked up)
13721 ## Note that the templates inside the references are not wrapped
13723 Template nested in extension tag in template
13727 {{echo|hi<ref>[[ho|{{echo|hi}}]]</ref>}}
13728 {{echo|hi<ref>[http://test.com?q={{echo|ho}}]</ref>}}
13729 {{echo|hi<ref>-{ho|{{echo|hi}}}-</ref>}}
13732 <p><span about="#mwt2" typeof="mw:Transclusion" data-mw='{"parts":[{"template":{"target":{"wt":"echo","href":"./Template:Echo"},"params":{"1":{"wt":"hi<ref>[[ho|{{echo|hi}}]]</ref>"}},"i":0}}]}'>hi</span><sup about="#mwt2" class="mw-ref" id="cite_ref-1" rel="dc:references" typeof="mw:Extension/ref" data-mw='{"name":"ref","attrs":{},"body":{"id":"mw-reference-text-cite_note-1"}}'><a href="./Wikipedia:首页#cite_note-1" style="counter-reset: mw-Ref 1;"><span class="mw-reflink-text">[1]</span></a></sup>
13733 <span about="#mwt8" typeof="mw:Transclusion" data-mw='{"parts":[{"template":{"target":{"wt":"echo","href":"./Template:Echo"},"params":{"1":{"wt":"hi<ref>[http://test.com?q={{echo|ho}}]</ref>"}},"i":0}}]}'>hi</span><sup about="#mwt8" class="mw-ref" id="cite_ref-2" rel="dc:references" typeof="mw:Extension/ref" data-mw='{"name":"ref","attrs":{},"body":{"id":"mw-reference-text-cite_note-2"}}'><a href="./Wikipedia:首页#cite_note-2" style="counter-reset: mw-Ref 2;"><span class="mw-reflink-text">[2]</span></a></sup>
13734 <span about="#mwt13" typeof="mw:Transclusion" data-mw='{"parts":[{"template":{"target":{"wt":"echo","href":"./Template:Echo"},"params":{"1":{"wt":"hi<ref>-{ho|{{echo|hi}}}-</ref>"}},"i":0}}]}'>hi</span><sup about="#mwt13" class="mw-ref" id="cite_ref-3" rel="dc:references" typeof="mw:Extension/ref" data-mw='{"name":"ref","attrs":{},"body":{"id":"mw-reference-text-cite_note-3"}}'><a href="./Wikipedia:首页#cite_note-3" style="counter-reset: mw-Ref 3;"><span class="mw-reflink-text">[3]</span></a></sup></p>
13735 <ol class="mw-references references" typeof="mw:Extension/references" about="#mwt17" data-mw='{"name":"references","attrs":{}}'><li about="#cite_note-1" id="cite_note-1"><a href="./Wikipedia:首页#cite_ref-1" rel="mw:referencedBy"><span class="mw-linkback-text">↑ </span></a> <span id="mw-reference-text-cite_note-1" class="mw-reference-text"><a rel="mw:WikiLink" href="./Ho" title="Ho">hi</a></span></li><li about="#cite_note-2" id="cite_note-2"><a href="./Wikipedia:首页#cite_ref-2" rel="mw:referencedBy"><span class="mw-linkback-text">↑ </span></a> <span id="mw-reference-text-cite_note-2" class="mw-reference-text"><a rel="mw:ExtLink" class="external autonumber" href="http://test.com?q=ho"></a></span></li><li about="#cite_note-3" id="cite_note-3"><a href="./Wikipedia:首页#cite_ref-3" rel="mw:referencedBy"><span class="mw-linkback-text">↑ </span></a> <span id="mw-reference-text-cite_note-3" class="mw-reference-text"><span typeof="mw:LanguageVariant" data-mw-variant='{"filter":{"l":["ho"],"t":"hi"}}'></span></span></li></ol>
13739 ### Pre-save transform tests
13743 pre-save transform: subst:
13749 This is a test template
13753 pre-save transform: normal template
13763 pre-save transform: nonexistent template
13767 {{thistemplatedoesnotexist}}
13769 {{thistemplatedoesnotexist}}
13773 pre-save transform: subst magic variables
13782 # This is T2089, which I fixed. -- wtm
13784 pre-save transform: subst: templates with parameters
13788 {{subst:paramtest|param="something else"}}
13790 This is a test template with parameter "something else"
13794 Template:nowikitest
13796 <nowiki>'''not wiki'''</nowiki>
13800 pre-save transform: nowiki in subst (T3188)
13804 {{subst:nowikitest}}
13806 <nowiki>'''not wiki'''</nowiki>
13810 Template:commenttest
13812 This template has <!-- a comment --> in it.
13816 pre-save transform: comment in subst (T3936)
13820 {{subst:commenttest}}
13822 This template has <!-- a comment --> in it.
13826 pre-save transform: unclosed tag
13830 <nowiki>'''not wiki'''
13832 <nowiki>'''not wiki'''
13836 pre-save transform: mixed tag case
13840 <NOwiki>'''not wiki'''</noWIKI>
13842 <NOwiki>'''not wiki'''</noWIKI>
13846 pre-save transform: unclosed comment in <nowiki>
13850 wiki<nowiki>nowiki<!--nowiki</nowiki>wiki
13852 wiki<nowiki>nowiki<!--nowiki</nowiki>wiki
13855 # Leading @ in this template definition works around a limitation
13856 # in parsoid's parserTests which otherwise strips the <span> from the
13857 # result (confusing it for a template wrapper)
13861 @<span onmouseover="alert('crap')">Oh no</span>
13865 (confirming safety of fix for subst T3936)
13867 {{Template:dangerous}}
13869 <p>@<span>Oh no</span>
13874 pre-save transform: comment containing gallery (T7024)
13878 <!-- <gallery>data</gallery> -->
13880 <!-- <gallery>data</gallery> -->
13884 pre-save transform: comment containing extension
13888 <!-- <tag>data</tag> -->
13890 <!-- <tag>data</tag> -->
13894 pre-save transform: comment containing nowiki
13898 <!-- <nowiki>data</nowiki> -->
13900 <!-- <nowiki>data</nowiki> -->
13904 pre-save transform: <noinclude> in subst (T5298)
13914 pre-save transform: <onlyinclude> in subst (T5298)
13918 {{subst:Includes2}}
13926 {{<includeonly>subst:</includeonly>Includes}}
13930 Template:SafeSubstTest
13932 {{<includeonly>safesubst:</includeonly>Includes}}
13936 T24297: safesubst: works during PST
13940 {{subst:SafeSubstTest}}{{safesubst:SubstTest}}
13946 T24297: safesubst: works during normal parse
13955 subst: does not work during normal parse
13959 <p>{{subst:Includes}}
13964 pre-save transform: context links ("pipe trick")
13968 [[Article (context)|]]
13971 [[Bar:Article (context)|]]
13972 [[:Bar:Article (context)|]]
13974 [[|Article (context)]]
13978 [[Article (context)|Article]]
13979 [[Bar:Article|Article]]
13980 [[:Bar:Article|Article]]
13981 [[Bar:Article (context)|Article]]
13982 [[:Bar:Article (context)|Article]]
13984 [[Article (context)]]
13985 [[Bar:X (Y) Z|X (Y) Z]]
13986 [[:Bar:X (Y) Z|X (Y) Z]]
13990 pre-save transform: context links ("pipe trick") with interwiki prefix
13994 [[interwiki:Article|]]
13995 [[:interwiki:Article|]]
13996 [[interwiki:Bar:Article|]]
13997 [[:interwiki:Bar:Article|]]
13999 [[interwiki:Article|Article]]
14000 [[:interwiki:Article|Article]]
14001 [[interwiki:Bar:Article|Bar:Article]]
14002 [[:interwiki:Bar:Article|Bar:Article]]
14006 pre-save transform: context links ("pipe trick") with parens in title
14008 pst title=[[Somearticle (context)]]
14012 [[Article (context)|Article]]
14016 pre-save transform: context links ("pipe trick") with comma in title
14018 pst title=[[Someplace, Somewhere]]
14021 [[Otherplace, Elsewhere|]]
14022 [[Otherplace, Elsewhere, Anywhere|]]
14024 [[Otherplace, Somewhere|Otherplace]]
14025 [[Otherplace, Elsewhere|Otherplace]]
14026 [[Otherplace, Elsewhere, Anywhere|Otherplace]]
14030 pre-save transform: context links ("pipe trick") with parens and comma
14032 pst title=[[Someplace (IGNORED), Somewhere]]
14035 [[Otherplace (place), Elsewhere|]]
14037 [[Otherplace, Somewhere|Otherplace]]
14038 [[Otherplace (place), Elsewhere|Otherplace]]
14042 pre-save transform: context links ("pipe trick") with comma and parens
14044 pst title=[[Who, me? (context)]]
14047 [[Me, Myself, and I (1937 song)|]]
14049 [[Yes, you. (context)|Yes, you.]]
14050 [[Me, Myself, and I (1937 song)|Me, Myself, and I]]
14054 pre-save transform: context links ("pipe trick") with namespace
14056 pst title=[[Ns:Somearticle]]
14060 [[Ns:Article|Article]]
14064 pre-save transform: context links ("pipe trick") with namespace and parens
14066 pst title=[[Ns:Somearticle (context)]]
14070 [[Ns:Article (context)|Article]]
14074 pre-save transform: context links ("pipe trick") with namespace and comma
14076 pst title=[[Ns:Somearticle, Context, Whatever]]
14080 [[Ns:Article, Context, Whatever|Article]]
14084 pre-save transform: context links ("pipe trick") with namespace, comma and parens
14086 pst title=[[Ns:Somearticle, Context (context)]]
14090 [[Ns:Article (context)|Article]]
14094 pre-save transform: context links ("pipe trick") with namespace, parens and comma
14096 pst title=[[Ns:Somearticle (IGNORED), Context]]
14100 [[Ns:Article, Context|Article]]
14104 pre-save transform: context links ("pipe trick") with full-width parens and no space (Japanese and Chinese style, T32149)
14108 [[Article(context)|]]
14109 [[Bar:Article(context)|]]
14110 [[:Bar:Article(context)|]]
14111 [[|Article(context)]]
14115 [[Article(context)|Article]]
14116 [[Bar:Article(context)|Article]]
14117 [[:Bar:Article(context)|Article]]
14118 [[Article(context)]]
14119 [[Bar:X(Y)Z|X(Y)Z]]
14120 [[:Bar:X(Y)Z|X(Y)Z]]
14124 pre-save transform: context links ("pipe trick") with full-width parens and space (Japanese and Chinese style, T32149)
14128 [[Article (context)|]]
14129 [[Bar:Article (context)|]]
14130 [[:Bar:Article (context)|]]
14131 [[|Article (context)]]
14135 [[Article (context)|Article]]
14136 [[Bar:Article (context)|Article]]
14137 [[:Bar:Article (context)|Article]]
14138 [[Article (context)]]
14139 [[Bar:X (Y) Z|X (Y) Z]]
14140 [[:Bar:X (Y) Z|X (Y) Z]]
14144 pre-save transform: context links ("pipe trick") with parens and no space (Korean style, T32149)
14148 [[Article(context)|]]
14149 [[Bar:Article(context)|]]
14150 [[:Bar:Article(context)|]]
14151 [[|Article(context)]]
14155 [[Article(context)|Article]]
14156 [[Bar:Article(context)|Article]]
14157 [[:Bar:Article(context)|Article]]
14158 [[Article(context)]]
14159 [[Bar:X(Y)Z|X(Y)Z]]
14160 [[:Bar:X(Y)Z|X(Y)Z]]
14164 pre-save transform: context links ("pipe trick") with commas (T23660)
14168 [[Article (context), context|]]
14169 [[Article (context),context|]]
14170 [[Bar:Article (context), context|]]
14171 [[Bar:Article (context),context|]]
14172 [[:Bar:Article (context), context|]]
14173 [[:Bar:Article (context),context|]]
14175 [[Article (context), context|Article]]
14176 [[Article (context),context|Article]]
14177 [[Bar:Article (context), context|Article]]
14178 [[Bar:Article (context),context|Article]]
14179 [[:Bar:Article (context), context|Article]]
14180 [[:Bar:Article (context),context|Article]]
14184 Parsoid: backwards pipe trick
14191 <p>[[|<b>bar</b>]]</p>
14195 pre-save transform: trim trailing empty lines
14199 Empty lines are trimmed
14205 Empty lines are trimmed
14209 pre-save transform: Signature expansion
14216 * <noinclude>~~~</noinclude>
14217 * <includeonly>~~~</includeonly>
14218 * <onlyinclude>~~~</onlyinclude>
14220 * [[Special:Contributions/127.0.0.1|127.0.0.1]]
14221 * [[Special:Contributions/127.0.0.1|127.0.0.1]] 00:02, 1 January 1970 (UTC)
14222 * 00:02, 1 January 1970 (UTC)
14223 * <noinclude>[[Special:Contributions/127.0.0.1|127.0.0.1]]</noinclude>
14224 * <includeonly>[[Special:Contributions/127.0.0.1|127.0.0.1]]</includeonly>
14225 * <onlyinclude>[[Special:Contributions/127.0.0.1|127.0.0.1]]</onlyinclude>
14230 ParserOutput flags from signature expansion (T84843)
14237 [[Special:Contributions/127.0.0.1|127.0.0.1]] 00:02, 1 January 1970 (UTC)
14238 flags=user-signature
14243 pre-save transform: Signature expansion in nowiki tags (T2093)
14249 <nowiki>~~~~</nowiki>
14251 <includeonly><nowiki>~~~~</nowiki></includeonly>
14253 <noinclude><nowiki>~~~~</nowiki></noinclude>
14255 <onlyinclude><nowiki>~~~~</nowiki></onlyinclude>
14257 {{subst:Foo}} shall be converted to FOO
14259 As well as inside noinclude/onlyinclude
14260 <noinclude>{{subst:Foo}}</noinclude>
14261 <onlyinclude>{{subst:Foo}}</onlyinclude>
14263 But not inside includeonly
14264 <includeonly>{{subst:Foo}}</includeonly>
14268 <nowiki>~~~~</nowiki>
14270 <includeonly><nowiki>~~~~</nowiki></includeonly>
14272 <noinclude><nowiki>~~~~</nowiki></noinclude>
14274 <onlyinclude><nowiki>~~~~</nowiki></onlyinclude>
14276 FOO shall be converted to FOO
14278 As well as inside noinclude/onlyinclude
14279 <noinclude>FOO</noinclude>
14280 <onlyinclude>FOO</onlyinclude>
14282 But not inside includeonly
14283 <includeonly>{{subst:Foo}}</includeonly>
14287 Parsoid: Recognize nowiki with trailing space in tags
14291 <nowiki ><div>[[foo]]</nowiki >
14299 <p><div>[[foo]]
14300 </p><p>a<nowiki / >b
14302 </p><p>e<nowiki/ >f
14305 <p><span typeof="mw:Nowiki"><div>[[foo]]</span></p>
14307 <p>a<nowiki / >b</p>
14309 <p>c<span typeof="mw:Nowiki"></span>d</p>
14311 <p>e<nowiki/ >f</p>
14315 Parsoid: Recognize nowiki with odd capitalization
14319 <noWikI ><div>[[foo]]</Nowiki >
14321 <p><span typeof="mw:Nowiki"><div>[[foo]]</span></p>
14326 Parsoid: Escape nowiki with trailing space in tags
14330 <p><nowiki > foo </nowiki ></p>
14331 <p>a<nowiki />b</p>
14332 <p>c<nowiki/ >d</p>
14334 <nowiki > foo </nowiki >
14342 Parsoid: Escape weird noWikI capitalizations
14346 <p><noWikI > foo </NoWikI ></p>
14348 <noWikI > foo </NoWikI >
14352 ### Message transform tests
14355 message transform: magic variables
14365 message transform: should not transform wiki markup
14375 message transform: <noinclude> in transcluded template (T6926)
14385 message transform: <onlyinclude> in transcluded template (T6926)
14395 {{#special:}} page name, known
14399 {{#special:Recentchanges}}
14401 Special:RecentChanges
14405 {{#special:}} page name with subpage, known
14409 {{#special:Recentchanges/param}}
14411 Special:RecentChanges/param
14415 {{#special:}} page name, unknown
14419 {{#special:foobar nonexistent}}
14421 Special:Foobar nonexistent
14425 {{#speciale:}} page name, known
14429 {{#speciale:Recentchanges}}
14431 Special:RecentChanges
14435 {{#speciale:}} page name with subpage, known
14439 {{#speciale:Recentchanges/param}}
14441 Special:RecentChanges/param
14445 {{#speciale:}} page name, unknown
14449 {{#speciale:foobar nonexistent}}
14451 Special:Foobar_nonexistent
14457 ### For Parsoid-specific tests, see
14458 #### https://www.mediawiki.org/wiki/Parsoid/MediaWiki_DOM_spec#Images
14463 parsoid=wt2html,wt2wt,html2html
14465 [[Image:foobar.jpg]]
14467 <p><a href="/wiki/File:Foobar.jpg" class="image"><img alt="Foobar.jpg" src="http://example.com/images/3/3a/Foobar.jpg" width="1941" height="220" /></a>
14470 <p><figure-inline class="mw-default-size" typeof="mw:Image"><a href="./File:Foobar.jpg"><img resource="./File:Foobar.jpg" src="//example.com/images/3/3a/Foobar.jpg" data-file-width="1941" data-file-height="220" data-file-type="bitmap" height="220" width="1941"/></a></figure-inline></p>
14474 Serialize simple image with span wrapper
14478 <p><span class="mw-default-size" typeof="mw:Image"><a href="./File:Foobar.jpg"><img resource="./File:Foobar.jpg" src="//example.com/images/3/3a/Foobar.jpg" data-file-width="1941" data-file-height="220" data-file-type="bitmap" height="220" width="1941"/></a></span></p>
14480 [[File:Foobar.jpg]]
14484 Simple image (using File: namespace, now canonical)
14486 [[File:Foobar.jpg]]
14488 <p><a href="/wiki/File:Foobar.jpg" class="image"><img alt="Foobar.jpg" src="http://example.com/images/3/3a/Foobar.jpg" width="1941" height="220" /></a>
14491 <p><figure-inline class="mw-default-size" typeof="mw:Image"><a href="./File:Foobar.jpg"><img resource="./File:Foobar.jpg" src="//example.com/images/3/3a/Foobar.jpg" data-file-width="1941" data-file-height="220" data-file-type="bitmap" height="220" width="1941"/></a></figure-inline></p>
14495 Right-aligned image
14497 [[File:Foobar.jpg|right]]
14499 <div class="floatright"><a href="/wiki/File:Foobar.jpg" class="image"><img alt="Foobar.jpg" src="http://example.com/images/3/3a/Foobar.jpg" width="1941" height="220" /></a></div>
14502 <figure class="mw-default-size mw-halign-right" typeof="mw:Image"><a href="./File:Foobar.jpg"><img resource="./File:Foobar.jpg" src="//example.com/images/3/3a/Foobar.jpg" data-file-width="1941" data-file-height="220" data-file-type="bitmap" height="220" width="1941"/></a></figure>
14508 [[File:Foobar.jpg|right|Caption text]]
14510 <div class="floatright"><a href="/wiki/File:Foobar.jpg" class="image" title="Caption text"><img alt="Caption text" src="http://example.com/images/3/3a/Foobar.jpg" width="1941" height="220" /></a></div>
14513 <figure class="mw-default-size mw-halign-right" typeof="mw:Image"><a href="./File:Foobar.jpg"><img resource="./File:Foobar.jpg" src="//example.com/images/3/3a/Foobar.jpg" data-file-width="1941" data-file-height="220" data-file-type="bitmap" height="220" width="1941"/></a><figcaption>Caption text</figcaption></figure>
14517 Image with caption, T55312 #1
14519 [[File:Foobar.jpg|right|Caption page stuff]]
14521 <div class="floatright"><a href="/wiki/File:Foobar.jpg" class="image" title="Caption page stuff"><img alt="Caption page stuff" src="http://example.com/images/3/3a/Foobar.jpg" width="1941" height="220" /></a></div>
14524 <figure class="mw-default-size mw-halign-right" typeof="mw:Image"><a href="./File:Foobar.jpg"><img resource="./File:Foobar.jpg" src="//example.com/images/3/3a/Foobar.jpg" data-file-width="1941" data-file-height="220" data-file-type="bitmap" height="220" width="1941"/></a><figcaption>Caption page stuff</figcaption></figure>
14528 Image with caption, T55312 #2
14530 [[File:Foobar.jpg|right|Caption page=]]
14532 <div class="floatright"><a href="/wiki/File:Foobar.jpg" class="image" title="Caption page="><img alt="Caption page=" src="http://example.com/images/3/3a/Foobar.jpg" width="1941" height="220" /></a></div>
14535 <figure class="mw-default-size mw-halign-right" typeof="mw:Image"><a href="./File:Foobar.jpg"><img resource="./File:Foobar.jpg" src="//example.com/images/3/3a/Foobar.jpg" data-file-width="1941" data-file-height="220" data-file-type="bitmap" height="220" width="1941"/></a><figcaption>Caption page=</figcaption></figure>
14539 Image with caption, T55312 #3
14541 [[File:Foobar.jpg|right|Caption page=stuff]]
14543 <div class="floatright"><a href="/wiki/File:Foobar.jpg" class="image" title="Caption page=stuff"><img alt="Caption page=stuff" src="http://example.com/images/3/3a/Foobar.jpg" width="1941" height="220" /></a></div>
14546 <figure class="mw-default-size mw-halign-right" typeof="mw:Image"><a href="./File:Foobar.jpg"><img resource="./File:Foobar.jpg" src="//example.com/images/3/3a/Foobar.jpg" data-file-width="1941" data-file-height="220" data-file-type="bitmap" height="220" width="1941"/></a><figcaption>Caption page=stuff</figcaption></figure>
14550 Image caption with pipe entity
14552 [[File:Foobar.jpg|thumb|one | two]]
14553 [[File:Foobar.jpg|thumb|one ''two'' | three]]
14555 <div class="thumb tright"><div class="thumbinner" style="width:182px;"><a href="/wiki/File:Foobar.jpg" class="image"><img alt="" src="http://example.com/images/thumb/3/3a/Foobar.jpg/180px-Foobar.jpg" width="180" height="20" class="thumbimage" srcset="http://example.com/images/thumb/3/3a/Foobar.jpg/270px-Foobar.jpg 1.5x, http://example.com/images/thumb/3/3a/Foobar.jpg/360px-Foobar.jpg 2x" /></a> <div class="thumbcaption"><div class="magnify"><a href="/wiki/File:Foobar.jpg" class="internal" title="Enlarge"></a></div>one | two</div></div></div>
14556 <div class="thumb tright"><div class="thumbinner" style="width:182px;"><a href="/wiki/File:Foobar.jpg" class="image"><img alt="" src="http://example.com/images/thumb/3/3a/Foobar.jpg/180px-Foobar.jpg" width="180" height="20" class="thumbimage" srcset="http://example.com/images/thumb/3/3a/Foobar.jpg/270px-Foobar.jpg 1.5x, http://example.com/images/thumb/3/3a/Foobar.jpg/360px-Foobar.jpg 2x" /></a> <div class="thumbcaption"><div class="magnify"><a href="/wiki/File:Foobar.jpg" class="internal" title="Enlarge"></a></div>one <i>two</i> | three</div></div></div>
14559 <figure class="mw-default-size" typeof="mw:Image/Thumb"><a href="./File:Foobar.jpg"><img resource="./File:Foobar.jpg" src="//example.com/images/thumb/3/3a/Foobar.jpg/220px-Foobar.jpg" data-file-width="1941" data-file-height="220" data-file-type="bitmap" height="25" width="220"/></a><figcaption>one <span typeof="mw:Entity">|</span> two</figcaption></figure>
14560 <figure class="mw-default-size" typeof="mw:Image/Thumb"><a href="./File:Foobar.jpg"><img resource="./File:Foobar.jpg" src="//example.com/images/thumb/3/3a/Foobar.jpg/220px-Foobar.jpg" data-file-width="1941" data-file-height="220" data-file-type="bitmap" height="25" width="220"/></a><figcaption>one <i>two</i> <span typeof="mw:Entity">|</span> three</figcaption></figure>
14564 Allow empty links in image captions (T62753)
14568 [[File:Foobar.jpg|thumb|Caption [[Link1]]
14573 <div class="thumb tright"><div class="thumbinner" style="width:222px;"><a href="/wiki/File:Foobar.jpg" class="image"><img alt="" src="http://example.com/images/thumb/3/3a/Foobar.jpg/220px-Foobar.jpg" width="220" height="25" class="thumbimage" srcset="http://example.com/images/thumb/3/3a/Foobar.jpg/330px-Foobar.jpg 1.5x, http://example.com/images/thumb/3/3a/Foobar.jpg/440px-Foobar.jpg 2x" /></a> <div class="thumbcaption"><div class="magnify"><a href="/wiki/File:Foobar.jpg" class="internal" title="Enlarge"></a></div>Caption <a href="/index.php?title=Link1&action=edit&redlink=1" class="new" title="Link1 (page does not exist)">Link1</a> [[]] <a href="/index.php?title=Link2&action=edit&redlink=1" class="new" title="Link2 (page does not exist)">Link2</a></div></div></div>
14576 <figure class="mw-default-size" typeof="mw:Image/Thumb" data-parsoid='{"optList":[{"ck":"thumbnail","ak":"thumb"},{"ck":"caption","ak":"Caption [[Link1]]\n[[]]\n[[Link2]]\n"}]}'><a href="./File:Foobar.jpg" data-parsoid='{"a":{"href":"./File:Foobar.jpg"}}'><img resource="./File:Foobar.jpg" src="//example.com/images/thumb/3/3a/Foobar.jpg/220px-Foobar.jpg" data-file-width="1941" data-file-height="220" data-file-type="bitmap" height="25" width="220" data-parsoid='{"a":{"resource":"./File:Foobar.jpg","height":"25","width":"220"},"sa":{"resource":"File:Foobar.jpg"}}'/></a><figcaption>Caption <a rel="mw:WikiLink" href="./Link1" title="Link1" data-parsoid='{"stx":"simple","a":{"href":"./Link1"},"sa":{"href":"Link1"}}'>Link1</a>
14578 <a rel="mw:WikiLink" href="./Link2" title="Link2" data-parsoid='{"stx":"simple","a":{"href":"./Link2"},"sa":{"href":"Link2"}}'>Link2</a>
14579 </figcaption></figure>
14583 Titles in unlinked images (T23454)
14585 [[File:Foobar.jpg|link=|stuff]]
14587 <p><img alt="stuff" src="http://example.com/images/3/3a/Foobar.jpg" title="stuff" width="1941" height="220" />
14590 <p><figure-inline class="mw-default-size" typeof="mw:Image" data-mw='{"caption":"stuff"}'><span><img resource="./File:Foobar.jpg" src="//example.com/images/3/3a/Foobar.jpg" data-file-width="1941" data-file-height="220" data-file-type="bitmap" height="220" width="1941"/></span></figure-inline></p>
14594 Link with empty target
14603 Image with link trail
14605 Linktrails should not work for images: [[File:Foobar.jpg]]s
14607 <p>Linktrails should not work for images: <a href="/wiki/File:Foobar.jpg" class="image"><img alt="Foobar.jpg" src="http://example.com/images/3/3a/Foobar.jpg" width="1941" height="220" /></a>s
14610 <p>Linktrails should not work for images: <figure-inline class="mw-default-size" typeof="mw:Image"><a href="./File:Foobar.jpg"><img resource="./File:Foobar.jpg" src="//example.com/images/3/3a/Foobar.jpg" data-file-width="1941" data-file-height="220" data-file-type="bitmap" height="220" width="1941"/></a></figure-inline>s</p>
14614 Image with empty attribute
14616 parsoid=wt2html,wt2wt,html2html
14618 [[File:Foobar.jpg|right||Caption text]]
14620 <div class="floatright"><a href="/wiki/File:Foobar.jpg" class="image" title="Caption text"><img alt="Caption text" src="http://example.com/images/3/3a/Foobar.jpg" width="1941" height="220" /></a></div>
14623 <figure class="mw-default-size mw-halign-right" typeof="mw:Image"><a href="./File:Foobar.jpg"><img resource="./File:Foobar.jpg" src="//example.com/images/3/3a/Foobar.jpg" data-file-width="1941" data-file-height="220" data-file-type="bitmap" height="220" width="1941"/></a><figcaption>Caption text</figcaption></figure>
14627 1. Block image with individual attributes from templates
14629 [[File:Foobar.jpg|thumb|{{echo|137px}}|This is a caption]]
14631 <div class="thumb tright"><div class="thumbinner" style="width:139px;"><a href="/wiki/File:Foobar.jpg" class="image"><img alt="" src="http://example.com/images/thumb/3/3a/Foobar.jpg/137px-Foobar.jpg" width="137" height="16" class="thumbimage" srcset="http://example.com/images/thumb/3/3a/Foobar.jpg/206px-Foobar.jpg 1.5x, http://example.com/images/thumb/3/3a/Foobar.jpg/274px-Foobar.jpg 2x" /></a> <div class="thumbcaption"><div class="magnify"><a href="/wiki/File:Foobar.jpg" class="internal" title="Enlarge"></a></div>This is a caption</div></div></div>
14634 <figure typeof="mw:Image/Thumb mw:ExpandedAttrs" about="#mwt2" data-parsoid='{"optList":[{"ck":"thumbnail","ak":"thumb"},{"ck":"width","ak":"{{echo|137px}}"},{"ck":"caption","ak":"This is a caption"}]}' data-mw='{"attribs":[["thumbnail",{"html":"thumb"}],["width",{"html":"<span about=\"#mwt1\" typeof=\"mw:Transclusion\" data-parsoid='{\"pi\":[[{\"k\":\"1\"}]],\"dsr\":[24,38,null,null]}' data-mw='{\"parts\":[{\"template\":{\"target\":{\"wt\":\"echo\",\"href\":\"./Template:Echo\"},\"params\":{\"1\":{\"wt\":\"137px\"}},\"i\":0}}]}'>137px</span>"}]]}'><a href="./File:Foobar.jpg" data-parsoid='{"a":{"href":"./File:Foobar.jpg"},"sa":{}}'><img resource="./File:Foobar.jpg" src="//example.com/images/thumb/3/3a/Foobar.jpg/137px-Foobar.jpg" data-file-width="1941" data-file-height="220" data-file-type="bitmap" height="16" width="137" data-parsoid='{"a":{"resource":"./File:Foobar.jpg","height":"16","width":"137"},"sa":{"resource":"File:Foobar.jpg"}}'/></a><figcaption>This is a caption</figcaption></figure>
14638 2. Block Image with individual attributes from templates
14640 [[File:Foobar.jpg|{{echo|thumb}}|{{echo|137px}}|This is a caption]]
14642 <div class="thumb tright"><div class="thumbinner" style="width:139px;"><a href="/wiki/File:Foobar.jpg" class="image"><img alt="" src="http://example.com/images/thumb/3/3a/Foobar.jpg/137px-Foobar.jpg" width="137" height="16" class="thumbimage" srcset="http://example.com/images/thumb/3/3a/Foobar.jpg/206px-Foobar.jpg 1.5x, http://example.com/images/thumb/3/3a/Foobar.jpg/274px-Foobar.jpg 2x" /></a> <div class="thumbcaption"><div class="magnify"><a href="/wiki/File:Foobar.jpg" class="internal" title="Enlarge"></a></div>This is a caption</div></div></div>
14645 <figure typeof="mw:Image/Thumb mw:ExpandedAttrs" about="#mwt3" data-parsoid='{"optList":[{"ck":"thumbnail","ak":"{{echo|thumb}}"},{"ck":"width","ak":"{{echo|137px}}"},{"ck":"caption","ak":"This is a caption"}]}' data-mw='{"attribs":[["thumbnail",{"html":"<span about=\"#mwt1\" typeof=\"mw:Transclusion\" data-parsoid='{\"pi\":[[{\"k\":\"1\"}]],\"dsr\":[18,32,null,null]}' data-mw='{\"parts\":[{\"template\":{\"target\":{\"wt\":\"echo\",\"href\":\"./Template:Echo\"},\"params\":{\"1\":{\"wt\":\"thumb\"}},\"i\":0}}]}'>thumb</span>"}],["width",{"html":"<span about=\"#mwt2\" typeof=\"mw:Transclusion\" data-parsoid='{\"pi\":[[{\"k\":\"1\"}]],\"dsr\":[33,47,null,null]}' data-mw='{\"parts\":[{\"template\":{\"target\":{\"wt\":\"echo\",\"href\":\"./Template:Echo\"},\"params\":{\"1\":{\"wt\":\"137px\"}},\"i\":0}}]}'>137px</span>"}]]}'><a href="./File:Foobar.jpg" data-parsoid='{"a":{"href":"./File:Foobar.jpg"},"sa":{}}'><img resource="./File:Foobar.jpg" src="//example.com/images/thumb/3/3a/Foobar.jpg/137px-Foobar.jpg" data-file-width="1941" data-file-height="220" data-file-type="bitmap" height="16" width="137" data-parsoid='{"a":{"resource":"./File:Foobar.jpg","height":"16","width":"137"},"sa":{"resource":"File:Foobar.jpg"}}'/></a><figcaption>This is a caption</figcaption></figure>
14649 3. Inline image with individual attributes from templates
14651 [[File:Foobar.jpg|{{echo|50px}}]]
14653 <p><a href="/wiki/File:Foobar.jpg" class="image"><img alt="Foobar.jpg" src="http://example.com/images/thumb/3/3a/Foobar.jpg/50px-Foobar.jpg" width="50" height="6" srcset="http://example.com/images/thumb/3/3a/Foobar.jpg/75px-Foobar.jpg 1.5x, http://example.com/images/thumb/3/3a/Foobar.jpg/100px-Foobar.jpg 2x" /></a>
14656 <p><figure-inline typeof="mw:Image mw:ExpandedAttrs" about="#mwt2" data-parsoid='{"optList":[{"ck":"width","ak":"{{echo|50px}}"}]}' data-mw='{"attribs":[["width",{"html":"<span about=\"#mwt1\" typeof=\"mw:Transclusion\" data-parsoid='{\"pi\":[[{\"k\":\"1\"}]],\"dsr\":[18,31,null,null]}' data-mw='{\"parts\":[{\"template\":{\"target\":{\"wt\":\"echo\",\"href\":\"./Template:Echo\"},\"params\":{\"1\":{\"wt\":\"50px\"}},\"i\":0}}]}'>50px</span>"}]]}'><a href="./File:Foobar.jpg" data-parsoid='{"a":{"href":"./File:Foobar.jpg"},"sa":{}}'><img resource="./File:Foobar.jpg" src="//example.com/images/thumb/3/3a/Foobar.jpg/50px-Foobar.jpg" data-file-width="1941" data-file-height="220" data-file-type="bitmap" height="6" width="50" data-parsoid='{"a":{"resource":"./File:Foobar.jpg","height":"6","width":"50"},"sa":{"resource":"File:Foobar.jpg"}}'/></a></figure-inline></p>
14659 ## Parsoid does not provide editing support for images where templates produce multiple image attributes.
14660 ## To signal this, we add a 'mw:Placeholder' type to such images. This could change in the future.
14662 Image with multiple attributes from the same template
14664 [[File:Foobar.jpg|{{image_attribs}}]]
14666 <div class="floatright"><a href="/wiki/File:Foobar.jpg" class="image" title="Caption text"><img alt="Caption text" src="http://example.com/images/3/3a/Foobar.jpg" width="1941" height="220" /></a></div>
14669 <figure class="mw-default-size mw-halign-right" typeof="mw:Image mw:Placeholder"><a href="./File:Foobar.jpg"><img resource="./File:Foobar.jpg" src="//example.com/images/3/3a/Foobar.jpg" data-file-width="1941" data-file-height="220" data-file-type="bitmap" height="220" width="1941"/></a><figcaption>Caption text</figcaption></figure>
14673 Image with link tails
14677 123[[File:Foobar.jpg]]456
14678 123[[File:Foobar.jpg|right]]456
14679 123[[File:Foobar.jpg|thumb]]456
14681 <p>123<a href="/wiki/File:Foobar.jpg" class="image"><img alt="Foobar.jpg" src="http://example.com/images/3/3a/Foobar.jpg" width="1941" height="220" /></a>456
14683 123<div class="floatright"><a href="/wiki/File:Foobar.jpg" class="image"><img alt="Foobar.jpg" src="http://example.com/images/3/3a/Foobar.jpg" width="1941" height="220" /></a></div>456
14684 123<div class="thumb tright"><div class="thumbinner" style="width:222px;"><a href="/wiki/File:Foobar.jpg" class="image"><img alt="Foobar.jpg" src="http://example.com/images/thumb/3/3a/Foobar.jpg/220px-Foobar.jpg" width="220" height="25" class="thumbimage" srcset="http://example.com/images/thumb/3/3a/Foobar.jpg/330px-Foobar.jpg 1.5x, http://example.com/images/thumb/3/3a/Foobar.jpg/440px-Foobar.jpg 2x" /></a> <div class="thumbcaption"><div class="magnify"><a href="/wiki/File:Foobar.jpg" class="internal" title="Enlarge"></a></div></div></div></div>456
14687 <p>123<a href="/wiki/File:Foobar.jpg" class="image"><img alt="Foobar.jpg" src="http://example.com/images/3/3a/Foobar.jpg" width="1941" height="220" /></a>456
14689 123</p><div class="floatright"><a href="/wiki/File:Foobar.jpg" class="image"><img alt="Foobar.jpg" src="http://example.com/images/3/3a/Foobar.jpg" width="1941" height="220" /></a></div><p>456
14690 123</p><div class="thumb tright"><div class="thumbinner" style="width:222px;"><a href="/wiki/File:Foobar.jpg" class="image"><img alt="Foobar.jpg" src="http://example.com/images/thumb/3/3a/Foobar.jpg/220px-Foobar.jpg" width="220" height="25" class="thumbimage" srcset="http://example.com/images/thumb/3/3a/Foobar.jpg/330px-Foobar.jpg 1.5x, http://example.com/images/thumb/3/3a/Foobar.jpg/440px-Foobar.jpg 2x" /></a> <div class="thumbcaption"><div class="magnify"><a href="/wiki/File:Foobar.jpg" class="internal" title="Enlarge"></a></div></div></div></div><p>456
14693 <p>123<figure-inline class="mw-default-size" typeof="mw:Image"><a href="./File:Foobar.jpg"><img resource="./File:Foobar.jpg" src="//example.com/images/3/3a/Foobar.jpg" data-file-width="1941" data-file-height="220" data-file-type="bitmap" height="220" width="1941"/></a></figure-inline>456</p>
14694 <p>123</p><figure class="mw-default-size mw-halign-right" typeof="mw:Image"><a href="./File:Foobar.jpg"><img resource="./File:Foobar.jpg" src="//example.com/images/3/3a/Foobar.jpg" data-file-width="1941" data-file-height="220" data-file-type="bitmap" height="220" width="1941"/></a></figure><p>456
14695 123</p><figure class="mw-default-size" typeof="mw:Image/Thumb"><a href="./File:Foobar.jpg"><img resource="./File:Foobar.jpg" src="//example.com/images/thumb/3/3a/Foobar.jpg/220px-Foobar.jpg" data-file-width="1941" data-file-height="220" data-file-type="bitmap" height="25" width="220"/></a></figure><p>456</p>
14699 Image with multiple captions -- only last one is accepted
14701 [[File:Foobar.jpg|right|Caption1 - ignored|[[Caption2]] - ignored|Caption3 - accepted]]
14703 <div class="floatright"><a href="/wiki/File:Foobar.jpg" class="image" title="Caption3 - accepted"><img alt="Caption3 - accepted" src="http://example.com/images/3/3a/Foobar.jpg" width="1941" height="220" /></a></div>
14706 <figure class="mw-default-size mw-halign-right" typeof="mw:Image"><a href="./File:Foobar.jpg"><img resource="./File:Foobar.jpg" src="//example.com/images/3/3a/Foobar.jpg" data-file-width="1941" data-file-height="220" data-file-type="bitmap" height="220" width="1941"/></a><figcaption>Caption3 - accepted</figcaption></figure>
14710 Image with multiple widths -- use last
14712 [[File:Foobar.jpg|200px|300px|caption]]
14714 <p><a href="/wiki/File:Foobar.jpg" class="image" title="caption"><img alt="caption" src="http://example.com/images/thumb/3/3a/Foobar.jpg/300px-Foobar.jpg" width="300" height="34" srcset="http://example.com/images/thumb/3/3a/Foobar.jpg/450px-Foobar.jpg 1.5x, http://example.com/images/thumb/3/3a/Foobar.jpg/600px-Foobar.jpg 2x" /></a>
14717 <p><figure-inline typeof="mw:Image" data-mw='{"caption":"caption"}'><a href="./File:Foobar.jpg"><img resource="./File:Foobar.jpg" src="//example.com/images/thumb/3/3a/Foobar.jpg/300px-Foobar.jpg" data-file-width="1941" data-file-height="220" data-file-type="bitmap" height="34" width="300"/></a></figure-inline></p>
14721 Image with multiple alignments -- use first (T50664)
14725 [[File:Foobar.jpg|thumb|left|right|center|caption]]
14727 [[File:Foobar.jpg|middle|text-top|caption]]
14729 <div class="thumb tleft"><div class="thumbinner" style="width:222px;"><a href="/wiki/File:Foobar.jpg" class="image"><img alt="" src="http://example.com/images/thumb/3/3a/Foobar.jpg/220px-Foobar.jpg" width="220" height="25" class="thumbimage" srcset="http://example.com/images/thumb/3/3a/Foobar.jpg/330px-Foobar.jpg 1.5x, http://example.com/images/thumb/3/3a/Foobar.jpg/440px-Foobar.jpg 2x" /></a> <div class="thumbcaption"><div class="magnify"><a href="/wiki/File:Foobar.jpg" class="internal" title="Enlarge"></a></div>caption</div></div></div>
14730 <p><a href="/wiki/File:Foobar.jpg" class="image" title="caption"><img alt="caption" src="http://example.com/images/3/3a/Foobar.jpg" width="1941" height="220" style="vertical-align: middle" /></a>
14733 <figure class="mw-default-size mw-halign-left" typeof="mw:Image/Thumb"><a href="./File:Foobar.jpg"><img resource="./File:Foobar.jpg" src="//example.com/images/thumb/3/3a/Foobar.jpg/220px-Foobar.jpg" data-file-width="1941" data-file-height="220" data-file-type="bitmap" height="25" width="220"/></a><figcaption>caption</figcaption></figure>
14734 <p><figure-inline class="mw-default-size mw-valign-middle" typeof="mw:Image" data-mw='{"caption":"caption"}'><a href="./File:Foobar.jpg"><img resource="./File:Foobar.jpg" src="//example.com/images/3/3a/Foobar.jpg" data-file-width="1941" data-file-height="220" data-file-type="bitmap" height="220" width="1941"/></a></figure-inline></p>
14738 Image with width attribute at different positions
14740 [[File:Foobar.jpg|200px|right|Caption]]
14741 [[File:Foobar.jpg|right|200px|Caption]]
14742 [[File:Foobar.jpg|right|Caption|200px]]
14744 <div class="floatright"><a href="/wiki/File:Foobar.jpg" class="image" title="Caption"><img alt="Caption" src="http://example.com/images/thumb/3/3a/Foobar.jpg/200px-Foobar.jpg" width="200" height="23" srcset="http://example.com/images/thumb/3/3a/Foobar.jpg/300px-Foobar.jpg 1.5x, http://example.com/images/thumb/3/3a/Foobar.jpg/400px-Foobar.jpg 2x" /></a></div>
14745 <div class="floatright"><a href="/wiki/File:Foobar.jpg" class="image" title="Caption"><img alt="Caption" src="http://example.com/images/thumb/3/3a/Foobar.jpg/200px-Foobar.jpg" width="200" height="23" srcset="http://example.com/images/thumb/3/3a/Foobar.jpg/300px-Foobar.jpg 1.5x, http://example.com/images/thumb/3/3a/Foobar.jpg/400px-Foobar.jpg 2x" /></a></div>
14746 <div class="floatright"><a href="/wiki/File:Foobar.jpg" class="image" title="Caption"><img alt="Caption" src="http://example.com/images/thumb/3/3a/Foobar.jpg/200px-Foobar.jpg" width="200" height="23" srcset="http://example.com/images/thumb/3/3a/Foobar.jpg/300px-Foobar.jpg 1.5x, http://example.com/images/thumb/3/3a/Foobar.jpg/400px-Foobar.jpg 2x" /></a></div>
14749 <figure class="mw-halign-right" typeof="mw:Image"><a href="./File:Foobar.jpg"><img resource="./File:Foobar.jpg" src="//example.com/images/thumb/3/3a/Foobar.jpg/200px-Foobar.jpg" data-file-width="1941" data-file-height="220" data-file-type="bitmap" height="23" width="200"/></a><figcaption>Caption</figcaption></figure>
14750 <figure class="mw-halign-right" typeof="mw:Image"><a href="./File:Foobar.jpg"><img resource="./File:Foobar.jpg" src="//example.com/images/thumb/3/3a/Foobar.jpg/200px-Foobar.jpg" data-file-width="1941" data-file-height="220" data-file-type="bitmap" height="23" width="200"/></a><figcaption>Caption</figcaption></figure>
14751 <figure class="mw-halign-right" typeof="mw:Image"><a href="./File:Foobar.jpg"><img resource="./File:Foobar.jpg" src="//example.com/images/thumb/3/3a/Foobar.jpg/200px-Foobar.jpg" data-file-width="1941" data-file-height="220" data-file-type="bitmap" height="23" width="200"/></a><figcaption>Caption</figcaption></figure>
14754 # a sad bit of backward-compatibility
14756 Image with size specified with pxpx (T15500, T53628)
14758 parsoid=wt2html,wt2wt,html2html
14760 [[File:Foobar.jpg|20pxpx]]
14761 [[File:Foobar.jpg|200x20pxpx]]
14763 <p><a href="/wiki/File:Foobar.jpg" class="image"><img alt="Foobar.jpg" src="http://example.com/images/thumb/3/3a/Foobar.jpg/20px-Foobar.jpg" width="20" height="2" srcset="http://example.com/images/thumb/3/3a/Foobar.jpg/30px-Foobar.jpg 1.5x, http://example.com/images/thumb/3/3a/Foobar.jpg/40px-Foobar.jpg 2x" /></a>
14764 <a href="/wiki/File:Foobar.jpg" class="image"><img alt="Foobar.jpg" src="http://example.com/images/thumb/3/3a/Foobar.jpg/177px-Foobar.jpg" width="177" height="20" srcset="http://example.com/images/thumb/3/3a/Foobar.jpg/265px-Foobar.jpg 1.5x, http://example.com/images/thumb/3/3a/Foobar.jpg/353px-Foobar.jpg 2x" /></a>
14767 <p><figure-inline typeof="mw:Image"><a href="./File:Foobar.jpg"><img resource="./File:Foobar.jpg" src="//example.com/images/thumb/3/3a/Foobar.jpg/20px-Foobar.jpg" data-file-width="1941" data-file-height="220" data-file-type="bitmap" height="2" width="20"/></a></figure-inline> <figure-inline typeof="mw:Image"><a href="./File:Foobar.jpg"><img resource="./File:Foobar.jpg" src="//example.com/images/thumb/3/3a/Foobar.jpg/177px-Foobar.jpg" data-file-width="1941" data-file-height="220" data-file-type="bitmap" height="20" width="177"/></a></figure-inline></p>
14771 Image with link parameter, wiki target
14773 [[File:Foobar.jpg|link=Main Page]]
14775 <p><a href="/wiki/Main_Page" title="Main Page"><img alt="Foobar.jpg" src="http://example.com/images/3/3a/Foobar.jpg" width="1941" height="220" /></a>
14778 <p><figure-inline class="mw-default-size" typeof="mw:Image"><a href="./Main_Page"><img resource="./File:Foobar.jpg" src="//example.com/images/3/3a/Foobar.jpg" data-file-width="1941" data-file-height="220" data-file-type="bitmap" height="220" width="1941"/></a></figure-inline></p>
14781 # parsoid T51293 (part 1)
14783 Image with link parameter, URL target
14785 [[File:Foobar.jpg|link=http://example.com/]]
14787 <p><a href="http://example.com/" rel="nofollow"><img alt="Foobar.jpg" src="http://example.com/images/3/3a/Foobar.jpg" width="1941" height="220" /></a>
14790 <p><figure-inline class="mw-default-size" typeof="mw:Image"><a href="http://example.com/"><img resource="./File:Foobar.jpg" src="//example.com/images/3/3a/Foobar.jpg" data-file-width="1941" data-file-height="220" data-file-type="bitmap" height="220" width="1941"/></a></figure-inline></p>
14793 # parsoid T51293 (part 2)
14795 Image with link parameter, protocol-less URL target
14797 [[File:Foobar.jpg|link=//example.com/]]
14799 <p><a href="//example.com/" rel="nofollow"><img alt="Foobar.jpg" src="http://example.com/images/3/3a/Foobar.jpg" width="1941" height="220" /></a>
14802 <p><figure-inline class="mw-default-size" typeof="mw:Image"><a href="//example.com/"><img resource="./File:Foobar.jpg" src="//example.com/images/3/3a/Foobar.jpg" data-file-width="1941" data-file-height="220" data-file-type="bitmap" height="220" width="1941"/></a></figure-inline></p>
14806 Escaping non-block captions (T107435)
14809 "modes": ["wt2wt"],
14811 ["[typeof~='mw:Image']", "attr", "data-mw", "{\"caption\": \"|\"}"]
14815 [[Image:Foobar.jpg|caption]]
14817 [[Image:Foobar.jpg|<nowiki>|</nowiki>]]
14820 # wgExternalLinkTarget not supported by Parsoid
14822 Image with link parameter, wgExternalLinkTarget
14824 [[Image:foobar.jpg|link=http://example.com/]]
14826 wgExternalLinkTarget='foobar'
14828 <p><a href="http://example.com/" target="foobar" rel="nofollow noreferrer noopener"><img alt="Foobar.jpg" src="http://example.com/images/3/3a/Foobar.jpg" width="1941" height="220" /></a>
14833 Image with link parameter, wgNoFollowLinks set to false
14835 [[Image:foobar.jpg|link=http://example.com/]]
14837 wgNoFollowLinks=false
14839 <p><a href="http://example.com/"><img alt="Foobar.jpg" src="http://example.com/images/3/3a/Foobar.jpg" width="1941" height="220" /></a>
14844 Image with link parameter, wgNoFollowDomainExceptions
14846 [[Image:foobar.jpg|link=http://example.com/]]
14848 wgNoFollowDomainExceptions='example.com'
14850 <p><a href="http://example.com/"><img alt="Foobar.jpg" src="http://example.com/images/3/3a/Foobar.jpg" width="1941" height="220" /></a>
14854 # wgExternalLinkTarget not supported by Parsoid
14856 Image with link parameter, wgExternalLinkTarget, unnamed parameter
14858 [[Image:foobar.jpg|link=http://example.com/|Title]]
14860 wgExternalLinkTarget='foobar'
14862 <p><a href="http://example.com/" title="Title" target="foobar" rel="nofollow noreferrer noopener"><img alt="Title" src="http://example.com/images/3/3a/Foobar.jpg" width="1941" height="220" /></a>
14867 Image with empty link parameter
14869 [[File:Foobar.jpg|link=]]
14871 <p><img alt="Foobar.jpg" src="http://example.com/images/3/3a/Foobar.jpg" width="1941" height="220" />
14874 <p><figure-inline class="mw-default-size" typeof="mw:Image"><span><img resource="./File:Foobar.jpg" src="//example.com/images/3/3a/Foobar.jpg" data-file-width="1941" data-file-height="220" data-file-type="bitmap" height="220" width="1941"/></span></figure-inline></p>
14878 Image with link parameter (wiki target) and unnamed parameter
14880 [[File:Foobar.jpg|link=Main_Page|Title]]
14882 <p><a href="/wiki/Main_Page" title="Title"><img alt="Title" src="http://example.com/images/3/3a/Foobar.jpg" width="1941" height="220" /></a>
14885 <p><figure-inline class="mw-default-size" typeof="mw:Image" data-mw='{"caption":"Title"}'><a href="./Main_Page"><img resource="./File:Foobar.jpg" src="//example.com/images/3/3a/Foobar.jpg" data-file-width="1941" data-file-height="220" data-file-type="bitmap" height="220" width="1941"/></a></figure-inline></p>
14889 Image with link parameter (URL target) and unnamed parameter
14891 [[File:Foobar.jpg|link=http://example.com/|Title]]
14893 <p><a href="http://example.com/" title="Title" rel="nofollow"><img alt="Title" src="http://example.com/images/3/3a/Foobar.jpg" width="1941" height="220" /></a>
14896 <p><figure-inline class="mw-default-size" typeof="mw:Image" data-mw='{"caption":"Title"}'><a href="http://example.com/"><img resource="./File:Foobar.jpg" src="//example.com/images/3/3a/Foobar.jpg" data-file-width="1941" data-file-height="220" data-file-type="bitmap" height="220" width="1941"/></a></figure-inline></p>
14900 Thumbnail image with link parameter
14903 parsoid=wt2html,wt2wt,html2html
14905 [[File:Foobar.jpg|thumb|link=http://example.com/|Title]]
14907 <div class="thumb tright"><div class="thumbinner" style="width:222px;"><a href="http://example.com/"><img alt="" src="http://example.com/images/thumb/3/3a/Foobar.jpg/220px-Foobar.jpg" width="220" height="25" class="thumbimage" srcset="http://example.com/images/thumb/3/3a/Foobar.jpg/330px-Foobar.jpg 1.5x, http://example.com/images/thumb/3/3a/Foobar.jpg/440px-Foobar.jpg 2x" /></a> <div class="thumbcaption"><div class="magnify"><a href="/wiki/File:Foobar.jpg" class="internal" title="Enlarge"></a></div>Title</div></div></div>
14910 <figure class="mw-default-size" typeof="mw:Image/Thumb"><a href="http://example.com/"><img resource="./File:Foobar.jpg" src="//example.com/images/thumb/3/3a/Foobar.jpg/220px-Foobar.jpg" data-file-width="1941" data-file-height="220" data-file-type="bitmap" height="25" width="220"/></a><figcaption>Title</figcaption></figure>
14914 Manually-specified thumbnail image
14918 [[File:Foobar.jpg|thumbnail=Thumb.png|Title]]
14920 <div class="thumb tright"><div class="thumbinner" style="width:137px;"><a href="/wiki/File:Foobar.jpg"><img alt="" src="http://example.com/images/e/ea/Thumb.png" width="135" height="135" class="thumbimage" /></a> <div class="thumbcaption"><div class="magnify"><a href="/wiki/File:Foobar.jpg" class="internal" title="Enlarge"></a></div>Title</div></div></div>
14923 <figure class="mw-default-size" typeof="mw:Image/Thumb" data-mw='{"thumb":"Thumb.png"}'><a href="./File:Foobar.jpg"><img resource="./File:Foobar.jpg" src="//example.com/images/e/ea/Thumb.png" data-file-width="135" data-file-height="135" data-file-type="bitmap" height="135" width="135"/></a><figcaption>Title</figcaption></figure>
14927 Manually-specified thumbnail image with explicit link to wiki page
14930 parsoid=wt2html,wt2wt,html2html
14932 [[File:Foobar.jpg|thumb=Thumb.png|link=Main_Page|Title]]
14934 <div class="thumb tright"><div class="thumbinner" style="width:137px;"><a href="/wiki/Main_Page" title="Main Page"><img alt="" src="http://example.com/images/e/ea/Thumb.png" width="135" height="135" class="thumbimage" /></a> <div class="thumbcaption"><div class="magnify"><a href="/wiki/File:Foobar.jpg" class="internal" title="Enlarge"></a></div>Title</div></div></div>
14937 <figure class="mw-default-size" typeof="mw:Image/Thumb" data-mw='{"thumb":"Thumb.png"}'><a href="./Main_Page"><img resource="./File:Foobar.jpg" src="//example.com/images/e/ea/Thumb.png" data-file-width="135" data-file-height="135" data-file-type="bitmap" height="135" width="135"/></a><figcaption>Title</figcaption></figure>
14941 Manually-specified thumbnail image with explicit link to url
14944 parsoid=wt2html,wt2wt,html2html
14946 [[File:Foobar.jpg|thumb=Thumb.png|link=http://example.com|Title]]
14948 <div class="thumb tright"><div class="thumbinner" style="width:137px;"><a href="http://example.com"><img alt="" src="http://example.com/images/e/ea/Thumb.png" width="135" height="135" class="thumbimage" /></a> <div class="thumbcaption"><div class="magnify"><a href="/wiki/File:Foobar.jpg" class="internal" title="Enlarge"></a></div>Title</div></div></div>
14951 <figure class="mw-default-size" typeof="mw:Image/Thumb" data-mw='{"thumb":"Thumb.png"}'><a href="http://example.com"><img resource="./File:Foobar.jpg" src="//example.com/images/e/ea/Thumb.png" data-file-width="135" data-file-height="135" data-file-type="bitmap" height="135" width="135"/></a><figcaption>Title</figcaption></figure>
14955 Manually-specified thumbnail image with explicit no link
14958 parsoid=wt2html,wt2wt,html2html
14960 [[File:Foobar.jpg|thumb=Thumb.png|link=|Title]]
14962 <div class="thumb tright"><div class="thumbinner" style="width:137px;"><img alt="" src="http://example.com/images/e/ea/Thumb.png" width="135" height="135" class="thumbimage" /> <div class="thumbcaption"><div class="magnify"><a href="/wiki/File:Foobar.jpg" class="internal" title="Enlarge"></a></div>Title</div></div></div>
14965 <figure class="mw-default-size" typeof="mw:Image/Thumb" data-mw='{"thumb":"Thumb.png"}'><span><img resource="./File:Foobar.jpg" src="//example.com/images/e/ea/Thumb.png" data-file-width="135" data-file-height="135" data-file-type="bitmap" height="135" width="135"/></span><figcaption>Title</figcaption></figure>
14969 Manually-specified thumbnail image with explicit link and alt text
14972 parsoid=wt2html,wt2wt,html2html
14974 [[File:Foobar.jpg|thumb=Thumb.png|link=Main_Page|alt=alttext|Title]]
14976 <div class="thumb tright"><div class="thumbinner" style="width:137px;"><a href="/wiki/Main_Page" title="Main Page"><img alt="alttext" src="http://example.com/images/e/ea/Thumb.png" width="135" height="135" class="thumbimage" /></a> <div class="thumbcaption"><div class="magnify"><a href="/wiki/File:Foobar.jpg" class="internal" title="Enlarge"></a></div>Title</div></div></div>
14979 <figure class="mw-default-size" typeof="mw:Image/Thumb" data-mw='{"thumb":"Thumb.png"}'><a href="./Main_Page"><img alt="alttext" resource="./File:Foobar.jpg" src="//example.com/images/e/ea/Thumb.png" data-file-width="135" data-file-height="135" data-file-type="bitmap" height="135" width="135"/></a><figcaption>Title</figcaption></figure>
14983 Image with frame and link
14985 parsoid=wt2html,wt2wt,html2html
14987 [[File:Foobar.jpg|frame|left|This is a test image [[Main Page]]]]
14989 <div class="thumb tleft"><div class="thumbinner" style="width:1943px;"><a href="/wiki/File:Foobar.jpg" class="image"><img alt="" src="http://example.com/images/3/3a/Foobar.jpg" width="1941" height="220" class="thumbimage" /></a> <div class="thumbcaption">This is a test image <a href="/wiki/Main_Page" title="Main Page">Main Page</a></div></div></div>
14992 <figure class="mw-default-size mw-halign-left" typeof="mw:Image/Frame"><a href="./File:Foobar.jpg"><img resource="./File:Foobar.jpg" src="//example.com/images/3/3a/Foobar.jpg" data-file-width="1941" data-file-height="220" data-file-type="bitmap" height="220" width="1941"/></a><figcaption>This is a test image <a rel="mw:WikiLink" href="./Main_Page" title="Main Page">Main Page</a></figcaption></figure>
14996 Image with frame and link and explicit alt
14998 parsoid=wt2html,wt2wt,html2html
15000 [[Image:Foobar.jpg|frame|left|This is a test image [[Main Page]]|alt=Altitude]]
15002 <div class="thumb tleft"><div class="thumbinner" style="width:1943px;"><a href="/wiki/File:Foobar.jpg" class="image"><img alt="Altitude" src="http://example.com/images/3/3a/Foobar.jpg" width="1941" height="220" class="thumbimage" /></a> <div class="thumbcaption">This is a test image <a href="/wiki/Main_Page" title="Main Page">Main Page</a></div></div></div>
15005 <figure class="mw-default-size mw-halign-left" typeof="mw:Image/Frame"><a href="./File:Foobar.jpg"><img alt="Altitude" resource="./File:Foobar.jpg" src="//example.com/images/3/3a/Foobar.jpg" data-file-width="1941" data-file-height="220" data-file-type="bitmap" height="220" width="1941"/></a><figcaption>This is a test image <a rel="mw:WikiLink" href="./Main_Page" title="Main Page">Main Page</a></figcaption></figure>
15009 Image with wiki markup in implicit alt
15011 [[Image:Foobar.jpg|testing '''bold''' in alt]]
15013 [[Image:Foobar.jpg|alt=testing '''bold''' in alt]]
15015 <p><a href="/wiki/File:Foobar.jpg" class="image" title="testing bold in alt"><img alt="testing bold in alt" src="http://example.com/images/3/3a/Foobar.jpg" width="1941" height="220" /></a>
15016 </p><p><a href="/wiki/File:Foobar.jpg" class="image"><img alt="testing bold in alt" src="http://example.com/images/3/3a/Foobar.jpg" width="1941" height="220" /></a>
15019 <p><figure-inline class="mw-default-size" typeof="mw:Image" data-parsoid='{"optList":[{"ck":"caption","ak":"testing '''bold''' in alt"}]}' data-mw='{"caption":"testing <b data-parsoid='{\"dsr\":[27,37,3,3]}'>bold</b> in alt"}'><a href="./File:Foobar.jpg" data-parsoid='{"a":{"href":"./File:Foobar.jpg"},"sa":{}}'><img resource="./File:Foobar.jpg" src="//example.com/images/3/3a/Foobar.jpg" data-file-width="1941" data-file-height="220" data-file-type="bitmap" height="220" width="1941" data-parsoid='{"a":{"resource":"./File:Foobar.jpg","height":"220","width":"1941"},"sa":{"resource":"Image:Foobar.jpg"}}'/></a></figure-inline></p>
15021 <p><figure-inline class="mw-default-size" typeof="mw:Image" data-parsoid='{"optList":[{"ck":"alt","ak":"alt=testing '''bold''' in alt"}]}'><a href="./File:Foobar.jpg" data-parsoid='{"a":{"href":"./File:Foobar.jpg"},"sa":{}}'><img alt="testing bold in alt" resource="./File:Foobar.jpg" src="//example.com/images/3/3a/Foobar.jpg" data-file-width="1941" data-file-height="220" data-file-type="bitmap" height="220" width="1941" data-parsoid='{"a":{"alt":"testing bold in alt","resource":"./File:Foobar.jpg","height":"220","width":"1941"},"sa":{"alt":"alt=testing '''bold''' in alt","resource":"Image:Foobar.jpg"}}'/></a></figure-inline></p>
15025 Alt image option should handle most kinds of wikitext without barfing
15027 [[Image:Foobar.jpg|thumb|This is the image caption|alt=This is a [[link]] and a {{echo|''bold template''}}.]]
15029 <div class="thumb tright"><div class="thumbinner" style="width:182px;"><a href="/wiki/File:Foobar.jpg" class="image"><img alt="This is a link and a bold template." src="http://example.com/images/thumb/3/3a/Foobar.jpg/180px-Foobar.jpg" width="180" height="20" class="thumbimage" srcset="http://example.com/images/thumb/3/3a/Foobar.jpg/270px-Foobar.jpg 1.5x, http://example.com/images/thumb/3/3a/Foobar.jpg/360px-Foobar.jpg 2x" /></a> <div class="thumbcaption"><div class="magnify"><a href="/wiki/File:Foobar.jpg" class="internal" title="Enlarge"></a></div>This is the image caption</div></div></div>
15032 <figure class="mw-default-size" typeof="mw:Image/Thumb mw:ExpandedAttrs" about="#mwt2" data-parsoid='{"optList":[{"ck":"thumbnail","ak":"thumb"},{"ck":"caption","ak":"This is the image caption"},{"ck":"alt","ak":"alt=This is a [[link]] and a {{echo|''bold template''}}."}]}' data-mw='{"attribs":[["thumbnail",{"html":"thumb"}],["alt",{"html":"alt=This is a <a rel=\"mw:WikiLink\" href=\"./Link\" title=\"Link\" data-parsoid='{\"stx\":\"simple\",\"a\":{\"href\":\"./Link\"},\"sa\":{\"href\":\"link\"},\"dsr\":[65,73,2,2]}'>link</a> and a <i about=\"#mwt1\" typeof=\"mw:Transclusion\" data-parsoid='{\"dsr\":[80,106,null,null],\"pi\":[[{\"k\":\"1\"}]]}' data-mw='{\"parts\":[{\"template\":{\"target\":{\"wt\":\"echo\",\"href\":\"./Template:Echo\"},\"params\":{\"1\":{\"wt\":\"&apos;&apos;bold template&apos;&apos;\"}},\"i\":0}}]}'>bold template</i>."}]]}'><a href="./File:Foobar.jpg" data-parsoid='{"a":{"href":"./File:Foobar.jpg"},"sa":{}}'><img alt="This is a link and a bold template." resource="./File:Foobar.jpg" src="//example.com/images/thumb/3/3a/Foobar.jpg/220px-Foobar.jpg" data-file-width="1941" data-file-height="220" data-file-type="bitmap" height="25" width="220" data-parsoid='{"a":{"alt":"This is a link and a bold template.","resource":"./File:Foobar.jpg","height":"25","width":"220"},"sa":{"alt":"alt=This is a [[link]] and a {{echo|''bold template''}}.","resource":"Image:Foobar.jpg"}}'/></a><figcaption>This is the image caption</figcaption></figure>
15036 Ampersand in alt attribute (T206940)
15038 [[File:Foobar.jpg|alt=&amp;]]
15040 <!-- consistency with gallery extension -->
15042 File:Foobar.jpg|alt=&amp;
15045 <p><a href="/wiki/File:Foobar.jpg" class="image"><img alt="&amp;" src="http://example.com/images/3/3a/Foobar.jpg" width="1941" height="220" /></a>
15047 <ul class="gallery mw-gallery-traditional">
15048 <li class="gallerybox" style="width: 155px"><div style="width: 155px">
15049 <div class="thumb" style="width: 150px;"><div style="margin:68px auto;"><a href="/wiki/File:Foobar.jpg" class="image"><img alt="&amp;" src="http://example.com/images/thumb/3/3a/Foobar.jpg/120px-Foobar.jpg" width="120" height="14" srcset="http://example.com/images/thumb/3/3a/Foobar.jpg/180px-Foobar.jpg 1.5x, http://example.com/images/thumb/3/3a/Foobar.jpg/240px-Foobar.jpg 2x" /></a></div></div>
15050 <div class="gallerytext">
15055 <p><figure-inline class="mw-default-size" typeof="mw:Image"><a href="./File:Foobar.jpg"><img alt="&amp;" resource="./File:Foobar.jpg" src="//example.com/images/3/3a/Foobar.jpg" data-file-width="1941" data-file-height="220" data-file-type="bitmap" height="220" width="1941"/></a></figure-inline></p>
15057 <!-- consistency with gallery extension -->
15058 <ul class="gallery mw-gallery-traditional" typeof="mw:Extension/gallery" data-mw='{"name":"gallery","attrs":{},"body":{}}'>
15059 <li class="gallerybox">
15060 <div class="thumb"><figure-inline typeof="mw:Image"><a href="./File:Foobar.jpg"><img alt="&amp;" resource="./File:Foobar.jpg" src="//example.com/images/thumb/3/3a/Foobar.jpg/120px-Foobar.jpg" data-file-width="1941" data-file-height="220" data-file-type="bitmap" height="14" width="120"/></a></figure-inline></div>
15061 <div class="gallerytext"></div>
15067 Italics markup in alt attribute (T206940)
15069 [[File:Foobar.jpg|alt=''x''|caption]]
15071 <!-- consistency with gallery extension -->
15073 File:Foobar.jpg|alt=''x''|caption
15076 <p><a href="/wiki/File:Foobar.jpg" class="image" title="caption"><img alt="x" src="http://example.com/images/3/3a/Foobar.jpg" width="1941" height="220" /></a>
15078 <ul class="gallery mw-gallery-traditional">
15079 <li class="gallerybox" style="width: 155px"><div style="width: 155px">
15080 <div class="thumb" style="width: 150px;"><div style="margin:68px auto;"><a href="/wiki/File:Foobar.jpg" class="image"><img alt="x" src="http://example.com/images/thumb/3/3a/Foobar.jpg/120px-Foobar.jpg" width="120" height="14" srcset="http://example.com/images/thumb/3/3a/Foobar.jpg/180px-Foobar.jpg 1.5x, http://example.com/images/thumb/3/3a/Foobar.jpg/240px-Foobar.jpg 2x" /></a></div></div>
15081 <div class="gallerytext">
15088 <p><figure-inline class="mw-default-size" typeof="mw:Image" data-parsoid='{"optList":[{"ck":"alt","ak":"alt=''x''"},{"ck":"caption","ak":"caption"}]}' data-mw='{"caption":"caption"}'><a href="./File:Foobar.jpg"><img alt="x" resource="./File:Foobar.jpg" src="//example.com/images/3/3a/Foobar.jpg" data-file-width="1941" data-file-height="220" data-file-type="bitmap" height="220" width="1941" data-parsoid='{"a":{"alt":"x","resource":"./File:Foobar.jpg","height":"220","width":"1941"},"sa":{"alt":"alt=''x''","resource":"File:Foobar.jpg"}}'/></a></figure-inline></p>
15090 <!-- consistency with gallery extension -->
15091 <ul class="gallery mw-gallery-traditional" typeof="mw:Extension/gallery" about="#mwt2" data-mw='{"name":"gallery","attrs":{},"body":{"extsrc":"\nFile:Foobar.jpg|alt=''x''|caption\n"}}'>
15092 <li class="gallerybox">
15093 <div class="thumb"><figure-inline typeof="mw:Image"><a href="./File:Foobar.jpg"><img alt="x" resource="./File:Foobar.jpg" src="//example.com/images/thumb/3/3a/Foobar.jpg/120px-Foobar.jpg" data-file-width="1941" data-file-height="220" data-file-type="bitmap" height="14" width="120"/></a></figure-inline></div>
15094 <div class="gallerytext">caption</div>
15100 Nowiki markup in alt attribute (T206940)
15102 [[File:Foobar.jpg|alt=<nowiki>''</nowiki>x<nowiki>''</nowiki>|caption]]
15104 <!-- consistency with gallery extension -->
15106 File:Foobar.jpg|alt=<nowiki>''</nowiki>x<nowiki>''</nowiki>|caption
15109 <p><a href="/wiki/File:Foobar.jpg" class="image" title="caption"><img alt="''x''" src="http://example.com/images/3/3a/Foobar.jpg" width="1941" height="220" /></a>
15111 <ul class="gallery mw-gallery-traditional">
15112 <li class="gallerybox" style="width: 155px"><div style="width: 155px">
15113 <div class="thumb" style="width: 150px;"><div style="margin:68px auto;"><a href="/wiki/File:Foobar.jpg" class="image"><img alt="''x''" src="http://example.com/images/thumb/3/3a/Foobar.jpg/120px-Foobar.jpg" width="120" height="14" srcset="http://example.com/images/thumb/3/3a/Foobar.jpg/180px-Foobar.jpg 1.5x, http://example.com/images/thumb/3/3a/Foobar.jpg/240px-Foobar.jpg 2x" /></a></div></div>
15114 <div class="gallerytext">
15121 <p><figure-inline class="mw-default-size" typeof="mw:Image" data-parsoid='{"optList":[{"ck":"alt","ak":"alt=<nowiki>''</nowiki>x<nowiki>''</nowiki>"},{"ck":"caption","ak":"caption"}],"dsr":[0,71,null,null]}' data-mw='{"caption":"caption"}'><a href="./File:Foobar.jpg"><img alt="''x''" resource="./File:Foobar.jpg" src="//example.com/images/3/3a/Foobar.jpg" data-file-width="1941" data-file-height="220" data-file-type="bitmap" height="220" width="1941" data-parsoid='{"a":{"alt":"''x''","resource":"./File:Foobar.jpg","height":"220","width":"1941"},"sa":{"alt":"alt=<nowiki>''</nowiki>x<nowiki>''</nowiki>","resource":"File:Foobar.jpg"}}'/></a></figure-inline></p>
15123 <!-- consistency with gallery extension -->
15124 <ul class="gallery mw-gallery-traditional" typeof="mw:Extension/gallery" data-mw='{"name":"gallery","attrs":{},"body":{"extsrc":"\nFile:Foobar.jpg|alt=<nowiki>''</nowiki>x<nowiki>''</nowiki>|caption\n"}}'>
15125 <li class="gallerybox">
15126 <div class="thumb"><figure-inline typeof="mw:Image"><a href="./File:Foobar.jpg"><img alt="''x''" resource="./File:Foobar.jpg" src="//example.com/images/thumb/3/3a/Foobar.jpg/120px-Foobar.jpg" data-file-width="1941" data-file-height="220" data-file-type="bitmap" height="14" width="120"/></a></figure-inline></div>
15127 <div class="gallerytext">caption</div>
15133 Nowiki markup in alt attribute (edited html, no data-parsoid) (T206940)
15135 [[File:Foobar.jpg|alt=<nowiki>''x''</nowiki>|caption]]
15137 <!-- consistency with gallery extension -->
15139 File:Foobar.jpg|alt=<nowiki>''x''</nowiki>|caption
15142 <p><a href="/wiki/File:Foobar.jpg" class="image" title="caption"><img alt="''x''" src="http://example.com/images/3/3a/Foobar.jpg" width="1941" height="220" /></a>
15144 <ul class="gallery mw-gallery-traditional">
15145 <li class="gallerybox" style="width: 155px"><div style="width: 155px">
15146 <div class="thumb" style="width: 150px;"><div style="margin:68px auto;"><a href="/wiki/File:Foobar.jpg" class="image"><img alt="''x''" src="http://example.com/images/thumb/3/3a/Foobar.jpg/120px-Foobar.jpg" width="120" height="14" srcset="http://example.com/images/thumb/3/3a/Foobar.jpg/180px-Foobar.jpg 1.5x, http://example.com/images/thumb/3/3a/Foobar.jpg/240px-Foobar.jpg 2x" /></a></div></div>
15147 <div class="gallerytext">
15154 <p><figure-inline class="mw-default-size" typeof="mw:Image" data-mw='{"caption":"caption"}'><a href="./File:Foobar.jpg"><img alt="''x''" resource="./File:Foobar.jpg" src="//example.com/images/3/3a/Foobar.jpg" data-file-width="1941" data-file-height="220" data-file-type="bitmap" height="220" width="1941"/></a></figure-inline></p>
15156 <!-- consistency with gallery extension -->
15157 <ul class="gallery mw-gallery-traditional" typeof="mw:Extension/gallery" data-mw='{"name":"gallery","attrs":{},"body":{}}'>
15158 <li class="gallerybox">
15159 <div class="thumb"><figure-inline typeof="mw:Image"><a href="./File:Foobar.jpg"><img alt="''x''" resource="./File:Foobar.jpg" src="//example.com/images/thumb/3/3a/Foobar.jpg/120px-Foobar.jpg" data-file-width="1941" data-file-height="220" data-file-type="bitmap" height="14" width="120"/></a></figure-inline></div>
15160 <div class="gallerytext">caption</div>
15166 Ampersand in link attribute (T206940)
15168 [[File:Foobar.jpg|link=Foo & bar]]
15170 <!-- consistency with gallery extension -->
15172 File:Foobar.jpg|link=Foo & bar
15175 <p><a href="/wiki/Foo_%26_bar" title="Foo & bar"><img alt="Foobar.jpg" src="http://example.com/images/3/3a/Foobar.jpg" width="1941" height="220" /></a>
15177 <ul class="gallery mw-gallery-traditional">
15178 <li class="gallerybox" style="width: 155px"><div style="width: 155px">
15179 <div class="thumb" style="width: 150px;"><div style="margin:68px auto;"><a href="/wiki/Foo_%26_bar"><img alt="Foobar.jpg" src="http://example.com/images/thumb/3/3a/Foobar.jpg/120px-Foobar.jpg" width="120" height="14" srcset="http://example.com/images/thumb/3/3a/Foobar.jpg/180px-Foobar.jpg 1.5x, http://example.com/images/thumb/3/3a/Foobar.jpg/240px-Foobar.jpg 2x" /></a></div></div>
15180 <div class="gallerytext">
15185 <p><figure-inline class="mw-default-size" typeof="mw:Image" data-parsoid='{"optList":[{"ck":"link","ak":"link=Foo &amp; bar"}]}'><a href="./Foo_&_bar" data-parsoid='{"a":{"href":"./Foo_&_bar"},"sa":{"href":"link=Foo &amp; bar"}}'><img resource="./File:Foobar.jpg" src="//example.com/images/3/3a/Foobar.jpg" data-file-width="1941" data-file-height="220" data-file-type="bitmap" height="220" width="1941"/></a></figure-inline></p>
15187 <!-- consistency with gallery extension -->
15188 <ul class="gallery mw-gallery-traditional" typeof="mw:Extension/gallery" data-mw='{"name":"gallery","attrs":{},"body":{"extsrc":"\nFile:Foobar.jpg|link=Foo &amp; bar\n"}}'>
15189 <li class="gallerybox">
15190 <div class="thumb"><figure-inline typeof="mw:Image"><a href="./Foo_&_bar"><img resource="./File:Foobar.jpg" src="//example.com/images/thumb/3/3a/Foobar.jpg/120px-Foobar.jpg" data-file-width="1941" data-file-height="220" data-file-type="bitmap" height="14" width="120"/></a></figure-inline></div>
15191 <div class="gallerytext"></div>
15197 Ampersand in link attribute (edited html, no data-parsoid) (T206940)
15199 [[File:Foobar.jpg|link=Foo_&_bar]]
15201 <!-- consistency with gallery extension -->
15203 File:Foobar.jpg|link=Foo_&_bar
15206 <p><a href="/wiki/Foo_%26_bar" title="Foo & bar"><img alt="Foobar.jpg" src="http://example.com/images/3/3a/Foobar.jpg" width="1941" height="220" /></a>
15208 <ul class="gallery mw-gallery-traditional">
15209 <li class="gallerybox" style="width: 155px"><div style="width: 155px">
15210 <div class="thumb" style="width: 150px;"><div style="margin:68px auto;"><a href="/wiki/Foo_%26_bar"><img alt="Foobar.jpg" src="http://example.com/images/thumb/3/3a/Foobar.jpg/120px-Foobar.jpg" width="120" height="14" srcset="http://example.com/images/thumb/3/3a/Foobar.jpg/180px-Foobar.jpg 1.5x, http://example.com/images/thumb/3/3a/Foobar.jpg/240px-Foobar.jpg 2x" /></a></div></div>
15211 <div class="gallerytext">
15216 <p><figure-inline class="mw-default-size" typeof="mw:Image"><a href="./Foo_&_bar"><img resource="./File:Foobar.jpg" src="//example.com/images/3/3a/Foobar.jpg" data-file-width="1941" data-file-height="220" data-file-type="bitmap" height="220" width="1941"/></a></figure-inline></p>
15218 <!-- consistency with gallery extension -->
15219 <ul class="gallery mw-gallery-traditional" typeof="mw:Extension/gallery" data-mw='{"name":"gallery","attrs":{},"body":{}}'>
15220 <li class="gallerybox">
15221 <div class="thumb"><figure-inline typeof="mw:Image"><a href="./Foo_&_bar"><img resource="./File:Foobar.jpg" src="//example.com/images/thumb/3/3a/Foobar.jpg/120px-Foobar.jpg" data-file-width="1941" data-file-height="220" data-file-type="bitmap" height="14" width="120"/></a></figure-inline></div>
15222 <div class="gallerytext"></div>
15228 Italics markup in link attribute (T206940)
15232 <!-- Note that "italics" are stripped, even though this is a valid page title -->
15233 [[File:Foobar.jpg|link=Foo''s bar''s|caption1]]
15235 [[File:Foobar.jpg|link=''Main Page''|caption2]]
15237 <!-- consistency with gallery extension -->
15239 File:Foobar.jpg|link=Foo''s bar''s|caption1
15240 File:Foobar.jpg|link=''Main Page''|caption2
15243 <p><a href="/wiki/Foo%27%27s_bar%27%27s" title="Foo''s bar''s">Foo''s bar''s</a>
15244 </p><p><a href="/wiki/Foos_bars" title="caption1"><img alt="caption1" src="http://example.com/images/3/3a/Foobar.jpg" width="1941" height="220" /></a>
15245 </p><p><a href="/wiki/Main_Page" title="caption2"><img alt="caption2" src="http://example.com/images/3/3a/Foobar.jpg" width="1941" height="220" /></a>
15247 <ul class="gallery mw-gallery-traditional">
15248 <li class="gallerybox" style="width: 155px"><div style="width: 155px">
15249 <div class="thumb" style="width: 150px;"><div style="margin:68px auto;"><a href="/wiki/Foos_bars"><img alt="" src="http://example.com/images/thumb/3/3a/Foobar.jpg/120px-Foobar.jpg" width="120" height="14" srcset="http://example.com/images/thumb/3/3a/Foobar.jpg/180px-Foobar.jpg 1.5x, http://example.com/images/thumb/3/3a/Foobar.jpg/240px-Foobar.jpg 2x" /></a></div></div>
15250 <div class="gallerytext">
15255 <li class="gallerybox" style="width: 155px"><div style="width: 155px">
15256 <div class="thumb" style="width: 150px;"><div style="margin:68px auto;"><a href="/wiki/Main_Page"><img alt="" src="http://example.com/images/thumb/3/3a/Foobar.jpg/120px-Foobar.jpg" width="120" height="14" srcset="http://example.com/images/thumb/3/3a/Foobar.jpg/180px-Foobar.jpg 1.5x, http://example.com/images/thumb/3/3a/Foobar.jpg/240px-Foobar.jpg 2x" /></a></div></div>
15257 <div class="gallerytext">
15264 <p><a rel="mw:WikiLink" href="./Foo''s_bar''s" title="Foo''s bar''s">Foo''s bar''s</a></p>
15266 <!-- Note that "italics" are stripped, even though this is a valid page title -->
15267 <p><figure-inline class="mw-default-size" typeof="mw:Image" data-parsoid='{"optList":[{"ck":"link","ak":"link=Foo''s bar''s"},{"ck":"caption","ak":"caption1"}]}' data-mw='{"caption":"caption1"}'><a href="./Foos_bars" data-parsoid='{"a":{"href":"./Foos_bars"},"sa":{"href":"link=Foo''s bar''s"}}'><img resource="./File:Foobar.jpg" src="//example.com/images/3/3a/Foobar.jpg" data-file-width="1941" data-file-height="220" data-file-type="bitmap" height="220" width="1941" data-parsoid='{"a":{"resource":"./File:Foobar.jpg","height":"220","width":"1941"},"sa":{"resource":"File:Foobar.jpg"}}'/></a></figure-inline></p>
15269 <p><figure-inline class="mw-default-size" typeof="mw:Image" data-parsoid='{"optList":[{"ck":"link","ak":"link=''Main Page''"},{"ck":"caption","ak":"caption2"}]}' data-mw='{"caption":"caption2"}'><a href="./Main_Page" data-parsoid='{"a":{"href":"./Main_Page"},"sa":{"href":"link=''Main Page''"}}'><img resource="./File:Foobar.jpg" src="//example.com/images/3/3a/Foobar.jpg" data-file-width="1941" data-file-height="220" data-file-type="bitmap" height="220" width="1941" data-parsoid='{"a":{"resource":"./File:Foobar.jpg","height":"220","width":"1941"},"sa":{"resource":"File:Foobar.jpg"}}'/></a></figure-inline></p>
15271 <!-- consistency with gallery extension -->
15272 <ul class="gallery mw-gallery-traditional" typeof="mw:Extension/gallery" data-mw='{"name":"gallery","attrs":{},"body":{"extsrc":"\nFile:Foobar.jpg|link=Foo''s bar''s|caption1\nFile:Foobar.jpg|link=''Main Page''|caption2\n"}}'>
15273 <li class="gallerybox">
15274 <div class="thumb"><figure-inline typeof="mw:Image"><a href="./Foos_bars"><img resource="./File:Foobar.jpg" src="//example.com/images/thumb/3/3a/Foobar.jpg/120px-Foobar.jpg" data-file-width="1941" data-file-height="220" data-file-type="bitmap" height="14" width="120"/></a></figure-inline></div>
15275 <div class="gallerytext">caption1</div>
15277 <li class="gallerybox">
15278 <div class="thumb"><figure-inline typeof="mw:Image"><a href="./Main_Page"><img resource="./File:Foobar.jpg" src="//example.com/images/thumb/3/3a/Foobar.jpg/120px-Foobar.jpg" data-file-width="1941" data-file-height="220" data-file-type="bitmap" height="14" width="120"/></a></figure-inline></div>
15279 <div class="gallerytext">caption2</div>
15285 Nowiki markup in link attribute (T206940)
15287 [[File:Foobar.jpg|link=Foo<nowiki>''</nowiki>s_bar<nowiki>''</nowiki>s|caption]]
15289 <!-- consistency with gallery extension -->
15291 File:Foobar.jpg|link=Foo<nowiki>''</nowiki>s_bar<nowiki>''</nowiki>s|caption
15294 <p><a href="/wiki/Foo%27%27s_bar%27%27s" title="caption"><img alt="caption" src="http://example.com/images/3/3a/Foobar.jpg" width="1941" height="220" /></a>
15296 <ul class="gallery mw-gallery-traditional">
15297 <li class="gallerybox" style="width: 155px"><div style="width: 155px">
15298 <div class="thumb" style="width: 150px;"><div style="margin:68px auto;"><a href="/wiki/Foo%27%27s_bar%27%27s"><img alt="" src="http://example.com/images/thumb/3/3a/Foobar.jpg/120px-Foobar.jpg" width="120" height="14" srcset="http://example.com/images/thumb/3/3a/Foobar.jpg/180px-Foobar.jpg 1.5x, http://example.com/images/thumb/3/3a/Foobar.jpg/240px-Foobar.jpg 2x" /></a></div></div>
15299 <div class="gallerytext">
15306 <p><figure-inline class="mw-default-size" typeof="mw:Image" data-parsoid='{"optList":[{"ck":"link","ak":"link=Foo<nowiki>''</nowiki>s_bar<nowiki>''</nowiki>s"},{"ck":"caption","ak":"caption"}]}' data-mw='{"caption":"caption"}'><a href="./Foo''s_bar''s" data-parsoid='{"a":{"href":"./Foo''s_bar''s"},"sa":{"href":"link=Foo<nowiki>''</nowiki>s_bar<nowiki>''</nowiki>s"}}'><img resource="./File:Foobar.jpg" src="//example.com/images/3/3a/Foobar.jpg" data-file-width="1941" data-file-height="220" data-file-type="bitmap" height="220" width="1941" data-parsoid='{"a":{"resource":"./File:Foobar.jpg","height":"220","width":"1941"},"sa":{"resource":"File:Foobar.jpg"}}'/></a></figure-inline></p>
15308 <!-- consistency with gallery extension -->
15309 <ul class="gallery mw-gallery-traditional" typeof="mw:Extension/gallery" data-mw='{"name":"gallery","attrs":{},"body":{"extsrc":"\nFile:Foobar.jpg|link=Foo<nowiki>''</nowiki>s_bar<nowiki>''</nowiki>s|caption\n"}}'>
15310 <li class="gallerybox">
15311 <div class="thumb"><figure-inline typeof="mw:Image"><a href="./Foo''s_bar''s"><img resource="./File:Foobar.jpg" src="//example.com/images/thumb/3/3a/Foobar.jpg/120px-Foobar.jpg" data-file-width="1941" data-file-height="220" data-file-type="bitmap" height="14" width="120"/></a></figure-inline></div>
15312 <div class="gallerytext">caption</div>
15318 Nowiki markup in link attribute (edited html, no data-parsoid) (T206940)
15320 [[File:Foobar.jpg|link=Foo<nowiki>''s_bar''</nowiki>s|caption]]
15322 <!-- consistency with gallery extension -->
15324 File:Foobar.jpg|link=Foo<nowiki>''s_bar''</nowiki>s|caption
15327 <p><a href="/wiki/Foo%27%27s_bar%27%27s" title="caption"><img alt="caption" src="http://example.com/images/3/3a/Foobar.jpg" width="1941" height="220" /></a>
15329 <ul class="gallery mw-gallery-traditional">
15330 <li class="gallerybox" style="width: 155px"><div style="width: 155px">
15331 <div class="thumb" style="width: 150px;"><div style="margin:68px auto;"><a href="/wiki/Foo%27%27s_bar%27%27s"><img alt="" src="http://example.com/images/thumb/3/3a/Foobar.jpg/120px-Foobar.jpg" width="120" height="14" srcset="http://example.com/images/thumb/3/3a/Foobar.jpg/180px-Foobar.jpg 1.5x, http://example.com/images/thumb/3/3a/Foobar.jpg/240px-Foobar.jpg 2x" /></a></div></div>
15332 <div class="gallerytext">
15339 <p><figure-inline class="mw-default-size" typeof="mw:Image" data-mw='{"caption":"caption"}'><a href="./Foo''s_bar''s"><img resource="./File:Foobar.jpg" src="//example.com/images/3/3a/Foobar.jpg" data-file-width="1941" data-file-height="220" data-file-type="bitmap" height="220" width="1941"/></a></figure-inline></p>
15341 <!-- consistency with gallery extension -->
15342 <ul class="gallery mw-gallery-traditional" typeof="mw:Extension/gallery" data-mw='{"name":"gallery","attrs":{},"body":{}}'>
15343 <li class="gallerybox">
15344 <div class="thumb"><figure-inline typeof="mw:Image"><a href="./Foo''s_bar''s"><img resource="./File:Foobar.jpg" src="//example.com/images/thumb/3/3a/Foobar.jpg/120px-Foobar.jpg" data-file-width="1941" data-file-height="220" data-file-type="bitmap" height="14" width="120"/></a></figure-inline></div>
15345 <div class="gallerytext">caption</div>
15351 Image with table with attributes in caption
15353 parsoid=wt2html,html2html
15355 [[File:Foobar.jpg|thumb|
15362 <figure class="mw-default-size" typeof="mw:Image/Thumb" data-parsoid='{"optList":[{"ck":"thumbnail","ak":"thumb"},{"ck":"caption","ak":"\n{| class=\"123\" |\n|- class=\"456\" |\n| ha\n|}\n"}]}'><a href="./File:Foobar.jpg" data-parsoid='{"a":{"href":"./File:Foobar.jpg"},"sa":{"href":"File:Foobar.jpg"}}'><img resource="./File:Foobar.jpg" src="//example.com/images/thumb/3/3a/Foobar.jpg/220px-Foobar.jpg" data-file-width="1941" data-file-height="220" data-file-type="bitmap" height="25" width="220" data-parsoid='{"a":{"resource":"./File:Foobar.jpg","height":"25","width":"220"},"sa":{"resource":"File:Foobar.jpg"}}'/></a><figcaption>
15363 <table class="123">
15364 <tbody><tr class="456" data-parsoid='{"startTagSrc":"|-"}'>
15367 </figcaption></figure>
15371 Image with table with rows from templates in caption
15373 [[File:Foobar.jpg|thumb|
15379 <figure class="mw-default-size" typeof="mw:Image/Thumb" data-parsoid='{"optList":[{"ck":"thumbnail","ak":"thumb"},{"ck":"caption","ak":"\n{|\n{{echo|{{!}} hi}}\n|}\n"}]}'><a href="./File:Foobar.jpg" data-parsoid='{"a":{"href":"./File:Foobar.jpg"},"sa":{"href":"File:Foobar.jpg"}}'><img resource="./File:Foobar.jpg" src="//example.com/images/thumb/3/3a/Foobar.jpg/220px-Foobar.jpg" data-file-width="1941" data-file-height="220" data-file-type="bitmap" height="25" width="220" data-parsoid='{"a":{"resource":"./File:Foobar.jpg","height":"25","width":"220"},"sa":{"resource":"File:Foobar.jpg"}}'/></a><figcaption>
15381 <tbody about="#mwt4" typeof="mw:Transclusion" data-mw='{"parts":[{"template":{"target":{"wt":"echo","href":"./Template:Echo"},"params":{"1":{"wt":"{{!}} hi"}},"i":0}},"\n"]}'><tr><td> hi</td></tr>
15383 </figcaption></figure>
15387 Image with nested tables in caption
15389 [[File:Foobar.jpg|thumb|Foo<br />
15398 <figure class="mw-default-size" typeof="mw:Image/Thumb" data-parsoid='{"optList":[{"ck":"thumbnail","ak":"thumb"},{"ck":"caption","ak":"Foo<br/>\n{|\n|\n{|\n|z\n|}\n|}\n"}]}'><a href="./File:Foobar.jpg"><img resource="./File:Foobar.jpg" src="//example.com/images/thumb/3/3a/Foobar.jpg/220px-Foobar.jpg" data-file-width="1941" data-file-height="220" data-file-type="bitmap" height="25" width="220" data-parsoid='{"a":{"resource":"./File:Foobar.jpg","height":"25","width":"220"},"sa":{"resource":"File:Foobar.jpg"}}'/></a><figcaption data-parsoid='{"dsr":[null,50,null,null]}'>Foo<br data-parsoid='{"stx":"html","selfClose":true}'/>
15402 <tbody><tr><td>z</td></tr>
15403 </tbody></table></td></tr>
15405 </figcaption></figure>
15409 Image with heading and horizontal rule in caption
15411 [[File:Foobar.jpg|thumb|
15417 <div class="thumb tright"><div class="thumbinner" style="width:182px;"><a href="/wiki/File:Foobar.jpg" class="image"><img alt="" src="http://example.com/images/thumb/3/3a/Foobar.jpg/180px-Foobar.jpg" width="180" height="20" class="thumbimage" srcset="http://example.com/images/thumb/3/3a/Foobar.jpg/270px-Foobar.jpg 1.5x, http://example.com/images/thumb/3/3a/Foobar.jpg/360px-Foobar.jpg 2x" /></a> <div class="thumbcaption"><div class="magnify"><a href="/wiki/File:Foobar.jpg" class="internal" title="Enlarge"></a></div><h3><span class="mw-headline" id="Testing">Testing</span><span class="mw-editsection"><span class="mw-editsection-bracket">[</span><a href="/index.php?title=Parser_test&action=edit&section=1" title="Edit section: Testing">edit</a><span class="mw-editsection-bracket">]</span></span></h3> 123 <hr /></div></div></div>
15420 <figure class="mw-default-size" typeof="mw:Image/Thumb" data-parsoid='{"optList":[{"ck":"thumbnail","ak":"thumb"},{"ck":"caption","ak":"\n=== Testing ===\n123\n--------------\n"}]}'><a href="./File:Foobar.jpg" data-parsoid='{"a":{"href":"./File:Foobar.jpg"},"sa":{"href":"File:Foobar.jpg"}}'><img resource="./File:Foobar.jpg" src="//example.com/images/thumb/3/3a/Foobar.jpg/220px-Foobar.jpg" data-file-width="1941" data-file-height="220" data-file-type="bitmap" height="25" width="220" data-parsoid='{"a":{"resource":"./File:Foobar.jpg","height":"25","width":"220"},"sa":{"resource":"File:Foobar.jpg"}}'/></a><figcaption>
15421 <h3 id="Testing">Testing</h3>
15423 <hr data-parsoid='{"extra_dashes":10}'/>
15424 </figcaption></figure>
15427 ###################
15428 # Conflicting image format options.
15429 # First option specified should 'win'.
15430 # All three cases in each test should be identical.
15433 Image with 'frameless' first.
15435 parsoid=wt2html,wt2wt,html2html
15437 [[File:Foobar.jpg|frameless|caption]]
15439 [[File:Foobar.jpg|frameless|frame|caption]]
15441 [[File:Foobar.jpg|frameless|thumb|caption]]
15443 <p><a href="/wiki/File:Foobar.jpg" class="image" title="caption"><img alt="caption" src="http://example.com/images/thumb/3/3a/Foobar.jpg/180px-Foobar.jpg" width="180" height="20" srcset="http://example.com/images/thumb/3/3a/Foobar.jpg/270px-Foobar.jpg 1.5x, http://example.com/images/thumb/3/3a/Foobar.jpg/360px-Foobar.jpg 2x" /></a>
15444 </p><p><a href="/wiki/File:Foobar.jpg" class="image" title="caption"><img alt="caption" src="http://example.com/images/thumb/3/3a/Foobar.jpg/180px-Foobar.jpg" width="180" height="20" srcset="http://example.com/images/thumb/3/3a/Foobar.jpg/270px-Foobar.jpg 1.5x, http://example.com/images/thumb/3/3a/Foobar.jpg/360px-Foobar.jpg 2x" /></a>
15445 </p><p><a href="/wiki/File:Foobar.jpg" class="image" title="caption"><img alt="caption" src="http://example.com/images/thumb/3/3a/Foobar.jpg/180px-Foobar.jpg" width="180" height="20" srcset="http://example.com/images/thumb/3/3a/Foobar.jpg/270px-Foobar.jpg 1.5x, http://example.com/images/thumb/3/3a/Foobar.jpg/360px-Foobar.jpg 2x" /></a>
15448 <p><figure-inline class="mw-default-size" typeof="mw:Image/Frameless" data-mw='{"caption":"caption"}'><a href="./File:Foobar.jpg"><img resource="./File:Foobar.jpg" src="//example.com/images/thumb/3/3a/Foobar.jpg/220px-Foobar.jpg" data-file-width="1941" data-file-height="220" data-file-type="bitmap" height="25" width="220"/></a></figure-inline></p>
15449 <p><figure-inline class="mw-default-size" typeof="mw:Image/Frameless" data-mw='{"caption":"caption"}'><a href="./File:Foobar.jpg"><img resource="./File:Foobar.jpg" src="//example.com/images/thumb/3/3a/Foobar.jpg/220px-Foobar.jpg" data-file-width="1941" data-file-height="220" data-file-type="bitmap" height="25" width="220"/></a></figure-inline></p>
15450 <p><figure-inline class="mw-default-size" typeof="mw:Image/Frameless" data-mw='{"caption":"caption"}'><a href="./File:Foobar.jpg"><img resource="./File:Foobar.jpg" src="//example.com/images/thumb/3/3a/Foobar.jpg/220px-Foobar.jpg" data-file-width="1941" data-file-height="220" data-file-type="bitmap" height="25" width="220"/></a></figure-inline></p>
15454 Image with 'frame' first.
15456 parsoid=wt2html,wt2wt,html2html
15458 [[File:Foobar.jpg|frame|caption]]
15459 [[File:Foobar.jpg|frame|frameless|caption]]
15460 [[File:Foobar.jpg|frame|thumb|caption]]
15462 <div class="thumb tright"><div class="thumbinner" style="width:1943px;"><a href="/wiki/File:Foobar.jpg" class="image"><img alt="" src="http://example.com/images/3/3a/Foobar.jpg" width="1941" height="220" class="thumbimage" /></a> <div class="thumbcaption">caption</div></div></div>
15463 <div class="thumb tright"><div class="thumbinner" style="width:1943px;"><a href="/wiki/File:Foobar.jpg" class="image"><img alt="" src="http://example.com/images/3/3a/Foobar.jpg" width="1941" height="220" class="thumbimage" /></a> <div class="thumbcaption">caption</div></div></div>
15464 <div class="thumb tright"><div class="thumbinner" style="width:1943px;"><a href="/wiki/File:Foobar.jpg" class="image"><img alt="" src="http://example.com/images/3/3a/Foobar.jpg" width="1941" height="220" class="thumbimage" /></a> <div class="thumbcaption">caption</div></div></div>
15467 <figure class="mw-default-size" typeof="mw:Image/Frame"><a href="./File:Foobar.jpg"><img resource="./File:Foobar.jpg" src="//example.com/images/3/3a/Foobar.jpg" data-file-width="1941" data-file-height="220" data-file-type="bitmap" height="220" width="1941"/></a><figcaption>caption</figcaption></figure>
15468 <figure class="mw-default-size" typeof="mw:Image/Frame"><a href="./File:Foobar.jpg"><img resource="./File:Foobar.jpg" src="//example.com/images/3/3a/Foobar.jpg" data-file-width="1941" data-file-height="220" data-file-type="bitmap" height="220" width="1941"/></a><figcaption>caption</figcaption></figure>
15469 <figure class="mw-default-size" typeof="mw:Image/Frame"><a href="./File:Foobar.jpg"><img resource="./File:Foobar.jpg" src="//example.com/images/3/3a/Foobar.jpg" data-file-width="1941" data-file-height="220" data-file-type="bitmap" height="220" width="1941"/></a><figcaption>caption</figcaption></figure>
15473 Image with 'thumb' first.
15475 parsoid=wt2html,wt2wt,html2html
15477 [[File:Foobar.jpg|thumb|caption]]
15478 [[File:Foobar.jpg|thumb|frameless|caption]]
15479 [[File:Foobar.jpg|thumb|frame|caption]]
15481 <div class="thumb tright"><div class="thumbinner" style="width:182px;"><a href="/wiki/File:Foobar.jpg" class="image"><img alt="" src="http://example.com/images/thumb/3/3a/Foobar.jpg/180px-Foobar.jpg" width="180" height="20" class="thumbimage" srcset="http://example.com/images/thumb/3/3a/Foobar.jpg/270px-Foobar.jpg 1.5x, http://example.com/images/thumb/3/3a/Foobar.jpg/360px-Foobar.jpg 2x" /></a> <div class="thumbcaption"><div class="magnify"><a href="/wiki/File:Foobar.jpg" class="internal" title="Enlarge"></a></div>caption</div></div></div>
15482 <div class="thumb tright"><div class="thumbinner" style="width:182px;"><a href="/wiki/File:Foobar.jpg" class="image"><img alt="" src="http://example.com/images/thumb/3/3a/Foobar.jpg/180px-Foobar.jpg" width="180" height="20" class="thumbimage" srcset="http://example.com/images/thumb/3/3a/Foobar.jpg/270px-Foobar.jpg 1.5x, http://example.com/images/thumb/3/3a/Foobar.jpg/360px-Foobar.jpg 2x" /></a> <div class="thumbcaption"><div class="magnify"><a href="/wiki/File:Foobar.jpg" class="internal" title="Enlarge"></a></div>caption</div></div></div>
15483 <div class="thumb tright"><div class="thumbinner" style="width:182px;"><a href="/wiki/File:Foobar.jpg" class="image"><img alt="" src="http://example.com/images/thumb/3/3a/Foobar.jpg/180px-Foobar.jpg" width="180" height="20" class="thumbimage" srcset="http://example.com/images/thumb/3/3a/Foobar.jpg/270px-Foobar.jpg 1.5x, http://example.com/images/thumb/3/3a/Foobar.jpg/360px-Foobar.jpg 2x" /></a> <div class="thumbcaption"><div class="magnify"><a href="/wiki/File:Foobar.jpg" class="internal" title="Enlarge"></a></div>caption</div></div></div>
15486 <figure class="mw-default-size" typeof="mw:Image/Thumb"><a href="./File:Foobar.jpg"><img resource="./File:Foobar.jpg" src="//example.com/images/thumb/3/3a/Foobar.jpg/220px-Foobar.jpg" data-file-width="1941" data-file-height="220" data-file-type="bitmap" height="25" width="220"/></a><figcaption>caption</figcaption></figure>
15487 <figure class="mw-default-size" typeof="mw:Image/Thumb"><a href="./File:Foobar.jpg"><img resource="./File:Foobar.jpg" src="//example.com/images/thumb/3/3a/Foobar.jpg/220px-Foobar.jpg" data-file-width="1941" data-file-height="220" data-file-type="bitmap" height="25" width="220"/></a><figcaption>caption</figcaption></figure>
15488 <figure class="mw-default-size" typeof="mw:Image/Thumb"><a href="./File:Foobar.jpg"><img resource="./File:Foobar.jpg" src="//example.com/images/thumb/3/3a/Foobar.jpg/220px-Foobar.jpg" data-file-width="1941" data-file-height="220" data-file-type="bitmap" height="25" width="220"/></a><figcaption>caption</figcaption></figure>
15491 ###################
15493 # See https://www.mediawiki.org/wiki/Help:Images#Size_and_frame
15494 # and https://phabricator.wikimedia.org/T64258
15495 # Foobar has actual size of 1941x220
15496 # 1. Thumbs & frameless always reduce, can't be enlarged unless it's
15497 # a scalable format.
15498 # 2. Framed images always ignore size options; always render at default size.
15499 # 3. "Unspecified format" and border are the only types which can be
15503 Image: unspecified format and border enlarge
15505 parsoid=wt2html,wt2wt,html2html
15507 [[File:Foobar.jpg|2000px]]
15509 [[File:Foobar.jpg|border|2000px]]
15511 <p><a href="/wiki/File:Foobar.jpg" class="image"><img alt="Foobar.jpg" src="http://example.com/images/3/3a/Foobar.jpg" width="2000" height="227" /></a>
15512 </p><p><a href="/wiki/File:Foobar.jpg" class="image"><img alt="Foobar.jpg" src="http://example.com/images/3/3a/Foobar.jpg" width="2000" height="227" class="thumbborder" /></a>
15515 <p><figure-inline typeof="mw:Image"><a href="./File:Foobar.jpg"><img resource="./File:Foobar.jpg" src="//example.com/images/3/3a/Foobar.jpg" data-file-width="1941" data-file-height="220" data-file-type="bitmap" height="227" width="2000"/></a></figure-inline></p>
15516 <p><figure-inline class="mw-image-border" typeof="mw:Image"><a href="./File:Foobar.jpg"><img resource="./File:Foobar.jpg" src="//example.com/images/3/3a/Foobar.jpg" data-file-width="1941" data-file-height="220" data-file-type="bitmap" height="227" width="2000"/></a></figure-inline></p>
15520 Image: "unspecified format" and border reduce
15522 parsoid=wt2html,wt2wt,html2html
15524 [[File:Foobar.jpg|1000px]]
15526 [[File:Foobar.jpg|border|1000px]]
15528 <p><a href="/wiki/File:Foobar.jpg" class="image"><img alt="Foobar.jpg" src="http://example.com/images/thumb/3/3a/Foobar.jpg/1000px-Foobar.jpg" width="1000" height="113" srcset="http://example.com/images/thumb/3/3a/Foobar.jpg/1500px-Foobar.jpg 1.5x, http://example.com/images/3/3a/Foobar.jpg 2x" /></a>
15529 </p><p><a href="/wiki/File:Foobar.jpg" class="image"><img alt="Foobar.jpg" src="http://example.com/images/thumb/3/3a/Foobar.jpg/1000px-Foobar.jpg" width="1000" height="113" class="thumbborder" srcset="http://example.com/images/thumb/3/3a/Foobar.jpg/1500px-Foobar.jpg 1.5x, http://example.com/images/3/3a/Foobar.jpg 2x" /></a>
15532 <p><figure-inline typeof="mw:Image"><a href="./File:Foobar.jpg"><img resource="./File:Foobar.jpg" src="//example.com/images/thumb/3/3a/Foobar.jpg/1000px-Foobar.jpg" data-file-width="1941" data-file-height="220" data-file-type="bitmap" height="113" width="1000"/></a></figure-inline></p>
15533 <p><figure-inline class="mw-image-border" typeof="mw:Image"><a href="./File:Foobar.jpg"><img resource="./File:Foobar.jpg" src="//example.com/images/thumb/3/3a/Foobar.jpg/1000px-Foobar.jpg" data-file-width="1941" data-file-height="220" data-file-type="bitmap" height="113" width="1000"/></a></figure-inline></p>
15537 Image: thumbs reduce
15539 parsoid=wt2html,wt2wt,html2html
15541 [[File:Foobar.jpg|thumb|50px]]
15543 <div class="thumb tright"><div class="thumbinner" style="width:52px;"><a href="/wiki/File:Foobar.jpg" class="image"><img alt="Foobar.jpg" src="http://example.com/images/thumb/3/3a/Foobar.jpg/50px-Foobar.jpg" width="50" height="6" class="thumbimage" srcset="http://example.com/images/thumb/3/3a/Foobar.jpg/75px-Foobar.jpg 1.5x, http://example.com/images/thumb/3/3a/Foobar.jpg/100px-Foobar.jpg 2x" /></a> <div class="thumbcaption"><div class="magnify"><a href="/wiki/File:Foobar.jpg" class="internal" title="Enlarge"></a></div></div></div></div>
15546 <figure typeof="mw:Image/Thumb"><a href="./File:Foobar.jpg"><img resource="./File:Foobar.jpg" src="//example.com/images/thumb/3/3a/Foobar.jpg/50px-Foobar.jpg" data-file-width="1941" data-file-height="220" data-file-type="bitmap" height="6" width="50"/></a></figure>
15550 Image: bitmap thumbs can't be enlarged past original size, but vector can.
15552 parsoid=wt2html,wt2wt,html2html
15554 [[File:Foobar.jpg|thumb|2000px]]
15556 [[File:Foobar.svg|thumb|2000px]]
15558 <div class="thumb tright"><div class="thumbinner" style="width:1943px;"><a href="/wiki/File:Foobar.jpg" class="image"><img alt="Foobar.jpg" src="http://example.com/images/3/3a/Foobar.jpg" width="1941" height="220" class="thumbimage" /></a> <div class="thumbcaption"><div class="magnify"><a href="/wiki/File:Foobar.jpg" class="internal" title="Enlarge"></a></div></div></div></div>
15559 <div class="thumb tright"><div class="thumbinner" style="width:2002px;"><a href="/wiki/File:Foobar.svg" class="image"><img alt="Foobar.svg" src="http://example.com/images/thumb/f/ff/Foobar.svg/2000px-Foobar.svg.png" width="2000" height="1500" class="thumbimage" srcset="http://example.com/images/thumb/f/ff/Foobar.svg/3000px-Foobar.svg.png 1.5x, http://example.com/images/thumb/f/ff/Foobar.svg/4000px-Foobar.svg.png 2x" /></a> <div class="thumbcaption"><div class="magnify"><a href="/wiki/File:Foobar.svg" class="internal" title="Enlarge"></a></div></div></div></div>
15562 <figure typeof="mw:Image/Thumb"><a href="./File:Foobar.jpg"><img resource="./File:Foobar.jpg" src="//example.com/images/3/3a/Foobar.jpg" data-file-width="1941" data-file-height="220" data-file-type="bitmap" height="220" width="1941"/></a></figure>
15563 <figure typeof="mw:Image/Thumb"><a href="./File:Foobar.svg"><img resource="./File:Foobar.svg" src="//example.com/images/thumb/f/ff/Foobar.svg/2000px-Foobar.svg.png" data-file-width="240" data-file-height="180" data-file-type="drawing" height="1500" width="2000"/></a></figure>
15567 Image: frameless can reduce in size
15569 parsoid=wt2html,wt2wt,html2html
15571 [[File:Foobar.jpg|frameless|50px]]
15573 <p><a href="/wiki/File:Foobar.jpg" class="image"><img alt="Foobar.jpg" src="http://example.com/images/thumb/3/3a/Foobar.jpg/50px-Foobar.jpg" width="50" height="6" srcset="http://example.com/images/thumb/3/3a/Foobar.jpg/75px-Foobar.jpg 1.5x, http://example.com/images/thumb/3/3a/Foobar.jpg/100px-Foobar.jpg 2x" /></a>
15576 <p><figure-inline typeof="mw:Image/Frameless"><a href="./File:Foobar.jpg"><img resource="./File:Foobar.jpg" src="//example.com/images/thumb/3/3a/Foobar.jpg/50px-Foobar.jpg" data-file-width="1941" data-file-height="220" data-file-type="bitmap" height="6" width="50"/></a></figure-inline></p>
15580 Image: bitmap frameless can't be enlarged past original size, but vector can
15582 parsoid=wt2html,wt2wt,html2html
15584 [[File:Foobar.jpg|frameless|2000px]]
15586 [[File:Foobar.svg|frameless|2000px]]
15588 <p><a href="/wiki/File:Foobar.jpg" class="image"><img alt="Foobar.jpg" src="http://example.com/images/3/3a/Foobar.jpg" width="1941" height="220" /></a>
15589 </p><p><a href="/wiki/File:Foobar.svg" class="image"><img alt="Foobar.svg" src="http://example.com/images/thumb/f/ff/Foobar.svg/2000px-Foobar.svg.png" width="2000" height="1500" srcset="http://example.com/images/thumb/f/ff/Foobar.svg/3000px-Foobar.svg.png 1.5x, http://example.com/images/thumb/f/ff/Foobar.svg/4000px-Foobar.svg.png 2x" /></a>
15592 <p><figure-inline typeof="mw:Image/Frameless"><a href="./File:Foobar.jpg"><img resource="./File:Foobar.jpg" src="//example.com/images/3/3a/Foobar.jpg" data-file-width="1941" data-file-height="220" data-file-type="bitmap" height="220" width="1941"/></a></figure-inline></p>
15593 <p><figure-inline typeof="mw:Image/Frameless"><a href="./File:Foobar.svg"><img resource="./File:Foobar.svg" src="//example.com/images/thumb/f/ff/Foobar.svg/2000px-Foobar.svg.png" data-file-width="240" data-file-height="180" data-file-type="drawing" height="1500" width="2000"/></a></figure-inline></p>
15597 Image: framed images are always unscaled.
15599 parsoid=wt2html,wt2wt,html2html
15601 [[File:Foobar.jpg|frame]]
15603 [[File:Foobar.jpg|frame|50px]]
15605 [[File:Foobar.jpg|frame|50x50px]]
15607 [[File:Foobar.jpg|frame|2000px]]
15609 <div class="thumb tright"><div class="thumbinner" style="width:1943px;"><a href="/wiki/File:Foobar.jpg" class="image"><img alt="Foobar.jpg" src="http://example.com/images/3/3a/Foobar.jpg" width="1941" height="220" class="thumbimage" /></a> <div class="thumbcaption"></div></div></div>
15610 <div class="thumb tright"><div class="thumbinner" style="width:1943px;"><a href="/wiki/File:Foobar.jpg" class="image"><img alt="Foobar.jpg" src="http://example.com/images/3/3a/Foobar.jpg" width="1941" height="220" class="thumbimage" /></a> <div class="thumbcaption"></div></div></div>
15611 <div class="thumb tright"><div class="thumbinner" style="width:1943px;"><a href="/wiki/File:Foobar.jpg" class="image"><img alt="Foobar.jpg" src="http://example.com/images/3/3a/Foobar.jpg" width="1941" height="220" class="thumbimage" /></a> <div class="thumbcaption"></div></div></div>
15612 <div class="thumb tright"><div class="thumbinner" style="width:1943px;"><a href="/wiki/File:Foobar.jpg" class="image"><img alt="Foobar.jpg" src="http://example.com/images/3/3a/Foobar.jpg" width="1941" height="220" class="thumbimage" /></a> <div class="thumbcaption"></div></div></div>
15615 <figure class="mw-default-size" typeof="mw:Image/Frame"><a href="./File:Foobar.jpg"><img resource="./File:Foobar.jpg" src="//example.com/images/3/3a/Foobar.jpg" data-file-width="1941" data-file-height="220" data-file-type="bitmap" height="220" width="1941"/></a></figure>
15616 <figure typeof="mw:Image/Frame"><a href="./File:Foobar.jpg"><img resource="./File:Foobar.jpg" src="//example.com/images/3/3a/Foobar.jpg" data-file-width="1941" data-file-height="220" data-file-type="bitmap" height="220" width="1941"/></a></figure>
15617 <figure typeof="mw:Image/Frame"><a href="./File:Foobar.jpg"><img resource="./File:Foobar.jpg" src="//example.com/images/3/3a/Foobar.jpg" data-file-width="1941" data-file-height="220" data-file-type="bitmap" height="220" width="1941"/></a></figure>
15618 <figure typeof="mw:Image/Frame"><a href="./File:Foobar.jpg"><img resource="./File:Foobar.jpg" src="//example.com/images/3/3a/Foobar.jpg" data-file-width="1941" data-file-height="220" data-file-type="bitmap" height="220" width="1941"/></a></figure>
15621 ###################
15624 Link to image page- image page normally doesn't exists, hence edit link
15625 Add test with existing image page
15626 #<p><a href="/wiki/File:Test" title="Image:Test">Image:test</a>
15630 <p><a href="/index.php?title=File:Test&action=edit&redlink=1" class="new" title="File:Test (page does not exist)">Image:test</a>
15635 T20784 Link to non-existent image page with caption should use caption as link text
15637 [[:Image:test|caption]]
15639 <p><a href="/index.php?title=File:Test&action=edit&redlink=1" class="new" title="File:Test (page does not exist)">caption</a>
15644 Frameless image caption with a free URL
15646 [[File:Foobar.jpg|http://example.com]]
15648 <p><a href="/wiki/File:Foobar.jpg" class="image" title="http://example.com"><img alt="http://example.com" src="http://example.com/images/3/3a/Foobar.jpg" width="1941" height="220" /></a>
15651 <p><figure-inline class="mw-default-size" typeof="mw:Image" data-parsoid='{"optList":[{"ck":"caption","ak":"http://example.com"}]}' data-mw='{"caption":"<a rel=\"mw:ExtLink\" href=\"http://example.com\" data-parsoid='{\"stx\":\"url\",\"dsr\":[18,36,0,0]}'>http://example.com</a>"}'><a href="./File:Foobar.jpg" data-parsoid='{"a":{"href":"./File:Foobar.jpg"},"sa":{}}'><img resource="./File:Foobar.jpg" src="//example.com/images/3/3a/Foobar.jpg" data-file-width="1941" data-file-height="220" data-file-type="bitmap" height="220" width="1941" data-parsoid='{"a":{"resource":"./File:Foobar.jpg","height":"220","width":"1941"},"sa":{"resource":"File:Foobar.jpg"}}'/></a></figure-inline></p>
15655 Thumbnail image caption with a free URL
15659 [[File:Foobar.jpg|thumb|http://example.com]]
15661 <div class="thumb tright"><div class="thumbinner" style="width:222px;"><a href="/wiki/File:Foobar.jpg" class="image"><img alt="" src="http://example.com/images/thumb/3/3a/Foobar.jpg/220px-Foobar.jpg" width="220" height="25" class="thumbimage" srcset="http://example.com/images/thumb/3/3a/Foobar.jpg/330px-Foobar.jpg 1.5x, http://example.com/images/thumb/3/3a/Foobar.jpg/440px-Foobar.jpg 2x" /></a> <div class="thumbcaption"><div class="magnify"><a href="/wiki/File:Foobar.jpg" class="internal" title="Enlarge"></a></div><a rel="nofollow" class="external free" href="http://example.com">http://example.com</a></div></div></div>
15664 <figure class="mw-default-size" typeof="mw:Image/Thumb"><a href="./File:Foobar.jpg"><img resource="./File:Foobar.jpg" src="//example.com/images/thumb/3/3a/Foobar.jpg/220px-Foobar.jpg" data-file-width="1941" data-file-height="220" data-file-type="bitmap" height="25" width="220"/></a><figcaption><a rel="mw:ExtLink" class="external free" href="http://example.com">http://example.com</a></figcaption></figure>
15668 Thumbnail image caption with a free URL and explicit alt
15671 parsoid=wt2html,wt2wt,html2html
15673 [[File:Foobar.jpg|thumb|http://example.com|alt=Alteration]]
15675 <div class="thumb tright"><div class="thumbinner" style="width:222px;"><a href="/wiki/File:Foobar.jpg" class="image"><img alt="Alteration" src="http://example.com/images/thumb/3/3a/Foobar.jpg/220px-Foobar.jpg" width="220" height="25" class="thumbimage" srcset="http://example.com/images/thumb/3/3a/Foobar.jpg/330px-Foobar.jpg 1.5x, http://example.com/images/thumb/3/3a/Foobar.jpg/440px-Foobar.jpg 2x" /></a> <div class="thumbcaption"><div class="magnify"><a href="/wiki/File:Foobar.jpg" class="internal" title="Enlarge"></a></div><a rel="nofollow" class="external free" href="http://example.com">http://example.com</a></div></div></div>
15678 <figure class="mw-default-size" typeof="mw:Image/Thumb"><a href="./File:Foobar.jpg"><img alt="Alteration" resource="./File:Foobar.jpg" src="//example.com/images/thumb/3/3a/Foobar.jpg/220px-Foobar.jpg" data-file-width="1941" data-file-height="220" data-file-type="bitmap" height="25" width="220"/></a><figcaption><a rel="mw:ExtLink" class="external free" href="http://example.com">http://example.com</a></figcaption></figure>
15682 SVG thumbnails with no language set
15685 [[File:Foobar.svg|thumb|caption]]
15687 <div class="thumb tright"><div class="thumbinner" style="width:182px;"><a href="/wiki/File:Foobar.svg" class="image"><img alt="" src="http://example.com/images/thumb/f/ff/Foobar.svg/180px-Foobar.svg.png" width="180" height="135" class="thumbimage" srcset="http://example.com/images/thumb/f/ff/Foobar.svg/270px-Foobar.svg.png 1.5x, http://example.com/images/thumb/f/ff/Foobar.svg/360px-Foobar.svg.png 2x" /></a> <div class="thumbcaption"><div class="magnify"><a href="/wiki/File:Foobar.svg" class="internal" title="Enlarge"></a></div>caption</div></div></div>
15690 <figure class="mw-default-size" typeof="mw:Image/Thumb"><a href="./File:Foobar.svg"><img resource="./File:Foobar.svg" src="//example.com/images/thumb/f/ff/Foobar.svg/220px-Foobar.svg.png" data-file-width="240" data-file-height="180" data-file-type="drawing" height="165" width="220"/></a><figcaption>caption</figcaption></figure>
15694 SVG thumbnails with language de
15696 parsoid=wt2html,wt2wt,html2html
15698 [[File:Foobar.svg|thumb|caption|lang=de]]
15700 <div class="thumb tright"><div class="thumbinner" style="width:182px;"><a href="/index.php?title=File:Foobar.svg&lang=de" class="image"><img alt="" src="http://example.com/images/thumb/f/ff/Foobar.svg/langde-180px-Foobar.svg.png" width="180" height="135" class="thumbimage" srcset="http://example.com/images/thumb/f/ff/Foobar.svg/langde-270px-Foobar.svg.png 1.5x, http://example.com/images/thumb/f/ff/Foobar.svg/langde-360px-Foobar.svg.png 2x" /></a> <div class="thumbcaption"><div class="magnify"><a href="/wiki/File:Foobar.svg" class="internal" title="Enlarge"></a></div>caption</div></div></div>
15703 <figure class="mw-default-size" typeof="mw:Image/Thumb"><a href="./File:Foobar.svg"><img resource="./File:Foobar.svg" src="//example.com/images/thumb/f/ff/Foobar.svg/220px-Foobar.svg.png" lang="de" data-file-width="240" data-file-height="180" data-file-type="drawing" height="165" width="220"/></a><figcaption>caption</figcaption></figure>
15707 SVG thumbnails with invalid language code
15709 parsoid=wt2html,wt2wt,html2html
15711 [[File:Foobar.svg|thumb|caption|lang=invalid:language:code]]
15713 <div class="thumb tright"><div class="thumbinner" style="width:182px;"><a href="/wiki/File:Foobar.svg" class="image"><img alt="" src="http://example.com/images/thumb/f/ff/Foobar.svg/180px-Foobar.svg.png" width="180" height="135" class="thumbimage" srcset="http://example.com/images/thumb/f/ff/Foobar.svg/270px-Foobar.svg.png 1.5x, http://example.com/images/thumb/f/ff/Foobar.svg/360px-Foobar.svg.png 2x" /></a> <div class="thumbcaption"><div class="magnify"><a href="/wiki/File:Foobar.svg" class="internal" title="Enlarge"></a></div>lang=invalid:language:code</div></div></div>
15716 <figure class="mw-default-size" typeof="mw:Image/Thumb"><a href="./File:Foobar.svg"><img resource="./File:Foobar.svg" src="//example.com/images/thumb/f/ff/Foobar.svg/220px-Foobar.svg.png" data-file-width="240" data-file-height="180" data-file-type="drawing" height="165" width="220"/></a><figcaption>lang=invalid:language:code</figcaption></figure>
15720 SVG thumbnails in page language
15723 wgMediaInTargetLanguage = true
15725 [[File:Foobar.svg]] [[File:Foobar.svg|lang=en]]
15727 <p><a href="/wiki/%D0%A4%D0%B0%D0%B9%D0%BB:Foobar.svg" class="image"><img alt="Foobar.svg" src="http://example.com/images/thumb/f/ff/Foobar.svg/langru-240px-Foobar.svg.png" width="240" height="180" srcset="http://example.com/images/thumb/f/ff/Foobar.svg/langru-360px-Foobar.svg.png 1.5x, http://example.com/images/thumb/f/ff/Foobar.svg/langru-480px-Foobar.svg.png 2x" /></a> <a href="/index.php?title=%D0%A4%D0%B0%D0%B9%D0%BB:Foobar.svg&lang=en" class="image"><img alt="Foobar.svg" src="http://example.com/images/thumb/f/ff/Foobar.svg/240px-Foobar.svg.png" width="240" height="180" srcset="http://example.com/images/thumb/f/ff/Foobar.svg/360px-Foobar.svg.png 1.5x, http://example.com/images/thumb/f/ff/Foobar.svg/480px-Foobar.svg.png 2x" /></a>
15732 SVG thumbnails in page language not present in the file
15735 wgMediaInTargetLanguage = true
15737 [[File:Foobar.svg]] [[File:Foobar.svg|lang=ru]]
15739 <p><a href="/wiki/Datei:Foobar.svg" class="image"><img alt="Foobar.svg" src="http://example.com/images/thumb/f/ff/Foobar.svg/240px-Foobar.svg.png" width="240" height="180" srcset="http://example.com/images/thumb/f/ff/Foobar.svg/360px-Foobar.svg.png 1.5x, http://example.com/images/thumb/f/ff/Foobar.svg/480px-Foobar.svg.png 2x" /></a> <a href="/index.php?title=Datei:Foobar.svg&lang=ru" class="image"><img alt="Foobar.svg" src="http://example.com/images/thumb/f/ff/Foobar.svg/langru-240px-Foobar.svg.png" width="240" height="180" srcset="http://example.com/images/thumb/f/ff/Foobar.svg/langru-360px-Foobar.svg.png 1.5x, http://example.com/images/thumb/f/ff/Foobar.svg/langru-480px-Foobar.svg.png 2x" /></a>
15744 T3887: A ISBN with a thumbnail
15746 [[File:Foobar.jpg|thumb|ISBN 1235467890]]
15748 <div class="thumb tright"><div class="thumbinner" style="width:182px;"><a href="/wiki/File:Foobar.jpg" class="image"><img alt="" src="http://example.com/images/thumb/3/3a/Foobar.jpg/180px-Foobar.jpg" width="180" height="20" class="thumbimage" srcset="http://example.com/images/thumb/3/3a/Foobar.jpg/270px-Foobar.jpg 1.5x, http://example.com/images/thumb/3/3a/Foobar.jpg/360px-Foobar.jpg 2x" /></a> <div class="thumbcaption"><div class="magnify"><a href="/wiki/File:Foobar.jpg" class="internal" title="Enlarge"></a></div><a href="/wiki/Special:BookSources/1235467890" class="internal mw-magiclink-isbn">ISBN 1235467890</a></div></div></div>
15751 <figure class="mw-default-size" typeof="mw:Image/Thumb"><a href="./File:Foobar.jpg"><img resource="./File:Foobar.jpg" src="//example.com/images/thumb/3/3a/Foobar.jpg/220px-Foobar.jpg" data-file-width="1941" data-file-height="220" data-file-type="bitmap" height="25" width="220"/></a><figcaption><a href="./Special:BookSources/1235467890" rel="mw:WikiLink">ISBN 1235467890</a></figcaption></figure>
15755 T3887: A RFC with a thumbnail
15757 [[File:Foobar.jpg|thumb|This is RFC 12354]]
15759 <div class="thumb tright"><div class="thumbinner" style="width:182px;"><a href="/wiki/File:Foobar.jpg" class="image"><img alt="" src="http://example.com/images/thumb/3/3a/Foobar.jpg/180px-Foobar.jpg" width="180" height="20" class="thumbimage" srcset="http://example.com/images/thumb/3/3a/Foobar.jpg/270px-Foobar.jpg 1.5x, http://example.com/images/thumb/3/3a/Foobar.jpg/360px-Foobar.jpg 2x" /></a> <div class="thumbcaption"><div class="magnify"><a href="/wiki/File:Foobar.jpg" class="internal" title="Enlarge"></a></div>This is <a class="external mw-magiclink-rfc" rel="nofollow" href="https://tools.ietf.org/html/rfc12354">RFC 12354</a></div></div></div>
15762 <figure class="mw-default-size" typeof="mw:Image/Thumb"><a href="./File:Foobar.jpg"><img resource="./File:Foobar.jpg" src="//example.com/images/thumb/3/3a/Foobar.jpg/220px-Foobar.jpg" data-file-width="1941" data-file-height="220" data-file-type="bitmap" height="25" width="220"/></a><figcaption>This is <a href="https://tools.ietf.org/html/rfc12354" rel="mw:ExtLink" class="external mw-magiclink">RFC 12354</a></figcaption></figure>
15766 T3887: A mailto link with a thumbnail
15768 [[File:Foobar.jpg|thumb|Please mailto:nobody@example.com]]
15770 <div class="thumb tright"><div class="thumbinner" style="width:182px;"><a href="/wiki/File:Foobar.jpg" class="image"><img alt="" src="http://example.com/images/thumb/3/3a/Foobar.jpg/180px-Foobar.jpg" width="180" height="20" class="thumbimage" srcset="http://example.com/images/thumb/3/3a/Foobar.jpg/270px-Foobar.jpg 1.5x, http://example.com/images/thumb/3/3a/Foobar.jpg/360px-Foobar.jpg 2x" /></a> <div class="thumbcaption"><div class="magnify"><a href="/wiki/File:Foobar.jpg" class="internal" title="Enlarge"></a></div>Please <a rel="nofollow" class="external free" href="mailto:nobody@example.com">mailto:nobody@example.com</a></div></div></div>
15773 <figure class="mw-default-size" typeof="mw:Image/Thumb"><a href="./File:Foobar.jpg"><img resource="./File:Foobar.jpg" src="//example.com/images/thumb/3/3a/Foobar.jpg/220px-Foobar.jpg" data-file-width="1941" data-file-height="220" data-file-type="bitmap" height="25" width="220"/></a><figcaption>Please <a rel="mw:ExtLink" class="external free" href="mailto:nobody@example.com">mailto:nobody@example.com</a></figcaption></figure>
15776 # Pending resolution to T2368
15778 T2648: Frameless image caption with a link
15780 [[File:Foobar.jpg|text with a [[link]] in it]]
15782 <p><a href="/wiki/File:Foobar.jpg" class="image" title="text with a link in it"><img alt="text with a link in it" src="http://example.com/images/3/3a/Foobar.jpg" width="1941" height="220" /></a>
15785 <p><figure-inline class="mw-default-size" typeof="mw:Image" data-parsoid='{"optList":[{"ck":"caption","ak":"text with a [[link]] in it"}]}' data-mw='{"caption":"text with a <a rel=\"mw:WikiLink\" href=\"./Link\" title=\"Link\" data-parsoid='{\"stx\":\"simple\",\"a\":{\"href\":\"./Link\"},\"sa\":{\"href\":\"link\"},\"dsr\":[30,38,2,2]}'>link</a> in it"}'><a href="./File:Foobar.jpg" data-parsoid='{"a":{"href":"./File:Foobar.jpg"},"sa":{}}'><img resource="./File:Foobar.jpg" src="//example.com/images/3/3a/Foobar.jpg" data-file-width="1941" data-file-height="220" data-file-type="bitmap" height="220" width="1941" data-parsoid='{"a":{"resource":"./File:Foobar.jpg","height":"220","width":"1941"},"sa":{"resource":"File:Foobar.jpg"}}'/></a></figure-inline></p>
15789 T2648: Frameless image caption with a link (suffix)
15791 [[File:Foobar.jpg|text with a [[link]]foo in it]]
15793 <p><a href="/wiki/File:Foobar.jpg" class="image" title="text with a linkfoo in it"><img alt="text with a linkfoo in it" src="http://example.com/images/3/3a/Foobar.jpg" width="1941" height="220" /></a>
15796 <p><figure-inline class="mw-default-size" typeof="mw:Image" data-parsoid='{"optList":[{"ck":"caption","ak":"text with a [[link]]foo in it"}]}' data-mw='{"caption":"text with a <a rel=\"mw:WikiLink\" href=\"./Link\" title=\"Link\" data-parsoid='{\"stx\":\"simple\",\"a\":{\"href\":\"./Link\"},\"sa\":{\"href\":\"link\"},\"dsr\":[30,41,2,5],\"tail\":\"foo\"}'>linkfoo</a> in it"}'><a href="./File:Foobar.jpg" data-parsoid='{"a":{"href":"./File:Foobar.jpg"},"sa":{}}'><img resource="./File:Foobar.jpg" src="//example.com/images/3/3a/Foobar.jpg" data-file-width="1941" data-file-height="220" data-file-type="bitmap" height="220" width="1941" data-parsoid='{"a":{"resource":"./File:Foobar.jpg","height":"220","width":"1941"},"sa":{"resource":"File:Foobar.jpg"}}'/></a></figure-inline></p>
15800 T2648: Frameless image caption with an interwiki link
15802 [[File:Foobar.jpg|text with a [[MeatBall:Link]] in it]]
15804 <p><a href="/wiki/File:Foobar.jpg" class="image" title="text with a MeatBall:Link in it"><img alt="text with a MeatBall:Link in it" src="http://example.com/images/3/3a/Foobar.jpg" width="1941" height="220" /></a>
15807 <p><figure-inline class="mw-default-size" typeof="mw:Image" data-parsoid='{"optList":[{"ck":"caption","ak":"text with a [[MeatBall:Link]] in it"}]}' data-mw='{"caption":"text with a <a rel=\"mw:WikiLink/Interwiki\" href=\"http://www.usemod.com/cgi-bin/mb.pl?Link\" title=\"meatball:Link\" data-parsoid='{\"stx\":\"simple\",\"a\":{\"href\":\"http://www.usemod.com/cgi-bin/mb.pl?Link\"},\"sa\":{\"href\":\"MeatBall:Link\"},\"isIW\":true,\"dsr\":[30,47,2,2]}'>MeatBall:Link</a> in it"}'><a href="./File:Foobar.jpg" data-parsoid='{"a":{"href":"./File:Foobar.jpg"},"sa":{}}'><img resource="./File:Foobar.jpg" src="//example.com/images/3/3a/Foobar.jpg" data-file-width="1941" data-file-height="220" data-file-type="bitmap" height="220" width="1941" data-parsoid='{"a":{"resource":"./File:Foobar.jpg","height":"220","width":"1941"},"sa":{"resource":"File:Foobar.jpg"}}'/></a></figure-inline></p>
15811 T2648: Frameless image caption with a piped interwiki link
15813 [[File:Foobar.jpg|text with a [[MeatBall:Link|link]] in it]]
15815 <p><a href="/wiki/File:Foobar.jpg" class="image" title="text with a link in it"><img alt="text with a link in it" src="http://example.com/images/3/3a/Foobar.jpg" width="1941" height="220" /></a>
15818 <p><figure-inline class="mw-default-size" typeof="mw:Image" data-parsoid='{"optList":[{"ck":"caption","ak":"text with a [[MeatBall:Link|link]] in it"}]}' data-mw='{"caption":"text with a <a rel=\"mw:WikiLink/Interwiki\" href=\"http://www.usemod.com/cgi-bin/mb.pl?Link\" title=\"meatball:Link\" data-parsoid='{\"stx\":\"piped\",\"a\":{\"href\":\"http://www.usemod.com/cgi-bin/mb.pl?Link\"},\"sa\":{\"href\":\"MeatBall:Link\"},\"isIW\":true,\"dsr\":[30,52,16,2]}'>link</a> in it"}'><a href="./File:Foobar.jpg" data-parsoid='{"a":{"href":"./File:Foobar.jpg"},"sa":{}}'><img resource="./File:Foobar.jpg" src="//example.com/images/3/3a/Foobar.jpg" data-file-width="1941" data-file-height="220" data-file-type="bitmap" height="220" width="1941" data-parsoid='{"a":{"resource":"./File:Foobar.jpg","height":"220","width":"1941"},"sa":{"resource":"File:Foobar.jpg"}}'/></a></figure-inline></p>
15822 T107474: Frameless image caption with <nowiki>
15824 [[File:Foobar.jpg|<nowiki>text with a [[MeatBall:Link|link]] in it</nowiki>]]
15826 <p><figure-inline class="mw-default-size" typeof="mw:Image" data-parsoid='{"optList":[{"ck":"caption","ak":"<nowiki>text with a [[MeatBall:Link|link]] in it</nowiki>"}]}' data-mw='{"caption":"<span typeof=\"mw:Nowiki\" data-parsoid='{\"dsr\":[18,75,8,9]}'>text with a [[MeatBall:Link|link]] in it</span>"}'><a href="./File:Foobar.jpg" data-parsoid='{"a":{"href":"./File:Foobar.jpg"},"sa":{}}'><img resource="./File:Foobar.jpg" src="//example.com/images/3/3a/Foobar.jpg" data-file-width="1941" data-file-height="220" data-file-type="bitmap" height="220" width="1941" data-parsoid='{"a":{"resource":"./File:Foobar.jpg","height":"220","width":"1941"},"sa":{"resource":"File:Foobar.jpg"}}'/></a></figure-inline></p>
15830 Escape HTML special chars in image alt text
15832 [[File:Foobar.jpg|& < > "]]
15834 <p><a href="/wiki/File:Foobar.jpg" class="image" title="& < > ""><img alt="& < > "" src="http://example.com/images/3/3a/Foobar.jpg" width="1941" height="220" /></a>
15837 <p><figure-inline class="mw-default-size" typeof="mw:Image" data-parsoid='{"optList":[{"ck":"caption","ak":"& < > \""}]}' data-mw='{"caption":"&amp; &lt; > \""}'><a href="./File:Foobar.jpg" data-parsoid='{"a":{"href":"./File:Foobar.jpg"},"sa":{}}'><img resource="./File:Foobar.jpg" src="//example.com/images/3/3a/Foobar.jpg" data-file-width="1941" data-file-height="220" data-file-type="bitmap" height="220" width="1941" data-parsoid='{"a":{"resource":"./File:Foobar.jpg","height":"220","width":"1941"},"sa":{"resource":"File:Foobar.jpg"}}'/></a></figure-inline></p>
15841 Escape HTML special chars in image alt text with LanguageConverter
15845 [[File:Foobar.jpg|& < > "]]
15847 <p><a href="/wiki/File:Foobar.jpg" class="image" title="& < > ""><img alt="& < > "" src="http://example.com/images/3/3a/Foobar.jpg" width="1941" height="220" /></a>
15850 <p><figure-inline class="mw-default-size" typeof="mw:Image" data-parsoid='{"optList":[{"ck":"caption","ak":"& < > \""}]}' data-mw='{"caption":"&amp; &lt; > \""}'><a href="./File:Foobar.jpg" data-parsoid='{"a":{"href":"./File:Foobar.jpg"},"sa":{}}'><img resource="./File:Foobar.jpg" src="//example.com/images/3/3a/Foobar.jpg" data-file-width="1941" data-file-height="220" data-file-type="bitmap" height="220" width="1941" data-parsoid='{"a":{"resource":"./File:Foobar.jpg","height":"220","width":"1941"},"sa":{"resource":"File:Foobar.jpg"}}'/></a></figure-inline></p>
15854 Entities in file name and attributes
15856 [[File:7%25 solution.gif|manualthumb=7%25 solution.gif|link=7%25 solution|[[7%25 solution]]]]
15858 <p><a href="/index.php?title=Special:Upload&wpDestFile=7%25_solution.gif" class="new" title="File:7% solution.gif">7% solution</a>
15861 <p><figure-inline class="mw-default-size" typeof="mw:Error mw:Image" data-parsoid='{"optList":[{"ck":"bogus","ak":"manualthumb=7%25 solution.gif"},{"ck":"link","ak":"link=7%25 solution"},{"ck":"caption","ak":"[[7%25 solution]]"}]}' data-mw='{"errors":[{"key":"apierror-filedoesnotexist","message":"This image does not exist."}],"caption":"<a rel=\"mw:WikiLink\" href=\"./7%25_solution\" title=\"7% solution\" data-parsoid='{\"stx\":\"simple\",\"a\":{\"href\":\"./7%25_solution\"},\"sa\":{\"href\":\"7%25 solution\"},\"dsr\":[74,91,2,2]}'>7% solution</a>"}'><a href="./7%25_solution" data-parsoid='{"a":{"href":"./7%25_solution"},"sa":{"href":"link=7%25 solution"}}'><img resource="./File:7%25_solution.gif" src="./Special:FilePath/7%25_solution.gif" height="220" width="220" data-parsoid='{"a":{"resource":"./File:7%25_solution.gif","height":"220","width":"220"},"sa":{"resource":"File:7%25 solution.gif"}}'/></a></figure-inline></p>
15865 T2499: Alt text should have Ӓ, not &1234;
15867 [[File:Foobar.jpg|♀]]
15869 <p><a href="/wiki/File:Foobar.jpg" class="image" title="♀"><img alt="♀" src="http://example.com/images/3/3a/Foobar.jpg" width="1941" height="220" /></a>
15872 <p><figure-inline class="mw-default-size" typeof="mw:Image" data-parsoid='{"optList":[{"ck":"caption","ak":"&#9792;"}]}' data-mw='{"caption":"<span typeof=\"mw:Entity\" data-parsoid='{\"src\":\"&amp;#9792;\",\"srcContent\":\"♀\",\"dsr\":[18,25,null,null]}'>♀</span>"}'><a href="./File:Foobar.jpg" data-parsoid='{"a":{"href":"./File:Foobar.jpg"},"sa":{}}'><img resource="./File:Foobar.jpg" src="//example.com/images/3/3a/Foobar.jpg" data-file-width="1941" data-file-height="220" data-file-type="bitmap" height="220" width="1941" data-parsoid='{"a":{"resource":"./File:Foobar.jpg","height":"220","width":"1941"},"sa":{"resource":"File:Foobar.jpg"}}'/></a></figure-inline></p>
15876 Broken image caption with link
15878 parsoid=wt2html,wt2wt,html2html
15880 [[Image:Foobar.jpg|thumb|This is a broken caption. But [[Main Page|this]] is just an ordinary link.
15882 <p>[[Image:Foobar.jpg|thumb|This is a broken caption. But <a href="/wiki/Main_Page" title="Main Page">this</a> is just an ordinary link.
15885 <p>[[Image:Foobar.jpg|thumb|This is a broken caption. But <a rel="mw:WikiLink" href="./Main_Page" title="Main Page">this</a> is just an ordinary link.</p>
15889 Image caption containing another image
15891 [[File:Foobar.jpg|thumb|This is a caption with another [[File:Thumb.png|image]] inside it!]]
15893 <div class="thumb tright"><div class="thumbinner" style="width:182px;"><a href="/wiki/File:Foobar.jpg" class="image"><img alt="" src="http://example.com/images/thumb/3/3a/Foobar.jpg/180px-Foobar.jpg" width="180" height="20" class="thumbimage" srcset="http://example.com/images/thumb/3/3a/Foobar.jpg/270px-Foobar.jpg 1.5x, http://example.com/images/thumb/3/3a/Foobar.jpg/360px-Foobar.jpg 2x" /></a> <div class="thumbcaption"><div class="magnify"><a href="/wiki/File:Foobar.jpg" class="internal" title="Enlarge"></a></div>This is a caption with another <a href="/wiki/File:Thumb.png" class="image" title="image"><img alt="image" src="http://example.com/images/e/ea/Thumb.png" width="135" height="135" /></a> inside it!</div></div></div>
15896 <figure class="mw-default-size" typeof="mw:Image/Thumb"><a href="./File:Foobar.jpg"><img resource="./File:Foobar.jpg" src="//example.com/images/thumb/3/3a/Foobar.jpg/220px-Foobar.jpg" data-file-width="1941" data-file-height="220" data-file-type="bitmap" height="25" width="220"/></a><figcaption>This is a caption with another <figure-inline class="mw-default-size" typeof="mw:Image" data-mw='{"caption":"image"}'><a href="./File:Thumb.png"><img resource="./File:Thumb.png" src="//example.com/images/e/ea/Thumb.png" data-file-width="135" data-file-height="135" data-file-type="bitmap" height="135" width="135"/></a></figure-inline> inside it!</figcaption></figure>
15900 Image: caption containing a newline
15902 [[File:Foobar.jpg|This
15905 <p><a href="/wiki/File:Foobar.jpg" class="image" title="This *is some text"><img alt="This *is some text" src="http://example.com/images/3/3a/Foobar.jpg" width="1941" height="220" /></a>
15908 <p><figure-inline class="mw-default-size" typeof="mw:Image" data-mw='{"caption":"This\n*is some text"}'><a href="./File:Foobar.jpg"><img resource="./File:Foobar.jpg" src="//example.com/images/3/3a/Foobar.jpg" data-file-width="1941" data-file-height="220" data-file-type="bitmap" height="220" width="1941"/></a></figure-inline></p>
15912 Image: caption containing leading space
15913 (The leading space should not trigger nowiki escaping in wt2wt mode)
15915 [[File:Foobar.jpg|thumb| bar]]
15917 <div class="thumb tright"><div class="thumbinner" style="width:182px;"><a href="/wiki/File:Foobar.jpg" class="image"><img alt="" src="http://example.com/images/thumb/3/3a/Foobar.jpg/180px-Foobar.jpg" width="180" height="20" class="thumbimage" srcset="http://example.com/images/thumb/3/3a/Foobar.jpg/270px-Foobar.jpg 1.5x, http://example.com/images/thumb/3/3a/Foobar.jpg/360px-Foobar.jpg 2x" /></a> <div class="thumbcaption"><div class="magnify"><a href="/wiki/File:Foobar.jpg" class="internal" title="Enlarge"></a></div>bar</div></div></div>
15920 <figure class="mw-default-size" typeof="mw:Image/Thumb"><a href="./File:Foobar.jpg"><img resource="./File:Foobar.jpg" src="//example.com/images/thumb/3/3a/Foobar.jpg/220px-Foobar.jpg" data-file-width="1941" data-file-height="220" data-file-type="bitmap" height="25" width="220"/></a><figcaption> bar</figcaption></figure>
15923 # html/php output not have newlines after table, td, th, etc. because
15924 # Linker::makeThumbLink2() replaces the newlines with spaces since
15925 # the table is inside a caption.
15926 # FIXME: Verify if that circa 2004 fix is still required.
15928 Image: caption containing a table
15930 parsoid=wt2html,wt2wt,html2html
15932 [[Image:Foobar.jpg|thumb|200px|This is an example image thumbnail caption with a table
15938 and some more text.]]
15940 <div class="thumb tright"><div class="thumbinner" style="width:202px;"><a href="/wiki/File:Foobar.jpg" class="image"><img alt="" src="http://example.com/images/thumb/3/3a/Foobar.jpg/200px-Foobar.jpg" width="200" height="23" class="thumbimage" srcset="http://example.com/images/thumb/3/3a/Foobar.jpg/300px-Foobar.jpg 1.5x, http://example.com/images/thumb/3/3a/Foobar.jpg/400px-Foobar.jpg 2x" /></a> <div class="thumbcaption"><div class="magnify"><a href="/wiki/File:Foobar.jpg" class="internal" title="Enlarge"></a></div>This is an example image thumbnail caption with a table <table> <tr> <th>Foo</th> <th>Bar </th></tr> <tr> <td>Foo1</td> <td>Bar1 </td></tr></table> and some more text.</div></div></div>
15943 <figure typeof="mw:Image/Thumb"><a href="./File:Foobar.jpg"><img resource="./File:Foobar.jpg" src="//example.com/images/thumb/3/3a/Foobar.jpg/200px-Foobar.jpg" data-file-width="1941" data-file-height="220" data-file-type="bitmap" height="23" width="200"/></a><figcaption>This is an example image thumbnail caption with a table
15946 <tr><th>Foo</th><th>Bar</th></tr>
15949 <td>Bar1</td></tr></tbody></table>and some more text.</figcaption></figure>
15953 T5090: External links other than http: in image captions
15955 [[File:Foobar.jpg|thumb|200x200px|This caption has [irc://example.net irc] and [https://example.com Secure] ext links in it.]]
15957 <div class="thumb tright"><div class="thumbinner" style="width:202px;"><a href="/wiki/File:Foobar.jpg" class="image"><img alt="" src="http://example.com/images/thumb/3/3a/Foobar.jpg/200px-Foobar.jpg" width="200" height="23" class="thumbimage" srcset="http://example.com/images/thumb/3/3a/Foobar.jpg/300px-Foobar.jpg 1.5x, http://example.com/images/thumb/3/3a/Foobar.jpg/400px-Foobar.jpg 2x" /></a> <div class="thumbcaption"><div class="magnify"><a href="/wiki/File:Foobar.jpg" class="internal" title="Enlarge"></a></div>This caption has <a rel="nofollow" class="external text" href="irc://example.net">irc</a> and <a rel="nofollow" class="external text" href="https://example.com">Secure</a> ext links in it.</div></div></div>
15960 <figure typeof="mw:Image/Thumb"><a href="./File:Foobar.jpg"><img resource="./File:Foobar.jpg" src="//example.com/images/thumb/3/3a/Foobar.jpg/200px-Foobar.jpg" data-file-width="1941" data-file-height="220" data-file-type="bitmap" height="23" width="200"/></a><figcaption>This caption has <a rel="mw:ExtLink" class="external text" href="irc://example.net">irc</a> and <a rel="mw:ExtLink" class="external text" href="https://example.com">Secure</a> ext links in it.</figcaption></figure>
15966 parsoid=wt2html,wt2wt,html2html
15968 [[Image:foobar.jpg|a|class=b]]
15970 <p><a href="/wiki/File:Foobar.jpg" class="image" title="a"><img alt="a" src="http://example.com/images/3/3a/Foobar.jpg" width="1941" height="220" class="b" /></a>
15973 <p><figure-inline class="mw-default-size b" typeof="mw:Image" data-mw='{"caption":"a"}'><a href="./File:Foobar.jpg"><img resource="./File:Foobar.jpg" src="//example.com/images/3/3a/Foobar.jpg" data-file-width="1941" data-file-height="220" data-file-type="bitmap" height="220" width="1941"/></a></figure-inline></p>
15977 Localized image handling (1).
15979 parsoid=wt2html,wt2wt,html2html
15982 [[Archivo:Foobar.jpg|izquierda|enlace=foo|caption]]
15984 <div class="floatleft"><a href="/wiki/Foo" title="caption"><img alt="caption" src="http://example.com/images/3/3a/Foobar.jpg" width="1941" height="220" /></a></div>
15987 <figure class="mw-default-size mw-halign-left" typeof="mw:Image"><a href="./Foo"><img resource="./Archivo:Foobar.jpg" src="//example.com/images/3/3a/Foobar.jpg" data-file-width="1941" data-file-height="220" data-file-type="bitmap" height="220" width="1941"/></a><figcaption>caption</figcaption></figure>
15991 Localized image handling (2).
15994 parsoid=wt2html,wt2wt,html2html
15997 [[Archivo:Foobar.jpg|miniatura|izquierda|enlace=foo|caption]]
15999 <div class="thumb tleft"><div class="thumbinner" style="width:222px;"><a href="/wiki/Foo" title="Foo"><img alt="" src="http://example.com/images/thumb/3/3a/Foobar.jpg/220px-Foobar.jpg" width="220" height="25" class="thumbimage" srcset="http://example.com/images/thumb/3/3a/Foobar.jpg/330px-Foobar.jpg 1.5x, http://example.com/images/thumb/3/3a/Foobar.jpg/440px-Foobar.jpg 2x" /></a> <div class="thumbcaption"><div class="magnify"><a href="/wiki/Archivo:Foobar.jpg" class="internal" title="Aumentar"></a></div>caption</div></div></div>
16002 <figure class="mw-default-size mw-halign-left" typeof="mw:Image/Thumb"><a href="./Foo"><img resource="./Archivo:Foobar.jpg" src="//example.com/images/thumb/3/3a/Foobar.jpg/220px-Foobar.jpg" data-file-width="1941" data-file-height="220" data-file-type="bitmap" height="25" width="220"/></a><figcaption>caption</figcaption></figure>
16006 Localized image handling (3).
16011 <figure class="mw-default-size" typeof="mw:Image/Thumb"><a href="./File:Foobar.jpg"><img resource="./File:Foobar.jpg" src="//example.com/images/thumb/3/3a/Foobar.jpg/220px-Foobar.jpg" data-file-width="1941" data-file-height="220" data-file-type="bitmap" height="25" width="220"/></a></figure>
16013 [[File:Foobar.jpg|بندانگشتی]]
16017 "border", "frameless" and "class" attributes on an image.
16020 parsoid=wt2html,wt2wt,html2html
16022 [[File:Foobar.jpg|frameless|border|class=extra|caption]]
16024 <p><a href="/wiki/File:Foobar.jpg" class="image" title="caption"><img alt="caption" src="http://example.com/images/thumb/3/3a/Foobar.jpg/220px-Foobar.jpg" width="220" height="25" class="extra thumbborder" srcset="http://example.com/images/thumb/3/3a/Foobar.jpg/330px-Foobar.jpg 1.5x, http://example.com/images/thumb/3/3a/Foobar.jpg/440px-Foobar.jpg 2x" /></a>
16027 <p><figure-inline class="mw-default-size mw-image-border extra" typeof="mw:Image/Frameless" data-mw='{"caption":"caption"}'><a href="./File:Foobar.jpg"><img resource="./File:Foobar.jpg" src="//example.com/images/thumb/3/3a/Foobar.jpg/220px-Foobar.jpg" data-file-width="1941" data-file-height="220" data-file-type="bitmap" height="25" width="220"/></a></figure-inline></p>
16030 # Note that 'right' is the default alignment, despite the misspelled 'righ' below
16032 Invalid image attributes (T64500)
16035 parsoid=wt2html,wt2wt,html2html
16037 [[File:Foobar.jpg|thumb|float|left|caption]]
16039 [[File:Foobar.jpg|thumb|righ|caption]]
16041 [[File:Foobar.jpg|bogus1|thumb|bogus2|left|bogus3|caption]]
16043 <div class="thumb tleft"><div class="thumbinner" style="width:222px;"><a href="/wiki/File:Foobar.jpg" class="image"><img alt="" src="http://example.com/images/thumb/3/3a/Foobar.jpg/220px-Foobar.jpg" width="220" height="25" class="thumbimage" srcset="http://example.com/images/thumb/3/3a/Foobar.jpg/330px-Foobar.jpg 1.5x, http://example.com/images/thumb/3/3a/Foobar.jpg/440px-Foobar.jpg 2x" /></a> <div class="thumbcaption"><div class="magnify"><a href="/wiki/File:Foobar.jpg" class="internal" title="Enlarge"></a></div>caption</div></div></div>
16044 <div class="thumb tright"><div class="thumbinner" style="width:222px;"><a href="/wiki/File:Foobar.jpg" class="image"><img alt="" src="http://example.com/images/thumb/3/3a/Foobar.jpg/220px-Foobar.jpg" width="220" height="25" class="thumbimage" srcset="http://example.com/images/thumb/3/3a/Foobar.jpg/330px-Foobar.jpg 1.5x, http://example.com/images/thumb/3/3a/Foobar.jpg/440px-Foobar.jpg 2x" /></a> <div class="thumbcaption"><div class="magnify"><a href="/wiki/File:Foobar.jpg" class="internal" title="Enlarge"></a></div>caption</div></div></div>
16045 <div class="thumb tleft"><div class="thumbinner" style="width:222px;"><a href="/wiki/File:Foobar.jpg" class="image"><img alt="" src="http://example.com/images/thumb/3/3a/Foobar.jpg/220px-Foobar.jpg" width="220" height="25" class="thumbimage" srcset="http://example.com/images/thumb/3/3a/Foobar.jpg/330px-Foobar.jpg 1.5x, http://example.com/images/thumb/3/3a/Foobar.jpg/440px-Foobar.jpg 2x" /></a> <div class="thumbcaption"><div class="magnify"><a href="/wiki/File:Foobar.jpg" class="internal" title="Enlarge"></a></div>caption</div></div></div>
16048 <figure class="mw-default-size mw-halign-left" typeof="mw:Image/Thumb"><a href="./File:Foobar.jpg"><img resource="./File:Foobar.jpg" src="//example.com/images/thumb/3/3a/Foobar.jpg/220px-Foobar.jpg" data-file-width="1941" data-file-height="220" data-file-type="bitmap" height="25" width="220"/></a><figcaption>caption</figcaption></figure>
16049 <figure class="mw-default-size" typeof="mw:Image/Thumb"><a href="./File:Foobar.jpg"><img resource="./File:Foobar.jpg" src="//example.com/images/thumb/3/3a/Foobar.jpg/220px-Foobar.jpg" data-file-width="1941" data-file-height="220" data-file-type="bitmap" height="25" width="220"/></a><figcaption>caption</figcaption></figure>
16050 <figure class="mw-default-size mw-halign-left" typeof="mw:Image/Thumb"><a href="./File:Foobar.jpg"><img resource="./File:Foobar.jpg" src="//example.com/images/thumb/3/3a/Foobar.jpg/220px-Foobar.jpg" data-file-width="1941" data-file-height="220" data-file-type="bitmap" height="25" width="220"/></a><figcaption>caption</figcaption></figure>
16056 #REDIRECT [[File:Barfoo.jpg]]
16059 # FIXME: Parsoid should run this test -- but we'd need to teach the
16060 # mockAPI about the redirected Barfoo.jpg image.
16064 [[Image:Barfoo.jpg]]
16066 <p><a href="/wiki/File:Barfoo.jpg" class="mw-redirect" title="File:Barfoo.jpg">File:Barfoo.jpg</a>
16071 Missing image with uploads disabled
16075 [[File:Foobaz.jpg]]
16077 <p><a href="/wiki/File:Foobaz.jpg" title="File:Foobaz.jpg">File:Foobaz.jpg</a>
16080 <p><figure-inline class="mw-default-size" typeof="mw:Error mw:Image" data-mw='{"errors":[{"key":"apierror-filedoesnotexist","message":"This image does not exist."}]}'><a href="./File:Foobaz.jpg"><img resource="./File:Foobaz.jpg" src="./Special:FilePath/Foobaz.jpg" height="220" width="220"/></a></figure-inline></p>
16083 # Parsoid-specific testing for images
16084 # https://www.mediawiki.org/wiki/Parsoid/MediaWiki_DOM_spec#Images
16085 # Currently imperfect due to a flaw in the Parsoid testrunner
16087 # THESE TESTS SHOULD BE MOVED UP and merged with the php-specific
16091 Parsoid-specific image handling - simple image with size and middle alignment
16093 [[File:Foobar.jpg|middle|50px]]
16095 <p><figure-inline class="mw-valign-middle" typeof="mw:Image"><a href="./File:Foobar.jpg"><img resource="./File:Foobar.jpg" src="//example.com/images/thumb/3/3a/Foobar.jpg/50px-Foobar.jpg" data-file-width="1941" data-file-height="220" data-file-type="bitmap" height="6" width="50"/></a></figure-inline></p>
16099 Parsoid-specific image handling - simple image with size, middle alignment, non-standard namespace alias
16101 parsoid=wt2wt,wt2html,html2html
16103 [[Image:Foobar.jpg|middle|50px]]
16105 <p><figure-inline class="mw-valign-middle" typeof="mw:Image"><a href="./File:Foobar.jpg"><img resource="./File:Foobar.jpg" src="//example.com/images/thumb/3/3a/Foobar.jpg/50px-Foobar.jpg" data-file-width="1941" data-file-height="220" data-file-type="bitmap" height="6" width="50"/></a></figure-inline></p>
16109 Parsoid-specific image handling - simple image with size and middle alignment (existing content)
16111 [[File:Foobar.jpg|50px|middle]]
16113 <p><figure-inline class="mw-valign-middle" typeof="mw:Image" data-parsoid='{"optList":[{"ck":"width","ak":"50px"},{"ck":"middle","ak":"middle"}]}'><a href="./File:Foobar.jpg" data-parsoid='{"a":{"href":"./File:Foobar.jpg"}}'><img resource="./File:Foobar.jpg" src="//example.com/images/thumb/3/3a/Foobar.jpg/50px-Foobar.jpg" data-file-width="1941" data-file-height="220" data-file-type="bitmap" height="6" width="50" data-parsoid='{"a":{"resource":"./File:Foobar.jpg","height":"6","width":"50"},"sa":{"resource":"File:Foobar.jpg"}}'/></a></figure-inline></p>
16117 Parsoid-specific image handling - simple image with size and middle alignment and non-standard namespace name
16119 parsoid=wt2html,wt2wt,html2html
16121 [[Image:Foobar.jpg|50px|middle]]
16123 <p><figure-inline class="mw-valign-middle" typeof="mw:Image"><a href="./File:Foobar.jpg"><img resource="./File:Foobar.jpg" src="//example.com/images/thumb/3/3a/Foobar.jpg/50px-Foobar.jpg" data-file-width="1941" data-file-height="220" data-file-type="bitmap" height="6" width="50"/></a></figure-inline></p>
16127 Parsoid-specific image handling - simple image with both sizes, a baseline alignment, and a caption
16129 [[File:Foobar.jpg|500x10px|baseline|caption]]
16131 <p><figure-inline class="mw-valign-baseline" typeof="mw:Image" data-mw='{"caption":"caption"}' data-parsoid='{"optList":[{"ck":"width","ak":"500x10px"},{"ck":"baseline","ak":"baseline"},{"ck":"caption","ak":"caption"}],"size":"500x10"}'><a href="./File:Foobar.jpg" data-parsoid='{"a":{"href":"./File:Foobar.jpg"}}'><img resource="./File:Foobar.jpg" src="//example.com/images/thumb/3/3a/Foobar.jpg/89px-Foobar.jpg" data-file-width="1941" data-file-height="220" data-file-type="bitmap" height="10" width="89" data-parsoid='{"a":{"resource":"./File:Foobar.jpg","height":"10","width":"89"},"sa":{"resource":"File:Foobar.jpg"}}'/></a></figure-inline></p>
16135 Parsoid-specific image handling - simple image with border and size spec
16137 [[File:Foobar.jpg|50px|border|caption]]
16139 <p><figure-inline class="mw-image-border" typeof="mw:Image" data-mw='{"caption":"caption"}' data-parsoid='{"optList":[{"ck":"width","ak":"50px"},{"ck":"border","ak":"border"},{"ck":"caption","ak":"caption"}]}'><a href="./File:Foobar.jpg" data-parsoid='{"a":{"href":"./File:Foobar.jpg"}}'><img resource="./File:Foobar.jpg" src="//example.com/images/thumb/3/3a/Foobar.jpg/50px-Foobar.jpg" data-file-width="1941" data-file-height="220" data-file-type="bitmap" height="6" width="50" data-parsoid='{"a":{"resource":"./File:Foobar.jpg","height":"6","width":"50"},"sa":{"resource":"File:Foobar.jpg"}}'/></a></figure-inline></p>
16143 Parsoid-specific image handling - thumbnail with halign, valign, and caption
16145 parsoid=wt2html,html2html
16147 [[File:Foobar.jpg|left|baseline|thumb|caption content]]
16149 <figure class="mw-default-size mw-halign-left" typeof="mw:Image/Thumb"><a href="./File:Foobar.jpg"><img resource="./File:Foobar.jpg" src="//example.com/images/thumb/3/3a/Foobar.jpg/220px-Foobar.jpg" data-file-width="1941" data-file-height="220" data-file-type="bitmap" height="25" width="220"/></a><figcaption>caption content</figcaption></figure>
16153 Parsoid-specific image handling - thumbnail with halign, valign, and caption (existing content)
16155 parsoid=wt2html,html2html
16157 [[File:Foobar.jpg|thumb|left|baseline|caption content]]
16159 <figure class="mw-default-size mw-halign-left" typeof="mw:Image/Thumb" data-parsoid='{"optList":[{"ck":"thumbnail","ak":"thumb"},{"ck":"left","ak":"left"},{"ck":"baseline","ak":"baseline"},{"ck":"caption","ak":"caption content"}]}'><a href="./File:Foobar.jpg" data-parsoid='{"a":{"href":"./File:Foobar.jpg"}}'><img resource="./File:Foobar.jpg" src="//example.com/images/thumb/3/3a/Foobar.jpg/220px-Foobar.jpg" data-file-width="1941" data-file-height="220" data-file-type="bitmap" height="25" width="220" data-parsoid='{"a":{"resource":"./File:Foobar.jpg","height":"25","width":"220"},"sa":{"resource":"File:Foobar.jpg"}}'/></a><figcaption>caption content</figcaption></figure>
16163 Parsoid-specific image handling - thumbnail with specific size, halign, valign, and caption
16165 parsoid=wt2html,html2html
16167 [[Image:Foobar.jpg|right|middle|thumb|50x50px|caption]]
16169 <figure class="mw-halign-right" typeof="mw:Image/Thumb"><a href="./File:Foobar.jpg"><img resource="./File:Foobar.jpg" src="//example.com/images/thumb/3/3a/Foobar.jpg/50px-Foobar.jpg" data-file-width="1941" data-file-height="220" data-file-type="bitmap" height="6" width="50"/></a><figcaption>caption</figcaption></figure>
16173 Parsoid-specific image handling - thumbnail with specific size, halign, valign, and caption (existing content)
16175 parsoid=wt2html,html2html
16177 [[File:Foobar.jpg|thumb|50x50px|right|middle|caption]]
16179 <figure class="mw-halign-right" typeof="mw:Image/Thumb" data-parsoid='{"optList":[{"ck":"thumbnail","ak":"thumb"},{"ck":"width","ak":"50x50px"},{"ck":"right","ak":"right"},{"ck":"middle","ak":"middle"},{"ck":"caption","ak":"caption"}],"size":"50x50"}'><a href="./File:Foobar.jpg" data-parsoid='{"a":{"href":"./File:Foobar.jpg"}}'><img resource="./File:Foobar.jpg" src="//example.com/images/thumb/3/3a/Foobar.jpg/50px-Foobar.jpg" data-file-width="1941" data-file-height="220" data-file-type="bitmap" height="6" width="50" data-parsoid='{"a":{"resource":"./File:Foobar.jpg","height":"6","width":"50"},"sa":{"resource":"File:Foobar.jpg"}}'/></a><figcaption>caption</figcaption></figure>
16183 Parsoid-specific image handling - framed image with specific size and caption (size is ignored)
16185 parsoid=wt2html,wt2wt,html2html
16187 [[File:Foobar.jpg|frame|500x50px|caption]]
16189 <figure typeof="mw:Image/Frame"><a href="./File:Foobar.jpg"><img resource="./File:Foobar.jpg" src="//example.com/images/3/3a/Foobar.jpg" data-file-width="1941" data-file-height="220" data-file-type="bitmap" height="220" width="1941"/></a><figcaption>caption</figcaption></figure>
16193 Parsoid-specific image handling - framed image with specific size, halign, valign, and caption (size is ignored)
16195 parsoid=wt2html,html2html
16197 [[File:Foobar.jpg|left|baseline|frame|500x50px|caption]]
16199 <figure class="mw-halign-left" typeof="mw:Image/Frame"><a href="./File:Foobar.jpg"><img resource="./File:Foobar.jpg" src="//example.com/images/3/3a/Foobar.jpg" data-file-width="1941" data-file-height="220" data-file-type="bitmap" height="220" width="1941"/></a><figcaption>caption</figcaption></figure>
16203 Parsoid-specific image handling - frameless image with specific size, border, and caption
16205 [[File:Foobar.jpg|frameless|442x50px|border|caption]]
16207 <p><figure-inline class="mw-image-border" typeof="mw:Image/Frameless" data-mw='{"caption":"caption"}' data-parsoid='{"optList":[{"ck":"frameless","ak":"frameless"},{"ck":"width","ak":"442x50px"},{"ck":"border","ak":"border"},{"ck":"caption","ak":"caption"}],"size":"442x50"}'><a href="./File:Foobar.jpg" data-parsoid='{"a":{"href":"./File:Foobar.jpg"}}'><img resource="./File:Foobar.jpg" src="//example.com/images/thumb/3/3a/Foobar.jpg/442px-Foobar.jpg" data-file-width="1941" data-file-height="220" data-file-type="bitmap" height="50" width="442" data-parsoid='{"a":{"resource":"./File:Foobar.jpg","height":"50","width":"442"},"sa":{"resource":"File:Foobar.jpg"}}'/></a></figure-inline></p>
16211 Parsoid-specific image handling - simple image with a formatted caption
16213 [[File:Foobar.jpg|<table><tr><td>a</td><td>b</td></tr><tr><td>c</td></tr></table>]]
16215 <p><figure-inline class="mw-default-size" typeof="mw:Image" data-parsoid='{"optList":[{"ck":"caption","ak":"<table><tr><td>a</td><td>b</td></tr><tr><td>c</td></tr></table>"}]}' data-mw='{"caption":"<table data-parsoid='{\"stx\":\"html\",\"dsr\":[18,81,7,8]}'><tbody data-parsoid='{\"dsr\":[25,73,0,0]}'><tr data-parsoid='{\"stx\":\"html\",\"dsr\":[25,54,4,5]}'><td data-parsoid='{\"stx\":\"html\",\"dsr\":[29,39,4,5]}'>a</td><td data-parsoid='{\"stx\":\"html\",\"dsr\":[39,49,4,5]}'>b</td></tr><tr data-parsoid='{\"stx\":\"html\",\"dsr\":[54,73,4,5]}'><td data-parsoid='{\"stx\":\"html\",\"dsr\":[58,68,4,5]}'>c</td></tr></tbody></table>"}'><a href="./File:Foobar.jpg" data-parsoid='{"a":{"href":"./File:Foobar.jpg"},"sa":{}}'><img resource="./File:Foobar.jpg" src="//example.com/images/3/3a/Foobar.jpg" data-file-width="1941" data-file-height="220" data-file-type="bitmap" height="220" width="1941" data-parsoid='{"a":{"resource":"./File:Foobar.jpg","height":"220","width":"1941"},"sa":{"resource":"File:Foobar.jpg"}}'/></a></figure-inline></p>
16219 Parsoid-specific image handling - caption with a template in it
16221 [[File:Foobar.jpg|thumb|200x23px|This caption has a {{echo|transclusion}} in it.]]
16223 <figure typeof="mw:Image/Thumb"><a href="./File:Foobar.jpg"><img resource="./File:Foobar.jpg" src="//example.com/images/thumb/3/3a/Foobar.jpg/200px-Foobar.jpg" data-file-width="1941" data-file-height="220" data-file-type="bitmap" height="23" width="200"></a><figcaption>This caption has a <span about="#mwt1" typeof="mw:Transclusion" data-mw="{"parts":[{"template":{"target":{"wt":"echo","href":"./Template:Echo"},"params":{"1":{"wt":"transclusion"}},"i":0}}]}">transclusion</span> in it.</figcaption></figure>
16227 Parsoid-specific image handling - caption with unbalanced tags in it
16229 parsoid=wt2html,wt2wt,html2html
16232 [[File:Foobar.jpg|thumb|200x200px|This caption has a <center>unbalanced tag in it.]]
16236 <figure typeof="mw:Image/Thumb"><a href="./File:Foobar.jpg"><img resource="./File:Foobar.jpg" src="//example.com/images/thumb/3/3a/Foobar.jpg/200px-Foobar.jpg" data-file-width="1941" data-file-height="220" data-file-type="bitmap" height="23" width="200"/></a><figcaption>This caption has a <center>unbalanced tag in it.</center></figcaption></figure>
16241 Parsoid-specific image handling - empty caption (1)
16243 parsoid=wt2html,wt2wt
16245 [[File:Foobar.jpg|thumb|]]
16247 <figure class="mw-default-size" typeof="mw:Image/Thumb"><a href="./File:Foobar.jpg"><img resource="./File:Foobar.jpg" src="//example.com/images/thumb/3/3a/Foobar.jpg/220px-Foobar.jpg" data-file-width="1941" data-file-height="220" data-file-type="bitmap" height="25" width="220"/></a><figcaption></figcaption></figure>
16250 # empty captions don't get serialized unless we're in the "round trip" case
16252 Parsoid-specific image handling - empty caption (2)
16256 <figure class="mw-default-size" typeof="mw:Image/Thumb">
16257 <a href="./File:Foobar.jpg">
16258 <img resource="./File:Foobar.jpg"
16259 src="//example.com/images/3/3a/Foobar.jpg"
16260 data-file-width="1941" data-file-height="220" data-file-type="bitmap"
16261 height="25" width="220"/>
16263 <figcaption></figcaption>
16266 [[File:Foobar.jpg|thumb]]
16270 Parsoid-specific image handling - whitespace caption
16272 [[File:Foobar.jpg|thumb| ]]
16274 <figure class="mw-default-size" typeof="mw:Image/Thumb"><a href="./File:Foobar.jpg"><img resource="./File:Foobar.jpg" src="//example.com/images/thumb/3/3a/Foobar.jpg/220px-Foobar.jpg" data-file-width="1941" data-file-height="220" data-file-type="bitmap" height="25" width="220"/></a><figcaption> </figcaption></figure>
16278 Parsoid-specific image handling - lang option
16281 [[File:Foobar.svg|lang=de|caption]]
16285 <figure-inline class="mw-default-size" typeof="mw:Image" data-mw='{"caption":"caption"}'><a href="./File:Foobar.svg"><img resource="./File:Foobar.svg" src="//example.com/images/f/ff/Foobar.svg" lang="de" data-file-width="240" data-file-height="180" data-file-type="drawing" height="180" width="240"/></a></figure-inline>
16289 ## Edge case bugs in Parsoid from T93580
16291 T93580: 1. Templated <ref> inside block images
16293 [[File:Foobar.jpg|thumb|Caption with templated ref: {{echo|<ref>foo</ref>}}]]
16297 <figure class="mw-default-size" typeof="mw:Image/Thumb" data-parsoid='{"optList":[{"ck":"thumbnail","ak":"thumb"},{"ck":"caption","ak":"Caption with templated ref: {{echo|<ref>foo</ref>}}"}]}'><a href="./File:Foobar.jpg" data-parsoid='{"a":{"href":"./File:Foobar.jpg"},"sa":{}}'><img resource="./File:Foobar.jpg" src="//example.com/images/thumb/3/3a/Foobar.jpg/220px-Foobar.jpg" data-file-width="1941" data-file-height="220" data-file-type="bitmap" height="25" width="220" data-parsoid='{"a":{"resource":"./File:Foobar.jpg","height":"25","width":"220"},"sa":{"resource":"File:Foobar.jpg"}}'/></a><figcaption>Caption with templated ref: <sup about="#mwt5" class="mw-ref" id="cite_ref-1" rel="dc:references" typeof="mw:Transclusion mw:Extension/ref" data-mw='{"parts":[{"template":{"target":{"wt":"echo","href":"./Template:Echo"},"params":{"1":{"wt":"<ref>foo</ref>"}},"i":0}}]}'><a href="./Main_Page#cite_note-1" style="counter-reset: mw-Ref 1;"><span class="mw-reflink-text">[1]</span></a></sup></figcaption></figure>
16299 <ol class="mw-references references" typeof="mw:Extension/references" about="#mwt6" data-mw='{"name":"references","attrs":{}}'><li about="#cite_note-1" id="cite_note-1"><a href="./Main_Page#cite_ref-1" rel="mw:referencedBy"><span class="mw-linkback-text">↑ </span></a> <span id="mw-reference-text-cite_note-1" class="mw-reference-text" data-parsoid="{}">foo</span></li></ol>
16303 T93580: 2. <ref> inside inline images
16305 [[File:Foobar.jpg|Undisplayed caption in inline image with ref: <ref>foo</ref>]]
16309 <p><figure-inline class="mw-default-size" typeof="mw:Image" data-parsoid='{"optList":[{"ck":"caption","ak":"Undisplayed caption in inline image with ref: <ref>foo</ref>"}]}' data-mw='{"caption":"Undisplayed caption in inline image with ref: <sup about=\"#mwt2\" class=\"mw-ref\" id=\"cite_ref-1\" rel=\"dc:references\" typeof=\"mw:Extension/ref\" data-parsoid='{\"dsr\":[64,78,5,6]}' data-mw='{\"name\":\"ref\",\"attrs\":{},\"body\":{\"id\":\"mw-reference-text-cite_note-1\"}}'><a href=\"./Main_Page#cite_note-1\" style=\"counter-reset: mw-Ref 1;\" data-parsoid=\"{}\"><span class=\"mw-reflink-text\" data-parsoid=\"{}\">[1]</span></a></sup>"}'><a href="./File:Foobar.jpg" data-parsoid='{"a":{"href":"./File:Foobar.jpg"},"sa":{"href":"File:Foobar.jpg"}}'><img resource="./File:Foobar.jpg" src="//example.com/images/3/3a/Foobar.jpg" data-file-width="1941" data-file-height="220" data-file-type="bitmap" height="220" width="1941" data-parsoid='{"a":{"resource":"./File:Foobar.jpg","height":"220","width":"1941"},"sa":{"resource":"File:Foobar.jpg"}}'/></a></figure-inline></p>
16311 <ol class="mw-references references" typeof="mw:Extension/references" about="#mwt4" data-mw='{"name":"references","attrs":{}}'><li about="#cite_note-1" id="cite_note-1"><a href="./Main_Page#cite_ref-1" rel="mw:referencedBy"><span class="mw-linkback-text">↑ </span></a> <span id="mw-reference-text-cite_note-1" class="mw-reference-text">foo</span></li></ol>
16315 T93580: 3. Templated <ref> inside inline images
16317 [[File:Foobar.jpg|Undisplayed caption in inline image with ref: {{echo|<ref>{{echo|foo}}</ref>}}]]
16321 <p><figure-inline class="mw-default-size" typeof="mw:Image" data-parsoid='{"optList":[{"ck":"caption","ak":"Undisplayed caption in inline image with ref: {{echo|<ref>{{echo|foo}}</ref>}}"}]}' data-mw='{"caption":"Undisplayed caption in inline image with ref: <sup about=\"#mwt2\" class=\"mw-ref\" id=\"cite_ref-1\" rel=\"dc:references\" typeof=\"mw:Transclusion mw:Extension/ref\" data-parsoid='{\"dsr\":[64,96,null,null],\"pi\":[[{\"k\":\"1\"}]]}' data-mw='{\"parts\":[{\"template\":{\"target\":{\"wt\":\"echo\",\"href\":\"./Template:Echo\"},\"params\":{\"1\":{\"wt\":\"&lt;ref>{{echo|foo}}&lt;/ref>\"}},\"i\":0}}]}'><a href=\"./Main_Page#cite_note-1\" style=\"counter-reset: mw-Ref 1;\" data-parsoid=\"{}\"><span class=\"mw-reflink-text\" data-parsoid=\"{}\">[1]</span></a></sup>"}'><a href="./File:Foobar.jpg" data-parsoid='{"a":{"href":"./File:Foobar.jpg"},"sa":{"href":"File:Foobar.jpg"}}'><img resource="./File:Foobar.jpg" src="//example.com/images/3/3a/Foobar.jpg" data-file-width="1941" data-file-height="220" data-file-type="bitmap" height="220" width="1941" data-parsoid='{"a":{"resource":"./File:Foobar.jpg","height":"220","width":"1941"},"sa":{"resource":"File:Foobar.jpg"}}'/></a></figure-inline></p>
16323 <ol class="mw-references references" typeof="mw:Extension/references" about="#mwt6" data-mw='{"name":"references","attrs":{}}'><li about="#cite_note-1" id="cite_note-1"><a href="./Main_Page#cite_ref-1" rel="mw:referencedBy"><span class="mw-linkback-text">↑ </span></a> <span id="mw-reference-text-cite_note-1" class="mw-reference-text">foo</span></li></ol>
16330 Subpage test/subpage
16338 subpage title=[[Subpage test]]
16342 <p><a href="/wiki/Subpage_test/subpage" title="Subpage test/subpage">/subpage</a>
16347 Subpage noslash link
16349 subpage title=[[Subpage test]]
16353 <p><a href="/wiki/Subpage_test/subpage" title="Subpage test/subpage">subpage</a>
16358 Subpage test/1/2/subpage
16364 Relative subpage noslash link
16366 parsoid=wt2wt,wt2html,html2html
16367 subpage title=[[Subpage test/1/2/3/4]]
16373 <p><a href="/wiki/Subpage_test/1/2/subpage" title="Subpage test/1/2/subpage">subpage</a>
16374 </p><p><a href="/wiki/Subpage_test/1/2/subpage" title="Subpage test/1/2/subpage">Subpage test/1/2/subpage</a>
16377 <p><a rel="mw:WikiLink" href="./Subpage_test/1/2/subpage" title="Subpage test/1/2/subpage">subpage</a></p>
16378 <p><a rel="mw:WikiLink" href="./Subpage_test/1/2/subpage" title="Subpage test/1/2/subpage">Subpage_test/1/2/subpage</a></p>
16382 Parsoid: dot-slash prefixed wikilinks
16392 </p><p>[[././baz/]]
16397 </p><p>[[././baz/]]
16402 Render invalid page names as plain text (T53090)
16414 [[foo[http://example.com]xyz]]
16416 [[{{echo|./../foo}}|bar]]
16417 [[{{echo|foo/.}}|bar]]
16418 [[{{echo|foo/..}}|bar]]
16419 [[{{echo|foo~~~~bar}}]]
16420 [[{{echo|foo>bar}}]]
16421 [[{{echo|foo././bar}}]]
16422 [[{{echo|foo{bar}}]]
16423 [[{{echo|foo}bar}}]]
16424 [[{{echo|foo[bar}}]]
16425 [[{{echo|foo]bar}}]]
16426 [[{{echo|foo<bar}}]]
16428 <p>[[./../foo|bar]]
16438 [[foo<a rel="nofollow" class="external autonumber" href="http://example.com">[1]</a>xyz]]
16439 </p><p>[[./../foo|bar]]
16452 <p>[[./../foo|bar]]
16462 [[foo<a rel="mw:ExtLink" class="external autonumber" href="http://example.com"></a>xyz]]</p>
16464 <p>[[<span typeof="mw:Transclusion" data-mw='{"parts":[{"template":{"target":{"wt":"echo","href":"./Template:Echo"},"params":{"1":{"wt":"./../foo"}},"i":0}}]}'>./../foo</span>|bar]]
16465 [[<span typeof="mw:Transclusion" data-mw='{"parts":[{"template":{"target":{"wt":"echo","href":"./Template:Echo"},"params":{"1":{"wt":"foo/."}},"i":0}}]}'>foo/.</span>|bar]]
16466 [[<span typeof="mw:Transclusion" data-mw='{"parts":[{"template":{"target":{"wt":"echo","href":"./Template:Echo"},"params":{"1":{"wt":"foo/.."}},"i":0}}]}'>foo/..</span>|bar]]
16467 [[<span typeof="mw:Transclusion" data-mw='{"parts":[{"template":{"target":{"wt":"echo","href":"./Template:Echo"},"params":{"1":{"wt":"foo~~~~bar"}},"i":0}}]}'>foo~~~~bar</span>]]
16468 [[<span typeof="mw:Transclusion" data-mw='{"parts":[{"template":{"target":{"wt":"echo","href":"./Template:Echo"},"params":{"1":{"wt":"foo>bar"}},"i":0}}]}'>foo>bar</span>]]
16469 [[<span typeof="mw:Transclusion" data-mw='{"parts":[{"template":{"target":{"wt":"echo","href":"./Template:Echo"},"params":{"1":{"wt":"foo././bar"}},"i":0}}]}'>foo././bar</span>]]
16470 [[<span typeof="mw:Transclusion" data-mw='{"parts":[{"template":{"target":{"wt":"echo","href":"./Template:Echo"},"params":{"1":{"wt":"foo{bar"}},"i":0}}]}'>foo{bar</span>]]
16471 [[<span typeof="mw:Transclusion" data-mw='{"parts":[{"template":{"target":{"wt":"echo","href":"./Template:Echo"},"params":{"1":{"wt":"foo}bar"}},"i":0}}]}'>foo}bar</span>]]
16472 [[<span typeof="mw:Transclusion" data-mw='{"parts":[{"template":{"target":{"wt":"echo","href":"./Template:Echo"},"params":{"1":{"wt":"foo[bar"}},"i":0}}]}'>foo[bar</span>]]
16473 [[<span typeof="mw:Transclusion" data-mw='{"parts":[{"template":{"target":{"wt":"echo","href":"./Template:Echo"},"params":{"1":{"wt":"foo]bar"}},"i":0}}]}'>foo]bar</span>]]
16474 [[<span typeof="mw:Transclusion" data-mw='{"parts":[{"template":{"target":{"wt":"echo","href":"./Template:Echo"},"params":{"1":{"wt":"foo<bar"}},"i":0}}]}'>foo<bar</span>]]</p>
16482 <p><a href="/index.php?title=/subpage&action=edit&redlink=1" class="new" title="/subpage (page does not exist)">/subpage</a>
16487 T2561: {{/Subpage}}
16489 subpage title=[[Page]]
16493 <p><a href="/index.php?title=Page/Subpage&action=edit&redlink=1" class="new" title="Page/Subpage (page does not exist)">Page/Subpage</a>
16501 Category:MediaWiki User's Guide
16509 [[:Category:MediaWiki User's Guide]]
16511 <p><a href="/wiki/Category:MediaWiki_User%27s_Guide" title="Category:MediaWiki User's Guide">Category:MediaWiki User's Guide</a>
16520 [[Category:MediaWiki User's Guide]]
16522 cat=MediaWiki_User's_Guide sort=
16524 <link rel="mw:PageProp/Category" href="./Category:MediaWiki_User's_Guide" data-parsoid='{"stx":"simple","a":{"href":"./Category:MediaWiki_User's_Guide"},"sa":{"href":"Category:MediaWiki User's Guide"}}'/>
16528 PAGESINCATEGORY invalid title fatal (r33546 fix)
16530 {{PAGESINCATEGORY:<bogus>}}
16537 Category with different sort key
16541 [[Category:MediaWiki User's Guide|Foo]]
16543 cat=MediaWiki_User's_Guide sort=Foo
16545 <link rel="mw:PageProp/Category" href="./Category:MediaWiki_User's_Guide#Foo" data-parsoid='{"stx":"piped","a":{"href":"./Category:MediaWiki_User's_Guide"},"sa":{"href":"Category:MediaWiki User's Guide"}}'/>
16549 Category with identical sort key
16553 [[Category:MediaWiki User's Guide|MediaWiki User's Guide]]
16555 cat=MediaWiki_User's_Guide sort=MediaWiki User's Guide
16557 <link rel="mw:PageProp/Category" href="./Category:MediaWiki_User's_Guide#MediaWiki%20User's%20Guide" data-parsoid='{"stx":"piped","a":{"href":"./Category:MediaWiki_User's_Guide"},"sa":{"href":"Category:MediaWiki User's Guide"}}'/>
16561 Category with empty sort key
16566 [[Category:MediaWiki User's Guide|]]
16568 [[Category:MediaWiki User's Guide|MediaWiki User's Guide]]
16572 Category with empty sort key and parentheses
16577 [[Category:Foo (bar)|]]
16579 [[Category:Foo (bar)|Foo]]
16583 Category with link tail
16588 123[[Category:Foo]]456
16590 123[[Category:Foo]]456
16594 Category with template
16599 [[Category:{{echo|Foo}}]]
16601 [[Category:{{echo|Foo}}]]
16605 Category with template in sort key
16610 [[Category:Foo|{{echo|Bar}}]]
16612 [[Category:Foo|{{echo|Bar}}]]
16616 Category with template in sort key and title
16621 [[Category:{{echo|Foo}}|{{echo|Bar}}]]
16623 [[Category:{{echo|Foo}}|{{echo|Bar}}]]
16626 ## We used to, but no longer wt2wt this test since the default serializer
16627 ## will normalize all categories to serialize on their own line.
16628 ## This wikitext usage is going to be fairly uncommon in production and
16629 ## selser will take care of preserving formatting in those scenarios.
16631 Category / paragraph interactions
16635 Foo [[Category:Baz]] Bar
16637 Foo [[Category:Baz]]
16645 [[Category:Baz]] Bar
16658 {{echo|[[Category:Baz]]}}
16671 <p>Foo <link rel="mw:PageProp/Category" href="./Category:Baz"/> Bar</p>
16672 <p>Foo <link rel="mw:PageProp/Category" href="./Category:Baz"/> Bar</p>
16673 <p>Foo <link rel="mw:PageProp/Category" href="./Category:Baz"/> Bar</p>
16674 <p>Foo <link rel="mw:PageProp/Category" href="./Category:Baz"/> Bar</p>
16675 <p>Foo <link rel="mw:PageProp/Category" href="./Category:Baz"/> <link rel="mw:PageProp/Category" href="./Category:Baz"/> <link rel="mw:PageProp/Category" href="./Category:Baz"/> Bar</p>
16676 <link rel="mw:PageProp/Category" href="./Category:Baz"/> <link rel="mw:PageProp/Category" href="./Category:Baz"/> <link rel="mw:PageProp/Category" href="./Category:Baz"/> <link rel="mw:PageProp/Category" href="./Category:Baz"/> <link rel="mw:PageProp/Category" href="./Category:Baz" typeof="mw:Transclusion" data-mw='{"parts":[{"template":{"target":{"wt":"echo","href":"./Template:Echo"},"params":{"1":{"wt":"[[Category:Baz]]"}},"i":0}}]}'/>
16677 <link rel="mw:PageProp/Category" href="./Category:Baz"/>
16680 ## We used to, but no longer wt2wt this test since the default serializer
16681 ## will normalize all categories to serialize on their own line.
16682 ## This wikitext usage is going to be fairly uncommon in production and
16683 ## selser will take care of preserving formatting in those scenarios.
16685 ## The whitespace on the empty line is part of the test. Please do not delete
16687 1. Categories and newlines: All preceding newlines should be suppressed (courtesy T2087)
16693 [[Category:Foo]] and this should be part of same paragraph (not an indent-pre)
16695 {{echo|[[Category:Foo]] and so should this!}}
16697 <p>This and this should be part of same paragraph (not an indent-pre) and so should this!
16702 <link rel="mw:PageProp/Category" href="./Category:Foo"/> and this should be part of same paragraph (not an indent-pre)
16704 <link rel="mw:PageProp/Category" href="./Category:Foo" about="#mwt1" typeof="mw:Transclusion" data-mw='{"parts":[{"template":{"target":{"wt":"echo","href":"./Template:Echo"},"params":{"1":{"wt":"[[Category:Foo]] and so should this!"}},"i":0}}]}'/><span about="#mwt1"> and so should this!</span></p>
16707 ## Parsoid will not try to wt2wt this while preserving newlines because
16708 ## it suppresses excess newlines within list items -- and we don't want to
16709 ## introduce a special case just for categories, which is, in reality somewhat
16710 ## odd behavior -- categories are unlikely to be used in list items like this
16711 ## in top-level pages and are only likely to show up in template-generated
16712 ## list items where this RT-ing is a non-issue.
16714 ## The whitespace on the empty line is part of the test. Please do not delete
16716 2. Categories and newlines: All preceding newlines should be suppressed (courtesy T2087)
16722 [[Category:Foo]] and this should be part of the same list item
16725 {{echo|[[Category:Foo]] and this should be part of the same list item}}
16727 <ul><li>This and this should be part of the same list item</li>
16728 <li>So should this and this should be part of the same list item</li></ul>
16731 <li>This <link rel="mw:PageProp/Category" href="./Category:Foo"/> and this should be part of the same list item</li>
16732 <li>So should this <link rel="mw:PageProp/Category" href="./Category:Foo" typeof="mw:Transclusion" data-mw='{"parts":[{"template":{"target":{"wt":"echo","href":"./Template:Echo"},"params":{"1":{"wt":"[[Category:Foo]] and this should be part of the same list item"}},"i":0}}]}'/><span> and this should be part of the same list item</span></li>
16736 ## Newlines and categories that follow the last item of a list
16737 ## are treated differently because this (list followed by categories)
16738 ## is an extremely common pattern on wikis.
16740 3. Categories and newlines: newline suppression for last list item should RT properly
16761 <link rel="mw:PageProp/Category" href="./Category:Foo"/>
16763 <link rel="mw:PageProp/Category" href="./Category:Bar"/>
16764 <link rel="mw:PageProp/Category" href="./Category:Baz"/>
16766 <dl><dd>c</dd></dl>
16768 <link rel="mw:PageProp/Category" href="./Category:C"/>
16770 <dl><dt>d</dt></dl>
16772 <link rel="mw:PageProp/Category" href="./Category:D"/>
16776 4. Categories and newlines: newline suppression for last list item should RT properly
16784 <ul><li><ul><li><ul><li>b</li></ul></li></ul></li></ul></li></ul>
16786 <link rel="mw:PageProp/Category" href="./Category:Foo" data-parsoid='{"stx":"simple","a":{"href":"./Category:Foo"},"sa":{"href":"Category:Foo"}}'/>
16789 ## only wt2html for this to make sure the algo only applies to the rightmost path
16791 5. Categories and newlines: migrateTrailingCategories dom pass should only run on the rightmost path of nested lists
16804 <link rel="mw:PageProp/Category" href="./Category:Foo" data-parsoid='{"stx":"simple","a":{"href":"./Category:Foo"},"sa":{"href":"Category:Foo"}}'/></li></ul></li>
16806 <ul><li>d</li></ul></li></ul>
16807 <link rel="mw:PageProp/Category" href="./Category:Foo" data-parsoid='{"stx":"simple","a":{"href":"./Category:Foo"},"sa":{"href":"Category:Foo"}}'/>
16810 ## We used to, but no longer wt2wt this test since the default serializer
16811 ## will normalize all categories to serialize on their own line.
16812 ## This wikitext usage is going to be fairly uncommon in production and
16813 ## selser will take care of preserving formatting in those scenarios.
16815 6. Categories and newlines: migrateTrailingCategories dom pass should not migrate categories not preceded by newlines
16819 *a [[Category:Foo]]
16821 <ul><li>a<link rel="mw:PageProp/Category" href="./Category:Foo" data-parsoid='{"stx":"simple","a":{"href":"./Category:Foo"},"sa":{"href":"Category:Foo"}}'/></li></ul>
16824 # This test also demonstrates because of newline+category tunneling
16825 # through the list hander, template wrapping doesn't expand to the
16826 # containing list when the list item swallows the category.
16828 7. Categories and newlines: migrateTrailingCategories dom pass should leave template content alone
16833 <ul><li><span about="#mwt1" typeof="mw:Transclusion" data-parsoid='{"pi":[[{"k":"1"}]]}' data-mw='{"parts":[{"template":{"target":{"wt":"echo","href":"./Template:Echo"},"params":{"1":{"wt":"a\n[[Category:Foo]]"}},"i":0}}]}'>a
16834 </span><link rel="mw:PageProp/Category" href="./Category:Foo" about="#mwt1" data-parsoid='{"stx":"simple","a":{"href":"./Category:Foo"},"sa":{"href":"Category:Foo"}}'/></li></ul>
16838 8. Categories and newlines: migrateTrailingCategories dom pass should not get tripped by intervening templates
16842 {{echo|[[Category:Foo]]
16846 <ul><li>a</li></ul>
16848 <link rel="mw:PageProp/Category" href="./Category:Foo" about="#mwt1" typeof="mw:Transclusion" data-parsoid='{"stx":"simple","a":{"href":"./Category:Foo"},"sa":{"href":"Category:Foo"},"pi":[[{"k":"1"}]]}' data-mw='{"parts":[{"template":{"target":{"wt":"echo","href":"./Template:Echo"},"params":{"1":{"wt":"[[Category:Foo]]\n[[Category:Bar]]"}},"i":0}}]}'/><span about="#mwt1">
16849 </span><link rel="mw:PageProp/Category" href="./Category:Bar" about="#mwt1" data-parsoid='{"stx":"simple","a":{"href":"./Category:Bar"},"sa":{"href":"Category:Bar"}}'/>
16850 <link rel="mw:PageProp/Category" href="./Category:Baz" data-parsoid='{"stx":"simple","a":{"href":"./Category:Baz"},"sa":{"href":"Category:Baz"}}'/>
16854 Categories and newlines: migrateTrailingCategories dom pass should not get tripped by comments and whitespace
16858 [[Category:Bar]]<!--boo1--> <!--boo2-->
16859 [[Category:Baz]]<!--boo3--> <!--boo4-->
16861 <ul><li>a</li></ul>
16863 <link rel="mw:PageProp/Category" href="./Category:Bar"/><!--boo1--> <!--boo2-->
16864 <link rel="mw:PageProp/Category" href="./Category:Baz"/><!--boo3--> <!--boo4-->
16868 Categories and newlines: should behave properly with linkprefix (T87753)
16883 <link rel="mw:PageProp/Category" href="./تصنيف:Foo"/>
16884 <link rel="mw:PageProp/Category" href="./تصنيف:Bar"/>
16888 No regressions on internal links following category (T174639)
16890 parsoid=wt2html,html2html
16892 [[Category:Foo]]<div>a
16897 <a href="/wiki/Foo" title="Foo">Foo</a></div>
16900 <link rel="mw:PageProp/Category" href="./Category:Foo"/><div>a
16902 <a rel="mw:WikiLink" href="./Foo" title="Foo">Foo</a></div>
16905 # Note that Parsoid differs slightly from PHP due to T175421
16907 11. Special case where only newlines separate links (T175416)
16909 parsoid=wt2html,html2html
16913 [[Foo]][[es:Alimento]]
16918 <a href="/wiki/Foo" title="Foo">Foo</a>
16919 </p><p><a href="/wiki/Foo" title="Foo">Foo</a>
16922 <link rel="mw:PageProp/Category" href="./Category:Foo"/>
16924 <p><a rel="mw:WikiLink" href="./Foo" title="Foo">Foo</a></p><link rel="mw:PageProp/Language" href="http://es.wikipedia.org/wiki/Alimento"/>
16926 <p><a rel="mw:WikiLink" href="./Foo" title="Foo">Foo</a></p>
16930 Category links with multiple namespaces
16932 [[Category:Project:Foo]]
16934 <link rel="mw:PageProp/Category" href="./Category:Project:Foo" />
16938 Parsoid: Serialize link to category page with colon escape
16944 [[:Category:Foo|Bar]]
16947 <a rel="mw:WikiLink" href="./Category:Foo" title="Category:Foo">Category:Foo</a>
16948 <a rel="mw:WikiLink" href="./Category:Foo" title="Category:Foo">Bar</a>
16952 # We used to, but no longer wt2wt this test since the default serializer
16953 # will normalize all categories to serialize on their own line.
16954 # This wikitext usage is going to be fairly uncommon in production and
16955 # selser will take care of preventing whitespace insertion if this
16956 # occurs in an article.
16958 # html2html disabled for the same reason (whitespace insertion between
16961 # html2wt disabled because it localizes the "Category" namespace.
16963 Link prefix/suffixes aren't applied to category links
16973 <p>x<link rel="mw:PageProp/Category" href="./Flokkur:Foo" data-parsoid=""/>y</p>
16977 Link prefix/suffixes aren't applied to language links
16987 <p>x<link rel="mw:PageProp/Language" href="http://es.wikipedia.org/wiki/Foo" data-parsoid=""/>y</p>
16991 Parsoid: Serialize link to file page with colon escape
16997 [[:File:Foo.png|Bar]]
17000 <a rel="mw:WikiLink" href="./File:Foo.png" title="File:Foo.png">File:Foo.png</a>
17001 <a rel="mw:WikiLink" href="./File:Foo.png" title="File:Foo.png">Bar</a>
17006 Parsoid: Serialize a genuine category link without colon escape
17011 [[Category:Foo|Bar]]
17013 <link rel="mw:PageProp/Category" href="./Category:Foo">
17014 <link rel="mw:PageProp/Category" href="./Category:Foo#Bar">
17018 Normalize hrefs properly before testing for invalid link targets (T72894)
17022 <link rel="mw:PageProp/Category" href="./Category:Toxine_bactérienne"/>
17024 [[Category:Toxine bactérienne]]
17028 Parsoid: Defaultsort
17030 {{DEFAULTSORT:Foo}}
17032 <meta property="mw:PageProp/categorydefaultsort" content="Foo"/>
17035 # NOTE: mw:ExpandedAttrs is not the best typeof here. mw:Transclusion is better.
17036 # But, this is a limitation of our representation and is documented in
17037 # TemplateHandler.js in processSpecialMagicWord
17039 Parsoid: Defaultsort (template-generated)
17041 {{{{echo|DEFAULTSORT}}:Foo}}
17043 <meta property="mw:PageProp/categorydefaultsort" content="Foo" about="#mwt3" typeof="mw:ExpandedAttrs" data-parsoid='{"src":"{{{{echo|DEFAULTSORT}}:Foo}}","dsr":[0,26,null,null]}' data-mw='{"attribs":[[{"txt":"content"},{"html":"<span about=\"#mwt1\" typeof=\"mw:Transclusion\" data-parsoid='{\"pi\":[[{\"k\":\"1\"}]],\"dsr\":[2,22,null,null]}' data-mw='{\"parts\":[{\"template\":{\"target\":{\"wt\":\"echo\",\"href\":\"./Template:Echo\"},\"params\":{\"1\":{\"wt\":\"DEFAULTSORT\"}},\"i\":0}}]}'>DEFAULTSORT</span>:Foo"}]]}'/>
17047 ### Inter-language links
17050 Interlanguage links
17058 es:Alimento fr:Nourriture zh:食品
17060 <link rel="mw:PageProp/Language" href="http://es.wikipedia.org/wiki/Alimento"/>
17061 <link rel="mw:PageProp/Language" href="http://fr.wikipedia.org/wiki/Nourriture"/>
17062 <link rel="mw:PageProp/Language" href="http://zh.wikipedia.org/wiki/食品"/>
17066 Duplicate interlanguage links (T26502)
17077 <link rel="mw:PageProp/Language" href="http://es.wikipedia.org/wiki/1"/>
17078 <link rel="mw:PageProp/Language" href="http://es.wikipedia.org/wiki/2"/>
17079 <link rel="mw:PageProp/Language" href="http://fr.wikipedia.org/wiki/1"/>
17080 <link rel="mw:PageProp/Language" href="http://fr.wikipedia.org/wiki/2"/>
17087 Basic section headings
17094 ===Smaller headline===
17097 <h2><span class="mw-headline" id="Headline_1">Headline 1</span><span class="mw-editsection"><span class="mw-editsection-bracket">[</span><a href="/index.php?title=Parser_test&action=edit&section=1" title="Edit section: Headline 1">edit</a><span class="mw-editsection-bracket">]</span></span></h2>
17100 <h2><span class="mw-headline" id="Headline_2">Headline 2</span><span class="mw-editsection"><span class="mw-editsection-bracket">[</span><a href="/index.php?title=Parser_test&action=edit&section=2" title="Edit section: Headline 2">edit</a><span class="mw-editsection-bracket">]</span></span></h2>
17103 <h3><span class="mw-headline" id="Smaller_headline">Smaller headline</span><span class="mw-editsection"><span class="mw-editsection-bracket">[</span><a href="/index.php?title=Parser_test&action=edit&section=3" title="Edit section: Smaller headline">edit</a><span class="mw-editsection-bracket">]</span></span></h3>
17109 Section headings with TOC
17112 ===Subheadline 1===
17113 =====Skipping a level=====
17114 ======Skipping a level======
17118 ===Another headline===
17120 <div id="toc" class="toc"><input type="checkbox" role="button" id="toctogglecheckbox" class="toctogglecheckbox" style="display:none"/><div class="toctitle" lang="en" dir="ltr"><h2>Contents</h2><span class="toctogglespan"><label class="toctogglelabel" for="toctogglecheckbox"></label></span></div>
17122 <li class="toclevel-1 tocsection-1"><a href="#Headline_1"><span class="tocnumber">1</span> <span class="toctext">Headline 1</span></a>
17124 <li class="toclevel-2 tocsection-2"><a href="#Subheadline_1"><span class="tocnumber">1.1</span> <span class="toctext">Subheadline 1</span></a>
17126 <li class="toclevel-3 tocsection-3"><a href="#Skipping_a_level"><span class="tocnumber">1.1.1</span> <span class="toctext">Skipping a level</span></a>
17128 <li class="toclevel-4 tocsection-4"><a href="#Skipping_a_level_2"><span class="tocnumber">1.1.1.1</span> <span class="toctext">Skipping a level</span></a></li>
17135 <li class="toclevel-1 tocsection-5"><a href="#Headline_2"><span class="tocnumber">2</span> <span class="toctext">Headline 2</span></a>
17137 <li class="toclevel-2 tocsection-6"><a href="#Another_headline"><span class="tocnumber">2.1</span> <span class="toctext">Another headline</span></a></li>
17143 <h2><span class="mw-headline" id="Headline_1">Headline 1</span><span class="mw-editsection"><span class="mw-editsection-bracket">[</span><a href="/index.php?title=Parser_test&action=edit&section=1" title="Edit section: Headline 1">edit</a><span class="mw-editsection-bracket">]</span></span></h2>
17144 <h3><span class="mw-headline" id="Subheadline_1">Subheadline 1</span><span class="mw-editsection"><span class="mw-editsection-bracket">[</span><a href="/index.php?title=Parser_test&action=edit&section=2" title="Edit section: Subheadline 1">edit</a><span class="mw-editsection-bracket">]</span></span></h3>
17145 <h5><span class="mw-headline" id="Skipping_a_level">Skipping a level</span><span class="mw-editsection"><span class="mw-editsection-bracket">[</span><a href="/index.php?title=Parser_test&action=edit&section=3" title="Edit section: Skipping a level">edit</a><span class="mw-editsection-bracket">]</span></span></h5>
17146 <h6><span class="mw-headline" id="Skipping_a_level_2">Skipping a level</span><span class="mw-editsection"><span class="mw-editsection-bracket">[</span><a href="/index.php?title=Parser_test&action=edit&section=4" title="Edit section: Skipping a level">edit</a><span class="mw-editsection-bracket">]</span></span></h6>
17147 <h2><span class="mw-headline" id="Headline_2">Headline 2</span><span class="mw-editsection"><span class="mw-editsection-bracket">[</span><a href="/index.php?title=Parser_test&action=edit&section=5" title="Edit section: Headline 2">edit</a><span class="mw-editsection-bracket">]</span></span></h2>
17150 <h3><span class="mw-headline" id="Another_headline">Another headline</span><span class="mw-editsection"><span class="mw-editsection-bracket">[</span><a href="/index.php?title=Parser_test&action=edit&section=6" title="Edit section: Another headline">edit</a><span class="mw-editsection-bracket">]</span></span></h3>
17155 TOC anchors don't collide
17163 <div id="toc" class="toc"><input type="checkbox" role="button" id="toctogglecheckbox" class="toctogglecheckbox" style="display:none"/><div class="toctitle" lang="en" dir="ltr"><h2>Contents</h2><span class="toctogglespan"><label class="toctogglelabel" for="toctogglecheckbox"></label></span></div>
17165 <li class="toclevel-1 tocsection-1"><a href="#Headline_2"><span class="tocnumber">1</span> <span class="toctext">Headline 2</span></a></li>
17166 <li class="toclevel-1 tocsection-2"><a href="#Headline"><span class="tocnumber">2</span> <span class="toctext">Headline</span></a></li>
17167 <li class="toclevel-1 tocsection-3"><a href="#Headline_2_2"><span class="tocnumber">3</span> <span class="toctext">Headline 2</span></a></li>
17168 <li class="toclevel-1 tocsection-4"><a href="#Headline_3"><span class="tocnumber">4</span> <span class="toctext">Headline</span></a></li>
17172 <h2><span class="mw-headline" id="Headline_2">Headline 2</span><span class="mw-editsection"><span class="mw-editsection-bracket">[</span><a href="/index.php?title=Parser_test&action=edit&section=1" title="Edit section: Headline 2">edit</a><span class="mw-editsection-bracket">]</span></span></h2>
17173 <h2><span class="mw-headline" id="Headline">Headline</span><span class="mw-editsection"><span class="mw-editsection-bracket">[</span><a href="/index.php?title=Parser_test&action=edit&section=2" title="Edit section: Headline">edit</a><span class="mw-editsection-bracket">]</span></span></h2>
17174 <h2><span class="mw-headline" id="Headline_2_2">Headline 2</span><span class="mw-editsection"><span class="mw-editsection-bracket">[</span><a href="/index.php?title=Parser_test&action=edit&section=3" title="Edit section: Headline 2">edit</a><span class="mw-editsection-bracket">]</span></span></h2>
17175 <h2><span class="mw-headline" id="Headline_3">Headline</span><span class="mw-editsection"><span class="mw-editsection-bracket">[</span><a href="/index.php?title=Parser_test&action=edit&section=4" title="Edit section: Headline">edit</a><span class="mw-editsection-bracket">]</span></span></h2>
17179 # perl -e 'print "="x$_," Level $_ heading","="x$_,"\n" for 1..10'
17180 # Parsoid html2wt direction adds <nowiki> for level 7 and up.
17182 Handling of sections up to level 6 and beyond
17187 ==Level 2 Heading==
17188 ===Level 3 Heading===
17189 ====Level 4 Heading====
17190 =====Level 5 Heading=====
17191 ======Level 6 Heading======
17192 =======Level 7 Heading=======
17193 ========Level 8 Heading========
17194 =========Level 9 Heading=========
17195 ==========Level 10 Heading==========
17197 <div id="toc" class="toc"><input type="checkbox" role="button" id="toctogglecheckbox" class="toctogglecheckbox" style="display:none"/><div class="toctitle" lang="en" dir="ltr"><h2>Contents</h2><span class="toctogglespan"><label class="toctogglelabel" for="toctogglecheckbox"></label></span></div>
17199 <li class="toclevel-1 tocsection-1"><a href="#Level_1_Heading"><span class="tocnumber">1</span> <span class="toctext">Level 1 Heading</span></a>
17201 <li class="toclevel-2 tocsection-2"><a href="#Level_2_Heading"><span class="tocnumber">1.1</span> <span class="toctext">Level 2 Heading</span></a>
17203 <li class="toclevel-3 tocsection-3"><a href="#Level_3_Heading"><span class="tocnumber">1.1.1</span> <span class="toctext">Level 3 Heading</span></a>
17205 <li class="toclevel-4 tocsection-4"><a href="#Level_4_Heading"><span class="tocnumber">1.1.1.1</span> <span class="toctext">Level 4 Heading</span></a>
17207 <li class="toclevel-5 tocsection-5"><a href="#Level_5_Heading"><span class="tocnumber">1.1.1.1.1</span> <span class="toctext">Level 5 Heading</span></a>
17209 <li class="toclevel-6 tocsection-6"><a href="#Level_6_Heading"><span class="tocnumber">1.1.1.1.1.1</span> <span class="toctext">Level 6 Heading</span></a></li>
17210 <li class="toclevel-6 tocsection-7"><a href="#.3DLevel_7_Heading.3D"><span class="tocnumber">1.1.1.1.1.2</span> <span class="toctext">=Level 7 Heading=</span></a></li>
17211 <li class="toclevel-6 tocsection-8"><a href="#.3D.3DLevel_8_Heading.3D.3D"><span class="tocnumber">1.1.1.1.1.3</span> <span class="toctext">==Level 8 Heading==</span></a></li>
17212 <li class="toclevel-6 tocsection-9"><a href="#.3D.3D.3DLevel_9_Heading.3D.3D.3D"><span class="tocnumber">1.1.1.1.1.4</span> <span class="toctext">===Level 9 Heading===</span></a></li>
17213 <li class="toclevel-6 tocsection-10"><a href="#.3D.3D.3D.3DLevel_10_Heading.3D.3D.3D.3D"><span class="tocnumber">1.1.1.1.1.5</span> <span class="toctext">====Level 10 Heading====</span></a></li>
17227 <h1><span class="mw-headline" id="Level_1_Heading">Level 1 Heading</span><span class="mw-editsection"><span class="mw-editsection-bracket">[</span><a href="/index.php?title=Parser_test&action=edit&section=1" title="Edit section: Level 1 Heading">edit</a><span class="mw-editsection-bracket">]</span></span></h1>
17228 <h2><span class="mw-headline" id="Level_2_Heading">Level 2 Heading</span><span class="mw-editsection"><span class="mw-editsection-bracket">[</span><a href="/index.php?title=Parser_test&action=edit&section=2" title="Edit section: Level 2 Heading">edit</a><span class="mw-editsection-bracket">]</span></span></h2>
17229 <h3><span class="mw-headline" id="Level_3_Heading">Level 3 Heading</span><span class="mw-editsection"><span class="mw-editsection-bracket">[</span><a href="/index.php?title=Parser_test&action=edit&section=3" title="Edit section: Level 3 Heading">edit</a><span class="mw-editsection-bracket">]</span></span></h3>
17230 <h4><span class="mw-headline" id="Level_4_Heading">Level 4 Heading</span><span class="mw-editsection"><span class="mw-editsection-bracket">[</span><a href="/index.php?title=Parser_test&action=edit&section=4" title="Edit section: Level 4 Heading">edit</a><span class="mw-editsection-bracket">]</span></span></h4>
17231 <h5><span class="mw-headline" id="Level_5_Heading">Level 5 Heading</span><span class="mw-editsection"><span class="mw-editsection-bracket">[</span><a href="/index.php?title=Parser_test&action=edit&section=5" title="Edit section: Level 5 Heading">edit</a><span class="mw-editsection-bracket">]</span></span></h5>
17232 <h6><span class="mw-headline" id="Level_6_Heading">Level 6 Heading</span><span class="mw-editsection"><span class="mw-editsection-bracket">[</span><a href="/index.php?title=Parser_test&action=edit&section=6" title="Edit section: Level 6 Heading">edit</a><span class="mw-editsection-bracket">]</span></span></h6>
17233 <h6><span class="mw-headline" id=".3DLevel_7_Heading.3D">=Level 7 Heading=</span><span class="mw-editsection"><span class="mw-editsection-bracket">[</span><a href="/index.php?title=Parser_test&action=edit&section=7" title="Edit section: =Level 7 Heading=">edit</a><span class="mw-editsection-bracket">]</span></span></h6>
17234 <h6><span class="mw-headline" id=".3D.3DLevel_8_Heading.3D.3D">==Level 8 Heading==</span><span class="mw-editsection"><span class="mw-editsection-bracket">[</span><a href="/index.php?title=Parser_test&action=edit&section=8" title="Edit section: ==Level 8 Heading==">edit</a><span class="mw-editsection-bracket">]</span></span></h6>
17235 <h6><span class="mw-headline" id=".3D.3D.3DLevel_9_Heading.3D.3D.3D">===Level 9 Heading===</span><span class="mw-editsection"><span class="mw-editsection-bracket">[</span><a href="/index.php?title=Parser_test&action=edit&section=9" title="Edit section: ===Level 9 Heading===">edit</a><span class="mw-editsection-bracket">]</span></span></h6>
17236 <h6><span class="mw-headline" id=".3D.3D.3D.3DLevel_10_Heading.3D.3D.3D.3D">====Level 10 Heading====</span><span class="mw-editsection"><span class="mw-editsection-bracket">[</span><a href="/index.php?title=Parser_test&action=edit&section=10" title="Edit section: ====Level 10 Heading====">edit</a><span class="mw-editsection-bracket">]</span></span></h6>
17239 <h1 id="Level_1_Heading" data-parsoid='{}'>Level 1 Heading</h1>
17240 <h2 id="Level_2_Heading" data-parsoid='{}'>Level 2 Heading</h2>
17241 <h3 id="Level_3_Heading" data-parsoid='{}'>Level 3 Heading</h3>
17242 <h4 id="Level_4_Heading" data-parsoid='{}'>Level 4 Heading</h4>
17243 <h5 id="Level_5_Heading" data-parsoid='{}'>Level 5 Heading</h5>
17244 <h6 id="Level_6_Heading" data-parsoid='{}'>Level 6 Heading</h6>
17245 <h6 id="=Level_7_Heading=" data-parsoid='{}'><span id=".3DLevel_7_Heading.3D" typeof="mw:FallbackId"></span>=Level 7 Heading=</h6>
17246 <h6 id="==Level_8_Heading==" data-parsoid='{}'><span id=".3D.3DLevel_8_Heading.3D.3D" typeof="mw:FallbackId"></span>==Level 8 Heading==</h6>
17247 <h6 id="===Level_9_Heading===" data-parsoid='{}'><span id=".3D.3D.3DLevel_9_Heading.3D.3D.3D" typeof="mw:FallbackId"></span>===Level 9 Heading===</h6>
17248 <h6 id="====Level_10_Heading====" data-parsoid='{}'><span id=".3D.3D.3D.3DLevel_10_Heading.3D.3D.3D.3D" typeof="mw:FallbackId"></span>====Level 10 Heading====</h6>
17252 TOC regression (T11764)
17256 ====title 1.1.1====
17261 <div id="toc" class="toc"><input type="checkbox" role="button" id="toctogglecheckbox" class="toctogglecheckbox" style="display:none"/><div class="toctitle" lang="en" dir="ltr"><h2>Contents</h2><span class="toctogglespan"><label class="toctogglelabel" for="toctogglecheckbox"></label></span></div>
17263 <li class="toclevel-1 tocsection-1"><a href="#title_1"><span class="tocnumber">1</span> <span class="toctext">title 1</span></a>
17265 <li class="toclevel-2 tocsection-2"><a href="#title_1.1"><span class="tocnumber">1.1</span> <span class="toctext">title 1.1</span></a>
17267 <li class="toclevel-3 tocsection-3"><a href="#title_1.1.1"><span class="tocnumber">1.1.1</span> <span class="toctext">title 1.1.1</span></a></li>
17270 <li class="toclevel-2 tocsection-4"><a href="#title_1.2"><span class="tocnumber">1.2</span> <span class="toctext">title 1.2</span></a></li>
17273 <li class="toclevel-1 tocsection-5"><a href="#title_2"><span class="tocnumber">2</span> <span class="toctext">title 2</span></a>
17275 <li class="toclevel-2 tocsection-6"><a href="#title_2.1"><span class="tocnumber">2.1</span> <span class="toctext">title 2.1</span></a></li>
17281 <h2><span class="mw-headline" id="title_1">title 1</span><span class="mw-editsection"><span class="mw-editsection-bracket">[</span><a href="/index.php?title=Parser_test&action=edit&section=1" title="Edit section: title 1">edit</a><span class="mw-editsection-bracket">]</span></span></h2>
17282 <h3><span class="mw-headline" id="title_1.1">title 1.1</span><span class="mw-editsection"><span class="mw-editsection-bracket">[</span><a href="/index.php?title=Parser_test&action=edit&section=2" title="Edit section: title 1.1">edit</a><span class="mw-editsection-bracket">]</span></span></h3>
17283 <h4><span class="mw-headline" id="title_1.1.1">title 1.1.1</span><span class="mw-editsection"><span class="mw-editsection-bracket">[</span><a href="/index.php?title=Parser_test&action=edit&section=3" title="Edit section: title 1.1.1">edit</a><span class="mw-editsection-bracket">]</span></span></h4>
17284 <h3><span class="mw-headline" id="title_1.2">title 1.2</span><span class="mw-editsection"><span class="mw-editsection-bracket">[</span><a href="/index.php?title=Parser_test&action=edit&section=4" title="Edit section: title 1.2">edit</a><span class="mw-editsection-bracket">]</span></span></h3>
17285 <h2><span class="mw-headline" id="title_2">title 2</span><span class="mw-editsection"><span class="mw-editsection-bracket">[</span><a href="/index.php?title=Parser_test&action=edit&section=5" title="Edit section: title 2">edit</a><span class="mw-editsection-bracket">]</span></span></h2>
17286 <h3><span class="mw-headline" id="title_2.1">title 2.1</span><span class="mw-editsection"><span class="mw-editsection-bracket">[</span><a href="/index.php?title=Parser_test&action=edit&section=6" title="Edit section: title 2.1">edit</a><span class="mw-editsection-bracket">]</span></span></h3>
17291 TOC for heading containing <span id="..."></span> (T96153)
17294 ==<span id="old-anchor"></span>New title==
17296 <div id="toc" class="toc"><input type="checkbox" role="button" id="toctogglecheckbox" class="toctogglecheckbox" style="display:none"/><div class="toctitle" lang="en" dir="ltr"><h2>Contents</h2><span class="toctogglespan"><label class="toctogglelabel" for="toctogglecheckbox"></label></span></div>
17298 <li class="toclevel-1 tocsection-1"><a href="#New_title"><span class="tocnumber">1</span> <span class="toctext">New title</span></a></li>
17302 <h2><span class="mw-headline" id="New_title"><span id="old-anchor"></span>New title</span><span class="mw-editsection"><span class="mw-editsection-bracket">[</span><a href="/index.php?title=Parser_test&action=edit&section=1" title="Edit section: New title">edit</a><span class="mw-editsection-bracket">]</span></span></h2>
17307 TOC with wgMaxTocLevel=3 (T8204)
17313 ====title 1.1.1====
17318 <div id="toc" class="toc"><input type="checkbox" role="button" id="toctogglecheckbox" class="toctogglecheckbox" style="display:none"/><div class="toctitle" lang="en" dir="ltr"><h2>Contents</h2><span class="toctogglespan"><label class="toctogglelabel" for="toctogglecheckbox"></label></span></div>
17320 <li class="toclevel-1 tocsection-1"><a href="#title_1"><span class="tocnumber">1</span> <span class="toctext">title 1</span></a>
17322 <li class="toclevel-2 tocsection-2"><a href="#title_1.1"><span class="tocnumber">1.1</span> <span class="toctext">title 1.1</span></a></li>
17323 <li class="toclevel-2 tocsection-4"><a href="#title_1.2"><span class="tocnumber">1.2</span> <span class="toctext">title 1.2</span></a></li>
17326 <li class="toclevel-1 tocsection-5"><a href="#title_2"><span class="tocnumber">2</span> <span class="toctext">title 2</span></a>
17328 <li class="toclevel-2 tocsection-6"><a href="#title_2.1"><span class="tocnumber">2.1</span> <span class="toctext">title 2.1</span></a></li>
17334 <h2><span class="mw-headline" id="title_1">title 1</span><span class="mw-editsection"><span class="mw-editsection-bracket">[</span><a href="/index.php?title=Parser_test&action=edit&section=1" title="Edit section: title 1">edit</a><span class="mw-editsection-bracket">]</span></span></h2>
17335 <h3><span class="mw-headline" id="title_1.1">title 1.1</span><span class="mw-editsection"><span class="mw-editsection-bracket">[</span><a href="/index.php?title=Parser_test&action=edit&section=2" title="Edit section: title 1.1">edit</a><span class="mw-editsection-bracket">]</span></span></h3>
17336 <h4><span class="mw-headline" id="title_1.1.1">title 1.1.1</span><span class="mw-editsection"><span class="mw-editsection-bracket">[</span><a href="/index.php?title=Parser_test&action=edit&section=3" title="Edit section: title 1.1.1">edit</a><span class="mw-editsection-bracket">]</span></span></h4>
17337 <h3><span class="mw-headline" id="title_1.2">title 1.2</span><span class="mw-editsection"><span class="mw-editsection-bracket">[</span><a href="/index.php?title=Parser_test&action=edit&section=4" title="Edit section: title 1.2">edit</a><span class="mw-editsection-bracket">]</span></span></h3>
17338 <h2><span class="mw-headline" id="title_2">title 2</span><span class="mw-editsection"><span class="mw-editsection-bracket">[</span><a href="/index.php?title=Parser_test&action=edit&section=5" title="Edit section: title 2">edit</a><span class="mw-editsection-bracket">]</span></span></h2>
17339 <h3><span class="mw-headline" id="title_2.1">title 2.1</span><span class="mw-editsection"><span class="mw-editsection-bracket">[</span><a href="/index.php?title=Parser_test&action=edit&section=6" title="Edit section: title 2.1">edit</a><span class="mw-editsection-bracket">]</span></span></h3>
17344 TOC with wgMaxTocLevel=3 and two level four headings (T8204)
17350 ====Section 1.1.1====
17351 ====Section 1.1.1.1====
17354 <div id="toc" class="toc"><input type="checkbox" role="button" id="toctogglecheckbox" class="toctogglecheckbox" style="display:none"/><div class="toctitle" lang="en" dir="ltr"><h2>Contents</h2><span class="toctogglespan"><label class="toctogglelabel" for="toctogglecheckbox"></label></span></div>
17356 <li class="toclevel-1 tocsection-1"><a href="#Section_1"><span class="tocnumber">1</span> <span class="toctext">Section 1</span></a>
17358 <li class="toclevel-2 tocsection-2"><a href="#Section_1.1"><span class="tocnumber">1.1</span> <span class="toctext">Section 1.1</span></a></li>
17361 <li class="toclevel-1 tocsection-5"><a href="#Section_2"><span class="tocnumber">2</span> <span class="toctext">Section 2</span></a></li>
17365 <h2><span class="mw-headline" id="Section_1">Section 1</span><span class="mw-editsection"><span class="mw-editsection-bracket">[</span><a href="/index.php?title=Parser_test&action=edit&section=1" title="Edit section: Section 1">edit</a><span class="mw-editsection-bracket">]</span></span></h2>
17366 <h3><span class="mw-headline" id="Section_1.1">Section 1.1</span><span class="mw-editsection"><span class="mw-editsection-bracket">[</span><a href="/index.php?title=Parser_test&action=edit&section=2" title="Edit section: Section 1.1">edit</a><span class="mw-editsection-bracket">]</span></span></h3>
17367 <h4><span class="mw-headline" id="Section_1.1.1">Section 1.1.1</span><span class="mw-editsection"><span class="mw-editsection-bracket">[</span><a href="/index.php?title=Parser_test&action=edit&section=3" title="Edit section: Section 1.1.1">edit</a><span class="mw-editsection-bracket">]</span></span></h4>
17368 <h4><span class="mw-headline" id="Section_1.1.1.1">Section 1.1.1.1</span><span class="mw-editsection"><span class="mw-editsection-bracket">[</span><a href="/index.php?title=Parser_test&action=edit&section=4" title="Edit section: Section 1.1.1.1">edit</a><span class="mw-editsection-bracket">]</span></span></h4>
17369 <h2><span class="mw-headline" id="Section_2">Section 2</span><span class="mw-editsection"><span class="mw-editsection-bracket">[</span><a href="/index.php?title=Parser_test&action=edit&section=5" title="Edit section: Section 2">edit</a><span class="mw-editsection-bracket">]</span></span></h2>
17375 Resolving duplicate section names
17380 <h2><span class="mw-headline" id="Foo_bar">Foo bar</span><span class="mw-editsection"><span class="mw-editsection-bracket">[</span><a href="/index.php?title=Parser_test&action=edit&section=1" title="Edit section: Foo bar">edit</a><span class="mw-editsection-bracket">]</span></span></h2>
17381 <h2><span class="mw-headline" id="Foo_bar_2">Foo bar</span><span class="mw-editsection"><span class="mw-editsection-bracket">[</span><a href="/index.php?title=Parser_test&action=edit&section=2" title="Edit section: Foo bar">edit</a><span class="mw-editsection-bracket">]</span></span></h2>
17386 Resolving duplicate section names with differing case (T12721)
17391 <h2><span class="mw-headline" id="Foo_bar">Foo bar</span><span class="mw-editsection"><span class="mw-editsection-bracket">[</span><a href="/index.php?title=Parser_test&action=edit&section=1" title="Edit section: Foo bar">edit</a><span class="mw-editsection-bracket">]</span></span></h2>
17392 <h2><span class="mw-headline" id="Foo_Bar_2">Foo Bar</span><span class="mw-editsection"><span class="mw-editsection-bracket">[</span><a href="/index.php?title=Parser_test&action=edit&section=2" title="Edit section: Foo Bar">edit</a><span class="mw-editsection-bracket">]</span></span></h2>
17404 Template with sections, __NOTOC__
17411 <h2><span class="mw-headline" id="Section_0">Section 0</span><span class="mw-editsection"><span class="mw-editsection-bracket">[</span><a href="/index.php?title=Parser_test&action=edit&section=1" title="Edit section: Section 0">edit</a><span class="mw-editsection-bracket">]</span></span></h2>
17412 <h3><span class="mw-headline" id="Section_1">Section 1</span><span class="mw-editsection"><span class="mw-editsection-bracket">[</span><a href="/index.php?title=Template:Sections&action=edit&section=T-1" title="Template:Sections">edit</a><span class="mw-editsection-bracket">]</span></span></h3>
17413 <h2><span class="mw-headline" id="Section_2">Section 2</span><span class="mw-editsection"><span class="mw-editsection-bracket">[</span><a href="/index.php?title=Template:Sections&action=edit&section=T-2" title="Template:Sections">edit</a><span class="mw-editsection-bracket">]</span></span></h2>
17414 <h2><span class="mw-headline" id="Section_4">Section 4</span><span class="mw-editsection"><span class="mw-editsection-bracket">[</span><a href="/index.php?title=Parser_test&action=edit&section=2" title="Edit section: Section 4">edit</a><span class="mw-editsection-bracket">]</span></span></h2>
17419 __NOEDITSECTION__ keyword
17425 <h2><span class="mw-headline" id="Section_1">Section 1</span></h2>
17426 <h2><span class="mw-headline" id="Section_2">Section 2</span></h2>
17431 Link inside a section heading
17433 ==Section with a [[Main Page|link]] in it==
17435 <h2><span class="mw-headline" id="Section_with_a_link_in_it">Section with a <a href="/wiki/Main_Page" title="Main Page">link</a> in it</span><span class="mw-editsection"><span class="mw-editsection-bracket">[</span><a href="/index.php?title=Parser_test&action=edit&section=1" title="Edit section: Section with a link in it">edit</a><span class="mw-editsection-bracket">]</span></span></h2>
17440 TOC regression (T14077)
17447 <div id="toc" class="toc"><input type="checkbox" role="button" id="toctogglecheckbox" class="toctogglecheckbox" style="display:none"/><div class="toctitle" lang="en" dir="ltr"><h2>Contents</h2><span class="toctogglespan"><label class="toctogglelabel" for="toctogglecheckbox"></label></span></div>
17449 <li class="toclevel-1 tocsection-1"><a href="#title_1"><span class="tocnumber">1</span> <span class="toctext">title 1</span></a>
17451 <li class="toclevel-2 tocsection-2"><a href="#title_1.1"><span class="tocnumber">1.1</span> <span class="toctext">title 1.1</span></a></li>
17454 <li class="toclevel-1 tocsection-3"><a href="#title_2"><span class="tocnumber">2</span> <span class="toctext">title 2</span></a></li>
17458 <h2><span class="mw-headline" id="title_1">title 1</span><span class="mw-editsection"><span class="mw-editsection-bracket">[</span><a href="/index.php?title=Parser_test&action=edit&section=1" title="Edit section: title 1">edit</a><span class="mw-editsection-bracket">]</span></span></h2>
17459 <h3><span class="mw-headline" id="title_1.1">title 1.1</span><span class="mw-editsection"><span class="mw-editsection-bracket">[</span><a href="/index.php?title=Parser_test&action=edit&section=2" title="Edit section: title 1.1">edit</a><span class="mw-editsection-bracket">]</span></span></h3>
17460 <h2><span class="mw-headline" id="title_2">title 2</span><span class="mw-editsection"><span class="mw-editsection-bracket">[</span><a href="/index.php?title=Parser_test&action=edit&section=3" title="Edit section: title 2">edit</a><span class="mw-editsection-bracket">]</span></span></h2>
17465 T3219 URL next to image (good)
17467 http://example.com [[File:Foobar.jpg]]
17469 <p><a rel="nofollow" class="external free" href="http://example.com">http://example.com</a> <a href="/wiki/File:Foobar.jpg" class="image"><img alt="Foobar.jpg" src="http://example.com/images/3/3a/Foobar.jpg" width="1941" height="220" /></a>
17472 <p><a rel="mw:ExtLink" class="external free" href="http://example.com">http://example.com</a> <figure-inline class="mw-default-size" typeof="mw:Image"><a href="./File:Foobar.jpg"><img resource="./File:Foobar.jpg" src="//example.com/images/3/3a/Foobar.jpg" data-file-width="1941" data-file-height="220" data-file-type="bitmap" height="220" width="1941"/></a></figure-inline></p>
17475 # Parsoid doesn't wt2wt this cleanly because it adds <nowiki>s.
17477 Short headings with trailing space should match behavior of Parser::doHeadings (T21910)
17479 parsoid=wt2html,html2html
17482 The line above must have a trailing space!
17485 But just in case it doesn't...
17487 <h1><span class="mw-headline" id=".3D">=</span><span class="mw-editsection"><span class="mw-editsection-bracket">[</span><a href="/index.php?title=Parser_test&action=edit&section=1" title="Edit section: =">edit</a><span class="mw-editsection-bracket">]</span></span></h1>
17488 <p>The line above must have a trailing space!
17490 <h1><span class="mw-headline" id=".3D_2">=</span><span class="mw-editsection"><span class="mw-editsection-bracket">[</span><a href="/index.php?title=Parser_test&action=edit&section=2" title="Edit section: =">edit</a><span class="mw-editsection-bracket">]</span></span></h1>
17491 <p>But just in case it doesn't...
17494 <h1 id="="><span id=".3D" typeof="mw:FallbackId"></span>=</h1>
17495 <p>The line above must have a trailing space!</p>
17496 <h1 id="=_2"><span id=".3D_2" typeof="mw:FallbackId"></span>=</h1> <!--
17498 <p>But just in case it doesn't...</p>
17502 Header with special characters (T27462)
17504 The tooltips shall not show entities to the user (ie. be double escaped)
17521 <p>The tooltips shall not show entities to the user (ie. be double escaped)
17523 <div id="toc" class="toc"><input type="checkbox" role="button" id="toctogglecheckbox" class="toctogglecheckbox" style="display:none"/><div class="toctitle" lang="en" dir="ltr"><h2>Contents</h2><span class="toctogglespan"><label class="toctogglelabel" for="toctogglecheckbox"></label></span></div>
17525 <li class="toclevel-1 tocsection-1"><a href="#text_.3E_text"><span class="tocnumber">1</span> <span class="toctext">text > text</span></a></li>
17526 <li class="toclevel-1 tocsection-2"><a href="#text_.3C_text"><span class="tocnumber">2</span> <span class="toctext">text < text</span></a></li>
17527 <li class="toclevel-1 tocsection-3"><a href="#text_.26_text"><span class="tocnumber">3</span> <span class="toctext">text & text</span></a></li>
17528 <li class="toclevel-1 tocsection-4"><a href="#text_.27_text"><span class="tocnumber">4</span> <span class="toctext">text ' text</span></a></li>
17529 <li class="toclevel-1 tocsection-5"><a href="#text_.22_text"><span class="tocnumber">5</span> <span class="toctext">text " text</span></a></li>
17533 <h2><span class="mw-headline" id="text_.3E_text">text > text</span><span class="mw-editsection"><span class="mw-editsection-bracket">[</span><a href="/index.php?title=Parser_test&action=edit&section=1" title="Edit section: text > text">edit</a><span class="mw-editsection-bracket">]</span></span></h2>
17536 <h2><span class="mw-headline" id="text_.3C_text">text < text</span><span class="mw-editsection"><span class="mw-editsection-bracket">[</span><a href="/index.php?title=Parser_test&action=edit&section=2" title="Edit section: text < text">edit</a><span class="mw-editsection-bracket">]</span></span></h2>
17539 <h2><span class="mw-headline" id="text_.26_text">text & text</span><span class="mw-editsection"><span class="mw-editsection-bracket">[</span><a href="/index.php?title=Parser_test&action=edit&section=3" title="Edit section: text & text">edit</a><span class="mw-editsection-bracket">]</span></span></h2>
17542 <h2><span class="mw-headline" id="text_.27_text">text ' text</span><span class="mw-editsection"><span class="mw-editsection-bracket">[</span><a href="/index.php?title=Parser_test&action=edit&section=4" title="Edit section: text ' text">edit</a><span class="mw-editsection-bracket">]</span></span></h2>
17545 <h2><span class="mw-headline" id="text_.22_text">text " text</span><span class="mw-editsection"><span class="mw-editsection-bracket">[</span><a href="/index.php?title=Parser_test&action=edit&section=5" title="Edit section: text " text">edit</a><span class="mw-editsection-bracket">]</span></span></h2>
17549 <p>The tooltips shall not show entities to the user (ie. be double escaped)</p>
17551 <h2 id="text_>_text"><span id="text_.3E_text" typeof="mw:FallbackId"></span>text > text</h2>
17554 <h2 id="text_<_text"><span id="text_.3C_text" typeof="mw:FallbackId"></span>text < text</h2>
17557 <h2 id="text_&_text"><span id="text_.26_text" typeof="mw:FallbackId"></span>text & text</h2>
17560 <h2 id="text_'_text"><span id="text_.27_text" typeof="mw:FallbackId"></span>text ' text</h2>
17563 <h2 id='text_"_text'><span id="text_.22_text" typeof="mw:FallbackId"></span>text " text</h2>
17568 Header with space, plus and underscore as entity
17570 Id should not contain + for spaces
17572 ==Space between Text==
17575 ==Space-Entity between Text==
17578 ==Plus+between+Text==
17581 ==Plus-Entity+between+Text==
17584 ==Underscore_between_Text==
17587 ==Underscore-Entity_between_Text==
17590 [[#Space between Text]]
17591 [[#Space-Entity between Text]]
17592 [[#Plus+between+Text]]
17593 [[#Plus-Entity+between+Text]]
17594 [[#Underscore_between_Text]]
17595 [[#Underscore-Entity_between_Text]]
17597 <p>Id should not contain + for spaces
17599 <div id="toc" class="toc"><input type="checkbox" role="button" id="toctogglecheckbox" class="toctogglecheckbox" style="display:none"/><div class="toctitle" lang="en" dir="ltr"><h2>Contents</h2><span class="toctogglespan"><label class="toctogglelabel" for="toctogglecheckbox"></label></span></div>
17601 <li class="toclevel-1 tocsection-1"><a href="#Space_between_Text"><span class="tocnumber">1</span> <span class="toctext">Space between Text</span></a></li>
17602 <li class="toclevel-1 tocsection-2"><a href="#Space-Entity_between_Text"><span class="tocnumber">2</span> <span class="toctext">Space-Entity between Text</span></a></li>
17603 <li class="toclevel-1 tocsection-3"><a href="#Plus.2Bbetween.2BText"><span class="tocnumber">3</span> <span class="toctext">Plus+between+Text</span></a></li>
17604 <li class="toclevel-1 tocsection-4"><a href="#Plus-Entity.2Bbetween.2BText"><span class="tocnumber">4</span> <span class="toctext">Plus-Entity+between+Text</span></a></li>
17605 <li class="toclevel-1 tocsection-5"><a href="#Underscore_between_Text"><span class="tocnumber">5</span> <span class="toctext">Underscore_between_Text</span></a></li>
17606 <li class="toclevel-1 tocsection-6"><a href="#Underscore-Entity_between_Text"><span class="tocnumber">6</span> <span class="toctext">Underscore-Entity_between_Text</span></a></li>
17610 <h2><span class="mw-headline" id="Space_between_Text">Space between Text</span><span class="mw-editsection"><span class="mw-editsection-bracket">[</span><a href="/index.php?title=Parser_test&action=edit&section=1" title="Edit section: Space between Text">edit</a><span class="mw-editsection-bracket">]</span></span></h2>
17613 <h2><span class="mw-headline" id="Space-Entity_between_Text">Space-Entity between Text</span><span class="mw-editsection"><span class="mw-editsection-bracket">[</span><a href="/index.php?title=Parser_test&action=edit&section=2" title="Edit section: Space-Entity between Text">edit</a><span class="mw-editsection-bracket">]</span></span></h2>
17616 <h2><span class="mw-headline" id="Plus.2Bbetween.2BText">Plus+between+Text</span><span class="mw-editsection"><span class="mw-editsection-bracket">[</span><a href="/index.php?title=Parser_test&action=edit&section=3" title="Edit section: Plus+between+Text">edit</a><span class="mw-editsection-bracket">]</span></span></h2>
17619 <h2><span class="mw-headline" id="Plus-Entity.2Bbetween.2BText">Plus-Entity+between+Text</span><span class="mw-editsection"><span class="mw-editsection-bracket">[</span><a href="/index.php?title=Parser_test&action=edit&section=4" title="Edit section: Plus-Entity+between+Text">edit</a><span class="mw-editsection-bracket">]</span></span></h2>
17622 <h2><span class="mw-headline" id="Underscore_between_Text">Underscore_between_Text</span><span class="mw-editsection"><span class="mw-editsection-bracket">[</span><a href="/index.php?title=Parser_test&action=edit&section=5" title="Edit section: Underscore between Text">edit</a><span class="mw-editsection-bracket">]</span></span></h2>
17625 <h2><span class="mw-headline" id="Underscore-Entity_between_Text">Underscore-Entity_between_Text</span><span class="mw-editsection"><span class="mw-editsection-bracket">[</span><a href="/index.php?title=Parser_test&action=edit&section=6" title="Edit section: Underscore-Entity_between_Text">edit</a><span class="mw-editsection-bracket">]</span></span></h2>
17627 </p><p><a href="#Space_between_Text">#Space between Text</a>
17628 <a href="#Space-Entity_between_Text">#Space-Entity between Text</a>
17629 <a href="#Plus.2Bbetween.2BText">#Plus+between+Text</a>
17630 <a href="#Plus-Entity.2Bbetween.2BText">#Plus-Entity+between+Text</a>
17631 <a href="#Underscore_between_Text">#Underscore_between_Text</a>
17632 <a href="#Underscore-Entity_between_Text">#Underscore-Entity_between_Text</a>
17635 <p>Id should not contain + for spaces</p>
17637 <h2 id="Space_between_Text">Space between Text</h2>
17640 <h2 id="Space-Entity_between_Text">Space-Entity<span typeof="mw:Entity" data-parsoid='{"src":"&#32;","srcContent":" "}'> </span>between<span typeof="mw:Entity" data-parsoid='{"src":"&#32;","srcContent":" "}'> </span>Text</h2>
17643 <h2 id="Plus+between+Text"><span id="Plus.2Bbetween.2BText" typeof="mw:FallbackId"></span>Plus+between+Text</h2>
17646 <h2 id="Plus-Entity+between+Text"><span id="Plus-Entity.2Bbetween.2BText" typeof="mw:FallbackId"></span>Plus-Entity<span typeof="mw:Entity" data-parsoid='{"src":"&#43;","srcContent":"+"}'>+</span>between<span typeof="mw:Entity" data-parsoid='{"src":"&#43;","srcContent":"+"}'>+</span>Text</h2>
17649 <h2 id="Underscore_between_Text">Underscore_between_Text</h2>
17652 <h2 id="Underscore-Entity_between_Text">Underscore-Entity<span typeof="mw:Entity" data-parsoid='{"src":"&#95;","srcContent":"_"}'>_</span>between<span typeof="mw:Entity" data-parsoid='{"src":"&#95;","srcContent":"_"}'>_</span>Text</h2>
17655 <p><a rel="mw:WikiLink" href="./Main_Page#Space_between_Text" data-parsoid='{"stx":"simple","a":{"href":"./Main_Page#Space_between_Text"},"sa":{"href":"#Space between Text"}}'>#Space between Text</a>
17656 <a rel="mw:WikiLink" href="./Main_Page#Space-Entity_between_Text" data-parsoid='{"stx":"simple","a":{"href":"./Main_Page#Space-Entity_between_Text"},"sa":{"href":"#Space-Entity&#32;between&#32;Text"}}'>#Space-Entity between Text</a>
17657 <a rel="mw:WikiLink" href="./Main_Page#Plus+between+Text" data-parsoid='{"stx":"simple","a":{"href":"./Main_Page#Plus+between+Text"},"sa":{"href":"#Plus+between+Text"}}'>#Plus+between+Text</a>
17658 <a rel="mw:WikiLink" href="./Main_Page#Plus-Entity+between+Text" data-parsoid='{"stx":"simple","a":{"href":"./Main_Page#Plus-Entity+between+Text"},"sa":{"href":"#Plus-Entity&#43;between&#43;Text"}}'>#Plus-Entity+between+Text</a>
17659 <a rel="mw:WikiLink" href="./Main_Page#Underscore_between_Text" data-parsoid='{"stx":"simple","a":{"href":"./Main_Page#Underscore_between_Text"},"sa":{"href":"#Underscore_between_Text"}}'>#Underscore_between_Text</a>
17660 <a rel="mw:WikiLink" href="./Main_Page#Underscore-Entity_between_Text" data-parsoid='{"stx":"simple","a":{"href":"./Main_Page#Underscore-Entity_between_Text"},"sa":{"href":"#Underscore-Entity&#95;between&#95;Text"}}'>#Underscore-Entity_between_Text</a></p>
17663 # Parsoid html2wt disabled because it adds padding spaces around =
17665 Headers with excess '=' characters
17666 (Are similar tests necessary beyond the 1st level?)
17668 parsoid=wt2html,wt2wt,html2html
17672 =''italic'' heading==
17673 ==''italic'' heading=
17675 <div id="toc" class="toc"><input type="checkbox" role="button" id="toctogglecheckbox" class="toctogglecheckbox" style="display:none"/><div class="toctitle" lang="en" dir="ltr"><h2>Contents</h2><span class="toctogglespan"><label class="toctogglelabel" for="toctogglecheckbox"></label></span></div>
17677 <li class="toclevel-1 tocsection-1"><a href="#foo.3D"><span class="tocnumber">1</span> <span class="toctext">foo=</span></a></li>
17678 <li class="toclevel-1 tocsection-2"><a href="#.3Dfoo"><span class="tocnumber">2</span> <span class="toctext">=foo</span></a></li>
17679 <li class="toclevel-1 tocsection-3"><a href="#italic_heading.3D"><span class="tocnumber">3</span> <span class="toctext"><i>italic</i> heading=</span></a></li>
17680 <li class="toclevel-1 tocsection-4"><a href="#.3Ditalic_heading"><span class="tocnumber">4</span> <span class="toctext">=<i>italic</i> heading</span></a></li>
17684 <h1><span class="mw-headline" id="foo.3D">foo=</span><span class="mw-editsection"><span class="mw-editsection-bracket">[</span><a href="/index.php?title=Parser_test&action=edit&section=1" title="Edit section: foo=">edit</a><span class="mw-editsection-bracket">]</span></span></h1>
17685 <h1><span class="mw-headline" id=".3Dfoo">=foo</span><span class="mw-editsection"><span class="mw-editsection-bracket">[</span><a href="/index.php?title=Parser_test&action=edit&section=2" title="Edit section: =foo">edit</a><span class="mw-editsection-bracket">]</span></span></h1>
17686 <h1><span class="mw-headline" id="italic_heading.3D"><i>italic</i> heading=</span><span class="mw-editsection"><span class="mw-editsection-bracket">[</span><a href="/index.php?title=Parser_test&action=edit&section=3" title="Edit section: italic heading=">edit</a><span class="mw-editsection-bracket">]</span></span></h1>
17687 <h1><span class="mw-headline" id=".3Ditalic_heading">=<i>italic</i> heading</span><span class="mw-editsection"><span class="mw-editsection-bracket">[</span><a href="/index.php?title=Parser_test&action=edit&section=4" title="Edit section: =italic heading">edit</a><span class="mw-editsection-bracket">]</span></span></h1>
17690 <h1 id="foo="><span id="foo.3D" typeof="mw:FallbackId"></span>foo=</h1>
17691 <h1 id="=foo"><span id=".3Dfoo" typeof="mw:FallbackId"></span>=foo</h1>
17692 <h1 id="italic_heading="><span id="italic_heading.3D" typeof="mw:FallbackId"></span><i>italic</i> heading=</h1>
17693 <h1 id="=italic_heading"><span id=".3Ditalic_heading" typeof="mw:FallbackId"></span>=<i>italic</i> heading</h1>
17697 HTML headers vs TOC (T25393)
17698 (__NOEDITSECTION__ for clearer output, doesn't matter here)
17710 <div id="toc" class="toc"><input type="checkbox" role="button" id="toctogglecheckbox" class="toctogglecheckbox" style="display:none"/><div class="toctitle" lang="en" dir="ltr"><h2>Contents</h2><span class="toctogglespan"><label class="toctogglelabel" for="toctogglecheckbox"></label></span></div>
17712 <li class="toclevel-1"><a href="#Header_1"><span class="tocnumber">1</span> <span class="toctext">Header 1</span></a>
17714 <li class="toclevel-2 tocsection-1"><a href="#Header_1.1"><span class="tocnumber">1.1</span> <span class="toctext">Header 1.1</span></a></li>
17715 <li class="toclevel-2 tocsection-2"><a href="#Header_1.2"><span class="tocnumber">1.2</span> <span class="toctext">Header 1.2</span></a></li>
17718 <li class="toclevel-1"><a href="#Header_2"><span class="tocnumber">2</span> <span class="toctext">Header 2</span></a>
17720 <li class="toclevel-2 tocsection-3"><a href="#Header_2.1"><span class="tocnumber">2.1</span> <span class="toctext">Header 2.1</span></a></li>
17721 <li class="toclevel-2 tocsection-4"><a href="#Header_2.2"><span class="tocnumber">2.2</span> <span class="toctext">Header 2.2</span></a></li>
17727 <h1><span class="mw-headline" id="Header_1">Header 1</span></h1>
17728 <h2><span class="mw-headline" id="Header_1.1">Header 1.1</span></h2>
17729 <h2><span class="mw-headline" id="Header_1.2">Header 1.2</span></h2>
17730 <h1><span class="mw-headline" id="Header_2">Header 2
17732 <h2><span class="mw-headline" id="Header_2.1">Header 2.1</span></h2>
17733 <h2><span class="mw-headline" id="Header_2.2">Header 2.2</span></h2>
17736 <h1 id="Header_1" data-parsoid='{"stx":"html"}'>Header 1</h1>
17737 <h2 id="Header_1.1" data-parsoid='{}'>Header 1.1</h2>
17738 <h2 id="Header_1.2" data-parsoid='{}'>Header 1.2</h2>
17740 <h1 id="Header_2" data-parsoid='{"stx":"html"}'>Header 2
17742 <h2 id="Header_2.1" data-parsoid='{}'>Header 2.1</h2>
17743 <h2 id="Header_2.2" data-parsoid='{}'>Header 2.2</h2>
17744 <meta property="mw:PageProp/noeditsection"/>
17748 Single-line or multiline-comments can follow headings
17750 parsoid=wt2html,wt2wt
17758 <h2><span class="mw-headline" id="foo">foo</span><span class="mw-editsection"><span class="mw-editsection-bracket">[</span><a href="/index.php?title=Parser_test&action=edit&section=1" title="Edit section: foo">edit</a><span class="mw-editsection-bracket">]</span></span></h2>
17759 <h2><span class="mw-headline" id="bar">bar</span><span class="mw-editsection"><span class="mw-editsection-bracket">[</span><a href="/index.php?title=Parser_test&action=edit&section=2" title="Edit section: bar">edit</a><span class="mw-editsection-bracket">]</span></span></h2>
17760 <h2><span class="mw-headline" id="baz">baz</span><span class="mw-editsection"><span class="mw-editsection-bracket">[</span><a href="/index.php?title=Parser_test&action=edit&section=3" title="Edit section: baz">edit</a><span class="mw-editsection-bracket">]</span></span></h2>
17763 <h2 id="foo">foo</h2><!---->
17764 <h2 id="bar">bar</h2><!--c1-->
17765 <h2 id="baz">baz</h2><!--
17771 T3219 URL next to image (broken)
17773 http://example.com[[File:Foobar.jpg]]
17775 <p><a rel="nofollow" class="external free" href="http://example.com">http://example.com</a><a href="/wiki/File:Foobar.jpg" class="image"><img alt="Foobar.jpg" src="http://example.com/images/3/3a/Foobar.jpg" width="1941" height="220" /></a>
17778 <p><a rel="mw:ExtLink" class="external free" href="http://example.com">http://example.com</a><figure-inline class="mw-default-size" typeof="mw:Image"><a href="./File:Foobar.jpg"><img resource="./File:Foobar.jpg" src="//example.com/images/3/3a/Foobar.jpg" data-file-width="1941" data-file-height="220" data-file-type="bitmap" height="220" width="1941"/></a></figure-inline></p>
17782 T3186 news: in the middle of text
17784 http://en.wikinews.org/wiki/Wikinews:Workplace
17786 <p><a rel="nofollow" class="external free" href="http://en.wikinews.org/wiki/Wikinews:Workplace">http://en.wikinews.org/wiki/Wikinews:Workplace</a>
17792 Namespaced link must have a title
17801 Namespaced link must have a title (bad fragment version)
17803 [[Project:#fragment]]
17805 <p>[[Project:#fragment]]
17811 ### HTML tags and HTML attributes
17815 div with no attributes
17817 <div>HTML rocks</div>
17819 <div>HTML rocks</div>
17824 div with double-quoted attribute
17826 <div id="rock">HTML rocks</div>
17828 <div id="rock">HTML rocks</div>
17833 div with single-quoted attribute
17835 <div id='rock'>HTML rocks</div>
17837 <div id="rock">HTML rocks</div>
17842 div with unquoted attribute
17844 <div id=rock>HTML rocks</div>
17846 <div id="rock">HTML rocks</div>
17851 div with illegal double attributes
17853 <div id="a" id="b">HTML rocks</div>
17855 <div id="b">HTML rocks</div>
17860 div with empty attribute value, space before equals
17862 parsoid=wt2html,html2html
17864 <div class =>HTML rocks</div>
17866 <div class="">HTML rocks</div>
17869 <div class="" data-parsoid='{"stx":"html"}'>HTML rocks</div>
17873 div with multiple empty attribute values
17875 wgFragmentMode=[ 'html5', 'legacy' ]
17877 parsoid=wt2html,html2html
17879 <div id= title=>HTML rocks</div>
17881 <div id="title=">HTML rocks</div>
17884 <div id="title=" data-parsoid='{"stx":"html"}'>HTML rocks</div>
17887 # FIXME Parsoid doesn't actually match PHP here.
17888 # Probably we should use the synthetic <foo /> or <indicator>
17889 # extensions for this test, which are enabled when running parser tests.
17891 Extension tag in attribute value
17893 <span title="<translate>123</translate>">ok</span>
17894 !! html/php+disabled
17895 <p><span title="<translate>123</translate>">ok</span>
17898 <p><span title="123" about="#mwt4" typeof="mw:ExpandedAttrs" data-parsoid='{"stx":"html","a":{"title":"123"},"sa":{"title":"<translate>123</translate>"}}' data-mw='{"attribs":[[{"txt":"title"},{"html":"<translate typeof=\"mw:Extension/translate\" about=\"#mwt3\" data-parsoid='{\"dsr\":[13,39,2,2]}' data-mw='{\"name\":\"translate\",\"attrs\":{},\"body\":{\"extsrc\":\"123\"}}'>123</translate>"}]]}'>ok</span></p>
17902 table with multiple empty attribute values
17904 parsoid=wt2html,html2html
17910 <table title="id=">
17916 <table title="id=">
17917 <tbody><tr><td>hi</td></tr>
17922 div with braces in attribute value
17924 <div title="{}">Foo</div>
17926 <div title="{}">Foo</div>
17929 <div title="{}">Foo</div>
17933 div with empty attribute value, no space before equals
17935 parsoid=wt2html,html2html
17937 <div class=>HTML rocks</div>
17939 <div class="">HTML rocks</div>
17942 <div class="">HTML rocks</div>
17946 HTML multiple attributes correction
17948 <p class="error" class="awesome">Awesome!</p>
17950 <p class="awesome">Awesome!</p>
17955 Table multiple attributes correction
17958 !+ class="error" class="awesome"|status
17963 <th class="awesome">status
17971 <DIV ID="x">HTML ROCKS</DIV>
17973 <div id="x">HTML ROCKS</div>
17978 Non-ASCII pseudo-tags are rendered as text
17987 Pseudo-tag with URL 'name' renders as url link
17989 <http://example.com/>
17991 <p><<a rel="nofollow" class="external free" href="http://example.com/">http://example.com/</a>>
17996 text with amp in the middle of nowhere
18000 <p>Remember AT&T?
18005 text with character entity: eacute
18007 I always thought é was a cute letter.
18009 <p>I always thought é was a cute letter.
18014 text with entity-escaped character entity-like string: eacute
18016 I always thought &eacute; was a cute letter.
18018 <p>I always thought &eacute; was a cute letter.
18023 text with undefined character entity: xacute
18025 I always thought &xacute; was a cute letter.
18027 <p>I always thought &xacute; was a cute letter.
18034 <data value="5">five</data>
18035 <time datetime="2000-01-01T00:00Z">The new millenium started</time>
18036 <mark>This highlighted text</mark>
18038 <p><data value="5">five</data>
18039 <time datetime="2000-01-01T00:00Z">The new millenium started</time>
18040 <mark>This highlighted text</mark>
18045 HTML tag with leading space is parsed as text
18049 <p>< div>foo< /div>
18053 ## Don't expect Parsoid and PHP to match, since PHP isn't exactly following
18054 ## the HTML5 parsing spec.
18056 Element with broken attribute syntax
18060 <div style=" style="123">hi</div>
18063 <div style="123">hi</div>
18067 <div style=" style=" data-parsoid='{"stx":"html","a":{"123\"":null},"sa":{"123\"":""}}'>hi</div>
18068 <div data-parsoid='{"stx":"html","a":{"=":null},"sa":{"=":""}}'>ho</div>
18072 ### Nesting tests (see T43545, T52604, T53081)
18075 # This test case is fixed in Parsoid by domino 1.0.12. (T52604)
18076 # Note that html2wt is considerably more difficult if we use <b> in
18077 # the test case, instead of <small>
18079 Ensure that HTML adoption agency algorithm is properly implemented.
18081 <small>X<small>Y</small>Z</small>
18083 <p><small>X<small>Y</small>Z</small>
18087 # This was T43545 in the PHP parser.
18091 <kbd>X<kbd>Y</kbd>Z</kbd>
18093 <p><kbd>X<kbd>Y</kbd>Z</kbd>
18097 # The following cases were T53081 in the PHP parser.
18098 # Note that there are some other nestable tags (b, i, etc) which are
18099 # not covered; see T53081 for discussion.
18104 <em>X<em>Y</em>Z</em>
18106 <p><em>X<em>Y</em>Z</em>
18111 Nesting of <strong>
18113 <strong>X<strong>Y</strong>Z</strong>
18115 <p><strong>X<strong>Y</strong>Z</strong>
18124 <p><q>X<q>Y</q>Z</q>
18131 <ruby>X<ruby>Y</ruby>Z</ruby>
18133 <p><ruby>X<ruby>Y</ruby>Z</ruby>
18140 <bdo>X<bdo>Y</bdo>Z</bdo>
18142 <p><bdo>X<bdo>Y</bdo>Z</bdo>
18154 [[Media:Foobar.jpg]]
18155 [[Media:Video.ogv]]
18156 [[:Media:Video.ogv]]
18158 <p><a href="http://example.com/images/3/3a/Foobar.jpg" class="internal" title="Foobar.jpg">Media:Foobar.jpg</a>
18159 <a href="http://example.com/images/0/00/Video.ogv" class="internal" title="Video.ogv">Media:Video.ogv</a>
18160 <a href="http://example.com/images/0/00/Video.ogv" class="internal" title="Video.ogv">Media:Video.ogv</a>
18163 <p><a rel="mw:MediaLink" href="//example.com/images/3/3a/Foobar.jpg" resource="./Media:Foobar.jpg" title="Foobar.jpg">Media:Foobar.jpg</a>
18164 <a rel="mw:MediaLink" href="//example.com/images/0/00/Video.ogv" resource="./Media:Video.ogv" title="Video.ogv">Media:Video.ogv</a>
18165 <a rel="mw:MediaLink" href="//example.com/images/0/00/Video.ogv" resource="./Media:Video.ogv" title="Video.ogv" data-parsoid='{"a":{"resource":"./Media:Video.ogv"},"sa":{"resource":":Media:Video.ogv"}}'>Media:Video.ogv</a></p>
18169 Media link with text
18171 [[Media:Foobar.jpg|A neat file to look at]]
18173 <p><a href="http://example.com/images/3/3a/Foobar.jpg" class="internal" title="Foobar.jpg">A neat file to look at</a>
18176 <p><a rel="mw:MediaLink" href="//example.com/images/3/3a/Foobar.jpg" resource="./Media:Foobar.jpg" title="Foobar.jpg">A neat file to look at</a></p>
18180 Localized media link
18184 [[Miðill:Foobar.jpg]]
18186 [[Miðill:Foobar.jpg|Icelandic]]
18188 <p><a href="http://example.com/images/3/3a/Foobar.jpg" class="internal" title="Foobar.jpg">Miðill:Foobar.jpg</a>
18189 </p><p><a href="http://example.com/images/3/3a/Foobar.jpg" class="internal" title="Foobar.jpg">Icelandic</a>
18192 <p><a rel="mw:MediaLink" href="//example.com/images/3/3a/Foobar.jpg" resource="./Miðill:Foobar.jpg" title="Foobar.jpg">Miðill:Foobar.jpg</a></p>
18193 <p><a rel="mw:MediaLink" href="//example.com/images/3/3a/Foobar.jpg" resource="./Miðill:Foobar.jpg" title="Foobar.jpg">Icelandic</a></p>
18196 # FIXME: this is still bad HTML tag nesting
18197 # FIXME: doBlockLevels won't wrap this in a paragraph because it contains a div
18198 # Parsoid & Remex fix the p-wrapping since they operate on the DOM.
18200 Media link with nasty text
18202 parsoid=wt2html,html2html
18204 [[Media:Foobar.jpg|Safe Link<div style=display:none>" onmouseover="alert(document.cookie)" onfoo="</div>]]
18206 <a href="http://example.com/images/3/3a/Foobar.jpg" class="internal" title="Foobar.jpg">Safe Link<div style="display:none">" onmouseover="alert(document.cookie)" onfoo="</div></a>
18209 <p><a href="http://example.com/images/3/3a/Foobar.jpg" class="internal" title="Foobar.jpg">Safe Link</a></p><a href="http://example.com/images/3/3a/Foobar.jpg" class="internal" title="Foobar.jpg"><div style="display:none">" onmouseover="alert(document.cookie)" onfoo="</div></a>
18211 <p><a rel="mw:MediaLink" href="//example.com/images/3/3a/Foobar.jpg" resource="./Media:Foobar.jpg" title="Foobar.jpg">Safe Link</a></p><a rel="mw:MediaLink" href="//example.com/images/3/3a/Foobar.jpg" resource="./Media:Foobar.jpg" title="Foobar.jpg"><div style="display:none" data-parsoid='{"stx":"html"}'>" onmouseover="alert(document.cookie)" onfoo="</div></a>
18215 Media link from missing resource (parsoid-only)
18219 <a rel="mw:MediaLink" href="http://example.com/images/3/3a/Foobar.jpg">Bat!</a>
18221 [[Media:Foobar.jpg|Bat!]]
18225 Media link from missing resource, localized (parsoid-only)
18230 <a rel="mw:MediaLink" href="http://example.com/images/3/3a/Foobar.jpg">Bat!</a>
18232 [[Miðill:Foobar.jpg|Bat!]]
18235 # This is a sanity test to ensure we don't crash or choke when given
18236 # old cached 1.7.0 HTML for media links; we don't require that the
18237 # result be "valid" because wt2wt was completely broken in 1.7.0
18239 Media link from old 1.7.0 DOM spec (crash test, parsoid-only) T198511
18243 <p>This is what Parsoid would emit (and we still handle this HTML fine):</p>
18244 <p><a rel="mw:MediaLink" href="//example.com/images/3/3a/Foobar.jpg" title="Foobar.jpg">A neat file to look at</a></p>
18245 <p>But VisualEditor would mangle the rel attribute, and give us back this:</p>
18246 <p><a rel="mw:ExtLink" href="//example.com/images/3/3a/Foobar.jpg" title="Foobar.jpg">A neat file to look at</a></p>
18247 <p>But at least we don't crash when trying to handle the mangled HTML!</p>
18249 This is what Parsoid would emit (and we still handle this HTML fine):
18251 [[Media:Foobar.jpg|A neat file to look at]]
18253 But VisualEditor would mangle the rel attribute, and give us back this:
18255 [//example.com/images/3/3a/Foobar.jpg A neat file to look at]
18257 But at least we don't crash when trying to handle the mangled HTML!
18261 Media link to nonexistent file (T3702)
18263 [[Media:No such.jpg]]
18264 [[Media:No_such file.jpg]]
18266 <p><a href="/index.php?title=Special:Upload&wpDestFile=No_such.jpg" class="new" title="No such.jpg">Media:No such.jpg</a>
18267 <a href="/index.php?title=Special:Upload&wpDestFile=No_such_file.jpg" class="new" title="No such file.jpg">Media:No_such file.jpg</a>
18270 <p><a rel="mw:MediaLink" href="./Special:FilePath/No_such.jpg" resource="./Media:No_such.jpg" title="No such.jpg" typeof="mw:Error" data-mw='{"errors":[{"key":"apierror-filedoesnotexist","message":"This image does not exist."}]}' data-parsoid='{"a":{"resource":"./Media:No_such.jpg"},"sa":{"resource":"Media:No such.jpg"}}'>Media:No such.jpg</a>
18271 <a rel="mw:MediaLink" href="./Special:FilePath/No_such_file.jpg" resource="./Media:No_such_file.jpg" title="No such file.jpg" typeof="mw:Error" data-mw='{"errors":[{"key":"apierror-filedoesnotexist","message":"This image does not exist."}]}' data-parsoid='{"a":{"resource":"./Media:No_such_file.jpg"},"sa":{"resource":"Media:No_such file.jpg"}}'>Media:No_such file.jpg</a></p>
18275 Image link to nonexistent file (T3850 - good)
18277 [[File:No_such.jpg]]
18279 <p><a href="/index.php?title=Special:Upload&wpDestFile=No_such.jpg" class="new" title="File:No such.jpg">File:No such.jpg</a>
18282 <p><figure-inline class="mw-default-size" typeof="mw:Error mw:Image" data-mw='{"errors":[{"key":"apierror-filedoesnotexist","message":"This image does not exist."}]}'><a href="./File:No_such.jpg"><img resource="./File:No_such.jpg" src="./Special:FilePath/No_such.jpg" height="220" width="220"/></a></figure-inline></p>
18286 :Image link to nonexistent file (T3850 - bad)
18288 [[:Image:No such.jpg]]
18290 <p><a href="/index.php?title=File:No_such.jpg&action=edit&redlink=1" class="new" title="File:No such.jpg (page does not exist)">Image:No such.jpg</a>
18293 <p><a rel="mw:WikiLink" href="./File:No_such.jpg" title="File:No such.jpg">Image:No such.jpg</a></p>
18297 Character reference normalization in link text (T3938)
18299 [[Main Page|this&that]]
18301 <p><a href="/wiki/Main_Page" title="Main Page">this&that</a>
18308 Test for unicode normalization
18310 The page's name is U+05d0 U+05b7, with non-canonical form U+FB2E
18314 (T21451) Links should refer to the normalized form.
18322 <p><a href="/wiki/%D7%90%D6%B7" title="אַ">אַ</a>
18323 <a href="/wiki/%D7%90%D6%B7" title="אַ">אַ</a>
18324 <a href="/wiki/%D7%90%D6%B7" title="אַ">אַ</a>
18325 <a href="/wiki/%D7%90%D6%B7" title="אַ">אַ</a>
18326 <a href="/wiki/%D7%90%D6%B7" title="אַ">אַ</a>
18331 Empty attribute crash test (T4067)
18333 <font color="">foo</font>
18335 <p><font color="">foo</font>
18340 Empty attribute crash test single-quotes (T4067)
18342 <font color=''>foo</font>
18344 <p><font color="">foo</font>
18349 Attribute test: equals, then nothing
18351 parsoid=wt2html,html2html
18353 <font color=>foo</font>
18355 <p><font color="">foo</font>
18358 <p><font color="" data-parsoid='{"stx":"html"}'>foo</font></p>
18362 Attribute test: unquoted value
18364 parsoid=wt2html,html2html
18366 <font color=x>foo</font>
18368 <p><font color="x">foo</font>
18371 <p><font color="x" data-parsoid='{"stx":"html"}'>foo</font></p>
18375 Attribute test: unquoted but illegal value (hash)
18377 <font color=#x>foo</font>
18379 <p><font color="#x">foo</font>
18383 # Parsoid does not serialize to empty attribute syntax,
18384 # so wt2wt and html2wt cases are skipped
18386 Attribute test: no value (T54330)
18388 parsoid=wt2html,html2html
18390 <font color>foo</font>
18392 <p><font color="">foo</font>
18395 <p><font color="">foo</font></p>
18399 T4095: link with three closing brackets
18403 <p><a href="/wiki/Main_Page" title="Main Page">Main Page</a>]
18406 <p><a rel="mw:WikiLink" href="./Main_Page" title="Main Page">Main Page</a>]</p>
18410 T4095: link with pipe and three closing brackets
18412 [[Main Page|link]]]
18414 <p><a href="/wiki/Main_Page" title="Main Page">link</a>]
18417 <p><a rel="mw:WikiLink" href="./Main_Page" title="Main Page">link</a>]</p>
18421 T4095: link with pipe and three closing brackets, version 2
18423 [[Main Page|[http://example.com/]]]
18425 <p><a href="/wiki/Main_Page" title="Main Page">[http://example.com/]</a>
18428 <p><a rel="mw:WikiLink" href="./Main_Page" title="Main Page">[http://example.com/]</a></p>
18437 Template:Dangerous attribute
18439 " onmouseover="alert(document.cookie)
18443 Template:Dangerous style attribute
18445 border-size: expression(alert(document.cookie))
18451 <div style="float: right; {{{1}}}">Magic div</div>
18455 T4304: HTML attribute safety (safe template; regression T4309)
18457 <div title="{{test}}"></div>
18459 <div title="This is a test template"></div>
18462 <div title="This is a test template" about="#mwt2" typeof="mw:ExpandedAttrs" data-parsoid='{"stx":"html","a":{"title":"This is a test template"},"sa":{"title":"{{test}}"}}' data-mw='{"attribs":[[{"txt":"title"},{"html":"<span about=\"#mwt1\" typeof=\"mw:Transclusion\" data-parsoid='{\"pi\":[[]],\"dsr\":[12,20,null,null]}' data-mw='{\"parts\":[{\"template\":{\"target\":{\"wt\":\"test\",\"href\":\"./Template:Test\"},\"params\":{},\"i\":0}}]}'>This is a test template</span>"}]]}'></div>
18465 # Parsoid has enough context to handle this case
18467 T4304: HTML attribute safety (dangerous template; 2309)
18469 <div title="{{dangerous attribute}}"></div>
18471 <div title=""></div>
18474 <div title='" onmouseover="alert(document.cookie)' about="#mwt2" typeof="mw:ExpandedAttrs" data-parsoid='{"stx":"html","a":{"title":"\" onmouseover=\"alert(document.cookie)"},"sa":{"title":"{{dangerous attribute}}"}}' data-mw='{"attribs":[[{"txt":"title"},{"html":"<span about=\"#mwt1\" typeof=\"mw:Transclusion\" data-parsoid='{\"pi\":[[]],\"dsr\":[12,35,null,null]}' data-mw='{\"parts\":[{\"template\":{\"target\":{\"wt\":\"dangerous attribute\",\"href\":\"./Template:Dangerous_attribute\"},\"params\":{},\"i\":0}}]}'>\" onmouseover=\"alert(document.cookie)</span>"}]]}'></div>
18478 T4304: HTML attribute safety (dangerous style template; 2309)
18480 <div style="{{dangerous style attribute}}"></div>
18482 <div style="/* insecure input */"></div>
18485 <div style="/* insecure input */" about="#mwt2" typeof="mw:ExpandedAttrs" data-parsoid='{"stx":"html","a":{"style":"/* insecure input */"},"sa":{"style":"{{dangerous style attribute}}"}}' data-mw='{"attribs":[[{"txt":"style"},{"html":"<span about=\"#mwt1\" typeof=\"mw:Transclusion\" data-parsoid='{\"pi\":[[]],\"dsr\":[12,41,null,null]}' data-mw='{\"parts\":[{\"template\":{\"target\":{\"wt\":\"dangerous style attribute\",\"href\":\"./Template:Dangerous_style_attribute\"},\"params\":{},\"i\":0}}]}'>border-size: expression(alert(document.cookie))</span>"}]]}'></div>
18489 T4304: HTML attribute safety (safe parameter; 2309)
18491 {{div style|width: 200px}}
18493 <div style="float: right; width: 200px">Magic div</div>
18496 <div style="float: right; width: 200px" about="#mwt1" typeof="mw:Transclusion" data-parsoid='{"stx":"html","a":{"style":"float: right; width: 200px"},"sa":{"style":"float: right; {{{1}}}"},"pi":[[{"k":"1"}]]}' data-mw='{"parts":[{"template":{"target":{"wt":"div style","href":"./Template:Div_style"},"params":{"1":{"wt":"width: 200px"}},"i":0}}]}'>Magic div</div>
18500 T4304: HTML attribute safety (unsafe parameter; 2309)
18502 {{div style|width: expression(alert(document.cookie))}}
18504 <div style="/* insecure input */">Magic div</div>
18507 <div style="/* insecure input */" about="#mwt1" typeof="mw:Transclusion" data-parsoid='{"stx":"html","a":{"style":"/* insecure input */"},"sa":{"style":"float: right; {{{1}}}"},"pi":[[{"k":"1"}]]}' data-mw='{"parts":[{"template":{"target":{"wt":"div style","href":"./Template:Div_style"},"params":{"1":{"wt":"width: expression(alert(document.cookie))"}},"i":0}}]}'>Magic div</div>
18510 ## Parsoid output here differs; needs investigation.
18512 T4304: HTML attribute safety (unsafe breakout parameter; 2309)
18514 {{div style|"><script>alert(document.cookie)</script>}}
18516 <div style="float: right;"><script>alert(document.cookie)</script>">Magic div</div>
18520 ## Parsoid output here differs; needs investigation.
18522 T4304: HTML attribute safety (unsafe breakout parameter 2; 2309)
18524 {{div style|" ><script>alert(document.cookie)</script>}}
18526 <div style="float: right;"><script>alert(document.cookie)</script>">Magic div</div>
18531 T4304: HTML attribute safety (link)
18533 <div title="[[Main Page]]"></div>
18535 <div title="[[Main Page]]"></div>
18538 <div title="[[Main Page]]"></div>
18542 T4304: HTML attribute safety (italics)
18544 <div title="''foobar''"></div>
18546 <div title="''foobar''"></div>
18551 T4304: HTML attribute safety (bold)
18553 <div title="'''foobar'''"></div>
18555 <div title="'''foobar'''"></div>
18560 T4304: HTML attribute safety (ISBN)
18562 <div title="ISBN 1234567890"></div>
18564 <div title="ISBN 1234567890"></div>
18569 T4304: HTML attribute safety (RFC)
18571 <div title="RFC 1234"></div>
18573 <div title="RFC 1234"></div>
18578 T4304: HTML attribute safety (PMID)
18580 <div title="PMID 1234567890"></div>
18582 <div title="PMID 1234567890"></div>
18587 T4304: HTML attribute safety (web link)
18589 <div title="http://example.com/"></div>
18591 <div title="http://example.com/"></div>
18596 T4304: HTML attribute safety (named web link)
18598 <div title="[http://example.com/ link]"></div>
18600 <div title="[http://example.com/ link]"></div>
18603 <div title="[http://example.com/ link]"></div>
18607 T5244: HTML attribute safety (extension; safe)
18609 <div style="<nowiki>background:blue</nowiki>"></div>
18611 <div style="background:blue"></div>
18614 <div style="background:blue" data-parsoid='{"stx":"html","a":{"style":"background:blue"},"sa":{"style":"<nowiki>background:blue</nowiki>"}}'></div>
18618 T5244: HTML attribute safety (extension; unsafe)
18620 <div style="<nowiki>border-left:expression(alert(document.cookie))</nowiki>"></div>
18622 <div style="/* insecure input */"></div>
18625 <div style="/* insecure input */" data-parsoid='{"stx":"html","a":{"style":"/* insecure input */"},"sa":{"style":"<nowiki>border-left:expression(alert(document.cookie))</nowiki>"}}'></div>
18628 # More MSIE fun discovered by Tom Gilder
18631 MSIE CSS safety test: spurious slash
18633 <div style="background-image:u\rl(javascript:alert('boo'))">evil</div>
18635 <div style="/* insecure input */">evil</div>
18638 <div style="/* insecure input */" data-parsoid='{"stx":"html","a":{"style":"/* insecure input */"},"sa":{"style":"background-image:u\\rl(javascript:alert('boo'))"}}'>evil</div>
18642 MSIE CSS safety test: hex code
18644 <div style="background-image:u\72l(javascript:alert('boo'))">evil</div>
18646 <div style="/* insecure input */">evil</div>
18649 <div style="/* insecure input */" data-parsoid='{"stx":"html","a":{"style":"/* insecure input */"},"sa":{"style":"background-image:u\\72l(javascript:alert('boo'))"}}'>evil</div>
18653 MSIE CSS safety test: comment in url
18655 <div style="background-image:u/**/rl(javascript:alert('boo'))">evil</div>
18657 <div style="background-image:u rl(javascript:alert('boo'))">evil</div>
18660 <div style="background-image:u rl(javascript:alert('boo'))" data-parsoid='{"stx":"html","a":{"style":"background-image:u rl(javascript:alert('boo'))"},"sa":{"style":"background-image:u/**/rl(javascript:alert('boo'))"}}'>evil</div>
18664 MSIE CSS safety test: comment in expression
18666 <div style="background-image:expres/**/sion(alert('boo4'))">evil4</div>
18668 <div style="background-image:expres sion(alert('boo4'))">evil4</div>
18671 <div style="background-image:expres sion(alert('boo4'))" data-parsoid='{"stx":"html","a":{"style":"background-image:expres sion(alert('boo4'))"},"sa":{"style":"background-image:expres/**/sion(alert('boo4'))"}}'>evil4</div>
18675 CSS safety test (all browsers): vertical tab (T57332 / CVE-2013-4567)
18677 <p style="font-size: 100px; background-image:url\b(https://www.google.com/images/srpr/logo6w.png)">A</p>
18679 <p style="/* invalid control char */">A</p>
18682 <p style="/* invalid control char */" data-parsoid='{"stx":"html","a":{"style":"/* invalid control char */"},"sa":{"style":"font-size: 100px; background-image:url\\b(https://www.google.com/images/srpr/logo6w.png)"}}'>A</p>
18686 MSIE 6 CSS safety test: Fullwidth (T57332)
18688 <p style="font-size: 100px; color: expression((title='XSSed'),'red')">A</p>
18689 <div style="top:EXPRESSION(alert())">B</div>
18691 <p style="/* insecure input */">A</p>
18692 <div style="/* insecure input */">B</div>
18695 <p style="/* insecure input */" data-parsoid='{"stx":"html","a":{"style":"/* insecure input */"},"sa":{"style":"font-size: 100px; color: expression((title='XSSed'),'red')"}}'>A</p>
18696 <div style="/* insecure input */" data-parsoid='{"stx":"html","a":{"style":"/* insecure input */"},"sa":{"style":"top:EXPRESSION(alert())"}}'>B</div>
18700 MSIE 6 CSS safety test: IPA extensions (T57332)
18702 <div style="background-image:uʀʟ(javascript:alert())">A</div>
18703 <p style="font-size: 100px; color: expʀessɪoɴ((title='XSSed'),'red')">B</p>
18705 <div style="/* insecure input */">A</div>
18706 <p style="/* insecure input */">B</p>
18709 <div style="/* insecure input */" data-parsoid='{"stx":"html","a":{"style":"/* insecure input */"},"sa":{"style":"background-image:uʀʟ(javascript:alert())"}}'>A</div>
18710 <p style="/* insecure input */" data-parsoid='{"stx":"html","a":{"style":"/* insecure input */"},"sa":{"style":"font-size: 100px; color: expʀessɪoɴ((title='XSSed'),'red')"}}'>B</p>
18714 MSIE 6 CSS safety test: sup/sub script (T57332)
18716 <div style="background-image:url⁽javascript:alert())">A</div>
18717 <div style="background-image:url₍javascript:alert())">B</div>
18718 <p style="font-size: 100px; color: expressioⁿ((title='XSSed'),'red')">C</p>
18720 <div style="/* insecure input */">A</div>
18721 <div style="/* insecure input */">B</div>
18722 <p style="/* insecure input */">C</p>
18725 <div style="/* insecure input */" data-parsoid='{"stx":"html","a":{"style":"/* insecure input */"},"sa":{"style":"background-image:url⁽javascript:alert())"}}'>A</div>
18726 <div style="/* insecure input */" data-parsoid='{"stx":"html","a":{"style":"/* insecure input */"},"sa":{"style":"background-image:url₍javascript:alert())"}}'>B</div>
18727 <p style="/* insecure input */" data-parsoid='{"stx":"html","a":{"style":"/* insecure input */"},"sa":{"style":"font-size: 100px; color: expressioⁿ((title='XSSed'),'red')"}}'>C</p>
18733 parsoid=wt2html,html2html
18736 title="data:text/html,<img src=1 onerror=alert(1)>"
18737 style="-o-link:attr(title);-o-link-source:current">X</div>
18739 <div title="data:text/html,<img src=1 onerror=alert(1)>" style="/* insecure input */">X</div>
18742 <div title="data:text/html,<img src=1 onerror=alert(1)>" style="/* insecure input */" data-parsoid='{"stx":"html","a":{"title":"data:text/html,<img src=1 onerror=alert(1)>","style":"/* insecure input */"},"sa":{"title":"&#100;&#97;&#116;&#97;&#58;&#116;&#101;&#120;&#116;&#47;&#104;&#116;&#109;&#108;&#44;&#60;&#105;&#109;&#103;&#32;&#115;&#114;&#99;&#61;&#49;&#32;&#111;&#110;&#101;&#114;&#114;&#111;&#114;&#61;&#97;&#108;&#101;&#114;&#116;&#40;&#49;&#41;&#62;","style":"-o-link:attr(title);-o-link-source:current"}}'>X</div>
18746 MSIE 6 CSS safety test: Repetition markers (T57332)
18748 <p style="font-size: 100px; color: expres〱ion((title='XSSed'),'red')">A</p>
18749 <p style="font-size: 100px; color: expresゝion((title='XSSed'),'red')">B</p>
18750 <p style="font-size: 100px; color: expresーion((title='XSSed'),'red')">C</p>
18751 <p style="font-size: 100px; color: expresヽion((title='XSSed'),'red')">D</p>
18752 <p style="font-size: 100px; color: expresﹽion((title='XSSed'),'red')">E</p>
18753 <p style="font-size: 100px; color: expresﹼion((title='XSSed'),'red')">F</p>
18754 <p style="font-size: 100px; color: expresーion((title='XSSed'),'red')">G</p>
18756 <p style="/* insecure input */">A</p>
18757 <p style="/* insecure input */">B</p>
18758 <p style="/* insecure input */">C</p>
18759 <p style="/* insecure input */">D</p>
18760 <p style="/* insecure input */">E</p>
18761 <p style="/* insecure input */">F</p>
18762 <p style="/* insecure input */">G</p>
18765 <p style="/* insecure input */" data-parsoid='{"stx":"html","a":{"style":"/* insecure input */"},"sa":{"style":"font-size: 100px; color: expres〱ion((title='XSSed'),'red')"}}'>A</p>
18766 <p style="/* insecure input */" data-parsoid='{"stx":"html","a":{"style":"/* insecure input */"},"sa":{"style":"font-size: 100px; color: expresゝion((title='XSSed'),'red')"}}'>B</p>
18767 <p style="/* insecure input */" data-parsoid='{"stx":"html","a":{"style":"/* insecure input */"},"sa":{"style":"font-size: 100px; color: expresーion((title='XSSed'),'red')"}}'>C</p>
18768 <p style="/* insecure input */" data-parsoid='{"stx":"html","a":{"style":"/* insecure input */"},"sa":{"style":"font-size: 100px; color: expresヽion((title='XSSed'),'red')"}}'>D</p>
18769 <p style="/* insecure input */" data-parsoid='{"stx":"html","a":{"style":"/* insecure input */"},"sa":{"style":"font-size: 100px; color: expresﹽion((title='XSSed'),'red')"}}'>E</p>
18770 <p style="/* insecure input */" data-parsoid='{"stx":"html","a":{"style":"/* insecure input */"},"sa":{"style":"font-size: 100px; color: expresﹼion((title='XSSed'),'red')"}}'>F</p>
18771 <p style="/* insecure input */" data-parsoid='{"stx":"html","a":{"style":"/* insecure input */"},"sa":{"style":"font-size: 100px; color: expresーion((title='XSSed'),'red')"}}'>G</p>
18775 Table attribute legitimate extension
18778 !+ style="<nowiki>color:blue</nowiki>"|status
18783 <th style="color:blue">status
18789 Table attribute safety
18792 !+ style="<nowiki>border-width:expression(0+alert(document.cookie))</nowiki>"|status
18797 <th style="/* insecure input */">status
18803 CSS line continuation 1
18805 <div style="background-image: u\ rl(test.jpg);"></div>
18807 <div style="/* insecure input */"></div>
18812 CSS line continuation 2
18814 <div style="background-image: u\ rl(test.jpg); "></div>
18816 <div style="/* invalid control char */"></div>
18827 Expansion of multi-line templates in attribute values (T8255)
18829 <div style="background: {{identity|#00FF00}}">-</div>
18831 <div style="background: #00FF00">-</div>
18836 Expansion of multi-line templates in attribute values (T8255 sanity check)
18838 <div style="background:
18841 <div style="background: #00FF00">-</div>
18844 <div style="background:
18849 Expansion of multi-line templates in attribute values (T8255 sanity check 2)
18851 <div style="background: #00FF00">-</div>
18853 <div style="background: #00FF00">-</div>
18858 Tags which are hidden from tidiers cannot pass through the Sanitizer
18860 <mw:toc><script>alert();</script></mw:toc>
18862 <p><mw:toc><script>alert();</script></mw:toc>
18867 ### Parser hooks (see tests/parser/parserTestsParserHook.php for the <tag> extension)
18871 Parser hook: empty input
18882 <pre typeof="mw:Extension/tag" data-mw='{"name":"tag","attrs":{},"body":{"extsrc":""}}' data-parsoid='{}' about="#mwt2"></pre>
18885 ## Don't expect parsoid to rt this form.
18887 Parser hook: empty input using terminated empty elements
18889 parsoid=wt2html,html2html
18900 <pre typeof="mw:Extension/tag" data-mw='{"name":"tag","attrs":{}}' data-parsoid='{}' about="#mwt2"></pre>
18904 Parser hook: empty input using terminated empty elements (space before)
18915 <pre typeof="mw:Extension/tag" data-mw='{"name":"tag","attrs":{}}' data-parsoid='{}' about="#mwt2"></pre>
18919 Parser hook: basic input
18930 <pre typeof="mw:Extension/tag" data-mw='{"name":"tag","attrs":{},"body":{"extsrc":"input"}}' data-parsoid='{}' about="#mwt2"></pre>
18933 ## Don't expect parsoid to rt this form.
18935 Parser hook: case insensitive
18937 parsoid=wt2html,html2html
18948 <pre typeof="mw:Extension/tag" data-mw='{"name":"tag","attrs":{},"body":{"extsrc":"input"}}' data-parsoid='{}' about="#mwt2"></pre>
18951 ## Don't expect parsoid to rt this form.
18953 Parser hook: case insensitive, redux
18955 parsoid=wt2html,html2html
18966 <pre typeof="mw:Extension/tag" data-mw='{"name":"tag","attrs":{},"body":{"extsrc":"input"}}' data-parsoid='{}' about="#mwt2"></pre>
18970 Parser hook: nested tags
18974 <tag><tag></tag></tag>
18986 </tag></pre><p></tag>
18989 <pre typeof="mw:Extension/tag" about="#mwt2" data-mw='{"name":"tag","attrs":{},"body":{"extsrc":"<tag>"}}'></pre><p></tag></p>
18993 Parser hook: basic arguments
18995 <tag width="200" height="100" depth="50" square=""></tag>
19008 <pre typeof="mw:Extension/tag" data-mw='{"name":"tag","attrs":{"width":"200","height":"100","depth":"50","square":""},"body":{"extsrc":""}}' data-parsoid='{}' about="#mwt2"></pre>
19011 ## Don't expect parsoid to rt this form.
19013 Parser hook: basic arguments, variations
19015 parsoid=wt2html,html2html
19017 <tag width=200 height = "100" depth = '50' square></tag>
19030 <pre typeof="mw:Extension/tag" data-mw='{"name":"tag","attrs":{"width":"200","height":"100","depth":"50","square":""},"body":{"extsrc":""}}' data-parsoid='{}' about="#mwt2"></pre>
19034 Parser hook: argument containing a forward slash (T7344)
19036 <tag filename="/tmp/bla"></tag>
19041 'filename' => '/tmp/bla',
19046 <pre typeof="mw:Extension/tag" data-mw='{"name":"tag","attrs":{"filename":"/tmp/bla"},"body":{"extsrc":""}}' data-parsoid='{}' about="#mwt2"></pre>
19049 ## Don't expect parsoid to rt this form.
19051 Parser hook: empty input using terminated empty elements (T4374)
19053 parsoid=wt2html,html2html
19065 <pre typeof="mw:Extension/tag" about="#mwt2" data-mw='{"name":"tag","attrs":{"foo":"bar"}}'></pre><p>text</p>
19068 ## </tag> should be output literally since there is no matching tag that begins it
19069 ## Don't expect parsoid to rt this form.
19071 Parser hook: basic arguments using terminated empty elements (T4374)
19075 <tag width=200 height = "100" depth = '50' square/>
19092 <pre typeof="mw:Extension/tag" data-mw='{"name":"tag","attrs":{"width":"200","height":"100","depth":"50","square":""}}' about="#mwt2"></pre><p>other stuff
19096 ## Don't expect parsoid to rt this form.
19098 Parser hook: Don't allow unclosed extension tags
19104 this is a '''test'''
19106 <p>test <tag>123
19107 </p><p>this is a <b>test</b>
19110 <p>test <tag>123</p>
19112 <p>this is a <b>test</b></p>
19116 Parser hook: horizontal rule inside extension tag that outputs <pre>
19137 ### (see tests/parser/parserTestsParserHook.php for the <statictag> extension)
19141 Parser hook: static parser hook not inside a comment
19143 <statictag>hello, world</statictag>
19145 <statictag action="flush" />
19151 <p><span typeof="mw:Extension/statictag" data-mw='{"name":"statictag","attrs":{},"body":{"extsrc":"hello, world"}}' data-parsoid='{}' about="#mwt2"></span></p>
19152 <p typeof="mw:Extension/statictag" data-mw='{"name":"statictag","attrs":{"action":"flush"}}' data-parsoid='{}' about="#mwt4">hello, world</p>
19156 Parser hook: static parser hook inside a comment
19158 <!-- <statictag>hello, world</statictag> -->
19159 <statictag action="flush" />
19164 <!-- <statictag>hello, world</statictag> -->
19165 <p typeof='mw:Extension/statictag' data-mw='{"name":"statictag","attrs":{"action":"flush"}}' data-parsoid='{}' about='#mwt2'></p>
19168 # Nested template calls; this case was broken by Parser.php rev 1.506,
19172 Template:One-parameter
19174 (My parameter is: {{{1}}})
19178 Template:Map-one-parameter
19180 {{{{{1}}}|{{{2}}}}}
19184 Nested template calls
19186 {{Map-one-parameter|One-parameter|param}}
19188 <p>(My parameter is: param)
19198 Sanitizer: Closing of open tags
19200 <s></s><table></table>
19202 <p><s></s></p><table></table>
19204 <p><s data-parsoid='{"stx":"html"}'></s></p><table data-parsoid='{"stx":"html"}'></table>
19208 Sanitizer: Closing of open but not closed tags
19217 Sanitizer: Closing of closed but not open tags
19223 <p class="mw-empty-elt">
19228 Sanitizer: Closing of closed but not open table tags
19232 Table not started</td></tr></table>
19234 <p>Table not started
19239 Sanitizer: Escaping of spaces, multibyte characters, colons & other stuff in id=""
19241 wgFragmentMode=[ 'html5', 'legacy' ]
19243 <span id="æ: v">byte</span>[[#æ: v|backlink]]
19245 <p><span id="æ:_v">byte</span><a href="#æ:_v">backlink</a>
19248 <p><span id="æ:_v" data-parsoid='{"stx":"html","a":{"id":"æ:_v"},"sa":{"id":"æ: v"}}'>byte</span><a rel="mw:WikiLink" href="./Main_Page#æ:_v" data-parsoid='{"stx":"piped","a":{"href":"./Main_Page#æ:_v"},"sa":{"href":"#æ: v"}}'>backlink</a></p>
19252 Sanitizer: Escaping of spaces, multibyte characters, colons & other stuff in id="" (legacy)
19254 wgFragmentMode=[ 'legacy' ]
19256 <span id="æ: v">byte</span>[[#æ: v|backlink]]
19258 <p><span id=".C3.A6:_v">byte</span><a href="#.C3.A6:_v">backlink</a>
19262 # In HTML5, the restrictions are that id must contain at least one character,
19263 # and must not contain any space characters.
19265 Sanitizer: Validating the contents of the id attribute (T6515)
19269 <br id="" /><br id="a space" />
19274 # In HTML5, id must be unique amongst all the ids in the element's home subtree.
19276 Sanitizer: Validating id attribute uniqueness (T6515, T8301)
19280 <br id="foo" /><br id="foo" />
19282 Something need to be done. foo-2 ?
19286 Sanitizer: Validating that <meta> and <link> work, but only for Microdata
19289 <meta itemprop="hello" content="world">
19290 <meta http-equiv="refresh" content="5">
19291 <meta itemprop="hello" http-equiv="refresh" content="5">
19292 <link itemprop="hello" href="{{SERVER}}">
19293 <link rel="stylesheet" href="{{SERVER}}">
19294 <link rel="stylesheet" itemprop="hello" href="{{SERVER}}">
19298 <p> <meta itemprop="hello" content="world" />
19299 <meta http-equiv="refresh" content="5">
19300 <meta itemprop="hello" content="5" />
19301 <link itemprop="hello" href="http://example.org" />
19302 <link rel="stylesheet" href="<a rel="nofollow" class="external free" href="http://example.org">http://example.org</a>">
19303 <link itemprop="hello" href="http://example.org" />
19310 Sanitizer: Strip comments from CSS attributes
19312 parsoid=wt2html,wt2wt
19314 <span style="margin:/*negate mbox-text padding */-0.125em -0.45em; /*rainbow*/rgba(255, 0, 0, 0.3)">2013</span>
19316 <p><span style="margin: -0.125em -0.45em; rgba(255, 0, 0, 0.3)">2013</span>
19319 <p><span style="margin: -0.125em -0.45em; rgba(255, 0, 0, 0.3)">2013</span></p>
19323 Sanitizer: Avoid unnecessary percent encoded characters in interwiki links
19325 [[meatball:Soft"Security]]
19327 <p><a href="http://www.usemod.com/cgi-bin/mb.pl?Soft%22Security" class="extiw" title="meatball:Soft"Security">meatball:Soft"Security</a>
19330 <p><a rel="mw:WikiLink/Interwiki" href='http://www.usemod.com/cgi-bin/mb.pl?Soft"Security' title='meatball:Soft"Security'>meatball:Soft"Security</a></p>
19334 Sanitizer: angle brackets are invalid, even in interwiki links (T182338)
19336 [[meatball:Foo<Bar]]
19337 [[meatball:Foo>Bar]]
19338 [[meatball:Foo<bar]]
19339 [[meatball:Foo>bar]]
19341 <p>[[meatball:Foo<Bar]]
19342 [[meatball:Foo>Bar]]
19343 [[meatball:Foo<bar]]
19344 [[meatball:Foo>bar]]
19347 <p>[[meatball:Foo<Bar]]
19348 [[meatball:Foo>Bar]]
19349 [[meatball:Foo<span typeof="mw:Entity" data-parsoid='{"src":"&lt;","srcContent":"<"}'><</span>bar]]
19350 [[meatball:Foo<span typeof="mw:Entity" data-parsoid='{"src":"&gt;","srcContent":">"}'>></span>bar]]</p>
19354 Language converter: output gets cut off unexpectedly (T7757)
19358 this bit is safe: }-
19360 but if we add a conversion instance: -{zh-cn:xxx;zh-tw:yyy}-
19362 then we get cut off here: }-
19364 all additional text is vanished
19366 <p>this bit is safe: }-
19367 </p><p>but if we add a conversion instance: xxx
19368 </p><p>then we get cut off here: }-
19369 </p><p>all additional text is vanished
19372 <p>this bit is safe: }-</p>
19373 <p>but if we add a conversion instance: <span typeof="mw:LanguageVariant" data-parsoid='{"tSp":[6]}' data-mw-variant='{"twoway":[{"l":"zh-cn","t":"xxx"},{"l":"zh-tw","t":"yyy"}]}'></span></p>
19374 <p>then we get cut off here: }-</p>
19375 <p>all additional text is vanished</p>
19379 Language converter glossary rules inside attributes (T119158)
19381 language=sr variant=sr-el
19383 -{H|foAjrjvi=>sr-el:" onload="alert(1)" data-foo="}-
19385 [[File:Foobar.jpg|alt=-{}-foAjrjvi-{}-]]
19388 </p><p><a href="/wiki/%D0%94%D0%B0%D1%82%D0%BE%D1%82%D0%B5%D0%BA%D0%B0:Foobar.jpg" class="image"><img alt="" onload="alert(1)" data-foo="" src="http://example.com/images/3/3a/Foobar.jpg" width="1941" height="220" /></a>
19391 <p><meta typeof="mw:LanguageVariant" data-mw-variant='{"add":true,"oneway":[{"f":"foAjrjvi","l":"sr-el","t":"\" onload=\"alert(1)\" data-foo=\""}]}'/></p>
19393 <p><figure-inline class="mw-default-size" typeof="mw:Image"><a href="./Датотека:Foobar.jpg"><img alt="foAjrjvi" resource="./Датотека:Foobar.jpg" src="//example.com/images/3/3a/Foobar.jpg" data-file-width="1941" data-file-height="220" data-file-type="bitmap" height="220" width="1941" data-parsoid='{"a":{"alt":"foAjrjvi","resource":"./Датотека:Foobar.jpg","height":"220","width":"1941"},"sa":{"alt":"alt=-{}-foAjrjvi-{}-","resource":"File:Foobar.jpg"}}'/></a></figure-inline></p>
19397 Self closed html pairs (T7487)
19399 <center><font id="bug" />Centered text</center>
19400 <div><font id="bug2" />In div text</div>
19402 <center><font id="bug"></font>Centered text</center>
19403 <div><font id="bug2"></font>In div text</div>
19407 Punctuation: nbsp before exclamation
19411 <p>C'est grave !
19416 Punctuation: CSS !important (T13874)
19418 <div style="width:50% !important">important</div>
19420 <div style="width:50% !important">important</div>
19425 Punctuation: CSS ! important (T13874; with space after)
19427 <div style="width:50% ! important">important</div>
19429 <div style="width:50% ! important">important</div>
19434 HTML bullet list, closed tags (T7497)
19447 <ul data-parsoid='{"stx":"html"}'>
19448 <li data-parsoid='{"stx":"html"}'>One</li>
19449 <li data-parsoid='{"stx":"html"}'>Two</li>
19455 HTML bullet list, unclosed tags (T7497)
19467 <ul data-parsoid='{"stx":"html"}'>
19468 <li data-parsoid='{"stx":"html","autoInsertedEnd":true}'>One</li>
19469 <li data-parsoid='{"stx":"html","autoInsertedEnd":true}'>Two</li>
19475 HTML ordered list, closed tags (T7497)
19488 <ol data-parsoid='{"stx":"html"}'>
19489 <li data-parsoid='{"stx":"html"}'>One</li>
19490 <li data-parsoid='{"stx":"html"}'>Two</li>
19496 HTML ordered list, unclosed tags (T7497)
19509 <ol data-parsoid='{"stx":"html"}'>
19510 <li data-parsoid='{"stx":"html","autoInsertedEnd":true}'>One</li>
19511 <li data-parsoid='{"stx":"html","autoInsertedEnd":true}'>Two</li>
19517 HTML nested bullet list, closed tags (T7497)
19540 <ul data-parsoid='{"stx":"html"}'>
19541 <li data-parsoid='{"stx":"html"}'>One</li>
19542 <li data-parsoid='{"stx":"html"}'>Two:
19543 <ul data-parsoid='{"stx":"html"}'>
19544 <li data-parsoid='{"stx":"html"}'>Sub-one</li>
19545 <li data-parsoid='{"stx":"html"}'>Sub-two</li>
19552 HTML nested bullet list, open tags (T7497)
19574 HTML nested ordered list, closed tags (T7497)
19599 HTML nested ordered list, open tags (T7497)
19636 HTML ordered list item with parameters oddity
19638 <ol><li id="fragment">One</li>
19641 <ol><li id="fragment">One</li>
19646 # parsoid doesn't explicitly mark autonumbered links, see T55505
19648 T7918: autonumbering
19650 [http://first/] [http://second] [ftp://ftp]
19654 [mailto:enclosed@mail.tld With target]
19656 [mailto:enclosed@mail.tld]
19658 mailto:inline@mail.tld
19660 <p><a rel="nofollow" class="external autonumber" href="http://first/">[1]</a> <a rel="nofollow" class="external autonumber" href="http://second">[2]</a> <a rel="nofollow" class="external autonumber" href="ftp://ftp">[3]</a>
19661 </p><p><a rel="nofollow" class="external free" href="ftp://inlineftp">ftp://inlineftp</a>
19662 </p><p><a rel="nofollow" class="external text" href="mailto:enclosed@mail.tld">With target</a>
19663 </p><p><a rel="nofollow" class="external autonumber" href="mailto:enclosed@mail.tld">[4]</a>
19664 </p><p><a rel="nofollow" class="external free" href="mailto:inline@mail.tld">mailto:inline@mail.tld</a>
19667 <p><a rel="mw:ExtLink" class="external autonumber" href="http://first/"></a> <a rel="mw:ExtLink" class="external autonumber" href="http://second"></a> <a rel="mw:ExtLink" class="external autonumber" href="ftp://ftp"></a></p>
19668 <p><a rel="mw:ExtLink" class="external free" href="ftp://inlineftp">ftp://inlineftp</a></p>
19669 <p><a rel="mw:ExtLink" class="external text" href="mailto:enclosed@mail.tld">With target</a></p>
19670 <p><a rel="mw:ExtLink" class="external autonumber" href="mailto:enclosed@mail.tld"></a></p>
19671 <p><a rel="mw:ExtLink" class="external free" href="mailto:inline@mail.tld">mailto:inline@mail.tld</a></p>
19676 # Security and HTML correctness
19677 # From Nick Jenkins' fuzz testing
19681 Fuzz testing: Parser13
19695 # Note that Parsoid output differs from the PHP parser here: the PHP
19696 # parser breaks the URL for the magic word, while in Parsoid the URL
19697 # production takes precedence.
19699 Fuzz testing: Parser14
19704 <h2><span class="mw-headline" id="onmouseover.3D">onmouseover=</span><span class="mw-editsection"><span class="mw-editsection-bracket">[</span><a href="/index.php?title=Parser_test&action=edit&section=1" title="Edit section: onmouseover=">edit</a><span class="mw-editsection-bracket">]</span></span></h2>
19705 http://<div id="toc" class="toc"><input type="checkbox" role="button" id="toctogglecheckbox" class="toctogglecheckbox" style="display:none"/><div class="toctitle" lang="en" dir="ltr"><h2>Contents</h2><span class="toctogglespan"><label class="toctogglelabel" for="toctogglecheckbox"></label></span></div>
19707 <li class="toclevel-1 tocsection-1"><a href="#onmouseover.3D"><span class="tocnumber">1</span> <span class="toctext">onmouseover=</span></a></li>
19713 <h2><span class="mw-headline" id="onmouseover.3D">onmouseover=</span><span class="mw-editsection"><span class="mw-editsection-bracket">[</span><a href="/index.php?title=Parser_test&action=edit&section=1" title="Edit section: onmouseover=">edit</a><span class="mw-editsection-bracket">]</span></span></h2><p>
19714 http://</p><div id="toc" class="toc"><input type="checkbox" role="button" id="toctogglecheckbox" class="toctogglecheckbox" style="display:none" /><div class="toctitle" lang="en" dir="ltr"><h2>Contents</h2><span class="toctogglespan"><label class="toctogglelabel" for="toctogglecheckbox"></label></span></div>
19716 <li class="toclevel-1 tocsection-1"><a href="#onmouseover.3D"><span class="tocnumber">1</span> <span class="toctext">onmouseover=</span></a></li>
19720 <h2 id="onmouseover="><span id="onmouseover.3D" typeof="mw:FallbackId"></span>onmouseover=</h2>
19721 <p><a rel="mw:ExtLink" class="external free" href="http://__TOC__" data-parsoid='{"stx":"url"}'>http://__TOC__</a></p>
19725 Fuzz testing: Parser14-table
19727 parsoid=wt2html,html2html
19732 <h2><span class="mw-headline" id="a">a</span><span class="mw-editsection"><span class="mw-editsection-bracket">[</span><a href="/index.php?title=Parser_test&action=edit&section=1" title="Edit section: a">edit</a><span class="mw-editsection-bracket">]</span></span></h2>
19733 <table style="__TOC__">
19738 <h2><span class="mw-headline" id="a">a</span><span class="mw-editsection"><span class="mw-editsection-bracket">[</span><a href="/index.php?title=Parser_test&action=edit&section=1" title="Edit section: a">edit</a><span class="mw-editsection-bracket">]</span></span></h2>
19739 <table style="__TOC__">
19746 <table style="__TOC__"></table>
19749 # Known to produce bogus xml (extra </td>)
19750 # Don't add the html/php section since it generates broken HTML
19752 Fuzz testing: Parser16
19769 Fuzz testing: Parser21
19772 !irc://{{ftp://a" onmouseover="alert('hello world');"
19777 <th><a rel="nofollow" class="external free" href="irc://{{ftp://a">irc://{{ftp://a</a>" onmouseover="alert('hello world');"
19787 Fuzz testing: Parser22
19789 http://===r:::https://b
19793 <p><a rel="nofollow" class="external free" href="http://===r:::https://b">http://===r:::https://b</a>
19801 ## Remex doesn't account for fostered content.
19802 ## Known to produce bad XML for now
19804 Fuzz testing: Parser24
19811 | {{{{SSSll!!!!!!!VVVV)]]][[Special:*xxxxxxx--><noinclude>}}}} >
19812 <br style="onmouseover='alert(document.cookie);' " />
19814 MOVE YOUR MOUSE CURSOR OVER THIS TEXT
19819 <u class="|">}}}} >
19820 <br style="onmouseover='alert(document.cookie);'" />
19822 MOVE YOUR MOUSE CURSOR OVER THIS TEXT
19832 <u class="|">}}}} >
19833 <br style="onmouseover='alert(document.cookie);'" />
19835 MOVE YOUR MOUSE CURSOR OVER THIS TEXT
19836 </u><table><tbody><tr>
19840 </tbody></table><p><u class="|">
19843 <p data-parsoid='{"fostered":true,"autoInsertedEnd":true,"autoInsertedStart":true}'>
19845 <u class="|" data-parsoid='{"stx":"html","a":{"{{{{SSSll!!!!!!!VVVV)]]][[Special:*xxxxxxx--":null},"sa":{"{{{{SSSll!!!!!!!VVVV)]]][[Special:*xxxxxxx--":""},"autoInsertedEnd":true}'><meta typeof="mw:Includes/NoInclude" data-parsoid='{"src":"<noinclude>"}'/>}}}} >
19846 <br style="onmouseover='alert(document.cookie);' " data-parsoid='{"stx":"html","selfClose":true}'/>
19848 MOVE YOUR MOUSE CURSOR OVER THIS TEXT</u></p>
19849 <table data-parsoid='{"autoInsertedEnd":true}'><tbody><tr data-parsoid='{"autoInsertedStart":true}'><td></td></tr></tbody></table>
19852 # Note: the current result listed for this is not what the original one was,
19853 # but the original bug was JavaScript injection, which is fixed in any case.
19854 # It's not clear that the original result listed was any more correct than the
19855 # current one. Original result:
19858 # <li class="||">
19859 # }}}blah" onmouseover="alert('hello world');" align="left"<b>MOVE MOUSE CURSOR OVER HERE</b>
19861 Fuzz testing: Parser25 (T8055)
19867 }}}blah" onmouseover="alert('hello world');" align="left"'''MOVE MOUSE CURSOR OVER HERE
19869 <p><LI CLASS=blah" onmouseover="alert('hello world');" align="left"<b>MOVE MOUSE CURSOR OVER HERE</b>
19872 <span about="#mwt1" typeof="mw:Param" data-parsoid='{"pi":[[{"k":"1"},{"k":"2"},{"k":"3"}]]}' data-mw='{"parts":[{"templatearg":{"target":{"wt":"\n"},"params":{"1":{"wt":" \n<LI CLASS="},"2":{"wt":""},"3":{"wt":"\n >\n"}},"i":0}},"blah\" onmouseover=\"alert('hello world');\" align=\"left\"'''MOVE MOUSE CURSOR OVER HERE"]}'>
19873 </span><p about="#mwt1"><LI CLASS=blah" onmouseover="alert('hello world');" align="left"<b>MOVE MOUSE CURSOR OVER HERE</b></p>
19877 Fuzz testing: URL adjacent extension (with space, clean)
19879 http://example.com <nowiki>junk</nowiki>
19881 <p><a rel="nofollow" class="external free" href="http://example.com">http://example.com</a> junk
19884 <p><a rel="mw:ExtLink" class="external free" href="http://example.com" data-parsoid='{"stx":"url"}'>http://example.com</a> <span typeof="mw:Nowiki">junk</span></p>
19888 Fuzz testing: URL adjacent extension (no space, dirty; nowiki)
19890 http://example.com<nowiki>junk</nowiki>
19892 <p><a rel="nofollow" class="external free" href="http://example.com">http://example.com</a>junk
19895 <p><a rel="mw:ExtLink" class="external free" href="http://example.com" data-parsoid='{"stx":"url"}'>http://example.com</a><span typeof="mw:Nowiki">junk</span></p>
19899 Fuzz testing: URL adjacent extension (no space, dirty; pre)
19901 http://example.com<pre>junk</pre>
19903 <a rel="nofollow" class="external free" href="http://example.com">http://example.com</a><pre>junk</pre>
19906 <p><a rel="nofollow" class="external free" href="http://example.com">http://example.com</a></p><pre>junk</pre>
19908 <p><a rel="mw:ExtLink" class="external free" href="http://example.com" data-parsoid='{"stx":"url"}'>http://example.com</a></p><pre typeof="mw:Extension/pre" about="#mwt2" data-mw='{"name":"pre","attrs":{},"body":{"extsrc":"junk"}}'>junk</pre>
19912 Fuzz testing: image with bogus manual thumbnail
19914 [[Image:foobar.jpg|thumbnail= ]]
19916 <div class="thumb tright"><div class="thumbinner" style="width:182px;">Error creating thumbnail: <div class="thumbcaption"></div></div></div>
19919 <figure class="mw-default-size" typeof="mw:Error mw:Image/Thumb" data-parsoid='{"optList":[{"ck":"manualthumb","ak":"thumbnail= "}]}' data-mw='{"errors":[{"key":"apierror-invalidtitle","message":"Invalid thumbnail title.","params":{"name":""}}],"thumb":""}'><a href="./File:Foobar.jpg" data-parsoid='{"a":{"href":"./File:Foobar.jpg"},"sa":{"href":"Image:foobar.jpg"}}'><img resource="./File:Foobar.jpg" src="./Special:FilePath/Foobar.jpg" height="220" width="220" data-parsoid='{"a":{"resource":"./File:Foobar.jpg","height":"220","width":"220"},"sa":{"resource":"Image:foobar.jpg"}}'/></a></figure>
19922 # Parsoid will emit the newline literally in wt2wt; see next test case.
19924 Fuzz testing: encoded newline in generated HTML replacements (T8577)
19928 <pre dir=" "></pre>
19930 <pre dir=" "></pre>
19933 <pre typeof="mw:Extension/pre" about="#mwt2" dir="
19934 " data-mw='{"name":"pre","attrs":{"dir":"\n"},"body":{"extsrc":""}}'></pre>
19938 Fuzz testing: encoded newline in generated HTML replacements, html2wt (T8577)
19942 <pre typeof="mw:Extension/pre" about="#mwt2" dir="
19943 " data-mw='{"name":"pre","attrs":{"dir":"\n"},"body":{"extsrc":""}}'></pre>
19953 Templates in extension attributes are not expanded
19955 <pre dir="{{echo|ltr}}"></pre>
19957 <pre dir="{{echo|ltr}}"></pre>
19960 <pre typeof="mw:Extension/pre" about="#mwt2" dir="{{echo|ltr}}" data-mw='{"name":"pre","attrs":{"dir":"{{echo|ltr}}"},"body":{"extsrc":""}}'></pre>
19964 Parsing optional HTML elements (T8171)
19969 <td> Some tabular data</td>
19970 <td> More tabular data ...
19971 <td> And yet som tabular data</td>
19977 <td> Some tabular data</td>
19978 <td> More tabular data ...
19979 </td><td> And yet som tabular data</td>
19986 Correct handling of <td>, <tr> (T8171)
19991 <td> Some tabular data</td>
19992 <td> More tabular data ...</td>
19993 <td> And yet som tabular data</td>
19999 <td> Some tabular data</td>
20000 <td> More tabular data ...</td>
20001 <td> And yet som tabular data</td>
20009 Parsing crashing regression (fr:JavaScript)
20013 <p></body></x>
20018 Inline wiki vs wiki block nesting
20024 <p><b>Bold paragraph</b>
20025 </p><p>New wiki paragraph
20029 # FIXME: The current php output is documented
20030 # and desired output is the parsoid target.
20032 Inline HTML vs wiki block nesting
20038 <p><b>Bold paragraph
20039 </p><p>New wiki paragraph</b>
20042 <p><b>Bold paragraph
20043 </b></p><p><b>New wiki paragraph
20046 <p><b>Bold paragraph</b>
20047 </p><p>New wiki paragraph
20051 # Original result was this:
20052 # <p><b>bold</b><b>bold<i>bolditalics</i></b>
20054 # While that might be marginally more intuitive, maybe, the six-apostrophe
20055 # construct is clearly pathological and the result stated here (which is what
20056 # the parser actually does) is about as reasonable as anything.
20058 Mixing markup for italics and bold
20061 '''bold''''''bold''bolditalics'''''
20063 <p>'<i>bold'</i><b>bold<i>bolditalics</i></b>
20071 Article for special page transclusion test
20075 Special page transclusion
20078 {{Special:Prefixindex/Xyzzyx}}
20080 <ul class="mw-prefixindex-list"><li><a href="/wiki/Xyzzyx" title="Xyzzyx">Xyzzyx</a></li>
20086 Special page transclusion twice (T7021)
20089 {{Special:Prefixindex/Xyzzyx}}
20090 {{Special:Prefixindex/Xyzzyx}}
20092 <ul class="mw-prefixindex-list"><li><a href="/wiki/Xyzzyx" title="Xyzzyx">Xyzzyx</a></li>
20094 <ul class="mw-prefixindex-list"><li><a href="/wiki/Xyzzyx" title="Xyzzyx">Xyzzyx</a></li>
20100 Transclusion of default MediaWiki message
20102 {{MediaWiki:Mainpage}}
20109 Transclusion of nonexistent MediaWiki message
20111 {{MediaWiki:Mainpagexxx}}
20113 <p><a href="/index.php?title=MediaWiki:Mainpagexxx&action=edit&redlink=1" class="new" title="MediaWiki:Mainpagexxx (page does not exist)">MediaWiki:Mainpagexxx</a>
20118 Transclusion of MediaWiki message with underscore
20120 {{MediaWiki:history_short}}
20127 Transclusion of MediaWiki message with space
20129 {{MediaWiki:history short}}
20136 Invalid header with following text
20146 Section extraction test (section 0)
20166 Section extraction test (section 1)
20188 Section extraction test (section 2)
20209 Section extraction test (section 3)
20229 Section extraction test (section 4)
20253 Section extraction test (section 5)
20273 Section extraction test (section 6)
20294 Section extraction test (section 7)
20314 Section extraction test (section 8)
20334 Section extraction test (section 9)
20355 Section extraction test (section 10)
20375 Section extraction test (nonexistent section 11)
20394 Section extraction test with bogus heading (section 1)
20399 ==bogus== not a legal section
20403 ==bogus== not a legal section
20407 Section extraction test with bogus heading (section 2)
20412 ==bogus== not a legal section
20419 Section extraction test with comment after heading (section 1)
20431 Section extraction test with comment after heading (section 2)
20443 Section extraction test with bogus <nowiki> heading (section 1)
20448 ==bogus== <nowiki>not a legal section</nowiki>
20452 ==bogus== <nowiki>not a legal section</nowiki>
20456 Section extraction test with bogus <nowiki> heading (section 2)
20461 ==bogus== <nowiki>not a legal section</nowiki>
20467 # Formerly testing for T4587, now resolved by the use of unmarked sections
20468 # instead of respecting commented sections
20470 Section extraction prefixed by comment (section 1)
20481 Section extraction prefixed by comment (section 2)
20491 # Formerly testing for T4607, now resolved by the use of unmarked sections
20492 # instead of respecting HTML-style headings
20494 Section extraction, mixed wiki and html (section 1)
20510 Section extraction, mixed wiki and html (section 2)
20526 # Formerly testing for T5342
20528 Section extraction, heading surrounded by <noinclude>
20532 <noinclude>==unmarked==</noinclude>
20538 # Test behavior of T21910
20540 Sectiion with all-equals
20545 The line above must have a trailing space
20548 But just in case it doesn't...
20552 But just in case it doesn't...
20556 Section replacement test (section 0)
20587 Section replacement test (section 1)
20616 Section replacement test (section 2)
20646 Section replacement test (section 3)
20677 Section replacement test (section 4)
20704 Section replacement test (section 5)
20735 Section replacement test (section 6)
20765 Section replacement test (section 7)
20796 Section replacement test (section 8)
20827 Section replacement test (section 9)
20856 Section replacement test (section 10)
20886 Section replacement test with initial whitespace (T15728)
20890 Preformatted initial line
20894 Preformatted initial line
20901 Section extraction, heading followed by pre with 20 spaces (T8398)
20913 Section extraction, heading followed by pre with 19 spaces (T8398 sanity check)
20926 Section extraction, <pre> around bogus header (T12309)
20943 Section replacement, <pre> around bogus header (T12309)
20964 Handling of 
 in URLs
20968 <ul><li><a rel="nofollow" class="external free" href="irc://%0Aa">irc://%0Aa</a></li></ul>
20971 <ul><li><a rel="mw:ExtLink" class="external free" href="irc://%0Aa" data-parsoid='{"stx":"url","a":{"href":"irc://%0Aa"},"sa":{"href":"irc://&#x0A;a"}}'>irc://%0Aa</a></li></ul>
20975 Handling of %0A in URLs
20979 <ul><li><a rel="nofollow" class="external free" href="irc://%0Aa">irc://%0Aa</a></li></ul>
20982 <ul><li><a rel="mw:ExtLink" class="external free" href="irc://%0Aa">irc://%0Aa</a></li></ul>
20985 # The PHP parser strips the empty tags out for giggles; parsoid doesn't.
20987 5 quotes, code coverage +1 line
20994 <p><b><i></i></b></p>
20997 # same html as previous, but wikitext adjusted to match parsoid html2wt
20998 # note that wt2html and html2html will put the <i> before the <b>
21000 5 quotes, code coverage +1 line w/ nowiki (1)
21002 parsoid=wt2wt,html2wt
21004 '''''<nowiki/>'''''
21009 <p><b><i></i></b></p>
21012 # same as previous, just swapping the <i> and <b>
21014 5 quotes, code coverage +1 line w/ nowiki (2)
21016 '''''<nowiki/>'''''
21021 <p><i><b></b></i></p>
21025 Special:Search page linking.
21029 <p><a href="/wiki/Special:Search" title="Special:Search">Special:Search</a>
21034 {{!}} is a magic word
21036 {{!}} is a magic word there and {{!}} is still a magic word here
21037 | is not a magic word here but {{!}} is still a magic word here
21039 <p>| is a magic word there and | is still a magic word here
21040 | is not a magic word here but | is still a magic word here
21043 <p><span about="#mwt1" typeof="mw:Transclusion" data-parsoid='{"pi":[[]]}' data-mw='{"parts":[{"template":{"target":{"wt":"!","function":"!"},"params":{},"i":0}}]}'>|</span> is a magic word there and <span about="#mwt2" typeof="mw:Transclusion" data-parsoid='{"pi":[[]]}' data-mw='{"parts":[{"template":{"target":{"wt":"!","function":"!"},"params":{},"i":0}}]}'>|</span> is still a magic word here
21044 | is not a magic word here but <span about="#mwt3" typeof="mw:Transclusion" data-parsoid='{"pi":[[]]}' data-mw='{"parts":[{"template":{"target":{"wt":"!","function":"!"},"params":{},"i":0}}]}'>|</span> is still a magic word here</p>
21050 title=[[Parser test]]
21064 *{{SUBJECTPAGENAME}}
21065 *{{SUBJECTPAGENAMEE}}
21068 *{{NAMESPACENUMBER}}
21073 *{{Dynamic|{{NUMBEROFUSERS}}|{{NUMBEROFPAGES}}|{{CURRENTVERSION}}|{{CONTENTLANGUAGE}}|{{DIRECTIONMARK}}|{{CURRENTTIMESTAMP}}|{{NUMBEROFARTICLES}}}}
21075 <ul><li>Parser test</li>
21076 <li>Parser_test</li>
21077 <li>Parser test</li>
21078 <li>Parser_test</li>
21079 <li>Parser test</li>
21080 <li>Parser_test</li>
21081 <li>Parser test</li>
21082 <li>Parser_test</li>
21083 <li>Parser test</li>
21084 <li>Parser_test</li>
21085 <li>Talk:Parser test</li>
21086 <li>Talk:Parser_test</li>
21087 <li>Parser test</li>
21088 <li>Parser_test</li>
21096 <li><a href="/index.php?title=Template:Dynamic&action=edit&redlink=1" class="new" title="Template:Dynamic (page does not exist)">Template:Dynamic</a></li></ul>
21099 ### Note: Above tests excludes the "{{NUMBEROFADMINS}}" magic word because it generates a MySQL error when included.
21102 Gallery with valid attributes
21104 <gallery type="123" summary="345">
21105 File:File:Foobar.jpg
21108 <ul class="gallery mw-gallery-traditional" type="123">
21109 <li class="gallerybox" style="width: 155px"><div style="width: 155px">
21110 <div class="thumb" style="height: 150px;">File:Foobar.jpg</div>
21111 <div class="gallerytext">
21117 <ul class="gallery mw-gallery-traditional" type="123" typeof="mw:Extension/gallery" about="#mwt2" data-mw='{"name":"gallery","attrs":{"type":"123","summary":"345"},"body":{"extsrc":"\nFile:File:Foobar.jpg\n"}}'>
21118 <li class="gallerybox" style="width: 155px;"><div class="thumb" style="width: 150px; height: 150px;"><figure-inline typeof="mw:Error mw:Image"><a href="./File:File:Foobar.jpg"><img resource="./File:File:Foobar.jpg" src="./Special:FilePath/File:Foobar.jpg" height="120" width="120"/></a></figure-inline></div><div class="gallerytext"></div></li>
21122 ## Parsoid thinks the "centre" here is a property, not a caption.
21127 "modes": ["wt2html"],
21128 "nativeGallery": true
21136 image4 |300px| centre
21137 image5.svg| http://///////
21142 <ul class="gallery mw-gallery-traditional">
21143 <li class="gallerybox" style="width: 155px"><div style="width: 155px">
21144 <div class="thumb" style="height: 150px;">Image1.png</div>
21145 <div class="gallerytext">
21148 <li class="gallerybox" style="width: 155px"><div style="width: 155px">
21149 <div class="thumb" style="height: 150px;">Image2.gif</div>
21150 <div class="gallerytext">
21153 <li class="gallerybox" style="width: 155px"><div style="width: 155px">
21154 <div class="thumb" style="height: 150px;">Image3</div>
21155 <div class="gallerytext">
21158 <li class="gallerybox" style="width: 155px"><div style="width: 155px">
21159 <div class="thumb" style="height: 150px;">Image4</div>
21160 <div class="gallerytext">
21165 <li class="gallerybox" style="width: 155px"><div style="width: 155px">
21166 <div class="thumb" style="height: 150px;">Image5.svg</div>
21167 <div class="gallerytext">
21168 <p><a rel="nofollow" class="external free" href="http://///////">http://///////</a>
21172 <li class="gallerybox" style="width: 155px"><div style="width: 155px">
21173 <div class="thumb" style="height: 150px;">* image6</div>
21174 <div class="gallerytext">
21180 <ul class="gallery mw-gallery-traditional" typeof="mw:Extension/gallery" about="#mwt3" data-mw='{"name":"gallery","attrs":{},"body":{}}'>
21181 <li class="gallerybox" style="width: 155px;"><div class="thumb" style="width: 150px; height: 150px;"><figure-inline typeof="mw:Error mw:Image"><a href="./File:Image1.png"><img resource="./File:Image1.png" src="./Special:FilePath/Image1.png" height="120" width="120"/></a></figure-inline></div><div class="gallerytext"></div></li>
21182 <li class="gallerybox" style="width: 155px;"><div class="thumb" style="width: 150px; height: 150px;"><figure-inline typeof="mw:Error mw:Image"><a href="./File:Image2.gif"><img resource="./File:Image2.gif" src="./Special:FilePath/Image2.gif" height="120" width="120"/></a></figure-inline></div><div class="gallerytext"></div></li>
21183 <li class="gallerybox" style="width: 155px;"><div class="thumb" style="width: 150px; height: 150px;"><figure-inline typeof="mw:Error mw:Image"><a href="./File:Image3"><img resource="./File:Image3" src="./Special:FilePath/Image3" height="120" width="120"/></a></figure-inline></div><div class="gallerytext"></div></li>
21184 <li class="gallerybox" style="width: 155px;"><div class="thumb" style="width: 150px; height: 150px;"><figure-inline typeof="mw:Error mw:Image"><a href="./File:Image4"><img resource="./File:Image4" src="./Special:FilePath/Image4" height="300" width="300"/></a></figure-inline></div><div class="gallerytext"></div></li>
21185 <li class="gallerybox" style="width: 155px;"><div class="thumb" style="width: 150px; height: 150px;"><figure-inline typeof="mw:Error mw:Image"><a href="./File:Image5.svg"><img resource="./File:Image5.svg" src="./Special:FilePath/Image5.svg" height="120" width="120"/></a></figure-inline></div><div class="gallerytext"> <a rel="mw:ExtLink" class="external free" href="http://///////">http://///////</a></div></li>
21186 <li class="gallerybox" style="width: 155px;"><div class="thumb" style="width: 150px; height: 150px;"><figure-inline typeof="mw:Error mw:Image"><a href="./File:*_image6"><img resource="./File:*_image6" src="./Special:FilePath/*_image6" height="120" width="120"/></a></figure-inline></div><div class="gallerytext"></div></li>
21191 Gallery (with options, html)
21194 "modes": ["wt2html", "html2html"],
21195 "nativeGallery": true
21198 <gallery widths="70px" heights="40px" perrow="2" caption="Foo [[Main Page]]">
21199 File:Nonexistent.jpg|caption
21200 File:Nonexistent.jpg
21201 image:foobar.jpg|some '''caption''' [[Main Page]]
21203 image:foobar.jpg|Blabla|alt=This is a foo-bar.|blabla.
21206 <ul class="gallery mw-gallery-traditional" style="max-width: 226px;_width: 226px;">
21207 <li class='gallerycaption'>Foo <a href="/wiki/Main_Page" title="Main Page">Main Page</a></li>
21208 <li class="gallerybox" style="width: 105px"><div style="width: 105px">
21209 <div class="thumb" style="height: 70px;">Nonexistent.jpg</div>
21210 <div class="gallerytext">
21215 <li class="gallerybox" style="width: 105px"><div style="width: 105px">
21216 <div class="thumb" style="height: 70px;">Nonexistent.jpg</div>
21217 <div class="gallerytext">
21220 <li class="gallerybox" style="width: 105px"><div style="width: 105px">
21221 <div class="thumb" style="width: 100px;"><div style="margin:31px auto;"><a href="/wiki/File:Foobar.jpg" class="image"><img alt="" src="http://example.com/images/thumb/3/3a/Foobar.jpg/70px-Foobar.jpg" width="70" height="8" srcset="http://example.com/images/thumb/3/3a/Foobar.jpg/105px-Foobar.jpg 1.5x, http://example.com/images/thumb/3/3a/Foobar.jpg/140px-Foobar.jpg 2x" /></a></div></div>
21222 <div class="gallerytext">
21223 <p>some <b>caption</b> <a href="/wiki/Main_Page" title="Main Page">Main Page</a>
21227 <li class="gallerybox" style="width: 105px"><div style="width: 105px">
21228 <div class="thumb" style="width: 100px;"><div style="margin:31px auto;"><a href="/wiki/File:Foobar.jpg" class="image"><img alt="Foobar.jpg" src="http://example.com/images/thumb/3/3a/Foobar.jpg/70px-Foobar.jpg" width="70" height="8" srcset="http://example.com/images/thumb/3/3a/Foobar.jpg/105px-Foobar.jpg 1.5x, http://example.com/images/thumb/3/3a/Foobar.jpg/140px-Foobar.jpg 2x" /></a></div></div>
21229 <div class="gallerytext">
21232 <li class="gallerybox" style="width: 105px"><div style="width: 105px">
21233 <div class="thumb" style="width: 100px;"><div style="margin:31px auto;"><a href="/wiki/File:Foobar.jpg" class="image"><img alt="This is a foo-bar." src="http://example.com/images/thumb/3/3a/Foobar.jpg/70px-Foobar.jpg" width="70" height="8" srcset="http://example.com/images/thumb/3/3a/Foobar.jpg/105px-Foobar.jpg 1.5x, http://example.com/images/thumb/3/3a/Foobar.jpg/140px-Foobar.jpg 2x" /></a></div></div>
21234 <div class="gallerytext">
21242 <ul class="gallery mw-gallery-traditional" style="max-width: 226px; _width: 226px;" typeof="mw:Extension/gallery" about="#mwt3" data-mw='{"name":"gallery","attrs":{"widths":"70px","heights":"40px","perrow":"2"},"body":{}}'>
21243 <li class="gallerycaption">Foo <a rel="mw:WikiLink" href="./Main_Page" title="Main Page">Main Page</a></li>
21244 <li class="gallerybox" style="width: 105px;"><div class="thumb" style="width: 100px; height: 70px;"><figure-inline typeof="mw:Error mw:Image"><a href="./File:Nonexistent.jpg"><img resource="./File:Nonexistent.jpg" src="./Special:FilePath/Nonexistent.jpg" height="40" width="70"/></a></figure-inline></div><div class="gallerytext">caption</div></li>
21245 <li class="gallerybox" style="width: 105px;"><div class="thumb" style="width: 100px; height: 70px;"><figure-inline typeof="mw:Error mw:Image"><a href="./File:Nonexistent.jpg"><img resource="./File:Nonexistent.jpg" src="./Special:FilePath/Nonexistent.jpg" height="40" width="70"/></a></figure-inline></div><div class="gallerytext"></div></li>
21246 <li class="gallerybox" style="width: 105px;"><div class="thumb" style="width: 100px; height: 70px;"><figure-inline typeof="mw:Image"><a href="./File:Foobar.jpg"><img resource="./File:Foobar.jpg" src="//example.com/images/thumb/3/3a/Foobar.jpg/70px-Foobar.jpg" data-file-width="1941" data-file-height="220" data-file-type="bitmap" height="8" width="70"/></a></figure-inline></div><div class="gallerytext">some <b>caption</b> <a rel="mw:WikiLink" href="./Main_Page" title="Main Page">Main Page</a></div></li>
21247 <li class="gallerybox" style="width: 105px;"><div class="thumb" style="width: 100px; height: 70px;"><figure-inline typeof="mw:Image"><a href="./File:Foobar.jpg"><img resource="./File:Foobar.jpg" src="//example.com/images/thumb/3/3a/Foobar.jpg/70px-Foobar.jpg" data-file-width="1941" data-file-height="220" data-file-type="bitmap" height="8" width="70"/></a></figure-inline></div><div class="gallerytext"></div></li>
21248 <li class="gallerybox" style="width: 105px;"><div class="thumb" style="width: 100px; height: 70px;"><figure-inline typeof="mw:Image"><a href="./File:Foobar.jpg"><img alt="This is a foo-bar." resource="./File:Foobar.jpg" src="//example.com/images/thumb/3/3a/Foobar.jpg/70px-Foobar.jpg" data-file-width="1941" data-file-height="220" data-file-type="bitmap" height="8" width="70"/></a></figure-inline></div><div class="gallerytext">blabla.</div></li>
21253 Gallery (with options, extsrc)
21256 "nativeGallery": false
21259 <gallery widths="70px" heights="40px" perrow="2" caption="Foo [[Main Page]]">
21260 File:Nonexistent.jpg|caption
21261 File:Nonexistent.jpg
21262 image:foobar.jpg|some '''caption''' [[Main Page]]
21264 image:foobar.jpg|Blabla|alt=This is a foo-bar.|blabla.
21267 <ul class="gallery mw-gallery-traditional" style="max-width: 226px;_width: 226px;">
21268 <li class='gallerycaption'>Foo <a href="/wiki/Main_Page" title="Main Page">Main Page</a></li>
21269 <li class="gallerybox" style="width: 105px"><div style="width: 105px">
21270 <div class="thumb" style="height: 70px;">Nonexistent.jpg</div>
21271 <div class="gallerytext">
21276 <li class="gallerybox" style="width: 105px"><div style="width: 105px">
21277 <div class="thumb" style="height: 70px;">Nonexistent.jpg</div>
21278 <div class="gallerytext">
21281 <li class="gallerybox" style="width: 105px"><div style="width: 105px">
21282 <div class="thumb" style="width: 100px;"><div style="margin:31px auto;"><a href="/wiki/File:Foobar.jpg" class="image"><img alt="" src="http://example.com/images/thumb/3/3a/Foobar.jpg/70px-Foobar.jpg" width="70" height="8" srcset="http://example.com/images/thumb/3/3a/Foobar.jpg/105px-Foobar.jpg 1.5x, http://example.com/images/thumb/3/3a/Foobar.jpg/140px-Foobar.jpg 2x" /></a></div></div>
21283 <div class="gallerytext">
21284 <p>some <b>caption</b> <a href="/wiki/Main_Page" title="Main Page">Main Page</a>
21288 <li class="gallerybox" style="width: 105px"><div style="width: 105px">
21289 <div class="thumb" style="width: 100px;"><div style="margin:31px auto;"><a href="/wiki/File:Foobar.jpg" class="image"><img alt="Foobar.jpg" src="http://example.com/images/thumb/3/3a/Foobar.jpg/70px-Foobar.jpg" width="70" height="8" srcset="http://example.com/images/thumb/3/3a/Foobar.jpg/105px-Foobar.jpg 1.5x, http://example.com/images/thumb/3/3a/Foobar.jpg/140px-Foobar.jpg 2x" /></a></div></div>
21290 <div class="gallerytext">
21293 <li class="gallerybox" style="width: 105px"><div style="width: 105px">
21294 <div class="thumb" style="width: 100px;"><div style="margin:31px auto;"><a href="/wiki/File:Foobar.jpg" class="image"><img alt="This is a foo-bar." src="http://example.com/images/thumb/3/3a/Foobar.jpg/70px-Foobar.jpg" width="70" height="8" srcset="http://example.com/images/thumb/3/3a/Foobar.jpg/105px-Foobar.jpg 1.5x, http://example.com/images/thumb/3/3a/Foobar.jpg/140px-Foobar.jpg 2x" /></a></div></div>
21295 <div class="gallerytext">
21303 <ul class="gallery mw-gallery-traditional" style="max-width: 226px; _width: 226px;" typeof="mw:Extension/gallery" about="#mwt3" data-mw='{"name":"gallery","attrs":{"widths":"70px","heights":"40px","perrow":"2","caption":"Foo [[Main Page]]"},"body":{"extsrc":"\nFile:Nonexistent.jpg|caption\nFile:Nonexistent.jpg\nimage:foobar.jpg|some '''caption''' [[Main Page]]\nimage:foobar.jpg\nimage:foobar.jpg|Blabla|alt=This is a foo-bar.|blabla.\n"}}'>
21304 <li class="gallerycaption">Foo <a rel="mw:WikiLink" href="./Main_Page" title="Main Page">Main Page</a></li>
21305 <li class="gallerybox" style="width: 105px;"><div class="thumb" style="width: 100px; height: 70px;"><figure-inline typeof="mw:Error mw:Image"><a href="./File:Nonexistent.jpg"><img resource="./File:Nonexistent.jpg" src="./Special:FilePath/Nonexistent.jpg" height="40" width="70"/></a></figure-inline></div><div class="gallerytext">caption</div></li>
21306 <li class="gallerybox" style="width: 105px;"><div class="thumb" style="width: 100px; height: 70px;"><figure-inline typeof="mw:Error mw:Image"><a href="./File:Nonexistent.jpg"><img resource="./File:Nonexistent.jpg" src="./Special:FilePath/Nonexistent.jpg" height="40" width="70"/></a></figure-inline></div><div class="gallerytext"></div></li>
21307 <li class="gallerybox" style="width: 105px;"><div class="thumb" style="width: 100px; height: 70px;"><figure-inline typeof="mw:Image"><a href="./File:Foobar.jpg"><img resource="./File:Foobar.jpg" src="//example.com/images/thumb/3/3a/Foobar.jpg/70px-Foobar.jpg" data-file-width="1941" data-file-height="220" data-file-type="bitmap" height="8" width="70"/></a></figure-inline></div><div class="gallerytext">some <b>caption</b> <a rel="mw:WikiLink" href="./Main_Page" title="Main Page">Main Page</a></div></li>
21308 <li class="gallerybox" style="width: 105px;"><div class="thumb" style="width: 100px; height: 70px;"><figure-inline typeof="mw:Image"><a href="./File:Foobar.jpg"><img resource="./File:Foobar.jpg" src="//example.com/images/thumb/3/3a/Foobar.jpg/70px-Foobar.jpg" data-file-width="1941" data-file-height="220" data-file-type="bitmap" height="8" width="70"/></a></figure-inline></div><div class="gallerytext"></div></li>
21309 <li class="gallerybox" style="width: 105px;"><div class="thumb" style="width: 100px; height: 70px;"><figure-inline typeof="mw:Image"><a href="./File:Foobar.jpg"><img alt="This is a foo-bar." resource="./File:Foobar.jpg" src="//example.com/images/thumb/3/3a/Foobar.jpg/70px-Foobar.jpg" data-file-width="1941" data-file-height="220" data-file-type="bitmap" height="8" width="70"/></a></figure-inline></div><div class="gallerytext">blabla.</div></li>
21314 Gallery (without px units)
21316 <gallery widths="70" heights="40">
21320 <ul class="gallery mw-gallery-traditional">
21321 <li class="gallerybox" style="width: 105px"><div style="width: 105px">
21322 <div class="thumb" style="width: 100px;"><div style="margin:31px auto;"><a href="/wiki/File:Foobar.jpg" class="image"><img alt="Foobar.jpg" src="http://example.com/images/thumb/3/3a/Foobar.jpg/70px-Foobar.jpg" width="70" height="8" srcset="http://example.com/images/thumb/3/3a/Foobar.jpg/105px-Foobar.jpg 1.5x, http://example.com/images/thumb/3/3a/Foobar.jpg/140px-Foobar.jpg 2x" /></a></div></div>
21323 <div class="gallerytext">
21329 <ul class="gallery mw-gallery-traditional" typeof="mw:Extension/gallery" about="#mwt2" data-mw='{"name":"gallery","attrs":{"widths":"70","heights":"40"},"body":{"extsrc":"\nFile:Foobar.jpg\n"}}'>
21330 <li class="gallerybox" style="width: 105px;"><div class="thumb" style="width: 100px; height: 70px;"><figure-inline typeof="mw:Image"><a href="./File:Foobar.jpg"><img resource="./File:Foobar.jpg" src="//example.com/images/thumb/3/3a/Foobar.jpg/70px-Foobar.jpg" data-file-width="1941" data-file-height="220" data-file-type="bitmap" height="8" width="70"/></a></figure-inline></div><div class="gallerytext"></div></li>
21335 Gallery (with invalid units)
21337 <gallery widths="70em" heights="40em">
21341 <ul class="gallery mw-gallery-traditional">
21342 <li class="gallerybox" style="width: 155px"><div style="width: 155px">
21343 <div class="thumb" style="width: 150px;"><div style="margin:68px auto;"><a href="/wiki/File:Foobar.jpg" class="image"><img alt="Foobar.jpg" src="http://example.com/images/thumb/3/3a/Foobar.jpg/120px-Foobar.jpg" width="120" height="14" srcset="http://example.com/images/thumb/3/3a/Foobar.jpg/180px-Foobar.jpg 1.5x, http://example.com/images/thumb/3/3a/Foobar.jpg/240px-Foobar.jpg 2x" /></a></div></div>
21344 <div class="gallerytext">
21350 <ul class="gallery mw-gallery-traditional" typeof="mw:Extension/gallery" about="#mwt2" data-mw='{"name":"gallery","attrs":{"widths":"70em","heights":"40em"},"body":{"extsrc":"\nFile:Foobar.jpg\n"}}'>
21351 <li class="gallerybox" style="width: 155px;"><div class="thumb" style="width: 150px; height: 150px;"><figure-inline typeof="mw:Image"><a href="./File:Foobar.jpg"><img resource="./File:Foobar.jpg" src="//example.com/images/thumb/3/3a/Foobar.jpg/120px-Foobar.jpg" data-file-width="1941" data-file-height="220" data-file-type="bitmap" height="14" width="120"/></a></figure-inline></div><div class="gallerytext"></div></li>
21356 Gallery with link that has fragment
21359 "modes": ["wt2html", "html2html"],
21360 "nativeGallery": true
21364 image:foobar.jpg|link=Main_Page
21365 image:foobar.jpg|link=Main_Page#section
21366 image:foobar.jpg|link=Main Page#section|caption
21369 <ul class="gallery mw-gallery-traditional">
21370 <li class="gallerybox" style="width: 155px"><div style="width: 155px">
21371 <div class="thumb" style="width: 150px;"><div style="margin:68px auto;"><a href="/wiki/Main_Page"><img alt="Foobar.jpg" src="http://example.com/images/thumb/3/3a/Foobar.jpg/120px-Foobar.jpg" width="120" height="14" srcset="http://example.com/images/thumb/3/3a/Foobar.jpg/180px-Foobar.jpg 1.5x, http://example.com/images/thumb/3/3a/Foobar.jpg/240px-Foobar.jpg 2x" /></a></div></div>
21372 <div class="gallerytext">
21375 <li class="gallerybox" style="width: 155px"><div style="width: 155px">
21376 <div class="thumb" style="width: 150px;"><div style="margin:68px auto;"><a href="/wiki/Main_Page#section"><img alt="Foobar.jpg" src="http://example.com/images/thumb/3/3a/Foobar.jpg/120px-Foobar.jpg" width="120" height="14" srcset="http://example.com/images/thumb/3/3a/Foobar.jpg/180px-Foobar.jpg 1.5x, http://example.com/images/thumb/3/3a/Foobar.jpg/240px-Foobar.jpg 2x" /></a></div></div>
21377 <div class="gallerytext">
21380 <li class="gallerybox" style="width: 155px"><div style="width: 155px">
21381 <div class="thumb" style="width: 150px;"><div style="margin:68px auto;"><a href="/wiki/Main_Page#section"><img alt="" src="http://example.com/images/thumb/3/3a/Foobar.jpg/120px-Foobar.jpg" width="120" height="14" srcset="http://example.com/images/thumb/3/3a/Foobar.jpg/180px-Foobar.jpg 1.5x, http://example.com/images/thumb/3/3a/Foobar.jpg/240px-Foobar.jpg 2x" /></a></div></div>
21382 <div class="gallerytext">
21390 <ul class="gallery mw-gallery-traditional" typeof="mw:Extension/gallery" about="#mwt2" data-mw='{"name":"gallery","attrs":{},"body":{}}'>
21391 <li class="gallerybox" style="width: 155px;"><div class="thumb" style="width: 150px; height: 150px;"><figure-inline typeof="mw:Image"><a href="./Main_Page"><img resource="./File:Foobar.jpg" src="//example.com/images/thumb/3/3a/Foobar.jpg/120px-Foobar.jpg" data-file-width="1941" data-file-height="220" data-file-type="bitmap" height="14" width="120"/></a></figure-inline></div><div class="gallerytext"></div></li>
21392 <li class="gallerybox" style="width: 155px;"><div class="thumb" style="width: 150px; height: 150px;"><figure-inline typeof="mw:Image"><a href="./Main_Page#section"><img resource="./File:Foobar.jpg" src="//example.com/images/thumb/3/3a/Foobar.jpg/120px-Foobar.jpg" data-file-width="1941" data-file-height="220" data-file-type="bitmap" height="14" width="120"/></a></figure-inline></div><div class="gallerytext"></div></li>
21393 <li class="gallerybox" style="width: 155px;"><div class="thumb" style="width: 150px; height: 150px;"><figure-inline typeof="mw:Image"><a href="./Main_Page#section"><img resource="./File:Foobar.jpg" src="//example.com/images/thumb/3/3a/Foobar.jpg/120px-Foobar.jpg" data-file-width="1941" data-file-height="220" data-file-type="bitmap" height="14" width="120"/></a></figure-inline></div><div class="gallerytext">caption</div></li>
21397 ## Whoops, Parsoid shouldn't be parsing templates in the attribute caption!
21399 Gallery with template inside caption
21402 "nativeGallery": true
21405 <gallery caption="{{echo|hi}}">
21406 File:Foobar.jpg|{{echo|ho}}
21409 <ul class="gallery mw-gallery-traditional">
21410 <li class='gallerycaption'>{{echo|hi}}</li>
21411 <li class="gallerybox" style="width: 155px"><div style="width: 155px">
21412 <div class="thumb" style="width: 150px;"><div style="margin:68px auto;"><a href="/wiki/File:Foobar.jpg" class="image"><img alt="" src="http://example.com/images/thumb/3/3a/Foobar.jpg/120px-Foobar.jpg" width="120" height="14" srcset="http://example.com/images/thumb/3/3a/Foobar.jpg/180px-Foobar.jpg 1.5x, http://example.com/images/thumb/3/3a/Foobar.jpg/240px-Foobar.jpg 2x" /></a></div></div>
21413 <div class="gallerytext">
21421 <ul class="gallery mw-gallery-traditional" typeof="mw:Extension/gallery" about="#mwt6" data-mw='{"name":"gallery","attrs":{},"body":{}}'>
21422 <li class="gallerycaption"><span about="#mwt3" typeof="mw:Transclusion" data-mw='{"parts":[{"template":{"target":{"wt":"echo","href":"./Template:Echo"},"params":{"1":{"wt":"hi"}},"i":0}}]}'>hi</span></li>
21423 <li class="gallerybox" style="width: 155px;"><div class="thumb" style="width: 150px; height: 150px;"><figure-inline typeof="mw:Image"><a href="./File:Foobar.jpg"><img resource="./File:Foobar.jpg" src="//example.com/images/thumb/3/3a/Foobar.jpg/120px-Foobar.jpg" data-file-width="1941" data-file-height="220" data-file-type="bitmap" height="14" width="120"/></a></figure-inline></div><div class="gallerytext"><span about="#mwt5" typeof="mw:Transclusion" data-mw='{"parts":[{"template":{"target":{"wt":"echo","href":"./Template:Echo"},"params":{"1":{"wt":"ho"}},"i":0}}]}'>ho</span></div></li>
21428 Gallery with wikitext inside caption
21431 "nativeGallery": true
21435 File:Foobar.jpg|alt=galleryalt|[[File:Foobar.jpg|alt=inneralt|20x20px|desc]]
21436 File:Foobar.jpg|alt=galleryalt|{{Test|unamedParam|alt=param}}
21439 <ul class="gallery mw-gallery-traditional">
21440 <li class="gallerybox" style="width: 155px"><div style="width: 155px">
21441 <div class="thumb" style="width: 150px;"><div style="margin:68px auto;"><a href="/wiki/File:Foobar.jpg" class="image"><img alt="galleryalt" src="http://example.com/images/thumb/3/3a/Foobar.jpg/120px-Foobar.jpg" width="120" height="14" srcset="http://example.com/images/thumb/3/3a/Foobar.jpg/180px-Foobar.jpg 1.5x, http://example.com/images/thumb/3/3a/Foobar.jpg/240px-Foobar.jpg 2x" /></a></div></div>
21442 <div class="gallerytext">
21443 <p><a href="/wiki/File:Foobar.jpg" class="image" title="desc"><img alt="inneralt" src="http://example.com/images/thumb/3/3a/Foobar.jpg/20px-Foobar.jpg" width="20" height="2" srcset="http://example.com/images/thumb/3/3a/Foobar.jpg/30px-Foobar.jpg 1.5x, http://example.com/images/thumb/3/3a/Foobar.jpg/40px-Foobar.jpg 2x" /></a>
21447 <li class="gallerybox" style="width: 155px"><div style="width: 155px">
21448 <div class="thumb" style="width: 150px;"><div style="margin:68px auto;"><a href="/wiki/File:Foobar.jpg" class="image"><img alt="galleryalt" src="http://example.com/images/thumb/3/3a/Foobar.jpg/120px-Foobar.jpg" width="120" height="14" srcset="http://example.com/images/thumb/3/3a/Foobar.jpg/180px-Foobar.jpg 1.5x, http://example.com/images/thumb/3/3a/Foobar.jpg/240px-Foobar.jpg 2x" /></a></div></div>
21449 <div class="gallerytext">
21450 <p>This is a test template
21457 <ul class="gallery mw-gallery-traditional" typeof="mw:Extension/gallery" about="#mwt6" data-mw='{"name":"gallery","attrs":{},"body":{}}'>
21458 <li class="gallerybox" style="width: 155px;"><div class="thumb" style="width: 150px; height: 150px;"><figure-inline typeof="mw:Image"><a href="./File:Foobar.jpg"><img alt="galleryalt" resource="./File:Foobar.jpg" src="//example.com/images/thumb/3/3a/Foobar.jpg/120px-Foobar.jpg" data-file-width="1941" data-file-height="220" data-file-type="bitmap" height="14" width="120"/></a></figure-inline></div><div class="gallerytext"><figure-inline typeof="mw:Image" data-mw='{"caption":"desc"}'><a href="./File:Foobar.jpg"><img alt="inneralt" resource="./File:Foobar.jpg" src="//example.com/images/thumb/3/3a/Foobar.jpg/20px-Foobar.jpg" data-file-width="1941" data-file-height="220" data-file-type="bitmap" height="2" width="20"/></a></figure-inline></div></li>
21459 <li class="gallerybox" style="width: 155px;"><div class="thumb" style="width: 150px; height: 150px;"><figure-inline typeof="mw:Image"><a href="./File:Foobar.jpg"><img alt="galleryalt" resource="./File:Foobar.jpg" src="//example.com/images/thumb/3/3a/Foobar.jpg/120px-Foobar.jpg" data-file-width="1941" data-file-height="220" data-file-type="bitmap" height="14" width="120"/></a></figure-inline></div><div class="gallerytext"><span about="#mwt4" typeof="mw:Transclusion" data-mw='{"parts":[{"template":{"target":{"wt":"Test","href":"./Template:Test"},"params":{"1":{"wt":"unamedParam"},"alt":{"wt":"param"}},"i":0}}]}'>This is a test template</span></div></li>
21464 Gallery (with showfilename option)
21467 "nativeGallery": true
21470 <gallery showfilename="">
21471 File:Nonexistent.jpg|caption
21472 File:Nonexistent.jpg
21473 File:Foobar.jpg|some '''caption''' [[Main Page]]
21477 <ul class="gallery mw-gallery-traditional">
21478 <li class="gallerybox" style="width: 155px"><div style="width: 155px">
21479 <div class="thumb" style="height: 150px;">Nonexistent.jpg</div>
21480 <div class="gallerytext">
21481 <p><a href="/wiki/File:Nonexistent.jpg" class="galleryfilename galleryfilename-truncate" title="File:Nonexistent.jpg">Nonexistent.jpg</a>
21486 <li class="gallerybox" style="width: 155px"><div style="width: 155px">
21487 <div class="thumb" style="height: 150px;">Nonexistent.jpg</div>
21488 <div class="gallerytext">
21489 <p><a href="/wiki/File:Nonexistent.jpg" class="galleryfilename galleryfilename-truncate" title="File:Nonexistent.jpg">Nonexistent.jpg</a>
21493 <li class="gallerybox" style="width: 155px"><div style="width: 155px">
21494 <div class="thumb" style="width: 150px;"><div style="margin:68px auto;"><a href="/wiki/File:Foobar.jpg" class="image"><img alt="" src="http://example.com/images/thumb/3/3a/Foobar.jpg/120px-Foobar.jpg" width="120" height="14" srcset="http://example.com/images/thumb/3/3a/Foobar.jpg/180px-Foobar.jpg 1.5x, http://example.com/images/thumb/3/3a/Foobar.jpg/240px-Foobar.jpg 2x" /></a></div></div>
21495 <div class="gallerytext">
21496 <p><a href="/wiki/File:Foobar.jpg" class="galleryfilename galleryfilename-truncate" title="File:Foobar.jpg">Foobar.jpg</a>
21497 some <b>caption</b> <a href="/wiki/Main_Page" title="Main Page">Main Page</a>
21501 <li class="gallerybox" style="width: 155px"><div style="width: 155px">
21502 <div class="thumb" style="width: 150px;"><div style="margin:68px auto;"><a href="/wiki/File:Foobar.jpg" class="image"><img alt="Foobar.jpg" src="http://example.com/images/thumb/3/3a/Foobar.jpg/120px-Foobar.jpg" width="120" height="14" srcset="http://example.com/images/thumb/3/3a/Foobar.jpg/180px-Foobar.jpg 1.5x, http://example.com/images/thumb/3/3a/Foobar.jpg/240px-Foobar.jpg 2x" /></a></div></div>
21503 <div class="gallerytext">
21504 <p><a href="/wiki/File:Foobar.jpg" class="galleryfilename galleryfilename-truncate" title="File:Foobar.jpg">Foobar.jpg</a>
21511 <ul class="gallery mw-gallery-traditional" typeof="mw:Extension/gallery" about="#mwt3" data-mw='{"name":"gallery","attrs":{"showfilename":""},"body":{}}'>
21512 <li class="gallerybox" style="width: 155px;"><div class="thumb" style="width: 150px; height: 150px;"><figure-inline typeof="mw:Error mw:Image"><a href="./File:Nonexistent.jpg"><img resource="./File:Nonexistent.jpg" src="./Special:FilePath/Nonexistent.jpg" height="120" width="120"/></a></figure-inline></div><div class="gallerytext"><a href="./File:Nonexistent.jpg" class="galleryfilename galleryfilename-truncate" title="File:Nonexistent.jpg">File:Nonexistent.jpg</a>caption</div></li>
21513 <li class="gallerybox" style="width: 155px;"><div class="thumb" style="width: 150px; height: 150px;"><figure-inline typeof="mw:Error mw:Image"><a href="./File:Nonexistent.jpg"><img resource="./File:Nonexistent.jpg" src="./Special:FilePath/Nonexistent.jpg" height="120" width="120"/></a></figure-inline></div><div class="gallerytext"><a href="./File:Nonexistent.jpg" class="galleryfilename galleryfilename-truncate" title="File:Nonexistent.jpg">File:Nonexistent.jpg</a></div></li>
21514 <li class="gallerybox" style="width: 155px;"><div class="thumb" style="width: 150px; height: 150px;"><figure-inline typeof="mw:Image"><a href="./File:Foobar.jpg"><img resource="./File:Foobar.jpg" src="//example.com/images/thumb/3/3a/Foobar.jpg/120px-Foobar.jpg" data-file-width="1941" data-file-height="220" data-file-type="bitmap" height="14" width="120"/></a></figure-inline></div><div class="gallerytext"><a href="./File:Foobar.jpg" class="galleryfilename galleryfilename-truncate" title="File:Foobar.jpg">File:Foobar.jpg</a>some <b>caption</b> <a rel="mw:WikiLink" href="./Main_Page" title="Main Page">Main Page</a></div></li>
21515 <li class="gallerybox" style="width: 155px;"><div class="thumb" style="width: 150px; height: 150px;"><figure-inline typeof="mw:Image"><a href="./File:Foobar.jpg"><img resource="./File:Foobar.jpg" src="//example.com/images/thumb/3/3a/Foobar.jpg/120px-Foobar.jpg" data-file-width="1941" data-file-height="220" data-file-type="bitmap" height="14" width="120"/></a></figure-inline></div><div class="gallerytext"><a href="./File:Foobar.jpg" class="galleryfilename galleryfilename-truncate" title="File:Foobar.jpg">File:Foobar.jpg</a></div></li>
21519 ## Should Parsoid be preserving these variations? See T151367
21521 Gallery (with namespace-less filenames)
21524 "modes": ["wt2html", "html2html"],
21525 "nativeGallery": true
21529 File:Nonexistent.jpg
21535 <ul class="gallery mw-gallery-traditional">
21536 <li class="gallerybox" style="width: 155px"><div style="width: 155px">
21537 <div class="thumb" style="height: 150px;">Nonexistent.jpg</div>
21538 <div class="gallerytext">
21541 <li class="gallerybox" style="width: 155px"><div style="width: 155px">
21542 <div class="thumb" style="height: 150px;">Nonexistent.jpg</div>
21543 <div class="gallerytext">
21546 <li class="gallerybox" style="width: 155px"><div style="width: 155px">
21547 <div class="thumb" style="width: 150px;"><div style="margin:68px auto;"><a href="/wiki/File:Foobar.jpg" class="image"><img alt="Foobar.jpg" src="http://example.com/images/thumb/3/3a/Foobar.jpg/120px-Foobar.jpg" width="120" height="14" srcset="http://example.com/images/thumb/3/3a/Foobar.jpg/180px-Foobar.jpg 1.5x, http://example.com/images/thumb/3/3a/Foobar.jpg/240px-Foobar.jpg 2x" /></a></div></div>
21548 <div class="gallerytext">
21551 <li class="gallerybox" style="width: 155px"><div style="width: 155px">
21552 <div class="thumb" style="width: 150px;"><div style="margin:68px auto;"><a href="/wiki/File:Foobar.jpg" class="image"><img alt="Foobar.jpg" src="http://example.com/images/thumb/3/3a/Foobar.jpg/120px-Foobar.jpg" width="120" height="14" srcset="http://example.com/images/thumb/3/3a/Foobar.jpg/180px-Foobar.jpg 1.5x, http://example.com/images/thumb/3/3a/Foobar.jpg/240px-Foobar.jpg 2x" /></a></div></div>
21553 <div class="gallerytext">
21559 <ul class="gallery mw-gallery-traditional" typeof="mw:Extension/gallery" about="#mwt2" data-mw='{"name":"gallery","attrs":{},"body":{}}'>
21560 <li class="gallerybox" style="width: 155px;"><div class="thumb" style="width: 150px; height: 150px;"><figure-inline typeof="mw:Error mw:Image"><a href="./File:Nonexistent.jpg"><img resource="./File:Nonexistent.jpg" src="./Special:FilePath/Nonexistent.jpg" height="120" width="120"/></a></figure-inline></div><div class="gallerytext"></div></li>
21561 <li class="gallerybox" style="width: 155px;"><div class="thumb" style="width: 150px; height: 150px;"><figure-inline typeof="mw:Error mw:Image"><a href="./File:Nonexistent.jpg"><img resource="./File:Nonexistent.jpg" src="./Special:FilePath/Nonexistent.jpg" height="120" width="120"/></a></figure-inline></div><div class="gallerytext"></div></li>
21562 <li class="gallerybox" style="width: 155px;"><div class="thumb" style="width: 150px; height: 150px;"><figure-inline typeof="mw:Image"><a href="./File:Foobar.jpg"><img resource="./File:Foobar.jpg" src="//example.com/images/thumb/3/3a/Foobar.jpg/120px-Foobar.jpg" data-file-width="1941" data-file-height="220" data-file-type="bitmap" height="14" width="120"/></a></figure-inline></div><div class="gallerytext"></div></li>
21563 <li class="gallerybox" style="width: 155px;"><div class="thumb" style="width: 150px; height: 150px;"><figure-inline typeof="mw:Image"><a href="./File:Foobar.jpg"><img resource="./File:Foobar.jpg" src="//example.com/images/thumb/3/3a/Foobar.jpg/120px-Foobar.jpg" data-file-width="1941" data-file-height="220" data-file-type="bitmap" height="14" width="120"/></a></figure-inline></div><div class="gallerytext"></div></li>
21568 Gallery override link with wikilink (T36852)
21571 "nativeGallery": true
21575 File:Foobar.jpg|alt=galleryalt|link=Wikilink
21578 <ul class="gallery mw-gallery-traditional">
21579 <li class="gallerybox" style="width: 155px"><div style="width: 155px">
21580 <div class="thumb" style="width: 150px;"><div style="margin:68px auto;"><a href="/wiki/Wikilink"><img alt="galleryalt" src="http://example.com/images/thumb/3/3a/Foobar.jpg/120px-Foobar.jpg" width="120" height="14" srcset="http://example.com/images/thumb/3/3a/Foobar.jpg/180px-Foobar.jpg 1.5x, http://example.com/images/thumb/3/3a/Foobar.jpg/240px-Foobar.jpg 2x" /></a></div></div>
21581 <div class="gallerytext">
21587 <ul class="gallery mw-gallery-traditional" typeof="mw:Extension/gallery" about="#mwt2" data-mw='{"name":"gallery","attrs":{},"body":{}}'>
21588 <li class="gallerybox" style="width: 155px;"><div class="thumb" style="width: 150px; height: 150px;"><figure-inline typeof="mw:Image"><a href="./Wikilink"><img alt="galleryalt" resource="./File:Foobar.jpg" src="//example.com/images/thumb/3/3a/Foobar.jpg/120px-Foobar.jpg" data-file-width="1941" data-file-height="220" data-file-type="bitmap" height="14" width="120"/></a></figure-inline></div><div class="gallerytext"></div></li>
21593 Gallery override link with absolute external link (T36852)
21596 "nativeGallery": true
21600 File:Foobar.jpg|alt=galleryalt|link=http://www.example.org
21603 <ul class="gallery mw-gallery-traditional">
21604 <li class="gallerybox" style="width: 155px"><div style="width: 155px">
21605 <div class="thumb" style="width: 150px;"><div style="margin:68px auto;"><a href="http://www.example.org"><img alt="galleryalt" src="http://example.com/images/thumb/3/3a/Foobar.jpg/120px-Foobar.jpg" width="120" height="14" srcset="http://example.com/images/thumb/3/3a/Foobar.jpg/180px-Foobar.jpg 1.5x, http://example.com/images/thumb/3/3a/Foobar.jpg/240px-Foobar.jpg 2x" /></a></div></div>
21606 <div class="gallerytext">
21612 <ul class="gallery mw-gallery-traditional" typeof="mw:Extension/gallery" about="#mwt2" data-mw='{"name":"gallery","attrs":{},"body":{}}'>
21613 <li class="gallerybox" style="width: 155px;"><div class="thumb" style="width: 150px; height: 150px;"><figure-inline typeof="mw:Image"><a href="http://www.example.org"><img alt="galleryalt" resource="./File:Foobar.jpg" src="//example.com/images/thumb/3/3a/Foobar.jpg/120px-Foobar.jpg" data-file-width="1941" data-file-height="220" data-file-type="bitmap" height="14" width="120"/></a></figure-inline></div><div class="gallerytext"></div></li>
21618 Gallery override link with absolute external link with LanguageConverter
21623 File:foobar.jpg|caption|alt=galleryalt|link=http://www.example.org
21626 <ul class="gallery mw-gallery-traditional">
21627 <li class="gallerybox" style="width: 155px"><div style="width: 155px">
21628 <div class="thumb" style="width: 150px;"><div style="margin:68px auto;"><a href="http://www.example.org"><img alt="galleryalt" src="http://example.com/images/thumb/3/3a/Foobar.jpg/120px-Foobar.jpg" width="120" height="14" srcset="http://example.com/images/thumb/3/3a/Foobar.jpg/180px-Foobar.jpg 1.5x, http://example.com/images/thumb/3/3a/Foobar.jpg/240px-Foobar.jpg 2x" /></a></div></div>
21629 <div class="gallerytext">
21637 <ul class="gallery mw-gallery-traditional" typeof="mw:Extension/gallery" about="#mwt2" data-mw='{"name":"gallery","attrs":{},"body":{"extsrc":"\nFile:foobar.jpg|caption|alt=galleryalt|link=http://www.example.org\n"}}'>
21638 <li class="gallerybox" style="width: 155px;"><div class="thumb" style="width: 150px; height: 150px;"><figure-inline typeof="mw:Image"><a href="http://www.example.org"><img alt="galleryalt" resource="./File:Foobar.jpg" src="//example.com/images/thumb/3/3a/Foobar.jpg/120px-Foobar.jpg" data-file-width="1941" data-file-height="220" data-file-type="bitmap" height="14" width="120"/></a></figure-inline></div><div class="gallerytext">caption</div></li>
21643 Gallery override link with malicious javascript (T36852)
21646 "modes": ["wt2html", "html2html"],
21647 "nativeGallery": true
21651 File:Foobar.jpg|alt=galleryalt|link=" onclick="alert('malicious javascript code!');
21654 <ul class="gallery mw-gallery-traditional">
21655 <li class="gallerybox" style="width: 155px"><div style="width: 155px">
21656 <div class="thumb" style="width: 150px;"><div style="margin:68px auto;"><a href="/wiki/%22_onclick%3D%22alert(%27malicious_javascript_code!%27);"><img alt="galleryalt" src="http://example.com/images/thumb/3/3a/Foobar.jpg/120px-Foobar.jpg" width="120" height="14" srcset="http://example.com/images/thumb/3/3a/Foobar.jpg/180px-Foobar.jpg 1.5x, http://example.com/images/thumb/3/3a/Foobar.jpg/240px-Foobar.jpg 2x" /></a></div></div>
21657 <div class="gallerytext">
21663 <ul class="gallery mw-gallery-traditional" typeof="mw:Extension/gallery" about="#mwt2" data-mw='{"name":"gallery","attrs":{},"body":{}}'>
21664 <li class="gallerybox" style="width: 155px;"><div class="thumb" style="width: 150px; height: 150px;"><figure-inline typeof="mw:Image"><a href="./%22_onclick=%22alert('malicious_javascript_code!');"><img alt="galleryalt" resource="./File:Foobar.jpg" src="//example.com/images/thumb/3/3a/Foobar.jpg/120px-Foobar.jpg" data-file-width="1941" data-file-height="220" data-file-type="bitmap" height="14" width="120"/></a></figure-inline></div><div class="gallerytext"></div></li>
21668 # Note that parsoid uses the invalid link as a caption, PHP does not.
21670 Gallery with invalid title as link (T45964)
21673 "modes": ["wt2html", "html2html"],
21674 "nativeGallery": true
21678 File:Foobar.jpg|link=<
21681 <ul class="gallery mw-gallery-traditional">
21682 <li class="gallerybox" style="width: 155px"><div style="width: 155px">
21683 <div class="thumb" style="width: 150px;"><div style="margin:68px auto;"><a href="/wiki/File:Foobar.jpg" class="image"><img alt="Foobar.jpg" src="http://example.com/images/thumb/3/3a/Foobar.jpg/120px-Foobar.jpg" width="120" height="14" srcset="http://example.com/images/thumb/3/3a/Foobar.jpg/180px-Foobar.jpg 1.5x, http://example.com/images/thumb/3/3a/Foobar.jpg/240px-Foobar.jpg 2x" /></a></div></div>
21684 <div class="gallerytext">
21690 <ul class="gallery mw-gallery-traditional" typeof="mw:Extension/gallery" about="#mwt2" data-mw='{"name":"gallery","attrs":{},"body":{}}'>
21691 <li class="gallerybox" style="width: 155px;"><div class="thumb" style="width: 150px; height: 150px;"><figure-inline typeof="mw:Image"><a href="./File:Foobar.jpg"><img resource="./File:Foobar.jpg" src="//example.com/images/thumb/3/3a/Foobar.jpg/120px-Foobar.jpg" data-file-width="1941" data-file-height="220" data-file-type="bitmap" height="14" width="120"/></a></figure-inline></div><div class="gallerytext">link=<</div></li>
21696 Serialize gallery without attrs in data-mw
21699 "modes": ["html2wt"],
21700 "nativeGallery": true
21703 <ul class="gallery mw-gallery-traditional" typeof="mw:Extension/gallery" about="#mwt2" data-mw='{"name":"gallery","body":{}}'>
21704 <li class="gallerycaption">123</li>
21705 <li class="gallerybox" style="width: 155px;"><div class="thumb" style="width: 150px; height: 150px;"><span>File:Test.png</span></div><div class="gallerytext"></div></li>
21708 <gallery caption="123">
21714 Gallery with class and style attributes
21717 "nativeGallery": true
21720 <gallery class="center" style="text-align: center;">
21724 <ul class="gallery mw-gallery-traditional center" style="text-align: center;">
21725 <li class="gallerybox" style="width: 155px"><div style="width: 155px">
21726 <div class="thumb" style="width: 150px;"><div style="margin:68px auto;"><a href="/wiki/File:Foobar.jpg" class="image"><img alt="Foobar.jpg" src="http://example.com/images/thumb/3/3a/Foobar.jpg/120px-Foobar.jpg" width="120" height="14" srcset="http://example.com/images/thumb/3/3a/Foobar.jpg/180px-Foobar.jpg 1.5x, http://example.com/images/thumb/3/3a/Foobar.jpg/240px-Foobar.jpg 2x" /></a></div></div>
21727 <div class="gallerytext">
21733 <ul class="gallery mw-gallery-traditional center" style="text-align: center;" typeof="mw:Extension/gallery" about="#mwt2" data-mw='{"name":"gallery","attrs":{"class":"center","style":"text-align: center;"},"body":{}}'>
21734 <li class="gallerybox" style="width: 155px;"><div class="thumb" style="width: 150px; height: 150px;"><figure-inline typeof="mw:Image"><a href="./File:Foobar.jpg"><img resource="./File:Foobar.jpg" src="//example.com/images/thumb/3/3a/Foobar.jpg/120px-Foobar.jpg" data-file-width="1941" data-file-height="220" data-file-type="bitmap" height="14" width="120"/></a></figure-inline></div><div class="gallerytext"></div></li>
21739 Gallery in slideshow mode
21742 "nativeGallery": true
21745 <gallery mode="slideshow" showthumbnails="">
21749 <ul class="gallery mw-gallery-slideshow" data-showthumbnails="1">
21750 <li class="gallerybox" style="width: 155px"><div style="width: 155px">
21751 <div class="thumb" style="width: 150px;"><div style="margin:68px auto;"><a href="/wiki/File:Foobar.jpg" class="image"><img alt="Foobar.jpg" src="http://example.com/images/thumb/3/3a/Foobar.jpg/120px-Foobar.jpg" width="120" height="14" srcset="http://example.com/images/thumb/3/3a/Foobar.jpg/180px-Foobar.jpg 1.5x, http://example.com/images/thumb/3/3a/Foobar.jpg/240px-Foobar.jpg 2x" /></a></div></div>
21752 <div class="gallerytext">
21758 <ul class="gallery mw-gallery-slideshow" data-showthumbnails="1" typeof="mw:Extension/gallery" about="#mwt2" data-mw='{"name":"gallery","attrs":{"mode":"slideshow","showthumbnails":""},"body":{}}'>
21759 <li class="gallerybox" style="width: 155px;"><div class="thumb" style="width: 150px;"><figure-inline typeof="mw:Image"><a href="./File:Foobar.jpg"><img resource="./File:Foobar.jpg" src="//example.com/images/thumb/3/3a/Foobar.jpg/120px-Foobar.jpg" data-file-width="1941" data-file-height="220" data-file-type="bitmap" height="14" width="120"/></a></figure-inline></div><div class="gallerytext"></div></li>
21764 Serialize gallery image captions on a line
21767 "modes": ["html2wt"],
21768 "nativeGallery": true
21771 <ul class="gallery mw-gallery-traditional" typeof="mw:Extension/gallery" about="#mwt2" data-mw='{"name":"gallery","attrs":{},"body":{}}'>
21772 <li class="gallerybox" style="width: 155px;"><div class="thumb" style="width: 150px;"><figure-inline typeof="mw:Image"><a href="./File:Foobar.jpg"><img resource="./File:Foobar.jpg" src="//example.com/images/thumb/3/3a/Foobar.jpg/120px-Foobar.jpg" data-file-width="1941" data-file-height="220" data-file-type="bitmap" height="14" width="120"/></a></figure-inline></div><div class="gallerytext"><p>hi</p><p>ho</p></div></li>
21773 <li class="gallerybox" style="width: 155px;"><div class="thumb" style="width: 150px;"><figure-inline typeof="mw:Image"><a href="./File:Foobar.jpg"><img resource="./File:Foobar.jpg" src="//example.com/images/thumb/3/3a/Foobar.jpg/120px-Foobar.jpg" data-file-width="1941" data-file-height="220" data-file-type="bitmap" height="14" width="120"/></a></figure-inline></div><div class="gallerytext">hi<br />ho</div></li>
21777 File:Foobar.jpg| hi ho
21778 File:Foobar.jpg|hi<br />ho
21783 HTML Hex character encoding (spells the word "JavaScript")
21785 parsoid=wt2html,wt2wt,html2html
21787 JavaScript
21789 <p>JavaScript
21792 <p><span typeof="mw:Entity">J</span><span typeof="mw:Entity">a</span><span typeof="mw:Entity">v</span><span typeof="mw:Entity">a</span><span typeof="mw:Entity">S</span><span typeof="mw:Entity">c</span><span typeof="mw:Entity">r</span><span typeof="mw:Entity">i</span><span typeof="mw:Entity">p</span><span typeof="mw:Entity">t</span></p>
21796 HTML Hex character encoding bogus encoding (T28437 regression check)
21800 <p>&#xsee;&#XSEE;
21805 HTML Hex character encoding mixed case
21807 parsoid=wt2html,wt2wt,html2html
21814 <p><span typeof="mw:Entity">î</span><span typeof="mw:Entity">î</span></p>
21817 # See: https://www.w3.org/TR/html5/syntax.html#character-references
21818 # Note that U+000C (form feed) is not a valid XML character, so
21819 # it is banned even though allowed in HTML5.
21821 Illegal character references (T106578)
21826 ; Control (low): 
21827 ; Control (high):  Ÿ
21828 ; Surrogate: ��
21829 ; This is an okay astral character: 💩
21837 <dt>Control (low)</dt>
21839 <dt>Control (high)</dt>
21840 <dd>&#x7F; &#x9F;</dd>
21842 <dd>&#xD83D;&#xDCA9;</dd>
21843 <dt>This is an okay astral character</dt>
21844 <dd>💩</dd></dl>
21848 __FORCETOC__ override
21860 ISBN 978-0-1234-56 789
21862 <p><a href="/wiki/Special:BookSources/9780123456" class="internal mw-magiclink-isbn">ISBN 978-0-1234-56</a> 789
21865 <p><a href="./Special:BookSources/9780123456" rel="mw:WikiLink" data-parsoid='{"stx":"magiclink"}'>ISBN 978-0-1234-56</a><span typeof="mw:Entity" data-parsoid='{"src":"&#x20;","srcContent":" "}'> </span>789</p>
21869 ISBN followed by 5 spaces
21880 ISBN ISBN 1234567890
21882 <p>ISBN <a href="/wiki/Special:BookSources/1234567890" class="internal mw-magiclink-isbn">ISBN 1234567890</a>
21885 <p>ISBN <a href="./Special:BookSources/1234567890" rel="mw:WikiLink" data-parsoid='{"stx":"magiclink"}'>ISBN 1234567890</a></p>
21888 # Uppercase X and lowercase x as well
21899 <p><a href="/wiki/Special:BookSources/346204561X" class="internal mw-magiclink-isbn">ISBN 3-462-04561-X</a>
21900 <a href="/wiki/Special:BookSources/346204561X" class="internal mw-magiclink-isbn">ISBN 3-462-04561-x</a>
21901 <a href="/wiki/Special:BookSources/080442957X" class="internal mw-magiclink-isbn">ISBN 080442957X</a>
21902 <a href="/wiki/Special:BookSources/080442957X" class="internal mw-magiclink-isbn">ISBN 080442957x</a>
21903 <a href="/wiki/Special:BookSources/978080442957X" class="internal mw-magiclink-isbn">ISBN 978080442957X</a>
21904 <a href="/wiki/Special:BookSources/978080442957X" class="internal mw-magiclink-isbn">ISBN 978080442957x</a>
21907 <p><a href="./Special:BookSources/346204561X" rel="mw:WikiLink" data-parsoid='{"stx":"magiclink"}'>ISBN 3-462-04561-X</a>
21908 <a href="./Special:BookSources/346204561X" rel="mw:WikiLink" data-parsoid='{"stx":"magiclink"}'>ISBN 3-462-04561-x</a>
21909 <a href="./Special:BookSources/080442957X" rel="mw:WikiLink" data-parsoid='{"stx":"magiclink"}'>ISBN 080442957X</a>
21910 <a href="./Special:BookSources/080442957X" rel="mw:WikiLink" data-parsoid='{"stx":"magiclink"}'>ISBN 080442957x</a>
21911 <a href="./Special:BookSources/978080442957X" rel="mw:WikiLink" data-parsoid='{"stx":"magiclink"}'>ISBN 978080442957X</a>
21912 <a href="./Special:BookSources/978080442957X" rel="mw:WikiLink" data-parsoid='{"stx":"magiclink"}'>ISBN 978080442957x</a></p>
21916 ISBN with empty prefix (parsoid test)
21920 <p><a href="/wiki/Special:BookSources/1234567890" class="internal mw-magiclink-isbn">ISBN 1234567890</a>
21923 <p><a href="./Special:BookSources/1234567890" rel="mw:WikiLink">ISBN 1234567890</a></p>
21927 T24905: <abbr> followed by ISBN followed by </a>
21929 <abbr>(fr)</abbr> ISBN 2753300917 [http://www.example.com example.com]
21931 <p><abbr>(fr)</abbr> <a href="/wiki/Special:BookSources/2753300917" class="internal mw-magiclink-isbn">ISBN 2753300917</a> <a rel="nofollow" class="external text" href="http://www.example.com">example.com</a>
21934 <p><abbr data-parsoid='{"stx":"html"}'>(fr)</abbr> <a href="./Special:BookSources/2753300917" rel="mw:WikiLink" data-parsoid='{"stx":"magiclink"}'>ISBN 2753300917</a> <a rel="mw:ExtLink" class="external text" href="http://www.example.com">example.com</a></p>
21942 <p>RFC <a class="external mw-magiclink-rfc" rel="nofollow" href="https://tools.ietf.org/html/rfc1234">RFC 1234</a>
21945 <p>RFC <a href="https://tools.ietf.org/html/rfc1234" rel="mw:ExtLink" class="external mw-magiclink">RFC 1234</a></p>
21949 Double RFC with a wiki link
21953 <p>RFC <a href="/index.php?title=RFC_1234&action=edit&redlink=1" class="new" title="RFC 1234 (page does not exist)">RFC 1234</a>
21956 <p>RFC <a rel="mw:WikiLink" href="./RFC_1234" title="RFC 1234">RFC 1234</a></p>
21964 <p><a class="external mw-magiclink-rfc" rel="nofollow" href="https://tools.ietf.org/html/rfc983">RFC 983</a> 987
21967 <p><a href="https://tools.ietf.org/html/rfc983" rel="mw:ExtLink" class="external mw-magiclink" data-parsoid='{"stx":"magiclink"}'>RFC 983</a><span typeof="mw:Entity" data-parsoid='{"src":"&#x20;","srcContent":" "}'> </span>987</p>
21971 Centre-aligned image
21973 [[Image:foobar.jpg|centre]]
21975 <div class="center"><div class="floatnone"><a href="/wiki/File:Foobar.jpg" class="image"><img alt="Foobar.jpg" src="http://example.com/images/3/3a/Foobar.jpg" width="1941" height="220" /></a></div></div>
21978 <figure class="mw-default-size mw-halign-center" typeof="mw:Image" data-parsoid='{"optList":[{"ck":"center","ak":"centre"}]}'><a href="./File:Foobar.jpg"><img resource="./File:Foobar.jpg" src="//example.com/images/3/3a/Foobar.jpg" data-file-width="1941" data-file-height="220" data-file-type="bitmap" height="220" width="1941" data-parsoid='{"a":{"resource":"./File:Foobar.jpg","height":"220","width":"1941"},"sa":{"resource":"Image:foobar.jpg"}}'/></a></figure>
21984 [[Image:foobar.jpg|none]]
21986 <div class="floatnone"><a href="/wiki/File:Foobar.jpg" class="image"><img alt="Foobar.jpg" src="http://example.com/images/3/3a/Foobar.jpg" width="1941" height="220" /></a></div>
21989 <figure class="mw-default-size mw-halign-none" typeof="mw:Image"><a href="./File:Foobar.jpg"><img resource="./File:Foobar.jpg" src="//example.com/images/3/3a/Foobar.jpg" data-file-width="1941" data-file-height="220" data-file-type="bitmap" height="220" width="1941" data-parsoid='{"a":{"resource":"./File:Foobar.jpg","height":"220","width":"1941"},"sa":{"resource":"Image:foobar.jpg"}}'/></a></figure>
21993 Width + Height sized image (using px) (height is ignored)
21995 [[Image:foobar.jpg|640x480px]]
21997 <p><a href="/wiki/File:Foobar.jpg" class="image"><img alt="Foobar.jpg" src="http://example.com/images/thumb/3/3a/Foobar.jpg/640px-Foobar.jpg" width="640" height="73" srcset="http://example.com/images/thumb/3/3a/Foobar.jpg/960px-Foobar.jpg 1.5x, http://example.com/images/thumb/3/3a/Foobar.jpg/1280px-Foobar.jpg 2x" /></a>
22000 <p><figure-inline typeof="mw:Image" data-parsoid='{"optList":[{"ck":"width","ak":"640x480px"}]}'><a href="./File:Foobar.jpg"><img resource="./File:Foobar.jpg" src="//example.com/images/thumb/3/3a/Foobar.jpg/640px-Foobar.jpg" data-file-width="1941" data-file-height="220" data-file-type="bitmap" height="73" width="640" data-parsoid='{"a":{"resource":"./File:Foobar.jpg","height":"73","width":"640"},"sa":{"resource":"Image:foobar.jpg"}}'/></a></figure-inline></p>
22004 Width-sized image (using px, no following whitespace)
22006 [[Image:foobar.jpg|640px]]
22008 <p><a href="/wiki/File:Foobar.jpg" class="image"><img alt="Foobar.jpg" src="http://example.com/images/thumb/3/3a/Foobar.jpg/640px-Foobar.jpg" width="640" height="73" srcset="http://example.com/images/thumb/3/3a/Foobar.jpg/960px-Foobar.jpg 1.5x, http://example.com/images/thumb/3/3a/Foobar.jpg/1280px-Foobar.jpg 2x" /></a>
22011 <p><figure-inline typeof="mw:Image" data-parsoid='{"optList":[{"ck":"width","ak":"640px"}]}'><a href="./File:Foobar.jpg"><img resource="./File:Foobar.jpg" src="//example.com/images/thumb/3/3a/Foobar.jpg/640px-Foobar.jpg" data-file-width="1941" data-file-height="220" data-file-type="bitmap" height="73" width="640" data-parsoid='{"a":{"resource":"./File:Foobar.jpg","height":"73","width":"640"},"sa":{"resource":"Image:foobar.jpg"}}'/></a></figure-inline></p>
22015 Width-sized image (using px, with following whitespace - test regression from r39467)
22017 [[Image:foobar.jpg|640px ]]
22019 <p><a href="/wiki/File:Foobar.jpg" class="image"><img alt="Foobar.jpg" src="http://example.com/images/thumb/3/3a/Foobar.jpg/640px-Foobar.jpg" width="640" height="73" srcset="http://example.com/images/thumb/3/3a/Foobar.jpg/960px-Foobar.jpg 1.5x, http://example.com/images/thumb/3/3a/Foobar.jpg/1280px-Foobar.jpg 2x" /></a>
22022 <p><figure-inline typeof="mw:Image" data-parsoid='{"optList":[{"ck":"width","ak":"640px "}]}'><a href="./File:Foobar.jpg"><img resource="./File:Foobar.jpg" src="//example.com/images/thumb/3/3a/Foobar.jpg/640px-Foobar.jpg" data-file-width="1941" data-file-height="220" data-file-type="bitmap" height="73" width="640" data-parsoid='{"a":{"resource":"./File:Foobar.jpg","height":"73","width":"640"},"sa":{"resource":"Image:foobar.jpg"}}'/></a></figure-inline></p>
22026 Width-sized image (using px, with preceding whitespace - test regression from r39467)
22028 [[Image:foobar.jpg| 640px]]
22030 <p><a href="/wiki/File:Foobar.jpg" class="image"><img alt="Foobar.jpg" src="http://example.com/images/thumb/3/3a/Foobar.jpg/640px-Foobar.jpg" width="640" height="73" srcset="http://example.com/images/thumb/3/3a/Foobar.jpg/960px-Foobar.jpg 1.5x, http://example.com/images/thumb/3/3a/Foobar.jpg/1280px-Foobar.jpg 2x" /></a>
22033 <p><figure-inline typeof="mw:Image" data-parsoid='{"optList":[{"ck":"width","ak":" 640px"}]}'><a href="./File:Foobar.jpg"><img resource="./File:Foobar.jpg" src="//example.com/images/thumb/3/3a/Foobar.jpg/640px-Foobar.jpg" data-file-width="1941" data-file-height="220" data-file-type="bitmap" height="73" width="640" data-parsoid='{"a":{"resource":"./File:Foobar.jpg","height":"73","width":"640"},"sa":{"resource":"Image:foobar.jpg"}}'/></a></figure-inline></p>
22037 Image with page parameter
22041 [[File:LoremIpsum.djvu|page=2]]
22043 <p><a href="/index.php?title=File:LoremIpsum.djvu&page=2" class="image"><img alt="LoremIpsum.djvu" src="http://example.com/images/thumb/5/5f/LoremIpsum.djvu/page2-2480px-LoremIpsum.djvu.jpg" width="2480" height="3508" srcset="http://example.com/images/thumb/5/5f/LoremIpsum.djvu/page2-3720px-LoremIpsum.djvu.jpg 1.5x, http://example.com/images/thumb/5/5f/LoremIpsum.djvu/page2-4960px-LoremIpsum.djvu.jpg 2x" /></a>
22046 <p><figure-inline class="mw-default-size" typeof="mw:Image" data-parsoid='{"optList":[{"ck":"page","ak":"page=2"}]}' data-mw='{"page":"2"}'><a href="./File:LoremIpsum.djvu" data-parsoid='{"a":{"href":"./File:LoremIpsum.djvu"},"sa":{"href":"File:LoremIpsum.djvu"}}'><img resource="./File:LoremIpsum.djvu" src="//example.com/images/5/5f/LoremIpsum.djvu" data-file-width="2480" data-file-height="3508" data-file-type="bitmap" height="3508" width="2480" data-parsoid='{"a":{"resource":"./File:LoremIpsum.djvu","height":"3508","width":"2480"},"sa":{"resource":"File:LoremIpsum.djvu"}}'/></a></figure-inline></p>
22050 Another italics / bold test
22058 # FIXME: The php output seems broken. It's interleaving some open/close tags.
22064 <dl><dd><dl><dt><dl><dt><dl><dt><dl><dd><dl><dd></dt></dl></dd></dl></dd></dl></dd></dl></dd></dl></dd></dl>
22067 <dl><dd><dl><dt><dl><dt><dl><dt><dl><dd><dl><dd></dd></dl></dd></dl></dt></dl></dt></dl></dt></dl></dd></dl>
22071 # Images with the "|" character in external URLs in comment tags; Eats half the comment, leaves unmatched "</a>" tag.
22073 Images with the "|" character in the comment
22075 [[File:Foobar.jpg|thumb|An [http://test/?param1=|left|¶m2=|x external] URL]]
22077 <div class="thumb tright"><div class="thumbinner" style="width:182px;"><a href="/wiki/File:Foobar.jpg" class="image"><img alt="" src="http://example.com/images/thumb/3/3a/Foobar.jpg/180px-Foobar.jpg" width="180" height="20" class="thumbimage" srcset="http://example.com/images/thumb/3/3a/Foobar.jpg/270px-Foobar.jpg 1.5x, http://example.com/images/thumb/3/3a/Foobar.jpg/360px-Foobar.jpg 2x" /></a> <div class="thumbcaption"><div class="magnify"><a href="/wiki/File:Foobar.jpg" class="internal" title="Enlarge"></a></div>An <a rel="nofollow" class="external text" href="http://test/?param1=%7Cleft%7C&param2=%7Cx">external</a> URL</div></div></div>
22080 <figure class="mw-default-size" typeof="mw:Image/Thumb"><a href="./File:Foobar.jpg"><img resource="./File:Foobar.jpg" src="//example.com/images/thumb/3/3a/Foobar.jpg/220px-Foobar.jpg" data-file-width="1941" data-file-height="220" data-file-type="bitmap" height="25" width="220"/></a><figcaption>An <a rel="mw:ExtLink" class="external text" href="http://test/?param1=%7Cleft%7C&param2=%7Cx" data-parsoid='{"a":{"href":"http://test/?param1=%7Cleft%7C&param2=%7Cx"},"sa":{"href":"http://test/?param1=|left|&param2=|x"}}'>external</a> URL</figcaption></figure>
22084 [Before] HTML without raw HTML enabled ($wgRawHtml==false)
22086 <html><script>alert(1);</script></html>
22088 <p><html><script>alert(1);</script></html>
22093 HTML with raw HTML ($wgRawHtml==true)
22097 <html><script>alert(1);</script></html>
22099 <p><script>alert(1);</script>
22104 Parents of subpages, one level up
22106 subpage title=[[Subpage test/L1/L2/L3]]
22110 <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>
22116 Parents of subpages, one level up, not named
22118 subpage title=[[Subpage test/L1/L2/L3]]
22122 <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>
22129 Parents of subpages, two levels up
22131 subpage title=[[Subpage test/L1/L2/L3]]
22137 <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
22138 </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>
22143 Parents of subpages, two levels up, without trailing slash or name.
22145 subpage title=[[Subpage test/L1/L2/L3]]
22154 Parents of subpages, two levels up, with lots of extra trailing slashes.
22156 subpage title=[[Subpage test/L1/L2/L3]]
22160 <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>
22165 Subpage test/L1/L2/L3Sibling
22171 Transclusion of a sibling page (one level up)
22173 subpage title=[[Subpage test/L1/L2/L3]]
22182 Transclusion of a child page
22184 subpage title=[[Subpage test/L1/L2]]
22192 # This is wt2html only in Parsoid because we add <nowiki>
22193 # because of {{..}} and we don't expect to fix that to
22194 # eliminate the nowikis selective for {{..}} markup.
22196 Non-transclusion because of too many up levels
22198 subpage title=[[Subpage test/L1/L2/L3]]
22201 {{../../../../More than parent}}
22203 <p>{{../../../../More than parent}}
22206 <p>{{../../../../More than parent}}</p>
22210 Definition list code coverage
22224 <dl><dt>title </dt><dd>def</dd>
22225 <dt>title </dt><dd>def</dd>
22226 <dt>title</dt><dd>def</dd></dl>
22230 Don't fall for the self-closing div
22232 <div>hello world</div/>
22234 <div>hello world</div>
22243 <p>[[:Template:Msg]]
22252 <p><a href="/index.php?title=Template:QUERTY&action=edit&redlink=1" class="new" title="Template:QUERTY (page does not exist)">Template:QUERTY</a>
22256 # This isn't needed for XHTML conformance, but would be handy as a fallback security measure
22258 Always escape literal '>' in output, not just after '<'
22272 <p>This is a test template
22273 This is a test template
22285 Inclusion of !userCanEdit() content
22289 <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>
22295 Out-of-order TOC heading levels
22304 <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>
22306 <li class="toclevel-1 tocsection-1"><a href="#2"><span class="tocnumber">1</span> <span class="toctext">2</span></a>
22308 <li class="toclevel-2 tocsection-2"><a href="#6"><span class="tocnumber">1.1</span> <span class="toctext">6</span></a></li>
22309 <li class="toclevel-2 tocsection-3"><a href="#3"><span class="tocnumber">1.2</span> <span class="toctext">3</span></a></li>
22312 <li class="toclevel-1 tocsection-4"><a href="#1"><span class="tocnumber">2</span> <span class="toctext">1</span></a>
22314 <li class="toclevel-2 tocsection-5"><a href="#5"><span class="tocnumber">2.1</span> <span class="toctext">5</span></a></li>
22315 <li class="toclevel-2 tocsection-6"><a href="#2_2"><span class="tocnumber">2.2</span> <span class="toctext">2</span></a></li>
22321 <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>
22322 <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>
22323 <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>
22324 <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>
22325 <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>
22326 <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>
22332 ISBN with a dummy number
22342 ISBN with space-delimited number
22346 <p><a href="/wiki/Special:BookSources/9290170328" class="internal mw-magiclink-isbn">ISBN 92 9017 032 8</a>
22349 <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>
22354 ISBN with multiple spaces, no number
22373 </p><p><a href="/wiki/Special:BookSources/1234567890" class="internal mw-magiclink-isbn">ISBN 1234567890</a>
22374 </p><p>ISBN 12345678901
22377 <p>ISBN 123456789</p>
22379 <p><a href="./Special:BookSources/1234567890" rel="mw:WikiLink" data-parsoid='{"stx":"magiclink"}'>ISBN 1234567890</a></p>
22381 <p>ISBN 12345678901</p>
22386 ISBN with trailing year (T9110)
22388 ISBN 1-234-56789-0 - 2006
22390 ISBN 1 234 56789 0 - 2006
22392 <p><a href="/wiki/Special:BookSources/1234567890" class="internal mw-magiclink-isbn">ISBN 1-234-56789-0</a> - 2006
22393 </p><p><a href="/wiki/Special:BookSources/1234567890" class="internal mw-magiclink-isbn">ISBN 1 234 56789 0</a> - 2006
22396 <p><a href="./Special:BookSources/1234567890" rel="mw:WikiLink" data-parsoid='{"stx":"magiclink"}'>ISBN 1-234-56789-0</a> - 2006</p>
22398 <p><a href="./Special:BookSources/1234567890" rel="mw:WikiLink" data-parsoid='{"stx":"magiclink"}'>ISBN 1 234 56789 0</a> - 2006</p>
22405 wgFragmentMode=[ 'html5', 'legacy' ]
22407 {{anchorencode:foo bar©#%n}}
22412 <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>
22416 anchorencode (legacy)
22418 wgFragmentMode=[ 'legacy' ]
22420 {{anchorencode:foo bar©#%n}}
22422 <p>foo_bar.C2.A9.23.25n
22427 anchorencode trims spaces
22429 wgFragmentMode=[ 'html5', 'legacy' ]
22431 {{anchorencode: __pretty__please__}}
22436 <p about="#mwt1" typeof="mw:Transclusion" data-mw='{"parts":[{"template":{"target":{"wt":"anchorencode: __pretty__please__","function":"anchorencode"},"params":{},"i":0}}]}'>pretty_please</p>
22440 anchorencode deals with links
22442 wgFragmentMode=[ 'html5', 'legacy' ]
22444 {{anchorencode: [[hello|world]] [[hi]]}}
22449 <p about="#mwt1" typeof="mw:Transclusion" data-mw='{"parts":[{"template":{"target":{"wt":"anchorencode: [[hello|world]] [[hi]]","function":"anchorencode"},"params":{},"i":0}}]}'>world_hi</p>
22453 anchorencode deals with templates
22455 wgFragmentMode=[ 'html5', 'legacy' ]
22457 {{anchorencode: {{Foo}} x}}
22462 <p about="#mwt2" typeof="mw:Transclusion" data-mw='{"parts":[{"template":{"target":{"wt":"anchorencode: {{Foo}} x","function":"anchorencode"},"params":{},"i":0}}]}'>FOO_x</p>
22466 anchorencode encodes like the TOC generator: (T20431)
22468 wgFragmentMode=[ 'html5', 'legacy' ]
22470 ===_ +:.3A%3A _ &&]] x===
22471 {{anchorencode: _ +:.3A%3A _ &&]] x}}
22474 <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>
22475 <p>+:.3A%3A_&&]]_x
22478 <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>
22479 <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>
22480 <meta property="mw:PageProp/noeditsection"/>
22484 anchorencode encodes like the TOC generator: (T20431) (legacy)
22486 wgFragmentMode=[ 'legacy' ]
22488 ===_ +:.3A%3A&&]]===
22489 {{anchorencode: _ +:.3A%3A&&]] }}
22492 <h3><span class="mw-headline" id=".2B:.3A.253A.26.26.5D.5D">_ +:.3A%3A&&]]</span></h3>
22493 <p>.2B:.3A.253A.26.26.5D.5D
22498 T8200: blockquotes and paragraph formatting
22519 T10293: Use of center tag ruins paragraph formatting
22540 Parsing of overlapping (improperly nested) inline html tags
22542 <span><s>x</span></s>
22544 <p><span><s>x</span></s></span>
22547 <p><span><s>x</s></span>
22552 ### Language variants related tests
22555 # Parsoid does not mark self-links.
22556 # Parsoid does not convert links; PHP will do any necessary redirects.
22559 Self-link in language variants
22561 title=[[Dunav]] language=sr
22563 Both [[Dunav]] and [[Дунав]] are names for this river.
22565 <p>Both <a class="mw-selflink selflink">Dunav</a> and <a class="mw-selflink selflink">Дунав</a> are names for this river.
22568 <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>
22578 Link to another existing title shouldn't be parsed as self-link even if it's a variant of this title
22580 title=[[Duna]] language=sr
22582 [[Дуна]] is not a self-link while [[Duna]] and [[Dуна]] are still self-links.
22584 <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.
22587 <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>
22591 Link to a section of a variant of this title shouldn't be parsed as self-link
22593 title=[[Duna]] language=sr
22595 [[Dуна]] is a self-link while [[Dunа#Foo]] and [[Dуна#Foo]] are not self-links.
22597 <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.
22600 <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>
22604 Link to pages in language variants
22608 Main Page can be written as [[Маин Паге]]
22610 <p>Main Page can be written as <a href="/wiki/Main_Page" title="Main Page">Маин Паге</a>
22613 <p>Main Page can be written as <a rel="mw:WikiLink" href="./Маин_Паге" title="Маин Паге">Маин Паге</a></p>
22618 Multiple links to pages in language variants
22622 [[Main Page]] can be written as [[Маин Паге]] same as [[Маин Паге]].
22624 <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>.
22627 <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>
22632 Simple template in language variants
22638 <p>This is a test template
22644 Template with explicit namespace in language variants
22650 <p>This is a test template
22656 Basic test for template parameter in language variants
22660 {{парамтест|param=foo}}
22662 <p>This is a test template with parameter foo
22667 Simple category in language variants
22671 [[Category:МедиаWики Усер'с Гуиде]]
22673 cat=МедиаWики_Усер'с_Гуиде sort=
22675 <link rel="mw:PageProp/Category" href="./Категорија:МедиаWики_Усер'с_Гуиде" data-parsoid='{"stx":"simple","a":{"href":"./Категорија:МедиаWики_Усер'с_Гуиде"},"sa":{"href":"Category:МедиаWики Усер'с Гуиде"}}'/>
22690 ## We used to, but no longer wt2wt this test since the default serializer
22691 ## will normalize all categories to serialize on their own line.
22692 ## This wikitext usage is going to be fairly uncommon in production and
22693 ## selser will take care of preserving formatting in those scenarios.
22695 Don't convert blue categorylinks to another variant (T35210)
22701 [[A]][[Category:分类]]
22705 <p><a rel="mw:WikiLink" href="./A" title="A">A</a></p>
22706 <link rel="mw:PageProp/Category" href="./Category:分类"/>
22710 Stripping -{}- tags (language variants)
22714 Latin proverb: -{Ne nuntium necare}-
22716 <p>Latin proverb: Ne nuntium necare
22719 <p>Latin proverb: <span typeof="mw:LanguageVariant" data-mw-variant='{"disabled":{"t":"Ne nuntium necare"}}'></span></p>
22724 Prevent conversion with -{}- tags (language variants)
22726 language=sr variant=sr-ec
22728 Latinski: -{Ne nuntium necare}-
22730 <p>Латински: Ne nuntium necare
22733 <p>Latinski: <span typeof="mw:LanguageVariant" data-mw-variant='{"disabled":{"t":"Ne nuntium necare"}}'></span></p>
22738 Prevent conversion of text with -{}- tags (language variants)
22740 language=sr variant=sr-ec
22742 Latinski: -{Ne nuntium necare}-
22744 <p>Латински: Ne nuntium necare
22747 <p>Latinski: <span typeof="mw:LanguageVariant" data-mw-variant='{"disabled":{"t":"Ne nuntium necare"}}'></span></p>
22752 Prevent conversion of links with -{}- tags (language variants)
22754 language=sr variant=sr-ec
22758 <p><a href="/wiki/Main_Page" title="Main Page">Main Page</a>
22761 <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>
22766 -{}- tags within headlines (within html for parserConvert())
22768 wgFragmentMode=[ 'html5', 'legacy' ]
22770 language=sr variant=sr-ec
22774 Note that even an unprotected headline ID is not affected by language
22779 <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>
22780 <p>Ноте тхат евен ан унпротецтед хеадлине ИД ис нот аффецтед бy лангуаге
22783 <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>
22786 <h2 id="-{Naslov}-"><span id="-.7BNaslov.7D-" typeof="mw:FallbackId"></span><span typeof="mw:LanguageVariant" data-mw-variant='{"disabled":{"t":"Naslov"}}'></span></h2>
22788 <p>Note that even an unprotected headline ID is not affected by language
22791 <h2 id="Latinski">Latinski</h2>
22795 Explicit definition of language variant alternatives
22797 language=zh variant=zh-tw
22799 -{zh:China;zh-tw:Taiwan}-, not China
22801 <p>Taiwan, not China
22804 <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>
22808 Filter syntax for language variants
22810 language=zh variant=zh-tw
22812 foo-{zh;zh-hans;zh-hant|blog, WEBJOURNAL, WEBLOG}-quux
22814 <p>fooblog, WEBJOURNAL, WEBLOGquux
22817 <p>foo<span typeof="mw:LanguageVariant" data-mw-variant='{"filter":{"l":["zh","zh-hans","zh-hant"],"t":"blog, WEBJOURNAL, WEBLOG"}}'></span>quux</p>
22820 # Note that Parsoid post-processing for language variants needs to
22821 # update the `title` attribute here, based on the mw:ExpandedAttrs property
22823 Conversion around HTML tags
22825 language=sr variant=sr-ec
22827 -{H|span=>sr-ec:script;title=>sr-ec:src}-
22828 <span title="La-{sr-el:L;sr-ec:C}-tin">ski</span>
22831 <span title="ЛаCтин">ски</span>
22834 <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"}]}'/>
22835 <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>
22839 Explicit session-wise two-way language variant mapping (A flag and - flag)
22841 language=zh variant=zh-tw
22843 This is -{zh:China; zh-tw:Taiwan}-, but we'll forget that now.
22845 Taiwan is not China.
22847 But -{A|zh:China; zh-tw:Taiwan}- is China,
22849 (This-{-|zh:China; zh-tw:Taiwan}- should be stripped!)
22851 and -{China}- is China.
22853 <p>This is Taiwan, but we'll forget that now.
22854 </p><p>Taiwan is not China.
22855 </p><p>But Taiwan is Taiwan,
22856 </p><p>(This should be stripped!)
22857 </p><p>and China is China.
22860 <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>
22861 <p>Taiwan is not China.</p>
22862 <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>
22863 <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>
22864 <p>and <span typeof="mw:LanguageVariant" data-mw-variant='{"disabled":{"t":"China"}}'></span> is China.</p>
22868 Explicit session-wise one-way language variant mapping (A flag and - flag)
22870 language=zh variant=zh-tw
22872 This is -{COUNTRY=>zh:China;COUNTRY=>zh-tw:Taiwan}-, but we'll forget that now.
22874 COUNTRY is China or Taiwan.
22876 But -{A|COUNTRY=>zh:China;COUNTRY=>zh-tw:Taiwan}- is COUNTRY,
22878 (This-{-|COUNTRY=>zh:China;COUNTRY=>zh-tw:Taiwan}- should be stripped!)
22880 and -{COUNTRY}- is COUNTRY.
22882 <p>This is Taiwan, but we'll forget that now.
22883 </p><p>COUNTRY is China or Taiwan.
22884 </p><p>But Taiwan is Taiwan,
22885 </p><p>(This should be stripped!)
22886 </p><p>and COUNTRY is COUNTRY.
22889 <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>
22890 <p>COUNTRY is China or Taiwan.</p>
22891 <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>
22892 <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>
22893 <p>and <span typeof="mw:LanguageVariant" data-mw-variant='{"disabled":{"t":"COUNTRY"}}'></span> is COUNTRY.</p>
22897 Explicit session-wise two-way language variant mapping (H flag for hide)
22899 language=zh variant=zh-tw
22901 (This-{H|zh:China;zh-tw:Taiwan}- should be stripped!)
22905 <p>(This should be stripped!)
22906 </p><p>Taiwan is Taiwan.
22909 <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>
22910 <p>Taiwan is China.</p>
22914 Explicit session-wise one-way language variant mapping (H flag for hide)
22916 language=zh variant=zh-tw
22918 (This-{H|COUNTRY=>zh:China;COUNTRY=>zh-tw:Taiwan}- should be stripped!)
22920 COUNTRY is Taiwan or China.
22922 <p>(This should be stripped!)
22923 </p><p>Taiwan is Taiwan or China.
22926 <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>
22927 <p>COUNTRY is Taiwan or China.</p>
22930 ## Note that parsoid test runner does not support 'showtitle' option.
22932 Adding explicit conversion rule for title (T flag)
22934 language=zh variant=zh-tw showtitle
22936 Should be stripped-{T|zh:China;zh-tw:Taiwan}-!
22941 <p>Should be stripped!
22942 </p><p>Taiwan is China.
22945 <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>
22946 <p>Taiwan is China.</p>
22950 Code coverage: T combined with H flag
22952 language=zh variant=zh-tw showtitle
22954 Should be stripped-{T;H|zh:China; zh-tw:Taiwan}-!
22959 <p>Should be stripped!
22960 </p><p>Taiwan is Taiwan.
22963 <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>
22964 <p>Taiwan is China.</p>
22968 Code coverage: T with no variants
22970 language=zh variant=zh-tw showtitle
22972 -{H|zh:China; zh-tw:Taiwan}-
22973 Taiwan is China.-{T|Taiwan is China}-
22980 <p><meta typeof="mw:LanguageVariant" data-mw-variant='{"add":true,"twoway":[{"l":"zh","t":"China"},{"l":"zh-tw","t":"Taiwan"}]}'/>
22981 Taiwan is China.<meta typeof="mw:LanguageVariant" data-mw-variant='{"disabled":{"t":"Taiwan is China"},"title":true}'/></p>
22985 Code coverage: rules with no variants
22987 language=zh variant=zh-tw
22989 -{H|zh:China; zh-tw:Taiwan}-
23000 <p><meta typeof="mw:LanguageVariant" data-mw-variant='{"add":true,"twoway":[{"l":"zh","t":"China"},{"l":"zh-tw","t":"Taiwan"}]}'/>
23002 <meta typeof="mw:LanguageVariant" data-mw-variant='{"add":true,"twoway":[{"l":"*","t":"China"}]}'/>
23003 Taiwan is China.</p>
23008 Code coverage: D flag for conversion rule
23010 language=zh variant=zh-tw
23012 -{D|zh-cn:XA; zh-tw:YA}-
23013 -{A;D|zh-cn:XB; zh-tw:YB}-
23014 -{D;H|zh-cn:XC; zh-tw:YC}-
23016 -{D;H|FOO=>zh-tw:BAR;FOO=>zh-cn:BAT}-
23022 XA XB XC YA YB YC FOO BAR BAT 012345
23027 </p><p>FOO⇒台灣:BAR;FOO⇒大陆:BAT;
23031 </p><p>XA YB YC YA YB YC BAR BAR BAT 013355
23034 <p><span typeof="mw:LanguageVariant" data-mw-variant='{"describe":true,"twoway":[{"l":"zh-cn","t":"XA"},{"l":"zh-tw","t":"YA"}]}'></span>
23035 <meta typeof="mw:LanguageVariant" data-mw-variant='{"add":true,"describe":true,"twoway":[{"l":"zh-cn","t":"XB"},{"l":"zh-tw","t":"YB"}]}'/>
23036 <span typeof="mw:LanguageVariant" data-mw-variant='{"add":true,"describe":true,"twoway":[{"l":"zh-cn","t":"XC"},{"l":"zh-tw","t":"YC"}]}'></span></p>
23037 <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>
23038 <p><span typeof="mw:LanguageVariant" data-mw-variant='{"describe":true,"oneway":[{"f":"0","l":"zh-tw","t":"1"}]}'></span>
23039 <meta typeof="mw:LanguageVariant" data-mw-variant='{"add":true,"describe":true,"oneway":[{"f":"2","l":"zh-tw","t":"3"}]}'/>
23040 <span typeof="mw:LanguageVariant" data-mw-variant='{"add":true,"describe":true,"oneway":[{"f":"4","l":"zh-tw","t":"5"}]}'></span></p>
23041 <p>XA XB XC YA YB YC FOO BAR BAT 012345</p>
23045 Code coverage: N flag for conversion rule
23047 language=zh variant=zh-cn
23057 </p><p>српски (ћирилица)
23060 <p><span typeof="mw:LanguageVariant" data-mw-variant='{"name":{"t":"zh-cn"}}'></span></p>
23061 <p><span typeof="mw:LanguageVariant" data-mw-variant='{"name":{"t":"zh-tw"}}'></span></p>
23062 <p><span typeof="mw:LanguageVariant" data-mw-variant='{"name":{"t":"sr-ec"}}'></span></p>
23065 # html2wt suppresses the bogus 'D' flag, so this is wt2html only
23067 Code coverage: N flag for conversion rule (wt2html only)
23069 language=zh variant=zh-cn
23070 parsoid=wt2html,html2html
23077 <p><span typeof="mw:LanguageVariant" data-mw-variant='{"name":{"t":"en"}}' data-parsoid='{"fl":["D","N"]}'></span></p>
23081 Testing that changing the language variant here in the tests actually works
23083 language=zh variant=zh showtitle
23085 Should be stripped-{T|zh:China; zh-tw:Taiwan}-!
23088 <p>Should be stripped!
23091 <p>Should be stripped<meta typeof="mw:LanguageVariant" data-mw-variant='{"title":true,"twoway":[{"l":"zh","t":"China"},{"l":"zh-tw","t":"Taiwan"}]}'/>!</p>
23095 Recursive conversion of alt and title attrs shouldn't clear converter state
23097 language=zh variant=zh-cn
23100 -{H|zh-cn:Exclamation; zh-tw:exclamation}-
23101 Should be stripped-{T|zh-cn:China; zh-tw:Taiwan}-<span title="exclamation">!</span>
23105 Should be stripped<span title="Exclamation">!</span>
23108 <p><meta typeof="mw:LanguageVariant" data-mw-variant='{"add":true,"twoway":[{"l":"zh-cn","t":"Exclamation"},{"l":"zh-tw","t":"exclamation"}]}'/>
23109 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>
23113 T26072: more test on conversion rule for title
23115 language=zh variant=zh-tw showtitle
23117 This should be stripped-{T|zh:China; zh-tw:Taiwan}-!
23119 This won't take interferes with the title rule-{H|zh:Beijing; zh-tw:Taipei}-.
23122 <p>This should be stripped!
23123 </p><p>This won't take interferes with the title rule.
23126 <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>
23127 <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>
23131 Partly disable title conversion if variant == main language code
23133 language=zh variant=zh title=[[ZH]] showtitle
23135 -{T|zh-cn:CN;zh-tw:TW}-
23141 <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>
23145 Partly disable title conversion if variant == main language code, more
23147 language=zh variant=zh title=[[ZH]] showtitle
23155 <p><meta typeof="mw:LanguageVariant" data-mw-variant='{"disabled":{"t":"TW"},"title":true}'/></p>
23159 Raw output of variant escape tags (R flag)
23161 language=zh variant=zh-tw
23163 Raw: -{R|zh:China;zh-tw:Taiwan}-
23165 <p>Raw: zh:China;zh-tw:Taiwan
23168 <p>Raw: <span typeof="mw:LanguageVariant" data-mw-variant='{"disabled":{"t":"zh:China;zh-tw:Taiwan"}}'></span></p>
23171 # html2wt suppresses the bogus 'D' flags, so this is wt2html only
23173 Raw output of variant escape tags (R flag) (wt2html only)
23175 language=zh variant=zh-tw
23176 parsoid=wt2html,html2html
23178 -{Variant}- -{D|syntax}- -{D;R|options}-
23180 <p>Variant syntax options
23183 <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>
23187 Nested markup inside raw output of variant escape tags (R flag)
23189 language=zh variant=zh-tw
23191 Nested raw: -{R|nested -{zh:China;zh-tw:Taiwan}- nested}-
23193 <p>Nested raw: nested Taiwan nested
23196 <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>
23200 Nested markup and spaces inside raw output of variant escape tags (R flag)
23202 language=zh variant=zh-tw
23204 X-{ outer -{ inner }- outer }-X
23206 <p>X outer inner outer X
23209 <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>
23213 Templates inside raw output of variant escape tags (R flag)
23215 language=zh variant=zh-tw
23217 Nested raw: -{R|nested {{echo|hi}} templates}-
23219 <p>Nested raw: nested hi templates
23222 <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>
23226 Strings evaluating false shouldn't be ignored by Language converter (T51072)
23228 language=zh variant=zh-cn
23230 -{zh-cn:0;zh-sg:1;zh-tw:2;zh-hk:3}-
23235 <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>
23239 Conversion rules from [numeric-only string] to [something else] (T48634)
23241 language=zh variant=zh-cn
23243 -{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
23248 <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>
23252 Two-way converter rule entries with an empty value should be ignored (T53551)
23254 language=zh variant=zh-cn
23256 -{H|zh-cn:foo;zh-tw:;}-foobar
23261 <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>
23265 One-way converter rule entries with an empty "from" string should be ignored (T53551)
23267 language=zh variant=zh-cn
23269 -{H|=>zh-cn:foo;}-foobar
23274 <p><meta typeof="mw:LanguageVariant" data-parsoid='{"tSp":[5]}' data-mw-variant='{"add":true,"oneway":[{"f":"","l":"zh-cn","t":"foo"}]}'/>foobar</p>
23278 Empty converter rule entries shouldn't be inserted into the conversion table (T53551)
23280 language=zh variant=zh-cn
23287 <p><meta typeof="mw:LanguageVariant" data-mw-variant='{"add":true,"twoway":[{"l":"*","t":""}]}'/>foobar</p>
23291 Nested using of manual convert syntax
23293 language=zh variant=zh-hk
23295 Nested: -{zh-hans:Hi -{zh-cn:China;zh-sg:Singapore;}-;zh-hant:Hello -{zh-tw:Taiwan;zh-hk:H-{ong}- K-{}-ong;}-;}-!
23297 <p>Nested: Hello Hong Kong!
23300 <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>
23304 HTML markups with conversion syntax in attribs, nested in other conversion blocks
23306 language=zh variant=zh-cn
23308 -{zh;zh-hans;zh-hant|<span title="-{X}-">A</span>}-
23310 <p><span title="X">A</span>
23313 <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>
23317 HTML markups with conversion syntax in attribs, nested in other conversion blocks (not working yet in PHP parser)
23319 language=zh variant=zh-cn
23321 -{<span title="-{X}-">A</span>}-
23322 !! html/php+disabled
23323 <p><span title="X">A</span>
23326 <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>
23329 # Parsoid and PHP disagree on how to parse this example: Parsoid
23330 # insists that the content of a language converter element be a valid
23331 # DOM fragment or attribute string
23333 Language converter markup with block content
23335 language=zh variant=zh-cn
23337 <span>a-{b<div>c}-d
23339 <span>a-{zh;zh-hans;zh-hant|b<div>c}-d
23341 <span>a-{H|0=>zh-cn:x<span>y;0=>zh-tw:b<div>c}-d
23346 </span></div></span></div></span>
23348 <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
23350 <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
23352 <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>
23356 LanguageConverter selser (1)
23358 language=zh variant=zh-cn
23360 "modes": ["wt2wt", "selser"],
23362 ["span[typeof]", "attr", "data-mw-variant", "{\"disabled\":{\"t\":\"edited\"}}"]
23372 LanguageConverter selser (2)
23374 language=zh variant=zh-cn
23376 "modes": ["wt2wt", "selser"],
23378 ["span[class='x']", "contents", "text", "-{foo}-"],
23379 ["a", "contents", "text", "-{"],
23380 ["span[typeof]", "attr", "data-mw", "{\"parts\":[{\"template\":{\"target\":{\"wt\":\"1x\",\"href\":\"./Template:1x\"},\"params\":{\"1\":{\"wt\":\"-{\"}},\"i\":0}}]}"]
23384 <span class="x">TEXT1</span>
23385 [http://example.com TEXT2]
23389 <span class="x"><nowiki>-{foo}-</nowiki></span>
23390 [http://example.com -{]
23391 [[Foo|<nowiki>-{</nowiki>]]
23392 {{1x|<nowiki>-{</nowiki>}}
23395 # Tests LanguageVariantText in ConstrainedText
23397 LanguageConverter selser (3)
23399 language=zh variant=zh-cn
23401 "modes": ["wt2wt", "selser"],
23403 ["td > span", "attr", "typeof", "mw:LanguageVariant"],
23404 ["td > span", "attr", "data-mw-variant", "{\"disabled\":{\"t\":\"edited\"}}"]
23415 |<nowiki/>-{edited}-
23419 # Tests LanguageVariantText._fromSelSer
23421 LanguageConverter selser (4)
23423 language=zh variant=zh-cn
23425 "modes": ["wt2wt", "selser"],
23427 ["td > span.x", "remove"]
23433 |<span class="x">Foo</span>-{Bar}-
23434 ||<span class="x">Foo</span>-{Bar}-
23444 # Since Parsoid is starting to emit canonical wikitext for links,
23445 # [http://example.com http://example.com] will not RT back to that
23447 # Parsoid does not language-convert links (it is done in a
23448 # post-processing step)
23450 Proper conversion of text in external links
23452 language=sr variant=sr-ec
23455 http://www.google.com
23456 gopher://www.google.com
23457 [http://www.google.com http://www.google.com]
23458 [gopher://www.google.com gopher://www.google.com]
23459 [https://www.google.com irc://www.google.com]
23460 [ftp://www.google.com www.google.com/ftp://dir]
23461 [//www.google.com www.google.com]
23463 <p><a rel="nofollow" class="external free" href="http://www.google.com">http://www.google.com</a>
23464 <a rel="nofollow" class="external free" href="gopher://www.google.com">gopher://www.google.com</a>
23465 <a rel="nofollow" class="external text" href="http://www.google.com">http://www.google.com</a>
23466 <a rel="nofollow" class="external text" href="gopher://www.google.com">gopher://www.google.com</a>
23467 <a rel="nofollow" class="external text" href="https://www.google.com">irc://www.google.com</a>
23468 <a rel="nofollow" class="external text" href="ftp://www.google.com">www.гоогле.цом/фтп://дир</a>
23469 <a rel="nofollow" class="external text" href="//www.google.com">www.гоогле.цом</a>
23472 <p><a rel="mw:ExtLink" class="external free" href="http://www.google.com">http://www.google.com</a>
23473 <a rel="mw:ExtLink" class="external free" href="gopher://www.google.com">gopher://www.google.com</a>
23474 <a rel="mw:ExtLink" class="external text" href="http://www.google.com">http://www.google.com</a>
23475 <a rel="mw:ExtLink" class="external text" href="gopher://www.google.com">gopher://www.google.com</a>
23476 <a rel="mw:ExtLink" class="external text" href="https://www.google.com">irc://www.google.com</a>
23477 <a rel="mw:ExtLink" class="external text" href="ftp://www.google.com">www.google.com/ftp://dir</a>
23478 <a rel="mw:ExtLink" class="external text" href="//www.google.com">www.google.com</a></p>
23482 Do not convert roman numbers to language variants
23484 language=sr variant=sr-ec
23488 <p>Фридрих IV је цар.
23491 <p>Fridrih IV je car.</p>
23495 Unclosed language converter markup "-{"
23506 Don't convert raw rule "-{R|=>}-" to "=>"
23515 <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>
23519 Don't break link parsing if language converter markup is in the caption.
23521 language=sr variant=sr-ec
23523 [[Main Page|-{R|main page}-]]
23525 <p><a href="/wiki/Main_Page" title="Маин Паге">main page</a>
23528 <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>
23532 T146304: Don't break template parsing if language converter markup is in the parameter.
23534 language=sr variant=sr-ec
23541 <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>
23545 T146305: Don't break image parsing if language converter markup is in the caption.
23549 [[Датотека:Foobar.jpg|thumb|-{R|caption:}-]]
23551 <div class="thumb tright"><div class="thumbinner" style="width:182px;"><a href="/wiki/%D0%94%D0%B0%D1%82%D0%BE%D1%82%D0%B5%D0%BA%D0%B0:Foobar.jpg" class="image"><img alt="" src="http://example.com/images/thumb/3/3a/Foobar.jpg/180px-Foobar.jpg" width="180" height="20" class="thumbimage" srcset="http://example.com/images/thumb/3/3a/Foobar.jpg/270px-Foobar.jpg 1.5x, http://example.com/images/thumb/3/3a/Foobar.jpg/360px-Foobar.jpg 2x" /></a> <div class="thumbcaption"><div class="magnify"><a href="/wiki/%D0%94%D0%B0%D1%82%D0%BE%D1%82%D0%B5%D0%BA%D0%B0:Foobar.jpg" class="internal" title="Повећајте"></a></div>caption:</div></div></div>
23554 <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>
23558 T146305: Don't break image parsing if nested language converter markup is in the caption.
23560 language=zh variant=zh-cn
23562 [[File:Foobar.jpg|thumb|-{|zh-cn:blog (hk: -{zh-hans|WEBJOURNAL}-, tw: -{zh-hans|WEBLOG}-)}-]]
23564 <div class="thumb tright"><div class="thumbinner" style="width:182px;"><a href="/wiki/File:Foobar.jpg" class="image"><img alt="" src="http://example.com/images/thumb/3/3a/Foobar.jpg/180px-Foobar.jpg" width="180" height="20" class="thumbimage" srcset="http://example.com/images/thumb/3/3a/Foobar.jpg/270px-Foobar.jpg 1.5x, http://example.com/images/thumb/3/3a/Foobar.jpg/360px-Foobar.jpg 2x" /></a> <div class="thumbcaption"><div class="magnify"><a href="/wiki/File:Foobar.jpg" class="internal" title="放大"></a></div>blog (hk: WEBJOURNAL, tw: WEBLOG)</div></div></div>
23567 <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>
23570 # XXX html2wt disabled because rich markup in alt is not preserved.
23572 Don't break gallery if language converter markup is inside.
23577 File:foobar.jpg|[[File:foobar.jpg|20px|desc|alt=-{R|foo}-|-{R|bar}-]]|alt=-{R|bat}-
23578 File:foobar.jpg|{{Test|unamedParam|alt=-{R|param}-}}|alt=galleryalt
23581 <ul class="gallery mw-gallery-traditional">
23582 <li class="gallerybox" style="width: 155px"><div style="width: 155px">
23583 <div class="thumb" style="width: 150px;"><div style="margin:68px auto;"><a href="/wiki/File:Foobar.jpg" class="image"><img alt="bat" src="http://example.com/images/thumb/3/3a/Foobar.jpg/120px-Foobar.jpg" width="120" height="14" srcset="http://example.com/images/thumb/3/3a/Foobar.jpg/180px-Foobar.jpg 1.5x, http://example.com/images/thumb/3/3a/Foobar.jpg/240px-Foobar.jpg 2x" /></a></div></div>
23584 <div class="gallerytext">
23585 <p><a href="/wiki/File:Foobar.jpg" class="image" title="bar"><img alt="foo" src="http://example.com/images/thumb/3/3a/Foobar.jpg/20px-Foobar.jpg" width="20" height="2" srcset="http://example.com/images/thumb/3/3a/Foobar.jpg/30px-Foobar.jpg 1.5x, http://example.com/images/thumb/3/3a/Foobar.jpg/40px-Foobar.jpg 2x" /></a>
23589 <li class="gallerybox" style="width: 155px"><div style="width: 155px">
23590 <div class="thumb" style="width: 150px;"><div style="margin:68px auto;"><a href="/wiki/File:Foobar.jpg" class="image"><img alt="galleryalt" src="http://example.com/images/thumb/3/3a/Foobar.jpg/120px-Foobar.jpg" width="120" height="14" srcset="http://example.com/images/thumb/3/3a/Foobar.jpg/180px-Foobar.jpg 1.5x, http://example.com/images/thumb/3/3a/Foobar.jpg/240px-Foobar.jpg 2x" /></a></div></div>
23591 <div class="gallerytext">
23592 <p>This is a test template
23599 <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"}}'>
23600 <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>
23601 <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>
23606 T153135: Don't break list handling if language converter markup is in the item.
23608 language=zh variant=zh-cn
23610 ;-{zh-cn:AAA;zh-tw:BBB}-
23614 <dt>foo:bar</dt></dl>
23617 <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>
23618 <dt data-parsoid='{"dsr":[25,39,1,0]}'><span typeof="mw:LanguageVariant" data-mw-variant='{"disabled":{"t":"foo:bar"}}'></span></dt>
23622 // Note that parsoid does not protect colons unless language converter
23623 // markup is properly nested, because it is a backtracking parser.
23625 T153135: Unclosed markup in definition list (code coverage)
23627 language=zh variant=zh-cn
23632 <dl><dt><b>foo:bar</b></dt><b>
23633 <dt>-{zh-cn:AAA</dt></b></dl><p><b>
23636 <dl><dt data-parsoid='{}'><b data-parsoid='{"stx":"html","autoInsertedEnd":true}'>foo:bar</b></dt><b data-parsoid='{"stx":"html","autoInsertedEnd":true,"autoInsertedStart":true}'>
23637 <dt data-parsoid='{}'>-{zh-cn</dt><dd data-parsoid='{"stx":"row"}'>AAA</dd></b></dl>
23641 T153135: Nested language converter markup in definition list (code coverage)
23643 language=zh variant=zh-cn
23645 ;-{|zh-cn:AAA -{zh-hans|foo:bar}- -{R|bat:baz}-}-:def
23647 <dl><dt>AAA foo:bar bat:baz</dt>
23651 <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>
23652 <dd data-parsoid='{"stx":"row","dsr":[49,53,1,0]}'>def</dd>
23656 # html2wt mode disabled due to <nowiki> insertion.
23658 T153140: Don't break table handling if language converter markup is in the cell.
23660 language=sr variant=sr-ec
23661 parsoid=wt2html,wt2wt,html2html
23678 <td><span typeof="mw:LanguageVariant" data-mw-variant='{"disabled":{"t":"B"}}'></span></td>
23685 Language converter tricky html2wt cases (1)
23688 parsoid=html2wt,wt2wt
23690 <p><span typeof="mw:LanguageVariant" data-mw-variant='{"disabled":{"t":"}-"}}'></span></p>
23692 -{<nowiki>}-</nowiki>}-
23699 Language converter tricky html2wt cases (2)
23702 parsoid=html2wt,wt2wt
23706 <nowiki>-{foo}-</nowiki>
23708 <p>-{foo}-
23713 Language converter tricky html2wt cases (3)
23716 parsoid=html2wt,wt2wt
23718 <p><span typeof="mw:LanguageVariant" data-mw-variant='{"disabled":{"t":"|"}}'></span></p>
23719 <p><span typeof="mw:LanguageVariant" data-mw-variant='{"disabled":{"t":"R|raw"}}'></span></p>
23720 <p><span typeof="mw:LanguageVariant" data-mw-variant='{"disabled":{"t":"-{foo}-"}}'></span></p>
23726 -{<nowiki>-{foo}-</nowiki>}-
23730 </p><p>-{foo}-
23735 Language converter tricky html2wt cases (4)
23738 parsoid=html2wt,wt2wt
23740 <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>
23748 # Note that the <nowiki> escaping added by parsoid for source text,
23749 # destination text, and language names only works on the PHP side
23750 # for *destination text*. (HTML entity escaping wouldn't work
23751 # any better.) This is probably a bug, at least for source texts.
23752 # (For language names PHP uses a precise regexp based on the languages
23753 # it currently knows have variants, which is fragile since this set
23754 # can grow/shrink over time.)
23756 Language converter tricky html2wt cases (5)
23758 language=zh variant=zh-cn
23760 <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>
23761 <p><meta typeof="mw:LanguageVariant" data-mw-variant='{"add":true,"oneway":[{"f":"A","l":"bo:g;us","t":"B"}]}'/></p>
23762 <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>
23763 <p><span typeof="mw:LanguageVariant" data-mw-variant='{"twoway":[{"l":"bo:g;us","t":"xyz"},{"l":"zh-cn","t":"abc"}]}'></span></p>
23766 -{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
23768 -{H|A=><nowiki>bo:g;us</nowiki>:B}-
23770 -{A|zh-tw:xyz; zh-cn:<nowiki>0;zh-tw:bar</nowiki>}-
23772 -{<nowiki>bo:g;us</nowiki>:xyz; zh-cn:abc}-
23775 !! html/php+disabled
23776 <p>foobat;xyz=>zh-cn:abc
23780 </p><p>a:b=>c 0;zh-tw:bar
23785 T179579: Nowiki and lc interaction
23792 -{123<nowiki>|</nowiki>456}-
23794 <p><span typeof="mw:LanguageVariant" data-mw-variant='{"disabled":{"t":"&lt;/nowiki>123"}}' data-parsoid='{"fl":[],"src":"-{</nowiki>123}-"}'></span></p>
23796 <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>
23800 T2529: Uncovered bullet
23810 T2529: Uncovered bullet in a deeply nested list
23812 *******Foo {{bullet}}
23814 <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>
23820 T2529: Uncovered table already at line-start
23843 T2529: Uncovered bullet in parser function result
23845 *Foo {{lc:{{bullet}} }}
23853 T7678: Double-parsed template argument
23855 {{lc:{{{1}}}|hello}}
23862 T7678: Double-parsed template invocation
23864 {{lc:{{paramtest {{!}} param = hello }} }}
23866 <p>{{paramtest | param = hello }}
23871 Case insensitivity of parser functions for non-ASCII characters (T10143)
23874 title=[[Main Page]]
23876 {{PRVNÍVELKÉ:ěščř}}
23877 {{prvnívelké:ěščř}}
23897 Morwen/13: Unclosed link followed by heading
23904 <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>
23909 HHP2.1: Heuristics for headings in preprocessor parenthetical structures
23916 <h1><span class="mw-headline" id="heading">heading</span></h1>
23921 HHP2.2: Heuristics for headings in preprocessor parenthetical structures
23928 <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>
23943 Paragraphs inside divs (no extra line breaks)
23955 Paragraphs inside divs (extra line break on open)
23970 Paragraphs inside divs (extra line break on close)
23985 Paragraphs inside divs (extra line break on open and close)
24001 # doBlockLevels screws up this output and Remex cleans up as much as it can.
24003 Nesting tags, paragraphs on lines which begin with <div>
24005 <div></div><strong>A
24008 <div></div><p><strong>A
24009 </strong></p><strong></strong><p><strong>B</strong>
24012 <div data-parsoid='{"stx":"html"}'></div><p><strong data-parsoid='{"stx":"html","autoInsertedEnd":true}'>A</strong></p>
24013 <p><strong data-parsoid='{"stx":"html","autoInsertedStart":true}'>B</strong></p>
24016 # T8200: <blockquote> should behave like <div> with respect to line breaks
24018 T8200: paragraphs inside blockquotes (no extra line breaks)
24020 <blockquote>Line one
24022 Line two</blockquote>
24024 <blockquote>Line one
24025 Line two</blockquote>
24028 <blockquote><p>Line one
24029 Line two</p></blockquote>
24033 T8200: paragraphs inside blockquotes (extra line break on open)
24038 Line two</blockquote>
24043 Line two</blockquote>
24049 Line two</p></blockquote>
24053 T8200: paragraphs inside blockquotes (extra line break on close)
24055 <blockquote>Line one
24060 <blockquote>Line one
24066 <blockquote><p>Line one
24073 T8200: paragraphs inside blockquotes (extra line break on open and close)
24089 ## This is a corner case interaction between the paragraph wrapping in the
24090 ## php parser's BlockLevelPass and Remex. `doBlockLevels` has a notion of
24091 ## some tags which close paragraphs (and thus prevent wrapping on their line),
24092 ## of which "div" is one, but do p-wrapping inside them. These are referred
24093 ## to as "never suppressing". Remex, for its part, doesn't traverse into
24094 ## "div"s to p-wrap. Hence, we only get this partial wrapping.
24096 Paragraphs inside blockquotes/divs (no extra line breaks)
24098 <blockquote><div>Line one
24100 Line two</div></blockquote>
24102 <blockquote><div>Line one
24103 Line two</div></blockquote>
24108 Paragraphs inside blockquotes/divs (extra line break on open)
24113 Line two</div></blockquote>
24118 Line two</div></blockquote>
24123 Paragraphs inside blockquotes/divs (extra line break on close)
24125 <blockquote><div>Line one
24128 </div></blockquote>
24130 <blockquote><div>Line one
24133 </div></blockquote>
24138 Paragraphs inside blockquotes/divs (extra line break on open and close)
24144 </div></blockquote>
24150 </div></blockquote>
24155 Interwiki links trounced by replaceExternalLinks after early LinkHolderArray expansion
24157 wgLinkHolderBatchSize=0
24163 <p><a href="http://www.usemod.com/cgi-bin/mb.pl?1" class="extiw" title="meatball:1">meatball:1</a>
24164 <a href="http://www.usemod.com/cgi-bin/mb.pl?2" class="extiw" title="meatball:2">meatball:2</a>
24165 <a href="http://www.usemod.com/cgi-bin/mb.pl?3" class="extiw" title="meatball:3">meatball:3</a>
24170 Free external link invading image caption
24172 [[Image:Foobar.jpg|thumb|http://x|hello]]
24174 <div class="thumb tright"><div class="thumbinner" style="width:182px;"><a href="/wiki/File:Foobar.jpg" class="image"><img alt="" src="http://example.com/images/thumb/3/3a/Foobar.jpg/180px-Foobar.jpg" width="180" height="20" class="thumbimage" srcset="http://example.com/images/thumb/3/3a/Foobar.jpg/270px-Foobar.jpg 1.5x, http://example.com/images/thumb/3/3a/Foobar.jpg/360px-Foobar.jpg 2x" /></a> <div class="thumbcaption"><div class="magnify"><a href="/wiki/File:Foobar.jpg" class="internal" title="Enlarge"></a></div>hello</div></div></div>
24177 <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>
24181 T17196: localised external link numbers
24185 [http://en.wikipedia.org/]
24187 <p><a rel="nofollow" class="external autonumber" href="http://en.wikipedia.org/">[۱]</a>
24190 <p><a rel="mw:ExtLink" class="external autonumber" href="http://en.wikipedia.org/"></a></p>
24194 Multibyte character in padleft
24196 {{padleft:-Hello|7|Æ}}
24201 <p typeof="mw:Transclusion" data-mw='{"parts":[{"template":{"target":{"wt":"padleft:-Hello","function":"padleft"},"params":{"1":{"wt":"7"},"2":{"wt":"Æ"}},"i":0}}]}'>Æ-Hello</p>
24205 Multibyte character in padright
24207 {{padright:Hello-|7|Æ}}
24212 <p typeof="mw:Transclusion" data-mw='{"parts":[{"template":{"target":{"wt":"padright:Hello-","function":"padright"},"params":{"1":{"wt":"7"},"2":{"wt":"Æ"}},"i":0}}]}'>Hello-Æ</p>
24216 formatdate parser function
24218 {{#formatdate:2009-03-24}}
24220 <p><span class="mw-formatted-date" title="2009-03-24">2009-03-24</span>
24225 formatdate parser function, with default format
24227 {{#formatdate:2009-03-24|mdy}}
24229 <p><span class="mw-formatted-date" title="2009-03-24">March 24, 2009</span>
24234 Spacing of numbers in formatted dates
24236 {{#formatdate:January 15}}
24238 <p><span class="mw-formatted-date" title="01-15">January 15</span>
24243 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
24245 language=nl title=[[MediaWiki:Common.css]]
24247 {{#formatdate:2009-03-24|dmy}}
24249 <p><span class="mw-formatted-date" title="2009-03-24">24 March 2009</span>
24262 Edit comment with link
24266 I like the [[Main Page]] a lot
24268 I like the <a href="/wiki/Main_Page" title="Main Page">Main Page</a> a lot
24272 Edit comment with link and link text
24276 I like the [[Main Page|best pages]] a lot
24278 I like the <a href="/wiki/Main_Page" title="Main Page">best pages</a> a lot
24282 Edit comment with link and link text with suffix
24286 I like the [[Main Page|best page]]s a lot
24288 I like the <a href="/wiki/Main_Page" title="Main Page">best pages</a> a lot
24292 Edit comment with section link (non-local, eg in history list)
24294 comment title=[[Main Page]]
24296 /* External links */ removed bogus entries
24298 <a href="/wiki/Main_Page#External_links" title="Main Page">→</a><span dir="auto"><span class="autocomment">External links: </span> removed bogus entries</span>
24302 Edit comment with section link and text before it (non-local, eg in history list)
24304 comment title=[[Main Page]]
24306 pre-comment text /* External links */ removed bogus entries
24308 pre-comment text <a href="/wiki/Main_Page#External_links" title="Main Page">→</a><span dir="auto"><span class="autocomment">External links: </span> removed bogus entries</span>
24312 Edit comment with section link (local, eg in diff view)
24314 comment local title=[[Main Page]]
24316 /* External links */ removed bogus entries
24318 <a href="#External_links">→</a><span dir="auto"><span class="autocomment">External links: </span> removed bogus entries</span>
24322 Edit comment with subpage link (T16080)
24326 title=[[Subpage test]]
24328 Poked at a [[/subpage]] here...
24330 Poked at a <a href="/wiki/Subpage_test/subpage" title="Subpage test/subpage">/subpage</a> here...
24334 Edit comment with subpage link and link text (T16080)
24338 title=[[Subpage test]]
24340 Poked at a [[/subpage|neat little page]] here...
24342 Poked at a <a href="/wiki/Subpage_test/subpage" title="Subpage test/subpage">neat little page</a> here...
24346 Edit comment with bogus subpage link in non-subpage NS (T16080)
24349 title=[[Subpage test]]
24351 Poked at a [[/subpage]] here...
24353 Poked at a <a href="/index.php?title=/subpage&action=edit&redlink=1" class="new" title="/subpage (page does not exist)">/subpage</a> here...
24357 Edit comment with bare anchor link (local, as on diff)
24361 title=[[Main Page]]
24365 <a href="#section">#section</a>
24369 Edit comment with bare anchor link (non-local, as on history)
24372 title=[[Main Page]]
24376 <a href="/wiki/Main_Page#section" title="Main Page">#section</a>
24380 Anchor starting with underscore
24386 <p><a href="#_ref">One</a>
24389 <p><a rel="mw:WikiLink" href="./Foo#_ref" data-parsoid='{"stx":"piped","a":{"href":"./Foo#_ref"},"sa":{"href":"#_ref"}}'>One</a></p>
24393 Id starting with underscore
24395 <div id="_ref"></div>
24397 <div id="_ref"></div>
24402 Edit comment with link with more than one pipe (T99346)
24406 [[Main Page|Many|pipes]]
24408 <a href="/wiki/Main_Page" title="Main Page">Many|pipes</a>
24412 Complex edit comment with link with more than one pipe (T99346)
24416 Created page with "<noinclude>[[Category:Requests for permissions/Bot|{{subst:#titleparts:{{subst:PAGENAME}}|1|3}}]]</noinclude> === [[User:MineoBot|]] 8=== {{Request for permissions/links|Mineo..."
24418 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..."
24422 Space normalisation on autocomment (T24784)
24425 title=[[Main Page]]
24427 /* __hello__world__ */
24429 <a href="/wiki/Main_Page#hello_world" title="Main Page">→</a><span dir="auto"><span class="autocomment">__hello__world__</span></span>
24433 percent-encoding and + signs in comments (T28410)
24437 [[ABC%33D% ++]] [[ABC%33D% ++|+%20]]
24439 <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>
24442 # Parsoid doesn't support this yet: see T75581
24443 # but it *should* omit the 'src' attribute if the image is bad.
24444 # PHP side of tests was disabled in
24445 # mediawiki/core:6bd31e7d95161a6e88fa86df60871051da997c3c
24446 # because of issues in the PHP parserTests infrastructure
24447 # (but the output below is indeed what the PHP side emits)
24449 Bad images - basic functionality
24452 !! html/php+disabled
24454 <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>
24458 Bad images - T18039: text after bad image disappears
24463 !! html/php+disabled
24469 <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>
24474 Verify that displaytitle works (T24501) no displaytitle
24478 wgAllowDisplayTitle=true
24479 wgRestrictDisplayTitle=false
24481 this is not the the title
24484 <p>this is not the the title
24489 Verify that displaytitle works (T24501) RestrictDisplayTitle=false
24494 wgAllowDisplayTitle=true
24495 wgRestrictDisplayTitle=false
24497 this is not the the title
24498 {{DISPLAYTITLE:whatever}}
24501 <p>this is not the the title
24506 Verify that displaytitle works (T24501) RestrictDisplayTitle=true mismatch
24511 wgAllowDisplayTitle=true
24512 wgRestrictDisplayTitle=true
24514 this is not the the title
24515 {{DISPLAYTITLE:whatever}}
24518 <p>this is not the the title
24523 Verify that displaytitle works (T24501) RestrictDisplayTitle=true matching
24528 wgAllowDisplayTitle=true
24529 wgRestrictDisplayTitle=true
24531 this is not the the title
24532 {{DISPLAYTITLE:screen}}
24535 <p>this is not the the title
24540 Verify that displaytitle works (T24501) AllowDisplayTitle=false
24545 wgAllowDisplayTitle=false
24547 this is not the the title
24548 {{DISPLAYTITLE:screen}}
24551 <p>this is not the the title
24552 <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>
24557 Verify that displaytitle works (T24501) AllowDisplayTitle=false no DISPLAYTITLE
24562 wgAllowDisplayTitle=false
24564 this is not the the title
24567 <p>this is not the the title
24572 Verify that displaytitle handles inline CSS styles (T28547) - rejected value
24577 wgAllowDisplayTitle=true
24578 wgRestrictDisplayTitle=true
24580 this is not the the title
24581 {{DISPLAYTITLE:<span style="display: none;">s</span>creen}}
24583 <span style="/* attempt to bypass $wgRestrictDisplayTitle */">s</span>creen
24584 <p>this is not the the title
24589 Verify that displaytitle handles inline CSS styles (T28547) - accepted value
24594 wgAllowDisplayTitle=true
24595 wgRestrictDisplayTitle=true
24597 this is not the the title
24598 {{DISPLAYTITLE:<span style="color: red;">s</span>creen}}
24600 <span style="color: red;">s</span>creen
24601 <p>this is not the the title
24606 Page status indicators: Empty name is invalid
24610 <indicator name=" "></indicator>
24611 <indicator></indicator>
24613 <p><span class="error"><strong>Error:</strong> Page status indicators' <code>name</code> attribute must not be empty.</span>
24614 <span class="error"><strong>Error:</strong> Page status indicators' <code>name</code> attribute must not be empty.</span>
24619 Page status indicators: Weird syntaxes that are okay
24623 <indicator name="empty" />
24624 <indicator name="name"></indicator>
24633 Page status indicators: Torture test
24637 <indicator name="01">hello world</indicator>
24638 <indicator name="02">[[Main Page]]</indicator>
24639 <indicator name="03">[[File:Foobar.jpg|25px|link=]]</indicator>
24640 <indicator name="04">[[File:Foobar.jpg|25px]]</indicator>
24641 <indicator name="05">*foo
24643 <indicator name="06"><nowiki>foo</nowiki></indicator>
24644 <indicator name="07"> Preformatted</indicator>
24645 <indicator name="08"><div>Broken tag</indicator>
24646 <indicator name="09">{| class=wikitable
24649 <indicator name="10">Two
24651 paragraphs</indicator>
24654 02=<a href="/wiki/Main_Page" title="Main Page">Main Page</a>
24655 03=<img alt="Foobar.jpg" src="http://example.com/images/thumb/3/3a/Foobar.jpg/25px-Foobar.jpg" width="25" height="3" srcset="http://example.com/images/thumb/3/3a/Foobar.jpg/38px-Foobar.jpg 1.5x, http://example.com/images/thumb/3/3a/Foobar.jpg/50px-Foobar.jpg 2x" />
24656 04=<a href="/wiki/File:Foobar.jpg" class="image"><img alt="Foobar.jpg" src="http://example.com/images/thumb/3/3a/Foobar.jpg/25px-Foobar.jpg" width="25" height="3" srcset="http://example.com/images/thumb/3/3a/Foobar.jpg/38px-Foobar.jpg 1.5x, http://example.com/images/thumb/3/3a/Foobar.jpg/50px-Foobar.jpg 2x" /></a>
24657 05=<ul><li>foo</li>
24661 07=<pre>Preformatted
24663 08=<div>Broken tag</div>
24665 09=<table class="wikitable">
24682 preload: check <noinclude> and <includeonly>
24686 Hello <noinclude>cruel</noinclude><includeonly>kind</includeonly> world.
24692 preload: check <onlyinclude>
24696 Goodbye <onlyinclude>Hello world</onlyinclude>
24702 preload: can pass tags through if we want to
24706 <includeonly><</includeonly>includeonly>Hello world<includeonly><</includeonly>/includeonly>
24708 <includeonly>Hello world</includeonly>
24712 preload: check that it doesn't try to do tricks
24716 * <!-- Hello --> ''{{world}}'' {{<includeonly>subst:</includeonly>How are you}}{{ {{{|safesubst:}}} #if:1|2|3}}
24718 * <!-- Hello --> ''{{world}}'' {{subst:How are you}}{{ {{{|safesubst:}}} #if:1|2|3}}
24722 Play a bit with r67090 and T5158
24724 <div style="width:50% !important"> </div>
24725 <div style="width:50% !important"> </div>
24726 <div style="width:50% !important"> </div>
24727 <div style="border : solid;"> </div>
24729 <div style="width:50% !important"> </div>
24730 <div style="width:50% !important"> </div>
24731 <div style="width:50% !important"> </div>
24732 <div style="border : solid;"> </div>
24735 <div style="width:50% !important" data-parsoid='{"stx":"html"}'><span typeof="mw:Entity" data-parsoid='{"srcContent":" "}'> </span></div>
24736 <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>
24737 <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>
24738 <div style="border : solid;" data-parsoid='{"stx":"html"}'><span typeof="mw:Entity" data-parsoid='{"srcContent":" "}'> </span></div>
24743 French spaces in wikitext
24745 foo ! bar ? bat 50 % is less than 75 %.
24747 Hello : this ; is « something ‹ else › again »
24749 <p>foo ! bar ? bat 50 % is less than 75 %.
24750 </p><p>Hello : this ; is « something ‹ else › again »
24754 # It would be reasonable for Parsoid and PHP to differ here.
24755 # The PHP behavior is arguably a bug.
24757 Corner case: french spaces in definition list
24761 <dl><dt>foo </dt>
24766 T5158: Test for French spaces in attributes
24768 <br style=" clear : both ; " />
24770 <p><br style="clear : both ;" />
24775 HTML5 data attributes
24777 <span data-foo="bar">Baz</span>
24778 <p data-abc-def_hij="">Quuz</p>
24780 <p><span data-foo="bar">Baz</span>
24782 <p data-abc-def_hij="">Quuz</p>
24785 <p><span data-foo="bar" data-parsoid='{"stx":"html"}'>Baz</span></p>
24786 <p data-abc-def_hij="" data-parsoid='{"stx":"html"}'>Quuz</p>
24790 Strip reserved data attributes
24792 <div data-mw="foo" data-parsoid="bar" data-mw-someext="baz" data-ok="fred" data-ooui="xyzzy" data-bad:ns="ns">d</div>
24794 <div data-ok="fred">d</div>
24797 <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>
24801 percent-encoding and + signs in internal links (T28410)
24803 [[User:+%]] [[Page+title%]]
24804 [[%+]] [[%+|%20]] [[%+ ]] [[%+r]]
24805 [[%]] [[+]] [[File:%+abc%39|foo|[[bar]]]]
24806 [[%33%45]] [[%33%45+]]
24808 <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>
24809 <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>
24810 <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>
24811 <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>
24814 <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>
24815 <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>
24816 <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>
24817 <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>
24821 Special characters in embedded file links (T29679)
24823 [[File:Contains & ampersand.jpg]]
24824 [[File:Does not exist.jpg|Title with & ampersand]]
24826 <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>
24827 <a href="/index.php?title=Special:Upload&wpDestFile=Does_not_exist.jpg" class="new" title="File:Does not exist.jpg">Title with & ampersand</a>
24830 <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>
24831 <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>
24835 Confirm that 'apos' named character reference doesn't make it to output (not legal in HTML 4)
24837 Text's been normalized?
24839 <p>Text's been normalized?
24844 T21052 U+3000 IDEOGRAPHIC SPACE should terminate free external links
24846 http://www.example.org/ <-- U+3000 (vim: ^Vu3000)
24848 <p><a rel="nofollow" class="external free" href="http://www.example.org/">http://www.example.org/</a> <-- U+3000 (vim: ^Vu3000)
24853 T21052 U+3000 IDEOGRAPHIC SPACE should terminate bracketed external links
24855 [http://www.example.org/ ideograms]
24857 <p><a rel="nofollow" class="external text" href="http://www.example.org/">ideograms</a>
24862 T21052 U+3000 IDEOGRAPHIC SPACE should terminate external images links
24864 http://www.example.org/pic.png <-- U+3000 (vim: ^Vu3000)
24866 <p><img src="http://www.example.org/pic.png" alt="pic.png"/> <-- U+3000 (vim: ^Vu3000)
24890 T33098 Template which includes system messages which includes the template
24894 <p><span class="error">Template loop detected: <a href="/wiki/Template:Identical" title="Template:Identical">Template:Identical</a></span>
24895 <span class="error">Template loop detected: <a href="/wiki/Template:Identical" title="Template:Identical">Template:Identical</a></span>
24900 T33490 Turkish: ucfirst 'blah'
24911 T33490 Turkish: ucfirst 'ix'
24922 T33490 Turkish: lcfirst 'BLAH'
24933 T33490 Turkish: ucfırst (with a dotless i)
24939 <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>
24944 T33490 ucfırst (with a dotless i) with English language
24950 <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>
24954 # Note that Parsoid doesn't emit an explicit TOC.
24955 # Note also that the html2wt direction tends to emit an extra newline
24956 # between the __TOC__ magicword and the first heading unless *both*
24957 # the <meta> and the <h2> have a data-parsoid attribute set (even if
24961 T28375: TOC with italics
24963 title=[[Main Page]]
24966 ==''Lost'' episodes==
24968 <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>
24970 <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>
24974 <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>
24977 <meta property="mw:PageProp/toc" data-parsoid='{}'/>
24978 <h2 id="Lost_episodes" data-parsoid='{}'><i>Lost</i> episodes</h2>
24982 T28375: TOC with bold
24984 title=[[Main Page]]
24987 =='''should be bold''' then normal text==
24989 <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>
24991 <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>
24995 <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>
24998 <meta property="mw:PageProp/toc" data-parsoid='{}'/>
24999 <h2 id="should_be_bold_then_normal_text" data-parsoid='{}'><b>should be bold</b> then normal text</h2>
25003 T35845: Headings become cursive in TOC when they contain an image
25005 title=[[Main Page]]
25008 ==Image [[Image:foobar.jpg]]==
25010 <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>
25012 <li class="toclevel-1 tocsection-1"><a href="#Image"><span class="tocnumber">1</span> <span class="toctext">Image</span></a></li>
25016 <h2><span class="mw-headline" id="Image">Image <a href="/wiki/File:Foobar.jpg" class="image"><img alt="Foobar.jpg" src="http://example.com/images/3/3a/Foobar.jpg" width="1941" height="220" /></a></span><span class="mw-editsection"><span class="mw-editsection-bracket">[</span><a href="/index.php?title=Main_Page&action=edit&section=1" title="Edit section: Image">edit</a><span class="mw-editsection-bracket">]</span></span></h2>
25019 <meta property="mw:PageProp/toc" data-parsoid='{}'/>
25020 <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>
25024 T35845 (2): Headings become bold in TOC when they contain a blockquote
25026 title=[[Main Page]]
25029 ==<blockquote>Quote</blockquote>==
25031 <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>
25033 <li class="toclevel-1 tocsection-1"><a href="#Quote"><span class="tocnumber">1</span> <span class="toctext">Quote</span></a></li>
25037 <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>
25040 <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>
25042 <li class="toclevel-1 tocsection-1"><a href="#Quote"><span class="tocnumber">1</span> <span class="toctext">Quote</span></a></li>
25046 <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>
25048 <meta property="mw:PageProp/toc" data-parsoid='{}'/>
25049 <h2 id="Quote" data-parsoid='{}'><blockquote><p>Quote</p></blockquote></h2>
25053 Unclosed tags in TOC
25055 wgFragmentMode=[ 'html5', 'legacy' ]
25057 title=[[Main Page]]
25061 <small>Hanc marginis exiguitas non caperet.</small>
25064 <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>
25066 <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>
25070 <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>
25071 <p><small>Hanc marginis exiguitas non caperet.</small>
25075 <meta property="mw:PageProp/toc" data-parsoid='{}'/>
25076 <h2 id="Proof:_2_<_3" data-parsoid='{}'><span id="Proof:_2_.3C_3" typeof="mw:FallbackId"></span>Proof: 2 < 3</h2>
25077 <p><small>Hanc marginis exiguitas non caperet.</small>
25082 Multiple tags in TOC
25085 ==<i>Foo</i> <b>Bar</b>==
25087 ==<i>Foo</i> <blockquote>Bar</blockquote>==
25089 <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>
25091 <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>
25092 <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>
25096 <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>
25097 <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>
25100 <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>
25102 <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>
25103 <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>
25107 <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>
25108 <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>
25110 <meta property="mw:PageProp/toc" data-parsoid='{}'/>
25111 <h2 id="Foo_Bar" data-parsoid='{}'><i data-parsoid='{"stx":"html"}'>Foo</i> <b data-parsoid='{"stx":"html"}'>Bar</b></h2>
25113 <h2 id="Foo_Bar_2" data-parsoid='{}'><i data-parsoid='{"stx":"html"}'>Foo</i> <blockquote><p>Bar</p></blockquote></h2>
25116 # Don't expect Parsoid to roundtrip this until the php parser comes closer to
25117 # html5 tag parsing.
25119 Tags with parameters in TOC
25124 ==<sup class="in-h2">Hello</sup>==
25126 ==<sup class="a > b">Evilbye</sup>==
25128 <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>
25130 <li class="toclevel-1 tocsection-1"><a href="#Hello"><span class="tocnumber">1</span> <span class="toctext"><sup>Hello</sup></span></a></li>
25131 <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>
25135 <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>
25136 <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>
25139 <meta property="mw:PageProp/toc" />
25140 <h2 id="Hello"><sup class="in-h2" data-parsoid='{"stx":"html"}'>Hello</sup></h2>
25142 <h2 id='b">Evilbye'><span id="b.22.3EEvilbye" typeof="mw:FallbackId"></span><sup class="a " data-parsoid='{"stx":"html"}'> b">Evilbye</sup></h2>
25146 span tags with directionality in TOC
25149 ==<span dir="ltr">C++</span>==
25151 ==<span dir="rtl">זבנג!</span>==
25153 ==<span style="font-style: italic">The attributes on these span tags must be deleted from the TOC</span>==
25155 ==<span style="font-style: italic" dir="ltr">All attributes on these span tags must be deleted from the TOC</span>==
25157 ==<span dir="ltr" style="font-style: italic">Attributes after dir on these span tags must be deleted from the TOC</span>==
25159 <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>
25161 <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>
25162 <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>
25163 <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>
25164 <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>
25165 <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>
25169 <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>
25170 <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>
25171 <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>
25172 <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>
25173 <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>
25176 <meta property="mw:PageProp/toc" data-parsoid='{}'/>
25177 <h2 id="C++" data-parsoid='{}'><span id="C.2B.2B" typeof="mw:FallbackId"></span><span dir="ltr">C++</span></h2>
25178 <h2 id="זבנג!"><span id=".D7.96.D7.91.D7.A0.D7.92.21" typeof="mw:FallbackId"></span><span dir="rtl">זבנג!</span></h2>
25179 <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>
25180 <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>
25181 <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>
25185 T74884: bdi element in ToC
25188 ==<bdi>test</bdi>==
25190 <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>
25192 <li class="toclevel-1 tocsection-1"><a href="#test"><span class="tocnumber">1</span> <span class="toctext"><bdi>test</bdi></span></a></li>
25196 <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>
25199 <meta property="mw:PageProp/toc" data-parsoid='{}'/>
25200 <h2 id="test" data-parsoid='{}'><bdi>test</bdi></h2>
25204 T35715: s/strike element in ToC
25207 ==<s>test</s> test <strike>test</strike>==
25209 <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>
25211 <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>
25215 <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>
25218 <meta property="mw:PageProp/toc" data-parsoid='{}'/>
25219 <h2 id="test_test_test" data-parsoid='{}'><s>test</s> test <strike>test</strike></h2>
25223 T198618: style element in ToC
25228 ==<style>.foo {}</style>Style<style>.bar {}</style>==
25230 <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>
25232 <li class="toclevel-1 tocsection-1"><a href="#Style"><span class="tocnumber">1</span> <span class="toctext">Style</span></a></li>
25236 <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>
25239 <meta property="mw:PageProp/toc" data-parsoid='{}'/>
25240 <h2 id="Style" data-parsoid='{}'><style>.foo {}</style>Style<style>.bar {}</style></h2>
25244 Empty <p> tag in TOC, removed by Sanitizer (T92892)
25249 <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>
25251 <li class="toclevel-1 tocsection-1"><a href="#x"><span class="tocnumber">1</span> <span class="toctext">x</span></a></li>
25255 <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>
25258 <meta property="mw:PageProp/toc" data-parsoid='{}'/>
25259 <h2 id="x" data-parsoid='{}'>x</h2>
25265 == {{int:headline_sample}} ==
25269 T34057: Title needed when expanding <h> nodes.
25271 title=[[Main Page]]
25275 <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>
25280 Strip marker in urlencode
25282 {{urlencode:x<nowiki/>y}}
25283 {{urlencode:x<nowiki/>y|wiki}}
25284 {{urlencode:x<nowiki/>y|path}}
25285 {{urlencode:x<pre id="one">two</pre>y}}
25313 Strip marker in formatNum
25315 {{formatnum:1<nowiki/>2}}
25316 {{formatnum:1<nowiki/>2|R}}
25324 Check noCommafy in formatNum
25328 {{formatnum:123456.78}}
25329 {{formatnum:123456.78|NOSEP}}
25337 Wrong option for formatNum (T58199)
25339 {{formatnum:1,234.56|Random}}
25340 {{formatnum:1,234.56|EVERYTHING}}
25341 {{formatnum:1234.56|any argument that has the string 'NOSEP'}}
25350 Strip marker in grammar
25354 {{grammar:elative|foo<nowiki/>bar}}
25361 Strip marker in padleft
25363 {{padleft:|2|x<nowiki/>y}}
25370 Strip marker in padright
25372 {{padright:|2|x<nowiki/>y}}
25379 Strip marker in anchorencode
25381 {{anchorencode:x<nowiki/>y}}
25386 <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>
25390 nowiki inside link inside heading (T20295)
25392 ==[[foo|x<nowiki>y</nowiki>z]]==
25394 <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>
25399 new support for bdi element (T33817)
25401 <p dir="rtl" lang="he">ולדימיר לנין (ברוסית: <bdi lang="ru">Владимир Ленин</bdi>, 24 באפריל 1870–22 בינואר 1924) הוא מנהיג פוליטי קומוניסטי רוסי.</p>
25403 <p dir="rtl" lang="he">ולדימיר לנין (ברוסית: <bdi lang="ru">Владимир Ленин</bdi>, 24 באפריל 1870–22 בינואר 1924) הוא מנהיג פוליטי קומוניסטי רוסי.</p>
25408 Ignore pipe between table row attributes
25412 |- id=foo | style='color: red'
25420 <tr id="foo" style="color: red">
25427 Language parser function
25436 Padleft and padright (default 0-padding)
25445 <p><span typeof="mw:Transclusion" data-mw='{"parts":[{"template":{"target":{"wt":"padleft:xyz","function":"padleft"},"params":{"1":{"wt":"5"}},"i":0}}]}'>00xyz</span>
25446 <span typeof="mw:Transclusion" data-mw='{"parts":[{"template":{"target":{"wt":"padright:xyz","function":"padright"},"params":{"1":{"wt":"5"}},"i":0}}]}'>xyz00</span></p>
25450 Padleft and padright (partial fill)
25452 {{padleft:xyz|6|ab}}
25453 {{padright:xyz|6|ab}}
25459 <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>
25460 <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>
25464 Padleft and padright as substr
25466 {{padleft:|3|abcde}}
25467 {{padright:|3|abcde}}
25473 <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>
25474 <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>
25478 Padleft and padright with non-numerical length (T180403)
25480 {{padleft:abcdef|junk}}
25481 {{padright:abcdef|junk}}
25489 Special parser function
25491 {{#special:RandomPage}}
25492 {{#special:BaDtItLe}}
25493 {{#special:Foobar}}
25502 T36939 - Case insensitive link parsing ([HttP://])
25504 [HttP://MediaWiki.Org/]
25506 <p><a rel="nofollow" class="external autonumber" href="HttP://MediaWiki.Org/">[1]</a>
25509 <p><a rel="mw:ExtLink" class="external autonumber" href="HttP://MediaWiki.Org/"></a></p>
25513 T36939 - Case insensitive link parsing ([HttP:// title])
25515 [HttP://MediaWiki.Org/ MediaWiki]
25517 <p><a rel="nofollow" class="external text" href="HttP://MediaWiki.Org/">MediaWiki</a>
25522 T36939 - Case insensitive link parsing (HttP://)
25524 HttP://MediaWiki.Org/
25526 <p><a rel="nofollow" class="external free" href="HttP://MediaWiki.Org/">HttP://MediaWiki.Org/</a>
25529 <p><a rel="mw:ExtLink" class="external free" href="HttP://MediaWiki.Org/">HttP://MediaWiki.Org/</a></p>
25547 <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>
25548 <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>
25549 <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>
25550 <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>
25551 <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>
25557 ### Parsoid-specific tests
25558 ### Parsoid-PHP parser incompatibilities
25561 1. SOL-sensitive wikitext tokens as template-args
25563 parsoid=wt2html,wt2wt
25569 <span about="#mwt1" typeof="mw:Transclusion">
25570 </span><ul about="#mwt1"><li>a</li>
25572 <span about="#mwt2" typeof="mw:Transclusion">
25573 </span><ol about="#mwt2"><li>a</li>
25575 <span about="#mwt3" typeof="mw:Transclusion">
25576 </span><dl about="#mwt3"><dd>a</dd>
25580 #### -----------------------------------------------------------------
25581 #### Parsoid-specific functionality tests
25582 #### -----------------------------------------------------------------
25584 # T65642/T68749: Formatting elt fixup around images.
25585 # We know wt2wt will fail, but we expect selser to pass.
25586 # Due to the nature of our testing, wt2wt and selser tests will enter the
25587 # blacklist and we'll catch selser regressions based on changes to the
25588 # blacklist entries for selser tests.
25590 1. Treebuilder fixup of formatting elt
25592 parsoid=wt2html,wt2wt
25597 [[Image:Foobar.jpg|right|Test]]
25605 </small></p><small>
25606 <div class="floatright"><a href="/wiki/File:Foobar.jpg" class="image" title="Test"><img alt="Test" src="http://example.com/images/3/3a/Foobar.jpg" width="1941" height="220" /></a></div>
25607 </small><p><small></small>
25609 </td></tr></tbody></table>
25613 <p><small data-parsoid='{"stx":"html","autoInsertedEnd":true}'></small></p><small data-parsoid='{"stx":"html","autoInsertedEnd":true,"autoInsertedStart":true}'>
25614 <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>
25615 <p><small data-parsoid='{"stx":"html","autoInsertedStart":true}'></small></p></td></tr>
25620 2. Treebuilder fixup of formatting elt
25622 parsoid=wt2html,wt2wt
25624 '''foo[[File:Foobar.jpg|thumb|caption]]bar'''
25626 <small>[[Image:Foobar.jpg|right|300px]]</small>
25628 <p><b>foo</b></p><b><div class="thumb tright"><div class="thumbinner" style="width:182px;"><a href="/wiki/File:Foobar.jpg" class="image"><img alt="" src="http://example.com/images/thumb/3/3a/Foobar.jpg/180px-Foobar.jpg" width="180" height="20" class="thumbimage" srcset="http://example.com/images/thumb/3/3a/Foobar.jpg/270px-Foobar.jpg 1.5x, http://example.com/images/thumb/3/3a/Foobar.jpg/360px-Foobar.jpg 2x" /></a> <div class="thumbcaption"><div class="magnify"><a href="/wiki/File:Foobar.jpg" class="internal" title="Enlarge"></a></div>caption</div></div></div></b><p><b>bar</b>
25629 </p><small><div class="floatright"><a href="/wiki/File:Foobar.jpg" class="image"><img alt="Foobar.jpg" src="http://example.com/images/thumb/3/3a/Foobar.jpg/300px-Foobar.jpg" width="300" height="34" srcset="http://example.com/images/thumb/3/3a/Foobar.jpg/450px-Foobar.jpg 1.5x, http://example.com/images/thumb/3/3a/Foobar.jpg/600px-Foobar.jpg 2x" /></a></div></small>
25631 <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>
25633 <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>
25637 3. Treebuilder fixup of formatting elt
25639 parsoid=wt2html,wt2wt
25641 <small>'''foo[[File:Foobar.jpg|thumb|caption]]bar'''</small>
25643 <p><small><b>foo</b></small></p><small><b><div class="thumb tright"><div class="thumbinner" style="width:182px;"><a href="/wiki/File:Foobar.jpg" class="image"><img alt="" src="http://example.com/images/thumb/3/3a/Foobar.jpg/180px-Foobar.jpg" width="180" height="20" class="thumbimage" srcset="http://example.com/images/thumb/3/3a/Foobar.jpg/270px-Foobar.jpg 1.5x, http://example.com/images/thumb/3/3a/Foobar.jpg/360px-Foobar.jpg 2x" /></a> <div class="thumbcaption"><div class="magnify"><a href="/wiki/File:Foobar.jpg" class="internal" title="Enlarge"></a></div>caption</div></div></div></b></small><p><small><b>bar</b></small>
25646 <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>
25650 4. Treebuilder fixup of formatting elt: formatting tags around captionless images
25652 parsoid=wt2html,wt2wt
25654 '''<small>[[Image:Foobar.jpg|right|300px]]</small>'''
25656 <b><small><div class="floatright"><a href="/wiki/File:Foobar.jpg" class="image"><img alt="Foobar.jpg" src="http://example.com/images/thumb/3/3a/Foobar.jpg/300px-Foobar.jpg" width="300" height="34" srcset="http://example.com/images/thumb/3/3a/Foobar.jpg/450px-Foobar.jpg 1.5x, http://example.com/images/thumb/3/3a/Foobar.jpg/600px-Foobar.jpg 2x" /></a></div></small></b>
25658 <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>
25661 #### ----------------------------------------------------------------
25662 #### Parsoid-only testing of Parsoid's impl of LST
25663 #### Not implemented yet, see
25664 #### https://www.mediawiki.org/wiki/Parsoid/HTML_based_LST
25665 #### ----------------------------------------------------------------
25667 ## We still need to support serializing the older format while content is stored.
25669 LST Sections: Backwards compatibility
25672 "suppressErrors": true,
25673 "modes": ["html2wt"]
25676 <section begin="2011-05-16" />
25677 <section end="2014-04-10 (MW 1.23wmf22)" />
25679 <p><meta typeof="mw:Extension/LabeledSectionTransclusion/begin" content="2011-05-16"/>
25680 <meta typeof="mw:Extension/LabeledSectionTransclusion/end" content="2014-04-10 (MW 1.23wmf22)"/></p>
25684 LST Sections: Newfangled approach
25686 <section begin="2011-05-16" />
25687 <section end="2014-04-10 (MW 1.23wmf22)" />
25689 <p><span typeof="mw:Extension/section" about="#mwt4" data-mw='{"name":"section","attrs":{"begin":"2011-05-16"}}'>
25691 <span typeof="mw:Extension/section" about="#mwt6" data-mw='{"name":"section","attrs":{"end":"2014-04-10 (MW 1.23wmf22)"}}'>
25695 #--------- Test stripping of empty nodes in template content ----------
25698 Empty LI and TR nodes should be stripped from template content
25703 <ul about="#mwt1" typeof="mw:Transclusion" data-mw='{"parts":[{"template":{"target":{"wt":"EmptyLITest","href":"./Template:EmptyLITest"},"params":{},"i":0}}]}'>
25707 <table about="#mwt2" typeof="mw:Transclusion" data-mw='{"parts":[{"template":{"target":{"wt":"EmptyTRTest","href":"./Template:EmptyTRTest"},"params":{},"i":0}}]}'>
25720 Empty LI and TR nodes should not be stripped from top-level content
25734 <li class='mw-empty-elt'></li>
25739 <tr class='mw-empty-elt'></tr>
25748 Empty TR nodes should not be stripped if they have any attributes set
25750 {{EmptyTRWithHTMLAttrTest}}
25752 <table about="#mwt1" typeof="mw:Transclusion" data-mw='{"parts":[{"template":{"target":{"wt":"EmptyTRWithHTMLAttrTest","href":"./Template:EmptyTRWithHTMLAttrTest"},"params":{},"i":0}}]}'>
25753 <tr align='center'></tr>
25754 <tr><td>foo</td></tr>
25755 <tr align='center'></tr>
25756 <tr><td>bar</td></tr>
25760 #### ----------------------------------------------------------------
25761 #### The following section of tests are primarily to test
25762 #### wikitext escaping capabilities of Parsoid. Given that
25763 #### escaping can be done any number of ways, the wikitext (input)
25764 #### is always adjusted to reflect how Parsoid adds nowiki
25767 #### We are marking several tests as parsoid-only since the
25768 #### HTML in the result section is different from what the
25769 #### PHP parser generates for it.
25770 #### ----------------------------------------------------------------
25773 #### --------------- Headings ---------------
25775 #### 1. Nested inside html <h1>=foo=</h1>
25776 #### 2. Outside heading nest on a single line <h1>foo</h1>*bar
25777 #### 3. Nested inside html with wikitext split by html tags
25778 #### 4. No escape needed
25779 #### 5. Empty headings <h1></h1>
25780 #### 6. Heading chars in SOL context
25781 #### ----------------------------------------
25783 Headings: 0. Unnested
25793 <p>=foo<i>a</i>=</p>
25795 <nowiki>=foo=</nowiki>
25797 <nowiki> </nowiki>=foo=
25799 <nowiki>=foo=</nowiki>
25801 =foo''a''<nowiki>=</nowiki>
25804 # New headings and existing headings are handled differently
25806 Headings: 1. Nested inside html
25814 <h1 data-parsoid=''>=foo=</h1>
25815 <h2 data-parsoid=''>=foo=</h2>
25816 <h3 data-parsoid=''>=foo=</h3>
25817 <h4 data-parsoid=''>=foo=</h4>
25818 <h5 data-parsoid=''>=foo=</h5>
25819 <h6 data-parsoid=''>=foo=</h6>
25827 =<nowiki>=foo=</nowiki>=
25828 ==<nowiki>=foo=</nowiki>==
25829 ===<nowiki>=foo=</nowiki>===
25830 ====<nowiki>=foo=</nowiki>====
25831 =====<nowiki>=foo=</nowiki>=====
25832 ======<nowiki>=foo=</nowiki>======
25837 Headings: 2. Outside heading nest on a single line <h1>foo</h1>*bar
25846 <nowiki>*</nowiki>bar
25852 <nowiki>=bar=</nowiki>
25856 Headings: 3. Nested inside html with wikitext split by html tags
25860 <h1>=<b>bold</b>foo=</h1>
25862 = ='''bold'''foo= =
25866 Headings: 4a. No escaping needed (testing just h1 and h2)
25877 <h1><i>=</i>foo=</h1>
25897 Headings: 4b. No escaping needed (inside p-tags)
25914 Headings: 4c. Short headings (1)
25921 <nowiki>===</nowiki>
25927 # in the html2wt direction we emit '= = =' or '=<nowiki>=</nowiki>='
25929 Headings: 4d. Short headings (2)
25931 parsoid=wt2html,html2html
25942 <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>
25943 <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>
25944 <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>
25949 <h1 id="="><span id=".3D" typeof="mw:FallbackId"></span>=</h1>
25950 <h1 id="=="><span id=".3D.3D" typeof="mw:FallbackId"></span>==</h1>
25951 <h2 id="=_2"><span id=".3D_2" typeof="mw:FallbackId"></span>=</h2>
25955 Headings: 5. Empty headings
25959 <h1 data-parsoid='{}'></h1>
25961 <h2 data-parsoid='{}'></h2>
25963 <h3 data-parsoid='{}'></h3>
25965 <h4 data-parsoid='{}'></h4>
25967 <h5 data-parsoid='{}'></h5>
25969 <h6 data-parsoid='{}'></h6>
25979 =====<nowiki/>=====
25981 ======<nowiki/>======
25985 Headings: 6a. Heading chars in SOL context (with trailing spaces)
25995 <nowiki>=a=</nowiki>
25997 <nowiki>=a=</nowiki>
25999 <nowiki>=a=</nowiki>
26003 Headings: 6b. Heading chars in SOL context (with trailing newlines)
26016 <nowiki>=a=</nowiki>
26019 <nowiki>=a=</nowiki>
26022 <nowiki>=a=</nowiki>
26027 Headings: 6c. Heading chars in SOL context (leading newline break)
26035 <nowiki>=b=</nowiki>
26039 Headings: 6d. Heading chars in SOL context (with interspersed comments)
26043 <!--c0--><p>=a=</p>
26045 <!--c1--><p>=a=</p> <!--c2--> <!--c3-->
26047 <!--c0--><nowiki>=a=</nowiki>
26049 <!--c1--><nowiki>=a=</nowiki> <!--c2--> <!--c3-->
26053 Headings: 6d. Heading chars in SOL context (No escaping needed)
26063 Headings: 7. Insert a newline between new content and headings
26069 <h2 data-parsoid='{}'>A</h2>
26070 <p data-parsoid='{}'>a</p>
26081 Headings: Used as horizontal rule
26083 wgFragmentMode=[ 'html5', 'legacy' ]
26089 <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>
26092 <h6 id="==="><span id=".3D.3D.3D" typeof="mw:FallbackId"></span>===</h6>
26095 #### --------------- Lists ---------------
26096 #### 0. Outside nests (*foo, etc.)
26097 #### 1. Nested inside html <ul><li>*foo</li></ul>
26098 #### 2. Inside definition lists
26099 #### 3. Only bullets at start should be escaped
26100 #### 4. No escapes needed
26101 #### 5. No unnecessary escapes
26102 #### 6. Escape bullets in SOL position
26103 #### 7. Escape bullets in a multi-line context
26104 #### ----------------------------------------
26107 Lists: 0. Outside nests
26117 <nowiki>*</nowiki>foo
26119 <nowiki>#</nowiki>foo
26121 <nowiki>;</nowiki>Foo<nowiki>:</nowiki>bar
26124 ## Making these next 3 tests Parsoid-only since they are html2wt tests
26125 ## to test wikitext escaping, and insignificant whitespace diffs
26126 ## cause PHP parser tests to barf
26128 Lists: 1. Nested inside html (No unnecessary escapes)
26137 <li data-parsoid='{}'>*foo</li>
26138 <li data-parsoid='{}'>#foo</li>
26139 <li data-parsoid='{}'>:foo</li>
26140 <li data-parsoid='{}'>;foo</li>
26148 <li data-parsoid='{}'>*foo</li>
26149 <li data-parsoid='{}'>#foo</li>
26150 <li data-parsoid='{}'>:foo</li>
26151 <li data-parsoid='{}'>;foo</li>
26158 *<nowiki>*foo</nowiki>
26159 *<nowiki>#foo</nowiki>
26160 *<nowiki>:foo</nowiki>
26161 *<nowiki>;foo</nowiki>
26167 #<nowiki>*foo</nowiki>
26168 #<nowiki>#foo</nowiki>
26169 #<nowiki>:foo</nowiki>
26170 #<nowiki>;foo</nowiki>
26174 Lists: 2. Inside definition lists
26178 <dl><dt>;foo</dt></dl>
26179 <dl><dt>:foo</dt></dl>
26182 <dl><dd>:foo</dd></dl>
26186 ; <nowiki>:foo</nowiki>
26188 ; <nowiki>:foo</nowiki>
26195 Lists: 3. Only bullets at start of text in wikitext-generated HTML should be escaped
26201 <li data-parsoid='{}'>*foo<i>it</i>*bar</li>
26205 *<nowiki>*foo</nowiki>''it''*bar
26209 Lists: 4. No escapes needed
26222 <li><a rel="mw:WikiLink" href="Foo" title="Foo">Foo</a>: bar
26226 <li><a rel="mw:WikiLink" href="Foo" title="Foo">Foo</a>*bar
26240 Lists: 5. No unnecessary escapes
26244 <ul><li> bar <span>[[foo]]</span></li></ul>
26245 <ul><li> =bar <span>[[foo]]</span></li></ul>
26246 <ul><li> [[bar <span>[[foo]]</span></li></ul>
26247 <ul><li> ]]bar <span>[[foo]]</span></li></ul>
26248 <ul><li> =bar <span>foo]]</span>=</li></ul>
26249 <ul><li> <s></s>: a</li></ul>
26250 <ul><li> <i>* foo</i></li></ul>
26253 * bar <span><nowiki>[[foo]]</nowiki></span>
26255 * =bar <span><nowiki>[[foo]]</nowiki></span>
26257 * [[bar <span><nowiki>[[foo]]</nowiki></span>
26259 * ]]bar <span><nowiki>[[foo]]</nowiki></span>
26261 * =bar <span>foo]]</span>=
26269 Lists: 6. Escape bullets in SOL position
26273 <p><!--cmt-->*foo</p>
26275 <!--cmt--><nowiki>*</nowiki>foo
26279 Lists: 7. Escape bullets in a multi-line context
26288 <nowiki>*</nowiki>b
26292 Lists: 8. Escape colons only if not present in tags
26296 <dl><dt>a:b<i>c:d</i></dt></dl>
26298 ; <nowiki>a:b</nowiki>''c:d''
26301 #### --------------- HRs ---------------
26302 #### 1. Single line
26303 #### -----------------------------------
26306 HRs: 1. Single line
26314 ----<nowiki>----</nowiki>
26319 #### --------------- Tables ---------------
26320 #### 1a. Simple example
26321 #### 1b. No escaping needed (!foo)
26322 #### 1c. No escaping needed (|foo)
26323 #### 1d. No escaping needed (|}foo)
26325 #### 2a. Nested in td (<td>foo|bar</td>)
26326 #### 2b. Nested in td (<td>foo||bar</td>)
26327 #### 2c. Nested in td -- no escaping needed(<td>foo!!bar</td>)
26329 #### 3a. Nested in th (<th>foo!bar</th>)
26330 #### 3b. Nested in th (<th>foo!!bar</th>)
26331 #### 3c. Nested in th -- no escaping needed(<th>foo||bar</th>)
26335 #### 4c. No escaping needed
26336 #### --------------------------------------
26339 Tables: 1a. Simple example
26347 <nowiki>{|</nowiki>
26352 Tables: 1b. No escaping needed
26363 Tables: 1c. No escaping needed
26374 Tables: 1d. No escaping needed
26385 Tables: 2a. Nested in td
26390 <td>foo|bar</td></tr>
26391 <tr><td>x<div>a|b</div></td>
26395 |<nowiki>foo|bar</nowiki>
26397 |x<div><nowiki>a|b</nowiki></div>
26405 <td>x<div>a|b</div>
26406 </td></tr></tbody></table>
26410 Tables: 2b. Nested in td
26416 <td>a<i>b||c</i></td>
26417 <td>a<i><div>b||c</div></i></td>
26418 </tr></tbody></table>
26421 |<nowiki>foo||bar</nowiki>
26422 |a''<nowiki>b||c</nowiki>''
26423 |a''<div><nowiki>b||c</nowiki></div>''
26432 <td>a<i><div>b||c</div></i>
26438 Tables: 2c. Nested in td -- no escaping needed
26454 Tables: 3a. Nested in th
26470 Tables: 3b. Nested in th
26475 <tr><th>foo!!bar</th>
26476 <th><i>foo|bar</i></th>
26477 <th><i>foo!!bar</i></th>
26478 <th><i><span>foo!!bar</span></i></th>
26479 </tr></tbody></table>
26482 !<nowiki>foo!!bar</nowiki>
26483 !''<nowiki>foo|bar</nowiki>''
26484 !''<nowiki>foo!!bar</nowiki>''
26485 !''<span><nowiki>foo!!bar</nowiki></span>''
26494 <th><i>foo!!bar</i>
26496 <th><i><span>foo!!bar</span></i>
26502 Tables: 3c. Nested in th
26507 <tr><th>foo||bar</th>
26508 <th><span typeof="mw:Nowiki">foo||bar</span></th>
26509 </tr></tbody></table>
26512 !<nowiki>foo||bar</nowiki>
26513 !<nowiki>foo||bar</nowiki>
26526 Tables: 4a. Escape -
26542 |<nowiki>-bar</nowiki>
26547 Tables: 4b. Escape +
26563 |<nowiki>+bar</nowiki>
26568 Tables: 4c. No escaping needed
26573 <tr><td>foo-bar</td><td>foo+bar</td></tr>
26574 <tr><td><i>foo</i>-bar</td><td><i>foo</i>+bar</td></tr>
26580 <div>a|b</div></td>
26625 Tables: 4d. No escaping needed
26630 <tbody><tr><td><a rel="mw:WikiLink" href="./Foo" title="Foo">Foo</a>-bar</td>
26631 <td data-parsoid='{"startTagSrc":"|","attrSepSrc":"|"}'>+1</td>
26632 <td data-parsoid='{"startTagSrc":"|","attrSepSrc":"|"}'>-2</td></tr>
26643 <td><a href="/wiki/Foo" title="Foo">Foo</a>-bar
26653 Tables: 5. Empty table cells should get whitespace to avoid need for nowikis
26657 <table><tr><td></td><td align="center" data-parsoid='{"stx":"row"}'></td><td data-parsoid='{"stx":"row"}'></td></tr></table>
26659 <table><tr><td></td><td align="center"></td><td></td></tr></table>
26661 <table><tr><td></td><td align="center" data-parsoid='{"stx":"row", "startTagSrc":"{{!}}{{!}}"}'></td><td data-parsoid='{"stx":"row"}'></td></tr></table>
26663 <table><tr><th></th><th align="center" data-parsoid='{"stx":"row"}'></th><th data-parsoid='{"stx":"row"}'></th></tr></table>
26666 | || align="center" | ||
26676 | {{!}}{{!}} align="center" | ||
26680 ! !! align="center" | !!
26686 <td align="center"></td>
26688 </td></tr></tbody></table>
26693 <td align="center">
26696 </td></tr></tbody></table>
26700 <td align="center"></td>
26702 </td></tr></tbody></table>
26706 <th align="center"></th>
26708 </th></tr></tbody></table>
26712 T97430: Don't emit empty nowiki pairs around marker meta tags
26716 <p>*This is a long sentence here that will make the nowiki algo split up the nowikis into multiple pairs
26717 |** Make this another long long long sentence forcing the nowiki algo to split up the nowikis.</p>
26719 <nowiki>*</nowiki>This is a long sentence here that will make the nowiki algo split up the nowikis into multiple pairs
26720 |** Make this another long long long sentence forcing the nowiki algo to split up the nowikis.
26724 Unclosed xmlish element in table line shouldn't eat end delimiters
26729 <tbody><tr><td> <foo</td>
26730 <td> bar></td></tr>
26747 #### --------------- Links ----------------
26748 #### 1. Quote marks in link text
26749 #### 2. Wikilinks: Escapes needed
26750 #### 3. Wikilinks: No escapes needed
26751 #### 4. Extlinks: Escapes needed
26752 #### 5. Extlinks: No escapes needed
26753 #### --------------------------------------
26755 Links 1. WikiLinks: No escapes needed
26759 <p><a rel="mw:WikiLink" href="Foo" title="Foo">Foo<i>boo</i></a>
26760 <a rel="mw:WikiLink" href="Foo" title="Foo">[Foobar]</a>
26761 <a rel="mw:WikiLink" href="Foo" title="Foo">x [Foobar] x</a></p>
26765 [[Foo|x [Foobar] x]]
26767 <p><a href="/wiki/Foo" title="Foo">Foo<i>boo</i></a>
26768 <a href="/wiki/Foo" title="Foo">[Foobar]</a>
26769 <a href="/wiki/Foo" title="Foo">x [Foobar] x</a>
26774 Links 2. WikiLinks: Escapes needed
26778 <a href="Foo" rel="mw:WikiLink">Foobar]</a>
26779 <a href="Foo" rel="mw:WikiLink">x [http://google.com g] x</a>
26780 <a href="Foo" rel="mw:WikiLink">[[Bar]]</a>
26781 <a href="Foo" rel="mw:WikiLink">x [[Bar]] x</a>
26782 <a href="Foo" rel="mw:WikiLink">|Bar</a>
26783 <a href="Foo" rel="mw:WikiLink">]]bar</a>
26784 <a href="Foo" rel="mw:WikiLink">[[bar</a>
26785 <a href="Foo" rel="mw:WikiLink">x [[ y</a>
26786 <a href="Foo" rel="mw:WikiLink">x ]] y</a>
26787 <a href="Foo" rel="mw:WikiLink">x ]] y [[ z</a>
26789 [[Foo|<nowiki>Foobar]</nowiki>]]
26790 [[Foo|x <nowiki>[http://google.com g]</nowiki> x]]
26791 [[Foo|<nowiki>[[Bar]]</nowiki>]]
26792 [[Foo|<nowiki>x [[Bar]] x</nowiki>]]
26793 [[Foo|<nowiki>|Bar</nowiki>]]
26794 [[Foo|<nowiki>]]bar</nowiki>]]
26795 [[Foo|<nowiki>[[bar</nowiki>]]
26796 [[Foo|<nowiki>x [[ y</nowiki>]]
26797 [[Foo|<nowiki>x ]] y</nowiki>]]
26798 [[Foo|<nowiki>x ]] y [[ z</nowiki>]]
26800 <p><a href="/wiki/Foo" title="Foo">Foobar]</a>
26801 <a href="/wiki/Foo" title="Foo">x [http://google.com g] x</a>
26802 <a href="/wiki/Foo" title="Foo">[[Bar]]</a>
26803 <a href="/wiki/Foo" title="Foo">x [[Bar]] x</a>
26804 <a href="/wiki/Foo" title="Foo">|Bar</a>
26805 <a href="/wiki/Foo" title="Foo">]]bar</a>
26806 <a href="/wiki/Foo" title="Foo">[[bar</a>
26807 <a href="/wiki/Foo" title="Foo">x [[ y</a>
26808 <a href="/wiki/Foo" title="Foo">x ]] y</a>
26809 <a href="/wiki/Foo" title="Foo">x ]] y [[ z</a>
26814 Links 3. WikiLinks: No escapes needed
26818 <p><a rel="mw:WikiLink" href="Foo">[Foobar</a>
26819 <a rel="mw:WikiLink" href="Foo" title="Foo">foo|bar</a></p>
26824 <p><a href="/wiki/Foo" title="Foo">[Foobar</a>
26825 <a href="/wiki/Foo" title="Foo">foo|bar</a>
26830 Links 4. ExtLinks: Escapes needed
26834 <p><a rel="mw:ExtLink" href="http://google.com">[google]</a>
26835 <a rel="mw:ExtLink" href="http://google.com">google]</a>
26836 <a rel="mw:ExtLink" href="http://google.com">goog] le</a></p>
26837 <p>[http://google.com]</p>
26838 <p>[http://google.com google]</p>
26839 <p>[<a rel="mw:ExtLink" href="http://google.com">http://google.com</a>]</p>
26840 <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>
26842 [http://google.com <nowiki>[google]</nowiki>]
26843 [http://google.com <nowiki>google]</nowiki>]
26844 [http://google.com <nowiki>goog] le</nowiki>]
26846 <nowiki>[http://google.com]</nowiki>
26848 <nowiki>[http://google.com google]</nowiki>
26850 [http://google.com<nowiki>]</nowiki>
26852 [{{echo|http://google.com}}<nowiki>]</nowiki>
26854 <p><a rel="nofollow" class="external text" href="http://google.com">[google]</a>
26855 <a rel="nofollow" class="external text" href="http://google.com">google]</a>
26856 <a rel="nofollow" class="external text" href="http://google.com">goog] le</a>
26857 </p><p>[http://google.com]
26858 </p><p>[http://google.com google]
26859 </p><p>[<a rel="nofollow" class="external free" href="http://google.com">http://google.com</a>]
26860 </p><p>[<a rel="nofollow" class="external free" href="http://google.com">http://google.com</a>]
26865 Links 5. ExtLinks: No escapes needed
26869 <p><a rel="mw:ExtLink" href="http://google.com">[google</a></p>
26870 <p>[<a ref="mw:ExtLink" href="http://google.com"></a>]</p>
26872 [http://google.com [google]
26874 [[http://google.com]]
26876 <p><a rel="nofollow" class="external text" href="http://google.com">[google</a>
26877 </p><p>[<a rel="nofollow" class="external autonumber" href="http://google.com">[1]</a>]
26882 Links 6. Add <nowiki/>s between text-nodes and url-links when required (T66300)
26886 <p>x<a rel="mw:ExtLink" href="http://example.com" data-parsoid='{"stx":"url"}'>http://example.com</a>y
26887 <a rel="mw:ExtLink" href="http://example.com" data-parsoid='{"stx":"url"}'>http://example.com</a>?x
26888 <a rel="mw:ExtLink" href="http://example.com" data-parsoid='{"stx":"url"}'>http://example.com</a>&x
26889 <a rel="mw:ExtLink" href="http://example.com" data-parsoid='{"stx":"url"}'>http://example.com</a>'x
26890 <a rel="mw:ExtLink" href="http://example.com" data-parsoid='{"stx":"url"}'>http://example.com</a>,x
26891 <a rel="mw:ExtLink" href="http://example.com" data-parsoid='{"stx":"url"}'>http://example.com</a>.x
26892 <a rel="mw:ExtLink" href="http://example.com" data-parsoid='{"stx":"url"}'>http://example.com</a>;x
26893 <a rel="mw:ExtLink" href="http://example.com" data-parsoid='{"stx":"url"}'>http://example.com</a>:x
26894 <a rel="mw:ExtLink" href="http://example.com" data-parsoid='{"stx":"url"}'>http://example.com</a>;x
26895 <a rel="mw:ExtLink" href="http://example.com" data-parsoid='{"stx":"url"}'>http://example.com</a>!x
26896 <a rel="mw:ExtLink" href="http://example.com" data-parsoid='{"stx":"url"}'>http://example.com</a>=x
26897 <a rel="mw:ExtLink" href="http://example.com" data-parsoid='{"stx":"url"}'>http://example.com</a>(x)
26898 <a rel="mw:ExtLink" href="http://example.com(x" data-parsoid='{"stx":"url"}'>http://example.com(x</a>)
26901 x<nowiki/>http://example.com<nowiki/>y
26902 http://example.com<nowiki/>?x
26903 http://example.com<nowiki/>&x
26904 http://example.com<nowiki/>'x
26905 http://example.com<nowiki/>,x
26906 http://example.com<nowiki/>.x
26907 http://example.com<nowiki/>;x
26908 http://example.com<nowiki/>:x
26909 http://example.com<nowiki/>;x
26910 http://example.com<nowiki/>!x
26911 http://example.com<nowiki/>=x
26912 http://example.com<nowiki/>(x)
26913 http://example.com(x<nowiki/>)
26917 Links 7a. Don't add spurious <nowiki/>s between text-nodes and url-links (T66300)
26922 <a rel="mw:ExtLink" href="http://example.com" data-parsoid='{"stx":"url"}'>http://example.com</a>
26924 "<a rel="mw:ExtLink" href="http://example.com" data-parsoid='{"stx":"url"}'>http://example.com</a>"
26925 (<a rel="mw:ExtLink" href="http://example.com" data-parsoid='{"stx":"url"}'>http://example.com</a>)
26926 (<a rel="mw:ExtLink" href="http://example.com" data-parsoid='{"stx":"url"}'>http://example.com</a>) foo
26927 <a rel="mw:ExtLink" href="http://example.com" data-parsoid='{"stx":"url"}'>http://example.com</a>,
26928 <a rel="mw:ExtLink" href="http://example.com" data-parsoid='{"stx":"url"}'>http://example.com</a>, foo
26934 "http://example.com"
26935 (http://example.com)
26936 (http://example.com) foo
26937 http://example.com,
26938 http://example.com, foo
26941 <a rel="nofollow" class="external free" href="http://example.com">http://example.com</a>
26943 "<a rel="nofollow" class="external free" href="http://example.com">http://example.com</a>"
26944 (<a rel="nofollow" class="external free" href="http://example.com">http://example.com</a>)
26945 (<a rel="nofollow" class="external free" href="http://example.com">http://example.com</a>) foo
26946 <a rel="nofollow" class="external free" href="http://example.com">http://example.com</a>,
26947 <a rel="nofollow" class="external free" href="http://example.com">http://example.com</a>, foo
26952 Links 7b. Don't add spurious <nowiki/>s between text-nodes and url-links (T66300)
26956 <p><a rel="mw:ExtLink" href="http://example.com" data-parsoid='{"stx":"url"}'>http://example.com</a>.,;:!?\
26957 -<a rel="mw:ExtLink" href="http://example.com">http://example.com</a>:</p>
26959 http://example.com.,;:!?\
26960 -http://example.com:
26962 <p><a rel="nofollow" class="external free" href="http://example.com">http://example.com</a>.,;:!?\
26963 -<a rel="nofollow" class="external free" href="http://example.com">http://example.com</a>:
26968 Links 8. Add <nowiki/>s between text-nodes and RFC-links when required (T66300)
26972 <p><a href="https://tools.ietf.org/html/rfc123" rel="mw:ExtLink" data-parsoid='{"stx":"magiclink"}'>RFC 123</a>4
26973 <a href="https://tools.ietf.org/html/rfc123" rel="mw:ExtLink" data-parsoid='{"stx":"magiclink"}'>RFC 123</a>y
26974 X<a href="https://tools.ietf.org/html/rfc123" rel="mw:ExtLink" data-parsoid='{"stx":"magiclink"}'>RFC 123</a>y</p>
26978 X<nowiki/>RFC 123<nowiki/>y
26982 Links 9. Don't add spurious <nowiki/>s between text-nodes and RFC-links (T66300)
26986 <p><a href="https://tools.ietf.org/html/rfc123" rel="mw:ExtLink" data-parsoid='{"stx":"magiclink"}'>RFC 123</a>?foo
26987 <a href="https://tools.ietf.org/html/rfc123" rel="mw:ExtLink" data-parsoid='{"stx":"magiclink"}'>RFC 123</a>&foo
26988 -<a href="https://tools.ietf.org/html/rfc123" rel="mw:ExtLink" data-parsoid='{"stx":"magiclink"}'>RFC 123</a>-
26995 <p><a class="external mw-magiclink-rfc" rel="nofollow" href="https://tools.ietf.org/html/rfc123">RFC 123</a>?foo
26996 <a class="external mw-magiclink-rfc" rel="nofollow" href="https://tools.ietf.org/html/rfc123">RFC 123</a>&foo
26997 -<a class="external mw-magiclink-rfc" rel="nofollow" href="https://tools.ietf.org/html/rfc123">RFC 123</a>-
27002 Links 10. Add <nowiki/>s between text-nodes and PMID-links when required (T66300)
27006 <p><a href="//www.ncbi.nlm.nih.gov/pubmed/123?dopt=Abstract" rel="mw:ExtLink" data-parsoid='{"stx":"magiclink"}'>PMID 123</a>4
27007 <a href="//www.ncbi.nlm.nih.gov/pubmed/123?dopt=Abstract" rel="mw:ExtLink" data-parsoid='{"stx":"magiclink"}'>PMID 123</a>y
27008 X<a href="//www.ncbi.nlm.nih.gov/pubmed/123?dopt=Abstract" rel="mw:ExtLink" data-parsoid='{"stx":"magiclink"}'>PMID 123</a>y
27012 X<nowiki/>PMID 123<nowiki/>y
27016 Links 11. Don't add spurious <nowiki/>s between text-nodes and PMID-links (T66300)
27020 <p><a href="//www.ncbi.nlm.nih.gov/pubmed/123?dopt=Abstract" rel="mw:ExtLink" data-parsoid='{"stx":"magiclink"}'>PMID 123</a>?foo
27021 <a href="//www.ncbi.nlm.nih.gov/pubmed/123?dopt=Abstract" rel="mw:ExtLink" data-parsoid='{"stx":"magiclink"}'>PMID 123</a>&foo
27022 -<a href="//www.ncbi.nlm.nih.gov/pubmed/123?dopt=Abstract" rel="mw:ExtLink" data-parsoid='{"stx":"magiclink"}'>PMID 123</a>-
27029 <p><a class="external mw-magiclink-pmid" rel="nofollow" href="//www.ncbi.nlm.nih.gov/pubmed/123?dopt=Abstract">PMID 123</a>?foo
27030 <a class="external mw-magiclink-pmid" rel="nofollow" href="//www.ncbi.nlm.nih.gov/pubmed/123?dopt=Abstract">PMID 123</a>&foo
27031 -<a class="external mw-magiclink-pmid" rel="nofollow" href="//www.ncbi.nlm.nih.gov/pubmed/123?dopt=Abstract">PMID 123</a>-
27036 Links 12. Add <nowiki/>s between text-nodes and ISBN-links when required (T66300)
27040 <p><a href="./Special:BookSources/1234567890" rel="mw:WikiLink" data-parsoid='{"stx":"magiclink"}'>ISBN 1234567890</a>1
27041 <a href="./Special:BookSources/1234567890" rel="mw:WikiLink" data-parsoid='{"stx":"magiclink"}'>ISBN 1234567890</a>x
27042 a<a href="./Special:BookSources/1234567890" rel="mw:WikiLink" data-parsoid='{"stx":"magiclink"}'>ISBN 1234567890</a>b
27045 ISBN 1234567890<nowiki/>1
27046 ISBN 1234567890<nowiki/>x
27047 a<nowiki/>ISBN 1234567890<nowiki/>b
27051 Links 13. Don't add spurious <nowiki/>s between text-nodes and ISBN-links (T66300)
27055 <p>-<a href="./Special:BookSources/1234567890" rel="mw:WikiLink" data-parsoid='{"stx":"magiclink"}'>ISBN 1234567890</a>'s
27059 <p>-<a href="/wiki/Special:BookSources/1234567890" class="internal mw-magiclink-isbn">ISBN 1234567890</a>'s
27064 Links 14. Protect link-like plain text. (Parsoid bug T78425)
27068 <p>this is not a link: http://example.com
27071 this is not a link: <nowiki>http://example.com</nowiki>
27075 Links 15. Link trails can't become link prefixes.
27080 <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>
27082 [[Söfnuður]]-[[00]]
27084 <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>
27088 #### --------------- Quotes ---------------
27089 #### 1. Quotes inside <b> and <i>
27090 #### 2. Link fragments separated by <i> and <b> tags
27091 #### 3. Link fragments inside <i> and <b>
27092 #### 4. No escaping needed
27093 #### --------------------------------------
27095 1a. Quotes inside <b> and <i>
27106 <b>foo'<i>bar'</i>baz</b>
27115 <i>fools'<span> errand</span></i>
27116 <i><span>fool</span>'s errand</i>
27117 '<i>foo</i> bar '<i>baz</i>
27118 a|!*#-:;+-~[]{}b'<i>x</i>
27122 ''<nowiki>''foo''</nowiki>''
27123 ''<nowiki>'''foo'''</nowiki>''
27125 '''<nowiki/>'foo''''
27126 '''<nowiki>''foo''</nowiki>'''
27127 '''<nowiki>'''foo'''</nowiki>'''
27128 '''foo'<nowiki/>''bar'<nowiki/>''baz'''
27129 '''foo'''<nowiki/>'s
27135 '''foo'''<nowiki/>'
27136 ''''foo'''<nowiki/>'
27137 ''fools'<span> errand</span>''
27138 ''<span>fool</span>'s errand''
27139 '<nowiki/>''foo'' bar '''baz''
27140 a|!*#-:;+-~[]{}b'''x''
27144 1b. Quotes inside <b> and <i> with other tags on same line
27148 '<i>a</i> foo <i><a rel="mw:WikiLink" href="Bar" title="Bar">bar</a></i>
27149 <i>a'</i> foo <i><a rel="mw:WikiLink" href="Bar" title="Bar">bar</a></i>
27150 <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>
27151 <a rel="mw:WikiLink" href="Foo" title="Foo">foo</a> x'<i><a href="Bar" rel="mw:WikiLink" title="Bar">bar</a></i>
27152 '<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>
27153 '<i>foo</i> <div title="name">test</div>
27154 '<i>foo</i> and <br data-parsoid='{"stx":"html","noClose":true}'/> bar
27155 <ol class="mw-references references" typeof="mw:Extension/references" about="#mwt5" data-mw='{"name":"references","attrs":{}}'>
27156 <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>
27159 '''a'' foo ''[[bar]]''
27160 ''a''' foo ''[[bar]]''
27161 ''a''' foo '''{{echo|[[bar]]}}'''
27162 [[foo]] x'''[[bar]]''
27163 '''foo'' <ref>test</ref>
27164 '''foo'' <div title="name">test</div>
27165 '''foo'' and <br> bar
27170 2. Link fragments separated by <i> and <b> tags
27174 <p>[[<i>foo</i>hello]]</p>
27175 <p>[[<b>foo</b>hello]]</p>
27177 [[''foo''<nowiki>hello]]</nowiki>
27179 [['''foo'''<nowiki>hello]]</nowiki>
27182 # FIXME: Escaping one or both of [[ and ]] is also acceptable --
27183 # this is one of the shortcomings of this format
27185 3. Link fragments inside <i> and <b>
27189 <p><i>[[foo</i>]]</p>
27190 <p><b>[[foo</b>]]</p>
27192 ''[[foo''<nowiki>]]</nowiki>
27194 '''[[foo'''<nowiki>]]</nowiki>
27198 4. No escaping needed
27202 <p>'<span><i>bar</i></span>'
27203 '<span><b>bar</b></span>'
27207 '<span>''bar''</span>'
27208 '<span>'''bar'''</span>'
27212 #### ----------- Paragraphs ---------------
27213 #### 1. No unnecessary escapes
27214 #### --------------------------------------
27217 1. No unnecessary escapes
27221 <p>bar <span>[[foo]]</span>
27222 </p><p>=bar <span>[[foo]]</span>
27223 </p><p>[[bar <span>[[foo]]</span>
27224 </p><p>]]bar <span>[[foo]]</span>
27225 </p><p>=bar <span>foo]]</span>=
27228 bar <span><nowiki>[[foo]]</nowiki></span>
27230 =bar <span><nowiki>[[foo]]</nowiki></span>
27232 [[bar <span><nowiki>[[foo]]</nowiki></span>
27234 ]]bar <span><nowiki>[[foo]]</nowiki></span>
27236 =bar <span>foo]]</span><nowiki>=</nowiki>
27239 #### ----------------------- PRE --------------------------
27241 1. Leading whitespace in SOL context should be escaped
27264 <nowiki> </nowiki>a
27266 <nowiki> </nowiki> a
27270 <nowiki> </nowiki> a
27272 <nowiki> </nowiki>a
27275 <nowiki> </nowiki>b
27298 2. Leading whitespace in non-indent-pre contexts should not be escaped
27302 <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>
27303 <ol class="mw-references references" typeof="mw:Extension/references" about="#mwt4" data-mw='{"name":"references","attrs":{}}'>
27304 <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>
27314 3. Leading whitespace in indent-pre suppressing contexts should not be escaped
27333 4. Leading whitespace in indent-pre suppressing contexts should not be escaped
27337 <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>
27339 [[File:Foobar.jpg|thumb|caption]]
27343 5. Nowiki escaping should account for indent-pres
27353 T95794: nowiki escaping should account for leading space at start-of-line in an indent-pre block
27367 Whitespace scrubbing in SOL position should account for SOL-sensitive wikitext markup
27370 "modes": ["html2wt"],
27371 "scrubWikitext": true
27379 <p><link rel="mw:PageProp/Category" href="./Category:Foo" data-parsoid="{}"> *foo</p>
27380 <p> <link rel="mw:PageProp/Category" href="./Category:Foo" data-parsoid="{}">*foo</p>
27381 <p> <!--boo-->*foo</p>
27382 <p><!--boo--> *foo</p>
27383 <p><!--a--> <!--b--> <!--c--> <!--d--> <!--e--> foo</p>
27384 <p><!--a--> <!--b--> <!--c--> <!--d--> <!--e--> *foo</p>
27400 <nowiki>*</nowiki>foo
27402 <nowiki/><!--boo-->*foo
27404 <!--boo--><nowiki/>*foo
27406 <!--a--><!--b--><!--c--><!--d--><!--e-->foo
27408 <!--a--><nowiki/><!--b--><!--c--><!--d--><!--e-->*foo
27411 #### --------------- Behavior Switches --------------------
27414 1. Valid behavior switches should be escaped
27421 <nowiki>__TOC__</nowiki>
27422 ''<nowiki>__TOC__</nowiki>''
27426 2. Invalid behavior switches should not be escaped
27437 # We use indent-pre as an indirect way to test for sol-transparent behavior.
27439 Behavior switches should be SOL-transparent
27443 <meta property="mw:PageProp/toc" />
27445 <!-- this one's bogus -->
27448 <pre data-parsoid='{}'><meta property="mw:PageProp/toc" data-parsoid='{"src":"__TOC__","magicSrc":"__TOC__"}'/> foo</pre>
27450 <meta property="mw:PageProp/toc" data-parsoid='{"src":"__TOC__","magicSrc":"__TOC__"}'/><pre data-parsoid='{}'>bar</pre>
27454 <!-- this one's bogus -->
27463 #### --------------- HTML tags ---------------
27466 #### 3. multi-line html tag
27467 #### 4. extension tags
27468 #### -----------------------------------------
27474 <a href="http://google.com">google</a>
27476 <a href="http://google.com">google</a>
27484 <ul><li> <div>foo</div></li>
27485 <li> <div style="color:red">foo</div></li>
27486 <li> <td></li></ul>
27489 * <nowiki><div>foo</div></nowiki>
27490 * <nowiki><div style="color:red">foo</div></nowiki>
27491 * <nowiki><td></nowiki>
27495 3. multi-line html tag
27514 <p><ref>foo</ref>
27515 </p><p><ref>bar
27516 </p><p>baz</ref>
27519 <nowiki><ref>foo</ref></nowiki>
27521 <nowiki><ref>bar</nowiki>
27523 baz<nowiki></ref></nowiki>
27527 Parsoid: newline inducing block nodes don't suppress <nowiki>
27533 <nowiki> </nowiki>a
27538 #### --------------- Others ---------------
27544 <p><nowiki>foo</nowiki>
27547 <nowiki>foo</nowiki>
27550 ## The quote-char in the input is necessary for triggering the bug
27552 (T54035) Nowiki-escaping should not get tripped by " :" in text
27561 #----------- End of wikitext escaping tests --------------
27565 Tag-like HTML structures are passed through as text
27587 </p><p>1<d e>f
27592 HTML tag with necessary entities in attributes
27594 <span title="&amp;">foo</span>
27596 <p><span title="&amp;">foo</span>
27601 HTML tag with 'unnecessary' entity encoding in attributes
27603 <span title="&">foo</span>
27605 <p><span title="&">foo</span>
27610 HTML tag with broken attribute value quoting
27612 parsoid=wt2html,html2html
27614 <span title="Hello world>Foo</span>
27616 <p><span title="Hello world">Foo</span>
27619 <p><span title="Hello world">Foo</span></p>
27623 Self-closed tag with broken attribute value quoting
27625 parsoid=wt2html,html2html
27627 <div title="Hello world />Foo
27629 <div title="Hello world"></div><p>Foo
27632 <div title="Hello world " data-parsoid='{"stx":"html","selfClose":true}'></div><p>Foo</p>
27636 Table with broken attribute value quoting
27638 parsoid=wt2html,html2html
27641 | title="Hello world|Foo
27646 <td title="Hello world">Foo
27652 <td title="Hello world">Foo
27658 Table with broken attribute value quoting on consecutive lines
27660 parsoid=wt2html,html2html
27663 | title="Hello world|Foo
27664 | style="color:red|Bar
27669 <td title="Hello world">Foo
27671 <td style="color:red">Bar
27677 <td title="Hello world">Foo
27678 </td><td style="color: red">Bar
27679 </td></tr></tbody></table>
27684 Accept empty td cell attribute
27687 | align="center" |foo|| |
27692 <td align="center">foo</td>
27699 Non-empty attributes in th-cells
27702 !Foo!! style="color: red" |Bar
27708 <th style="color: red">Bar
27714 Accept empty attributes in th-cells
27729 Empty table rows go away
27750 ### Parsoid-centric tests for testing RTing of inter-element separators
27751 ### Edge cases not tested by existing parser tests and specific to
27752 ### Parsoid-specific serialization strategies.
27756 RT-ed inter-element separators should be valid separators
27768 <tbody><tr class='mw-empty-elt' data-parsoid='{"startTagSrc":"|-","a":{"[[foo]]":null},"sa":{"[[foo]]":""},"autoInsertedEnd":true}'></tr>
27772 # Parsoid-only test of a DOM pass
27774 Trailing newlines in a deep dom-subtree that ends a wikitext line should be migrated out
27786 <tbody><tr data-parsoid='{"autoInsertedEnd":true,"autoInsertedStart":true}'><td data-parsoid='{"autoInsertedEnd":true}'><small data-parsoid='{"stx":"html","autoInsertedEnd":true}'>foo
27787 <p>bar</p></small></td></tr>
27791 <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>
27795 # Note that the "style" attribute is really a template parameter here.
27796 # The = would have to be {{=}} if you wanted the literal.
27798 Empty TD followed by TD with tpl-generated attribute
27803 |{{echo|style='color:red'}}|foo
27817 Indented table with an empty td
27836 Indented table with blank lines in between (T85627)
27855 <br /></p></td></tr>
27860 Indented block & table
27874 <div data-parsoid='{"stx":"html"}'>foo</div>
27876 <tr data-parsoid='{"autoInsertedEnd":true,"autoInsertedStart":true}'><td data-parsoid='{"autoInsertedEnd":true}'>foo</td></tr>
27881 Indent and comment before table row
27896 <!--hi--><tbody><tr data-parsoid='{"startTagSrc":"|-","autoInsertedEnd":true}'>
27897 <td data-parsoid='{"autoInsertedEnd":true}'> there</td></tr>
27901 # Parsoid-specific since PHP parser doesn't handle this mixed tbl-wikitext
27903 Empty TR followed by a template-generated TR
27909 {{echo|<tr><td>foo</td></tr>}}
27914 <tr class='mw-empty-elt'></tr>
27915 <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}}]}'>
27920 ## PHP and parsoid output differ for this, and since this is primarily
27921 ## for testing Parsoid's serializer, marking this Parsoid only
27923 Empty TR followed by mixed-ws-comment line should RT correctly
27936 <tr class='mw-empty-elt'></tr>
27939 <!--c--> </tr><!--d-->
27945 Multi-line image caption generated by templates with/without trailing newlines
27947 [[File:Foobar.jpg|thumb|300x300px|foo\n{{echo|A}}\n{{echo|B}}\n{{echo|C}}]]
27948 [[File:Foobar.jpg|thumb|300x300px|foo\n{{echo|A}}\n{{echo|B}}\n{{echo|C}}\n\n]]
27950 <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>
27951 <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>
27955 New element inserted (without intervening newlines) after an old sol-transparent node should serialize correctly
27959 <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>
27961 <link rel="mw:PageProp/Category" href="./Category:Foo" data-parsoid='{}'/><h1>new heading</h1>
27963 <includeonly>foo</includeonly>
27971 ## PHP emits broken html for this, and since this is primarily
27972 ## a Parsoid serializer test, marking this Parsoid only
27974 Improperly nested inline or quotes tags with whitespace in between
27976 <span> <s>x</span> </s>
27979 <p><span> <s>x</s></span><s> </s>
27980 <b> <i>x</i></b><i> </i>
27985 Encapsulate protected attributes from wt
27987 <div typeof="mw:placeholder stuff" data-mw="whoo" data-parsoid="weird" data-parsoid-other="no" about="time" rel="mw:true">foo</div>
27989 {| typeof="mw:placeholder stuff" data-mw="whoo" data-parsoid="weird" data-parsoid-other="no" about="time" rel="mw:true"
27993 <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>
27995 <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">
27996 <tbody><tr><td data-parsoid='{"autoInsertedEnd":true}'>ok</td></tr>
28000 ## Currently the p-wrapper is fragile in how it adds / removes transformations.
28001 ## Having nested or stray pre tags results in the attempt to add duplicates,
28002 ## causing an assertion fail. This test tries to prevent that situation.
28004 Ensure ParagraphWrapper can deal with stray closing pre tags
28013 ## Remex doesn't account for fostered content.
28015 1. Ensure fostered text content is wrapped in element nodes
28019 <table>hi</table><table>ho</table>
28021 hi<table></table>ho<table></table>
28023 <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>
28026 ## Remex doesn't account for fostered content.
28028 2. Ensure fostered text content is wrapped in element nodes (traps regressions around fostered marker on the element getting lost)
28030 parsoid=wt2html,wt2wt
28040 </td></tr></tbody></table>
28042 <p data-parsoid='{"fostered":true,"autoInsertedEnd":true,"autoInsertedStart":true}'> || ||</p>
28043 <table data-parsoid='{"stx":"html"}'>
28044 <tbody><tr data-parsoid='{"stx":"html","autoInsertedEnd":true}'><td data-parsoid='{"stx":"html","autoInsertedEnd":true}'> a
28045 </td></tr></tbody></table>
28048 ## Remex doesn't account for fostered content.
28050 Encapsulation properly handles null DSR information from foster box
28052 parsoid=wt2html,wt2wt
28054 {{echo|<table>foo<tr><td>bar</td></tr></table>}}
28056 <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>
28059 ## Remex doesn't account for fostered content.
28061 1. Encapsulate foster-parented transclusion content
28063 parsoid=wt2wt,wt2html
28065 <table>{{echo|foo<tr><td>bar</td></tr>}}</table>
28067 foo<table><tbody><tr><td>bar</td></tr></tbody></table>
28069 <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>
28073 2. Encapsulate foster-parented transclusion content
28075 parsoid=wt2wt,wt2html
28077 <table><div>{{echo|foo}}</div><tr><td>bar</td></tr></table>
28079 <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>
28090 3. Encapsulate foster-parented transclusion content
28092 parsoid=wt2wt,wt2html
28094 <table><div><p>{{echo|foo</p></div><tr><td>}}bar</td></tr></table>
28096 <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>"]}">
28109 4. Encapsulate foster-parented transclusion content
28111 parsoid=wt2wt,wt2html
28113 <table><div><p>{{echo|foo</p></div><tr><td>}}bar</td></tr></table>
28115 <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>"]}">
28127 ## Remex doesn't account for fostered content.
28129 5. Encapsulate foster-parented transclusion content
28131 parsoid=wt2wt,wt2html
28133 <table><tr><td><div><p>{{echo|foo</p></div></td>foo}}</tr></table>
28135 foo<table><tbody><tr><td><div><p>foo</p></div></td></tr></tbody></table>
28137 <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>
28140 ## Remex doesn't account for fostered content.
28142 6. Encapsulate foster-parented transclusion content
28144 parsoid=wt2wt,wt2html
28146 <table><tr><td><div><p>{{echo|foo</p></div></td>foo</tr></table>}}<p>ok</p>
28148 foo<table><tbody><tr><td><div><p>foo</p></div></td></tr></tbody></table><p>ok</p>
28150 <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>
28154 7. Encapsulate foster-parented transclusion content
28156 parsoid=wt2wt,wt2html
28158 <table>{{echo|<p>foo</p>}}<td>bar</td></table>
28160 <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>
28170 ## Remex doesn't account for fostered content.
28171 # Note that the wt is broken on purpose: the = should be {{=}} if you
28172 # don't want it to be a template parameter key.
28174 8. Encapsulate foster-parented transclusion content
28176 parsoid=wt2wt,wt2html
28179 }}{|{{echo|style='color:red'}}
28190 </td></tr></tbody></table>
28192 <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">
28193 </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">
28196 </td></tr></tbody></table>
28199 ## Remex doesn't account for fostered content.
28201 9. Encapsulate foster-parented transclusion content
28203 parsoid=wt2wt,wt2html
28205 <table>{{echo|hi</table>hello}}
28207 hi<table></table><p>hello
28210 <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>
28214 Table in fosterable position
28225 <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">
28227 <table about="#mwt1" data-parsoid='{"autoInsertedEnd":true}'></table>
28233 # Parsoid only for T66747
28235 Properly encapsulate empty-content transclusions in fosterable positions
28243 <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"}]]}'>
28248 ## No longer captures its original intention
28250 Always encapsulate foster box when template range is expanded to table
28264 T115289: Unclosed table
28266 {{echo|<table>}}<!--c-->[[Category:Two]]
28268 <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>
28272 T115289: Don't migrate newlines out of tables with fostered content
28274 <table><td></td>{{echo|<tr>[[Category:One]]}}<!--c-->[[Category:Two]]
28276 <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>
28280 T73074: More fostering fun
28282 <table><td></td>{{echo|<tr>}}<!--c-->[[Category:Two]]
28284 <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>
28288 Support <object> element with .data attribute
28292 <object data="test.swf"></object>
28294 <object data="test.swf"></object>
28298 Don't block XML namespace declaration
28300 <span xmlns:dct="http://purl.org/dc/terms/" property="dct:title">MediaWiki</span>
28302 <p><span xmlns:dct="http://purl.org/dc/terms/" property="dct:title">MediaWiki</span>
28305 <p><span xmlns:dct="http://purl.org/dc/terms/" data-x-property="dct:title" data-parsoid='{"stx":"html"}'>MediaWiki</span></p>
28308 # -----------------------------------------------------------------
28309 # The following section of tests are primarily to spec requirements
28310 # around Parsoid's serialization (old, new, edited content)
28312 # All these tests are marked Parsoid html2wt and html2html only
28313 # ----------------------------------------------------------------
28316 Ignore rel attribute in a-tags during serialization to url-links
28320 <a href='http://en.wikipedia.org/wiki/Foobar'>http://en.wikipedia.org/wiki/Foobar</a>
28321 <a href='http://en.wikipedia.org/wiki/Foobar' rel='mw:ExtLink'>http://en.wikipedia.org/wiki/Foobar</a>
28322 <a href='http://en.wikipedia.org/wiki/Foobar' rel='mw:WikiLink'>http://en.wikipedia.org/wiki/Foobar</a>
28324 http://en.wikipedia.org/wiki/Foobar
28325 http://en.wikipedia.org/wiki/Foobar
28326 http://en.wikipedia.org/wiki/Foobar
28329 # 'mi' is a localinterwiki prefix as well as a language
28331 Serialize interwiki links pointing to the current wiki as plain wiki links (T67869)
28335 <p><a rel="mw:ExtLink" href="http://mi.wikipedia.org/wiki/Foo">Foo</a></p>
28341 Parsoid should accept interwiki shortcuts
28345 <p><a rel='mw:WikiLink' href='./fr:Foo'>Foo</a>
28346 <a rel='mw:ExtLink' href='./fr:Foo'>Foo</a>
28347 <a href='./fr:Foo'>Foo</a></p>
28348 <p><a rel='mw:WikiLink' href='fr%3AFoo'>Foo</a>
28349 <a rel='mw:ExtLink' href='fr%3AFoo'>Foo</a>
28350 <a href='fr%3AFoo'>Foo</a></p>
28351 <p><a href='FR%3AFoo'>Foo</a>
28352 <a href='./FR:Foo'>Foo</a></p>
28367 Parsoid should not accept invalid interwiki shortcuts
28371 <p><a rel='mw:WikiLink' href='news:Foo'>Foo</a>
28372 <a rel='mw:ExtLink' href='news:Foo'>Foo</a>
28373 <a href='news:Foo'>Foo</a></p>
28382 New wikilinks should be serialized properly
28386 <a rel="mw:WikiLink" href="./Foo" title="Foo" data-parsoid='{}'>Foo</a>
28387 <a rel="mw:WikiLink" href="./Foo" title="Foo">Foo</a>
28388 <a href="//en.wikipedia.org/wiki/Foo">//en.wikipedia.org/wiki/Foo</a>
28389 <a href="http://en.wikipedia.org/wiki/Foo">http://en.wikipedia.org/wiki/Foo</a>
28390 <a href="//en.wikipedia.org/wiki/Foo_bar">//en.wikipedia.org/wiki/Foo bar</a>
28394 [[:en:Foo|//en.wikipedia.org/wiki/Foo]]
28395 http://en.wikipedia.org/wiki/Foo
28396 [[:en:Foo_bar|//en.wikipedia.org/wiki/Foo bar]]
28400 New wiki links (href variations)
28404 <a rel="mw:WikiLink" href="./Foo_bar">Foo_bar</a>
28405 <a rel="mw:WikiLink" href="Foo_bar">Foo_bar</a>
28406 <a rel="mw:WikiLink" href="Foo bar">Foo_bar</a>
28407 <a rel="mw:WikiLink" href="./Toxine_bact%C3%A9rienne">Toxine bactérienne</a>
28412 [[Toxine bactérienne]]
28416 New wiki links (content string variations)
28420 <a rel="mw:WikiLink" href="./Foo_bar">Foo_bar</a>
28421 <a rel="mw:WikiLink" href="./Foo_bar">Foo bar</a>
28422 <a rel="mw:WikiLink" href="./Foo_bar">./Foo_bar</a>
28426 [[Foo_bar|./Foo_bar]]
28430 New category links (href variations)
28434 <link rel="mw:PageProp/Category" href="./Category:Toxine_bactérienne" />
28435 <link rel="mw:PageProp/Category" href="./Category:Toxine_bact%C3%A9rienne" />
28436 <link rel="mw:PageProp/Category" href="Category:Toxine_bact%C3%A9rienne" />
28438 [[Category:Toxine bactérienne]]
28439 [[Category:Toxine bactérienne]]
28440 [[Category:Toxine bactérienne]]
28444 New sol transparent links don't need indent-pre nowiki protection
28449 <link rel="mw:PageProp/redirect" href="./Main_Page">
28450 <!-- this is good --> <link rel="mw:PageProp/Category" href="./Category:Good" />
28451 <!-- this is great --> <link rel="mw:PageProp/Category" href="./Kategorie:Great" />
28453 #WEITERLEITUNG [[Main Page]]
28454 <!-- this is good --> [[Category:Good]]
28455 <!-- this is great --> [[Kategorie:Great]]
28459 New interlanguage links (href variations)
28463 <link rel="mw:PageProp/Language" href="http://es.wikipedia.org/wiki/Toxine bactérienne" />
28464 <link rel="mw:PageProp/Language" href="http://es.wikipedia.org/wiki/Toxine_bactérienne" />
28465 <link rel="mw:PageProp/Language" href="http://es.wikipedia.org/wiki/Toxine_bact%C3%A9rienne" />
28467 [[es:Toxine bactérienne]]
28468 [[es:Toxine_bactérienne]]
28469 [[es:Toxine_bactérienne]]
28473 Image: Modifying size of an image (1)
28476 "modes": ["wt2wt"],
28478 ["img[height]", "attr", "height", "22"],
28479 ["img[width]", "attr", "width", "200"]
28483 [[Image:Foobar.jpg|230x230px]]
28485 [[Image:Foobar.jpg|200x200px]]
28489 Image: Modifying size of an image (2)
28492 "modes": ["wt2wt"],
28494 ["img[height]", "attr", "height", "100"],
28495 ["img[width]", "attr", "width", "500"]
28499 [[Image:Foobar.jpg|230x230px]]
28501 [[Image:Foobar.jpg|500x500px]]
28504 # Change in size is ignored so long as class='mw-default-size'
28506 Image: Modifying size of an image (3)
28509 "modes": ["wt2wt"],
28511 ["figure[class]", "removeClass", "mw-default-size"],
28512 ["figure img", "attr", "height", "19"],
28513 ["figure img", "attr", "width", "170"]
28517 [[Image:Foobar.jpg|thumb]]
28519 [[Image:Foobar.jpg|thumb|170x170px]]
28523 Image: Modifying alignment of an image (T50665)
28526 "modes": ["wt2wt"],
28528 ["figure[class]", "removeClass", "mw-halign-right"],
28529 ["figure[class]", "addClass", "mw-halign-left"]
28533 [[Image:Foobar.jpg|thumb|caption|right]]
28535 [[Image:Foobar.jpg|thumb|caption|left]]
28539 Image: Modifying mw-default-size of an frameless image (T64805)
28542 "modes": ["wt2wt"],
28544 ["figure.mw-default-size", "removeClass", "mw-default-size"]
28548 [[Image:Foobar.jpg|frameless|right]]
28550 [[Image:Foobar.jpg|frameless|right|220x220px]]
28554 Image: Modifying valign of an image (T51221)
28557 "modes": ["wt2wt"],
28559 ["*[typeof=\"mw:Image\"]", "removeClass", "mw-valign-middle"],
28560 ["*[typeof=\"mw:Image\"]", "addClass", "mw-valign-text-top"]
28564 [[File:Foobar.jpg|20px|middle]]
28566 [[File:Foobar.jpg|20px|text-top]]
28570 Image: Modifying alt attribute of an image (T58400)
28573 "modes": ["wt2wt"],
28575 ["img[alt]", "attr", "alt", "some alternate edited text"]
28579 [[File:Foobar.jpg|thumb|some caption|alt=some alternate text]]
28581 [[File:Foobar.jpg|thumb|some caption|alt=some alternate edited text]]
28585 Image: Modifying caption of an image
28588 "modes": ["wt2wt"],
28590 ["figcaption", "text", "new caption"]
28594 [[Image:Foobar.jpg|thumb|original caption]]
28596 [[Image:Foobar.jpg|thumb|new caption]]
28600 Image: empty alt attribute (T50924)
28604 [[File:Foobar.jpg|thumb|alt=|bar]]
28606 <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>
28610 Image: new attributes should be serialized in wiki's language for RTL languages (T53852)
28616 <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>
28618 [[Imagen:Foobar.jpg|derecha|miniaturadeimagen]]
28622 Image: Block level image should have \n before and after
28625 [[File:Foobar.jpg|right|thumb|150x150px]]
28629 <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>
28634 Image: New block level image should have \n before and after (existing content)
28637 [[File:Foobar.jpg|right|thumb|150x150px]]
28641 <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>
28646 Image: upright option (parsoid)
28648 [[File:Foobar.jpg|thumb|upright|caption]]
28649 [[File:Foobar.jpg|thumb|upright=0.5|caption]]
28650 [[File:Foobar.jpg|thumb|500x500px|upright=0.5|caption]]
28652 <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>
28653 <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>
28654 <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>
28658 Image: upright option is ignored on inline and frame images (parsoid)
28660 [[File:Foobar.jpg|500x500px|upright=0.5|caption]]
28662 <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>
28666 Image: in template parameter with empty parameter
28668 {{echo|[[File:Foobar.jpg|link=]]}}
28670 <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>
28674 Image: from basic HTML (1)
28678 <span typeof="mw:Image">
28679 <img src="./File:Foobar.jpg" width=100 height=100 alt="Alt">
28682 [[File:Foobar.jpg|link=|alt=Alt|100x100px]]
28686 Image: from basic HTML (2)
28690 <img src="./File:Foobar.jpg" width=100 height=100 alt="Alt">
28692 [[File:Foobar.jpg|link=|alt=Alt|100x100px]]
28696 Image: from basic HTML (3)
28700 <a href="Main"><img src="./File:Foobar.jpg" width=100 height=100 alt="Alt"></a>
28702 [[File:Foobar.jpg|link=Main|alt=Alt|100x100px]]
28706 Image: from basic HTML (4)
28710 <img src="./File:Foobar.jpg">
28712 [[File:Foobar.jpg|link=]]
28716 Image: Invalid title as link
28718 [[File:Foobar.jpg|link=<]]
28720 <p><a href="/wiki/File:Foobar.jpg" class="image" title="link=<"><img alt="link=<" src="http://example.com/images/3/3a/Foobar.jpg" width="1941" height="220" /></a>
28723 <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>
28727 Lists: Serialize correctly even when list content is wrapped in p-tags (like VE does)
28732 <li><p>foo</p></li>
28739 Lists: Serialize correctly even when list tags has unneeded whitespace between tags
28743 <ul> <li>foo</li></ul>
28749 Don't strip leading whitespace when handling indent-pre suppressing tags
28754 <tr><td> indented row</td></tr>
28757 <b>This is very bold of you!</b>
28760 indented cell (no pre-wrapping!)
28770 '''This is very bold of you!'''
28774 indented cell (no pre-wrapping!)
28782 Nowiki-wrap leading whitespace when handling indent-pre inducing tags
28804 <nowiki> </nowiki></span>bar2
28807 <nowiki> </nowiki><span>bar</span>
28810 <nowiki> </nowiki><span>foo</span>
28815 Lists: Dont insert newlines in a serialized list item.
28819 <ul><li>a<br>b</li><li>c</li></ul>
28826 1. Headings: Force sol-transparent links and behavior switches to serialize before/after
28829 "modes": ["html2wt"],
28830 "scrubWikitext": false
28833 <h2>hello there<link href="./Category:A1" rel="mw:PageProp/Category" /></h2>
28834 <h2><link href="./Category:A2" rel="mw:PageProp/Category" />hi pal</h2>
28836 <h2><!--foo--> <link href="./Category:A3" rel="mw:PageProp/Category" /> how goes it</h2>
28837 <h2>it goes well <link href="./Category:A4" rel="mw:PageProp/Category" /> <!--bar--></h2>
28839 <h2 data-parsoid='{}'>howdy<link href="./Category:A5" rel="mw:PageProp/Category" /></h2>
28841 <h2><meta property="mw:PageProp/toc" /> ok</h2>
28843 == hello there [[Category:A1]] ==
28845 == [[Category:A2]] hi pal ==
28847 == <!--foo--> [[Category:A3]] how goes it ==
28849 == it goes well [[Category:A4]] <!--bar--> ==
28851 ==howdy [[Category:A5]]==
28857 2. Headings: Force sol-transparent links and behavior switches to serialize before/after
28860 "modes": ["html2wt"],
28861 "scrubWikitext": true
28864 <h2>hello there<link href="./Category:A1" rel="mw:PageProp/Category" /></h2>
28865 <h2><link href="./Category:A2" rel="mw:PageProp/Category" />hi pal</h2>
28867 <h2><!--foo--> <link href="./Category:A3" rel="mw:PageProp/Category" /> how goes it</h2>
28868 <h2>it goes well <link href="./Category:A4" rel="mw:PageProp/Category" /> <!--bar--></h2>
28870 <h2><meta property="mw:PageProp/toc" /> ok</h2>
28878 <!--foo-->[[Category:A3]]
28883 [[Category:A4]] <!--bar-->
28891 Headings: Don't hoist metas that come from templates
28894 "modes": ["html2wt"],
28895 "scrubWikitext": true
28898 <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>
28900 == {{echo|foo [[Category:Foo]]}} ==
28904 Headings: Category in ref isn't hoisted
28907 "modes": ["html2wt"],
28908 "scrubWikitext": true
28911 <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>
28913 <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>
28916 [[Category:Baz]] </ref> ==
28922 Parsoid: Serialize positional parameters with = in them as named parameter
28926 <p about="#mwt1" typeof="mw:Transclusion"
28927 data-mw='{"parts":[{"template":{"target":{"wt":"echo","href":"./Template:Echo"},"params":{"1":{"wt":"f=oo"}},"i":0}}]}'>foo</p>
28929 <p about="#mwt1" typeof="mw:Transclusion"
28930 data-mw='{"parts":[{"template":{"target":{"wt":"echo","href":"./Template:Echo"},"params":{"1":{"wt":"f=oo"}, "2":{"wt":"bar"}},"i":0}}]}'>foo</p>
28932 <!--Orig params with data-parsoid has heuristics for handling = chars-->
28933 <!--FIXME: But maybe the heuristic needs fixing to apply to new params as well-->
28934 <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>
28938 {{echo|1=f=oo|2=bar}}
28940 <!--Orig params with data-parsoid has heuristics for handling = chars-->
28941 <!--FIXME: But maybe the heuristic needs fixing to apply to new params as well-->
28942 {{echo|<nowiki>f=oo</nowiki>|bar}}
28946 Parsoid: Serialize positional parameters with = in extlink as named parameter
28950 <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>
28952 {{echo|1=http://stuff?is=ok}}
28956 Parsoid: Correctly serialize block-node children when they are a combination of text and p-nodes
28960 <div>a<p>b</p></div>
28981 Substrings resembling wikitext in hrefs should not get nowiki escapes
28985 <a rel="mw:WikiLink" href="./Foo''bar''baz">Foo''bar''baz</a>
28991 Enforce single-line context in the serializer
28998 <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">
28999 </span><span about="#mwt1">you</span> </h2>
29001 <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>
29003 <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
29004 there</span></li></ol>
29016 ho </dt><dd data-parsoid='{"stx":"row"}'> hi
29023 </tbody></table></dd></dl>
29027 == hi {{bogus|there
29038 * foo '''bar''' baz
29050 Serialize new placeholder space without spans
29054 <p>foo<span typeof="mw:Placeholder"> </span>: bar</p>
29056 <p>foo<span typeof="mw:DisplaySpace mw:Placeholder" data-parsoid='{"src":" ","isDisplayHack":true}'> </span>: bar</p>
29058 <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>
29064 <ref>foo : bar</ref>ok
29068 #-----------------------
29069 # Tag minimization tests
29070 #-----------------------
29073 1. I/B quote minimization: wikitext-only tags should be combined
29077 <p><i>A</i><i>B</i></p>
29078 <p><b>A</b><b>B</b></p>
29079 <p><i>A</i><b><i>B</i></b></p>
29080 <p><b>A</b><i><b>B</b></i></p>
29081 <p><b>A</b><i><b>B</b><b>C</b></i><b>D</b></p>
29082 <p><i><b>A</b></i><i><b>B</b></i></p>
29083 <p><i><b>A</b></i><b><i>B</i></b></p>
29084 <p><b><i>A</i></b><i><b>B</b></i></p>
29104 2. I/B quote minimization: wikitext and html tags should not be combined
29108 <p><i>A</i><i data-parsoid='{"stx":"html"}'>B</i></p>
29109 <p><i>A</i><b><i data-parsoid='{"stx":"html"}'>B</i></b></p>
29113 ''A''<nowiki/>'''<i>B</i>'''
29117 3. I/B quote minimization: templated content stops minimization
29121 <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>
29122 <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>
29124 ''A''{{echo|''B''}}
29126 ''A''{{echo|'''''B'''''}}
29130 4. I/B quote minimization: new content should be mimimized with adjacent old content
29134 <p><i>A</i><i>B</i></p>
29135 <p><b>A</b><b>B</b></p>
29136 <p><i>A</i><b><i>B</i></b></p>
29146 5a. Merge adjacent quote nodes if they've been edited
29149 "modes": ["wt2wt", "selser"],
29151 ["p", "contents", "remove", ":contains('b')"]
29161 5b. Merge adjacent quote nodes if they've been edited
29164 "modes": ["wt2wt", "selser"],
29170 ''a''<span id="x">b</span>''c''
29176 1. Merge adjacent link nodes as long as at least one element is new
29179 "modes": ["html2wt"],
29180 "scrubWikitext": true
29183 <a rel="mw:WikiLink" href="./Football">Foot</a><a rel="mw:WikiLink" href="./Football">ball</a>
29184 <a data-parsoid="{}" rel="mw:WikiLink" href="./Football">Foot</a><a rel="mw:WikiLink" href="./Football">ball</a>
29185 <a data-parsoid="{}" rel="mw:WikiLink" href="./Football">Foot</a><a data-parsoid="{}" rel="mw:WikiLink" href="./Football">ball</a>
29189 [[Football|Foot]][[Football|ball]]
29193 2. Merge adjacent link nodes and enable additional normalizations
29196 "modes": ["html2wt"],
29197 "scrubWikitext": true
29200 <a rel="mw:WikiLink" href="./Football"><i>Foot</i></a><a rel="mw:WikiLink" href="./Football"><i>ball</i></a>
29206 3. Don't merge adjacent link nodes if scrubWikitext is false
29209 "modes": ["html2wt"],
29210 "scrubWikitext": false
29213 <a rel="mw:WikiLink" href="./Football">Foot</a><a rel="mw:WikiLink" href="./Football">ball</a>
29215 [[Football|Foot]][[Football|ball]]
29219 1. Move format tags outside of WikiLink
29222 "modes": ["html2wt"],
29223 "scrubWikitext": true
29226 <a rel="mw:WikiLink" href="./Football"><i>Football</i></a>
29227 <a rel="mw:WikiLink" href="./Football"><i><b>Football</b></i></a>
29228 <a rel="mw:WikiLink" href="./Football"><u><i><b>Football</b></i></u></a>
29231 '''''[[Football]]'''''
29232 <u>'''''[[Football]]'''''</u>
29236 2. Move format tags outside of WikiLink with mergable A tags
29239 "modes": ["html2wt"],
29240 "scrubWikitext": true
29243 <a rel="mw:WikiLink" href="./Football"><i><b>Foot</b></i></a><a rel="mw:WikiLink" href="./Football"><i><b>ball</b></i></a>
29245 '''''[[Football]]'''''
29249 3. Move format tags outside of WikiLink while preserving formats already outside WikiLink
29252 "modes": ["html2wt"],
29253 "scrubWikitext": true
29256 <font color="red"><a rel="mw:WikiLink" href="./Foo" title="Foo" class="mw-redirect"><u><b>Foo</b></u></a></font>
29258 <font color="red"><u>'''[[Foo]]'''</u></font>
29262 4. Do not move format tags outside of WikiLink which includes attributes color, style and class
29265 "modes": ["html2wt"],
29266 "scrubWikitext": true
29269 <a rel="mw:WikiLink" href="./Foo" title="Foo" class="mw-redirect"><font color="red">Foo</font></a>
29270 <a rel="mw:WikiLink" href="./Foo" title="Foo" class="mw-redirect"><span style="color: blue; font-size: 46px;">Foo></span></a>
29271 <a rel="mw:WikiLink" href="./Foo" title="Foo" class="mw-redirect"><span class="Bar">Foo</span></a>
29273 [[Foo|<font color="red">Foo</font>]]
29274 [[Foo|<span style="color: blue; font-size: 46px;">Foo></span>]]
29275 [[Foo|<span class="Bar">Foo</span>]]
29279 5. T194083 Regression test: Manual edit test that also enables scrubWikitext to move format tags outside wikilinks
29282 "modes": ["selser"],
29283 "scrubWikitext": true,
29285 ["a", "html", "<i>Foo</i>"]
29295 6. Regression test: Manual edit test to ensure diff markers are not lost
29298 "modes": ["selser"],
29299 "scrubWikitext": true,
29301 ["i", "wrap", "<a href='./Foo' rel='mw:WikiLink'></a>"]
29311 7. T194083 Regression test: Manual edit test to ensure nested diff markers aren't inserted
29314 "modes": ["selser"],
29315 "scrubWikitext": true,
29317 ["div", "after", "\n<p><a href='./Foo' rel='mw:WikiLink'>Foo </a>, placeholder</p>"]
29321 <div>placeholder</div>
29323 <div>placeholder</div>
29324 [[Foo]] , placeholder
29327 #------------------------------
29328 # End of tag minimization tests
29329 #------------------------------
29332 T56262: New entities
29336 <span typeof="mw:Entity"> </span>
29341 ## Note that there is no wikitext output for 'unknownproperty' ##
29342 ## Unknown magic words are silently dropped ##
29349 <meta property='mw:PageProp/toc' />
29350 <meta property='mw:PageProp/notoc' />
29351 <meta property='mw:PageProp/forcetoc' />
29352 <meta property='mw:PageProp/index' />
29353 <meta property='mw:PageProp/noindex' />
29354 <meta property='mw:PageProp/nogallery' />
29355 <meta property='mw:PageProp/noeditsection' />
29356 <meta property='mw:PageProp/notitleconvert' />
29357 <meta property='mw:PageProp/nocontentconvert' />
29358 <meta property='mw:PageProp/unknownproperty' />
29368 __NOCONTENTCONVERT__
29372 Consecutive <pre>s should not get merged
29374 parsoid=html2wt,html2html
29376 <pre>a</pre><pre>b</pre>
29404 Edited ISBN links not serializable as ISBN links should serialize as wikilinks
29408 <a href="./Special:BookSources/1234567890" rel="mw:ExtLink">ISBN 1234567895</a>
29410 [[Special:BookSources/1234567890|ISBN 1234567895]]
29414 Edited RFC links not serializable as RFC links should serialize as extlinks
29418 <a href="https://tools.ietf.org/html/rfc123" rel="mw:ExtLink">New RFC</a>
29420 [https://tools.ietf.org/html/rfc123 New RFC]
29424 Edited PMID links not serializable as PMID links should serialize as extlinks
29428 <a href="//www.ncbi.nlm.nih.gov/pubmed/123?dopt=Abstract" rel="mw:ExtLink">New PMID</a>
29430 [//www.ncbi.nlm.nih.gov/pubmed/123?dopt=Abstract New PMID]
29434 WTS of autolinks with trailing/surrounding context
29438 <p><a href="http://cscott.net">http://cscott.net</a><b>foo</b></p>
29439 <p><a href="http://cscott.net">http://cscott.net</a><b data-parsoid='{"stx":"html"}'>foo</b></p>
29440 <p><b><a href="http://cscott.net">http://cscott.net</a></b></p>
29441 <p><b><a href="http://cscott.net">http://cscott.net</a> </b></p>
29442 <p><b><a href="http://cscott.net">http://cscott.net</a>x</b></p>
29443 <p><a href="http://cscott.net">http://cscott.net</a>x</p>
29445 http://cscott.net'''foo'''
29447 http://cscott.net<b>foo</b>
29449 '''http://cscott.net'''
29451 '''http://cscott.net '''
29453 '''http://cscott.net<nowiki/>x'''
29455 http://cscott.net<nowiki/>x
29459 WTS of autolinks with nowikis (round-trip)
29461 x<nowiki/>http://cscott.net<nowiki/>x
29463 <p>x<a rel="mw:ExtLink" class="external free" href="http://cscott.net">http://cscott.net</a>x</p>
29466 # this is the "easy" test because it leaves in place all the
29467 # data-parsoid information indicating this is an autolink
29469 WTS of autolinks with escapes (editing)
29472 "modes": ["wt2wt"],
29474 [ "span", "remove" ]
29478 x<nowiki/>http://cscott.net<nowiki/>x
29480 x<nowiki/>http://cscott.net<nowiki/>x
29484 WTS of edited autolink-like text (T103364)
29487 "modes": ["wt2wt"],
29489 [ "span[typeof]", "removeAttr", "typeof" ]
29493 Not a link: <nowiki>http://example.com</nowiki>.
29495 Not a link: <span><nowiki>http://example.com</nowiki></span>.
29499 WTS of newly-authored autolink-like text (T103364)
29503 <p>http://example.com is not a link.</p>
29505 <nowiki>http://example.com</nowiki> is not a link.
29509 WTS of autolink-like text after an autolink (T108563)
29513 <p><a rel="mw:ExtLink" href="http://example.com">http://example.com</a> http://example.com is not a link.</p>
29515 http://example.com <nowiki>http://example.com</nowiki> is not a link.
29519 Magic links inside links (not autolinked)
29521 [[Foo|http://example.com]]
29524 [[Foo|ISBN 123456789x]]
29526 [http://foo.com http://example.com]
29527 [http://foo.com RFC 1234]
29528 [http://foo.com PMID 1234]
29529 [http://foo.com ISBN 123456789x]
29531 <p><a href="/wiki/Foo" title="Foo">http://example.com</a>
29532 <a href="/wiki/Foo" title="Foo">RFC 1234</a>
29533 <a href="/wiki/Foo" title="Foo">PMID 1234</a>
29534 <a href="/wiki/Foo" title="Foo">ISBN 123456789x</a>
29535 </p><p><a rel="nofollow" class="external text" href="http://foo.com">http://example.com</a>
29536 <a rel="nofollow" class="external text" href="http://foo.com">RFC 1234</a>
29537 <a rel="nofollow" class="external text" href="http://foo.com">PMID 1234</a>
29538 <a rel="nofollow" class="external text" href="http://foo.com">ISBN 123456789x</a>
29541 <p><a rel="mw:WikiLink" href="./Foo" title="Foo">http://example.com</a>
29542 <a rel="mw:WikiLink" href="./Foo" title="Foo">RFC 1234</a>
29543 <a rel="mw:WikiLink" href="./Foo" title="Foo">PMID 1234</a>
29544 <a rel="mw:WikiLink" href="./Foo" title="Foo">ISBN 123456789x</a></p>
29546 <p><a rel="mw:ExtLink" class="external text" href="http://foo.com">http://example.com</a>
29547 <a rel="mw:ExtLink" class="external text" href="http://foo.com">RFC 1234</a>
29548 <a rel="mw:ExtLink" class="external text" href="http://foo.com">PMID 1234</a>
29549 <a rel="mw:ExtLink" class="external text" href="http://foo.com">ISBN 123456789x</a></p>
29553 Magic links inside image captions (autolinked)
29555 [[File:Foobar.jpg|thumb|http://example.com]]
29556 [[File:Foobar.jpg|thumb|RFC 1234]]
29557 [[File:Foobar.jpg|thumb|PMID 1234]]
29558 [[File:Foobar.jpg|thumb|ISBN 123456789x]]
29560 <div class="thumb tright"><div class="thumbinner" style="width:182px;"><a href="/wiki/File:Foobar.jpg" class="image"><img alt="" src="http://example.com/images/thumb/3/3a/Foobar.jpg/180px-Foobar.jpg" width="180" height="20" class="thumbimage" srcset="http://example.com/images/thumb/3/3a/Foobar.jpg/270px-Foobar.jpg 1.5x, http://example.com/images/thumb/3/3a/Foobar.jpg/360px-Foobar.jpg 2x" /></a> <div class="thumbcaption"><div class="magnify"><a href="/wiki/File:Foobar.jpg" class="internal" title="Enlarge"></a></div><a rel="nofollow" class="external free" href="http://example.com">http://example.com</a></div></div></div>
29561 <div class="thumb tright"><div class="thumbinner" style="width:182px;"><a href="/wiki/File:Foobar.jpg" class="image"><img alt="" src="http://example.com/images/thumb/3/3a/Foobar.jpg/180px-Foobar.jpg" width="180" height="20" class="thumbimage" srcset="http://example.com/images/thumb/3/3a/Foobar.jpg/270px-Foobar.jpg 1.5x, http://example.com/images/thumb/3/3a/Foobar.jpg/360px-Foobar.jpg 2x" /></a> <div class="thumbcaption"><div class="magnify"><a href="/wiki/File:Foobar.jpg" class="internal" title="Enlarge"></a></div><a class="external mw-magiclink-rfc" rel="nofollow" href="https://tools.ietf.org/html/rfc1234">RFC 1234</a></div></div></div>
29562 <div class="thumb tright"><div class="thumbinner" style="width:182px;"><a href="/wiki/File:Foobar.jpg" class="image"><img alt="" src="http://example.com/images/thumb/3/3a/Foobar.jpg/180px-Foobar.jpg" width="180" height="20" class="thumbimage" srcset="http://example.com/images/thumb/3/3a/Foobar.jpg/270px-Foobar.jpg 1.5x, http://example.com/images/thumb/3/3a/Foobar.jpg/360px-Foobar.jpg 2x" /></a> <div class="thumbcaption"><div class="magnify"><a href="/wiki/File:Foobar.jpg" class="internal" title="Enlarge"></a></div><a class="external mw-magiclink-pmid" rel="nofollow" href="//www.ncbi.nlm.nih.gov/pubmed/1234?dopt=Abstract">PMID 1234</a></div></div></div>
29563 <div class="thumb tright"><div class="thumbinner" style="width:182px;"><a href="/wiki/File:Foobar.jpg" class="image"><img alt="" src="http://example.com/images/thumb/3/3a/Foobar.jpg/180px-Foobar.jpg" width="180" height="20" class="thumbimage" srcset="http://example.com/images/thumb/3/3a/Foobar.jpg/270px-Foobar.jpg 1.5x, http://example.com/images/thumb/3/3a/Foobar.jpg/360px-Foobar.jpg 2x" /></a> <div class="thumbcaption"><div class="magnify"><a href="/wiki/File:Foobar.jpg" class="internal" title="Enlarge"></a></div><a href="/wiki/Special:BookSources/123456789X" class="internal mw-magiclink-isbn">ISBN 123456789x</a></div></div></div>
29565 <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>
29566 <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>
29567 <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>
29568 <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>
29572 WTS of magic word text (T109371)
29577 <p><a href="http://foo.com" rel="mw:ExtLink">RFC 1234</a></p>
29578 <p><a href="./Foo" rel="mw:WikiLink">RFC 1234</a></p>
29580 <nowiki>RFC 1234</nowiki>
29582 [http://foo.com RFC 1234]
29588 Edited Redirect link should emit a non-piped wikitext link
29592 <link rel="mw:PageProp/redirect" href="Bar" data-parsoid='{"a":{"href":"./Foo"},"sa":{"href":"Foo"}}'>
29598 T75121: Infer extension name from typeOf if data-mw is not present
29600 parsoid={ "modes": ["html2wt"], "suppressErrors": true }
29602 <div typeOf="mw:Extension/foo"></div>
29607 # Note that the <p> wrapping isn't present in PHP parser output
29608 # The important thing for this test is that P-wrapping doesn't
29609 # interfere with the <nowiki> protection for leading - in <td>
29610 # (which isn't necessary for <th>).
29612 T88318: p-wrapped dash in table.
29614 parsoid=html2wt,wt2wt
29617 <tr><th><p>-</p></th><th><p>- </p></th></tr>
29618 <tr><td><p>-</p></td><td><p>- </p></td></tr>
29619 <tr><td><small>-</small></td><td><br/><p>-</p></td><td><br/>-</td></tr>
29626 |<nowiki>-</nowiki>
29627 |<nowiki>- </nowiki>
29647 <td><small>-</small>
29654 </td></tr></tbody></table>
29658 T149209: WTS: Handle newlines in table cells properly
29666 </td><td data-parsoid='{"stx":"row"}'>c</td></tr>
29668 </td><td data-parsoid='{"stx":"row", "startTagSrc": "{{!}}{{!}}"}'>y</td></tr>
29674 </th><th data-parsoid='{"stx":"row"}'>c</th></tr>
29676 </th><th data-parsoid='{"stx":"row"}'>y</th></tr>
29698 T149209: Selser: Handle newlines in table cells properly
29701 "modes": ["selser"],
29703 [ "#h1", "html", "a\nb\n" ],
29704 [ "#h2", "html", "a\nb\n" ],
29705 [ "#c1", "html", "a\nb\n" ],
29706 [ "#c2", "html", "<p>a</p>" ],
29707 [ "#c3", "html", "<p>a</p>" ],
29708 [ "#c4", "html", "edit-me<p>a</p>" ]
29713 ! id="h1" |edit-me!!1
29715 ! id="h2" |edit-me||2
29717 | id="c1" |edit-me||3
29719 | id="c2" |edit-me||4
29721 | id="c3" |edit-me||p||q||r
29723 | id="c4" |edit-me||p||q||r
29752 HTML id attribute with Parsoid-like element ids should not be serialized to wikitext
29757 <td id='mwAc'>foo</td>
29758 <td id='serialize-this'>bar</td>
29763 | id="serialize-this" |bar
29768 Parsoid-like element ids should not be serialized to wikitext unless shadowed
29772 <div id="mwAQ" data-parsoid='{"stx":"html","a":{"id":"mwAQ"},"sa":{"id":"hello"}}'>ok</div>
29774 <div id="hello">ok</div>
29778 Testing serialization after deletion in references
29781 "modes": ["wt2wt"],
29787 hi <ref><div id="x">ho</div></ref>
29797 Testing serialization after deletion of table cells
29800 "modes": ["wt2wt", "selser"],
29808 | id="x" |c1 {{!}}{{!}}{{!}}c2 |||c3
29818 Testing selser after addition of new row before first row (T125419)
29821 "modes": ["wt2wt", "selser"],
29823 [ "tr", "before", "<tr><td>X</td></tr>" ]
29839 Serialize new table rows in a HTML table using HTML tags
29842 "modes": ["wt2wt", "selser"],
29844 [ "tr", "before", "<tr><td>X</td></tr>" ]
29848 <table><tr><td>a</td></tr></table>
29850 <table><tr><td>X</td></tr><tr><td>a</td></tr></table>
29854 Serialize new table cells in a HTML row using HTML tags
29857 "modes": ["wt2wt", "selser"],
29859 [ "td", "before", "<td>X</td>" ]
29863 <table><tr><td>a</td></tr></table>
29865 <table><tr><td>X</td><td>a</td></tr></table>
29869 Serialize wikitext list items as HTML list items when embedded in a HTML list
29873 <ul data-parsoid='{"stx": "html"}'>
29874 <li data-parsoid='{}'>a</li>
29884 # SSS FIXME: Is this actually a good thing given the
29885 # odd nested list output that is generated by MW?
29886 # <ul><li>foo<ul>..</ul></li></ul> instead of
29887 # <ul><li>foo</li><ul>..</ul></ul>
29889 Wikitext lists can be nested inside HTML lists
29893 <ul data-parsoid='{"stx": "html"}'>
29894 <li data-parsoid='{"stx": "html"}'>a
29895 <ul><li>b</li></ul>
29899 <ul data-parsoid='{"stx": "html"}'>
29901 <ul><li>y</li></ul>
29922 "modes": ["wt2wt"],
29924 [ "#xyz", "before", "<b>before</b> stuff " ],
29925 [ "#xyz", "after", " stuff <i>after</i>" ],
29926 [ "#xyz", "html", "x <b>y</b> z" ]
29930 <span id="xyz">hello</span>
29932 '''before''' stuff <span id="xyz">x '''y''' z</span> stuff ''after''
29936 Never serialize a-tag as html, regardless of what data-parsoid has to say
29938 parsoid={ "modes": ["html2wt"], "suppressErrors": true }
29940 <a rel="mw:WikiLink" href="./Foo" title="Foo" data-parsoid='{"stx":"html"}'>Foo</a>
29945 ## SSS FIXME: This is broken output nevertheless.
29946 ## What might be a reasonable non-broken output for this?
29947 ## This is an edge case unlikely to be seen in production
29948 ## that I am not wasting more time on this right now.
29950 Never serialize a-tag as html, no matter what attributes it has
29952 parsoid={ "modes": ["html2wt"], "suppressErrors": true }
29954 <a bad='true' href='http://boo.org'><img src='http://boohoo.org' /></a>
29956 [http://boo.org http://boohoo.org]
29959 # Misnested is an indication that selser can reuse the source but these have
29960 # shown to sneak through on occasion. See T101768.
29961 # The original wikitext here is: [http://test.com [[one]] two three]
29963 Strip span tags added to mark misnested links
29967 <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>
29969 [http://test.com][[one]] two three
29973 Catch regression when unpacking misnested links
29977 {{echo|hi}}[http://example.com [[ho]]]
29979 <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>
29983 Catch regression when unpacking with trailing content
29985 {{echo|Foo <references/> bar}}
29987 <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>
29991 Use data-parsoid.firstWikitextNode to compute newline constraints for template content
29995 <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|}"]}'>
30007 ## This test verifies the presence and computation of this attribute indirectly
30008 ## by making an edit and ensuring that the serialization is correct (which it would be
30009 ## only if firstWikitextNode is properly set).
30011 data-parsoid.firstWikitextNode should be computed properly in the presence of fostered content
30014 "modes": ["wt2wt"],
30016 [ "div#x", "remove" ],
30017 [ "div", "before", "<div>new</div>" ]
30021 <div id="x">foo</div>
30023 {{echo|<div>boo</div>
30031 {{echo|<div>boo</div>
30037 # --------------------------------------------
30038 # Tests spec'ing wikitext serialization norms |
30039 # --------------------------------------------
30042 Serialize multi-line indent-pre starting with wikitext syntax
30056 1. Categories should always be serialized on their own line
30060 foo<link rel="mw:PageProp/Category" href="./Category:Foo">bar
30068 2. Categories that are part of templates should not introduce a line break
30070 foo {{echo|<span>bar</span> [[Category:baz]]}} bar
30072 <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>
30075 # Careful while editing these next 2 tests. There are \u200f characters
30076 # before and after the <link> tags in the HTML and following some
30077 # of the categories in wikitext
30078 # Do not remove these characters in edits.
30080 # As part of the serialization, these bidi characters will get stripped.
30082 RTL (\u200f) and LTR (\u200e) markers around category tags should be stripped
30085 "modes": ["html2wt"],
30086 "scrubWikitext": true
30089 <p><link rel="mw:PageProp/Category" href="./קטגוריה:טקסים" />
30090 <link rel="mw:PageProp/Category" href="./קטגוריה:_שיטות_משפט" /></p>
30093 [[קטגוריה: שיטות משפט]]
30097 RTL (\u200f) and LTR (\u200e) markers should not be stripped if followed by a text node
30100 "modes": ["html2wt"],
30101 "scrubWikitext": true
30104 <p><link rel="mw:PageProp/Category" href="./קטגוריה:טקסים" />y</p>
30111 Lists: Add space after bullets
30118 <li><span> baz</span></li>
30123 * <span> baz</span>
30127 1. Headings: Add space before/after == (T53744)
30134 <h2><span> baz</span></h2>
30142 == <span> baz</span> ==
30146 2. Headings: Add space before/after == even after hoisted content
30149 "modes": ["html2wt"],
30150 "scrubWikitext": true
30153 <h2> <link href="./Category:A2" rel="mw:PageProp/Category" />ok</h2>
30161 1. Headings: suppress newly created empty headings
30164 "modes": ["html2wt"],
30165 "scrubWikitext": true
30173 2. Headings: don't suppress empty headings if scrubWikitext is false
30183 3. Headings: suppress empty headings on edits
30186 "modes": ["selser"],
30187 "scrubWikitext": true,
30193 ==<span id="x">foo</span>==
30198 Headings: Replace <br/> with a single whitespace char (when scrubWikitext = true)
30201 "modes": ["html2wt"],
30202 "scrubWikitext": true
30205 <h2>foo<br/>bar</h2>
30206 <h2>foo <span><br/>bar</span> baz</h2>
30210 == foo <span> bar</span> baz ==
30214 Headings: Replace <br/> with a single whitespace char (when scrubWikitext = false)
30217 "modes": ["html2wt"],
30218 "scrubWikitext": false
30221 <h2>foo<br/>bar</h2>
30227 1. WT Quote Tags: suppress newly created empty style tags
30230 "modes": ["html2wt"],
30231 "scrubWikitext": true
30239 2. WT Quote Tags: don't suppress empty style tags if scrubWikitext is false
30245 ''<nowiki/>'''''<nowiki/>'''
30249 3. WT Quote Tags: suppress empty style tags on edits
30252 "modes": ["selser"],
30253 "scrubWikitext": true,
30259 '''<span id="x">foo</span>'''
30264 1. Anchors: suppress newly created empty anchors
30267 "modes": ["html2wt"],
30268 "scrubWikitext": true
30271 <a rel="mw:WikiLink" href="./Test" title="Test"></a>
30276 2. Anchors: don't suppress empty anchors if scrubWikitext is false
30279 "modes": ["html2wt"],
30280 "scrubWikitext": false
30283 <a rel="mw:WikiLink" href="./Test" title="Test"></a>
30289 3. Anchors: suppress empty anchors on edits
30292 "modes": ["selser"],
30293 "scrubWikitext": true,
30299 [[Test|<span id="x">foo</span>]]
30304 3a. Anchors: do not suppress numbered extlinks
30307 "modes": ["wt2wt"],
30308 "scrubWikitext": true
30313 <a rel="mw:ExtLink" href="http://foo.com"></a>
30317 3b. Anchors: do not suppress numbered extlinks
30320 "modes": ["wt2wt"],
30321 "scrubWikitext": true,
30327 [http://foo.com <span id="x">foo</span>]
30333 Normalizations should be restricted to edited content
30336 "modes": ["selser"],
30337 "scrubWikitext": true,
30339 [ "h1", "before", "<i></i>"]
30353 1. Multiple normalizations (html2wt)
30356 "modes": ["html2wt"],
30357 "scrubWikitext": true
30361 <p><a href='Foo' rel='mw:WikiLink'>foo<i></i>
30362 </a><b><i></i></b>x</p>
30371 2. Multiple normalizations (selser)
30374 "modes": ["selser"],
30375 "scrubWikitext": true,
30377 [ "#x", "after", "<h1><i></i></h1>\n<p> x<b></b></p>"]
30381 <span id="x">foo</span>
30383 <span id="x">foo</span>
30389 1. Indent Pre Nowiki: suppress whitespace at the start of new paragraph
30392 "modes": ["html2wt"],
30393 "scrubWikitext": true
30405 2. Indent Pre Nowiki: don't suppress whitespace at the start of new paragraph if scrubWikitext is false
30412 <nowiki> </nowiki>hi
30414 <nowiki> </nowiki> hello
30418 3. Indent Pre Nowiki: suppress whitespace after newlines in new paragraph or table cell
30421 "modes": ["html2wt"],
30422 "scrubWikitext": true
30431 baz bang</td></tr></table>
30437 bar<span>boo</span></p>
30453 bar<span>boo</span>
30457 4. Indent Pre Nowiki: suppress leading whitespace in edited paragraphs
30460 "modes": ["selser"],
30461 "scrubWikitext": true,
30463 [ "p", "html", " a\n b" ]
30474 1. New links that end in spaces
30477 "modes": ["html2wt"],
30478 "scrubWikitext": false
30481 <p><a rel="mw:WikiLink" href="./Berlin" title="Berlin">Berlin </a>is the capital of Germany.</p>
30482 <p><a rel="mw:WikiLink" href="./Foo" title="Foo">Foo </a><b>bar</b></p>
30483 <p><a rel="mw:WikiLink" href="./Boston" title="Boston">Boston </a> is a city.</p>
30485 [[Berlin ]]<nowiki/>is the capital of Germany.
30489 [[Boston ]] is a city.
30493 2. New links that end in spaces
30496 "modes": ["html2wt"],
30497 "scrubWikitext": true
30500 <p><a rel="mw:WikiLink" href="./Berlin" title="Berlin">Berlin </a>is the capital of Germany.</p>
30501 <p><a rel="mw:WikiLink" href="./Foo" title="Foo">Foo </a><b>bar</b></p>
30502 <p><a rel="mw:WikiLink" href="./Boston" title="Boston">Boston </a> is a city.</p>
30504 [[Berlin]] is the capital of Germany.
30508 [[Boston]] is a city.
30512 1. Table cells with escapable prefixes
30515 "modes": ["html2wt"],
30516 "scrubWikitext": false
30520 <tr><td>a</td></tr>
30521 <tr><td>-</td></tr>
30522 <tr><td>+</td></tr>
30528 |<nowiki>-</nowiki>
30530 |<nowiki>+</nowiki>
30535 2. Table cells with escapable prefixes
30538 "modes": ["html2wt"],
30539 "scrubWikitext": true
30543 <tr><td>a</td></tr>
30544 <tr><td>-</td></tr>
30545 <tr><td>+</td></tr>
30558 3a. Table cells with escapable prefixes after edits
30561 "modes": ["selser"],
30562 "scrubWikitext": true,
30564 [ "table tbody tr:first-child td:first-child", "remove"]
30578 3b. Table cells with escapable prefixes after edits
30581 "modes": ["selser"],
30582 "scrubWikitext": true,
30584 [ "table tbody tr:first-child td:first-child", "html", "-" ],
30591 |<span id="x">foo</span>+
30600 # FIXME: This test will fail because
30601 # normalization doesn't realize that the id attribute
30602 # will eliminate the escapable scenario
30604 4a. Table cells without escapable prefixes after edits
30607 "modes": ["selser"],
30608 "scrubWikitext": true,
30610 [ "#x", "html", "-" ]
30623 ## This tests normalizer's ability to discriminate between
30624 ## cells having identical content.
30626 4b. Table cells without escapable prefixes after edits
30629 "modes": ["selser"],
30630 "scrubWikitext": true,
30632 [ "td", "html", "-" ]
30645 ## This tests normalizer's ability to not be tripped by
30646 ## comments (and whitespace)
30648 4c. Table cells without escapable prefixes after edits
30651 "modes": ["selser"],
30652 "scrubWikitext": true,
30654 [ "table tbody tr td:first-child", "remove" ]
30669 ## This tests normalizer's ability to handle HTML cells
30671 4d. Table cells without escapable prefixes after edits
30674 "modes": ["selser"],
30675 "scrubWikitext": true,
30677 [ "td", "html", "-" ]
30682 <tr><td>a</td></tr>
30686 <tr><td>-</td></tr>
30690 ## T111151 Remove font elements without attributes
30692 5a. font tags without attributes should be dropped in scrubWikitext mode
30695 "modes": ["html2wt"],
30696 "scrubWikitext": true
30700 <font><font>bar</font></font>
30701 <font class="x">boo</font>
30705 <font class="x">boo</font>
30709 5b. font tags should not be dropped without scrubWikitext being enabled
30712 "modes": ["html2wt"],
30713 "scrubWikitext": false
30722 Escape nowiki DOM elements
30726 <nowiki><i>foo</i></nowiki>
30728 <nowiki>''foo''</nowiki>
30731 # This is meant to be an interim fix while we go about figuring out
30732 # how to not introduce these trailing <nowiki/>s in the first place.
30734 T115717: Strip trailing <nowiki/>s (without affecting valid uses)
30738 <p>x<meta typeof="mw:Placeholder" data-parsoid='{"src":"<nowiki/>"}'/><meta typeof="mw:Placeholder" data-parsoid='{"src":"<nowiki/>"}'/>
30740 <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>
30741 <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>
30755 New list is serialized on newlines
30759 <p>The quick brown fox jumps over the lazy dog.</p><ul>
30763 </ul><p>The quick onyx goblin jumps over the lazy dwarf.</p>
30765 The quick brown fox jumps over the lazy dog.
30771 The quick onyx goblin jumps over the lazy dwarf.
30775 New lists in formatting elements serialized w/o newlines
30787 <small><ul><li>hi</li></ul></small>
30799 New list in table doesn't need newlines
30803 <table><tr><td><ul><li>test</li><li>123</li></td></tr></table>
30812 # ---------------------------------------------------
30813 # End of tests spec'ing wikitext serialization norms |
30814 # ---------------------------------------------------
30818 Bare inline nodes not wrapped inside p-tags should be treated as p-wrapped
30826 <td><b>c</b><p>d</p></td>
30845 Anchor without href scenarios
30847 parsoid={ "modes": ["html2wt"], "suppressErrors": true }
30850 <a class="no">dice</a>
30855 <span name="foo"></span>
30859 New transclusion added after a list should be serialized after the list
30863 <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>
30869 # -----------------------------------------------------------------
30870 # End of section for Parsoid-only html2wt tests for serialization
30872 # -----------------------------------------------------------------
30874 # -----------------------------------------------------------------
30875 # The following section of tests are primarily to spec behavior of
30876 # the selective serializer. All these tests have manual selser
30877 # changes. The automated selser changes for all tests handle the
30878 # wide variation of changes, but these tests here capture specs
30879 # deterministically.
30880 # ----------------------------------------------------------------
30884 Selser: New comments should not be lost
30887 "modes": ["selser"],
30889 [ "#a", "after", "<!--c1-->" ],
30890 [ "#b", "before", "<!--c2-->" ]
30894 <span id="a">a</span>
30896 <span id="b">b</span>
30898 <span id="a">a</span><!--c1-->
30900 <!--c2--><span id="b">b</span>
30905 Selser: Check for validity of DSR before using it
30908 "modes": ["selser"],
30910 [ "#a", "before", "<meta property='mw:PageProp/displaytitle' content='foo'>" ]
30914 <span id="a">a</span>
30916 {{DISPLAYTITLE:foo}}
30917 <span id="a">a</span>
30921 1. DOMDiff: Changes to <ref> content should be looked up using id
30924 "modes": ["selser"],
30926 ["#X", "after", "bar"],
30927 ["#Y", "after", "baz"]
30931 X <ref><span id="X">foo</span></ref>
30934 <ref name="a"><span id="Y">foo</span></ref>
30937 X <ref><span id="X">foo</span>bar</ref>
30940 <ref name="a"><span id="Y">foo</span>baz</ref>
30945 2. DOMDiff: Changes to <ref> content should be looked up using id
30948 "modes": ["selser"],
30950 ["#Z", "after", "bar"]
30954 A <ref>foo bar for a</ref>
30955 B <ref group="X" name="b" />
30959 <references group="X">
30960 <ref name="b"><span id="Z">foo</span></ref>
30963 A <ref>foo bar for a</ref>
30964 B <ref group="X" name="b" />
30968 <references group="X">
30969 <ref name="b"><span id="Z">foo</span>bar</ref>
30974 DOMDiff: Edits to content nested in elements with templated attributes should not be lost (T139388)
30977 "modes": ["selser"],
30979 [ "div:first-child", "text", "bar" ]
30983 <div style="{{1x|color:red;}}%">foo</div>
30985 <div style="{{1x|color:red;}}%">bar</div>
30997 <li class="mw-empty-elt"></li>
30998 <li class="mw-empty-elt"></li>
31005 [[File:Thumb.png|thumb]]
31007 <div class="thumb tright"><div class="thumbinner" style="width:137px;"><a href="/wiki/File:Thumb.png" class="image"><img alt="Thumb.png" src="http://example.com/images/e/ea/Thumb.png" width="135" height="135" class="thumbimage" /></a> <div class="thumbcaption"><div class="magnify"><a href="/wiki/File:Thumb.png" class="internal" title="Enlarge"></a></div></div></div></div>
31009 <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>
31013 unclosed internal link XSS (T137264)
31015 [[#%3Cscript%3Ealert(1)%3C/script%3E|
31017 <p>[[#<script>alert(1)</script>|
31020 <p>[[#%3Cscript%3Ealert(1)%3C/script%3E|</p>
31024 Validating that <style> isn't eaten by tidy (T167349)
31029 <style>.foo::before { content: "<foo>"; }</style>
31030 <style data-mw-foobar="baz">.foo::after { content: "<bar>"; }</style>
31034 <style>.foo::before { content: "<foo>"; }</style>
31035 <style data-mw-foobar="baz">.foo::after { content: "<bar>"; }</style>
31040 Validating that <style> isn't wrapped in a paragraph (T186965)
31044 A style tag, by itself or with other style/link tags, shouldn't be wrapped in a paragraph
31046 <style>.foo::before { content: "<foo>"; }</style>
31048 <style>.foo::before { content: "<foo>"; }</style> <link rel="foo" href="bar"/><style>.foo::before { content: "<foo>"; }</style>
31050 But if it's on a line with other content, let it be wrapped.
31052 <style>.foo::before { content: "<foo>"; }</style> bar
31054 foo <style>.foo::before { content: "<foo>"; }</style>
31056 foo <style>.foo::before { content: "<foo>"; }</style> bar
31058 And the same if we have non-paragraph-breaking whitespace
31061 <style>.foo::before { content: "<foo>"; }</style>
31064 <p>A style tag, by itself or with other style/link tags, shouldn't be wrapped in a paragraph
31066 <style>.foo::before { content: "<foo>"; }</style>
31067 <style>.foo::before { content: "<foo>"; }</style> <link rel="foo" href="bar"/><style>.foo::before { content: "<foo>"; }</style>
31068 <p>But if it's on a line with other content, let it be wrapped.
31069 </p><p><style>.foo::before { content: "<foo>"; }</style> bar
31070 </p><p>foo <style>.foo::before { content: "<foo>"; }</style>
31071 </p><p>foo <style>.foo::before { content: "<foo>"; }</style> bar
31072 </p><p>And the same if we have non-paragraph-breaking whitespace
31074 <style>.foo::before { content: "<foo>"; }</style>
31080 Validating that <link> isn't wrapped in a paragraph (T186965)
31084 A link tag, by itself or with other style/link tags, shouldn't be wrapped in a paragraph
31086 <link rel="foo" href="bar"/>
31088 <link rel="foo" href="bar"/> <style>.foo::before { content: "<foo>"; }</style><link rel="foo" href="bar"/>
31090 But if it's on a line with other content, let it be wrapped.
31092 <link rel="foo" href="bar"/> bar
31094 foo <link rel="foo" href="bar"/>
31096 foo <link rel="foo" href="bar"/> bar
31098 And the same if we have non-paragraph-breaking whitespace
31101 <link rel="foo" href="bar"/>
31104 <p>A link tag, by itself or with other style/link tags, shouldn't be wrapped in a paragraph
31106 <link rel="foo" href="bar"/>
31107 <link rel="foo" href="bar"/> <style>.foo::before { content: "<foo>"; }</style><link rel="foo" href="bar"/>
31108 <p>But if it's on a line with other content, let it be wrapped.
31109 </p><p><link rel="foo" href="bar"/> bar
31110 </p><p>foo <link rel="foo" href="bar"/>
31111 </p><p>foo <link rel="foo" href="bar"/> bar
31112 </p><p>And the same if we have non-paragraph-breaking whitespace
31114 <link rel="foo" href="bar"/>
31120 Decoding of HTML entities in headings and links for IDs and link fragments (T103714)
31122 wgFragmentMode=[ 'html5', 'legacy' ]
31124 ==A&B&C&amp;D&amp;amp;E==
31125 [[#A&B&C&amp;D&amp;amp;E]]
31127 <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>
31128 <p><a href="#A&B&C&amp;D&amp;amp;E">#A&B&C&amp;D&amp;amp;E</a>
31131 <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>
31132 <p><a rel="mw:WikiLink" href="./Main_Page#A&B&C&amp;D&amp;amp;E" data-parsoid='{"stx":"simple","a":{"href":"./Main_Page#A&B&C&amp;D&amp;amp;E"},"sa":{"href":"#A&B&amp;C&amp;amp;D&amp;amp;amp;E"}}'>#A&B&C&amp;D&amp;amp;E</a></p>
31136 Decoding of HTML entities in headings and links for IDs and link fragments (T103714) (legacy)
31138 wgFragmentMode=[ 'legacy' ]
31140 ==A&B&C&amp;D&amp;amp;E==
31141 [[#A&B&C&amp;D&amp;amp;E]]
31143 <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>
31144 <p><a href="#A.26B.26C.26amp.3BD.26amp.3Bamp.3BE">#A&B&C&amp;D&amp;amp;E</a>
31149 Decoding of HTML entities in embedded HTML tags
31151 <table class="1&2&3&amp;4&amp;amp;5"><tr><td>x</td></tr></table>
31153 <table class="1&2&3&amp;4&amp;amp;5"><tr><td>x</td></tr></table>
31156 <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>
31160 Decoding of HTML entities in indicator names for IDs (T104196)
31162 parsoid=wt2html,html2html
31165 <indicator name="1&2&3&amp;4&amp;amp;5">Indicator</indicator>
31167 1&2&3&4&amp;5=Indicator
31170 <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>
31173 # this version of the test strips out the ambiguity so Parsoid rts cleanly
31175 Decoding of HTML entities in indicator names for IDs (unambiguous) (T104196)
31179 <indicator name="1&2&3&amp;4&amp;amp;5">Indicator</indicator>
31181 1&2&3&4&amp;5=Indicator
31184 <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>
31187 # This fragment mode is what Parsoid supports.
31189 HTML5 ids: fallback to legacy
31191 wgFragmentMode=[ 'html5', 'legacy' ]
31203 ==Hey < # " > % : '==
31204 [[#Foo bar]] [[#foo Bar]] [[#Тест]] [[#тест]] [[#Hey < # " > % : ']]
31206 {{anchorencode:💩}} <span id="{{anchorencode:💩}}"></span>
31208 <!-- These two links should produce identical HTML -->
31209 [[#啤酒]] [[#%E5%95%A4%E9%85%92]]
31212 <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>
31214 <li class="toclevel-1 tocsection-1"><a href="#Foo_bar"><span class="tocnumber">1</span> <span class="toctext">Foo bar</span></a></li>
31215 <li class="toclevel-1 tocsection-2"><a href="#foo_Bar_2"><span class="tocnumber">2</span> <span class="toctext">foo Bar</span></a></li>
31216 <li class="toclevel-1 tocsection-3"><a href="#Тест"><span class="tocnumber">3</span> <span class="toctext">Тест</span></a></li>
31217 <li class="toclevel-1 tocsection-4"><a href="#Тест_2"><span class="tocnumber">4</span> <span class="toctext">Тест</span></a></li>
31218 <li class="toclevel-1 tocsection-5"><a href="#тест"><span class="tocnumber">5</span> <span class="toctext">тест</span></a></li>
31219 <li class="toclevel-1 tocsection-6"><a href="#Hey_<_#_"_>_%_:_'"><span class="tocnumber">6</span> <span class="toctext">Hey < # " > % : '</span></a></li>
31223 <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>
31224 <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>
31225 <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>
31226 <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>
31227 <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>
31228 <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>
31229 <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>
31230 </p><p>💩 <span id="💩"></span>
31231 </p><p><a href="#啤酒">#啤酒</a> <a href="#啤酒">#啤酒</a>
31234 <h2 id="Foo_bar">Foo bar</h2>
31236 <h2 id="foo_Bar_2">foo Bar</h2>
31238 <h2 id="Тест"><span id=".D0.A2.D0.B5.D1.81.D1.82" typeof="mw:FallbackId"></span>Тест</h2>
31240 <h2 id="Тест_2"><span id=".D0.A2.D0.B5.D1.81.D1.82_2" typeof="mw:FallbackId"></span>Тест</h2>
31242 <h2 id="тест"><span id=".D1.82.D0.B5.D1.81.D1.82" typeof="mw:FallbackId"></span>тест</h2>
31244 <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>
31245 <p><a rel="mw:WikiLink" href="./Main_Page#Foo_bar">#Foo bar</a> <a rel="mw:WikiLink" href="./Main_Page#foo_Bar">#foo Bar</a> <a rel="mw:WikiLink" href="./Main_Page#Тест">#Тест</a> <a rel="mw:WikiLink" href="./Main_Page#тест">#тест</a> <a rel="mw:WikiLink" href="./Main_Page#Hey_<_#_"_>_%_:_'" data-parsoid='{"stx":"simple","a":{"href":"./Main_Page#Hey_<_#_\"_>_%_:_'"},"sa":{"href":"#Hey < # \" > % : '"}}'>#Hey < # " > % : '</a></p>
31247 <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>
31249 <!-- These two links should produce identical HTML -->
31250 <p><a rel="mw:WikiLink" href="./Main_Page#啤酒">#啤酒</a> <a rel="mw:WikiLink" href="./Main_Page#啤酒" data-parsoid='{"stx":"simple","a":{"href":"./Main_Page#啤酒"},"sa":{"href":"#%E5%95%A4%E9%85%92"}}'>#啤酒</a></p>
31253 # Parsoid doesn't support this mode
31255 HTML5 ids: legacy with a fallback to modern
31257 wgFragmentMode=[ 'legacy', 'html5' ]
31269 ==Hey < # " > % : '==
31270 [[#Foo bar]] [[#foo Bar]] [[#Тест]] [[#тест]] [[#Hey < # " > % : ']]
31272 {{anchorencode:💩}} <span id="{{anchorencode:💩}}"></span>
31274 <!-- These two links should produce identical HTML -->
31275 [[#啤酒]] [[#%E5%95%A4%E9%85%92]]
31278 <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>
31280 <li class="toclevel-1 tocsection-1"><a href="#Foo_bar"><span class="tocnumber">1</span> <span class="toctext">Foo bar</span></a></li>
31281 <li class="toclevel-1 tocsection-2"><a href="#foo_Bar_2"><span class="tocnumber">2</span> <span class="toctext">foo Bar</span></a></li>
31282 <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>
31283 <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>
31284 <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>
31285 <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>
31289 <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>
31290 <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>
31291 <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>
31292 <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>
31293 <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>
31294 <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>
31295 <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>
31296 </p><p>.F0.9F.92.A9 <span id=".F0.9F.92.A9"></span>
31297 </p><p><a href="#.E5.95.A4.E9.85.92">#啤酒</a> <a href="#.E5.95.A4.E9.85.92">#啤酒</a>
31301 # Parsoid doesn't support this mode.
31303 HTML5 ids: no legacy
31305 wgFragmentMode=[ 'html5' ]
31317 ==Hey < # " > % : '==
31318 [[#Foo bar]] [[#foo Bar]] [[#Тест]] [[#тест]] [[#Hey < # " > % : ']]
31320 {{anchorencode:💩}} <span id="{{anchorencode:💩}}"></span>
31322 <!-- These two links should produce identical HTML -->
31323 [[#啤酒]] [[#%E5%95%A4%E9%85%92]]
31326 <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>
31328 <li class="toclevel-1 tocsection-1"><a href="#Foo_bar"><span class="tocnumber">1</span> <span class="toctext">Foo bar</span></a></li>
31329 <li class="toclevel-1 tocsection-2"><a href="#foo_Bar_2"><span class="tocnumber">2</span> <span class="toctext">foo Bar</span></a></li>
31330 <li class="toclevel-1 tocsection-3"><a href="#Тест"><span class="tocnumber">3</span> <span class="toctext">Тест</span></a></li>
31331 <li class="toclevel-1 tocsection-4"><a href="#Тест_2"><span class="tocnumber">4</span> <span class="toctext">Тест</span></a></li>
31332 <li class="toclevel-1 tocsection-5"><a href="#тест"><span class="tocnumber">5</span> <span class="toctext">тест</span></a></li>
31333 <li class="toclevel-1 tocsection-6"><a href="#Hey_<_#_"_>_%_:_'"><span class="tocnumber">6</span> <span class="toctext">Hey < # " > % : '</span></a></li>
31337 <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>
31338 <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>
31339 <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>
31340 <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>
31341 <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>
31342 <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>
31343 <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>
31344 </p><p>💩 <span id="💩"></span>
31345 </p><p><a href="#啤酒">#啤酒</a> <a href="#啤酒">#啤酒</a>
31350 T90902: Normalize weird characters in section IDs
31352 wgFragmentMode=[ 'html5', 'legacy' ]
31358 <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>
31359 <p><a href="#Foo_bar">#Foo bar</a>
31362 <h2 id="Foo_bar"> Foo<span typeof="mw:Entity" data-parsoid='{"src":"&nbsp;","srcContent":" "}'> </span>bar </h2>
31363 <p><a rel="mw:WikiLink" href="./Main_Page#Foo_bar" data-parsoid='{"stx":"simple","a":{"href":"./Main_Page#Foo_bar"},"sa":{"href":"#Foo&nbsp;bar"}}'>#Foo bar</a></p>
31367 T51672: Test for brackets in attributes of elements in external link texts
31369 [http://example.com/ link <span title="title with [brackets]">span</span>]
31370 [http://example.com/ link <span title="title with [brackets]">span</span>]
31373 <p><a rel="nofollow" class="external text" href="http://example.com/">link <span title="title with [brackets]">span</span></a>
31374 <a rel="nofollow" class="external text" href="http://example.com/">link <span title="title with [brackets]">span</span></a>
31377 <p><a rel="mw:ExtLink" class="external text" href="http://example.com/">link <span title="title with [brackets]">span</span></a>
31378 <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>
31382 T72875: Test for brackets in attributes of elements in internal link texts
31384 [[Foo|link <span title="title with [[double brackets]]">span</span>]]
31385 [[Foo|link <span title="title with [[double brackets]]">span</span>]]
31388 <p><a href="/wiki/Foo" title="Foo">link <span title="title with [[double brackets]]">span</span></a>
31389 <a href="/wiki/Foo" title="Foo">link <span title="title with [[double brackets]]">span</span></a>
31392 <p><a rel="mw:WikiLink" href="./Foo" title="Foo">link <span title="title with [[double brackets]]">span</span></a>
31393 <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>
31397 T199926: html arrow wt: Parsoid sometimes trips up on verticalbar chars in hrefs
31400 "modes": ["html2wt"]
31403 <a href="https://stats.wikimedia.org/v2/#/fr.wikipedia.org/reading/page-views-by-country/normal|map|2-Year~2016060100~2018071100|~total">9</a>
31404 <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>
31406 [https://stats.wikimedia.org/v2/#/fr.wikipedia.org/reading/page-views-by-country/normal|map|2-Year~2016060100~2018071100|~total 9]
31407 [[stats:v2/#/fr.wikipedia.org/reading/page-views-by-country/normal%7Cmap%7C2-Year~2016060100~2018071100%7C~total|10]]
31411 T179544: {{anchorencode:}} output should be always usable in links
31413 wgFragmentMode=[ 'html5' ]
31415 <span id="{{anchorencode:[foo]}}"></span>[[#{{anchorencode:[foo]}}]]
31417 <p><span id="[foo]"></span><a href="#[foo]">#[foo]</a>
31420 <p><span id="[foo]" about="#mwt3" typeof="mw:ExpandedAttrs" data-parsoid='{"stx":"html","a":{"id":"[foo]"},"sa":{"id":"{{anchorencode:[foo]}}"}}' data-mw='{"attribs":[[{"txt":"id"},{"html":"<span typeof=\"mw:Transclusion mw:Entity\" about=\"#mwt1\" data-parsoid='{\"srcContent\":\"[\",\"dsr\":[10,32,null,null],\"pi\":[[]]}' data-mw='{\"parts\":[{\"template\":{\"target\":{\"wt\":\"anchorencode:[foo]\",\"function\":\"anchorencode\"},\"params\":{},\"i\":0}}]}'>[</span><span about=\"#mwt1\" data-parsoid=\"{}\">foo</span><span typeof=\"mw:Entity\" about=\"#mwt1\" data-parsoid='{\"src\":\"&amp;#x5D;\",\"srcContent\":\"]\"}'>]</span>"}]]}'></span><a typeof="mw:ExpandedAttrs" about="#mwt4" rel="mw:WikiLink" href="./Main_Page#[foo]" data-parsoid='{"stx":"simple","a":{"href":"./Main_Page#[foo]"},"sa":{"href":"#{{anchorencode:[foo]}}"}}' data-mw='{"attribs":[[{"txt":"href"},{"html":"#<span typeof=\"mw:Transclusion mw:Entity\" about=\"#mwt2\" data-parsoid='{\"srcContent\":\"[\",\"dsr\":[44,66,null,null],\"pi\":[[]]}' data-mw='{\"parts\":[{\"template\":{\"target\":{\"wt\":\"anchorencode:[foo]\",\"function\":\"anchorencode\"},\"params\":{},\"i\":0}}]}'>[</span><span about=\"#mwt2\" data-parsoid=\"{}\">foo</span><span typeof=\"mw:Entity\" about=\"#mwt2\" data-parsoid='{\"src\":\"&amp;#x5D;\",\"srcContent\":\"]\"}'>]</span>"}]]}'>#[foo]</a></p>
31423 ## ------------------------------
31424 ## Parsoid section-wrapping tests
31425 ## ------------------------------
31427 Section wrapping for well-nested sections (no leading content)
31430 "wrapSections": true
31451 <section data-mw-section-id="0"></section><section data-mw-section-id="1"><h1 id="1">1</h1>
31454 </section><section data-mw-section-id="2"><h1 id="2">2</h1>
31457 <section data-mw-section-id="3"><h2 id="2.1">2.1</h2>
31460 </section><section data-mw-section-id="4"><h2 id="2.2">2.2</h2>
31463 <section data-mw-section-id="5"><h3 id="2.2.1">2.2.1</h3>
31466 </section></section></section><section data-mw-section-id="6"><h1 id="3">3</h1>
31473 Section wrapping for well-nested sections (with leading content)
31476 "wrapSections": true
31481 Para 2 with a <div>nested in it</div>
31494 <section data-mw-section-id="0"><p>Para 1.</p>
31496 <p>Para 2 with a </p><div>nested in it</div>
31500 </section><section data-mw-section-id="1"><h1 id="1">1</h1>
31503 </section><section data-mw-section-id="2"><h1 id="2">2</h1>
31506 <section data-mw-section-id="3"><h2 id="2.1">2.1</h2>
31509 </section></section>
31513 Section wrapping with template-generated sections (good nesting 1)
31516 "wrapSections": true
31533 <section data-mw-section-id="0"></section><section data-mw-section-id="1"><h1 id="1">1</h1>
31536 <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">
31537 </span><p about="#mwt1">b</p>
31538 </section><section data-mw-section-id="3"><h2 id="1.2">1.2</h2>
31541 </section></section><section data-mw-section-id="4"><h1 id="2">2</h1>
31545 # In this example, the template scope is mildly expanded to incorporate the
31546 # trailing newline after the transclusion since that is part of section 1.1.1
31548 Section wrapping with template-generated sections (good nesting 2)
31551 "wrapSections": true,
31552 "modes": ["wt2html", "wt2wt"]
31567 <section data-mw-section-id="0"></section><section data-mw-section-id="1"><h1 id="1">1</h1>
31570 <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">
31571 </span><p about="#mwt1">b</p><span about="#mwt1">
31572 </span><section data-mw-section-id="-1" about="#mwt1"><h3 about="#mwt1" id="1.1.1">1.1.1</h3><span about="#mwt1">
31573 </span><p about="#mwt1">d</p><span about="#mwt1">
31574 </span></section></section></section><section data-mw-section-id="4" data-parsoid="{}"><h1 id="2">2</h1>
31578 # In this example, the template scope is mildly expanded to incorporate the
31579 # trailing newline after the transclusion since that is part of section 1.2.1
31581 Section wrapping with template-generated sections (good nesting 3)
31584 "wrapSections": true,
31585 "modes": ["wt2html", "wt2wt"]
31603 <section data-mw-section-id="0"></section><section data-mw-section-id="1" data-parsoid="{}"><h1 id="1"> 1 </h1>
31606 <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">
31607 </span><section data-mw-section-id="-1" about="#mwt1"><h2 about="#mwt1" id="1.1">1.1</h2><span about="#mwt1">
31608 </span><p about="#mwt1">b</p><span about="#mwt1">
31609 </span></section><section data-mw-section-id="-1" about="#mwt1"><h2 about="#mwt1" id="1.2">1.2</h2><span about="#mwt1">
31610 </span><p about="#mwt1">c</p><span about="#mwt1">
31611 </span><section data-mw-section-id="-1" about="#mwt1"><h3 about="#mwt1" id="1.2.1">1.2.1</h3><span about="#mwt1">
31612 </span><p about="#mwt1">d</p><span about="#mwt1">
31613 </span></section></section></section><section data-mw-section-id="5"><h1 id="2">2</h1>
31617 # Because of section-wrapping and template-wrapping interactions,
31618 # the scope of the template is expanded so that the template markup
31619 # is valid in the presence of <section> tags.
31620 # This exercises the s1 is null scenario in the wrapSections code
31622 Section wrapping with template-generated sections (bad nesting 1)
31625 "wrapSections": true
31639 <section data-mw-section-id="-1"></section><section data-mw-section-id="-2"><div data-parsoid='{"stx":"html"}'>
31642 <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"]}'>
31643 </span><section data-mw-section-id="-1" about="#mwt1"><h1 about="#mwt1" id="1">1</h1><span about="#mwt1">
31644 </span><p about="#mwt1">b
31645 </p><span about="#mwt1">
31647 </span><p about="#mwt1">c</p><span about="#mwt1">
31648 </span></section></div></section>
31651 # Because of section-wrapping and template-wrapping interactions,
31652 # the scope of the template is expanded so that the template markup
31653 # is valid in the presence of <section> tags.
31654 # This exercises the s1 is ancestor of s2 scenario in the wrapSections code
31656 Section wrapping with template-generated sections (bad nesting 2)
31659 "wrapSections": true
31677 <section data-mw-section-id="0"></section><section data-mw-section-id="1"><h1 id="1">1</h1>
31680 </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">
31681 </span><p about="#mwt1">b</p><span about="#mwt1">
31682 </span><section data-mw-section-id="-1" about="#mwt1"><h2 about="#mwt1" id="2.1">2.1</h2><span about="#mwt1">
31683 </span><p about="#mwt1">c</p><span about="#mwt1">
31685 </span><p about="#mwt1">d</p><span about="#mwt1">
31687 </span></section></section><section data-mw-section-id="4"><h1 id="3">3</h1>
31691 # Because of section-wrapping and template-wrapping interactions,
31692 # additional template wrappers are added to <section> tags
31693 # so that template wrapping semantics are valid whether section
31694 # tags are retained or stripped. But, the template scope can expand
31695 # greatly when accounting for section tags.
31696 # This exercises the s1 and s2 are in different subtrees scenario
31698 Section wrapping with template-generated sections (bad nesting 3)
31701 "wrapSections": true,
31702 "modes": ["wt2html", "wt2wt"]
31720 <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>
31723 <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">
31724 </span><p about="#mwt1">b</p><span about="#mwt1">
31725 </span></section></section><section data-mw-section-id="-1" about="#mwt1"><h1 about="#mwt1" id="2">2</h1><span about="#mwt1">
31726 </span><p about="#mwt1">c</p>
31729 </section><section data-mw-section-id="4" data-parsoid="{}"><h1 id="3">3</h1>
31734 Section wrapping with uneditable lead section + div wrapping multiple sections
31737 "wrapSections": true
31742 <div style="border:1px solid red;">
31759 <section data-mw-section-id="-1"><p>foo</p>
31761 </section><section data-mw-section-id="-2"><div style="border:1px solid red;">
31762 <section data-mw-section-id="1"><h1 id="1">1</h1>
31765 <section data-mw-section-id="2"><h2 id="1.1">1.1</h2>
31768 </section></section><section data-mw-section-id="-1"><h1 id="2">2</h1>
31772 </section><section data-mw-section-id="4"><h1 id="3">3</h1>
31775 <section data-mw-section-id="5"><h2 id="3.1">3.1</h2>
31777 </section></section>
31781 Section wrapping with editable lead section + div overlapping multiple sections
31784 "wrapSections": true
31791 <div style="border:1px solid red;">
31808 <section data-mw-section-id="0"><p>foo</p>
31810 </section><section data-mw-section-id="-1"><h1 id="1">1</h1>
31812 </section><section data-mw-section-id="-2"><div style="border:1px solid red;">
31815 <section data-mw-section-id="2"><h2 id="1.1">1.1</h2>
31818 </section><section data-mw-section-id="-1"><h1 id="2">2</h1>
31823 </section><section data-mw-section-id="4"><h1 id="3">3</h1>
31826 <section data-mw-section-id="5"><h2 id="3.1">3.1</h2>
31828 </section></section>
31832 HTML header tags should not be wrapped in section tags
31835 "wrapSections": true
31848 <section data-mw-section-id="0"><p>foo</p>
31850 <h1 id="a" data-parsoid='{"stx":"html"}'>a</h1>
31852 </section><section data-mw-section-id="1"><h1 id="b">b</h1>
31854 <h1 id="c" data-parsoid='{"stx":"html"}'>c</h1>
31856 </section><section data-mw-section-id="2"><h1 id="d">d</h1></section>
31860 Lead section containing only whitespace and comments.
31863 "wrapSections": true
31867 <!-- this is a comment, presumably significant to editors -->
31874 <section data-mw-section-id="0" data-parsoid="{}">
31875 <!-- this is a comment, presumably significant to editors -->
31876 </section><section data-mw-section-id="1"><h1 id="1">1</h1>
31879 </section><section data-mw-section-id="2"><h1 id="2">2</h1>
31884 Pseudo-sections emitted by templates should have id -2
31887 "wrapSections": true
31897 <section data-mw-section-id="-1"><p>foo</p>
31898 </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}}]}'>
31899 <section data-mw-section-id="-1"><h2 id="a">a</h2>
31900 </section><section data-mw-section-id="-1"><h2 id="b">b</h2>
31901 </section></div><span about="#mwt1">
31905 ##########################################################################
31906 Tests demonstrating white-space insensitivity in input wikitext
31907 for wikitext headings, wikitext list items, and wikitext table captions,
31908 headings, and cells. HTML versions of the same should preserve whitespace.
31909 ##########################################################################
31911 Trim whitespace in wikitext headings, list items, table captions, headings, and cells
31914 "modes": ["wt2html"],
31915 "preserveIEW": true
31919 == <!--c1--> <!--c2--> Spaces <!--c3--> <!--c4--> ==
31920 == <!--c1--> <!--c2--> Tabs <!--c3--><!--c4--> ==
31921 == <!--Headings with fallback ids--> Личная жизнь ==
31922 * <!--c1--> <!--c2--> List item <!--c3--> <!--c4-->
31923 ; <!--term to define--> term : <!--term's definition--> definition
31925 |+ <!--c1--> <!--c2--> Table Caption <!--c3--> <!--c4-->
31927 ! <!--c1--> <!--c2--> Table Heading 1 <!--c3--> <!--c4--> !! Table Heading 2 <!--c5-->
31929 | <!--c1--> <!--c2--> Table Cell 1 <!--c3--> <!--c4--> || Table Cell 2 <!--c5-->
31931 | class="foo" || <!--c1--> <!--c2--> Table Cell 3 <!--c3--> <!--c4-->
31933 | <!--c1--> testing [[one|two]] <!--c2--> | <!--c3--> some content
31936 | <!--c1--> <!--c2--> Table Cell 1 <!--c3--> <!--c4--> || Table Cell 2 <!--c5-->
31939 <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>
31940 <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>
31941 <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>
31942 <ul><li>List item</li></ul>
31943 <dl><dt>term </dt>
31944 <dd>definition</dd></dl>
31946 <caption>Table Caption
31949 <th>Table Heading 1</th>
31950 <th>Table Heading 2
31953 <td>Table Cell 1</td>
31957 <td>class="foo"</td>
31961 <td>testing <a href="/index.php?title=One&action=edit&redlink=1" class="new" title="One (page does not exist)">two</a> | some content
31962 </td></tr></tbody></table>
31965 <td>Table Cell 1</td>
31967 </td></tr></tbody></table> foo</dd></dl>
31969 <meta property="mw:PageProp/notoc">
31970 <h2 id="Spaces"><!--c1--><!--c2-->Spaces<!--c3--><!--c4--></h2>
31971 <h2 id="Tabs"><!--c1--><!--c2-->Tabs<!--c3--><!--c4--></h2>
31972 <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>
31973 <ul><li><!--c1--><!--c2-->List item<!--c3--><!--c4--></li></ul>
31974 <dl><dt><!--term to define-->term </dt><dd><!--term's definition-->definition</dd></dl>
31976 <caption><!--c1--><!--c2-->Table Caption<!--c3--><!--c4--></caption>
31978 <th><!--c1--><!--c2-->Table Heading 1<!--c3--><!--c4--></th><th>Table Heading 2<!--c5--></th></tr>
31980 <td><!--c1--><!--c2-->Table Cell 1<!--c3--><!--c4--></td><td>Table Cell 2<!--c5--></td></tr>
31982 <td>class="foo"</td><td><!--c1--><!--c2-->Table Cell 3<!--c3--><!--c4--></td></tr>
31984 <td><!--c1-->testing <a rel="mw:WikiLink" href="./One" title="One">two</a> <!--c2--> | <!--c3--> some content</td></tr>
31987 <tbody><tr><td><!--c1--><!--c2-->Table Cell 1<!--c3--><!--c4--></td><td>Table Cell 2<!--c5--></td></tr>
31988 </tbody></table> foo<!--c1--></dd></dl>
31991 # Looks like <caption> is not accepted in HTML
31993 Do not trim whitespace in HTML headings, list items, table captions, headings, and cells
31996 "modes": ["wt2html"],
31997 "preserveIEW": true
32001 <h2> <!--c1--> <!--c2--> Heading <!--c3--> <!--c4--> </h2>
32002 <ul><li> <!--c1--> <!--c2--> List item <!--c3--> <!--c4--> </li></ul>
32004 <tr><th> <!--c1--> <!--c2--> Table Heading <!--c3--> <!--c4--> <th></tr>
32005 <tr><td> <!--c1--> <!--c2--> Table Cell <!--c3--> <!--c4--> <th></tr>
32008 <h2><span class="mw-headline" id="Heading"> Heading </span></h2>
32009 <ul><li> List item </li></ul>
32011 <tbody><tr><th> Table Heading </th><th></th></tr>
32012 <tr><td> Table Cell </td><th></th></tr>
32015 <meta property="mw:PageProp/notoc"/>
32016 <h2 id="Heading"> <!--c1--> <!--c2--> Heading <!--c3--> <!--c4--> </h2>
32017 <ul><li> <!--c1--> <!--c2--> List item <!--c3--> <!--c4--> </li></ul>
32019 <tbody><tr><th> <!--c1--> <!--c2--> Table Heading <!--c3--> <!--c4--> </th><th></th></tr>
32020 <tr><td> <!--c1--> <!--c2--> Table Cell <!--c3--> <!--c4--> </td><th></th></tr>
32025 Do not trim whitespace in links and quotes
32028 "modes": ["wt2html"],
32029 "preserveIEW": true
32032 foo '' <!--c1--> italic <!--c2--> '' and ''' <!--c3--> bold <!--c4--> '''
32033 [[Foo| some text ]]
32035 <p>foo <i> italic </i> and <b> bold </b>
32036 <a href="/wiki/Foo" title="Foo"> some text </a>
32039 <p>foo <i> <!--c1--> italic <!--c2--> </i> and <b> <!--c3--> bold <!--c4--> </b>
32040 <a rel="mw:WikiLink" href="./Foo" title="Foo"> some text </a></p>
32044 Remove p tags surrounding a single element in a figcaption
32048 [[File:Foobar.jpg|right|200x200px|Caption]]
32050 <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>
32054 Selser preserves lack of newline before list and allows newline after the list
32057 "modes": ["selser"],
32058 "scrubWikitext": true,
32060 [ "ul", "after", "<p>footer</p>" ]
32077 Selser does not introduce newlines between unedited paragraph preceding the list
32080 "modes": ["selser"],
32082 [ "table tbody tr td p:last-child", "empty" ]
32104 Selser does not introduce newlines between unedited paragraph following the list
32107 "modes": ["selser"],
32109 [ "table tbody tr td p:first-child", "empty" ]
32131 Remove a list item but do not insert newline above list
32134 "modes": ["selser"],
32136 [ "ul li:last-child", "remove" ]