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,
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>
677 *plain''italic''plain
678 *plain''italic''plain''italic''plain
679 *plain'''bold'''plain
680 *plain'''bold'''plain'''bold'''plain
681 *plain''italic''plain'''bold'''plain
682 *plain'''bold'''plain''italic''plain
683 *plain''italic'''bold-italic'''italic''plain
684 *plain'''bold''bold-italic''bold'''plain
685 *plain'''''bold-italic'''italic''plain
686 *plain'''''bold-italic''bold'''plain
687 *plain''italic'''bold-italic'''''plain
688 *plain'''bold''bold-italic'''''plain
689 *plain l'''italic''plain
690 *plain l''''bold''' plain
693 <li>plain<i>italic</i>plain</li>
694 <li>plain<i>italic</i>plain<i>italic</i>plain</li>
695 <li>plain<b>bold</b>plain</li>
696 <li>plain<b>bold</b>plain<b>bold</b>plain</li>
697 <li>plain<i>italic</i>plain<b>bold</b>plain</li>
698 <li>plain<b>bold</b>plain<i>italic</i>plain</li>
699 <li>plain<i>italic<b>bold-italic</b>italic</i>plain</li>
700 <li>plain<b>bold<i>bold-italic</i>bold</b>plain</li>
701 <li>plain<i><b>bold-italic</b>italic</i>plain</li>
702 <li>plain<b><i>bold-italic</i>bold</b>plain</li>
703 <li>plain<i>italic<b>bold-italic</b></i>plain</li>
704 <li>plain<b>bold<i>bold-italic</i></b>plain</li>
705 <li>plain l'<i>italic</i>plain</li>
706 <li>plain l'<b>bold</b> plain</li></ul>
709 # this example taken from the [[simple:Moon]] article (T49326)
711 Italics and possessives (1)
713 obtained by ''[[Lunar Prospector]]'''s gamma-ray spectrometer
715 <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
719 # this example taken from [[en:Flaming Pie]] (T51926)
721 Italics and possessives (2)
723 '''''Flaming Pie''''' is ... released in 1997. In ''Flaming Pie'''s liner notes
725 <p><i><b>Flaming Pie</b></i> is ... released in 1997. In <i>Flaming Pie'</i>s liner notes
729 # this example taken from [[en:Dictionary]] (T51926)
731 Italics and possessives (3)
733 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''.
735 <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>.
741 ### 2-quote opening sequence tests
744 Italics and bold: 2-quote opening sequence: (2,2)
753 Italics and bold: 2-quote opening sequence: (2,3)
762 Italics and bold: 2-quote opening sequence: (2,4)
772 # same html as previous, but wikitext adjusted to match parsoid html2wt
774 Italics and bold: 2-quote opening sequence: (2,4) w/ nowiki
776 ''foo<nowiki>''</nowiki>''
782 # The PHP parser strips the empty tags out for giggles; parsoid doesn't.
784 Italics and bold: 2-quote opening sequence: (2,5)
797 # same html as previous, but wikitext adjusted to match parsoid html2wt
799 Italics and bold: 2-quote opening sequence: (2,5+3) w/ nowiki
801 ''foo'''''<nowiki/>'''
812 ### 3-quote opening sequence tests
816 Italics and bold: 3-quote opening sequence: (3,2)
825 Italics and bold: 3-quote opening sequence: (3,3)
834 Italics and bold: 3-quote opening sequence: (3,4)
842 # The PHP parser strips the empty tags out for giggles; parsoid doesn't.
844 Italics and bold: 3-quote opening sequence: (3,5)
857 # same html as previous, but wikitext adjusted to match parsoid html2wt
859 Italics and bold: 3-quote opening sequence: (3,5+2) w/ nowiki
861 '''foo'''''<nowiki/>''
872 ### 4-quote opening sequence tests
876 Italics and bold: 4-quote opening sequence: (4,2)
886 # same html as previous, but wikitext adjusted to match parsoid html2wt
888 Italics and bold: 4-quote opening sequence: (4,2) w/ nowiki
890 <nowiki>''</nowiki>''foo''
897 Italics and bold: 4-quote opening sequence: (4,3)
906 Italics and bold: 4-quote opening sequence: (4,4)
916 # same html as previous, but wikitext adjusted to match parsoid html2wt
918 Italics and bold: 4-quote opening sequence: (4,4) w/ nowiki
926 # The PHP parser strips the empty tags out for giggles; parsoid doesn't.
928 Italics and bold: 4-quote opening sequence: (4,5)
937 <p>'<b>foo</b><i></i>
941 # same html as previous, but wikitext adjusted to match parsoid html2wt
943 Italics and bold: 4-quote opening sequence: (4,5+2) w/ nowiki
945 '<nowiki/>'''foo'''''<nowiki/>''
950 <p>'<b>foo</b><i></i>
956 ### 5-quote opening sequence tests
960 Italics and bold: 5-quote opening sequence: (5,2)
970 # same html as previous, but wikitext adjusted to match parsoid html2wt
972 Italics and bold: 5-quote opening sequence: (5,2+3)
981 Italics and bold: 5-quote opening sequence: (5,3)
991 # same html as previous, but wikitext adjusted to match parsoid html2wt
993 Italics and bold: 5-quote opening sequence: (5,3+2)
1002 Italics and bold: 5-quote opening sequence: (5,4)
1008 <p><i><b>foo'</b></i>
1013 Italics and bold: 5-quote opening sequence: (5,5)
1017 <p><i><b>foo</b></i>
1022 Italics and bold: 5-quote opening sequence: (5,6)
1026 <p><i><b>foo'</b></i>
1031 ### multiple quote sequences in a line
1035 Italics and bold: multiple quote sequences: (2,4,2)
1041 <p><i>foo'<b>bar</b></i>
1045 # same html as previous, but wikitext adjusted to match parsoid html2wt
1047 Italics and bold: multiple quote sequences: (2,4,2+3) w/ nowiki
1049 ''foo'<nowiki/>'''bar'''''
1051 <p><i>foo'<b>bar</b></i>
1056 Italics and bold: multiple quote sequences: (2,4,3)
1062 <p><i>foo'<b>bar</b></i>
1066 # same html as previous, but wikitext adjusted to match parsoid html2wt
1068 Italics and bold: multiple quote sequences: (2,4,3+2) w/ nowiki
1070 ''foo'<nowiki/>'''bar'''''
1072 <p><i>foo'<b>bar</b></i>
1077 Italics and bold: multiple quote sequences: (2,4,4)
1083 <p><i>foo'<b>bar'</b></i>
1087 # same html as previous, but wikitext adjusted to match parsoid html2wt
1089 Italics and bold: multiple quote sequences: (2,4,4+2) w/ nowiki
1091 ''foo'<nowiki/>'''bar'<nowiki/>'''''
1093 <p><i>foo'<b>bar'</b></i>
1097 # The PHP parser strips the empty tags out for giggles; parsoid doesn't.
1099 Italics and bold: multiple quote sequences: (3,4,2)
1108 <p><b>foo'</b>bar<i></i>
1112 # same html as previous, but wikitext adjusted to match parsoid html2wt
1114 Italics and bold: multiple quote sequences: (3,4,2+2) w/ nowiki
1116 '''foo''''bar''<nowiki/>''
1121 <p><b>foo'</b>bar<i></i>
1125 # The PHP parser strips the empty tags out for giggles; parsoid doesn't.
1127 Italics and bold: multiple quote sequences: (3,4,3)
1136 <p><b>foo'</b>bar<b></b>
1140 # same html as previous, but wikitext adjusted to match parsoid html2wt
1142 Italics and bold: multiple quote sequences: (3,4,3+3) w/ nowiki
1144 '''foo''''bar'''<nowiki/>'''
1149 <p><b>foo'</b>bar<b></b>
1154 ### other quote tests
1157 Italics and bold: other quote tests: (2,3,5)
1159 ''this is about '''foo's family'''''
1161 <p><i>this is about <b>foo's family</b></i>
1167 Italics and bold: other quote tests: (2,(3,3),2)
1169 ''this is about '''foo's''' family''
1171 <p><i>this is about <b>foo's</b> family</i>
1177 Italics and bold: other quote tests: (3,2,3,2)
1181 '''this is about ''foo'''s family''
1183 <p><b>this is about <i>foo</i></b><i>s family</i>
1188 # same html as previous, but wikitext adjusted to match parsoid html2wt
1190 Italics and bold: other quote tests: (3,2,3+2+2,2)
1192 '''this is about ''foo'''''<nowiki/>''s family''
1194 <p><b>this is about <i>foo</i></b><i>s family</i>
1200 Italics and bold: other quote tests: (3,2,3,3)
1202 '''this is about ''foo'''s family'''
1204 <p>'<i>this is about </i>foo<b>s family</b>
1210 Italics and bold: other quote tests: (3,(2,2),3)
1212 '''this is about ''foo's'' family'''
1214 <p><b>this is about <i>foo's</i> family</b>
1220 Italicized possessive
1222 The ''[[Main Page]]'''s talk page.
1224 <p>The <i><a href="/wiki/Main_Page" title="Main Page">Main Page</a>'</i>s talk page.
1227 <p>The <i><a rel="mw:WikiLink" href="./Main_Page" title="Main Page">Main Page</a>'</i>s talk page.</p>
1231 Quote balancing context should be restricted to td/th cells on the same wikitext line
1233 parsoid=wt2html,wt2wt
1247 </td></tr></tbody></table>
1251 Bold conversion test
1253 a b'''c ''d e'''f'' g h'''i ''j
1257 <p>a b'<i>c </i>d e<b>f<i> g h</i></b><i>i </i>j
1266 Non-html5 tags should be accepted
1268 <center>''foo''</center>
1270 <font>''foo''</font>
1271 <strike>''foo''</strike>
1274 <center><i>foo</i></center>
1275 <p><big><i>foo</i></big>
1276 <font><i>foo</i></font>
1277 <strike><i>foo</i></strike>
1283 <wbr> is valid wikitext (T54468)
1291 # <strike> is HTML4, <s> is HTML4/5.
1293 <s> or <strike> for strikethrough
1295 <strike>strike</strike>
1299 <p><strike>strike</strike>
1307 Text-level semantic html elements in wikitext
1310 <strong>text</strong>
1326 <ruby><rb>明日</rb><rp>(</rp><rt>Ashita</rt><rp> </rp><rtc>あした</rtc><rp>)</rp></ruby>
1333 <strong>text</strong>
1349 <ruby><rb>明日</rb><rp>(</rp><rt>Ashita</rt><rp> </rp><rtc>あした</rtc><rp>)</rp></ruby>
1357 # test cases taken from
1358 # https://www.w3.org/TR/html5/text-level-semantics.html#the-ruby-element
1360 Ruby markup (W3C-style)
1362 ;Mono-ruby for individual base characters
1363 :<ruby>日<rt>に</rt>本<rt>ほん</rt>語<rt>ご</rt></ruby>
1365 :<ruby>今日<rt>きょう</rt></ruby>
1367 :<ruby>法<rb>華</rb><rb>経</rb><rt>ほ</rt><rt>け</rt><rt>きょう</rt></ruby>
1369 :<ruby>東<rb>京</rb><rp>(</rp><rt>とう</rt><rt>きょう</rt><rp>)</rp></ruby>
1371 :<ruby><rb>旧</rb><rb>金</rb><rb>山</rb><rt>jiù</rt><rt>jīn</rt><rt>shān</rt><rtc>San Francisco</rtc></ruby>
1374 <rb>♥</rb><rtc><rt>Heart</rt></rtc><rtc lang="fr"><rt>Cœur</rt></rtc>
1375 <rb>☘</rb><rtc><rt>Shamrock</rt></rtc><rtc lang="fr"><rt>Trèfle</rt></rtc>
1376 <rb>✶</rb><rtc><rt>Star</rt></rtc><rtc lang="fr"><rt>Étoile</rt></rtc>
1379 <dl><dt>Mono-ruby for individual base characters</dt>
1380 <dd><ruby>日<rt>に</rt>本<rt>ほん</rt>語<rt>ご</rt></ruby></dd>
1382 <dd><ruby>今日<rt>きょう</rt></ruby></dd>
1383 <dt>Jukugo ruby</dt>
1384 <dd><ruby>法<rb>華</rb><rb>経</rb><rt>ほ</rt><rt>け</rt><rt>きょう</rt></ruby></dd>
1385 <dt>Inline ruby</dt>
1386 <dd><ruby>東<rb>京</rb><rp>(</rp><rt>とう</rt><rt>きょう</rt><rp>)</rp></ruby></dd>
1387 <dt>Double-sided ruby</dt>
1388 <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>
1390 <rb>♥</rb><rtc><rt>Heart</rt></rtc><rtc lang="fr"><rt>Cœur</rt></rtc>
1391 <rb>☘</rb><rtc><rt>Shamrock</rt></rtc><rtc lang="fr"><rt>Trèfle</rt></rtc>
1392 <rb>✶</rb><rtc><rt>Star</rt></rtc><rtc lang="fr"><rt>Étoile</rt></rtc>
1397 # The next two test different paths in the sanitizer.
1399 Non-word characters don't terminate tag names (T19663, T42670, T54022)
1401 <blockquote|>a</blockquote>
1403 <b→> doesn't terminate </b→>
1405 <bä> doesn't terminate </bä>
1407 <boo> doesn't terminate </boo>
1409 <s.foo> doesn't terminate </s.foo>
1413 <p><blockquote|>a</blockquote>
1414 </p><p><b→> doesn't terminate </b→>
1415 </p><p><bä> doesn't terminate </bä>
1416 </p><p><boo> doesn't terminate </boo>
1417 </p><p><s.foo> doesn't terminate </s.foo>
1418 </p><p><sub-ID#1>
1423 Non-word characters don't terminate tag names
1425 <blockquote|>a</blockquote>
1427 <b→> doesn't terminate </b→>
1429 <bä> doesn't terminate </bä>
1431 <boo> doesn't terminate </boo>
1433 <s.foo> doesn't terminate </s.foo>
1437 <p><blockquote|>a
1438 </p><p><b→> doesn't terminate </b→>
1439 </p><p><bä> doesn't terminate </bä>
1440 </p><p><boo> doesn't terminate </boo>
1441 </p><p><s.foo> doesn't terminate </s.foo>
1442 </p><p><sub-ID#1>
1447 ### See tests/parser/ParserTestParserHook.php for the <tåg> extension)
1448 ### This checks that HTML5 tags (with non-word characters in the tag
1449 ### name) make it safely through the parser -- the Sanitizer will
1450 ### munge them later, as it should.
1453 Non-word characters are valid in extension tags (T19663)
1464 <pre typeof="mw:Extension/tåg" data-mw='{"name":"tåg","attrs":{},"body":{"extsrc":"tåg"}}' data-parsoid='{}' about="#mwt2"></pre>
1468 Isolated close tags should be treated as literal text (T54760)
1476 <p class="mw-empty-elt">
1477 </p><p><s.foo>s
1482 ### Special characters
1486 Bare pipe character (T54363)
1495 Bare pipe character from a template (T54363)
1504 ### <nowiki> test cases
1508 <nowiki> unordered list
1510 <nowiki>* This is not an unordered list item.</nowiki>
1512 <p>* This is not an unordered list item.
1515 <p><span typeof="mw:Nowiki">* This is not an unordered list item.</span></p>
1521 <nowiki>Lorem ipsum dolor
1529 <p>Lorem ipsum dolor
1538 <p><span typeof="mw:Nowiki">Lorem ipsum dolor
1548 Don't parse <nowiki><span class="error"></nowiki> (T149622)
1550 <nowiki><span class="error"></nowiki>
1552 <p><span class="error">
1555 <p><span typeof="mw:Nowiki"><span class="error"></span></p>
1561 :There is not nowiki.
1562 :There is <nowiki>nowiki</nowiki>.
1564 #There is not nowiki.
1565 #There is <nowiki>nowiki</nowiki>.
1567 *There is not nowiki.
1568 *There is <nowiki>nowiki</nowiki>.
1570 <dl><dd>There is not nowiki.</dd>
1571 <dd>There is nowiki.</dd></dl>
1572 <ol><li>There is not nowiki.</li>
1573 <li>There is nowiki.</li></ol>
1574 <ul><li>There is not nowiki.</li>
1575 <li>There is nowiki.</li></ul>
1577 <dl><dd data-parsoid='{}'>There is not nowiki.</dd>
1578 <dd data-parsoid='{}'>There is <span typeof="mw:Nowiki">nowiki</span>.</dd></dl>
1580 <ol><li data-parsoid='{}'>There is not nowiki.</li>
1581 <li data-parsoid='{}'>There is <span typeof="mw:Nowiki">nowiki</span>.</li></ol>
1583 <ul><li data-parsoid='{}'>There is not nowiki.</li>
1584 <li data-parsoid='{}'>There is <span typeof="mw:Nowiki">nowiki</span>.</li></ul>
1588 Entities inside <nowiki>
1590 <nowiki><</nowiki>
1595 <p><span typeof="mw:Nowiki"><span typeof="mw:Entity" data-parsoid='{"src":"&lt;","srcContent":"<"}'><</span></span></p>
1599 Entities inside template parameters
1606 <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>
1610 Properly escape nowiki when combined with other wiki markup
1614 <p>* </nowiki> tag</p>
1616 <nowiki>*</nowiki> <nowiki></nowiki></nowiki> tag
1620 T93824: Put escaped HTML tags inside nowiki
1624 <p><h2>foo</h2></p>
1626 <nowiki><h2>foo</h2></nowiki>
1630 T71950: 1. Put nowiki as close to cause as possible, even with non-quote escapable chars
1634 <p>This text: L'<a rel="mw:WikiLink" href="./Foo">Foo</a>
1635 This text: L''<a rel="mw:WikiLink" href="./Foo">Foo</a>
1636 This text: L'''<a rel="mw:WikiLink" href="./Foo">Foo</a>''</p>
1638 This text: L'[[Foo]]
1639 This text: L<nowiki>''</nowiki>[[Foo]]
1640 This text: L<nowiki>'''</nowiki>[[Foo]]<nowiki>''</nowiki>
1643 # This test fails because wikitext whitespace is not normalized before comparing.
1645 T71950: 2. Put nowiki as close to cause as possible, after ' :'
1649 <p>This text : L''<a rel="mw:WikiLink" href="./Foo">Foo</a>
1652 This text : L<nowiki>''</nowiki>[[Foo]]
1655 # This test and the next one are html2wt only as they test that incorrect wikitext
1656 # passed in template arguments gets escaped or wrapped in nowikis where required.
1658 T71482: Use {{!}} instead of nowiki for single pipe in template argument
1662 <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>
1663 <span typeof="mw:Transclusion" data-mw="{"parts":[{"template":{"target":{"wt":"echo","href":"./Template:Echo"},"params":{"1":{"wt":"foo|bar |[["}},"i":0}}]}" about="#mwt2"></p>
1665 {{echo|foo{{!}}bar}}
1666 {{echo|<nowiki>foo|bar |[[</nowiki>}}
1670 T53961: Output correct nowikis in template arguments
1674 <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>
1675 <span typeof="mw:Transclusion" data-mw="{"parts":[{"template":{"target":{"wt":"echo","href":"./Template:Echo"},"params":{"1":{"wt":"a }} b"}},"i":0}}]}" about="#mwt2"></span>
1676 <span typeof="mw:Transclusion" data-mw="{"parts":[{"template":{"target":{"wt":"echo","href":"./Template:Echo"},"params":{"1":{"wt":"a [[ b"}},"i":0}}]}" about="#mwt3"></span>
1677 <span typeof="mw:Transclusion" data-mw="{"parts":[{"template":{"target":{"wt":"echo","href":"./Template:Echo"},"params":{"1":{"wt":"a | {{ ]]"}},"i":0}}]}" about="#mwt4"></span>
1678 <span typeof="mw:Transclusion" data-mw="{"parts":[{"template":{"target":{"wt":"echo","href":"./Template:Echo"},"params":{"1":{"wt":"a }"}},"i":0}}]}" about="#mwt5"></span></p>
1681 {{echo|<nowiki>a }} b</nowiki>}}
1682 {{echo|<nowiki>a [[ b</nowiki>}}
1683 {{echo|<nowiki>a | {{ ]]</nowiki>}}
1684 {{echo|a <nowiki>}</nowiki>}}
1688 Cases where "!!" needs nowiki protection
1693 <tr><th>this needs protection !! here</th></tr>
1697 <tr><th>this does not need
1698 protection !! here</th></tr>
1702 !<nowiki>this needs protection !! here</nowiki>
1715 Comments and Indent-Pre
1717 <!-- comment 1 --> asdf
1719 <!-- comment 1 --> asdf
1722 <!-- comment 1 --> asdf
1723 <!-- comment 2 -->xyz
1725 <!-- comment 1 --> asdf
1726 <!-- comment 2 --> xyz
1782 asdf<!-- comment 1 -->jkl
1792 <!-- foo --> b <!-- bar -->
1806 <!-- returns a single newline, not nothing, since the newline after > is not stripped -->
1812 Comment semantics and delimiters
1814 <!-- --><!----><!-----><!------>
1818 <!-- --><!----><!-----><!------>
1822 Comment semantics and delimiters, redux
1824 <!-- In SGML every "foo" here would actually show up in the text -- foo -- bar
1825 -- foo -- funky huh? ... -->
1829 <!-- In SGML every "foo" here would actually show up in the text -- foo -- bar
1830 -- foo -- funky huh? ... -->
1834 Comment semantics and delimiters: directors cut
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
1844 <!-- ... However we like to keep things simple and somewhat XML-ish so we eat
1845 everything starting with < followed by !-- until the first -- and > we see,
1846 that wouldn't be valid XML however, since in XML -- has to terminate a comment
1851 Comment semantics: nesting
1853 <!--<!-- no, we're not going to do anything fancy here -->-->
1858 <!--<!-- no, we're not going to do anything fancy here --><p>--></p>
1861 # Parsoid closes the unclosed comment, even if it means a slight
1864 Comment semantics: unclosed comment at end
1866 parsoid=wt2html,html2html
1868 <!--This comment will run out to the end of the document
1872 <!--This comment will run out to the end of the document-->
1876 Comment semantics: normalize comments to play nice with XML and browsers
1878 <!-- Browsers --!> think this is closed -->
1879 <!--> This would normally be text -->
1880 <!---> As would this -->
1881 <!-- XML doesn't like trailing dashes -------->
1882 <!-- Nor doubled hyphens -- anywhere in the data -->
1883 But this is not a comment.
1885 <p>But this is not a comment.
1888 <!-- Browsers --!> think this is closed -->
1889 <!--> This would normally be text -->
1890 <!---> As would this -->
1891 <!-- XML doesn't like trailing dashes -------->
1892 <!-- Nor doubled hyphens -- anywhere in the data -->
1893 <p>But this is not a comment.</p>
1897 Comment semantics: round-trip even text which contains encoded -->
1899 <!-- hello & goodbye - > --> --&gt; --&xx -->
1901 <!-- hello & goodbye - > --> --&gt; --&xx -->
1905 Comment in template title
1914 Comment on its own line post-expand
1926 Comment on its own line post-expand with non-significant whitespace
1938 post-expand include size being exceeded
1942 {{echo3|1234567890}}
1944 <p><a href="/wiki/Template:Echo3" title="Template:Echo3">Template:Echo3</a><!-- WARNING: template omitted, post-expand include size too large -->
1949 max template depth being reached
1953 {{echo with depth|too deep!}}
1955 <p><span class="error">Template recursion depth limit exceeded (1)</span>
1960 multiple templates that are redirects
1971 Multiple comments should still parse as SOL-transparent
1973 parsoid=wt2html,wt2wt
1976 <!--c2--><!--c3--><!--c4-->*b
1984 <!--c2--><!--c3--><!--c4-->
1990 ## Make sure ">" gets escaped in comments to avoid XSS
1992 IE conditional comments
1995 <script>alert('hi');</script>
1998 <!--[if lt IE 9]>
1999 <script>alert('hi');</script>
2004 ### paragraph wrapping tests
2020 Block tag on one line (<div>)
2030 <p>a </p><div>foo</div>
2036 No p-wrappable content
2038 parsoid=wt2html,html2html
2040 <span><div>x</div></span>
2041 <span><s><div>x</div></s></span>
2042 <small><em></em></small><span><s><div>x</div></s></span>
2044 <span><div>x</div></span>
2045 <span><s><div>x</div></s></span>
2046 <p><small><em></em></small></p><span><s><div>x</div></s></span>
2049 # T177612: Parsoid-only test
2051 Transclusion meta tags shouldn't trip Parsoid's useless p-wrapper stripping code
2053 {{echo|<span><div>x</div></span>}}
2056 <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>
2061 Block tag on one line (<blockquote>)
2063 a <blockquote>foo</blockquote>
2067 a <blockquote>foo</blockquote>
2071 <p>a </p><blockquote><p>foo</p></blockquote>
2077 Block tag on both lines (<div>)
2087 <p>a </p><div>foo</div><p>
2088 b </p><div>foo</div>
2092 Block tag on both lines (<blockquote>)
2094 a <blockquote>foo</blockquote>
2096 b <blockquote>foo</blockquote>
2098 a <blockquote>foo</blockquote>
2099 b <blockquote>foo</blockquote>
2102 <p>a </p><blockquote><p>foo</p></blockquote><p>
2103 b </p><blockquote><p>foo</p></blockquote>
2107 Multiple lines without block tags
2128 x </p><div>foo</div><p> z
2133 Empty lines between lines with block tags
2168 </p><div>b</div><p>d
2173 <div data-parsoid='{"stx":"html"}'></div>
2176 <div data-parsoid='{"stx":"html"}'></div><p>a</p>
2179 <div data-parsoid='{"stx":"html"}'>a</div><p>b</p>
2181 <div data-parsoid='{"stx":"html"}'>b</div><p>d</p>
2184 <div data-parsoid='{"stx":"html"}'>e</div>
2188 Unclosed HTML p-tags should be handled properly
2195 <div><p>foo</p></div>
2200 <div data-parsoid='{"stx":"html"}'><p data-parsoid='{"stx":"html", "autoInsertedEnd":true}'>foo</p></div>
2205 ## SSS FIXME: I can come up with other scenarios where this doesn't work because
2206 ## of eager output of buffered tokens in the p-wrapper. But, I'm going to ignore
2209 1. P-wrapping should leave sol-transparent tags outside p-tags where possible
2213 a [[Category:A1]] [[Category:A2]]
2218 <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"/>
2222 2. P-wrapping should leave sol-transparent tags outside p-tags where possible
2228 <link rel="mw:PageProp/Category" href="./Category:A1"/><p>a</p>
2232 No paragraph necessary for SOL transparent template
2234 <span><div>foo</div></span>
2237 <span><div>foo</div></span>
2238 {{echo|[[Category:Foo]]}}
2240 <span><div>foo</div></span>
2241 <span><div>foo</div></span>
2244 <span data-parsoid='{"stx":"html"}'><div data-parsoid='{"stx":"html"}'>foo</div></span>
2245 <link rel="mw:PageProp/Category" href="./Category:Foo"/>
2247 <span data-parsoid='{"stx":"html"}'><div data-parsoid='{"stx":"html"}'>foo</div></span>
2248 <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}}]}'/>
2252 Avoid expanding multiline sol transparent template ranges unnecessarily
2270 <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">
2273 <link rel="mw:PageProp/Category" href="./Category:Ho" />
2277 Paragraph wrapping following unclosed table
2279 parsoid=wt2html,html2html
2300 </td></tr></tbody></table>
2306 <table data-parsoid='{"autoInsertedEnd":true}'>
2307 <tbody><tr class="mw-empty-elt" data-parsoid='{"startTagSrc":"|-"}'></tr>
2309 </tbody></table><table>
2310 <tbody><tr data-parsoid='{"autoInsertedStart":true}'><td>x</td></tr>
2321 Paragraph wrapping suppressed in html p
2323 parsoid=wt2html,html2html
2343 <p data-parsoid='{"stx":"html"}'>
2354 Dangling table row doesn't prevent p-wrapping
2356 parsoid=wt2html,html2html
2364 <tbody><tr><td>hi</td></tr>
2365 <tr class="mw-empty-elt"></tr>
2366 </tbody></table><p> ho</p>
2370 P-wrapping non-breaking spaces
2381 ### Preformatted text
2391 And a [[Main Page|link]]
2397 And a <a href="/wiki/Main_Page" title="Main Page">link</a>
2402 Tabs don't trigger preformatted text
2406 This is preformatted text.
2412 <pre>This is preformatted text.
2417 preformatted text.</p>
2418 <pre>This is preformatted text.
2423 Space before tab needs nowiki pre protection
2429 <nowiki> </nowiki> a
2433 Ident preformatting with inline content
2444 <pre> with <nowiki> inside (compatibility with 1.6 and earlier)
2461 Regression with preformatted in <center>
2475 T54763: Preformatted in <blockquote>
2481 indented cell (no pre-wrapping!)
2491 <p> indented cell (no pre-wrapping!)
2499 T53086: Double newlines in blockquotes should be turned into paragraphs
2516 T17491: <ins>/<del> in blockquote
2519 Foo <del>bar</del> <ins>baz</ins> quux
2523 <p>Foo <del>bar</del> <ins>baz</ins> quux
2529 <p>Foo <del>bar</del> <ins>baz</ins> quux
2535 T17491: <ins>/<del> in blockquote (2)
2537 <blockquote>Foo <del>bar</del> <ins>baz</ins> quux
2540 <blockquote>Foo <del>bar</del> <ins>baz</ins> quux
2544 <blockquote><p>Foo <del>bar</del> <ins>baz</ins> quux
2549 <pre> with attributes (T5202)
2551 <pre style="background: blue; color:white">Bluescreen of WikiDeath</pre>
2553 <pre style="background: blue; color:white">Bluescreen of WikiDeath</pre>
2558 <pre> with width attribute (T5202)
2560 <pre width="8">Narrow screen goodies</pre>
2562 <pre width="8">Narrow screen goodies</pre>
2567 <pre> with forbidden attribute (T5202)
2569 <pre width="8" onmouseover="alert(document.cookie)">Narrow screen goodies</pre>
2571 <pre width="8">Narrow screen goodies</pre>
2576 Entities inside <pre>
2585 <pre> with forbidden attribute values (T5202)
2587 <pre width="8" style="border-width: expression(alert(document.cookie))">Narrow screen goodies</pre>
2589 <pre width="8" style="/* insecure input */">Narrow screen goodies</pre>
2594 <nowiki> inside <pre> (T15238)
2602 <pre><nowiki><nowiki></nowiki>Foo<nowiki></nowiki></nowiki></pre>
2610 <pre><nowiki>Foo</nowiki></pre>
2615 <nowiki> inside of #tag:pre
2617 {{#tag:pre|Foo <nowiki>→bar</nowiki>}}
2619 <pre>Foo →bar</pre>
2622 <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>
2625 ## Don't expect this to rt, Parsoid drops the unmatched closing pre tags that
2626 ## aren't enclosed in nowikis.
2628 <nowiki> and <pre> preference (first one wins)
2659 <pre typeof="mw:Extension/pre" about="#mwt2" data-mw='{"name":"pre","attrs":{},"body":{"extsrc":"\n<nowiki>\n"}}'><nowiki>
2664 <p><span typeof="mw:Nowiki">
2672 </pre> inside nowiki
2674 <nowiki></pre></nowiki>
2681 Empty pre; pre inside other HTML tags (T56946)
2698 <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
2700 <pre typeof="mw:Extension/pre" about="#mwt4" data-parsoid='{"stx":"html"}' data-mw='{"name":"pre","attrs":{},"body":{"extsrc":""}}'></pre>
2704 HTML pre followed by indent-pre
2717 <p><pre>foo</pre></p>
2719 <p class="mw-empty-elt"></p><pre>foo</pre><p class="mw-empty-elt"></p>
2721 <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>
2725 Templates: Indent-Pre: 1a. Templates that break a line should suppress <pre>
2733 Templates: Indent-Pre: 1b. Templates that break a line should suppress <pre>
2743 Templates: Indent-Pre: 1c: Wrapping should be based on expanded content
2755 Templates: Indent-Pre: 1d: Wrapping should be based on expanded content
2776 Templates: Indent-Pre: 1e. Wrapping should be based on expanded content
2780 {{echo| foo}}{{echo| bar}}
2785 {{echo|<!--cmt--> foo}}
2787 <!--cmt-->{{echo| foo}}
2789 {{echo|{{echo| }}bar}}
2807 Templates: Indent-Pre: 1f: Wrapping should be based on expanded content
2843 ## Hmm, should Parsoid rt this?
2845 Pres with newline attributes
2847 parsoid=wt2html,html2html
2852 <pre class="one two">hi</pre>
2855 <pre class="one two" typeof="mw:Extension/pre" about="#mwt2" data-mw='{"name":"pre","attrs":{"class":"one two"},"body":{"extsrc":"hi"}}'>hi</pre>
2859 Things that look like <pre> tags aren't treated as such
2861 Barack Obama <President> of the United States
2862 <President></President>
2864 <p>Barack Obama <President> of the United States
2865 <President></President>
2869 ## Remex doesn't account for fostered content.
2870 ## The difference between Parsoid and the PHP parser can be attributed to core
2871 ## commit 674e8388cba and 710618f89af in Parsoid's repo. Parsoid doesn't
2872 ## tokenize unmatched extension tags that shadow html tags as strings to ease
2873 ## an escaping mechanism. See the comment in `maybeExtensionTag`.
2875 Handle broken pre-like tags (T66025)
2879 {{echo|<pre <pre>x</pre>}}
2881 <table><pre </table>
2884 <table><pre </table>
2888 <pre <table></table>
2890 <pre typeof="mw:Extension/pre mw:Transclusion" about="#mwt2" data-parsoid='{"stx":"html","a":{"<pre":null},"sa":{"<pre":""},"pi":[[{"k":"1"}]]}' data-mw='{"parts":[{"template":{"target":{"wt":"echo","href":"./Template:Echo"},"params":{"1":{"wt":"<pre <pre>x</pre>"}},"i":0}}]}'>x</pre>
2892 <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>
2895 ## Similar to the above, but shows the difference between extension and html tags
2897 Less than in attribute position
2904 <div </p><div>123</div>
2906 <pre typeof="mw:Extension/pre" about="#mwt2" data-mw='{"name":"pre","attrs":{"<pre":""},"body":{"extsrc":"123"}}'>123</pre><p>
2908 <div </p><div>123</div>
2912 Parsoid: handle pre with space after attribute
2916 <pre style="width:50%;" >{{echo|foo}}</pre>
2918 <pre style="width:50%;">{{echo|foo}}</pre>
2921 <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>
2932 <pre typeof="mw:Extension/pre" about="#mwt2" data-mw='{"name":"pre","attrs":{}}'></pre>
2936 Newline before table-close generates empty table row: T208619
2944 <tbody><tr><td></td></tr></tbody></table>
2946 <table data-parsoid='{}'>
2951 # PHP has one more row in the output than Parsoid does: T208619
2953 Parsoid: Don't paragraph-wrap fosterable content even if table syntax is unbalanced
2973 </tr><tr><td></td></tr></tbody></table>
2990 #--------------------------------------------------------------------
2991 # Transclusion parameter whitespace stripping tests
2992 # Behavior is different for positional and named parameters
2993 #--------------------------------------------------------------------
2995 Templates: Strip leading and trailing whitespace from named-param values
2999 {{echo|1= {{echo|b}} }}
3016 Templates: Don't strip whitespace from positional-param values
3020 {{echo|{{echo|b}} }}
3060 Templates: Don't recognize targets split by newlines
3076 Templates: Recognize targets when newlines and comments don't split the target
3081 <!--X--> ech<!--X-->o<!--X-->
3089 <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>
3093 Templates: Handle empty comment-and-ws-only lines correctly
3096 <!--should be ignored-->
3097 <!--should be ignored as well-->
3104 <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>
3108 Templates: Handle comments in the target
3111 <!-- should be ignored -->
3115 <!-- should be ignored and spaces on next line should not trip us up (T147742) -->
3118 {{echo<!-- should be ignored -->
3121 {{echo<!-- should be ignored -->|foo}}
3123 {{<!-- should be ignored -->echo|foo}}
3132 <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>
3134 <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>
3136 <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>
3138 <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>
3140 <p typeof="mw:Transclusion" data-mw='{"parts":[{"template":{"target":{"wt":"echo","href":"./Template:Echo"},"params":{"1":{"wt":"foo"}},"i":0}}]}'>foo</p>
3144 Templates: Handle comments in parameter names (T69657)
3147 <!-- should be ignored -->
3151 <!-- should be ignored -->
3154 {{echo|1<!-- should be ignored -->=foo}}
3156 {{echo|<!-- should be ignored -->1=foo}}
3164 <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>
3166 <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>
3168 <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>
3170 <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>
3174 Templates: Other wikitext in parameter names (T69657)
3181 <p typeof="mw:Transclusion" data-mw='{"parts":[{"template":{"target":{"wt":"echo","href":"./Template:Echo"},"params":{"''1''":{"wt":"foo"}},"i":0}}]}'>{{{1}}}</p>
3185 Templates: With colons
3189 <p>Template with colon
3192 <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>
3195 #--------------------------------------------------------------------
3196 # Transclusion parameter escaping tests
3197 #--------------------------------------------------------------------
3200 Templates: Parsoid parameter escaping test 1
3202 {{echo|[foo]|{{echo|[bar]}}}}
3207 <p about="#mwt1" typeof="mw:Transclusion"
3208 data-mw='{"parts":[{"template":{"target":{"wt":"echo","href":"./Template:Echo"},"params":{"1":{"wt":"[foo]"},"2":{"wt":"{{echo|[bar]}}"}},"i":0}}]}'>[foo]</p>
3212 Parsoid: Pipes in external links in template parameter
3214 {{echo|[{{echo|http://example.com}} link]}}
3216 <p><a rel="nofollow" class="external text" href="http://example.com">link</a>
3219 <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>
3223 Parsoid: pipe in transclusion parameter
3225 {{echo|http://foo.com/a|b}}
3227 <p><a rel="nofollow" class="external free" href="http://foo.com/a%7Cb">http://foo.com/a%7Cb</a>
3230 <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>
3234 Parsoid: Pipe in external link target and content in template parameter
3236 parsoid=html2wt,wt2wt
3238 {{echo|[http://foo.com/a|b a|b]}}
3240 <p><a rel="nofollow" class="external text" href="http://foo.com/a%7Cb">a|b</a>
3243 <p><a rel="mw:ExtLink" href="http://foo.com/a|b" about="#mwt1"
3244 typeof="mw:Transclusion"
3245 data-mw='{"parts":[{"template":{"target":{"wt":"echo","href":"./Template:Echo"},
3246 "params":{"1":{"wt":"[http://foo.com/a|b a|b]"}},"i":0}}]}'>a|b</a></p>
3250 Parsoid: Pipe in template with nested template in external link target in template parameter (seriously)
3252 {{echo|[{{fullurl:{{FULLPAGENAME}}|action=edit}} bar]}}
3254 <p><a rel="nofollow" class="external text" href="http://example.org/index.php?title=Parser_test&action=edit">bar</a>
3257 <p><a rel="mw:ExtLink" class="external text" href="http://example.org/index.php?title=Parser_test&action=edit" typeof="mw:Transclusion" data-mw='{"parts":[{"template":{"target":{"wt":"echo","href":"./Template:Echo"},"params":{"1":{"wt":"[{{fullurl:{{FULLPAGENAME}}|action=edit}} bar]"}},"i":0}}]}'>bar</a></p>
3261 Templates: Don't escape already nowiki-escaped text in template parameters
3263 parsoid=html2wt,wt2wt
3265 {{echo|foo<nowiki>|</nowiki>bar}}
3266 {{echo|<nowiki><div></nowiki>}}
3267 {{echo|<nowiki></nowiki>}}
3274 <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>
3275 <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>
3276 <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>
3282 Templates: '=' char in nested transclusions should not trigger nowiki escapes or conversion to named param
3284 parsoid=html2wt,wt2wt
3286 {{echo|{{echo|1=bar}}}}
3291 <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>
3296 Templates parameters with special tokenizing behavior dont get modified because of arg escaping
3303 <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>
3308 Templates: Preserve blank parameter names
3315 <p about="#mwt1" typeof="mw:Transclusion" data-mw='{"parts":[{"template":{"target":{"wt":"echo","href":"./Template:Echo"},"params":{"":{"wt":"foo"}},"i":0}}]}'>{{{1}}}</p>
3319 Templates: Preserve blank parameter names in other positions
3321 {{blank_param|bar|=foo}}
3327 <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
3332 ### Parsoid-centric tests for testing RT edge cases for pre
3336 1a. Indent-Pre and Comments
3349 1b. Indent-Pre and Comments
3362 1c. Indent-Pre and Comments
3375 1d. Indent-Pre and Comments
3376 (Pre-handler currently cannot distinguish between comment/ws order and normalizes them to [comment,ws] order)
3389 2a. Indent-Pre and tables
3410 2b. Indent-Pre and tables
3426 2c. Indent-Pre and tables (T44252)
3443 2d. Indent-Pre and tables
3460 <tbody><tr><td> b</td></tr>
3465 2e. Indent-Pre and table-line syntax
3478 2f. Indent-pre started by table-line syntax
3497 2g. Indented table markup mixed with indented pre content (proposed in T8200)
3502 Text that should be rendered preformatted
3510 <pre>Text that should be rendered preformatted
3519 2h. Indent pre in tables
3521 parsoid=wt2html,html2html
3564 </td><td data-parsoid='{"startTagSrc":"{{!}}"}'>
3566 </td></tr></tbody></table>
3570 3a. Indent-Pre and block tags (single-line html)
3574 c <blockquote> foo </blockquote>
3579 c <blockquote> foo </blockquote>
3580 <pre><span> foo </span>
3583 <p> a </p><p> foo </p><p>
3584 b </p><div> foo </div><p>
3585 c </p><blockquote><p> foo </p></blockquote>
3586 <pre><span> foo </span>
3589 <p> a </p><p data-parsoid='{"stx":"html"}'> foo </p><p>
3590 b </p><div data-parsoid='{"stx":"html"}'> foo </div><p>
3591 c </p><blockquote data-parsoid='{"stx":"html"}'><p> foo </p></blockquote>
3592 <pre><span data-parsoid='{"stx":"html"}'> foo </span></pre>
3596 3b. Indent-Pre and block tags (multi-line html)
3599 <!-- comment --> b <div> foo </div>
3601 <pre>a <span>foo</span>
3606 <pre>a <span data-parsoid='{"stx":"html"}'>foo</span></pre>
3607 <!-- comment --> <p>b </p><div data-parsoid='{"stx":"html"}'> foo </div>
3609 <pre>a <span>foo</span>
3611 b </p><div> foo </div>
3615 3c. Indent-Pre and block tags (pre-content on separate line)
3677 <p data-parsoid='{"stx":"html"}'>
3694 <pre typeof="mw:Extension/pre" about="#mwt3" data-mw='{"name":"pre","attrs":{},"body":{"extsrc":"\nfoo\n"}}'>foo
3698 <table data-parsoid='{"stx":"html"}'><tbody><tr data-parsoid='{"stx":"html"}'><td data-parsoid='{"stx":"html"}'>
3700 </td></tr></tbody></table>
3702 <ul data-parsoid='{"stx":"html"}'><li data-parsoid='{"stx":"html"}'>
3708 4. Indent-Pre and extension tags
3710 parsoid=wt2html,html2html
3719 <p> a </p><pre typeof="mw:Extension/tag" about="#mwt2" data-mw='{"name":"tag","attrs":{}}'></pre>
3723 5. Indent-Pre and html pre
3725 <pre class="123">hi</pre>
3727 <pre class="123">hi</pre>
3730 <pre class="123" typeof="mw:Extension/pre" about="#mwt2" data-mw='{"name":"pre","attrs":{"class":"123"},"body":{"extsrc":"hi"}}'>hi</pre>
3734 Render paragraphs when indent-pre is suppressed in blocklevels
3751 4. Multiple spaces at start-of-line
3769 ## NOTE: the leading white-space chars on empty line are significant
3771 5a. White-space in indent-pre
3783 ## NOTE: the leading white-space chars on empty line are significant
3785 5b. White-space in indent-pre
3804 5c. White-space in indent-pre
3817 6. Pre-blocks should extend across lines with leading WS even when there is no wrappable content
3840 7a. Indent-pre and category links
3842 parsoid=wt2html,wt2wt
3844 [[Category:foo]] <!-- No pre-wrapping -->
3845 {{echo| [[Category:foo]]}} <!-- No pre-wrapping -->
3848 <link rel="mw:PageProp/Category" href="./Category:Foo"> <!-- No pre-wrapping -->
3849 <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 -->
3852 ## We used to, but no longer wt2wt this test since the default serializer
3853 ## will normalize all categories to serialize on their own line.
3854 ## This wikitext usage is going to be fairly uncommon in production and
3855 ## selser will take care of preserving formatting in those scenarios.
3857 7b. Indent-pre and category links
3862 [[Category:foo]] {{echo|b}}
3864 <pre><link rel="mw:PageProp/Category" href="./Category:Foo"> a
3865 <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>
3869 Indent-Pre: Newlines in comments shouldn't affect sol state
3884 ### HTML-pre (some to spec PHP parser behavior and some Parsoid-RT-centric)
3888 HTML-pre: 1. embedded newlines
3920 <pre typeof="mw:Extension/pre" about="#mwt2" data-mw='{"name":"pre","attrs":{},"body":{"extsrc":"foo"}}'>foo</pre>
3922 <pre typeof="mw:Extension/pre" about="#mwt4" data-mw='{"name":"pre","attrs":{},"body":{"extsrc":"\nfoo\n"}}'>foo
3925 <pre typeof="mw:Extension/pre" about="#mwt6" data-mw='{"name":"pre","attrs":{},"body":{"extsrc":"\n\nfoo\n"}}'>
3930 <pre typeof="mw:Extension/pre" about="#mwt8" data-mw='{"name":"pre","attrs":{},"body":{"extsrc":"\n\n\nfoo\n"}}'>
3938 HTML-pre: big spaces
3974 <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"}}'>
3993 HTML-pre: 2: indented text
4006 HTML-pre: 3: other wikitext
4025 <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
4034 ### Definition lists
4042 <dd>Definition</dd></dl>
4046 Definition list for indentation only
4050 <dl><dd>Indented text</dd></dl>
4054 Definition list with no space
4059 <dd>Definition</dd></dl>
4063 Definition list with URL link
4065 ;http://example.com/ :definition
4067 <dl><dt><a rel="nofollow" class="external free" href="http://example.com/">http://example.com/</a></dt>
4068 <dd>definition</dd></dl>
4072 Definition list with bracketed URL link
4074 ;[http://www.example.com/ Example]:Something about it
4076 <dl><dt><a rel="nofollow" class="external text" href="http://www.example.com/">Example</a></dt>
4077 <dd>Something about it</dd></dl>
4081 Definition list with wikilink containing colon
4083 ;[[Help:FAQ]]:The least-read page on Wikipedia
4085 <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>
4086 <dd>The least-read page on Wikipedia</dd></dl>
4089 # At Brion's and JeLuF's insistence... :)
4091 Definition list with news link containing colon
4093 ;news:alt.wikipedia.rox :This isn't even a real newsgroup!
4095 <dl><dt><a rel="nofollow" class="external free" href="news:alt.wikipedia.rox">news:alt.wikipedia.rox</a></dt>
4096 <dd>This isn't even a real newsgroup!</dd></dl>
4098 <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>
4102 Malformed definition list with colon
4104 ;news:alt.wikipedia.rox -- don't crash or enter an infinite loop
4106 <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>
4110 Definition lists: colon in external link text
4112 ;[http://www.wikipedia2.org/ Wikipedia :The Next Generation] :OK, I made that up
4114 <dl><dt><a rel="nofollow" class="external text" href="http://www.wikipedia2.org/">Wikipedia :The Next Generation</a></dt>
4115 <dd>OK, I made that up</dd></dl>
4119 Definition lists: colon in HTML attribute
4121 ;<b style="display: inline">bold</b>
4123 <dl><dt><b style="display: inline">bold</b></dt></dl>
4127 Definition lists: self-closed tag
4129 ;one<br/>two :two-line fun
4131 <dl><dt>one<br />two</dt>
4132 <dd>two-line fun</dd></dl>
4136 Definition lists: ignore colons inside tags
4138 ;one <b>two : tag <i>fun:</i>:</b>:def
4140 <dl><dt>one <b>two : tag <i>fun:</i>:</b></dt>
4145 Definition lists: excess closed tags
4147 ;one</b>two :bad tag fun
4150 <dd>bad tag fun</dd></dl>
4154 <dd>bad tag fun</dd>
4159 T13748: Literal closing tags
4163 <dd>test test test test test</dd>
4165 <dd>test test test test test</dd>
4170 <dd>test test test test test</dd>
4172 <dd>test test test test test</dd>
4178 Definition and unordered list using wiki syntax nested in unordered list using html tags.
4187 <dd>description</dd></dl>
4188 <ul><li>unordered</li></ul>
4194 Definition list with empty definition and following paragraph
4207 Nested definition lists using html syntax
4220 Definition Lists: No nesting: Multiple dd's
4232 Definition Lists: Indentation: Regular
4240 <dl><dd>i3</dd></dl></dd></dl></dd></dl>
4244 Definition Lists: Indentation: Missing 1st level
4250 <dl><dd>i3</dd></dl></dd></dl></dd></dl>
4254 Definition Lists: Indentation: Multi-level indent
4258 <dl><dd><dl><dd><dl><dd>i3</dd></dl></dd></dl></dd></dl>
4262 Definition Lists: Hacky use to indent tables
4269 should be left alone
4271 <dl><dd><dl><dd><table>
4276 </td></tr></table></dd></dl></dd></dl>
4278 should be left alone
4283 Definition Lists: Hacky use to indent tables (with content following table)
4288 |} <!--c1--> this text should be part of the dl
4295 </td></tr></tbody></table> this text should be part of the dl</dd></dl>
4302 </td></tr></tbody></table> <!--c1--> this text should be part of the dl</dd></dl>
4306 Definition Lists: Hacky use to indent tables, with comments (T65979)
4314 should be left alone
4317 <dl><dd><dl><dd><table><tr>
4320 </tr></table><!-- bar --></dd></dl></dd></dl>
4322 should be left alone</p>
4326 Definition Lists: Hacky use to indent tables, with comment before table
4334 <dl><dd><dl><dd><!-- foo --><table><tr>
4336 </tr></table></dd></dl></dd></dl>
4339 # The trailing whitespace in this test is to catch a regression in
4340 # Parsoid after T54473.
4342 Definition Lists: Hacky use to indent tables (WS-insensitive)
4351 </td></tr></table></dd></dl>
4355 <tbody><tr><td>a</td></tr>
4356 </tbody></table></dd></dl>
4359 ## The PHP parser treats : items (dd) without a corresponding ; item (dt)
4360 ## as an empty dt item. It also ignores all but the last ";" when followed
4361 ## by ":" later on. So, ";" are not ignored in ";;;t3" but are ignored in
4362 ## ";;;t3 :d1". So, PHP parser behavior is a little inconsistent wrt multiple
4365 ## Ex: ";;t2 ::d2" is transformed into:
4377 ## But, Parsoid treats "; :" as a tight atomic unit and excess ":" as plain text
4378 ## So, the same wikitext above (;;t2 ::d2) is transformed into:
4389 ## All Parsoid only definition list tests have this difference.
4391 ## See also: https://phabricator.wikimedia.org/T8569
4392 ## and https://lists.wikimedia.org/pipermail/wikitext-l/2011-November/000483.html
4395 Table / list interaction: indented table with lists in table contents
4417 </td></tr></table></dd></dl>
4422 Table / list interaction: lists nested in tables nested in indented lists
4445 </td></tr></table></dd></dl>
4451 Definition Lists: Nesting: Multi-level (Parsoid only)
4479 Definition Lists: Nesting: Test 2
4486 <dl><dd>d2</dd></dl></dd></dl>
4491 Definition Lists: Nesting: Test 3
4496 <dl><dd><dl><dt>t1</dt>
4498 <dl><dd><dl><dd>d2</dd></dl></dd></dl></dd></dl></dd></dl>
4503 Definition Lists: Nesting: Test 4
4508 <dl><dd><dl><dd><dl><dt>t3</dt>
4509 <dd>d3</dd></dl></dd></dl></dd></dl>
4513 ## The Parsoid team believes the following three test exposes a
4514 ## bug in the PHP parser. (Parsoid team thinks the PHP parser is
4515 ## wrong to close the <dl> after the <dt> containing the <ul>.)
4516 ## It also exposes a "misfeature" in tidy, which doesn't like
4517 ## <dl> tags with a single <dt> child; it converts the <dt> into
4518 ## a <dd> in that case. (Parsoid leaves the <dt> alone!)
4520 Definition Lists: Mixed Lists: Test 1
4526 <dl><dd><dl><dt><ul><li>foo</li>
4527 <li>bar</li></ul></dt></dl>
4528 <dl><dt>baz</dt></dl></dd></dl>
4530 <dl><dd><dl><dt><ul><li>foo</li>
4531 <li>bar</li></ul></dt></dl>
4532 <dl><dt>baz</dt></dl></dd></dl>
4550 Definition Lists: Mixed Lists: Test 2
4555 <ul><li><dl><dd>d1</dd>
4556 <dd>d2</dd></dl></li></ul>
4561 Definition Lists: Mixed Lists: Test 3
4566 <ul><li><dl><dd><dl><dd><dl><dd>d1</dd>
4567 <dd>d2</dd></dl></dd></dl></dd></dl></li></ul>
4572 Definition Lists: Mixed Lists: Test 4
4577 <ul><li><dl><dt>d1</dt>
4580 <dd>d4</dd></dl></li></ul>
4585 Definition Lists: Mixed Lists: Test 5
4591 <dl><dd>d2</dd></dl></dd></dl></li></ul>
4596 Definition Lists: Mixed Lists: Test 6
4601 <ol><li><ul><li><dl><dd>d1
4602 <dl><dd><dl><dd>d3</dd></dl></dd></dl></dd></dl></li></ul></li></ol>
4607 Definition Lists: Mixed Lists: Test 7
4612 <dl><dd><ul><li>d1</li>
4613 <li>d2</li></ul></dd></dl>
4618 Definition Lists: Mixed Lists: Test 8
4623 <dl><dd><ul><li>d1</li></ul>
4624 <dl><dd><ul><li>d2</li></ul></dd></dl></dd></dl>
4629 Definition Lists: Mixed Lists: Test 9
4633 <ul><li><dl><dt>foo</dt>
4634 <dd>bar</dd></dl></li></ul>
4639 Definition Lists: Mixed Lists: Test 10
4643 <ul><li><ol><li><dl><dt>foo</dt>
4644 <dd>bar</dd></dl></li></ol></li></ul>
4647 # The Parsoid team disagrees with the PHP parser's seemingly-random
4648 # rules regarding dd/dt on the next few tests. Parsoid is more
4649 # consistent, and recognizes the shared nesting and keeps the
4650 # still-open tags around until the nesting is complete.
4652 # This is a regression test for T175099
4654 Definition Lists: Mixed Lists: Test 11
4661 <ul><li>b</li></ul></dd></dl>
4664 <dd><ul><li>b</li></ul></dd></dl>
4667 # FIXME: Maybe get rid of this test?
4669 Definition Lists: Mixed Lists: Test 12
4674 <ul><li><ol><li><ul><li><ol><li><dl><dt>foo</dt>
4675 <dd><ul><li><dl><dt><dl><dt>bar</dt></dl></dd></dl></li></ul></dd></dl>
4677 <dd>baz</dd></dl></li></ol></li></ul></li></ol></li></ul>
4679 <ul><li><ol><li><ul><li><ol><li><dl><dt>foo</dt>
4680 <dd><ul><li><dl><dt><dl><dt>bar</dt></dl></dt></dl></li></ul></dd></dl></li></ol></li></ul>
4682 <dd>baz</dd></dl></li></ol></li></ul>
4700 <dd data-parsoid='{"stx":"row"}'>bar</dd>
4705 <dd data-parsoid='{"stx":"row"}'>baz</dd>
4714 Definition Lists: Mixed Lists: Test 13
4719 <ul><li><ol><li><ul><li><ol><li><dl><dt>foo </dt>
4720 <dd><ul><li><dl><dt><dl><dt>bar</dt></dl></dt></dl></li></ul></dd></dl></li></ol></li></ul>
4721 <dl><dt>boo </dt>
4722 <dd>baz</dd></dl></li></ol></li></ul>
4725 # FIXME: Maybe get rid of this test?
4727 # * The test is wrong, there are two colons where there should be :;
4728 # * The PHP parser is wrong to close the <dl> after the <dt> containing the <ul>.
4730 Definition Lists: Weird Ones: Test 1
4732 *#;*::;;foo :bar (who uses this?)
4734 <ul><li><ol><li><dl><dt>foo</dt>
4735 <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>
4753 <dd data-parsoid='{"stx":"row"}'>bar (who uses this?)</dd>
4765 Definition Lists: colons occurring in tags
4782 <dt><span>a:b</span></dt>
4783 <dt><div>a:b</div></dt>
4784 <dt><div>a</div></dt>
4788 <dt><i>a:b</i></dt></dl>
4789 <dl><dt><dl><dt><dl><dt><i>a:b</i></dt></dl></dt></dl></dt></dl>
4791 <dl><dt>a</dt><dd data-parsoid='{"stx":"row"}'>b</dd>
4793 <dt><i data-parsoid='{"stx":"html"}'>a:b</i></dt>
4794 <dt><span data-parsoid='{"stx":"html"}'>a:b</span></dt>
4795 <dt><div data-parsoid='{"stx":"html"}'>a:b</div></dt>
4796 <dt><div data-parsoid='{"stx":"html","autoInsertedEnd":true}'>a</div></dt>
4798 <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>
4799 <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>
4800 <dl><dt><dl><dt><i>a:b</i></dt></dl></dt></dl></dt></dl>
4803 # Parsoid's output differs here again because it shares
4804 # nesting between the two lists unlike the PHP parser.
4805 # Unsure which is more desirable.
4807 Definition Lists: colons and tables 1
4819 </td></tr></table></dd></dl>
4823 </td></tr></table></dd></dl>
4829 </td></tr></table></dd>
4833 </td></tr></table></dd></dl>
4836 # FIXME: Does this need a html/php section?
4838 Definition Lists: template interaction
4840 ::{{definition_list}}
4843 ::{{definition_list}}
4848 <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">
4849 </span><dd about="#mwt1">two</dd></dl></dd></dl>
4851 <dl><dd data-parsoid='{}'>one
4852 <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">
4853 </span><dd about="#mwt2">two
4855 <dd>three</dd></dl></dd>
4856 <dd data-parsoid='{}'>four</dd></dl></dd></dl>
4864 External links: non-bracketed
4866 Non-bracketed: http://example.com
4868 <p>Non-bracketed: <a rel="nofollow" class="external free" href="http://example.com">http://example.com</a>
4872 # parsoid doesn't explicitly mark autonumbered links, see T55505
4874 External links: numbered
4876 Numbered: [http://example.com]
4877 Numbered: [http://example.net]
4878 Numbered: [http://example.com]
4880 <p>Numbered: <a rel="nofollow" class="external autonumber" href="http://example.com">[1]</a>
4881 Numbered: <a rel="nofollow" class="external autonumber" href="http://example.net">[2]</a>
4882 Numbered: <a rel="nofollow" class="external autonumber" href="http://example.com">[3]</a>
4885 <p>Numbered: <a rel="mw:ExtLink" class="external autonumber" href="http://example.com"></a>
4886 Numbered: <a rel="mw:ExtLink" class="external autonumber" href="http://example.net"></a>
4887 Numbered: <a rel="mw:ExtLink" class="external autonumber" href="http://example.com"></a></p>
4891 External links: specified text
4893 Specified text: [http://example.com link]
4895 <p>Specified text: <a rel="nofollow" class="external text" href="http://example.com">link</a>
4900 External links: trail
4902 Linktrails should not work for external links: [http://example.com link]s
4904 <p>Linktrails should not work for external links: <a rel="nofollow" class="external text" href="http://example.com">link</a>s
4909 External links: dollar sign in URL
4911 http://example.com/1$2345
4913 <p><a rel="nofollow" class="external free" href="http://example.com/1$2345">http://example.com/1$2345</a>
4917 # parsoid doesn't explicitly mark autonumbered links, see T55505
4919 External links: dollar sign in URL (autonumber)
4921 [http://example.com/1$2345]
4923 <p><a rel="nofollow" class="external autonumber" href="http://example.com/1$2345">[1]</a>
4926 <p><a rel="mw:ExtLink" class="external autonumber" href="http://example.com/1$2345"></a></p>
4930 External links: open square bracket forbidden in URL (T6377)
4932 parsoid=wt2html,wt2wt,html2html
4934 http://example.com/1[2345
4936 <p><a rel="nofollow" class="external free" href="http://example.com/1">http://example.com/1</a>[2345
4939 <p><a rel="mw:ExtLink" class="external free" href="http://example.com/1">http://example.com/1</a>[2345</p>
4943 External links: open square bracket forbidden in URL (named) (T6377)
4945 parsoid=wt2html,html2html
4947 [http://example.com/1[2345]
4949 <p><a rel="nofollow" class="external text" href="http://example.com/1">[2345</a>
4952 <p><a rel="mw:ExtLink" class="external text" href="http://example.com/1">[2345</a></p>
4955 # parsoid adds a space before the link name
4957 External links: open square bracket forbidden in URL (named) (T6377)
4960 [http://example.com/1 [2345]
4962 <p><a rel="nofollow" class="external text" href="http://example.com/1">[2345</a>
4967 External links: nowiki in URL link text (T8230)
4969 [http://example.com/ <nowiki>''example site''</nowiki>]
4971 <p><a rel="nofollow" class="external text" href="http://example.com/">''example site''</a>
4976 External links: newline forbidden in text (T8230 regression check)
4978 [http://example.com/ first
4981 <p>[<a rel="nofollow" class="external free" href="http://example.com/">http://example.com/</a> first
4987 External links: Pipe char between url and text
4989 [http://example.com | link]
4991 <p><a rel="nofollow" class="external text" href="http://example.com">| link</a>
4996 External links: protocol-relative URL in brackets
4998 [//example.com/ Test]
5000 <p><a rel="nofollow" class="external text" href="//example.com/">Test</a>
5004 # parsoid doesn't explicitly mark autonumbered links, see T55505
5006 External links: protocol-relative URL in brackets without text
5010 <p><a rel="nofollow" class="external autonumber" href="//example.com">[1]</a>
5013 <p><a rel="mw:ExtLink" class="external autonumber" href="//example.com"></a></p>
5017 External links: protocol-relative URL in free text is left alone
5021 <p>//example.com/Foo
5026 External links: protocol-relative URL in the middle of a word is left alone (T32269)
5028 foo//example.com/Foo
5030 <p>foo//example.com/Foo
5034 ## html2wt and html2html will fail because we will prefer the :en: interwiki prefix over wikipedia:
5036 External links: with no contents
5038 parsoid=wt2html,wt2wt
5040 [http://en.wikipedia.org/wiki/Foo]
5042 [[wikipedia:Foo|Bar]]
5044 [[wikipedia:Foo|<span>Bar</span>]]
5046 <p><a rel="nofollow" class="external autonumber" href="http://en.wikipedia.org/wiki/Foo">[1]</a>
5047 </p><p><a href="http://en.wikipedia.org/wiki/Foo" class="extiw" title="wikipedia:Foo">Bar</a>
5048 </p><p><a href="http://en.wikipedia.org/wiki/Foo" class="extiw" title="wikipedia:Foo"><span>Bar</span></a>
5051 <p><a rel="mw:ExtLink" class="external autonumber" href="http://en.wikipedia.org/wiki/Foo"></a></p>
5052 <p><a rel="mw:WikiLink/Interwiki" href="http://en.wikipedia.org/wiki/Foo" title="wikipedia:Foo">Bar</a></p>
5053 <p><a rel="mw:WikiLink/Interwiki" href="http://en.wikipedia.org/wiki/Foo" title="wikipedia:Foo"><span>Bar</span></a></p>
5057 External links: Free with trailing punctuation
5067 http://example.com/url_with_(brackets)
5068 (http://example.com/url_without_brackets)
5069 http://example.com/url_with_entity&
5070 http://example.com/url_with_entity&
5071 http://example.com/url_with_entity&
5072 http://example.com/url_with_entity
5073 http://example.com/url_with_entity 
5074 http://example.com/url_with_entity 
5075 http://example.com/url_with_entity<
5076 http://example.com/url_with_entity<
5077 http://example.com/url_with_entity<
5079 <p><a rel="nofollow" class="external free" href="http://example.com">http://example.com</a>,
5080 <a rel="nofollow" class="external free" href="http://example.com">http://example.com</a>;
5081 <a rel="nofollow" class="external free" href="http://example.com">http://example.com</a>\
5082 <a rel="nofollow" class="external free" href="http://example.com">http://example.com</a>.
5083 <a rel="nofollow" class="external free" href="http://example.com">http://example.com</a>:
5084 <a rel="nofollow" class="external free" href="http://example.com">http://example.com</a>!
5085 <a rel="nofollow" class="external free" href="http://example.com">http://example.com</a>?
5086 <a rel="nofollow" class="external free" href="http://example.com">http://example.com</a>)
5087 <a rel="nofollow" class="external free" href="http://example.com/url_with_(brackets)">http://example.com/url_with_(brackets)</a>
5088 (<a rel="nofollow" class="external free" href="http://example.com/url_without_brackets">http://example.com/url_without_brackets</a>)
5089 <a rel="nofollow" class="external free" href="http://example.com/url_with_entity&">http://example.com/url_with_entity&</a>
5090 <a rel="nofollow" class="external free" href="http://example.com/url_with_entity&">http://example.com/url_with_entity&</a>
5091 <a rel="nofollow" class="external free" href="http://example.com/url_with_entity&">http://example.com/url_with_entity&</a>
5092 <a rel="nofollow" class="external free" href="http://example.com/url_with_entity">http://example.com/url_with_entity</a> 
5093 <a rel="nofollow" class="external free" href="http://example.com/url_with_entity">http://example.com/url_with_entity</a> 
5094 <a rel="nofollow" class="external free" href="http://example.com/url_with_entity">http://example.com/url_with_entity</a> 
5095 <a rel="nofollow" class="external free" href="http://example.com/url_with_entity">http://example.com/url_with_entity</a><
5096 <a rel="nofollow" class="external free" href="http://example.com/url_with_entity">http://example.com/url_with_entity</a><
5097 <a rel="nofollow" class="external free" href="http://example.com/url_with_entity">http://example.com/url_with_entity</a><
5100 <p><a rel="mw:ExtLink" class="external free" href="http://example.com">http://example.com</a>,
5101 <a rel="mw:ExtLink" class="external free" href="http://example.com">http://example.com</a>;
5102 <a rel="mw:ExtLink" class="external free" href="http://example.com">http://example.com</a>\
5103 <a rel="mw:ExtLink" class="external free" href="http://example.com">http://example.com</a>.
5104 <a rel="mw:ExtLink" class="external free" href="http://example.com">http://example.com</a>:
5105 <a rel="mw:ExtLink" class="external free" href="http://example.com">http://example.com</a>!
5106 <a rel="mw:ExtLink" class="external free" href="http://example.com">http://example.com</a>?
5107 <a rel="mw:ExtLink" class="external free" href="http://example.com">http://example.com</a>)
5108 <a rel="mw:ExtLink" class="external free" href="http://example.com/url_with_(brackets)">http://example.com/url_with_(brackets)</a>
5109 (<a rel="mw:ExtLink" class="external free" href="http://example.com/url_without_brackets">http://example.com/url_without_brackets</a>)
5110 <a rel="mw:ExtLink" class="external free" href="http://example.com/url_with_entity&">http://example.com/url_with_entity&</a>
5111 <a rel="mw:ExtLink" class="external free" href="http://example.com/url_with_entity&">http://example.com/url_with_entity&</a>
5112 <a rel="mw:ExtLink" class="external free" href="http://example.com/url_with_entity&">http://example.com/url_with_entity&</a>
5113 <a rel="mw:ExtLink" class="external free" href="http://example.com/url_with_entity">http://example.com/url_with_entity</a><span typeof="mw:Entity" data-parsoid='{"src":"&nbsp;","srcContent":" "}'> </span>
5114 <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>
5115 <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>
5116 <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>
5117 <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>
5118 <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>
5122 External links: tricky Parsoid html2html case
5124 parsoid=wt2html,wt2wt,html2html
5126 http://example.com/url_with_entity&amp;
5128 <p><a rel="nofollow" class="external free" href="http://example.com/url_with_entity&amp">http://example.com/url_with_entity&amp</a>;
5131 <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>
5135 External links: Free with trailing quotes (T113666)
5137 '''News:''' Stuff here
5141 <p><b>News:</b> Stuff here
5142 </p><p><a rel="nofollow" class="external free" href="news:'a'b">news:'a'b</a><i>c</i>d e
5145 <p><b>News:</b> Stuff here</p>
5146 <p><a rel="mw:ExtLink" class="external free" href="news:'a'b">news:'a'b</a><i>c</i>d e</p>
5150 External links: with entity
5152 [http:// www.librarieswithoutborders.org Libraries without borders]
5154 <p><a rel="nofollow" class="external text" href="http://+www.librarieswithoutborders.org">Libraries without borders</a>
5157 <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>
5161 External links: Lone protocols are never linked (T105697)
5180 External links: No preceding word characters allowed (T67278)
5182 NOPEhttp://example.com
5183 N0http://example.com
5184 ok:http://example.com
5185 ok-http://example.com
5187 <p>NOPEhttp://example.com
5188 N0http://example.com
5189 ok:<a rel="nofollow" class="external free" href="http://example.com">http://example.com</a>
5190 ok-<a rel="nofollow" class="external free" href="http://example.com">http://example.com</a>
5195 External links: nofollow domain exception
5197 A [https://no-nofollow.org/foobar link], and another [https://example.org link].
5199 <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>.
5206 External image: http://meta.wikimedia.org/upload/f/f1/Ncwikicol.png
5208 <p>External image: <img src="http://meta.wikimedia.org/upload/f/f1/Ncwikicol.png" alt="Ncwikicol.png"/>
5213 External image from https
5215 External image from https: https://meta.wikimedia.org/upload/f/f1/Ncwikicol.png
5217 <p>External image from https: <img src="https://meta.wikimedia.org/upload/f/f1/Ncwikicol.png" alt="Ncwikicol.png"/>
5222 External image (when not allowed)
5224 wgAllowExternalImages=0
5226 External image: http://meta.wikimedia.org/upload/f/f1/Ncwikicol.png
5228 <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>
5233 Link to non-http image, no img tag
5235 Link to non-http image, no img tag: ftp://example.com/test.jpg
5237 <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>
5242 External links: terminating separator
5244 Terminating separator: http://example.com/thing,
5246 <p>Terminating separator: <a rel="nofollow" class="external free" href="http://example.com/thing">http://example.com/thing</a>,
5251 External links: intervening separator
5253 Intervening separator: http://example.com/1,2,3
5255 <p>Intervening separator: <a rel="nofollow" class="external free" href="http://example.com/1,2,3">http://example.com/1,2,3</a>
5260 External links: old bug with URL in query
5262 Old bug with URL in query: [http://example.com/thing?url=http://example.com link]
5264 <p>Old bug with URL in query: <a rel="nofollow" class="external text" href="http://example.com/thing?url=http://example.com">link</a>
5269 External links: old URL-in-URL bug, mixed protocols
5271 And again with mixed protocols: [ftp://example.com?url=http://example.com link]
5273 <p>And again with mixed protocols: <a rel="nofollow" class="external text" href="ftp://example.com?url=http://example.com">link</a>
5277 # Since Parsoid is starting to emit canonical wikitext for links,
5278 # [http://example.com http://example.com] will not RT back to that
5281 External links: URL in text
5285 URL in text: [http://example.com http://example.com]
5287 <p>URL in text: <a rel="nofollow" class="external text" href="http://example.com">http://example.com</a>
5290 <p>URL in text: <a rel="mw:ExtLink" class="external text" href="http://example.com">http://example.com</a></p>
5294 External links: Clickable images
5296 ja-style clickable images: [http://example.com http://meta.wikimedia.org/upload/f/f1/Ncwikicol.png]
5298 <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>
5301 <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>
5305 External links: raw ampersand
5307 Old & use: http://x&y
5309 <p>Old & use: <a rel="nofollow" class="external free" href="http://x&y">http://x&y</a>
5314 External links: encoded ampersand
5316 Old & use: http://x&y
5318 <p>Old & use: <a rel="nofollow" class="external free" href="http://x&y">http://x&y</a>
5321 <p>Old <span typeof="mw:Entity">&</span> use: <a rel="mw:ExtLink" class="external free" href="http://x&y">http://x&y</a></p>
5325 External links: encoded equals (T8102)
5327 http://example.com/?foo=bar
5329 <p><a rel="nofollow" class="external free" href="http://example.com/?foo=bar">http://example.com/?foo=bar</a>
5332 <p><a rel="mw:ExtLink" class="external free" href="http://example.com/?foo=bar">http://example.com/?foo=bar</a></p>
5336 ## Note that parsoid doesn't explicit mark autonumbered links, nor
5337 ## does it number them. As discussed in T55505, we can identify
5338 ## autonumbered links via CSS.
5342 External links: [raw ampersand]
5344 Old & use: [http://x&y]
5346 <p>Old & use: <a rel="nofollow" class="external autonumber" href="http://x&y">[1]</a>
5349 <p>Old <span typeof="mw:Entity">&</span> use: <a rel="mw:ExtLink" class="external autonumber" href="http://x&y"></a></p>
5352 # note that parsoid html is identical to [raw ampersand] case; so html2wt
5353 # mode will return the [raw ampersand] wikitext
5355 External links: [encoded ampersand]
5357 parsoid=wt2html,wt2wt,html2html
5359 Old & use: [http://x&y]
5361 <p>Old & use: <a rel="nofollow" class="external autonumber" href="http://x&y">[1]</a>
5364 <p>Old <span typeof="mw:Entity">&</span> use: <a rel="mw:ExtLink" class="external autonumber" href="http://x&y"></a></p>
5368 External links: [raw equals]
5370 [http://example.com/?foo=bar]
5372 <p><a rel="nofollow" class="external autonumber" href="http://example.com/?foo=bar">[1]</a>
5375 <p><a rel="mw:ExtLink" class="external autonumber" href="http://example.com/?foo=bar"></a></p>
5378 # note that parsoid html is identical to [raw equals] case; so html2wt
5379 # mode will return the [raw equals] wikitext
5381 External links: [encoded equals] (T8102)
5383 parsoid=wt2html,wt2wt,html2html
5385 [http://example.com/?foo=bar]
5387 <p><a rel="nofollow" class="external autonumber" href="http://example.com/?foo=bar">[1]</a>
5390 <p><a rel="mw:ExtLink" class="external autonumber" href="http://example.com/?foo=bar"></a></p>
5393 # xxx parsoid strips the IDN character, so the round-trip tests will
5394 # obviously fail and are disabled. --cscott
5396 External links: [IDN ignored character reference in hostname; strip it right off]
5398 parsoid=wt2html,wt2wt,html2html
5400 [http://e‌xample.com/]
5402 <p><a rel="nofollow" class="external autonumber" href="http://example.com/">[1]</a>
5405 <p><a rel="mw:ExtLink" class="external autonumber" href="http://example.com/"></a></p>
5408 # FIXME: This test (the IDN characters in the text of a link) is an inconsistency.
5409 # Where an external link could easily circumvent the sanitization of the text of
5410 # a link like this (where an IDN-ignore character is in the URL somewhere), this
5411 # test demands a higher standard. That's a bit strange.
5415 # http://example.com -> [http://example.com|http://example.com]
5416 # [http://example.com|http://example.com] -> [http://example.com|http://example.com]
5418 # The first example is sanitized, but the second is not. Any security benefits
5419 # from this production are trivial to circumvent. Either remove this test and
5420 # let the parser(s) do their thing unaccosted, or fix the inconsistency and change
5421 # the test accordingly.
5425 # xxx parsoid strips the IDN character, so the round-trip tests will
5426 # obviously fail and are disabled. --cscott
5428 External links: IDN ignored character reference in hostname; strip it right off
5430 parsoid=wt2html,html2html
5432 http://e‌xample.com/
5434 <p><a rel="nofollow" class="external free" href="http://example.com/">http://example.com/</a>
5437 <p><a rel="mw:ExtLink" class="external free" href="http://example.com/">http://example.com/</a></p>
5441 External links: www.jpeg.org (T2554)
5445 <p><a rel="nofollow" class="external free" href="http://www.jpeg.org">http://www.jpeg.org</a>
5449 # parsoid doesn't explicitly mark autonumbered links, see T55505
5451 External links: URL within URL (T2002)
5453 [http://www.unausa.org/newindex.asp?place=http://www.unausa.org/programs/mun.asp]
5455 <p><a rel="nofollow" class="external autonumber" href="http://www.unausa.org/newindex.asp?place=http://www.unausa.org/programs/mun.asp">[1]</a>
5458 <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>
5462 T2361: URL inside bracketed URL
5464 [http://www.example.com/foo http://www.example.com/bar]
5466 <p><a rel="nofollow" class="external text" href="http://www.example.com/foo">http://www.example.com/bar</a>
5471 T2361: URL within URL, not bracketed
5473 http://www.example.com/foo?=http://www.example.com/bar
5475 <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>
5480 T2289: ">"-token in URL-tail
5482 http://www.example.com/<hello>
5484 <p><a rel="nofollow" class="external free" href="http://www.example.com/">http://www.example.com/</a><hello>
5489 T2289: literal ">"-token in URL-tail
5491 http://www.example.com/<b>html</b>
5493 <p><a rel="nofollow" class="external free" href="http://www.example.com/">http://www.example.com/</a><b>html</b>
5496 <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>
5500 T2289: ">"-token in bracketed URL
5502 [http://www.example.com/<hello> stuff]
5504 <p><a rel="nofollow" class="external text" href="http://www.example.com/"><hello> stuff</a>
5509 T2289: literal ">"-token in bracketed URL
5511 [http://www.example.com/<b>html</b> stuff]
5513 <p><a rel="nofollow" class="external text" href="http://www.example.com/"><b>html</b> stuff</a>
5518 T2289: literal double quote at end of URL
5520 http://www.example.com/"hello"
5522 <p><a rel="nofollow" class="external free" href="http://www.example.com/">http://www.example.com/</a>"hello"
5527 T2289: literal double quote in bracketed URL
5529 [http://www.example.com/"hello" stuff]
5531 <p><a rel="nofollow" class="external text" href="http://www.example.com/">"hello" stuff</a>
5536 External links: multiple legal whitespace is fine, Magnus. Don't break it please. (T7081)
5538 [http://www.example.com test]
5540 <p><a rel="nofollow" class="external text" href="http://www.example.com">test</a>
5545 External links: link text with spaces
5547 [http://www.example.com a b c]
5548 [http://www.example.com ''a'' ''b'']
5550 <p><a rel="nofollow" class="external text" href="http://www.example.com">a b c</a>
5551 <a rel="nofollow" class="external text" href="http://www.example.com"><i>a</i> <i>b</i></a>
5555 # Note edge case difference between PHP and Parsoid here.
5557 External links: wiki links within external link (T5695)
5559 parsoid=wt2html,html2html
5561 [http://example.com [[wikilink]] embedded in ext link]
5563 [http://example.com test [[wikilink]] embedded in ext link]
5565 <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>
5566 </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>
5569 <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>
5570 <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>
5574 T2787: Links with one slash after the url protocol are invalid
5578 [http:/example.com title]
5580 <p>http:/example.com
5581 </p><p>[http:/example.com title]
5586 Bracketed external links with template-generated invalid target
5588 [{{echo|http:/example.com}} title]
5590 <p>[http:/example.com title]
5594 # wt2html only because Parsoid would want to add <nowiki>s coming from html
5596 Broken wikilinks (but not external links) prevent templates from closing
5600 [http://example.com x
5602 {{echo|[http://example.com x}}
5608 <p>[<a rel="nofollow" class="external free" href="http://example.com">http://example.com</a> x
5609 </p><p>[<a rel="nofollow" class="external free" href="http://example.com">http://example.com</a> x
5611 </p><p>{{echo|[[Foo}}
5614 <p>[<a rel="mw:ExtLink" class="external free" href="http://example.com">http://example.com</a> x</p>
5615 <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>
5617 <p>{{echo|[[Foo}}</p>
5621 Wikilinks with embedded newlines are not broken
5632 <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>
5644 <p>{{echo|<a href="/wiki/Foo" title="Foo">}}</a>
5648 <p>{{echo|<a rel="mw:WikiLink" href="./Foo" title="Foo">}}</a></p>
5649 <p>[[Foo|<span typeof="mw:Transclusion" data-mw='{"parts":[{"template":{"target":{"wt":"echo","href":"./Template:Echo"},"params":{"1":{"wt":"]]"}},"i":0}}]}'>]]</span></p>
5653 T4702: Mismatched <i>, <b> and <a> tags are invalid
5655 ''[http://example.com text'']
5656 [http://example.com '''text]'''
5657 ''Something [http://example.com in italic'']
5658 ''Something [http://example.com mixed''''', even bold]'''
5659 '''''Now [http://example.com both''''']
5661 <p><a rel="nofollow" class="external text" href="http://example.com"><i>text</i></a>
5662 <a rel="nofollow" class="external text" href="http://example.com"><b>text</b></a>
5663 <i>Something </i><a rel="nofollow" class="external text" href="http://example.com"><i>in italic</i></a>
5664 <i>Something </i><a rel="nofollow" class="external text" href="http://example.com"><i>mixed</i><b>, even bold</b></a>
5665 <i><b>Now </b></i><a rel="nofollow" class="external text" href="http://example.com"><i><b>both</b></i></a>
5673 http://www.example.com/?title=AT%26T
5675 <p><a rel="nofollow" class="external free" href="http://www.example.com/?title=AT%26T">http://www.example.com/?title=AT%26T</a>
5678 <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>
5681 # According to https://www.w3.org/TR/2011/WD-html5-20110525/Overview.html#parsing-urls a plain
5682 # % is actually legal in HTML5. Any change in output would need testing though.
5684 T6781, T7267: %25 in URL
5686 http://www.example.com/?title=100%25_Bran
5688 <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>
5691 <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>
5695 T6781, T7267: %28, %29 in URL
5697 http://www.example.com/?title=Ben-Hur_%281959_film%29
5699 <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>
5702 <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>
5707 T6781: %26 in autonumber URL
5709 [http://www.example.com/?title=AT%26T]
5711 <p><a rel="nofollow" class="external autonumber" href="http://www.example.com/?title=AT%26T">[1]</a>
5714 <p><a rel="mw:ExtLink" class="external autonumber" href="http://www.example.com/?title=AT%26T"></a></p>
5718 T6781, T7267: %26 in autonumber URL
5720 [http://www.example.com/?title=100%25_Bran]
5722 <p><a rel="nofollow" class="external autonumber" href="http://www.example.com/?title=100%25_Bran">[1]</a>
5725 <p><a rel="mw:ExtLink" class="external autonumber" href="http://www.example.com/?title=100%25_Bran"></a></p>
5729 T6781, T7267: %28, %29 in autonumber URL
5731 [http://www.example.com/?title=Ben-Hur_%281959_film%29]
5733 <p><a rel="nofollow" class="external autonumber" href="http://www.example.com/?title=Ben-Hur_%281959_film%29">[1]</a>
5736 <p><a rel="mw:ExtLink" class="external autonumber" href="http://www.example.com/?title=Ben-Hur_%281959_film%29"></a></p>
5741 T6781: %26 in bracketed URL
5743 [http://www.example.com/?title=AT%26T link]
5745 <p><a rel="nofollow" class="external text" href="http://www.example.com/?title=AT%26T">link</a>
5748 <p><a rel="mw:ExtLink" class="external text" href="http://www.example.com/?title=AT%26T">link</a></p>
5752 T6781, T7267: %25 in bracketed URL
5754 [http://www.example.com/?title=100%25_Bran link]
5756 <p><a rel="nofollow" class="external text" href="http://www.example.com/?title=100%25_Bran">link</a>
5761 T6781, T7267: %28, %29 in bracketed URL
5763 [http://www.example.com/?title=Ben-Hur_%281959_film%29 link]
5765 <p><a rel="nofollow" class="external text" href="http://www.example.com/?title=Ben-Hur_%281959_film%29">link</a>
5768 <p><a rel="mw:ExtLink" class="external text" href="http://www.example.com/?title=Ben-Hur_%281959_film%29">link</a></p>
5772 External link containing a period in the anchor. (T65947)
5774 [//foo.org/bar#baz. bang]
5776 [//foo.org/bar. bang]
5778 <p><a rel="nofollow" class="external text" href="//foo.org/bar#baz.">bang</a>
5779 </p><p><a rel="nofollow" class="external text" href="//foo.org/bar.">bang</a>
5782 <p><a rel="mw:ExtLink" class="external text" href="//foo.org/bar#baz.">bang</a></p>
5783 <p><a rel="mw:ExtLink" class="external text" href="//foo.org/bar.">bang</a></p>
5787 External link containing a single quote. (T65947)
5791 [//foo.org/bar'baz bang]
5793 <p><a rel="nofollow" class="external autonumber" href="//foo.org/bar'baz">[1]</a>
5794 </p><p><a rel="nofollow" class="external text" href="//foo.org/bar'baz">bang</a>
5797 <p><a rel="mw:ExtLink" class="external autonumber" href="//foo.org/bar'baz"></a></p>
5798 <p><a rel="mw:ExtLink" class="external text" href="//foo.org/bar'baz">bang</a></p>
5802 External link containing double-single-quotes in text '' (T6598 sanity check)
5804 Some [http://example.com/ pretty ''italics'' and stuff]!
5806 <p>Some <a rel="nofollow" class="external text" href="http://example.com/">pretty <i>italics</i> and stuff</a>!
5811 External link containing double-single-quotes in text embedded in italics (T6598 sanity check)
5813 ''Some [http://example.com/ pretty ''italics'' and stuff]!''
5815 <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>
5819 # Don't add the html/php section since the output is broken and there isn't any reason to spec it
5821 External link containing double-single-quotes with no space separating the url from text in italics
5823 [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]].]
5825 <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>.
5828 <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>
5832 External link with comments in link text
5834 [http://www.google.com Google <!-- comment -->]
5836 <p><a rel="nofollow" class="external text" href="http://www.google.com">Google </a>
5839 <p><a rel="mw:ExtLink" class="external text" href="http://www.google.com">Google <!-- comment --></a></p>
5843 External link to bare IPv4 address
5845 [http://192.168.0.1 Link]
5847 <p><a rel="nofollow" class="external text" href="http://192.168.0.1">Link</a>
5850 <p><a rel="mw:ExtLink" class="external text" href="http://192.168.0.1">Link</a></p>
5854 URL-encoding in URL functions (single parameter)
5856 {{localurl:Some page|amp=&}}
5858 <p>/index.php?title=Some_page&amp=&
5863 URL-encoding in URL functions (multiple parameters)
5865 {{localurl:Some page|q=?&=&}}
5867 <p>/index.php?title=Some_page&q=?&amp=&
5874 http://example.com/index.php?foozoid%5B%5D=bar
5876 http://example.com/index.php?foozoid[]=bar
5878 <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>
5879 </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>
5882 <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>
5884 <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>
5888 IPv6 urls, autolink format (T23261)
5890 http://[2404:130:0:1000::187:2]/index.php
5892 Examples from RFC 2373, section 2.2:
5894 *http://[1080::8:800:200C:417A]/unicast
5895 *http://[FF01::101]/multicast
5896 *http://[::1]/loopback
5897 *http://[::]/unspecified
5898 *http://[::13.1.68.3]/ipv4compat
5899 *http://[::FFFF:129.144.52.38]/ipv4compat
5901 Examples from RFC 2732, section 2:
5903 *http://[FEDC:BA98:7654:3210:FEDC:BA98:7654:3210]:80/index.html
5904 *http://[1080:0:0:0:8:800:200C:417A]/index.html
5905 *http://[3ffe:2a00:100:7031::1]
5906 *http://[1080::8:800:200C:417A]/foo
5907 *http://[::192.9.5.5]/ipng
5908 *http://[::FFFF:129.144.52.38]:80/index.html
5909 *http://[2010:836B:4179::836B:4179]
5911 <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>
5912 </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:
5914 <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>
5915 <li><a rel="nofollow" class="external free" href="http://[FF01::101]/multicast">http://[FF01::101]/multicast</a></li>
5916 <li><a rel="nofollow" class="external free" href="http://[::1]/loopback">http://[::1]/loopback</a></li>
5917 <li><a rel="nofollow" class="external free" href="http://[::]/unspecified">http://[::]/unspecified</a></li>
5918 <li><a rel="nofollow" class="external free" href="http://[::13.1.68.3]/ipv4compat">http://[::13.1.68.3]/ipv4compat</a></li>
5919 <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>
5920 <p>Examples from <a class="external mw-magiclink-rfc" rel="nofollow" href="https://tools.ietf.org/html/rfc2732">RFC 2732</a>, section 2:
5922 <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>
5923 <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>
5924 <li><a rel="nofollow" class="external free" href="http://[3ffe:2a00:100:7031::1]">http://[3ffe:2a00:100:7031::1]</a></li>
5925 <li><a rel="nofollow" class="external free" href="http://[1080::8:800:200C:417A]/foo">http://[1080::8:800:200C:417A]/foo</a></li>
5926 <li><a rel="nofollow" class="external free" href="http://[::192.9.5.5]/ipng">http://[::192.9.5.5]/ipng</a></li>
5927 <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>
5928 <li><a rel="nofollow" class="external free" href="http://[2010:836B:4179::836B:4179]">http://[2010:836B:4179::836B:4179]</a></li></ul>
5930 <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>
5932 <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>
5933 <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>
5934 <li><a rel="mw:ExtLink" class="external free" href="http://[FF01::101]/multicast">http://[FF01::101]/multicast</a></li>
5935 <li><a rel="mw:ExtLink" class="external free" href="http://[::1]/loopback">http://[::1]/loopback</a></li>
5936 <li><a rel="mw:ExtLink" class="external free" href="http://[::]/unspecified">http://[::]/unspecified</a></li>
5937 <li><a rel="mw:ExtLink" class="external free" href="http://[::13.1.68.3]/ipv4compat">http://[::13.1.68.3]/ipv4compat</a></li>
5938 <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>
5940 <p>Examples from <a href="https://tools.ietf.org/html/rfc2732" rel="mw:ExtLink" class="external mw-magiclink">RFC 2732</a>, section 2:</p>
5941 <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>
5942 <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>
5943 <li><a rel="mw:ExtLink" class="external free" href="http://[3ffe:2a00:100:7031::1]">http://[3ffe:2a00:100:7031::1]</a></li>
5944 <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>
5945 <li><a rel="mw:ExtLink" class="external free" href="http://[::192.9.5.5]/ipng">http://[::192.9.5.5]/ipng</a></li>
5946 <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>
5947 <li><a rel="mw:ExtLink" class="external free" href="http://[2010:836B:4179::836B:4179]">http://[2010:836B:4179::836B:4179]</a></li></ul>
5951 IPv6 urls, bracketed format (T23261)
5953 [http://[2404:130:0:1000::187:2]/index.php test]
5955 Examples from RFC 2373, section 2.2:
5957 *[http://[1080::8:800:200C:417A] unicast]
5958 *[http://[FF01::101] multicast]
5959 *[http://[::1]/ loopback]
5960 *[http://[::] unspecified]
5961 *[http://[::13.1.68.3] ipv4compat]
5962 *[http://[::FFFF:129.144.52.38] ipv4compat]
5964 Examples from RFC 2732, section 2:
5966 *[http://[FEDC:BA98:7654:3210:FEDC:BA98:7654:3210]:80/index.html 1]
5967 *[http://[1080:0:0:0:8:800:200C:417A]/index.html 2]
5968 *[http://[3ffe:2a00:100:7031::1] 3]
5969 *[http://[1080::8:800:200C:417A]/foo 4]
5970 *[http://[::192.9.5.5]/ipng 5]
5971 *[http://[::FFFF:129.144.52.38]:80/index.html 6]
5972 *[http://[2010:836B:4179::836B:4179] 7]
5974 <p><a rel="nofollow" class="external text" href="http://[2404:130:0:1000::187:2]/index.php">test</a>
5975 </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:
5977 <ul><li><a rel="nofollow" class="external text" href="http://[1080::8:800:200C:417A]">unicast</a></li>
5978 <li><a rel="nofollow" class="external text" href="http://[FF01::101]">multicast</a></li>
5979 <li><a rel="nofollow" class="external text" href="http://[::1]/">loopback</a></li>
5980 <li><a rel="nofollow" class="external text" href="http://[::]">unspecified</a></li>
5981 <li><a rel="nofollow" class="external text" href="http://[::13.1.68.3]">ipv4compat</a></li>
5982 <li><a rel="nofollow" class="external text" href="http://[::FFFF:129.144.52.38]">ipv4compat</a></li></ul>
5983 <p>Examples from <a class="external mw-magiclink-rfc" rel="nofollow" href="https://tools.ietf.org/html/rfc2732">RFC 2732</a>, section 2:
5985 <ul><li><a rel="nofollow" class="external text" href="http://[FEDC:BA98:7654:3210:FEDC:BA98:7654:3210]:80/index.html">1</a></li>
5986 <li><a rel="nofollow" class="external text" href="http://[1080:0:0:0:8:800:200C:417A]/index.html">2</a></li>
5987 <li><a rel="nofollow" class="external text" href="http://[3ffe:2a00:100:7031::1]">3</a></li>
5988 <li><a rel="nofollow" class="external text" href="http://[1080::8:800:200C:417A]/foo">4</a></li>
5989 <li><a rel="nofollow" class="external text" href="http://[::192.9.5.5]/ipng">5</a></li>
5990 <li><a rel="nofollow" class="external text" href="http://[::FFFF:129.144.52.38]:80/index.html">6</a></li>
5991 <li><a rel="nofollow" class="external text" href="http://[2010:836B:4179::836B:4179]">7</a></li></ul>
5993 <p><a rel="mw:ExtLink" class="external text" href="http://[2404:130:0:1000::187:2]/index.php">test</a></p>
5995 <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>
5996 <ul><li><a rel="mw:ExtLink" class="external text" href="http://[1080::8:800:200C:417A]">unicast</a></li>
5997 <li><a rel="mw:ExtLink" class="external text" href="http://[FF01::101]">multicast</a></li>
5998 <li><a rel="mw:ExtLink" class="external text" href="http://[::1]/">loopback</a></li>
5999 <li><a rel="mw:ExtLink" class="external text" href="http://[::]">unspecified</a></li>
6000 <li><a rel="mw:ExtLink" class="external text" href="http://[::13.1.68.3]">ipv4compat</a></li>
6001 <li><a rel="mw:ExtLink" class="external text" href="http://[::FFFF:129.144.52.38]">ipv4compat</a></li></ul>
6003 <p>Examples from <a href="https://tools.ietf.org/html/rfc2732" rel="mw:ExtLink" class="external mw-magiclink">RFC 2732</a>, section 2:</p>
6004 <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>
6005 <li><a rel="mw:ExtLink" class="external text" href="http://[1080:0:0:0:8:800:200C:417A]/index.html">2</a></li>
6006 <li><a rel="mw:ExtLink" class="external text" href="http://[3ffe:2a00:100:7031::1]">3</a></li>
6007 <li><a rel="mw:ExtLink" class="external text" href="http://[1080::8:800:200C:417A]/foo">4</a></li>
6008 <li><a rel="mw:ExtLink" class="external text" href="http://[::192.9.5.5]/ipng">5</a></li>
6009 <li><a rel="mw:ExtLink" class="external text" href="http://[::FFFF:129.144.52.38]:80/index.html">6</a></li>
6010 <li><a rel="mw:ExtLink" class="external text" href="http://[2010:836B:4179::836B:4179]">7</a></li></ul>
6014 Non-extlinks in brackets
6023 [{{echo|foo}} ''bar'']
6024 [{{echo|foo}}l's] errand
6025 [{{echo|foo}}l's errand]
6027 [url=http://example.com]
6028 [http:// bare protocols don't count]
6041 [url=<a rel="nofollow" class="external free" href="http://example.com">http://example.com</a>]
6042 [http:// bare protocols don't count]
6050 [<span about="#mwt19" typeof="mw:Transclusion" data-mw='{"parts":[{"template":{"target":{"wt":"echo","href":"./Template:Echo"},"params":{"1":{"wt":"foo"}},"i":0}}]}'>foo</span>]
6051 [<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]
6052 [<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>]
6053 [<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
6054 [<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]
6055 [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>]
6056 [url=<a rel="mw:ExtLink" class="external free" href="http://example.com">http://example.com</a>]
6057 [http:// bare protocols don't count]</p>
6061 Percent encoding in external links
6063 [https://github.com/search?l=&q=ResourceLoader+%40wikimedia Search]
6065 <p><a rel="nofollow" class="external text" href="https://github.com/search?l=&q=ResourceLoader+%40wikimedia">Search</a>
6068 <p><a rel="mw:ExtLink" class="external text" href="https://github.com/search?l=&q=ResourceLoader+%40wikimedia">Search</a></p>
6072 Use url link syntax for links where the content is equal the link target
6076 <p><a rel="nofollow" class="external free" href="http://example.com">http://example.com</a>
6079 <p><a rel="mw:ExtLink" class="external free" href="http://example.com">http://example.com</a></p>
6083 Parenthesis in external links, especially URL links
6087 http://example.com/test)
6089 http://example.com/(test)
6091 http://example.com/((test)
6093 (http://example.com/(test))
6095 (http://example.com/(test)))))
6097 http://example.com/a)b
6099 [http://example.com) foo]
6101 <p><a rel="nofollow" class="external free" href="http://example.com">http://example.com</a>)
6102 </p><p><a rel="nofollow" class="external free" href="http://example.com/test">http://example.com/test</a>)
6103 </p><p><a rel="nofollow" class="external free" href="http://example.com/(test)">http://example.com/(test)</a>
6104 </p><p><a rel="nofollow" class="external free" href="http://example.com/((test)">http://example.com/((test)</a>
6105 </p><p>(<a rel="nofollow" class="external free" href="http://example.com/(test))">http://example.com/(test))</a>
6106 </p><p>(<a rel="nofollow" class="external free" href="http://example.com/(test)))))">http://example.com/(test)))))</a>
6107 </p><p><a rel="nofollow" class="external free" href="http://example.com/a)b">http://example.com/a)b</a>
6108 </p><p><a rel="nofollow" class="external text" href="http://example.com)">foo</a>
6111 <p><a rel="mw:ExtLink" class="external free" href="http://example.com">http://example.com</a>)</p>
6112 <p><a rel="mw:ExtLink" class="external free" href="http://example.com/test">http://example.com/test</a>)</p>
6113 <p><a rel="mw:ExtLink" class="external free" href="http://example.com/(test)">http://example.com/(test)</a></p>
6114 <p><a rel="mw:ExtLink" class="external free" href="http://example.com/((test)">http://example.com/((test)</a></p>
6115 <p>(<a rel="mw:ExtLink" class="external free" href="http://example.com/(test))">http://example.com/(test))</a></p>
6116 <p>(<a rel="mw:ExtLink" class="external free" href="http://example.com/(test)))))">http://example.com/(test)))))</a></p>
6117 <p><a rel="mw:ExtLink" class="external free" href="http://example.com/a)b">http://example.com/a)b</a></p>
6118 <p><a rel="mw:ExtLink" class="external text" href="http://example.com)">foo</a></p>
6122 Parenthesis in external links, w/ transclusion or comment
6124 (http://example.com/{{echo|hi}})
6126 (http://example.com<!-- hi -->)
6128 <p>(<a rel="nofollow" class="external free" href="http://example.com/hi">http://example.com/hi</a>)
6129 </p><p>(<a rel="nofollow" class="external free" href="http://example.com">http://example.com</a>)
6132 <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>
6134 <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>
6138 Serialize <a> tags with invalid link targets as plain text
6140 parsoid={ "modes": ["html2wt"], "suppressErrors": true }
6142 <a rel="mw:WikiLink" href="[[foo]]">text</a>
6143 <a rel="mw:WikiLink" href="[[foo]]">*text</a>
6144 <a rel="mw:WikiLink" href="[[foo]]">[[foo]]</a>
6145 <a rel="mw:WikiLink" href="[[foo]]">*a [[foo]]</a>
6148 <nowiki>*</nowiki>text
6149 <nowiki>[[foo]]</nowiki>
6150 <nowiki>*</nowiki>a <nowiki>[[foo]]</nowiki>
6154 mw:ExtLink -vs- mw:WikiLink (T94723)
6158 <a rel="mw:WikiLink" href="./Foo" title="Foo" data-parsoid='{"stx":"piped","a":{"href":"./Foo"},"sa":{"href":"Foo"}}'>Bar</a>
6159 <a rel="mw:WikiLink" href="./Foo" title="Foo">Bar</a>
6160 <a rel="mw:WikiLink" href="http://en.wikipedia.org/wiki/Foo" title="Foo">Bar</a>
6161 <a rel="mw:ExtLink" href="http://en.wikipedia.org/wiki/Foo" title="Foo">Bar</a>
6163 <a rel="mw:ExtLink" href="http://en.wikipedia.org/wiki/European_Robin">European Robin</a>
6164 <a rel="mw:WikiLink" href="http://en.wikipedia.org/wiki/European_Robin">European Robin</a>
6172 [[:en:European_Robin|European Robin]]
6173 [[:en:European_Robin|European Robin]]
6177 mw:ExtLink linking to a interwiki URL can be round-tripped losslessly (T94723)
6181 [http://en.wikipedia.org/wiki/European_Robin European Robin]
6183 THIS SECTION IS NOT USED (but Parsoid won't run the test without it)
6194 Normal text. '''Bold text.''' Normal text. ''Italic text.''
6196 Normal text. '''''Bold italic text.''''' Normal text.
6198 <p>Normal text. <b>Bold text.</b> Normal text. <i>Italic text.</i>
6199 </p><p>Normal text. <i><b>Bold italic text.</b></i> Normal text.
6204 Quotes wrapping HTML table
6206 '''<table><tr><td>hi</td></tr></table>'''
6208 <b><table><tbody><tr><td>hi</td></tr></tbody></table></b>
6210 <b><table data-parsoid='{"stx":"html"}'><tbody><tr data-parsoid='{"stx":"html"}'><td data-parsoid='{"stx":"html"}'>hi</td></tr></tbody></table></b>
6213 # Parsoid inserts an empty bold tag pair at the end of the line, that the PHP
6214 # parser strips. The wikitext contains just the first half of the bold
6217 Unclosed and unmatched quotes
6219 '''''Bold italic text '''with bold deactivated''' in between.'''''
6221 '''''Bold italic text ''with italic deactivated'' in between.'''''
6225 ..spanning two paragraphs (should not work).'''
6227 '''Bold tag left open
6229 ''Italic tag left open
6233 <!-- Unmatching number of opening, closing tags: -->
6234 '''This year''''s election ''should'' beat '''last year''''s.
6236 ''Tom'''s car is bigger than ''Susan'''s.
6238 Plain ''italic'''s plain
6240 <p><i><b>Bold italic text </b>with bold deactivated<b> in between.</b></i>
6241 </p><p><b><i>Bold italic text </i>with italic deactivated<i> in between.</i></b>
6242 </p><p><b>Bold text..</b>
6243 </p><p>..spanning two paragraphs (should not work).
6244 </p><p><b>Bold tag left open</b>
6245 </p><p><i>Italic tag left open</i>
6247 </p><p><b>This year'</b>s election <i>should</i> beat <b>last year'</b>s.
6248 </p><p><i>Tom<b>s car is bigger than </b></i><b>Susan</b>s.
6249 </p><p>Plain <i>italic'</i>s plain
6252 <p><i><b>Bold italic text </b>with bold deactivated<b> in between.</b></i>
6253 </p><p><b><i>Bold italic text </i>with italic deactivated<i> in between.</i></b>
6254 </p><p><b>Bold text..</b>
6255 </p><p>..spanning two paragraphs (should not work).<b></b>
6256 </p><p><b>Bold tag left open</b>
6257 </p><p><i>Italic tag left open</i>
6260 <!-- Unmatching number of opening, closing tags: -->
6261 <p><b>This year'</b>s election <i>should</i> beat <b>last year'</b>s.
6262 </p><p><i>Tom<b>s car is bigger than </b></i><b>Susan</b>s.
6263 </p><p>Plain <i>italic'</i>s plain
6270 ### some content taken from http://meta.wikimedia.org/wiki/MediaWiki_User%27s_Guide:_Using_tables
6273 # This should not produce <table></table> as <table><tr><td></td></tr></table>
6274 # is the bare minimum required by the spec, see:
6275 # https://www.w3.org/TR/xhtml-modularization/dtd_module_defs.html#a_module_Basic_Tables
6276 # Parsoid team replies: empty table tags are legal in HTML5
6278 A table with no data.
6291 A table with stray table end tags on start tag line (wt2html)
6295 {|style="color: red;"|}
6297 {|style="color: red;" |}
6301 {|style="color: red;"|} id="foo"
6305 {|style="color: red;" |} id="foo"
6309 <table style="color: red;">
6311 </table><table style="color: red;">
6314 </td></tr></tbody></table>
6315 <table style="color: red;" id="foo">
6318 </td></tr></tbody></table>
6319 <table style="color: red;" id="foo">
6322 </td></tr></tbody></table>
6324 <table style="color: red;"></table>
6326 <table style="color: red;">
6332 <table style="color: red;" id="foo">
6338 <table style="color: red;" id="foo">
6347 A table with no data (take 2)
6355 # A table with nothing but a caption is invalid XHTML, we might want to render
6356 # this as <p>caption</p>
6357 # Parsoid team replies: table with only a caption is legal in HTML5
6359 A table with nothing but a caption
6367 </caption><tr><td></td></tr></table>
6370 <table><caption>caption</caption></table>
6374 A table with caption with default-spaced attributes and a table row
6377 |+ style="color: red;" |caption1
6383 <caption style="color: red;">caption1
6392 A table with captions with non-default spaced attributes and a table row
6395 |+style="color: red;"|caption2
6396 |+ style="color: red;"|caption3
6402 <caption style="color: red;">caption2
6404 <caption style="color: red;">caption3
6413 Table td-cell syntax variations
6418 |style='color:red;'|baz
6419 |style='color:red;'||baz
6426 <td>foo bar foo</td>
6429 <td style="color:red;">baz
6431 <td>style='color:red;'</td>
6459 Simple table but with multiple dashes for row wikitext
6478 Multiplication table
6480 {| border="1" cellpadding="2"
6481 |+Multiplication table
6501 <table border="1" cellpadding="2">
6502 <caption>Multiplication table
6549 Accept "||" in table headings
6564 Accept "!!" in table data
6578 <tbody><tr data-parsoid='{"autoInsertedEnd":true,"autoInsertedStart":true}'><td data-parsoid='{"autoInsertedEnd":true}'> Foo!! </td><td data-parsoid='{"stx":"row","autoInsertedEnd":true}'></td></tr>
6583 Accept "||" in indented table headings
6593 </th></tr></table></dd></dl>
6598 Accept "!!" in templates
6612 <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>
6616 Accept "!!" in table headings after newline
6633 <p>b!!c</p></th></tr>
6638 Accept "!!" in table data of mixed wikitext / html syntax
6642 <tr><td>b!!c</td></tr>
6648 </th></tr><tr><td>b!!c</td></tr>
6652 <tbody><tr><th>a</th></tr>
6653 <tr data-parsoid='{"stx":"html"}'><td data-parsoid='{"stx":"html"}'>b!!c</td></tr>
6658 Accept empty attributes in td/th cells (td/th cells starting with leading ||)
6675 Accept "| !" at start of line in tables (ignore !-attribute)
6679 |!style="color:red"|bar
6691 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 +/-
6695 |style='color:red;'|+1
6696 |style='color:blue;'|-1
6708 <td style="color:red;">+1
6710 <td style="color:blue;">-1
6734 |rowspan=2|Cell 2, row 1 (and 2)
6745 <td rowspan="2">Cell 2, row 1 (and 2)
6763 {| bgcolor=#ABCDEF border=2
6768 |the original table again
6776 <table bgcolor="#ABCDEF" border="2">
6784 <td>the original table again
6790 Invalid attributes in table cell (T3830)
6804 Table cell attributes: Pipes protected by nowikis should be treated as a plain character
6808 |title="foo<nowiki>|</nowiki>" |bar
6809 |title="foo<nowiki>|</nowiki>" bar
6816 <td title="foo|">bar
6818 <td>title="foo|" bar
6823 <tbody><tr><td title="foo">bar</td>
6824 <td title="foo|" about="#mwt3" typeof="mw:ExpandedAttrs" data-parsoid='{"a":{"title":"foo|"},"sa":{"title":"foo<nowiki>|</nowiki>"}}' data-mw='{"attribs":[[{"txt":"title"},{"html":"foo<span typeof=\"mw:Nowiki\" data-parsoid='{\"dsr\":[32,50,8,9]}'>|</span>"}]]}'>bar</td>
6825 <td>title="foo<span typeof="mw:Nowiki">|</span>" bar</td></tr>
6829 # See: http://lists.wikimedia.org/mailman/htdig/wikitech-l/2006-April/022293.html
6830 # N.B. The "|}" to close the table is missing from the input, so parsoid's
6831 # *2wt modes will fail.
6833 Table security: embedded pipes
6835 parsoid=wt2html,html2html
6838 | |[ftp://|x||]" onmouseover="alert(document.cookie)">test
6842 <td>[<a rel="nofollow" class="external free" href="ftp://%7Cx">ftp://%7Cx</a></td>
6843 <td>]" onmouseover="alert(document.cookie)">test
6851 <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>
6855 Element attributes with double ! should not be broken up by <th>
6858 !hi <div class="!!">ha</div> ho
6863 <th>hi <div class="!!">ha</div> ho
6868 <tbody><tr><th>hi <div class="!!" data-parsoid='{"stx":"html"}'>ha</div> ho</th></tr>
6873 ! and || in element attributes should not be parsed as <th>/<td>
6876 |<div style="color: red !important;" data-contrived="put this here ||">hi</div>
6881 <td><div style="color: red !important;" data-contrived="put this here ||">hi</div>
6886 <tbody><tr><td><div style="color: red !important;" data-contrived="put this here ||" data-parsoid='{"stx":"html"}'>hi</div></td></tr>
6890 # FIXME: The output seems broken. Filed as T110268.
6892 ! and || in td attributes should not be parsed as <th>/<td>
6897 |style="color: red !important;" data-contrived="put this here ||"|foo
6902 <td>style="color: red !important;" data-contrived="put this here</td>
6908 <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>
6913 Break on | in element attribute in template
6915 parsoid=wt2html,html2html
6917 {{echo|1=<div class="hi|ho">ha</div>}}
6919 <p>ho">ha</div>
6922 <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>
6926 Break on | in element attribute name in template
6928 {{echo|<div cla|ss="hiho">ha</div>}}
6930 <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>
6934 Don't break on | in extension attribute in template
6936 {{echo|<ref name="hi|ho">ha</ref>}}
6940 <p><sup about="#mwt2" class="mw-ref" id="cite_ref-hi|ho_1-0" rel="dc:references" typeof="mw:Transclusion mw:Extension/ref" data-mw='{"parts":[{"template":{"target":{"wt":"echo","href":"./Template:Echo"},"params":{"1":{"wt":"<ref name=\"hi|ho\">ha</ref>"}},"i":0}}]}'><a href="./Parser_test#cite_note-hi|ho-1" style="counter-reset: mw-Ref 1;"><span class="mw-reflink-text">[1]</span></a></sup></p>
6942 <ol class="mw-references references" typeof="mw:Extension/references" about="#mwt5" data-mw='{"name":"references","attrs":{}}'><li about="#cite_note-hi|ho-1" id="cite_note-hi|ho-1"><a href="./Parser_test#cite_ref-hi|ho_1-0" rel="mw:referencedBy"><span class="mw-linkback-text">↑ </span></a> <span id="mw-reference-text-cite_note-hi|ho-1" class="mw-reference-text">ha</span></li></ol>
6945 ## We don't support roundtripping of these attributes in Parsoid.
6946 ## Selective serialization takes care of preventing dirty diffs.
6947 ## But, on edits, we dirty-diff the invalid attribute text.
6949 Invalid text in table attributes should be discarded
6953 {| <span>boo</span> style='border:1px solid black'
6954 | <span>boo</span> style='color:blue' |1
6955 |<span>boo</span> style='color:blue'|2
6958 <table style="border:1px solid black">
6960 <td style="color:blue">1
6962 <td style="color:blue">2
6966 <table style="border:1px solid black">
6968 <td style="color:blue">1</td>
6969 <td style="color:blue">2</td>
6975 Invalid text in table attributes should be preserved by selective serializer
6978 "modes": ["selser"],
6980 ["td:first-child", "text", "abc"],
6981 ["td + td", "text", "xyz"]
6985 {| <span>boo</span> style='border:1px solid black'
6986 | <span>boo</span> style='color:blue' | 1
6987 |<span>boo</span> style='color:blue'| 2
6990 {| <span>boo</span> style='border:1px solid black'
6991 | <span>boo</span> style='color:blue' | abc
6992 |<span>boo</span> style='color:blue'| xyz
6997 1. Template-generated table cell attributes and cell content
7002 || {{table_attribs_5}}
7003 | <!--foo--> <!--bar--> <!--baz--> {{table_attribs}}
7004 |align=center {{table_attribs}}
7005 | <!--foo--> align=center <!--bar--> {{table_attribs}}
7010 <td style="color:red;">Foo
7012 <td style="color:red;">Foo
7014 <td>style="color:red;"</td>
7017 <td style="color:red;">Foo
7019 <td align="center" style="color:red;">Foo
7021 <td align="center" style="color:red;">Foo
7027 2. Template-generated table cell attributes and cell content
7030 |{{table_attribs_2}}
7035 <td style="color:red;">Foo
7043 <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>
7044 <td about="#mwt1">Bar</td><td about="#mwt1">Baz</td></tr>
7049 3. Template-generated table cell attributes and cell content
7052 !align=center {{table_header_cells}}
7054 |align=center {{table_cells}}
7059 <th align="center" style="color:red;">Foo</th>
7060 <th style="color:red;"><i>Bar</i></th>
7061 <th style="color:brown;"><i>Foo</i> and Baz
7064 <td align="center" style="color:red;">Foo</td>
7065 <td style="color:red;"><i>Bar</i></td>
7066 <td style="color:brown;"><i>Foo</i> and Baz
7071 <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>
7072 <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>
7077 4. Template-generated table cell attributes and cell content inside a templated table
7080 !align=center {{table_header_cells}}
7082 |align=center {{table_cells}}
7087 <th align="center" style="color:red;">Foo</th>
7088 <th style="color:red;"><i>Bar</i></th>
7089 <th style="color:brown;"><i>Foo</i> and Baz
7092 <td align="center" style="color:red;">Foo</td>
7093 <td style="color:red;"><i>Bar</i></td>
7094 <td style="color:brown;"><i>Foo</i> and Baz
7098 <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}}]}'>
7099 <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>
7101 <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>
7105 ## Edge case fix to prevent future regressions
7107 T107652: <ref>s in templates that also generate table cell attributes should be rendered properly
7110 |{{table_attribs_7}}
7115 <tbody><tr><td style="background:#f9f9f9;" typeof="mw:Transclusion" about="#mwt1" data-mw='{"parts":["|",{"template":{"target":{"wt":"table_attribs_7","href":"./Template:Table_attribs_7"},"params":{},"i":0}}]}'>Foo<sup class="mw-ref" id="cite_ref-1" rel="dc:references" typeof="mw:Extension/ref" data-mw='{"name":"ref","attrs":{},"body":{"id":"mw-reference-text-cite_note-1"}}'><a href="./Parser_test#cite_note-1" style="counter-reset: mw-Ref 1;"><span class="mw-reflink-text">[1]</span></a></s></td></tr>
7117 <ol class="mw-references references" typeof="mw:Extension/references" about="#mwt5" data-mw='{"name":"references","attrs":{}}'><li about="#cite_note-1" id="cite_note-1"><a href="./Parser_test#cite_ref-1" rel="mw:referencedBy"><span class="mw-linkback-text">↑ </span></a> <span id="mw-reference-text-cite_note-1" class="mw-reference-text" data-parsoid="{}">foo</span></li></ol>
7121 Table with row followed by newlines and table heading
7123 parsoid=wt2html,html2html
7141 Table with empty line following the start tag
7143 parsoid=wt2html,html2html
7161 Table attributes with empty value
7163 parsoid=wt2html,html2html
7176 <tbody><tr><td style="">hello</td></tr>
7181 Wikitext table with a lot of comments
7204 Wikitext table comments represented in parsoid dom
7206 {|<!--c1--><!--c2-->
7215 </td></tr></tbody></table>
7217 <table><!--c1--><!--c2-->
7218 <tbody><tr data-parsoid='{"startTagSrc":"|-","autoInsertedEnd":true}'><!--c3-->
7219 <td data-parsoid='{"autoInsertedEnd":true}'>x</td></tr>
7224 Wikitext table with double-line table cell
7241 Table cell with a single comment
7258 Table-cell after a comment-only-empty-line
7275 <tbody><tr data-parsoid='{"autoInsertedEnd":true,"autoInsertedStart":true}'><td data-parsoid='{"autoInsertedEnd":true}'>a</td>
7277 <!--c2--><td data-parsoid='{"autoInsertedEnd":true}'>b</td></tr>
7283 Build table with {{!}}
7285 {{{!}} class="wikitable"
7288 {{!}}- style="color:red;"
7289 {{!}}data{{!}}{{!}} style="color:red;" {{!}}second data
7292 <table class="wikitable">
7298 <tr style="color:red;">
7300 <td style="color:red;">second data
7306 Build table with pipe as data
7308 {| class="wikitable"
7311 |- style="color:red;"
7312 |data|| style="color:red;" |second data
7314 | style="color:red;" |data with | || style="color:red;" | second data with |
7316 ||data with | |||second data with |
7319 <table class="wikitable">
7325 <tr style="color:red;">
7327 <td style="color:red;">second data
7330 <td style="color:red;">data with |</td>
7331 <td style="color:red;">second data with |
7334 <td>data with |</td>
7335 <td>second data with |
7341 Build table with wikilink
7343 {| class="wikitable"
7344 !header||second header
7345 |- style="color:red;"
7346 |data [[Main Page|linktext]]||second data [[Main Page|linktext]]
7348 |data||second data [[Main Page|link|text with pipe]]
7351 <table class="wikitable">
7356 <tr style="color:red;">
7357 <td>data <a href="/wiki/Main_Page" title="Main Page">linktext</a></td>
7358 <td>second data <a href="/wiki/Main_Page" title="Main Page">linktext</a>
7362 <td>second data <a href="/wiki/Main_Page" title="Main Page">link|text with pipe</a>
7367 # The expected HTML structure in this test is debatable. The PHP parser does
7368 # not parse this kind of table at all. The main focus for Parsoid is on
7369 # round-tripping, so this output is ok for now. TODO: revisit!
7371 Wikitext table with html-syntax row
7381 <td>foo</td></tr></tbody></table>
7384 ## Remex doesn't account for fostered content.
7386 Fostered content in tables: Plain text
7406 <p data-parsoid='{"fostered":true,"autoInsertedEnd":true,"autoInsertedStart":true}'>
7409 <tbody><tr class="mw-empty-elt" data-parsoid='{"startTagSrc":"|-"}'></tr></tbody></table>
7413 Fostered content in tables: Lists
7415 parsoid=wt2html,html2html
7428 <ul><li>a</li></ul><table>
7433 <ul data-parsoid='{"fostered":true,"autoInsertedEnd":true}'><li>a</li></ul><table>
7434 <tbody><tr data-parsoid='{"startTagSrc":"|-","autoInsertedEnd":true}'>
7436 </tr></tbody></table>
7440 Template generated table cell with attributes
7444 {{table_attribs_4}} ||a||b
7450 <td style="background-color:#DC241f;" width="10px"></td>
7453 </td></tr></tbody></table>
7456 <tbody><tr data-parsoid='{"startTagSrc":"|-","autoInsertedEnd":true}'>
7457 <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>
7461 Parsoid: Round-trip tables directly followed by content (T53219)
7463 parsoid=wt2html,wt2wt
7476 </td></tr></tbody></table><p> bar
7480 </td></tr></tbody></table><p><b>quux</b>
7485 Parsoid: Default to a newline after tables in new content (T53219)
7490 <tr><td>foo</td></tr></tbody></table> bar
7492 <tr><td>baz</td></tr></tbody></table><b>quux</b>
7497 <nowiki> </nowiki>bar
7505 Parsoid: Row-syntax table headings followed by comment & table cells
7507 parsoid=wt2html,wt2wt
7511 <!-- foo --> ||baz||quux
7525 <tbody><tr><th>foo</th><th>bar
7526 <!-- foo --></th><td> baz </td><td>quux</td></tr>
7531 Parsoid: Recover better from broken table attributes
7545 </td></tr></tbody></table>
7550 <p>foo</p></td></tr>
7554 # Note: PHP parser omits empty rows
7556 Tables: Digest broken attributes on table and tr tag
7572 <tr class='mw-empty-elt'></tr>
7573 <tr class='mw-empty-elt'></tr>
7578 Table with missing opening <tr> tag
7580 parsoid=wt2html,wt2wt
7588 <tbody><tr><td>foo</td>
7593 # T137406: Whitespace in the HTML
7595 1. Generate correct wikitext for tables with thead/tbody/tfoot
7600 <caption>Test</caption>
7662 </td></tr></tbody></table>
7665 # T137406: No whitespace in the HTML
7667 2. Generate correct wikitext for tables with thead/tbody/tfoot
7671 <table><thead><tr><th>heading</th></tr></thead><tbody><tr><td>foo</td></tr></tbody></table>
7681 Wikitext tables can be nested inside HTML tables
7685 <table data-parsoid='{"stx":"html"}'>
7688 <tr><td>foo</td></tr>
7706 </td></tr></tbody></table>
7715 Plain link, capitalized
7719 <p><a href="/wiki/Main_Page" title="Main Page">Main Page</a>
7724 Plain link, uncapitalized
7728 <p><a href="/wiki/Main_Page" title="Main Page">main Page</a>
7735 [[Main Page|The Main Page]]
7737 <p><a href="/wiki/Main_Page" title="Main Page">The Main Page</a>
7742 Piped link with comment in link text
7744 [[Main Page|The Main<!--front--> Page]]
7746 <p><a href="/wiki/Main_Page" title="Main Page">The Main Page</a>
7751 Piped link with multiple pipe characters in link text
7753 [[Main Page||The|Main|Page|]]
7755 <p><a href="/wiki/Main_Page" title="Main Page">|The|Main|Page|</a>
7758 <p><a rel="mw:WikiLink" href="./Main_Page" title="Main Page">|The|Main|Page|</a></p>
7762 Piped link with no link text
7764 [[Thomas Bek (bishop of St David's)|]]
7766 <p>[[Thomas Bek (bishop of St David's)|]]
7769 <p>[[Thomas Bek (bishop of St David's)|]]</p>
7773 Piped link with empty link text
7775 [[Main Page|<nowiki/>]] - empty nowiki
7776 [[Main Page| ]] - empty space
7777 [[Main Page| ]] - empty non breaking space
7779 <p><a href="/wiki/Main_Page" title="Main Page"></a> - empty nowiki
7780 <a href="/wiki/Main_Page" title="Main Page"> </a> - empty space
7781 <a href="/wiki/Main_Page" title="Main Page"> </a> - empty non breaking space
7784 <p><a rel="mw:WikiLink" href="./Main_Page" title="Main Page"><span typeof="mw:Nowiki"></span></a> - empty nowiki
7785 <a rel="mw:WikiLink" href="./Main_Page" title="Main Page"> </a> - empty space
7786 <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>
7794 <p><a href="/index.php?title=Zigzagzogzagzig&action=edit&redlink=1" class="new" title="Zigzagzogzagzig (page does not exist)">Zigzagzogzagzig</a>
7799 Broken link with fragment
7801 [[Zigzagzogzagzig#zug]]
7803 <p><a href="/index.php?title=Zigzagzogzagzig&action=edit&redlink=1" class="new" title="Zigzagzogzagzig (page does not exist)">Zigzagzogzagzig#zug</a>
7808 Special page link with fragment
7810 [[Special:Version#anchor]]
7812 <p><a href="/wiki/Special:Version#anchor" title="Special:Version">Special:Version#anchor</a>
7817 Nonexistent special page link with fragment
7819 [[Special:ThisNameWillHopefullyNeverBeUsed#anchor]]
7821 <p><a href="/wiki/Special:ThisNameWillHopefullyNeverBeUsed" class="new" title="Special:ThisNameWillHopefullyNeverBeUsed (page does not exist)">Special:ThisNameWillHopefullyNeverBeUsed#anchor</a>
7828 xxx[[main Page]], xxx[[Main Page]], Xxx[[main Page]] XXX[[main Page]], XXX[[Main Page]]
7830 <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>
7837 [[Main Page]]xxx, [[Main Page]]XXX, [[Main Page]]!!!
7839 <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>!!!
7850 T45661: Piped links with identical prefixes
7852 [[prefixed article|prefixed articles with spaces]]
7854 [[prefixed article|prefixed articlesaoeu]]
7856 [[Main Page|Main Page test]]
7858 <p><a href="/wiki/Prefixed_article" title="Prefixed article">prefixed articles with spaces</a>
7859 </p><p><a href="/wiki/Prefixed_article" title="Prefixed article">prefixed articlesaoeu</a>
7860 </p><p><a href="/wiki/Main_Page" title="Main Page">Main Page test</a>
7866 Link with HTML entity in suffix / tail
7868 [[Main Page]]", [[Main Page]]a
7870 <p><a href="/wiki/Main_Page" title="Main Page">Main Page</a>", <a href="/wiki/Main_Page" title="Main Page">Main Page</a>a
7873 <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>
7877 Link with 3 brackets
7888 Link with 4 brackets
7892 <p>[[<a href="/wiki/Main_Page" title="Main Page">Main Page</a>]]
7897 Piped link with 3 brackets
7899 [[[main page|the main page]]]
7901 <p>[[[main page|the main page]]]
7906 Piped link with extlink-like text
7909 [[Main Page|This is a [bar]]]
7912 <p><a href="/wiki/Main_Page" title="Main Page">[bar]</a>
7913 <a href="/wiki/Main_Page" title="Main Page">This is a [bar]</a>
7914 <a href="/wiki/Main_Page" title="Main Page">[bar</a>
7917 <p><a rel="mw:WikiLink" href="./Main_Page" title="Main Page" data-parsoid='{"stx":"piped"}'>[bar]</a>
7918 <a rel="mw:WikiLink" href="./Main_Page" title="Main Page" data-parsoid='{"stx":"piped"}'>This is a [bar]</a>
7919 <a rel="mw:WikiLink" href="./Main_Page" title="Main Page" data-parsoid='{"stx":"piped"}'>[bar</a></p>
7923 Link with multiple pipes
7925 [[Main Page|The|Main|Page]]
7927 <p><a href="/wiki/Main_Page" title="Main Page">The|Main|Page</a>
7932 Anchor containing a #. (T65430)
7934 wgFragmentMode=[ 'html5', 'legacy' ]
7936 [[Main Page#And#Link]]
7938 <p><a href="/wiki/Main_Page#And#Link" title="Main Page">Main Page#And#Link</a>
7941 <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>
7947 [[Talk:Parser testing]], [[Meta:Disclaimers]]
7949 <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>
7954 Link with space in namespace
7956 [[User talk:Foo bar]]
7958 <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>
7963 MemoryAlpha:AlphaTest
7965 This is an article in the MemoryAlpha namespace
7966 (which shadows the memoryalpha interwiki link).
7970 Namespace takes precedence over interwiki link (T53680)
7972 [[MemoryAlpha:AlphaTest]]
7974 <p><a href="/wiki/MemoryAlpha:AlphaTest" title="MemoryAlpha:AlphaTest">MemoryAlpha:AlphaTest</a>
7978 # The previous test doesn't work correctly in html2*, due to not recognizing the
7979 # link as an internal one. This one checks for the correct behavior.
7981 Link to namespace preferred over interwiki with correct rel attribute
7983 parsoid=html2wt,html2html
7985 <p><a rel="mw:WikiLink" href="./MemoryAlpha:AlphaTest" title="MemoryAlpha:AlphaTest">MemoryAlpha:AlphaTest</a></p>
7987 [[MemoryAlpha:AlphaTest]]
7991 Piped link to namespace
7993 [[Meta:Disclaimers|The disclaimers]]
7995 <p><a href="/index.php?title=Meta:Disclaimers&action=edit&redlink=1" class="new" title="Meta:Disclaimers (page does not exist)">The disclaimers</a>
8002 [[Usually caused by a typo (oops}]]
8004 <p>[[Usually caused by a typo (oops}]]
8011 Just a test of an article title containing a percent.
8015 Link containing % (not as a hex sequence)
8018 [[7% Solution|7%25 Solution]]
8020 <p><a href="/wiki/7%25_Solution" title="7% Solution">7% Solution</a>
8021 <a href="/wiki/7%25_Solution" title="7% Solution">7%25 Solution</a>
8024 <p><a rel="mw:WikiLink" href="./7%25_Solution" title="7% Solution">7% Solution</a>
8025 <a rel="mw:WikiLink" href="./7%25_Solution" title="7% Solution">7%25 Solution</a></p>
8028 # note that the parsoid HTML is identical to the previous test output,
8029 # so the previous test ensures that the html2wt mode will generate the
8030 # "not as a hex sequence" wikitext.
8032 Link containing % as a single hex sequence interpreted to char
8034 parsoid=wt2wt,wt2html,html2html
8037 [[7%25 Solution|7%25 Solution]]
8039 <p><a href="/wiki/7%25_Solution" title="7% Solution">7% Solution</a>
8040 <a href="/wiki/7%25_Solution" title="7% Solution">7%25 Solution</a>
8043 <p><a rel="mw:WikiLink" href="./7%25_Solution" title="7% Solution">7% Solution</a>
8044 <a rel="mw:WikiLink" href="./7%25_Solution" title="7% Solution">7%25 Solution</a></p>
8048 Link containing % as a double hex sequence interpreted to hex sequence
8052 <p>[[7%2525 Solution]]
8056 ## Example for such a section: == < ==
8058 Link containing "#<" and "#>" % as a hex sequences- these are valid section anchors
8062 wgFragmentMode=[ 'html5', 'legacy' ]
8064 [[%23%3c]][[%23%3e]]
8066 <p><a href="#<">#<</a><a href="#>">#></a>
8069 <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>
8072 ## Example for such a section: == < ==
8074 Link containing "#<" and "#>" % as a hex sequences- these are valid section anchors (legacy)
8076 wgFragmentMode=[ 'legacy' ]
8078 [[%23%3c]][[%23%3e]]
8080 <p><a href="#.3C">#<</a><a href="#.3E">#></a>
8085 Link containing "<#" and ">#" as a hex sequences
8087 [[%3c%23]][[%3e%23]]
8089 <p>[[%3c%23]][[%3e%23]]
8094 Link containing an equals sign
8096 [[Special:BookSources/isbn=4-00-026157-6]]
8098 <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>
8101 <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>
8107 Just a test of an article title containing an ampersand
8111 Link containing an ampersand
8117 [[Foo &amp; bar]]
8119 <p><a href="/wiki/Foo_%26_bar" title="Foo & bar">Foo & bar</a>
8120 </p><p><a href="/wiki/Foo_%26_bar" title="Foo & bar">Foo & bar</a>
8121 </p><p>[[Foo &amp; bar]]
8124 <p><a rel="mw:WikiLink" href="./Foo_&_bar" title="Foo & bar">Foo & bar</a></p>
8125 <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>
8126 <p>[[Foo <span typeof="mw:Entity" data-parsoid='{"src":"&amp;","srcContent":"&"}'>&</span>amp; bar]]</p>
8132 Just a test of an article title containing a tilde.
8135 # note that links containing signatures, like [[Foo~~~~]], are
8136 # massaged by the pre-save transform (PST) and so the tildes are never
8137 # seen by the parser.
8139 Link containing a tilde
8143 <p><a href="/wiki/Foo~bar" title="Foo~bar">Foo~bar</a>
8146 <p><a rel="mw:WikiLink" href="./Foo~bar" title="Foo~bar">Foo~bar</a></p>
8150 Link containing double-single-quotes '' (T6598)
8152 [[Lista d''e paise d''o munno]]
8154 <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>
8157 <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>
8161 Link containing double quotes and spaces
8165 <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>
8168 <p><a rel="mw:WikiLink" href='./Cool_"Gator"' title='Cool "Gator"'>Cool "Gator"</a></p>
8172 File containing double quotes and spaces
8174 [[File:Cool "Gator".png]]
8176 <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>
8180 Redirect containing double quotes and spaces
8182 #REDIRECT [[Cool "Gator"]]
8184 <link rel="mw:PageProp/redirect" href="./Cool_%22Gator%22" data-parsoid='{"src":"#REDIRECT ","a":{"href":"./Cool_%22Gator%22"},"sa":{"href":"Cool \"Gator\""}}'/>
8188 Link containing double-single-quotes '' in text (T6598 sanity check)
8190 Some [[Link|pretty ''italics'' and stuff]]!
8192 <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>!
8195 <p>Some <a rel="mw:WikiLink" href="./Link" title="Link">pretty <i>italics</i> and stuff</a>!</p>
8199 Link containing double-single-quotes '' in text embedded in italics (T6598 sanity check)
8201 ''Some [[Link|pretty ''italics'' and stuff]]!''
8203 <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>
8208 Link with double quotes in title part (literal) and alternate part (interpreted)
8210 [[File:Denys_Savchenko_''Pentecoste''.jpg]]
8214 [[''Pentecoste''|Pentecoste]]
8216 [[''Pentecoste''|''Pentecoste'']]
8218 <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>
8219 </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>
8220 </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>
8221 </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>
8224 <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>
8225 <p><a rel="mw:WikiLink" href="./''Pentecoste''" title="''Pentecoste''">''Pentecoste''</a></p>
8226 <p><a rel="mw:WikiLink" href="./''Pentecoste''" title="''Pentecoste''">Pentecoste</a></p>
8227 <p><a rel="mw:WikiLink" href="./''Pentecoste''" title="''Pentecoste''"><i>Pentecoste</i></a></p>
8231 Broken image links with HTML captions (T41700)
8233 [[File:Nonexistent|<script></script>]]
8234 [[File:Nonexistent|100x100px|<script></script>]]
8235 [[File:Nonexistent|<]]
8236 [[File:Nonexistent|a<i>b</i>c]]
8238 <p><a href="/index.php?title=Special:Upload&wpDestFile=Nonexistent" class="new" title="File:Nonexistent"><script></script></a>
8239 <a href="/index.php?title=Special:Upload&wpDestFile=Nonexistent" class="new" title="File:Nonexistent"><script></script></a>
8240 <a href="/index.php?title=Special:Upload&wpDestFile=Nonexistent" class="new" title="File:Nonexistent"><</a>
8241 <a href="/index.php?title=Special:Upload&wpDestFile=Nonexistent" class="new" title="File:Nonexistent">abc</a>
8244 <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>
8245 <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>
8246 <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>
8247 <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>
8253 [[http://www.example.com]]
8255 <p>[<a rel="nofollow" class="external autonumber" href="http://www.example.com">[1]</a>]
8258 <p>[<a rel="mw:ExtLink" class="external autonumber" href="http://www.example.com"></a>]</p>
8262 Plain link to URL with link text
8264 [[http://www.example.com Link text]]
8266 <p>[<a rel="nofollow" class="external text" href="http://www.example.com">Link text</a>]
8271 Plain link to protocol-relative URL
8273 [[//www.example.com]]
8275 <p>[<a rel="nofollow" class="external autonumber" href="//www.example.com">[1]</a>]
8278 <p>[<a rel="mw:ExtLink" class="external autonumber" href="//www.example.com"></a>]</p>
8282 Plain link to protocol-relative URL with link text
8284 [[//www.example.com Link text]]
8286 <p>[<a rel="nofollow" class="external text" href="//www.example.com">Link text</a>]
8291 Plain link to page with question mark in title
8297 <p><a href="/wiki/A%3Fb" title="A?b">A?b</a>
8298 </p><p><a href="/wiki/A%3Fb" title="A?b">Baz</a>
8302 # I'm fairly sure the expected result here is wrong.
8303 # We want these to be URL links, not pseudo-pages with URLs for titles....
8304 # However the current output is also pretty screwy.
8307 # I'm changing it to match the current output--it arguably makes more
8308 # sense in the light of the test above. Old expected result was:
8309 #<p>Piped link to URL: <a href="/index.php?title=Http://www.example.com&action=edit" class="new">an example URL</a>
8311 # But I think this test is bordering on "garbage in, garbage out" anyway.
8316 Piped link to URL: [[http://www.example.com|an example URL]]
8318 <p>Piped link to URL: [<a rel="nofollow" class="external text" href="http://www.example.com%7Can">example URL</a>]
8321 <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>
8325 Plain link in template argument
8329 {{echo|[http://www.example.com |123]}}
8331 {{echo|[[http://www.example.com |123]]}}
8333 {{echo|[[http://www.example.com |123]}}
8335 {{echo|[http://www.example.com |123]]}}
8337 <p>[<a rel="nofollow" class="external free" href="http://www.example.com">http://www.example.com</a>
8338 </p><p>[<a rel="nofollow" class="external text" href="http://www.example.com">|123</a>]
8339 </p><p>{{echo|[<a rel="nofollow" class="external text" href="http://www.example.com">|123</a>}}
8340 </p><p>[<a rel="nofollow" class="external free" href="http://www.example.com">http://www.example.com</a>
8343 <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>
8345 <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>
8347 <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>
8349 <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>
8353 T2002: [[page|http://url/]] should link to page, not http://url/
8355 [[Main Page|http://url/]]
8357 <p><a href="/wiki/Main_Page" title="Main Page">http://url/</a>
8360 <p><a rel="mw:WikiLink" href="./Main_Page" title="Main Page">http://url/</a></p>
8363 # Parsoid does not mark self-links, by design.
8365 T2337: Escaped self-links should be bold
8369 [[Bug462]] [[Bug462]]
8371 <p><a class="mw-selflink selflink">Bug462</a> <a class="mw-selflink selflink">Bug462</a>
8374 <p><a rel="mw:WikiLink" href="./Bug462" title="Bug462">Bug462</a> <a rel="mw:WikiLink" href="./Bug462" title="Bug462">Bug462</a></p>
8378 Self-link to section should not be bold
8382 [[Main Page#section]]
8384 <p><a href="/wiki/Main_Page#section" title="Main Page">Main Page#section</a>
8395 Self-link to numeric title
8401 <p><a class="mw-selflink selflink">0</a>
8406 Link to numeric-equivalent title
8412 <p><a href="/wiki/00" title="00">00</a>
8417 <nowiki> inside a link
8419 [[Main<nowiki> Page</nowiki>]] [[Main Page|the main page <nowiki>[it's not very good]</nowiki>]]
8421 <p>[[Main Page]] <a href="/wiki/Main_Page" title="Main Page">the main page [it's not very good]</a>
8424 <p>[[Main<span typeof="mw:Nowiki"> Page</span>]] <a rel="mw:WikiLink" href="./Main_Page" title="Main Page">the main page <span typeof="mw:Nowiki">[it's not very good]</span></a></p>
8427 ## Parsoid doesn't get this right and even fails wt2html because, when doing the
8428 ## normalization for comparison, the html serialization / re-parse doesn't
8429 ## roundtrip. This is T49963
8433 [[Main<pre> Page</pre>]] [[Main Page|the main page <pre>[it's not very good]</pre>]]
8435 <p>[[Main</p><pre> Page</pre><p>]] <a href="/wiki/Main_Page" title="Main Page">the main page </a></p><a href="/wiki/Main_Page" title="Main Page"><pre>[it's not very good]</pre></a>
8437 <p>[[Main</p><pre typeof="mw:Extension/pre" about="#mwt4" data-mw='{"name":"pre","attrs":{},"body":{"extsrc":" Page"}}'> Page</pre><p>]] <a rel="mw:WikiLink" href="./Main_Page" title="Main Page">the main page <pre typeof="mw:Extension/pre" about="#mwt6" data-mw='{"name":"pre","attrs":{},"body":{"extsrc":"[it's not very good]"}}'>[it's not very good]</pre></a></p>
8441 Non-breaking spaces in title
8443 [[ Main Page ]]
8445 <p><a href="/wiki/Main_Page" title="Main Page">  Main   Page  </a>
8449 # Add new article for the test below so that it doesn't red-link
8457 Multiple spaces in titles should normalize to a single underscore
8459 parsoid=wt2html,wt2wt
8465 <p><a href="/wiki/Foo_bar_baz" title="Foo bar baz">x</a>
8466 <a href="/wiki/Foo_bar_baz" title="Foo bar baz">x</a>
8467 <a href="/wiki/Foo_bar_baz" title="Foo bar baz">x</a>
8470 <p><a rel="mw:WikiLink" href="./Foo_bar_baz" title="Foo bar baz">x</a>
8471 <a rel="mw:WikiLink" href="./Foo_bar_baz" title="Foo bar baz">x</a>
8472 <a rel="mw:WikiLink" href="./Foo_bar_baz" title="Foo bar baz">x</a>
8477 Internal link with ca linktrail, surrounded by bold apostrophes (T29473 primary issue)
8483 <p><b><a href="/wiki/Main_Page" title="Main Page">Main Page</a></b>
8488 Internal link with ca linktrail, surrounded by italic apostrophes (T29473 primary issue)
8494 <p><i><a href="/wiki/Main_Page" title="Main Page">Main Page</a></i>
8499 Internal link with en linktrail: no apostrophes (T29473)
8505 <p><a href="/index.php?title=Something&action=edit&redlink=1" class="new" title="Something (page does not exist)">Something</a>'nice
8510 Internal link with ca linktrail with apostrophes (T29473)
8516 <p><a href="/index.php?title=Something&action=edit&redlink=1" class="new" title="Something (encara no existeix)">Something'nice</a>
8521 Internal link with kaa linktrail with apostrophes (T29473)
8527 <p><a href="/index.php?title=Something&action=edit&redlink=1" class="new" title="Something (bet ele jaratılmag'an)">Something'nice</a>
8532 Link with multiple ":" in a subpage-supporting namespace (T65636)
8534 [[User:Foo/Test/63636:Bar|Test]]
8536 <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>
8539 <p><a rel="mw:WikiLink" href="./User:Foo/Test/63636:Bar" title="User:Foo/Test/63636:Bar">Test</a></p>
8542 ## Mainly a sanity check for Parsoid
8544 Handle title parsing for subpages
8564 Link to a subpage from a namespace other than main
8571 <p><a href="/wiki/User:Test/123" title="User:Test/123">/123</a>
8574 <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>
8578 Ensure that transclusion titles are not url-decoded
8580 subpage title=[[Test]]
8583 {{Bar%C3%A9}} {{/Bar%C3%A9}}
8585 <p>{{Bar%C3%A9}} {{/Bar%C3%A9}}
8588 <p>{{Bar%C3%A9}} {{/Bar%C3%A9}}</p>
8592 Purely hash wikilink
8594 title=[[User:Test/123]]
8599 <p><a href="#a">b</a>
8602 <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>
8606 Serialization of purely hash wikilink
8608 title=[[User:Test/123]]
8612 <p><a href="#a">[[</a></p>
8614 [[#a|<nowiki>[[</nowiki>]]
8616 <p><a href="#a">[[</a>
8621 1. Interaction of linktrail and template encapsulation
8625 <p><a href="/wiki/Foo" title="Foo">Fool</a>
8628 <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>
8632 2. Interaction of linktrail and template encapsulation
8634 {{echo|Some [[Fool]]}}s
8636 <p>Some <a href="/index.php?title=Fool&action=edit&redlink=1" class="new" title="Fool (page does not exist)">Fools</a>
8639 <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>
8643 3. Interaction of linktrail and template encapsulation
8645 {{echo|Some [[Fool]]s are '''bold and foolish'''}}
8647 <p>Some <a href="/index.php?title=Fool&action=edit&redlink=1" class="new" title="Fool (page does not exist)">Fools</a> are <b>bold and foolish</b>
8650 <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>
8660 Internal link with is link prefix
8664 Aðrir mótmælenda[[söfnuður|söfnuðir]] og
8666 <p>Aðrir <a href="/wiki/S%C3%B6fnu%C3%B0ur" title="Söfnuður">mótmælendasöfnuðir</a> og
8677 Internal link with is link trail and link prefix
8681 [[mótmælendatrú|xxx]]ar
8683 mótmælenda[[söfnuður]]
8684 mótmælenda[[söfnuður|söfnuðir]]
8685 mótmælenda[[söfnuður|söfnuðir]]xxx
8687 <p><a href="/wiki/M%C3%B3tm%C3%A6lendatr%C3%BA" title="Mótmælendatrú">xxxar</a>
8688 <a href="/wiki/M%C3%B3tm%C3%A6lendatr%C3%BA" title="Mótmælendatrú">mótmælendatrúar</a>
8689 <a href="/wiki/S%C3%B6fnu%C3%B0ur" title="Söfnuður">mótmælendasöfnuður</a>
8690 <a href="/wiki/S%C3%B6fnu%C3%B0ur" title="Söfnuður">mótmælendasöfnuðir</a>
8691 <a href="/wiki/S%C3%B6fnu%C3%B0ur" title="Söfnuður">mótmælendasöfnuðirxxx</a>
8696 Parsoid link trail escaping
8698 parsoid=html2wt,html2html
8700 <p><a rel="mw:WikiLink" href="./Apple" title="Apple">apple</a>s</p>
8706 Parsoid link prefix escaping
8709 parsoid=html2wt,html2html
8711 <p>Aðrir mótmælenda<a rel="mw:WikiLink" href="./Söfnuður" title="Söfnuður">söfnuður</a></p>
8713 Aðrir mótmælenda<nowiki/>[[söfnuður]]
8717 Parsoid link bracket escaping
8719 parsoid=html2wt,html2html
8721 <p><a rel="mw:WikiLink" href="./Test" title="Test">Test</a></p>
8722 <p>[<a rel="mw:WikiLink" href="./Test" title="Test">Test</a>]</p>
8723 <p>[[<a rel="mw:WikiLink" href="./Test" title="Test">Test</a>]]</p>
8724 <p>[[[<a rel="mw:WikiLink" href="./Test" title="Test">Test</a>]]]</p>
8725 <p>[[[[<a rel="mw:WikiLink" href="./Test" title="Test">Test</a>]]]]</p>
8726 <p>[[[[[<a rel="mw:WikiLink" href="./Test" title="Test">Test</a>]]]]]</p>
8734 [[[<nowiki/>[[Test]]]]]
8738 [[[[[<nowiki/>[[Test]]]]]]]
8742 Parsoid-centric test: Whitespace in ext- and wiki-links should be preserved
8750 [http://wp.org ''foo'']
8752 <p><a href="/wiki/Foo" title="Foo"> bar</a>
8753 </p><p><a href="/wiki/Foo" title="Foo"> <i>bar</i></a>
8754 </p><p><a rel="nofollow" class="external text" href="http://wp.org">foo</a>
8755 </p><p><a rel="nofollow" class="external text" href="http://wp.org"><i>foo</i></a>
8760 Parsoid: Scoped parsing should handle mixed transclusions and plain text
8762 [[Foo|{{echo|a}} b {{echo|c}}]]
8764 <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>
8768 Link with angle bracket after anchor
8770 wgFragmentMode=[ 'html5', 'legacy' ]
8774 <p><a href="/wiki/Foo#<bar>" title="Foo">Foo#<bar></a>
8777 <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>
8781 Link with angle bracket after anchor (legacy)
8783 wgFragmentMode=[ 'legacy' ]
8787 <p><a href="/wiki/Foo#.3Cbar.3E" title="Foo">Foo#<bar></a>
8792 ### Interwiki links (see maintenance/interwiki.sql)
8796 Inline interwiki link
8798 parsoid=wt2html,wt2wt,html2html
8800 [[MeatBall:SoftSecurity]]
8802 <p><a href="http://www.usemod.com/cgi-bin/mb.pl?SoftSecurity" class="extiw" title="meatball:SoftSecurity">MeatBall:SoftSecurity</a>
8805 <p><a rel="mw:WikiLink/Interwiki" href="http://www.usemod.com/cgi-bin/mb.pl?SoftSecurity" title="meatball:SoftSecurity">MeatBall:SoftSecurity</a></p>
8809 Inline interwiki link with empty title (T4372)
8811 parsoid=wt2html,wt2wt,html2html
8815 <p><a href="http://www.usemod.com/cgi-bin/mb.pl" class="extiw" title="meatball:">MeatBall:</a>
8818 <p><a rel="mw:WikiLink/Interwiki" href="http://www.usemod.com/cgi-bin/mb.pl?" title="meatball:">MeatBall:</a></p>
8821 ## html2wt and html2html will fail because we will prefer the :en: interwiki prefix over wikipedia:
8823 Interwiki link encoding conversion (T3636)
8825 parsoid=wt2html,wt2wt
8827 *[[Wikipedia:ro:Olteniţa]]
8828 *[[Wikipedia:ro:Olteniţa]]
8830 <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>
8831 <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>
8833 <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>
8834 <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>
8837 <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>
8838 <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>
8843 Interwiki link with fragment (T4130)
8845 [[MeatBall:SoftSecurity#foo]]
8847 <p><a href="http://www.usemod.com/cgi-bin/mb.pl?SoftSecurity#foo" class="extiw" title="meatball:SoftSecurity">MeatBall:SoftSecurity#foo</a>
8851 ## The interwiki case here continued to be legacy escaped because of the
8852 ## default setting of $wgExternalInterwikiFragmentMode
8854 Link scenarios with escaped fragments
8858 wgFragmentMode=[ 'html5', 'legacy' ]
8861 [[Foo#Is this great?]]
8862 [[meatball:Foo#Is this great?]]
8864 <p><a href="#Is_this_great?">#Is this great?</a>
8865 <a href="/wiki/Foo#Is_this_great?" title="Foo">Foo#Is this great?</a>
8866 <a href="http://www.usemod.com/cgi-bin/mb.pl?Foo#Is_this_great.3F" class="extiw" title="meatball:Foo">meatball:Foo#Is this great?</a>
8869 <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>
8870 <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>
8871 <a rel="mw:WikiLink/Interwiki" href="http://www.usemod.com/cgi-bin/mb.pl?Foo#Is_this_great.3F" title="meatball:Foo" data-parsoid='{"stx":"simple","a":{"href":"http://www.usemod.com/cgi-bin/mb.pl?Foo#Is_this_great.3F"},"sa":{"href":"meatball:Foo#Is this great?"},"isIW":true}'>meatball:Foo#Is this great?</a></p>
8875 Link scenarios with escaped fragments (legacy)
8877 wgFragmentMode=[ 'legacy' ]
8880 [[Foo#Is this great?]]
8881 [[meatball:Foo#Is this great?]]
8883 <p><a href="#Is_this_great.3F">#Is this great?</a>
8884 <a href="/wiki/Foo#Is_this_great.3F" title="Foo">Foo#Is this great?</a>
8885 <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>
8889 # Ideally the wikipedia: prefix here should be proto-relative too
8890 # [CSA]: this is kind of a bogus test, as the PHP parser test doesn't
8891 # define the 'en' prefix, and originally the test used 'wikipedia',
8892 # which isn't a localinterwiki prefix hence the links to the 'en:Foo'
8895 Different interwiki prefixes mapping to the same URL
8903 [[:wikipedia:Foo|Foo]]
8905 [[wikipedia:en:Foo]]
8907 [[:wikipedia:en:Foo]]
8911 <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>
8913 <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>
8915 <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>
8917 <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>
8919 <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>
8921 <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>
8923 <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>
8927 Interwiki links that cannot be represented in wiki syntax
8930 [[meatball:ok#foo|ok with fragment]]
8931 [[meatball:ok_as_well?|ok ending with ? mark]]
8932 [http://de.wikipedia.org/wiki/Foo?action=history has query]
8933 [http://de.wikipedia.org/wiki/#foo is just fragment]
8936 <p><a href="http://www.usemod.com/cgi-bin/mb.pl?ok" class="extiw" title="meatball:ok">meatball:ok</a>
8937 <a href="http://www.usemod.com/cgi-bin/mb.pl?ok#foo" class="extiw" title="meatball:ok">ok with fragment</a>
8938 <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>
8939 <a rel="nofollow" class="external text" href="http://de.wikipedia.org/wiki/Foo?action=history">has query</a>
8940 <a rel="nofollow" class="external text" href="http://de.wikipedia.org/wiki/#foo">is just fragment</a>
8943 <p><a rel="mw:WikiLink/Interwiki" href="http://www.usemod.com/cgi-bin/mb.pl?ok" title="meatball:ok">meatball:ok</a>
8944 <a rel="mw:WikiLink/Interwiki" href="http://www.usemod.com/cgi-bin/mb.pl?ok#foo" title="meatball:ok">ok with fragment</a>
8945 <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>
8946 <a rel="mw:ExtLink" class="external text" href="http://de.wikipedia.org/wiki/Foo?action=history">has query</a>
8947 <a rel="mw:ExtLink" class="external text" href="http://de.wikipedia.org/wiki/#foo">is just fragment</a></p>
8951 Interwiki links: trail
8953 [[wikipedia:Foo|Ba]]r
8955 <p><a href="http://en.wikipedia.org/wiki/Foo" class="extiw" title="wikipedia:Foo">Bar</a>
8958 <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>
8962 Local interwiki link
8964 parsoid=wt2html,wt2wt,html2html
8966 [[local:Template:Foo]]
8968 <p><a href="/wiki/Template:Foo" title="Template:Foo">local:Template:Foo</a>
8971 <p><a rel="mw:WikiLink" href="./Template:Foo" title="Template:Foo">local:Template:Foo</a></p>
8974 # Parsoid does not mark self-links, by design.
8976 Local interwiki link: self-link to current page
8979 parsoid=wt2html,wt2wt,html2html
8983 <p><a class="mw-selflink selflink">local:Main Page</a>
8986 <p><a rel="mw:WikiLink" href="./Main_Page" title="Main Page">local:Main Page</a></p>
8990 Local interwiki link: prefix only (T66167)
8992 parsoid=wt2html,wt2wt,html2html
8996 <p><a href="/wiki/Main_Page" title="Main Page">local:</a>
8999 <p><a rel="mw:WikiLink" href="./Main_Page" title="Main Page">local:</a></p>
9003 Local interwiki link: with additional interwiki prefix (T63357)
9005 parsoid=wt2html,wt2wt,html2html
9007 [[local:meatball:Hello]]
9009 <p><a href="http://www.usemod.com/cgi-bin/mb.pl?Hello" class="extiw" title="meatball:Hello">local:meatball:Hello</a>
9012 <p><a rel="mw:WikiLink/Interwiki" href="http://www.usemod.com/cgi-bin/mb.pl?Hello" title="meatball:Hello">local:meatball:Hello</a></p>
9016 Multiple local interwiki link prefixes
9018 [[local:local:local:local:mi:local:Foo]]
9020 parsoid=wt2html,wt2wt,html2html
9022 <p><a href="/wiki/Foo" title="Foo">local:local:local:local:mi:local:Foo</a>
9025 <p><a rel="mw:WikiLink" href="./Foo" title="Foo">local:local:local:local:mi:local:Foo</a></p>
9029 Interwiki link with percent encoded target
9031 [[:es:Nueva Guip%C3%BAzcoa|Nueva Guipúzcoa]]
9033 <p><a href="http://es.wikipedia.org/wiki/Nueva_Guip%C3%BAzcoa" class="extiw" title="es:Nueva Guipúzcoa">Nueva Guipúzcoa</a>
9036 <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>
9040 ### Interlanguage links
9041 ### Language links (so that searching for '### language' matches..)
9053 <p>Blah blah blah</p>
9054 <link rel="mw:PageProp/Language" href="http://zh.wikipedia.org/wiki/Chinese"/>
9057 ## parsoid html2wt will lose the space variations
9059 Interlanguage link with spacing
9061 parsoid=wt2html,wt2wt,html2html
9069 <p>Blah blah blah</p>
9070 <link rel="mw:PageProp/Language" href="http://zh.wikipedia.org/wiki/Chinese"/>
9074 Double interlanguage link
9083 <p>Blah blah blah</p>
9084 <link rel="mw:PageProp/Language" href="http://es.wikipedia.org/wiki/Spanish"/>
9085 <link rel="mw:PageProp/Language" href="http://zh.wikipedia.org/wiki/Chinese"/>
9088 ## parsoid html2wt will lose the space variations
9090 Interlanguage link variations
9092 parsoid=wt2html,wt2wt,html2html
9102 <p>Blah blah blah</p>
9103 <link rel="mw:PageProp/Language" href="http://es.wikipedia.org/wiki/Spanish" />
9104 <link rel="mw:PageProp/Language" href="http://zh.wikipedia.org/wiki/Chinese" />
9105 <link rel="mw:PageProp/Language" href="http://es.wikipedia.org/wiki/Foo_bar" />
9109 Escaping of interlanguage links (T129218, T156308)
9113 [[ : zh : Chinese ]]
9116 <a href="http://es.wikipedia.org/wiki/Spanish" class="extiw" title="es:Spanish">es:Spanish</a>
9117 <a href="http://zh.wikipedia.org/wiki/Chinese" class="extiw" title="zh:Chinese"> zh : Chinese </a>
9121 <a rel="mw:WikiLink/Interwiki" href="http://es.wikipedia.org/wiki/Spanish" title="es:Spanish">es:Spanish</a>
9122 <a rel="mw:WikiLink/Interwiki" href="http://zh.wikipedia.org/wiki/Chinese" title="zh:Chinese"> zh : Chinese </a></p>
9126 Multiple colons escaping interlanguage links
9134 <p><a href="http://es.wikipedia.org/wiki/Spanish" class="extiw" title="es:Spanish">es:Spanish</a>
9139 <p><a rel="mw:WikiLink/Interwiki" href="http://es.wikipedia.org/wiki/Spanish" title="es:Spanish">es:Spanish</a>
9141 [[:::es:Spanish]]</p>
9144 ## parsoid html2wt will normalize the space to _
9146 Space and question mark encoding in interlanguage links (T95473)
9148 parsoid=wt2html,wt2wt,html2html
9156 <p>Blah blah blah</p>
9157 <link rel="mw:PageProp/Language" href="http://es.wikipedia.org/wiki/Foo_bar%3F" />
9161 Interlanguage link, with prefix links
9171 <p>Blah blah blah</p>
9172 <link rel="mw:PageProp/Language" href="http://zh.wikipedia.org/wiki/Chinese"/>
9176 Double interlanguage link, with prefix links (T10897)
9187 <p>Blah blah blah</p>
9188 <link rel="mw:PageProp/Language" href="http://es.wikipedia.org/wiki/Spanish"/>
9189 <link rel="mw:PageProp/Language" href="http://zh.wikipedia.org/wiki/Chinese"/>
9193 "Extra" interlanguage links (T34189 / gerrit 111390)
9201 <p>Blah blah blah</p>
9202 <link rel="mw:PageProp/Language" title="Multilingual" href="http://wikisource.org/wiki/Article"/>
9205 ## PHP parser tests script needs an update
9206 ## Parsoid html2wt will normalize output to [[:zh:Chinese]]
9208 Language links render as inline links if $wgInterwikiMagic=false
9210 wgInterwikiMagic=false
9211 parsoid=wt2html,wt2wt,html2html
9216 <p>Blah blah blah <a rel="mw:WikiLink/Interwiki" href="http://zh.wikipedia.org/wiki/Chinese" title="zh:Chinese">zh:Chinese</a></p>
9219 ## PHP parser tests script needs an update
9220 ## Parsoid html2wt will normalize output to [[:zh:Chinese]]
9222 Language links render as inline links in the Talk namespace
9225 parsoid=wt2html,wt2wt,html2html
9230 <p>Blah blah blah <a rel="mw:WikiLink/Interwiki" href="http://zh.wikipedia.org/wiki/Chinese" title="zh:Chinese">zh:Chinese</a></p>
9234 Parsoid-specific test: Wikilinks with should RT properly
9240 <p><a href="/index.php?title=WW_II&action=edit&redlink=1" class="new" title="WW II (lonkásá ezalí tɛ̂)">WW II</a>
9245 Parsoid T55221: Wikilinks should be properly entity-escaped
9247 parsoid={ "modes": ["html2wt"], "suppressErrors": true }
9249 <p>He&nbsp;llo <a href="./Foo" rel="mw:WikiLink">He&nbsp;llo</a></p>
9250 <p>He&nbsp;llo <a href="./He&nbsp;llo" rel="mw:WikiLink">He&nbsp;llo</a></p>
9252 He&nbsp;llo [[Foo|He&nbsp;llo]]
9254 He&nbsp;llo He&nbsp;llo
9256 <p>He&nbsp;llo <a href="/wiki/Foo" title="Foo">He&nbsp;llo</a>
9257 </p><p>He&nbsp;llo He&nbsp;llo
9261 # html2wt will fail because of title normalization without data-parsoid
9263 Parsoid: handle constructor well
9265 parsoid=wt2html,wt2wt
9271 <p><a href="/index.php?title=Constructor&action=edit&redlink=1" class="new" title="Constructor (page does not exist)">constructor</a>
9272 </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>
9275 <p><a rel="mw:WikiLink" href="./Constructor" title="Constructor" data-parsoid='{"stx":"simple","a":{"href":"./Constructor"},"sa":{"href":"constructor"}}'>constructor</a></p>
9277 <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>
9281 Template parameter named "constructor"
9283 {{echo| constructor = |hi}}
9285 <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>
9294 # Note that `ko` isn't a known interlanguage prefix
9296 Parsoid: recognize interlanguage links without a target page
9306 <link rel="mw:PageProp/Language" href="http://es.wikipedia.org/wiki/"/>
9308 <p><a rel="mw:WikiLink" href="./Ko:" title="Ko:">ko:</a></p>
9311 # Note that `ko` isn't a known interwiki prefix
9313 Parsoid: recognize interwiki links without a target page
9315 parsoid=wt2html,wt2wt,html2html
9321 <p><a href="http://es.wikipedia.org/wiki/" class="extiw" title="es:">es:</a>
9322 </p><p><a href="/wiki/Ko:" title="Ko:">ko:</a>
9325 <p><a rel="mw:WikiLink/Interwiki" href="http://es.wikipedia.org/wiki/" title="es:">es:</a></p>
9326 <p><a rel="mw:WikiLink" href="./Ko:" title="Ko:">ko:</a></p>
9330 Handle interwiki links pointing to the current wiki as plain wiki links (T47209)
9334 <p><a href="/wiki/Foo" title="Foo">mi:Foo</a>
9337 <p><a rel="mw:WikiLink" href="./Foo" title="Foo" data-parsoid='{"stx":"simple","a":{"href":"./Foo"},"sa":{"href":"mi:Foo"}}'>mi:Foo</a></p>
9341 Interlanguage link with preceding local interwiki link (T70085)
9343 parsoid=wt2html,wt2wt,html2html
9346 [[local:es:Spanish]]
9349 <a href="http://es.wikipedia.org/wiki/Spanish" class="extiw" title="es:Spanish">local:es:Spanish</a>
9353 <a rel="mw:WikiLink/Interwiki" href="http://es.wikipedia.org/wiki/Spanish" title="es:Spanish">local:es:Spanish</a></p>
9357 Looks like an interlanguage link, but is actually a local interwiki
9359 parsoid=wt2html,wt2wt,html2html
9365 <a href="/wiki/Template:Foo" title="Template:Foo">mi:Template:Foo</a>
9369 <a rel="mw:WikiLink" href="./Template:Foo" title="Template:Foo">mi:Template:Foo</a></p>
9373 ### Redirects, Parsoid-only
9377 1. Simple redirect to page
9379 #REDIRECT [[Main Page]]
9381 <link rel="mw:PageProp/redirect" href="./Main_Page"/>
9385 2. Other redirect variants
9387 #REDIRECT [[Main_Page]]
9389 <link rel="mw:PageProp/redirect" href="./Main_Page" data-parsoid='{"src":"#REDIRECT ","a":{"href":"./Main_Page"},"sa":{"href":"Main_Page"}}'/>
9392 # Not a valid redirect in PHP (although perhaps it was, once upon a time)
9393 # This tests the Parsoid bail-out code.
9395 3. Other redirect variants
9399 #REDIRECT [[<nowiki>[[Bar]]</nowiki>]]
9401 <ol><li>REDIRECT [[<span typeof="mw:Nowiki">[[Bar]]</span>]]</li></ol>
9405 4. Redirect to a templated destination
9407 #REDIRECT [[{{echo|Foo}}bar]]
9409 <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"}]]}'/>
9415 parsoid=wt2html,wt2wt
9420 <li>REDIRECT [[]]</li></ol>
9424 Optional colon in #REDIRECT
9426 # the colon is archaic syntax. we support it for wt2html, but we
9427 # don't care that it roundtrips back to the modern syntax.
9428 parsoid=wt2html,html2html
9430 #REDIRECT:[[Main Page]]
9432 <link rel="mw:PageProp/redirect" href="./Main_Page"/>
9436 Whitespace in #REDIRECT with optional colon
9438 # the colon and gratuitous whitespace is archaic syntax. we support
9439 # it for wt2html, but we don't care that it roundtrips back to the
9440 # modern syntax (without extra whitespace)
9441 parsoid=wt2html,html2html
9448 <link rel="mw:PageProp/redirect" href="./Main_Page"/>
9452 Piped link in #REDIRECT
9454 # content after piped link is ignored. we support this syntax,
9455 # but don't care that the piped link is lost when we roundtrip this.
9458 #REDIRECT [[Main Page|bar]]
9460 <link rel="mw:PageProp/redirect" href="./Main_Page"/>
9464 Redirect to category (T104502)
9466 parsoid=wt2html,wt2wt
9468 #REDIRECT [[Category:Foo]]
9470 <link rel="mw:PageProp/redirect" href="./Category:Foo"/>
9474 Redirect to category with URL encoding (T104502)
9478 #REDIRECT [[Category%3AFoo]]
9480 <link rel="mw:PageProp/redirect" href="./Category:Foo"/>
9484 Redirect to category page
9486 #REDIRECT [[:Category:Foo]]
9488 <link rel="mw:PageProp/redirect" href="./Category:Foo"/>
9492 Redirect to image page (1)
9494 #REDIRECT [[File:Wiki.png]]
9496 <link rel="mw:PageProp/redirect" href="./File:Wiki.png"/>
9500 Redirect to image page (2)
9502 #REDIRECT [[Image:Wiki.png]]
9504 <link rel="mw:PageProp/redirect" href="./File:Wiki.png" data-parsoid='{"src":"#REDIRECT ","a":{"href":"./File:Wiki.png"},"sa":{"href":"Image:Wiki.png"}}'/>
9507 # html2wt disabled because wts serializes as "#REDIRECT [[:en:File:Wiki.png]]"
9508 # Next test confirms this.
9510 Redirect to language (1) (T104918)
9512 parsoid=wt2html,wt2wt,html2html
9514 #REDIRECT [[en:File:Wiki.png]]
9516 <link rel="mw:PageProp/redirect" href="//en.wikipedia.org/wiki/File:Wiki.png"/>
9520 Redirect to language (2) (T104918)
9522 #REDIRECT [[:en:File:Wiki.png]]
9524 <link rel="mw:PageProp/redirect" href="//en.wikipedia.org/wiki/File:Wiki.png"/>
9528 Redirect to interwiki (T104918)
9530 #REDIRECT [[meatball:File:Wiki.png]]
9532 <link rel="mw:PageProp/redirect" href="http://www.usemod.com/cgi-bin/mb.pl?File:Wiki.png"/>
9536 Non-English #REDIRECT
9540 #TILVÍSUN [[Main Page]]
9542 <link rel="mw:PageProp/redirect" href="./Main_Page" data-parsoid='{"src":"#TILVÍSUN ","a":{"href":"./Main_Page"},"sa":{"href":"Main Page"}}'/>
9546 Redirect syntax under text isn't considered a redirect
9550 #redirect [[Main Page]]
9553 <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>
9561 <p>Foo<link rel="mw:PageProp/redirect" href="./Foo"/></p>
9568 Redirect followed by block on the same line
9572 #REDIRECT [[Main Page]]<!-- haha -->==hi==
9574 <link rel="mw:PageProp/redirect" href="./Main_Page"/><!-- haha --><h2 id="hi">hi</h2>
9578 Redirect followed by a newline
9580 #REDIRECT [[Main Page]]
9583 <link rel="mw:PageProp/redirect" href="./Main_Page"/>
9588 Redirect followed by multiple newlines
9590 #REDIRECT [[Main Page]]
9595 <link rel="mw:PageProp/redirect" href="./Main_Page"/>
9602 Drop duplicate redirects
9606 <link rel="mw:PageProp/redirect" href="./Foo"/>
9607 <link rel="mw:PageProp/redirect" href="./Bar"/>
9608 <link rel="mw:PageProp/redirect" href="./Baz"/>
9627 Broken br tag sanitization
9635 # TODO: Fix html2html mode (T53055)!
9637 Parsoid: Broken br tag recognition
9651 Incorrecly removing closing slashes from correctly formed XHTML
9653 <br style="clear:both;" />
9655 <p><br style="clear:both;" />
9660 Failing to transform badly formed HTML into correct XHTML
9662 <br style="clear: left;">
9663 <br style="clear: right;">
9664 <br style="clear: both;">
9666 <p><br style="clear: left;" />
9667 <br style="clear: right;" />
9668 <br style="clear: both;" />
9672 ## FIXME: Is Parsoid's acceptance of self-closing html-tags
9673 ## a feature or a bug? See https://phabricator.wikimedia.org/T76962
9675 Handling html with a div self-closing tag
9684 <div title=""></div>
9685 <div title=""></div>
9687 <div title="bar"></div>
9688 <div title="bar"></div>
9692 <div title="" data-parsoid='{"stx":"html","selfClose":true}'></div>
9693 <div title="" data-parsoid='{"stx":"html","selfClose":true}'></div>
9694 <div title="" data-parsoid='{"stx":"html","autoInsertedEnd":true}'>
9695 <div title="bar" data-parsoid='{"stx":"html","selfClose":true}'></div>
9696 <div title="bar" data-parsoid='{"stx":"html","selfClose":true}'></div>
9697 <div title="bar/" data-parsoid='{"stx":"html","autoInsertedEnd":true}'></div></div>
9701 Elements with solidus in various attribute positions
9703 parsoid=wt2html,html2html
9705 <div cla/ss="123">ha</div>
9707 <div / class="123">ha</div>
9709 <div class= / "123">ha</div>
9712 <div class="123">ha</div>
9713 <div class="/">ha</div>
9715 <div data-parsoid='{"stx":"html","a":{"cla":null,"ss":null},"sa":{"cla":"","ss":"123"}}'>ha</div>
9717 <div class="123" data-parsoid='{"stx":"html"}'>ha</div>
9719 <div class="/" data-parsoid='{"stx":"html","a":{"\"123\"":null},"sa":{"\"123\"":""}}'>ha</div>
9723 Handling html with a br self-closing tag
9750 Quoted attributes without spaces
9754 <div class="foo"style="color:red">red</div>
9756 <div class="foo" style="color:red">red</div>
9758 <div class="foo" style="color:red">red</div>
9762 Horizontal ruler (should it add that extra space?)
9771 foo </p><hr /><p> bar
9776 Horizontal ruler -- 4+ dashes render hr
9785 Horizontal ruler -- eats additional dashes on the same line
9794 Horizontal ruler -- does not collapse dashes on consecutive lines
9805 Horizontal ruler -- <4 dashes render as plain text
9814 Horizontal ruler -- Supports content following dashes on same line
9826 ### Block-level elements
9835 <ul><li>Common list</li>
9837 <li>item 3</li></ul>
9847 <ol><li>Numbered list</li>
9849 <li>item 3</li></ol>
9852 # the switch from level 3 to ordered should not introduce a newline between
9863 ***#Number on level 4
9865 **#Number on level 3
9866 **#Number on level 3
9870 #**Level 3, but ordered
9873 <ol><li>with numbers</li></ol>
9874 <ul><li>and bullets</li></ul>
9875 <ol><li>and numbers</li></ol></li>
9877 <ul><li>bullet level 2
9878 <ul><li>bullet level 3
9879 <ol><li>Number on level 4</li></ol></li></ul></li>
9881 <ol><li>Number on level 3</li>
9882 <li>Number on level 3</li></ol></li></ul>
9883 <ol><li>number level 2</li></ol></li>
9885 <ul><li><ul><li>Level 3</li></ul></li></ul></li></ul>
9886 <ol><li><ul><li><ul><li>Level 3, but ordered</li></ul></li></ul></li></ol>
9890 1. Nested mixed wikitext and html list
9893 *<ul><li>ho</li></ul>
9898 <li><ul><li>ho</li></ul></li>
9900 <ul><li>ho</li></ul></li></ul>
9903 <li><ul data-parsoid='{"stx":"html"}'><li data-parsoid='{"stx":"html"}'>ho</li></ul></li>
9905 <ul><li>ho</li></ul></li></ul>
9909 2. Nested mixed wikitext and html list (incompatible)
9912 :{{echo|<li>ho</li>}}
9915 <dd><li>ho</li></dd></dl>
9918 <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>
9928 <ul><li>bar</li></ul></li></ul>
9937 <ul><li><ul><li>foo</li></ul></li>
9942 Nested lists 3 (first element empty)
9948 <ul><li>bar</li></ul></li></ul>
9952 Nested lists 4 (first element empty)
9957 <ul><li><ul><li></li></ul></li>
9962 Nested lists 5 (both elements empty)
9967 <ul><li><ul><li></li></ul></li>
9972 Nested lists 6 (both elements empty)
9978 <ul><li></li></ul></li></ul>
9982 Nested lists 7 (skip initial nesting levels)
9986 <ul><li><ul><li><ul><li>foo</li></ul></li></ul></li></ul>
9990 Nested lists 8 (multiple nesting transitions)
9998 <ul><li><ul><li>bar</li></ul></li>
9999 <li>baz</li></ul></li>
10003 # XXX this test should be moved to citeParserTests, since it depends
10004 # on the Cite extension, which is "built in" to Parsoid.
10006 Nested lists 9 (extension interaction)
10009 !! html/php+tidy-DISABLED
10010 <ul><li class="mw-empty-elt"></li></ul>
10012 <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>
10016 1. Lists with start-of-line-transparent tokens before bullets: Comments
10028 Nested lists 10 (list and span siblings: wt2wt regression)
10033 <ul><li>a <span>x</span>
10034 <ul><li>b <span>y</span></li></ul></li></ul>
10038 2. Lists with start-of-line-transparent tokens before bullets: Template close
10043 <ul><li>foo bar</li>
10048 List items are not parsed correctly following a <pre> block (T2785)
10054 <ul><li><pre>foo</pre></li>
10055 <li><pre>bar</pre></li>
10058 <ul><li><pre typeof="mw:Extension/pre" about="#mwt2" data-mw='{"name":"pre","attrs":{},"body":{"extsrc":"foo"}}'>foo</pre></li>
10059 <li><pre typeof="mw:Extension/pre" about="#mwt4" data-mw='{"name":"pre","attrs":{},"body":{"extsrc":"bar"}}'>bar</pre></li>
10063 # FIXME: Might benefit from a html/parsoid since this has a template
10065 List items from template
10076 *notSOL{{inner list}}
10079 <ul><li>item 1</li>
10080 <li>item 2</li></ul>
10081 <ul><li>item 0</li>
10083 <li>item 2</li></ul>
10084 <ul><li>item 0</li>
10087 <li>item 2</li></ul>
10091 List interrupted by empty line or heading
10099 <ul><li>foo</li></ul>
10100 <ul><li><ul><li>bar</li></ul></li></ul>
10101 <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>
10102 <ul><li>Another list item</li></ul>
10106 Multiple list tags generated by templates
10125 <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>
10126 <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>
10127 <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>
10131 Multiple newlines in between HTML list items don't induce paragraph wrapping
10144 <dd>ho<div>123</div>
10160 <dd>ho<div>123</div>
10168 Single-comment whitespace lines dont break lists, and neither do multi-comment whitespace lines
10171 <!--This line will NOT split the list-->
10173 <!--This line will NOT split the list either-->
10175 <!--foo--> <!----> <!--This line NOT split the list either-->
10185 Replacing whitespace with tabs still doesn't break the list (gerrit 78327)
10188 <!--This line will NOT split the list-->
10190 <!--This line will NOT split the list either-->
10192 <!--foo--> <!----> <!--This line NOT split the list
10202 # FIXME: Parsoid has a dedicated DOM pass to mimic this Tidy-specific li-hack
10203 # That pass could possibly be removed.
10205 Test the li-hack (a hack from Tidy days, but doesn't work as advertised with Remex)
10207 parsoid=wt2html,wt2wt
10211 *{{echo|<li>templated li-hack}}
10212 *<!--foo--><li> unsupported li-hack with preceding comments
10215 <li><li>not a li-hack
10220 <li class="mw-empty-elt"></li><li>li-hack</li>
10221 <li class="mw-empty-elt"></li><li>templated li-hack</li>
10222 <li class="mw-empty-elt"></li><li> unsupported li-hack with preceding comments</li></ul>
10224 <li class="mw-empty-elt"></li><li>not a li-hack
10229 <li data-parsoid='{"stx":"html","autoInsertedEnd":true,"liHackSrc":"*"}'>li-hack</li>
10230 <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>
10231 <li data-parsoid='{"autoInsertedEnd":true}'><!--foo--></li><li data-parsoid='{"stx":"html","autoInsertedEnd":true}'>unsupported li-hack with preceding comments</li></ul>
10233 <ul data-parsoid='{"stx":"html"}'>
10234 <li class="mw-empty-elt" data-parsoid='{"stx":"html","autoInsertedEnd":true}'></li><li data-parsoid='{"stx":"html"}'>not a li-hack
10241 Parsoid: Make sure nested lists are serialized on their own line even if HTML contains no newlines
10253 <ol><li>bar</li></ol></li></ol>
10255 <ul><li>bar</li></ul></li></ul>
10257 <dl><dd>bar</dd></dl></dd></dl>
10275 Parsoid: Test of whitespace serialization with Templated bullets
10282 <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>
10286 # ------------------------------------------------------------------------
10287 # The next set of tests are about Parsoid's ability to handle badly nested
10288 # tags (parse, minimize scope of fixup, and roundtrip back)
10289 # ------------------------------------------------------------------------
10291 # Remex and Parsoid output stems from list handling diffs because Parsoid & PHP parser.
10292 # Parsoid's list handling is more aware of block structure.
10294 Unbalanced closing block tags break a list
10301 <ul><li>a</li></ul></div><div>
10313 Unbalanced closing non-block tags don't break a list
10315 parsoid=wt2html,html2html
10323 <ul><li>a<span></span></li>
10326 <p><span data-parsoid='{"stx":"html","autoInsertedEnd":true}'></span></p>
10327 <ul><li>a<span data-parsoid='{"stx":"html","autoInsertedEnd":true}'></span></li>
10331 # Parsoid does some post-dom-building cleanup
10332 # which is why its output differs from Remex.
10334 Unclosed formatting tags that straddle lists are closed and reopened
10336 parsoid=wt2html,wt2wt,html2html
10341 <ol><li><s> a</s></li><s>
10342 </s><li><s>b </s></li></ol>
10344 <ol><li><s> a</s></li>
10345 <li><s>b </s></li></ol>
10348 # Output is ugly because of all the misnested tag fixups.
10350 1. List embedded in a formatting tag
10357 </small></p><small><ul><li>foo</li></ul></small><small></small><p><small></small>
10360 <p><small data-parsoid='{"stx":"html","autoInsertedEnd":true}'></small></p><small data-parsoid='{"stx":"html","autoInsertedEnd":true,"autoInsertedStart":true}'>
10361 <ul><li data-parsoid='{}'>foo</li></ul></small>
10362 <p><small data-parsoid='{"stx":"html","autoInsertedStart":true}'></small></p>
10365 # Output is ugly because of all the misnested tag fixups.
10367 2. List embedded in a formatting tag in a misnested way
10374 </small></p><small></small><ul><small><li>a</li>
10375 </small><li><small>b</small></li></ul>
10377 <p><small data-parsoid='{"stx":"html","autoInsertedEnd":true}'></small></p>
10378 <ul><small data-parsoid='{"stx":"html","autoInsertedEnd":true,"autoInsertedStart":true}'><li>a</li></small>
10379 <li><small data-parsoid='{"stx":"html","autoInsertedStart":true}'>b</small></li></ul>
10382 # Output is ugly because of all the misnested tag fixups.
10384 3. List embedded in a formatting tag in a misnested way
10391 </small></p><small></small><ul><small></small><li><small></small><ul><small></small><li><small>123</small></li></ul></li></ul>
10393 <p><small data-parsoid='{"stx":"html","autoInsertedEnd":true}'></small></p>
10395 <ul><li><ul><li data-parsoid='{}'><small data-parsoid='{"stx":"html","autoInsertedStart":true}'> 123</small></li></ul></li></ul>
10402 # Note that the current date is hard-coded as
10403 # 1970-01-01T00:02:03Z (a Thursday)
10404 # when running parser tests. The timezone is also fixed to GMT, so
10405 # local date will be identical to current date.
10408 Magic Word: {{CURRENTDAY}}
10417 Magic Word: {{CURRENTDAY2}}
10426 Magic Word: {{CURRENTDAYNAME}}
10435 Magic Word: {{CURRENTDOW}}
10444 Magic Word: {{CURRENTMONTH}}
10453 Magic Word: {{CURRENTMONTH1}}
10462 Magic Word: {{CURRENTMONTHABBREV}}
10464 {{CURRENTMONTHABBREV}}
10471 Magic Word: {{CURRENTMONTHNAME}}
10473 {{CURRENTMONTHNAME}}
10480 Magic Word: {{CURRENTMONTHNAMEGEN}}
10482 {{CURRENTMONTHNAMEGEN}}
10489 Magic Word: {{CURRENTTIME}}
10498 Magic Word: {{CURRENTHOUR}}
10507 Magic Word: {{CURRENTWEEK}} (T6594)
10516 Magic Word: {{CURRENTYEAR}}
10525 Magic Word: {{CURRENTTIMESTAMP}}
10527 {{CURRENTTIMESTAMP}}
10534 Magic Words LOCAL (UTC)
10538 *{{LOCALMONTHNAME}}
10539 *{{LOCALMONTHNAMEGEN}}
10540 *{{LOCALMONTHABBREV}}
10549 *{{LOCALTIMESTAMP}}
10564 <li>19700101000203</li></ul>
10568 Magic Word: {{FULLPAGENAME}}
10570 title=[[User:Ævar Arnfjörð Bjarmason]]
10571 parsoid={ "modes": ["wt2html","wt2wt"], "normalizePhp": true }
10575 <p>User:Ævar Arnfjörð Bjarmason
10580 Magic Word: {{FULLPAGENAMEE}}
10582 title=[[User:Ævar Arnfjörð Bjarmason]]
10583 parsoid={ "modes": ["wt2html","wt2wt"], "normalizePhp": true }
10587 <p>User:%C3%86var_Arnfj%C3%B6r%C3%B0_Bjarmason
10592 Magic Word: {{TALKSPACE}}
10594 title=[[User:Ævar Arnfjörð Bjarmason]]
10595 parsoid={ "modes": ["wt2html","wt2wt"], "normalizePhp": true }
10604 Magic Word: {{TALKSPACE}}, same namespace
10606 title=[[User talk:Ævar Arnfjörð Bjarmason]]
10607 parsoid={ "modes": ["wt2html","wt2wt"], "normalizePhp": true }
10616 Magic Word: {{TALKSPACE}}, main namespace
10618 title=[[Parser Test]]
10619 parsoid={ "modes": ["wt2html","wt2wt"], "normalizePhp": true }
10628 Magic Word: {{TALKSPACEE}}
10630 title=[[User:Ævar Arnfjörð Bjarmason]]
10631 parsoid={ "modes": ["wt2html","wt2wt"], "normalizePhp": true }
10640 Magic Word: {{SUBJECTSPACE}}
10642 title=[[User talk:Ævar Arnfjörð Bjarmason]]
10643 parsoid={ "modes": ["wt2html","wt2wt"], "normalizePhp": true }
10652 Magic Word: {{SUBJECTSPACE}}, same namespace
10654 title=[[User:Ævar Arnfjörð Bjarmason]]
10655 parsoid={ "modes": ["wt2html","wt2wt"], "normalizePhp": true }
10664 Magic Word: {{SUBJECTSPACE}}, main namespace
10666 title=[[Parser Test]]
10667 parsoid={ "modes": ["wt2html","wt2wt"], "normalizePhp": true }
10675 Magic Word: {{SUBJECTSPACEE}}
10677 title=[[User talk:Ævar Arnfjörð Bjarmason]]
10678 parsoid={ "modes": ["wt2html","wt2wt"], "normalizePhp": true }
10687 Magic Word: {{NAMESPACE}}
10689 title=[[User:Ævar Arnfjörð Bjarmason]]
10690 parsoid={ "modes": ["wt2html","wt2wt"], "normalizePhp": true }
10699 Magic Word: {{NAMESPACEE}}
10701 title=[[User:Ævar Arnfjörð Bjarmason]]
10702 parsoid={ "modes": ["wt2html","wt2wt"], "normalizePhp": true }
10711 Magic Word: {{NAMESPACENUMBER}}
10713 title=[[User:Ævar Arnfjörð Bjarmason]]
10714 parsoid={ "modes": ["wt2html","wt2wt"], "normalizePhp": true }
10716 {{NAMESPACENUMBER}}
10723 Magic Word: {{SUBPAGENAME}}
10725 title=[[Ævar Arnfjörð Bjarmason/sub ö]] subpage
10726 parsoid={ "modes": ["wt2html","wt2wt"], "normalizePhp": true }
10735 Magic Word: {{SUBPAGENAMEE}}
10737 title=[[Ævar Arnfjörð Bjarmason/sub ö]] subpage
10738 parsoid={ "modes": ["wt2html","wt2wt"], "normalizePhp": true }
10747 Magic Word: {{ROOTPAGENAME}}
10749 title=[[Ævar Arnfjörð Bjarmason/sub/sub2]] subpage
10750 parsoid={ "modes": ["wt2html","wt2wt"], "normalizePhp": true }
10754 <p>Ævar Arnfjörð Bjarmason
10759 Magic Word: {{ROOTPAGENAMEE}}
10761 title=[[Ævar Arnfjörð Bjarmason/sub/sub2]] subpage
10762 parsoid={ "modes": ["wt2html","wt2wt"], "normalizePhp": true }
10766 <p>%C3%86var_Arnfj%C3%B6r%C3%B0_Bjarmason
10771 Magic Word: {{BASEPAGENAME}}
10773 title=[[Ævar Arnfjörð Bjarmason/sub]] subpage
10774 parsoid={ "modes": ["wt2html","wt2wt"], "normalizePhp": true }
10778 <p>Ævar Arnfjörð Bjarmason
10783 Magic Word: {{BASEPAGENAMEE}}
10785 title=[[Ævar Arnfjörð Bjarmason/sub]] subpage
10786 parsoid={ "modes": ["wt2html","wt2wt"], "normalizePhp": true }
10790 <p>%C3%86var_Arnfj%C3%B6r%C3%B0_Bjarmason
10795 Magic Word: {{TALKPAGENAME}}
10797 title=[[User:Ævar Arnfjörð Bjarmason]]
10798 parsoid={ "modes": ["wt2html","wt2wt"], "normalizePhp": true }
10802 <p>User talk:Ævar Arnfjörð Bjarmason
10807 Magic Word: {{TALKPAGENAMEE}}
10809 title=[[User:Ævar Arnfjörð Bjarmason]]
10810 parsoid={ "modes": ["wt2html","wt2wt"], "normalizePhp": true }
10814 <p>User_talk:%C3%86var_Arnfj%C3%B6r%C3%B0_Bjarmason
10819 Magic Word: {{SUBJECTPAGENAME}}
10821 title=[[User talk:Ævar Arnfjörð Bjarmason]]
10822 parsoid={ "modes": ["wt2html","wt2wt"], "normalizePhp": true }
10824 {{SUBJECTPAGENAME}}
10826 <p>User:Ævar Arnfjörð Bjarmason
10831 Magic Word: {{SUBJECTPAGENAMEE}}
10833 title=[[User talk:Ævar Arnfjörð Bjarmason]]
10834 parsoid={ "modes": ["wt2html","wt2wt"], "normalizePhp": true }
10836 {{SUBJECTPAGENAMEE}}
10838 <p>User:%C3%86var_Arnfj%C3%B6r%C3%B0_Bjarmason
10843 Magic Word: {{NUMBEROFFILES}}
10845 parsoid={ "modes": ["wt2html","wt2wt"], "normalizePhp": true }
10854 Magic Word: {{PAGENAME}}
10856 title=[[User:Ævar Arnfjörð Bjarmason]]
10857 parsoid={ "modes": ["wt2html","wt2wt"], "normalizePhp": true }
10861 <p>Ævar Arnfjörð Bjarmason
10866 Magic Word: {{PAGENAME}} with metacharacters
10868 title=[['foo & bar = baz']]
10869 parsoid={ "modes": ["wt2html","wt2wt"], "normalizePhp": true }
10873 <p><i>'foo & bar = baz'</i>
10878 Magic Word: {{PAGENAME}} with metacharacters (T28781)
10880 title=[[*RFC 1234 http://example.com/]]
10881 parsoid={ "modes": ["wt2html","wt2wt"], "normalizePhp": true }
10885 <p>*RFC 1234 http://example.com/
10890 Magic Word: {{PAGENAMEE}}
10892 title=[[User:Ævar Arnfjörð Bjarmason]]
10893 parsoid={ "modes": ["wt2html","wt2wt"], "normalizePhp": true }
10897 <p>%C3%86var_Arnfj%C3%B6r%C3%B0_Bjarmason
10902 Magic Word: {{PAGENAMEE}} with metacharacters (T28781)
10904 title=[[*RFC 1234 http://example.com/]]
10905 parsoid={ "modes": ["wt2html","wt2wt"], "normalizePhp": true }
10909 <p>*RFC_1234_http://example.com/
10914 Magic Word: {{REVISIONID}}
10916 parsoid={ "modes": ["wt2html","wt2wt"], "normalizePhp": true }
10923 flags=vary-revision-id
10927 Magic Word: {{SCRIPTPATH}}
10929 parsoid={ "modes": ["wt2html","wt2wt"], "normalizePhp": true }
10937 Magic Word: {{STYLEPATH}}
10939 parsoid={ "modes": ["wt2html","wt2wt"], "normalizePhp": true }
10948 Magic Word: {{SERVER}}
10950 parsoid={ "modes": ["wt2html","wt2wt"], "normalizePhp": true }
10954 <p><a rel="nofollow" class="external free" href="http://example.org">http://example.org</a>
10959 Magic Word: {{SERVERNAME}}
10961 parsoid={ "modes": ["wt2html","wt2wt"], "normalizePhp": true }
10970 Magic Word: {{SITENAME}}
10972 parsoid={ "modes": ["wt2html","wt2wt"], "normalizePhp": true }
10981 Magic Word: {{PAGELANGUAGE}}
10984 parsoid={ "modes": ["wt2html","wt2wt"], "normalizePhp": true }
10993 Magic Word: {{PAGELANGUAGE}} on a page with no explicitly set language
10995 parsoid={ "modes": ["wt2html","wt2wt"], "normalizePhp": true }
11004 Case-sensitive magic words, when cased differently, should just be template transclusions
11011 <p><a href="/index.php?title=Template:CurrentMonth&action=edit&redlink=1" class="new" title="Template:CurrentMonth (page does not exist)">Template:CurrentMonth</a>
11012 <a href="/index.php?title=Template:Currentday&action=edit&redlink=1" class="new" title="Template:Currentday (page does not exist)">Template:Currentday</a>
11013 <a href="/index.php?title=Template:CURreNTweEK&action=edit&redlink=1" class="new" title="Template:CURreNTweEK (page does not exist)">Template:CURreNTweEK</a>
11014 <a href="/index.php?title=Template:CurrentHour&action=edit&redlink=1" class="new" title="Template:CurrentHour (page does not exist)">Template:CurrentHour</a>
11019 Case-insensitive magic words should still work with weird casing.
11029 <a rel="nofollow" class="external free" href="http://example.org">http://example.org</a>
11033 # From plwiki:PLOS_ONE
11035 Parsoid: Page property magic word with magic word contents
11039 wgAllowDisplayTitle=true
11040 wgRestrictDisplayTitle=false
11042 {{DISPLAYTITLE:''{{PAGENAME}}''}}
11047 <meta property="mw:PageProp/displaytitle" content="Parser test" about="#mwt3" typeof="mw:ExpandedAttrs" data-parsoid='{"src":"{{DISPLAYTITLE:''{{PAGENAME}}''}}"}' data-mw='{"attribs":[[{"txt":"content"},{"html":"DISPLAYTITLE:<i data-parsoid='{\"dsr\":[15,31,2,2]}'><span about=\"#mwt1\" typeof=\"mw:Transclusion\" data-parsoid='{\"pi\":[[]],\"dsr\":[17,29,null,null]}' data-mw='{\"parts\":[{\"template\":{\"target\":{\"wt\":\"PAGENAME\",\"function\":\"pagename\"},\"params\":{},\"i\":0}}]}'>Parser test</span></i>"}]]}'/>
11050 # NOTE: mw:ExpandedAttrs is not the best typeof here. mw:Transclusion is better.
11051 # But, this is a limitation of our representation and is documented in
11052 # TemplateHandler.js in processSpecialMagicWord
11054 Parsoid: Template-generated DISPLAYTITLE
11056 {{{{echo|DISPLAYTITLE}}:Foo}}
11060 wgAllowDisplayTitle=true
11061 wgRestrictDisplayTitle=false
11066 <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"}]]}'/>
11070 Namespace 1 {{ns:1}}
11079 Namespace 1 {{ns:01}}
11088 Namespace 0 {{ns:0}} (T6783)
11096 Namespace 0 {{ns:00}} (T6783)
11104 Namespace -1 {{ns:-1}}
11113 Namespace User {{ns:User}}
11122 Namespace User talk {{ns:User_talk}}
11131 Namespace User talk {{ns:uSeR tAlK}}
11140 Namespace File {{ns:File}}
11149 Namespace File {{ns:Image}}
11158 Namespace (lang=de) Benutzer {{ns:User}}
11169 Namespace (lang=de) Benutzer Diskussion {{ns:3}}
11175 <p>Benutzer Diskussion
11182 {{urlencode:hi world?!}}
11183 {{urlencode:hi world?!|WIKI}}
11184 {{urlencode:hi world?!|PATH}}
11185 {{urlencode:hi world?!|QUERY}}
11195 Magic Word: prioritize type info over data-parsoid
11199 <meta property="mw:PageProp/forcetoc" data-parsoid='{"magicSrc":"__NOTOC__"}'/>
11205 Magic Word: serialize on separate line (parsoid)
11207 parsoid=wt2wt,html2wt
11213 foo<meta property="mw:PageProp/notoc"/>bar
11217 Magic Word: rt non-english wikis
11224 <meta property="mw:PageProp/noeditsection" data-parsoid='{"magicSrc":"__NOEDITSECTION__"}'/>
11228 __proto__ is treated as normal wikitext (T105997)
11240 Magic links: internal link to RFC (T2479)
11244 <p><a href="/index.php?title=RFC_123&action=edit&redlink=1" class="new" title="RFC 123 (page does not exist)">RFC 123</a>
11247 <p><a rel="mw:WikiLink" href="./RFC_123" title="RFC 123">RFC 123</a></p>
11251 Magic links: RFC (T2479)
11255 <p><a class="external mw-magiclink-rfc" rel="nofollow" href="https://tools.ietf.org/html/rfc822">RFC 822</a>
11258 <p><a href="https://tools.ietf.org/html/rfc822" rel="mw:ExtLink" class="external mw-magiclink">RFC 822</a></p>
11262 Magic links: RFC (T67278)
11264 This is RFC 822 but thisRFC 822 is not RFC 822linked.
11266 <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.
11269 <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>
11273 Magic links: RFC (w/ non-newline whitespace, T30950/T31025)
11275 RFC      822
11279 <p><a class="external mw-magiclink-rfc" rel="nofollow" href="https://tools.ietf.org/html/rfc822">RFC 822</a>
11284 <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>
11290 Magic links: ISBN (T3937)
11294 <p><a href="/wiki/Special:BookSources/0306406152" class="internal mw-magiclink-isbn">ISBN 0-306-40615-2</a>
11297 <p><a href="./Special:BookSources/0306406152" rel="mw:WikiLink">ISBN 0-306-40615-2</a></p>
11301 Magic links: ISBN (T67278)
11303 This is ISBN 978-0-316-09811-3 but thisISBN 978-0-316-09811-3 is not ISBN 978-0-316-09811-3linked.
11305 <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.
11308 <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>
11312 Magic links: ISBN (w/ non-newline whitespace, T30950/T31025)
11314 ISBN      978 0 316 09811 3
11320 <p><a href="/wiki/Special:BookSources/9780316098113" class="internal mw-magiclink-isbn">ISBN 978 0 316 09811 3</a>
11327 <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>
11335 Magic links: PMID incorrectly converts space to underscore
11339 <p><a class="external mw-magiclink-pmid" rel="nofollow" href="//www.ncbi.nlm.nih.gov/pubmed/1234?dopt=Abstract">PMID 1234</a>
11342 <p><a href="//www.ncbi.nlm.nih.gov/pubmed/1234?dopt=Abstract" rel="mw:ExtLink" class="external mw-magiclink">PMID 1234</a></p>
11346 Magic links: PMID (T67278)
11348 This is PMID 1234 but thisPMID 1234 is not PMID 1234linked.
11350 <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.
11353 <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>
11357 Magic links: PMID (w/ non-newline whitespace, T30950/T31025)
11359 PMID      1234
11363 <p><a class="external mw-magiclink-pmid" rel="nofollow" href="//www.ncbi.nlm.nih.gov/pubmed/1234?dopt=Abstract">PMID 1234</a>
11368 <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>
11373 # <nowiki> nodes shouldn't be inserted during html2wt by Parsoid,
11374 # since these are ExtLinkText, not MagicLinkText
11376 Magic links: use appropriate serialization for "almost" magic links.
11378 X[[Special:BookSources/0978739256|foo]]
11380 X[https://tools.ietf.org/html/rfc1234 foo]
11382 <p>X<a href="/wiki/Special:BookSources/0978739256" title="Special:BookSources/0978739256">foo</a>
11383 </p><p>X<a rel="nofollow" class="external text" href="https://tools.ietf.org/html/rfc1234">foo</a>
11386 <p>X<a rel="mw:WikiLink" href="./Special:BookSources/0978739256" title="Special:BookSources/0978739256">foo</a></p>
11387 <p>X<a rel="mw:ExtLink" class="external text" href="https://tools.ietf.org/html/rfc1234">foo</a></p>
11391 Magic links: All disabled (T47942)
11393 wgEnableMagicLinks={"ISBN":false, "PMID":false, "RFC":false}
11399 <p>ISBN 0-306-40615-2
11410 Nonexistent template
11412 {{thistemplatedoesnotexist}}
11414 <p><a href="/index.php?title=Template:Thistemplatedoesnotexist&action=edit&redlink=1" class="new" title="Template:Thistemplatedoesnotexist (page does not exist)">Template:Thistemplatedoesnotexist</a>
11419 Template with invalid target containing tags
11421 {{a<b>b</b>|{{echo|foo}}|{{echo|a}}={{echo|b}}|a = b}}
11423 <p>{{a<b>b</b>|foo|a=b|a = b}}
11428 Template with invalid target containing unclosed tag
11430 {{a<b>|{{echo|foo}}|{{echo|a}}={{echo|b}}|a = b}}
11432 <p>{{a<b>|foo|a=b|a = b}}</b>
11437 Template with invalid target containing wikilink
11441 <p>{{<a href="/wiki/Main_Page" title="Main Page">Main Page</a>}}
11444 <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>
11448 Template with just whitespace in it, T70421
11452 <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>
11458 This is a test template
11466 <p>This is a test template
11471 Template with explicit namespace
11475 <p>This is a test template
11483 This is a test template with parameter {{{param}}}
11489 {{paramtest|param=foo}}
11491 <p>This is a test template with parameter foo
11496 Template:paramtestnum
11498 [[{{{1}}}|{{{2}}}]]
11502 Template unnamed parameter
11504 {{paramtestnum|Main Page|the main page}}
11506 <p><a href="/wiki/Main_Page" title="Main Page">the main page</a>
11511 Template:templatesimple
11517 Template:templateredirect
11519 #redirect [[Template:templatesimple]]
11523 Template:templateasargtestnum
11529 Template:templateasargtest
11531 {{template{{{templ}}}}}
11535 Template:templateasargtest2
11541 Template with template name as unnamed argument
11543 {{templateasargtestnum|templatesimple}}
11550 Template with template name as argument
11552 {{templateasargtest|templ=simple}}
11559 Template with template name as argument (2)
11561 {{templateasargtest2|templ=templatesimple}}
11568 Template:templateasargtestdefault
11570 {{{{{templ|templatesimple}}}}}
11580 Template with default value
11582 {{templateasargtestdefault}}
11589 Template with default value (value set)
11591 {{templateasargtestdefault|templ=templa}}
11600 {{templateredirect}}
11605 <link rel="mw:PageProp/redirect" href="./Template:Templatesimple" typeof="mw:Transclusion" data-mw='{"parts":[{"template":{"target":{"wt":"templateredirect","href":"./Template:Templateredirect"},"params":{},"i":0}}]}'/>
11609 Template with argument in separate line
11611 {{ templateasargtest |
11619 Template with complex template as argument
11622 param ={{ templateasargtest |
11623 templ = simple }}}}
11625 <p>This is a test template with parameter (test)
11630 Templates with templated name
11632 {{{{echo|echo}}|foo}}
11633 {{{{echo|inner list}} }}
11637 <ul><li>item 1</li></ul>
11639 <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>
11640 <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>
11643 ## Regression test; the output here isn't really that interesting.
11645 Templates with templated name and top level template args
11647 {{1{{2{{{3}}}|4=5}}}}
11649 <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>
11652 # Parsoid markup is deliberate "broken". This is an edge case.
11653 # See long comment in TemplateHandler.js:convertAttribsToString.
11655 Templates with invalid templated targets
11666 <p typeof="mw:Transclusion" data-mw='{"parts":[{"template":{"target":{"wt":"echo\n{{echo|foo}}\n"},"params":{},"i":0}}]}'>{{echo
11671 Template with thumb image (with link in description)
11673 {{paramtest|param=[[Image:noimage.png|thumb|[[no link|link]] [[no link|caption]]]]}}
11675 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>
11678 <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>
11680 <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>
11684 Template:complextemplate
11686 {{{1}}} {{paramtest|
11687 param ={{{param}}}}}
11691 Template with complex arguments
11694 param ={{ templateasargtest |
11695 templ = simple }}|[[Template:complextemplate|link]]}}
11697 <p><a href="/wiki/Template:Complextemplate" title="Template:Complextemplate">link</a> This is a test template with parameter (test)
11702 T2553: link with two variables in a piped link
11705 |[[{{{1}}}|{{{2}}}]]
11710 <td>[[{{{1}}}|{{{2}}}]]
11715 <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>
11721 Abort table cell attribute parsing on wikilink
11724 |testing [[one|two]] |three||four
11725 |testing one two |three||four
11726 |testing="[[one|two]]" |three||four
11731 <td>testing <a href="/index.php?title=One&action=edit&redlink=1" class="new" title="One (page does not exist)">two</a> |three</td>
11737 <td>testing="<a href="/index.php?title=One&action=edit&redlink=1" class="new" title="One (page does not exist)">two</a>" |three</td>
11743 <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>
11744 <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>
11745 <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>
11750 Don't abort table cell attribute parsing if wikilink is found in template arg
11753 |Test {{#tag:ref|One two "[[three]]" four}}
11757 <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>
11762 Magic variable as template parameter
11764 {{paramtest|param={{SITENAME}}}}
11766 <p>This is a test template with parameter MediaWiki
11773 [[{{{param}}}|link]]
11777 Template parameter as link source
11779 {{linktest|param=Main Page}}
11781 <p><a href="/wiki/Main_Page" title="Main Page">link</a>
11786 Template:paramtest2
11788 including another template, {{paramtest|param={{{arg}}}}}
11792 Template passing argument to another template
11794 {{paramtest2|arg='hmm'}}
11796 <p>including another template, This is a test template with parameter 'hmm'
11807 Template as link source
11811 [[{{linktest2}}|Main Page]]
11813 [[{{linktest2}}]]Page
11815 <p><a href="/wiki/Main_Page" title="Main Page">Main Page</a>
11816 </p><p><a href="/wiki/Main_Page" title="Main Page">Main Page</a>
11817 </p><p><a href="/wiki/Main_Page" title="Main Page">Main Page</a>Page
11835 Template infinite loop
11839 <p><span class="error">Template loop detected: <a href="/wiki/Template:Loop1" title="Template:Loop1">Template:Loop1</a></span>
11844 Template from main namespace
11853 Template from non-includable namespace
11855 wgNonincludableNamespaces=10
11859 <p><a href="/wiki/Template:Echo" title="Template:Echo">Template:Echo</a>
11874 T2529: Template with table, not included at beginning of line
11893 T2523: Template shouldn't eat newline (or add an extra one before table)
11913 T2041: Template parameters shown as broken links
11922 Template with targets containing wikilinks
11928 {{[[{{echo|foo}}]]}}
11930 {{{{echo|[[foo}}]]}}
11932 <p>{{<a href="/wiki/Foo" title="Foo">foo</a>}}
11933 </p><p>{{<a href="/wiki/Foo" title="Foo">foo</a>}}
11937 <p>{{<a rel="mw:WikiLink" href="./Foo" title="Foo">foo</a>}}</p>
11938 <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>
11939 <p>{{<span typeof="mw:Transclusion" data-mw='{"parts":[{"template":{"target":{"wt":"echo","href":"./Template:Echo"},"params":{"1":{"wt":"[[foo}}]]"}},"i":0}}]}'>[[foo}}]]</span></p>
11949 Templates: Double quotes as template target
11956 <p>foo <span about="#mwt1" typeof="mw:Transclusion" data-mw='{"parts":[{"template":{"target":{"wt":"''","href":"./Template:''"},"params":{},"i":0}}]}'>bar</span> baz
11960 ## This test is about making sure Parsoid's data-mw is well formed in the
11961 ## face of multiple templates with intersecting and overlapping ranges. The
11962 ## wikitext itself is wretched.
11964 Templates with intersecting and overlapping ranges
11975 </table><p>ho</p><table>
11979 </td></tr></tbody></table>
11981 <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":""}]]}'>
11983 </table><p about="#mwt1">ho</p><table about="#mwt1" typeof="mw:ExpandedAttrs" data-mw='{"attribs":[[{"txt":"","html":""},{"html":""}]]}'>
11985 <tbody><tr><td>hi</td></tr>
11990 Template:MSGNW test
11992 ''None'' of '''this''' should be
11994 but rather passed unmodified
12002 # hmm, fix this or just deprecate msgnw and document its behavior?
12006 {{msgnw:MSGNW test}}
12008 <p>''None'' of '''this''' should be
12010  but rather passed unmodified
12011 {{test}}
12015 <!-- comment -->
12022 {{int:youhavenewmessages|lots of money|not!}}
12024 <p>You have lots of money (not!).
12029 int keyword - non-existing message
12040 Foo<noinclude>zar</noinclude><includeonly>bar</includeonly>
12044 <includeonly> and <noinclude> being included
12055 <onlyinclude>Foo</onlyinclude>bar
12059 <onlyinclude> being included
12071 <onlyinclude>Foo</onlyinclude>bar<includeonly>zar</includeonly>
12075 <onlyinclude> and <includeonly> being included
12084 <includeonly> and <noinclude> on a page
12086 Foo<noinclude>zar</noinclude><includeonly>bar</includeonly>
12093 Un-closed <noinclude>
12100 <onlyinclude> on a page
12102 <onlyinclude>Foo</onlyinclude>bar
12109 Un-closed <onlyinclude>
12116 Self-closed noinclude, includeonly, onlyinclude tags
12127 Unbalanced includeonly and noinclude tags
12131 |b</noinclude></noinclude>
12132 |c</noinclude></includeonly>
12133 |d</includeonly></includeonly>
12142 <td>c</includeonly>
12144 <td>d</includeonly></includeonly>
12150 Template:Includeonly section
12153 ==Includeonly section==
12159 T8563: Edit link generation for section shown by <includeonly>
12161 {{includeonly section}}
12163 <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>
12164 <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>
12168 # Uses same input as the contents of [[Template:Includeonly section]]
12170 T8563: Section extraction for section shown by <includeonly>
12175 ==Includeonly section==
12183 T8563: Edit link generation for section suppressed by <includeonly>
12186 ==Includeonly section==
12190 <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>
12195 T8563: Section extraction for section suppressed by <includeonly>
12200 ==Includeonly section==
12208 Un-closed <includeonly>
12213 <meta typeof="mw:Includes/IncludeOnly" data-parsoid='{"src":"<includeonly>"}' data-mw='{"src":"<includeonly>"}'/>
12216 ## We used to, but no longer wt2wt this test since the default serializer
12217 ## will normalize the include directives to serialize on their own line.
12218 ## Selser will take care of preserving formatting in scenarios where they
12219 ## intermingled with other wikitext.
12221 Includes and comments at SOL
12223 parsoid=wt2html,html2html
12225 <!-- comment --><noinclude><!-- comment --></noinclude><!-- comment -->==hu==
12233 some</noinclude>* stuff
12236 <includeonly>can have stuff</includeonly>===here===
12239 <h2><span class="mw-headline" id="hu">hu</span></h2>
12247 <ul><li>here</li></ul>
12248 <h3><span class="mw-headline" id="here">here</span></h3>
12251 <!-- 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>
12253 <meta typeof="mw:Includes/NoInclude" data-parsoid='{"src":"<noinclude>"}'/>
12255 <meta typeof="mw:Includes/NoInclude/End" data-parsoid='{"src":"</noinclude>"}'/><ul><li>stuff</li>
12258 <meta typeof="mw:Includes/NoInclude" data-parsoid='{"src":"<noinclude>"}'/>
12259 <p>some<meta typeof="mw:Includes/NoInclude/End" data-parsoid='{"src":"</noinclude>"}'/>* stuff</p>
12260 <ul><li>here</li></ul>
12262 <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>
12266 # TODO: test with DOM fragment reuse!
12268 Parsoid: DOM fragment reuse
12270 parsoid=wt2wt,wt2html
12272 a{{echo|b<table></table>c}}d
12284 <p>ab</p><table></table><p>cd
12295 <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>
12297 <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">
12298 </span><table about="#mwt2" data-parsoid='{"stx":"html"}'></table><span about="#mwt2">
12299 </span><p about="#mwt2">cd</p>
12301 <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">
12303 </span><table about="#mwt3" data-parsoid='{"stx":"html"}'></table><span about="#mwt3">
12305 </span><p about="#mwt3">b</p>
12309 Parsoid: Merge double tds (T52603)
12312 |{{echo|{{!}} foo}}
12318 </td></tr></tbody></table>
12321 <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>
12326 Parsoid: Merge double tds in nested transclusion content (T52603)
12330 |{{echo|{{!}} foo}}
12338 </td></tr></tbody></table>
12341 <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}}]}'>
12343 <tr><td data-mw='{"parts":["|"]}'> foo</td></tr>
12349 ### <includeonly> and <noinclude> in attributes
12352 0. includeonly around the entire attribute
12354 <span <includeonly>id="v1"</includeonly><noinclude>id="v2"</noinclude>>bar</span>
12356 <p><span id="v2">bar</span>
12361 1. includeonly in html attr key
12363 <span <noinclude>id</noinclude><includeonly>about</includeonly>="foo">bar</span>
12365 <p><span id="foo">bar</span>
12370 2. includeonly in html attr value
12372 <span id="<noinclude>v1</noinclude><includeonly>v2</includeonly>">bar</span>
12373 <span id=<noinclude>"v1"</noinclude><includeonly>"v2"</includeonly>>bar</span>
12375 <p><span id="v1">bar</span>
12376 <span id="v1">bar</span>
12381 3. includeonly in part of an attr value
12383 <span style="color:<noinclude>red</noinclude><includeonly>blue</includeonly>;">bar</span>
12385 <p><span style="color:red;">bar</span>
12390 4. includeonly in table attributes
12414 ### Preprocessor precedence tests
12415 ### See: https://www.mediawiki.org/wiki/Preprocessor_ABNF
12417 ##{{[[-{{{{{{[[Foo|bar}}]]}-}}}}}]]
12419 Preprocessor precedence 1: link is rightmost opening
12425 But close-brace is not a valid character in a link title:
12428 However, we can still tell this was handled as a link in the preprocessor:
12429 {{echo|[[Foo}}|bar]]|bat}}
12431 <p>{{<a href="/wiki/Foo" title="Foo">bar}}</a>
12432 </p><p>But close-brace is not a valid character in a link title:
12434 </p><p>However, we can still tell this was handled as a link in the preprocessor:
12438 <p>{{<a rel="mw:WikiLink" href="./Foo" title="Foo">bar}}</a></p>
12439 <p>But close-brace is not a valid character in a link title: {{[[Foo}}|bar]]</p>
12440 <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>
12444 Preprocessor precedence 2: template is rightmost opening
12453 <p>-<span typeof="mw:Transclusion" data-mw='{"parts":[{"template":{"target":{"wt":"echo","href":"./Template:Echo"},"params":{"1":{"wt":"foo}-"}},"i":0}}]}'>foo}-</span>-</p>
12457 Preprocessor precedence 3: language converter is rightmost opening
12473 <p typeof="mw:Transclusion" data-mw='{"parts":[{"template":{"target":{"wt":"echo","href":"./Template:Echo"},"params":{"1":{"wt":"hi"}},"i":0}}]}'>hi</p>
12474 <p>{{<span typeof="mw:LanguageVariant" data-mw-variant='{"disabled":{"t":"echo|hi}}"}}'></span></p>
12475 <p>[[<span typeof="mw:LanguageVariant" data-mw-variant='{"disabled":{"t":"raw]]"}}'></span></p>
12479 Preprocessor precedence 4: left-most angle bracket
12490 Template:Precedence5
12496 Preprocessor precedence 5: tplarg takes precedence over template
12498 {{Precedence5|Bullet}}
12500 <ul><li>Bar</li></ul>
12502 <ul typeof="mw:Transclusion" data-mw='{"parts":[{"template":{"target":{"wt":"Precedence5","href":"./Template:Precedence5"},"params":{"1":{"wt":"Bullet"}},"i":0}}]}'><li>Bar</li></ul>
12506 Preprocessor precedence 6: broken link is rightmost opening
12512 {{echo|[[Foo|bar|bat=baz}}
12515 </p><p>{{echo|[[Foo|bar|bat=baz}}
12518 <p>{{echo|[[Foo}}</p>
12519 <p>{{echo|[[Foo|bar|bat=baz}}</p>
12522 # This next test exposes a difference between PHP and Parsoid:
12523 # Given [[Foo|{{echo|Bar]]x}}y]]z:
12524 # 1) Both PHP and Parsoid ignore the `]]` inside the `echo` in the
12525 # "preprocessor" stage. The `{{echo` extends until the `x}}`, and the
12526 # outer `[[Foo` extends until the `y]]`
12527 # 2a) But then the PHP preprocessor emits `[[Foo|Bar]]xy]]z` as an
12528 # intermediate result (after template expansion), and link processing
12529 # happens on this intermediate result, which moves the wikilink
12530 # boundary leftward to `[[Foo|Bar]]`
12531 # 2b) Parsoid works in a single step, so it's going to keep the
12532 # wikilink as extending to the `y]]`
12533 # 3a) Then PHP does linktrail processing which slurps up the trailing
12534 # `xy` inside the link.
12535 # 3b) Parsoid will do linktrail processing to slurp up the trailing
12536 # `z` inside the link.
12537 # This is "correct" behavior. Parsoid's basic worldview is that the
12538 # `]]` inside the template shouldn't be allowed to leak out to affect
12539 # the surrounding wikilink. PHP may match Parsoid (in the future)
12540 # if you use {{#balance}} (T114445).
12543 Preprocessor precedence 7: broken template is rightmost opening
12549 [[Foo|{{echo|Bar]]-x}}-y]]-z
12551 Careful: linktrails can move the end of the wikilink:
12552 [[Foo|{{echo|y']]a}}l]]l
12554 <p><a href="/wiki/Foo" title="Foo">{{echo|Bar</a>
12555 </p><p><a href="/wiki/Foo" title="Foo">Bar</a>-x-y]]-z
12556 </p><p>Careful: linktrails can move the end of the wikilink:
12557 <a href="/wiki/Foo" title="Foo">y'al</a>]]l
12560 <p>[[Foo|{{echo|Bar]]</p>
12561 <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>
12562 <p>Careful: linktrails can move the end of the wikilink:
12563 <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>
12567 Preprocessor precedence 8: broken language converter is rightmost opening
12578 Template:Preprocessor_precedence_9
12583 ;7: {{{{{{{4}}}}}}}
12587 Preprocessor precedence 9: groups of braces
12589 {{Preprocessor precedence 9|Four|Bullet|1|2}}
12595 <ul><li>Bar</li></ul>
12599 <dd>{Bullet}</dd></dl>
12601 <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}}]}'>
12606 </dl><ul about="#mwt1">
12608 </ul><span about="#mwt1"> </span><dl about="#mwt1">
12617 Template:Preprocessor_precedence_10
12624 ;6: -{{{{{{4}}}}}}-
12625 ;7: -{{{{{{{5}}}}}}}-
12629 Preprocessor precedence 10: groups of braces with leading dash
12633 {{Preprocessor precedence 10|Three|raw2|Bullet|1|2}}
12639 <ul><li>Bar-</li></ul>
12646 <ul><li>Bar-</li></ul>
12652 <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}}]}'>
12654 <dd><span typeof="mw:LanguageVariant" data-mw-variant='{"disabled":{"t":"raw"}}'></span></dd>
12657 </dl><ul about="#mwt1">
12659 </ul><span about="#mwt1"> </span><dl about="#mwt1">
12663 <dd><span typeof="mw:LanguageVariant" data-mw-variant='{"disabled":{"t":"raw2"}}'></span></dd>
12666 </dl><ul about="#mwt1">
12668 </ul><span about="#mwt1"> </span><dl about="#mwt1">
12672 <dd><span typeof="mw:LanguageVariant" data-mw-variant='{"disabled":{"t":"raw2"}}'></span></dd>
12677 Preprocessor precedence 11: found during visual diff testing
12679 {{#tag:span|-{{#tag:span|-{{echo|x}}}}}}
12681 {{echo|-{{echo|-{{echo|x}}}}}}
12683 {{echo|-{{echo|x}}}}
12685 <p><span>-<span>-x</span></span>
12690 <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>
12692 <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>
12694 <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>
12698 Preprocessor precedence 12: broken language converter closed by brace.
12702 This form breaks the template, which is unfortunate:
12703 *{{echo|foo-{bar}bat}}
12705 But if the broken language converter markup is inside an extension
12706 tag, nothing bad happens:
12707 *<nowiki>foo-{bar}bat</nowiki>
12708 *{{echo|<nowiki>foo-{bar}bat</nowiki>}}
12709 *<pre>foo-{bar}bat</pre>
12710 *{{echo|<pre>foo-{bar}bat</pre>}}
12712 <tag>foo-{bar}bat</tag>
12713 {{echo|<tag>foo-{bar}bat</tag>}}
12716 <p>This form breaks the template, which is unfortunate:
12718 <ul><li>{{echo|foo-{bar}bat}}</li></ul>
12719 <p>But if the broken language converter markup is inside an extension
12720 tag, nothing bad happens:
12722 <ul><li>foo-{bar}bat</li>
12723 <li>foo-{bar}bat</li>
12724 <li><pre>foo-{bar}bat</pre></li>
12725 <li><pre>foo-{bar}bat</pre></li></ul>
12726 <pre>'foo-{bar}bat'
12730 <pre>'foo-{bar}bat'
12735 <p>This form breaks the template, which is unfortunate:</p>
12737 <li>{{echo|foo-{bar}bat}}</li>
12739 <p>But if the broken language converter markup is inside an extension tag, nothing bad happens:</p>
12741 <li><span typeof="mw:Nowiki">foo-{bar}bat</span></li>
12742 <li><span typeof="mw:Nowiki mw:Transclusion" data-mw='{"parts":[{"template":{"target":{"wt":"echo","href":"./Template:Echo"},"params":{"1":{"wt":"<nowiki>foo-{bar}bat</nowiki>"}},"i":0}}]}'>foo-{bar}bat</span></li>
12743 <li><pre typeof="mw:Extension/pre" data-mw='{"name":"pre","attrs":{},"body":{"extsrc":"foo-{bar}bat"}}'>foo-{bar}bat</pre></li>
12744 <li><pre typeof="mw:Extension/pre mw:Transclusion" data-mw='{"parts":[{"template":{"target":{"wt":"echo","href":"./Template:Echo"},"params":{"1":{"wt":"<pre>foo-{bar}bat</pre>"}},"i":0}}]}'>foo-{bar}bat</pre></li>
12746 <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>
12750 Preprocessor precedence 13: broken language converter in external link
12754 *[http://example.com/-{foo Example in URL]
12755 *[http://example.com Example in -{link} description]
12756 *{{echo|[http://example.com/-{foo Breaks template, however]}}
12758 <ul><li><a rel="nofollow" class="external text" href="http://example.com/-{foo">Example in URL</a></li>
12759 <li><a rel="nofollow" class="external text" href="http://example.com">Example in -{link} description</a></li>
12760 <li>{{echo|<a rel="nofollow" class="external text" href="http://example.com/-{foo">Breaks template, however</a>}}</li></ul>
12763 <li><a rel="mw:ExtLink" class="external text" href="http://example.com/-{foo">Example in URL</a></li>
12764 <li><a rel="mw:ExtLink" class="external text" href="http://example.com">Example in -{link} description</a></li>
12765 <li>{{echo|<a rel="mw:ExtLink" class="external text" href="http://example.com/-{foo">Breaks template, however</a>}}</li>
12770 Preprocessor precedence 14: broken language converter in comment
12772 *<!--{{foo}}-->...should be ok
12773 *<!---{{foo}}-->...extra dashes
12774 *{{echo|foo<!-- -{bar} -->bat}}...should be ok
12776 <ul><li>...should be ok</li>
12777 <li>...extra dashes</li>
12778 <li>foobat...should be ok</li></ul>
12781 <li><!--{{foo}}-->...should be ok</li>
12782 <li><!---{{foo}}-->...extra dashes</li>
12783 <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>
12788 Preprocessor precedence 15: broken brace markup in headings
12790 wgFragmentMode=[ 'html5', 'legacy' ]
12794 __NOTOC__ __NOEDITSECTION__
12803 ===5 foo{{{bar 5===
12808 <h3><span id="1_foo.5Bbar_1"></span><span class="mw-headline" id="1_foo[bar_1">1 foo[bar 1</span></h3>
12811 <h3><span id="2_foo.5B.5Bbar_2"></span><span class="mw-headline" id="2_foo[[bar_2">2 foo[[bar 2</span></h3>
12814 <h3><span id="3_foo.7Bbar_3"></span><span class="mw-headline" id="3_foo{bar_3">3 foo{bar 3</span></h3>
12817 <h3><span id="4_foo.7B.7Bbar_4"></span><span class="mw-headline" id="4_foo{{bar_4">4 foo{{bar 4</span></h3>
12820 <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>
12823 <h3><span id="6_foo-.7Bbar_6"></span><span class="mw-headline" id="6_foo-{bar_6">6 foo-{bar 6</span></h3>
12827 <meta property="mw:PageProp/notoc"/> <meta property="mw:PageProp/noeditsection"/>
12828 <h3 id="1_foo[bar_1"><span id="1_foo.5Bbar_1" typeof="mw:FallbackId"></span>1 foo[bar 1</h3>
12830 <h3 id="2_foo[[bar_2"><span id="2_foo.5B.5Bbar_2" typeof="mw:FallbackId"></span>2 foo[[bar 2</h3>
12832 <h3 id="3_foo{bar_3"><span id="3_foo.7Bbar_3" typeof="mw:FallbackId"></span>3 foo{bar 3</h3>
12834 <h3 id="4_foo{{bar_4"><span id="4_foo.7B.7Bbar_4" typeof="mw:FallbackId"></span>4 foo{{bar 4</h3>
12836 <h3 id="5_foo{{{bar_5"><span id="5_foo.7B.7B.7Bbar_5" typeof="mw:FallbackId"></span>5 foo{{{bar 5</h3>
12838 <h3 id="6_foo-{bar_6"><span id="6_foo-.7Bbar_6" typeof="mw:FallbackId"></span>6 foo-{bar 6</h3>
12843 Preprocessor precedence 16: matching closing braces to opening braces
12848 -{{{echo|foo}}bar}-
12853 <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>
12857 Preprocessor precedence 17: template w/o target shouldn't prevent closing
12866 <p about="#mwt1" typeof="mw:Transclusion" data-mw='{"parts":[{"template":{"target":{"wt":"echo","href":"./Template:Echo"},"params":{"1":{"wt":"hi {{}}"}},"i":0}}]}'>hi {{}}</p>
12869 # Ensure we're using a language without variants for this test; even
12870 # if $wgUsePigLatinVariant is true. We've picked `de` arbitrarily.
12872 Preprocessor precedence 18: another rightmost wins scenario
12877 {{ -{{{{1|tplarg}}} }} }-
12879 <p>{{ -{tplarg }} }-
12882 <p>{{ -{<span about="#mwt1" typeof="mw:Param" data-mw='{"parts":[{"templatearg":{"target":{"wt":"1"},"params":{"1":{"wt":"tplarg"}},"i":0}}]}'>tplarg</span> }} }-</p>
12886 Preprocessor precedence 19: break syntax
12899 ### Token Stream Patcher tests
12901 ### These tests won't always pass wt2wt and other modes because
12902 ### on serialization, the table will be output on a new line.
12903 ### For now, we are blacklisting them, and using this to test selser.
12907 1. Table tag in SOL posn. should get reparsed correctly with valid TSR
12909 parsoid=wt2html,wt2wt
12911 {{echo|}}{| width = '100%'
12915 <span typeof="mw:Transclusion" data-mw='{"parts":[{"template":{"target":{"wt":"echo","href":"./Template:Echo"},"params":{"1":{"wt":""}},"i":0}}]}'></span><table width="100%">
12916 <tbody><tr><td>foo</td></tr>
12920 ## We used to, but no longer wt2wt this test since the default serializer
12921 ## will normalize the include directives to serialize on their own line.
12922 ## Selser will take care of preserving formatting in scenarios where they
12923 ## intermingled with other wikitext.
12925 2. Table tag in SOL posn. should get reparsed correctly with valid TSR
12929 <includeonly>a</includeonly>{| {{{b}}}
12933 <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":""}]]}'>
12934 <tbody><tr><td>c</td></tr>
12939 Table wikitext syntax outside wiki-tables
12943 ! not a table heading
12946 | class="foo bar" | baz
12954 ! not a table heading
12957 | class="foo bar" | baz
12966 ### Testing parsing of templates where a template arg
12967 ### has the same name as the template itself.
12973 {{{quote|{{{1}}}}}}
12977 Templates: Template Name/Arg clash: 1. Use of positional param
12986 Templates: Template Name/Arg clash: 2. Use of named param
12988 {{quote|quote=foo}}
12995 Templates: Template Name/Arg clash: 3. Use of named param with empty input
13004 ### Parsoid-centric tests to stress Parsoid's ability to RT them unchanged
13008 Templates: 1. Simple use
13017 Templates: 2. Inside a block tag
13019 <div>{{echo|Foo}}</div>
13020 <blockquote>{{echo|Foo}}</blockquote>
13023 <blockquote>Foo</blockquote>
13027 <blockquote><p>Foo</p></blockquote>
13031 Templates: P-wrapping: 1a. Templates on consecutive lines
13042 Templates: P-wrapping: 1b. Templates on consecutive lines
13056 Templates: P-wrapping: 1c. Templates on consecutive lines
13059 {{echo|bar}} <div>baz</div>
13068 bar </p><div>baz</div>
13072 Templates: P-wrapping: 1d. Template preceded by comment-only line
13082 <p about="#mwt223" typeof="mw:Transclusion" data-mw='{"parts":[{"template":{"target":{"wt":"echo","href":"./Template:Echo"},"params":{"1":{"wt":"Bar"}},"i":0}}]}'>Bar</p>
13086 Templates: Scopes should not be expanded unnecessarily
13088 parsoid=wt2html,wt2wt
13090 {{echo|<div>a</div>}}b{{echo|
13096 <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}}]}'>
13097 </span><div about="#mwt2">c</div>
13101 Templates: Inline Text: 1. Multiple template uses
13103 {{echo|Foo}}bar{{echo|baz}}
13110 Templates: Inline Text: 2. Back-to-back template uses
13112 {{echo|Foo}}{{echo|bar}}
13119 Templates: Block Tags: 1. Multiple template uses
13121 {{echo|<div>Foo</div>}}<div>bar</div>{{echo|<div>baz</div>}}
13123 <div>Foo</div><div>bar</div><div>baz</div>
13128 Templates: Block Tags: 2. Back-to-back template uses
13130 {{echo|<div>Foo</div>}}{{echo|<div>bar</div>}}
13132 <div>Foo</div><div>bar</div>
13136 ## Parsoid drops empty elements in templates.
13138 Templates: Correctly encapsulate templates producing </p> tag without a corresponding <p> tag
13145 b</p><p class="mw-empty-elt"></p>
13147 <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">
13148 </span><p about="#mwt1">b</p>
13152 Templates: Links: 1. Simple example
13154 {{echo|[[Foo|bar]]}}
13156 <p><a href="/wiki/Foo" title="Foo">bar</a>
13161 Templates: Links: 2. Generation of link href
13163 [[{{echo|Foo}}|bar]]
13165 <p><a href="/wiki/Foo" title="Foo">bar</a>
13170 Templates: Links: 3. Generation of part of a link href
13172 [[Fo{{echo|o}}|bar]]
13174 [[Foo{{echo|bar}}]]
13176 [[Foo{{echo|bar}}baz]]
13178 [[Foo{{echo|bar}}|bar]]
13180 [[:Foo{{echo|bar}}]]
13182 [[:Foo{{echo|bar}}|bar]]
13184 <p><a href="/wiki/Foo" title="Foo">bar</a>
13185 </p><p><a href="/index.php?title=Foobar&action=edit&redlink=1" class="new" title="Foobar (page does not exist)">Foobar</a>
13186 </p><p><a href="/index.php?title=Foobarbaz&action=edit&redlink=1" class="new" title="Foobarbaz (page does not exist)">Foobarbaz</a>
13187 </p><p><a href="/index.php?title=Foobar&action=edit&redlink=1" class="new" title="Foobar (page does not exist)">bar</a>
13188 </p><p><a href="/index.php?title=Foobar&action=edit&redlink=1" class="new" title="Foobar (page does not exist)">Foobar</a>
13189 </p><p><a href="/index.php?title=Foobar&action=edit&redlink=1" class="new" title="Foobar (page does not exist)">bar</a>
13194 Templates: Links: 4. Multiple templates generating link href
13196 [[{{echo|F}}{{echo|o}}ob{{echo|ar}}]]
13198 <p><a href="/index.php?title=Foobar&action=edit&redlink=1" class="new" title="Foobar (page does not exist)">Foobar</a>
13203 Templates: Links: 5. Generation of link text
13205 [[Foo|{{echo|bar}}]]
13207 <p><a href="/wiki/Foo" title="Foo">bar</a>
13212 Templates: Links: 5. Nested templates (only outermost template should be marked)
13214 {{echo|[[{{echo|Foo}}|bar]]}}
13216 <p><a href="/wiki/Foo" title="Foo">bar</a>
13221 Templates: HTML Tag: 1. Generation of HTML attr. key
13223 <div {{echo|style}}="color:red;">foo</div>
13225 <div style="color:red;">foo</div>
13230 Templates: HTML Tag: 2. Generation of HTML attr. value
13232 <div style={{echo|'color:red;'}}>foo</div>
13234 <div style="color:red;">foo</div>
13239 Templates: HTML Tag: 3. Generation of HTML attr key and value
13241 <div {{echo|style}}={{echo|'color:red;'}}>foo</div>
13243 <div style="color:red;">foo</div>
13248 Templates: HTML Tag: 4. Generation of starting piece of HTML attr value
13250 <div title="{{echo|This is a long title}} with just one piece templated">foo</div>
13252 <div title="This is a long title with just one piece templated">foo</div>
13257 Templates: HTML Tag: 5. Generation of middle piece of HTML attr value
13259 <div title="This is a long title with just {{echo|one piece}} templated">foo</div>
13261 <div title="This is a long title with just one piece templated">foo</div>
13266 Templates: HTML Tag: 6. Generation of end piece of HTML attr value
13268 <div title="This is a long title with just one piece {{echo|templated}}">foo</div>
13270 <div title="This is a long title with just one piece templated">foo</div>
13274 # SSS FIXME: While it is great we added support for all this,
13275 # do we want to make this part of the spec? Maybe we want to
13276 # deprecate this kind of usage in the future?
13278 Templates: HTML Tag: 7. Generation of partial attribute key string
13280 <div st{{echo|yle}}="color:red;">foo</div>
13282 <div style="color:red;">foo</div>
13287 Templates: HTML Tag: 8. Template-generated attribute (k=v)
13289 <div {{echo|1=id="v1"}}>bar</div>
13291 <div id="v1">bar</div>
13296 Templates: HTML Tag: 9. Multiple template-generated attributes
13298 <div {{echo|1=id="v1" title="foo"}}>bar</div>
13300 <div id="v1" title="foo">bar</div>
13305 Templates: Support for templates generating attributes and content
13307 {| {{mixed_attr_content_template}}
13312 <table style="color:red;" title="T48811">
13322 <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|}"]}'>
13331 Template:attribute_from_template
13337 Table cell with attribute before expanded attribute
13340 | align="center" {{attribute_from_template}} |456
13344 <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>
13349 1. Entities and nowikis inside templated attributes should be handled correctly
13351 <div {{echo|style{{=}}"background:#f9f9f9;"}}>foo</div>
13353 <div style="background:#f9f9f9;">foo</div>
13356 <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>
13360 2. Entities and nowikis inside templated attributes should be handled correctly
13363 |{{table_attribs_3}}
13368 <td style="background:#f9f9f9;">Foo
13373 <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>
13378 3. Entities and nowikis inside templated attributes should be handled correctly inside templated tables
13381 |{{table_attribs_3}}
13386 <td style="background:#f9f9f9;">Foo
13390 <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}}]}'>
13391 <tbody><tr><td style="background:#f9f9f9;">Foo</td></tr>
13397 4. Entities and nowikis inside templated attributes should be handled correctly inside templated tables
13400 |{{table_attribs_6}} hi
13405 <td style="background: red;">hi
13410 <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>
13415 Templates: HTML Tables: 1. Generating start of a HTML table
13417 {{echo|<table><tr><td>foo</td>}}</tr></table>
13419 <table><tr><td>foo</td></tr></table>
13424 Templates: HTML Tables: 2a. Generating middle of a HTML table
13426 <table><tr>{{echo|<td>foo</td>}}</tr></table>
13428 <table><tr><td>foo</td></tr></table>
13433 Templates: HTML Tables: 2b. Generating middle of a HTML table
13435 <table>{{echo|<tr><td>foo</td></tr>}}</table>
13437 <table><tr><td>foo</td></tr></table>
13442 Templates: HTML Tables: 3. Generating end of a HTML table
13444 <table><tr>{{echo|<td>foo</td></tr></table>}}
13446 <table><tr><td>foo</td></tr></table>
13451 Templates: HTML Tables: 4a. Generating a single tag of a HTML table
13453 {{echo|<table>}}<tr><td>foo</td></tr></table>
13455 <table><tr><td>foo</td></tr></table>
13460 Templates: HTML Tables: 4b. Generating a single tag of a HTML table
13462 <table>{{echo|<tr>}}<td>foo</td></tr></table>
13464 <table><tr><td>foo</td></tr></table>
13469 Templates: HTML Tables: 4c. Generating a single tag of a HTML table
13471 <table><tr>{{echo|<td>}}foo</td></tr></table>
13473 <table><tr><td>foo</td></tr></table>
13478 Templates: HTML Tables: 4d. Generating a single tag of a HTML table
13480 <table><tr><td>foo{{echo|</td>}}</tr></table>
13482 <table><tr><td>foo</td></tr></table>
13487 Templates: HTML Tables: 4e. Generating a single tag of a HTML table
13489 <table><tr><td>foo</td>{{echo|</tr>}}</table>
13491 <table><tr><td>foo</td></tr></table>
13496 Templates: HTML Tables: 4f. Generating a single tag of a HTML table
13498 <table><tr><td>foo</td></tr>{{echo|</table>}}
13500 <table><tr><td>foo</td></tr></table>
13505 Templates: HTML Tables: 5. Proper fostering of categories from inside
13507 parsoid=wt2html,wt2wt
13509 <table>[[Category:foo1]]<tr><td>foo</td></tr></table>
13510 <!--Two categories (T52330)-->
13511 <table>[[Category:bar1]][[Category:bar2]]<tr><td>foo</td></tr></table>
13513 <table><tbody><tr><td>foo</td></tr></tbody></table>
13514 <table><tbody><tr><td>foo</td></tr></tbody></table>
13516 <link rel="mw:PageProp/Category" href="./Category:Foo1"><table><tbody><tr><td>foo</td></tr></tbody></table>
13517 <!--Two categories (T52330)-->
13518 <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>
13521 ## Remex doesn't account for fostered content.
13523 Templates: Wiki Tables: 1a. Fostering of entire template content
13531 <tr><td></td></tr></table>
13536 <table><tbody><tr><td></td></tr></tbody></table>
13538 <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">
13544 Templates: Wiki Tables: 1b. Fostering of entire template content
13557 <tr><td></td></tr></table>
13565 <tbody><tr><td></td></tr></tbody></table>
13567 <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|}"]}'>
13569 </div><table about="#mwt3">
13574 ## Remex doesn't account for fostered content.
13576 Templates: Wiki Tables: 2. Fostering of partial template content
13586 <tr><td></td></tr></table>
13591 <div>b</div><table>
13592 <tbody><tr><td></td></tr></tbody></table>
13594 <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">
13601 Templates: Wiki Tables: 3. td-content via multiple templates
13604 {{echo|{{pipe}}a}}{{echo|b}}
13615 Templates: Wiki Tables: 4. Templated tags, no content
13621 <tr><td></td></tr></table>
13626 Templates: Wiki Tables: 5. Templated tags, regular td-tags
13640 Templates: Wiki Tables: 6. Templated tags, templated td-tags
13653 ## This test case is very specific to Parsoid's internals
13654 ## and is hence only tested for Parsoid's code. Parsoid uses
13655 ## a <meta> marker tag for <ref> tags and they are expanded
13656 ## much later. We are verifying that this <meta> tag usage
13657 ## doesn't prevent foster parenting.
13659 Templates: Wiki Tables: 7. Fosterable <ref>s should get fostered
13661 {{PartialTable}}<ref>foo</ref>
13666 <p about="#mwt2" typeof="mw:Transclusion" data-mw='{"parts":[{"template":{"target":{"wt":"PartialTable","href":"./Template:PartialTable"},"params":{},"i":0}},"<ref>foo</ref>\n|}"]}'><sup about="#mwt3" class="mw-ref" id="cite_ref-1" rel="dc:references" typeof="mw:Extension/ref" data-mw='{"name":"ref","attrs":{},"body":{"id":"mw-reference-text-cite_note-1"}}'><a href="./Parser_test#cite_note-1" style="counter-reset: mw-Ref 1;"><span class="mw-reflink-text">[1]</span></a></sup></p><table about="#mwt2">
13670 <ol class="mw-references references" typeof="mw:Extension/references" about="#mwt5" data-mw='{"name":"references","attrs":{}}'><li about="#cite_note-1" id="cite_note-1"><a href="./Parser_test#cite_ref-1" rel="mw:referencedBy"><span class="mw-linkback-text">↑ </span></a> <span id="mw-reference-text-cite_note-1" class="mw-reference-text">foo</span></li></ol>
13674 Templates: Wiki Tables: 8. Fosterable meta-tags should get fostered
13684 <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{{!}}}"]}'>
13685 </span><meta typeof="mw:Includes/OnlyInclude" about="#mwt1"/><table about="#mwt1">
13689 <meta typeof="mw:Includes/OnlyInclude/End"/></td></tr>
13694 Templates: Lists: Multi-line list-items via templates
13696 *{{echo|a {{nonexistent|
13698 *{{echo|b {{nonexistent|
13701 <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>
13702 <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>
13706 Templates: Ugly nesting: 1. Quotes opened/closed across templates (echo)
13708 {{echo|''a}}{{echo|b''c''d}}{{echo|''e}}
13710 <p><i>ab</i>c<i>d</i>e
13715 Templates: Ugly nesting: 2. Quotes opened/closed across templates (echo_with_span)
13716 (PHP parser generates misnested html)
13718 {{echo_with_span|''a}}{{echo_with_span|b''c''d}}{{echo_with_span|''e}}
13720 <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>
13724 Templates: Ugly nesting: 3. Quotes opened/closed across templates (echo_with_div)
13725 (PHP parser generates misnested html; Parsoid html2wt mode adds newlines between {{echo}}s)
13727 parsoid=wt2html,wt2wt
13729 {{echo_with_div|''a}}{{echo_with_div|b''c''d}}{{echo_with_div|''e}}
13731 <div><i>a</i></div><div><i>b</i>c<i>d</i></div><div>e</div>
13733 <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>
13734 <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>
13735 <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>
13739 Templates: Ugly nesting: 4. Divs opened/closed across templates
13741 a<div>b{{echo|c</div>d}}e
13746 <p>a</p><div>bc</div><p>de
13751 Templates: Ugly templates: 3. newline-only template parameter
13760 # This looks like a bug: a single newline triggers p/br for some reason.
13762 Templates: Ugly templates: 4. newline-only template parameter inconsistency
13771 # T66017 -- ugly wikitext with fostered content generates two template ranges that
13772 # have a true overlap (T1-start - T2-start - T1-end - T2-end).
13774 Templates: Ugly templates: 5. Template encapsulation test: Non-trivial overlap of template ranges is properly handled
13780 <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">
13781 </span><table about="#mwt1">
13785 # T66017 -- ugly wikitext with fostered content generates two template ranges
13786 # that are "identical" and generate nesting cycles in the algorithm
13788 Templates: Ugly templates: 6. Template encapsulation test: Cyclical nesting of template ranges is properly handled
13790 {{echo|<table><tr><td><table>}}
13794 <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"}'>
13795 </div><table about="#mwt1" data-parsoid='{"stx":"html"}'>
13796 </table></td></tr></tbody></table>
13800 Templates: Parameters substituted at the top-level
13802 {{{foo|''who'' {{echo|me}}? '''never!'''}}}
13806 <p><i>who</i> me? <b>never!</b>
13810 <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>
13812 <p about="#mwt3" typeof="mw:Param" data-mw='{"parts":[{"templatearg":{"target":{"wt":"foo"},"params":{"1":{"wt":"bar"},"2":{"wt":"baz"}},"i":0}}]}'>bar</p>
13816 Templates: Param with empty arg in the final position
13820 <span about="#mwt1" typeof="mw:Param" data-mw='{"parts":[{"templatearg":{"target":{"wt":"hi"},"params":{"1":{"wt":""}},"i":0}}]}'></span>
13824 Parser Functions: 1. Simple example
13833 Parser Functions: 2. Nested use (only outermost should be marked up)
13841 ## Note that the templates inside the references are not wrapped
13843 Template nested in extension tag in template
13845 title=[[Main Page]]
13848 {{echo|hi<ref>[[ho|{{echo|hi}}]]</ref>}}
13849 {{echo|hi<ref>[http://test.com?q={{echo|ho}}]</ref>}}
13850 {{echo|hi<ref>-{ho|{{echo|hi}}}-</ref>}}
13853 <p><span about="#mwt2" typeof="mw:Transclusion" data-mw='{"parts":[{"template":{"target":{"wt":"echo","href":"./Template:Echo"},"params":{"1":{"wt":"hi<ref>[[ho|{{echo|hi}}]]</ref>"}},"i":0}}]}'>hi</span><sup about="#mwt2" class="mw-ref" id="cite_ref-1" rel="dc:references" typeof="mw:Extension/ref" data-mw='{"name":"ref","attrs":{},"body":{"id":"mw-reference-text-cite_note-1"}}'><a href="./Main_Page#cite_note-1" style="counter-reset: mw-Ref 1;"><span class="mw-reflink-text">[1]</span></a></sup>
13854 <span about="#mwt8" typeof="mw:Transclusion" data-mw='{"parts":[{"template":{"target":{"wt":"echo","href":"./Template:Echo"},"params":{"1":{"wt":"hi<ref>[http://test.com?q={{echo|ho}}]</ref>"}},"i":0}}]}'>hi</span><sup about="#mwt8" class="mw-ref" id="cite_ref-2" rel="dc:references" typeof="mw:Extension/ref" data-mw='{"name":"ref","attrs":{},"body":{"id":"mw-reference-text-cite_note-2"}}'><a href="./Main_Page#cite_note-2" style="counter-reset: mw-Ref 2;"><span class="mw-reflink-text">[2]</span></a></sup>
13855 <span about="#mwt13" typeof="mw:Transclusion" data-mw='{"parts":[{"template":{"target":{"wt":"echo","href":"./Template:Echo"},"params":{"1":{"wt":"hi<ref>-{ho|{{echo|hi}}}-</ref>"}},"i":0}}]}'>hi</span><sup about="#mwt13" class="mw-ref" id="cite_ref-3" rel="dc:references" typeof="mw:Extension/ref" data-mw='{"name":"ref","attrs":{},"body":{"id":"mw-reference-text-cite_note-3"}}'><a href="./Main_Page#cite_note-3" style="counter-reset: mw-Ref 3;"><span class="mw-reflink-text">[3]</span></a></sup></p>
13856 <ol class="mw-references references" typeof="mw:Extension/references" about="#mwt17" data-mw='{"name":"references","attrs":{}}'><li about="#cite_note-1" id="cite_note-1"><a href="./Main_Page#cite_ref-1" rel="mw:referencedBy"><span class="mw-linkback-text">↑ </span></a> <span id="mw-reference-text-cite_note-1" class="mw-reference-text"><a rel="mw:WikiLink" href="./Ho" title="Ho">hi</a></span></li><li about="#cite_note-2" id="cite_note-2"><a href="./Main_Page#cite_ref-2" rel="mw:referencedBy"><span class="mw-linkback-text">↑ </span></a> <span id="mw-reference-text-cite_note-2" class="mw-reference-text"><a rel="mw:ExtLink" class="external autonumber" href="http://test.com?q=ho"></a></span></li><li about="#cite_note-3" id="cite_note-3"><a href="./Main_Page#cite_ref-3" rel="mw:referencedBy"><span class="mw-linkback-text">↑ </span></a> <span id="mw-reference-text-cite_note-3" class="mw-reference-text"><span typeof="mw:LanguageVariant" data-mw-variant='{"filter":{"l":["ho"],"t":"hi"}}'></span></span></li></ol>
13860 ### Pre-save transform tests
13864 pre-save transform: subst:
13870 This is a test template
13874 pre-save transform: normal template
13884 pre-save transform: nonexistent template
13888 {{thistemplatedoesnotexist}}
13890 {{thistemplatedoesnotexist}}
13894 pre-save transform: subst magic variables
13903 # This is T2089, which I fixed. -- wtm
13905 pre-save transform: subst: templates with parameters
13909 {{subst:paramtest|param="something else"}}
13911 This is a test template with parameter "something else"
13915 Template:nowikitest
13917 <nowiki>'''not wiki'''</nowiki>
13921 pre-save transform: nowiki in subst (T3188)
13925 {{subst:nowikitest}}
13927 <nowiki>'''not wiki'''</nowiki>
13931 Template:commenttest
13933 This template has <!-- a comment --> in it.
13937 pre-save transform: comment in subst (T3936)
13941 {{subst:commenttest}}
13943 This template has <!-- a comment --> in it.
13947 pre-save transform: unclosed tag
13951 <nowiki>'''not wiki'''
13953 <nowiki>'''not wiki'''
13957 pre-save transform: mixed tag case
13961 <NOwiki>'''not wiki'''</noWIKI>
13963 <NOwiki>'''not wiki'''</noWIKI>
13967 pre-save transform: unclosed comment in <nowiki>
13971 wiki<nowiki>nowiki<!--nowiki</nowiki>wiki
13973 wiki<nowiki>nowiki<!--nowiki</nowiki>wiki
13976 # Leading @ in this template definition works around a limitation
13977 # in parsoid's parserTests which otherwise strips the <span> from the
13978 # result (confusing it for a template wrapper)
13982 @<span onmouseover="alert('crap')">Oh no</span>
13986 (confirming safety of fix for subst T3936)
13988 {{Template:dangerous}}
13990 <p>@<span>Oh no</span>
13995 pre-save transform: comment containing gallery (T7024)
13999 <!-- <gallery>data</gallery> -->
14001 <!-- <gallery>data</gallery> -->
14005 pre-save transform: comment containing extension
14009 <!-- <tag>data</tag> -->
14011 <!-- <tag>data</tag> -->
14015 pre-save transform: comment containing nowiki
14019 <!-- <nowiki>data</nowiki> -->
14021 <!-- <nowiki>data</nowiki> -->
14025 pre-save transform: <noinclude> in subst (T5298)
14035 pre-save transform: <onlyinclude> in subst (T5298)
14039 {{subst:Includes2}}
14047 {{<includeonly>subst:</includeonly>Includes}}
14051 Template:SafeSubstTest
14053 {{<includeonly>safesubst:</includeonly>Includes}}
14057 T24297: safesubst: works during PST
14061 {{subst:SafeSubstTest}}{{safesubst:SubstTest}}
14067 T24297: safesubst: works during normal parse
14076 subst: does not work during normal parse
14080 <p>{{subst:Includes}}
14085 pre-save transform: context links ("pipe trick")
14089 [[Article (context)|]]
14092 [[Bar:Article (context)|]]
14093 [[:Bar:Article (context)|]]
14095 [[|Article (context)]]
14099 [[Article (context)|Article]]
14100 [[Bar:Article|Article]]
14101 [[:Bar:Article|Article]]
14102 [[Bar:Article (context)|Article]]
14103 [[:Bar:Article (context)|Article]]
14105 [[Article (context)]]
14106 [[Bar:X (Y) Z|X (Y) Z]]
14107 [[:Bar:X (Y) Z|X (Y) Z]]
14111 pre-save transform: context links ("pipe trick") with interwiki prefix
14115 [[interwiki:Article|]]
14116 [[:interwiki:Article|]]
14117 [[interwiki:Bar:Article|]]
14118 [[:interwiki:Bar:Article|]]
14120 [[interwiki:Article|Article]]
14121 [[:interwiki:Article|Article]]
14122 [[interwiki:Bar:Article|Bar:Article]]
14123 [[:interwiki:Bar:Article|Bar:Article]]
14127 pre-save transform: context links ("pipe trick") with parens in title
14129 pst title=[[Somearticle (context)]]
14133 [[Article (context)|Article]]
14137 pre-save transform: context links ("pipe trick") with comma in title
14139 pst title=[[Someplace, Somewhere]]
14142 [[Otherplace, Elsewhere|]]
14143 [[Otherplace, Elsewhere, Anywhere|]]
14145 [[Otherplace, Somewhere|Otherplace]]
14146 [[Otherplace, Elsewhere|Otherplace]]
14147 [[Otherplace, Elsewhere, Anywhere|Otherplace]]
14151 pre-save transform: context links ("pipe trick") with parens and comma
14153 pst title=[[Someplace (IGNORED), Somewhere]]
14156 [[Otherplace (place), Elsewhere|]]
14158 [[Otherplace, Somewhere|Otherplace]]
14159 [[Otherplace (place), Elsewhere|Otherplace]]
14163 pre-save transform: context links ("pipe trick") with comma and parens
14165 pst title=[[Who, me? (context)]]
14168 [[Me, Myself, and I (1937 song)|]]
14170 [[Yes, you. (context)|Yes, you.]]
14171 [[Me, Myself, and I (1937 song)|Me, Myself, and I]]
14175 pre-save transform: context links ("pipe trick") with namespace
14177 pst title=[[Ns:Somearticle]]
14181 [[Ns:Article|Article]]
14185 pre-save transform: context links ("pipe trick") with namespace and parens
14187 pst title=[[Ns:Somearticle (context)]]
14191 [[Ns:Article (context)|Article]]
14195 pre-save transform: context links ("pipe trick") with namespace and comma
14197 pst title=[[Ns:Somearticle, Context, Whatever]]
14201 [[Ns:Article, Context, Whatever|Article]]
14205 pre-save transform: context links ("pipe trick") with namespace, comma and parens
14207 pst title=[[Ns:Somearticle, Context (context)]]
14211 [[Ns:Article (context)|Article]]
14215 pre-save transform: context links ("pipe trick") with namespace, parens and comma
14217 pst title=[[Ns:Somearticle (IGNORED), Context]]
14221 [[Ns:Article, Context|Article]]
14225 pre-save transform: context links ("pipe trick") with full-width parens and no space (Japanese and Chinese style, T32149)
14229 [[Article(context)|]]
14230 [[Bar:Article(context)|]]
14231 [[:Bar:Article(context)|]]
14232 [[|Article(context)]]
14236 [[Article(context)|Article]]
14237 [[Bar:Article(context)|Article]]
14238 [[:Bar:Article(context)|Article]]
14239 [[Article(context)]]
14240 [[Bar:X(Y)Z|X(Y)Z]]
14241 [[:Bar:X(Y)Z|X(Y)Z]]
14245 pre-save transform: context links ("pipe trick") with full-width parens and space (Japanese and Chinese style, T32149)
14249 [[Article (context)|]]
14250 [[Bar:Article (context)|]]
14251 [[:Bar:Article (context)|]]
14252 [[|Article (context)]]
14256 [[Article (context)|Article]]
14257 [[Bar:Article (context)|Article]]
14258 [[:Bar:Article (context)|Article]]
14259 [[Article (context)]]
14260 [[Bar:X (Y) Z|X (Y) Z]]
14261 [[:Bar:X (Y) Z|X (Y) Z]]
14265 pre-save transform: context links ("pipe trick") with parens and no space (Korean style, T32149)
14269 [[Article(context)|]]
14270 [[Bar:Article(context)|]]
14271 [[:Bar:Article(context)|]]
14272 [[|Article(context)]]
14276 [[Article(context)|Article]]
14277 [[Bar:Article(context)|Article]]
14278 [[:Bar:Article(context)|Article]]
14279 [[Article(context)]]
14280 [[Bar:X(Y)Z|X(Y)Z]]
14281 [[:Bar:X(Y)Z|X(Y)Z]]
14285 pre-save transform: context links ("pipe trick") with commas (T23660)
14289 [[Article (context), context|]]
14290 [[Article (context),context|]]
14291 [[Bar:Article (context), context|]]
14292 [[Bar:Article (context),context|]]
14293 [[:Bar:Article (context), context|]]
14294 [[:Bar:Article (context),context|]]
14296 [[Article (context), context|Article]]
14297 [[Article (context),context|Article]]
14298 [[Bar:Article (context), context|Article]]
14299 [[Bar:Article (context),context|Article]]
14300 [[:Bar:Article (context), context|Article]]
14301 [[:Bar:Article (context),context|Article]]
14305 Parsoid: backwards pipe trick
14312 <p>[[|<b>bar</b>]]</p>
14316 pre-save transform: trim trailing empty lines
14320 Empty lines are trimmed
14326 Empty lines are trimmed
14330 pre-save transform: Signature expansion
14337 * <noinclude>~~~</noinclude>
14338 * <includeonly>~~~</includeonly>
14339 * <onlyinclude>~~~</onlyinclude>
14341 * [[Special:Contributions/127.0.0.1|127.0.0.1]]
14342 * [[Special:Contributions/127.0.0.1|127.0.0.1]] 00:02, 1 January 1970 (UTC)
14343 * 00:02, 1 January 1970 (UTC)
14344 * <noinclude>[[Special:Contributions/127.0.0.1|127.0.0.1]]</noinclude>
14345 * <includeonly>[[Special:Contributions/127.0.0.1|127.0.0.1]]</includeonly>
14346 * <onlyinclude>[[Special:Contributions/127.0.0.1|127.0.0.1]]</onlyinclude>
14351 ParserOutput flags from signature expansion (T84843)
14358 [[Special:Contributions/127.0.0.1|127.0.0.1]] 00:02, 1 January 1970 (UTC)
14359 flags=user-signature
14364 pre-save transform: Signature expansion in nowiki tags (T2093)
14370 <nowiki>~~~~</nowiki>
14372 <includeonly><nowiki>~~~~</nowiki></includeonly>
14374 <noinclude><nowiki>~~~~</nowiki></noinclude>
14376 <onlyinclude><nowiki>~~~~</nowiki></onlyinclude>
14378 {{subst:Foo}} shall be converted to FOO
14380 As well as inside noinclude/onlyinclude
14381 <noinclude>{{subst:Foo}}</noinclude>
14382 <onlyinclude>{{subst:Foo}}</onlyinclude>
14384 But not inside includeonly
14385 <includeonly>{{subst:Foo}}</includeonly>
14389 <nowiki>~~~~</nowiki>
14391 <includeonly><nowiki>~~~~</nowiki></includeonly>
14393 <noinclude><nowiki>~~~~</nowiki></noinclude>
14395 <onlyinclude><nowiki>~~~~</nowiki></onlyinclude>
14397 FOO shall be converted to FOO
14399 As well as inside noinclude/onlyinclude
14400 <noinclude>FOO</noinclude>
14401 <onlyinclude>FOO</onlyinclude>
14403 But not inside includeonly
14404 <includeonly>{{subst:Foo}}</includeonly>
14408 Parsoid: Recognize nowiki with trailing space in tags
14412 <nowiki ><div>[[foo]]</nowiki >
14420 <p><div>[[foo]]
14421 </p><p>a<nowiki / >b
14423 </p><p>e<nowiki/ >f
14426 <p><span typeof="mw:Nowiki"><div>[[foo]]</span></p>
14428 <p>a<nowiki / >b</p>
14430 <p>c<span typeof="mw:Nowiki"></span>d</p>
14432 <p>e<nowiki/ >f</p>
14436 Parsoid: Recognize nowiki with odd capitalization
14440 <noWikI ><div>[[foo]]</Nowiki >
14442 <p><div>[[foo]]
14445 <p><span typeof="mw:Nowiki"><div>[[foo]]</span></p>
14450 Parsoid: Escape nowiki with trailing space in tags
14454 <p><nowiki > foo </nowiki ></p>
14455 <p>a<nowiki />b</p>
14456 <p>c<nowiki/ >d</p>
14458 <nowiki > foo </nowiki >
14466 Parsoid: Escape weird noWikI capitalizations
14470 <p><noWikI > foo </NoWikI ></p>
14472 <noWikI > foo </NoWikI >
14476 ### Message transform tests
14479 message transform: magic variables
14489 message transform: should not transform wiki markup
14499 message transform: <noinclude> in transcluded template (T6926)
14509 message transform: <onlyinclude> in transcluded template (T6926)
14519 {{#special:}} page name, known
14523 {{#special:Recentchanges}}
14525 Special:RecentChanges
14529 {{#special:}} page name with subpage, known
14533 {{#special:Recentchanges/param}}
14535 Special:RecentChanges/param
14539 {{#special:}} page name, unknown
14543 {{#special:foobar nonexistent}}
14545 Special:Foobar nonexistent
14549 {{#speciale:}} page name, known
14553 {{#speciale:Recentchanges}}
14555 Special:RecentChanges
14559 {{#speciale:}} page name with subpage, known
14563 {{#speciale:Recentchanges/param}}
14565 Special:RecentChanges/param
14569 {{#speciale:}} page name, unknown
14573 {{#speciale:foobar nonexistent}}
14575 Special:Foobar_nonexistent
14581 ### For Parsoid-specific tests, see
14582 #### https://www.mediawiki.org/wiki/Parsoid/MediaWiki_DOM_spec#Images
14587 parsoid=wt2html,wt2wt,html2html
14589 [[Image:foobar.jpg]]
14591 <p><a href="/wiki/File:Foobar.jpg" class="image"><img alt="Foobar.jpg" src="http://example.com/images/3/3a/Foobar.jpg" decoding="async" width="1941" height="220" /></a>
14594 <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>
14598 Serialize simple image with span wrapper
14602 <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>
14604 [[File:Foobar.jpg]]
14608 Simple image (using File: namespace, now canonical)
14610 [[File:Foobar.jpg]]
14612 <p><a href="/wiki/File:Foobar.jpg" class="image"><img alt="Foobar.jpg" src="http://example.com/images/3/3a/Foobar.jpg" decoding="async" width="1941" height="220" /></a>
14615 <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>
14619 Right-aligned image
14621 [[File:Foobar.jpg|right]]
14623 <div class="floatright"><a href="/wiki/File:Foobar.jpg" class="image"><img alt="Foobar.jpg" src="http://example.com/images/3/3a/Foobar.jpg" decoding="async" width="1941" height="220" /></a></div>
14626 <figure class="mw-default-size mw-halign-right" typeof="mw:Image"><a href="./File:Foobar.jpg"><img resource="./File:Foobar.jpg" src="//example.com/images/3/3a/Foobar.jpg" data-file-width="1941" data-file-height="220" data-file-type="bitmap" height="220" width="1941"/></a></figure>
14632 [[File:Foobar.jpg|right|Caption text]]
14634 <div class="floatright"><a href="/wiki/File:Foobar.jpg" class="image" title="Caption text"><img alt="Caption text" src="http://example.com/images/3/3a/Foobar.jpg" decoding="async" width="1941" height="220" /></a></div>
14637 <figure class="mw-default-size mw-halign-right" typeof="mw:Image"><a href="./File:Foobar.jpg"><img resource="./File:Foobar.jpg" src="//example.com/images/3/3a/Foobar.jpg" data-file-width="1941" data-file-height="220" data-file-type="bitmap" height="220" width="1941"/></a><figcaption>Caption text</figcaption></figure>
14641 Image with caption, T55312 #1
14643 [[File:Foobar.jpg|right|Caption page stuff]]
14645 <div class="floatright"><a href="/wiki/File:Foobar.jpg" class="image" title="Caption page stuff"><img alt="Caption page stuff" src="http://example.com/images/3/3a/Foobar.jpg" decoding="async" width="1941" height="220" /></a></div>
14648 <figure class="mw-default-size mw-halign-right" typeof="mw:Image"><a href="./File:Foobar.jpg"><img resource="./File:Foobar.jpg" src="//example.com/images/3/3a/Foobar.jpg" data-file-width="1941" data-file-height="220" data-file-type="bitmap" height="220" width="1941"/></a><figcaption>Caption page stuff</figcaption></figure>
14652 Image with caption, T55312 #2
14654 [[File:Foobar.jpg|right|Caption page=]]
14656 <div class="floatright"><a href="/wiki/File:Foobar.jpg" class="image" title="Caption page="><img alt="Caption page=" src="http://example.com/images/3/3a/Foobar.jpg" decoding="async" width="1941" height="220" /></a></div>
14659 <figure class="mw-default-size mw-halign-right" typeof="mw:Image"><a href="./File:Foobar.jpg"><img resource="./File:Foobar.jpg" src="//example.com/images/3/3a/Foobar.jpg" data-file-width="1941" data-file-height="220" data-file-type="bitmap" height="220" width="1941"/></a><figcaption>Caption page=</figcaption></figure>
14663 Image with caption, T55312 #3
14665 [[File:Foobar.jpg|right|Caption page=stuff]]
14667 <div class="floatright"><a href="/wiki/File:Foobar.jpg" class="image" title="Caption page=stuff"><img alt="Caption page=stuff" src="http://example.com/images/3/3a/Foobar.jpg" decoding="async" width="1941" height="220" /></a></div>
14670 <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>
14674 Image caption with pipe entity
14676 [[File:Foobar.jpg|thumb|one | two]]
14677 [[File:Foobar.jpg|thumb|one ''two'' | three]]
14679 <div class="thumb tright"><div class="thumbinner" style="width:182px;"><a href="/wiki/File:Foobar.jpg" class="image"><img alt="" src="http://example.com/images/thumb/3/3a/Foobar.jpg/180px-Foobar.jpg" decoding="async" width="180" height="20" class="thumbimage" srcset="http://example.com/images/thumb/3/3a/Foobar.jpg/270px-Foobar.jpg 1.5x, http://example.com/images/thumb/3/3a/Foobar.jpg/360px-Foobar.jpg 2x" /></a> <div class="thumbcaption"><div class="magnify"><a href="/wiki/File:Foobar.jpg" class="internal" title="Enlarge"></a></div>one | two</div></div></div>
14680 <div class="thumb tright"><div class="thumbinner" style="width:182px;"><a href="/wiki/File:Foobar.jpg" class="image"><img alt="" src="http://example.com/images/thumb/3/3a/Foobar.jpg/180px-Foobar.jpg" decoding="async" width="180" height="20" class="thumbimage" srcset="http://example.com/images/thumb/3/3a/Foobar.jpg/270px-Foobar.jpg 1.5x, http://example.com/images/thumb/3/3a/Foobar.jpg/360px-Foobar.jpg 2x" /></a> <div class="thumbcaption"><div class="magnify"><a href="/wiki/File:Foobar.jpg" class="internal" title="Enlarge"></a></div>one <i>two</i> | three</div></div></div>
14683 <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>
14684 <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>
14688 Allow empty links in image captions (T62753)
14692 [[File:Foobar.jpg|thumb|Caption [[Link1]]
14697 <div class="thumb tright"><div class="thumbinner" style="width:222px;"><a href="/wiki/File:Foobar.jpg" class="image"><img alt="" src="http://example.com/images/thumb/3/3a/Foobar.jpg/220px-Foobar.jpg" decoding="async" width="220" height="25" class="thumbimage" srcset="http://example.com/images/thumb/3/3a/Foobar.jpg/330px-Foobar.jpg 1.5x, http://example.com/images/thumb/3/3a/Foobar.jpg/440px-Foobar.jpg 2x" /></a> <div class="thumbcaption"><div class="magnify"><a href="/wiki/File:Foobar.jpg" class="internal" title="Enlarge"></a></div>Caption <a href="/index.php?title=Link1&action=edit&redlink=1" class="new" title="Link1 (page does not exist)">Link1</a> [[]] <a href="/index.php?title=Link2&action=edit&redlink=1" class="new" title="Link2 (page does not exist)">Link2</a></div></div></div>
14700 <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>
14702 <a rel="mw:WikiLink" href="./Link2" title="Link2" data-parsoid='{"stx":"simple","a":{"href":"./Link2"},"sa":{"href":"Link2"}}'>Link2</a>
14703 </figcaption></figure>
14707 Titles in unlinked images (T23454)
14709 [[File:Foobar.jpg|link=|stuff]]
14711 <p><img alt="stuff" src="http://example.com/images/3/3a/Foobar.jpg" decoding="async" title="stuff" width="1941" height="220" />
14714 <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>
14718 Link with empty target
14727 Image with link trail
14729 Linktrails should not work for images: [[File:Foobar.jpg]]s
14731 <p>Linktrails should not work for images: <a href="/wiki/File:Foobar.jpg" class="image"><img alt="Foobar.jpg" src="http://example.com/images/3/3a/Foobar.jpg" decoding="async" width="1941" height="220" /></a>s
14734 <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>
14738 Image with empty attribute
14740 parsoid=wt2html,wt2wt,html2html
14742 [[File:Foobar.jpg|right||Caption text]]
14744 <div class="floatright"><a href="/wiki/File:Foobar.jpg" class="image" title="Caption text"><img alt="Caption text" src="http://example.com/images/3/3a/Foobar.jpg" decoding="async" width="1941" height="220" /></a></div>
14747 <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>
14751 1. Block image with individual attributes from templates
14753 [[File:Foobar.jpg|thumb|{{echo|137px}}|This is a caption]]
14755 <div class="thumb tright"><div class="thumbinner" style="width:139px;"><a href="/wiki/File:Foobar.jpg" class="image"><img alt="" src="http://example.com/images/thumb/3/3a/Foobar.jpg/137px-Foobar.jpg" decoding="async" width="137" height="16" class="thumbimage" srcset="http://example.com/images/thumb/3/3a/Foobar.jpg/206px-Foobar.jpg 1.5x, http://example.com/images/thumb/3/3a/Foobar.jpg/274px-Foobar.jpg 2x" /></a> <div class="thumbcaption"><div class="magnify"><a href="/wiki/File:Foobar.jpg" class="internal" title="Enlarge"></a></div>This is a caption</div></div></div>
14758 <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>
14762 2. Block Image with individual attributes from templates
14764 [[File:Foobar.jpg|{{echo|thumb}}|{{echo|137px}}|This is a caption]]
14766 <div class="thumb tright"><div class="thumbinner" style="width:139px;"><a href="/wiki/File:Foobar.jpg" class="image"><img alt="" src="http://example.com/images/thumb/3/3a/Foobar.jpg/137px-Foobar.jpg" decoding="async" width="137" height="16" class="thumbimage" srcset="http://example.com/images/thumb/3/3a/Foobar.jpg/206px-Foobar.jpg 1.5x, http://example.com/images/thumb/3/3a/Foobar.jpg/274px-Foobar.jpg 2x" /></a> <div class="thumbcaption"><div class="magnify"><a href="/wiki/File:Foobar.jpg" class="internal" title="Enlarge"></a></div>This is a caption</div></div></div>
14769 <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>
14773 3. Inline image with individual attributes from templates
14775 [[File:Foobar.jpg|{{echo|50px}}]]
14777 <p><a href="/wiki/File:Foobar.jpg" class="image"><img alt="Foobar.jpg" src="http://example.com/images/thumb/3/3a/Foobar.jpg/50px-Foobar.jpg" decoding="async" width="50" height="6" srcset="http://example.com/images/thumb/3/3a/Foobar.jpg/75px-Foobar.jpg 1.5x, http://example.com/images/thumb/3/3a/Foobar.jpg/100px-Foobar.jpg 2x" /></a>
14780 <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>
14783 ## Parsoid does not provide editing support for images where templates produce multiple image attributes.
14784 ## To signal this, we add a 'mw:Placeholder' type to such images. This could change in the future.
14786 Image with multiple attributes from the same template
14788 [[File:Foobar.jpg|{{image_attribs}}]]
14790 <div class="floatright"><a href="/wiki/File:Foobar.jpg" class="image" title="Caption text"><img alt="Caption text" src="http://example.com/images/3/3a/Foobar.jpg" decoding="async" width="1941" height="220" /></a></div>
14793 <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>
14797 Image with link tails
14801 123[[File:Foobar.jpg]]456
14802 123[[File:Foobar.jpg|right]]456
14803 123[[File:Foobar.jpg|thumb]]456
14805 <p>123<a href="/wiki/File:Foobar.jpg" class="image"><img alt="Foobar.jpg" src="http://example.com/images/3/3a/Foobar.jpg" decoding="async" width="1941" height="220" /></a>456
14807 123<div class="floatright"><a href="/wiki/File:Foobar.jpg" class="image"><img alt="Foobar.jpg" src="http://example.com/images/3/3a/Foobar.jpg" decoding="async" width="1941" height="220" /></a></div>456
14808 123<div class="thumb tright"><div class="thumbinner" style="width:222px;"><a href="/wiki/File:Foobar.jpg" class="image"><img alt="Foobar.jpg" src="http://example.com/images/thumb/3/3a/Foobar.jpg/220px-Foobar.jpg" decoding="async" width="220" height="25" class="thumbimage" srcset="http://example.com/images/thumb/3/3a/Foobar.jpg/330px-Foobar.jpg 1.5x, http://example.com/images/thumb/3/3a/Foobar.jpg/440px-Foobar.jpg 2x" /></a> <div class="thumbcaption"><div class="magnify"><a href="/wiki/File:Foobar.jpg" class="internal" title="Enlarge"></a></div></div></div></div>456
14811 <p>123<a href="/wiki/File:Foobar.jpg" class="image"><img alt="Foobar.jpg" src="http://example.com/images/3/3a/Foobar.jpg" decoding="async" width="1941" height="220" /></a>456
14813 123</p><div class="floatright"><a href="/wiki/File:Foobar.jpg" class="image"><img alt="Foobar.jpg" src="http://example.com/images/3/3a/Foobar.jpg" decoding="async" width="1941" height="220" /></a></div><p>456
14814 123</p><div class="thumb tright"><div class="thumbinner" style="width:222px;"><a href="/wiki/File:Foobar.jpg" class="image"><img alt="Foobar.jpg" src="http://example.com/images/thumb/3/3a/Foobar.jpg/220px-Foobar.jpg" decoding="async" width="220" height="25" class="thumbimage" srcset="http://example.com/images/thumb/3/3a/Foobar.jpg/330px-Foobar.jpg 1.5x, http://example.com/images/thumb/3/3a/Foobar.jpg/440px-Foobar.jpg 2x" /></a> <div class="thumbcaption"><div class="magnify"><a href="/wiki/File:Foobar.jpg" class="internal" title="Enlarge"></a></div></div></div></div><p>456
14817 <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>
14818 <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
14819 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>
14823 Image with multiple captions -- only last one is accepted
14825 [[File:Foobar.jpg|right|Caption1 - ignored|[[Caption2]] - ignored|Caption3 - accepted]]
14827 <div class="floatright"><a href="/wiki/File:Foobar.jpg" class="image" title="Caption3 - accepted"><img alt="Caption3 - accepted" src="http://example.com/images/3/3a/Foobar.jpg" decoding="async" width="1941" height="220" /></a></div>
14830 <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>
14834 Image with multiple widths -- use last
14836 [[File:Foobar.jpg|200px|300px|caption]]
14838 <p><a href="/wiki/File:Foobar.jpg" class="image" title="caption"><img alt="caption" src="http://example.com/images/thumb/3/3a/Foobar.jpg/300px-Foobar.jpg" decoding="async" width="300" height="34" srcset="http://example.com/images/thumb/3/3a/Foobar.jpg/450px-Foobar.jpg 1.5x, http://example.com/images/thumb/3/3a/Foobar.jpg/600px-Foobar.jpg 2x" /></a>
14841 <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>
14845 Image with multiple alignments -- use first (T50664)
14849 [[File:Foobar.jpg|thumb|left|right|center|caption]]
14851 [[File:Foobar.jpg|middle|text-top|caption]]
14853 <div class="thumb tleft"><div class="thumbinner" style="width:222px;"><a href="/wiki/File:Foobar.jpg" class="image"><img alt="" src="http://example.com/images/thumb/3/3a/Foobar.jpg/220px-Foobar.jpg" decoding="async" width="220" height="25" class="thumbimage" srcset="http://example.com/images/thumb/3/3a/Foobar.jpg/330px-Foobar.jpg 1.5x, http://example.com/images/thumb/3/3a/Foobar.jpg/440px-Foobar.jpg 2x" /></a> <div class="thumbcaption"><div class="magnify"><a href="/wiki/File:Foobar.jpg" class="internal" title="Enlarge"></a></div>caption</div></div></div>
14854 <p><a href="/wiki/File:Foobar.jpg" class="image" title="caption"><img alt="caption" src="http://example.com/images/3/3a/Foobar.jpg" decoding="async" width="1941" height="220" style="vertical-align: middle" /></a>
14857 <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>
14858 <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>
14862 Image with width attribute at different positions
14864 [[File:Foobar.jpg|200px|right|Caption]]
14865 [[File:Foobar.jpg|right|200px|Caption]]
14866 [[File:Foobar.jpg|right|Caption|200px]]
14868 <div class="floatright"><a href="/wiki/File:Foobar.jpg" class="image" title="Caption"><img alt="Caption" src="http://example.com/images/thumb/3/3a/Foobar.jpg/200px-Foobar.jpg" decoding="async" width="200" height="23" srcset="http://example.com/images/thumb/3/3a/Foobar.jpg/300px-Foobar.jpg 1.5x, http://example.com/images/thumb/3/3a/Foobar.jpg/400px-Foobar.jpg 2x" /></a></div>
14869 <div class="floatright"><a href="/wiki/File:Foobar.jpg" class="image" title="Caption"><img alt="Caption" src="http://example.com/images/thumb/3/3a/Foobar.jpg/200px-Foobar.jpg" decoding="async" width="200" height="23" srcset="http://example.com/images/thumb/3/3a/Foobar.jpg/300px-Foobar.jpg 1.5x, http://example.com/images/thumb/3/3a/Foobar.jpg/400px-Foobar.jpg 2x" /></a></div>
14870 <div class="floatright"><a href="/wiki/File:Foobar.jpg" class="image" title="Caption"><img alt="Caption" src="http://example.com/images/thumb/3/3a/Foobar.jpg/200px-Foobar.jpg" decoding="async" width="200" height="23" srcset="http://example.com/images/thumb/3/3a/Foobar.jpg/300px-Foobar.jpg 1.5x, http://example.com/images/thumb/3/3a/Foobar.jpg/400px-Foobar.jpg 2x" /></a></div>
14873 <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>
14874 <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>
14875 <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>
14878 # a sad bit of backward-compatibility
14880 Image with size specified with pxpx (T15500, T53628)
14882 parsoid=wt2html,wt2wt,html2html
14884 [[File:Foobar.jpg|20pxpx]]
14885 [[File:Foobar.jpg|200x20pxpx]]
14887 <p><a href="/wiki/File:Foobar.jpg" class="image"><img alt="Foobar.jpg" src="http://example.com/images/thumb/3/3a/Foobar.jpg/20px-Foobar.jpg" decoding="async" width="20" height="2" srcset="http://example.com/images/thumb/3/3a/Foobar.jpg/30px-Foobar.jpg 1.5x, http://example.com/images/thumb/3/3a/Foobar.jpg/40px-Foobar.jpg 2x" /></a>
14888 <a href="/wiki/File:Foobar.jpg" class="image"><img alt="Foobar.jpg" src="http://example.com/images/thumb/3/3a/Foobar.jpg/177px-Foobar.jpg" decoding="async" width="177" height="20" srcset="http://example.com/images/thumb/3/3a/Foobar.jpg/265px-Foobar.jpg 1.5x, http://example.com/images/thumb/3/3a/Foobar.jpg/353px-Foobar.jpg 2x" /></a>
14891 <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>
14895 Image with link parameter, wiki target
14897 [[File:Foobar.jpg|link=Main Page]]
14899 <p><a href="/wiki/Main_Page" title="Main Page"><img alt="Foobar.jpg" src="http://example.com/images/3/3a/Foobar.jpg" decoding="async" width="1941" height="220" /></a>
14902 <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>
14905 # parsoid T51293 (part 1)
14907 Image with link parameter, URL target
14909 [[File:Foobar.jpg|link=http://example.com/]]
14911 <p><a href="http://example.com/" rel="nofollow"><img alt="Foobar.jpg" src="http://example.com/images/3/3a/Foobar.jpg" decoding="async" width="1941" height="220" /></a>
14914 <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>
14917 # parsoid T51293 (part 2)
14919 Image with link parameter, protocol-less URL target
14921 [[File:Foobar.jpg|link=//example.com/]]
14923 <p><a href="//example.com/" rel="nofollow"><img alt="Foobar.jpg" src="http://example.com/images/3/3a/Foobar.jpg" decoding="async" width="1941" height="220" /></a>
14926 <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>
14930 Escaping non-block captions (T107435)
14933 "modes": ["wt2wt"],
14935 ["[typeof~='mw:Image']", "attr", "data-mw", "{\"caption\": \"|\"}"]
14939 [[Image:Foobar.jpg|caption]]
14941 [[Image:Foobar.jpg|<nowiki>|</nowiki>]]
14944 # wgExternalLinkTarget not supported by Parsoid
14946 Image with link parameter, wgExternalLinkTarget
14948 [[Image:foobar.jpg|link=http://example.com/]]
14950 wgExternalLinkTarget='foobar'
14952 <p><a href="http://example.com/" target="foobar" rel="nofollow noreferrer noopener"><img alt="Foobar.jpg" src="http://example.com/images/3/3a/Foobar.jpg" decoding="async" width="1941" height="220" /></a>
14957 Image with link parameter, wgNoFollowLinks set to false
14959 [[Image:foobar.jpg|link=http://example.com/]]
14961 wgNoFollowLinks=false
14963 <p><a href="http://example.com/"><img alt="Foobar.jpg" src="http://example.com/images/3/3a/Foobar.jpg" decoding="async" width="1941" height="220" /></a>
14968 Image with link parameter, wgNoFollowDomainExceptions
14970 [[Image:foobar.jpg|link=http://example.com/]]
14972 wgNoFollowDomainExceptions='example.com'
14974 <p><a href="http://example.com/"><img alt="Foobar.jpg" src="http://example.com/images/3/3a/Foobar.jpg" decoding="async" width="1941" height="220" /></a>
14978 # wgExternalLinkTarget not supported by Parsoid
14980 Image with link parameter, wgExternalLinkTarget, unnamed parameter
14982 [[Image:foobar.jpg|link=http://example.com/|Title]]
14984 wgExternalLinkTarget='foobar'
14986 <p><a href="http://example.com/" title="Title" target="foobar" rel="nofollow noreferrer noopener"><img alt="Title" src="http://example.com/images/3/3a/Foobar.jpg" decoding="async" width="1941" height="220" /></a>
14991 Image with empty link parameter
14993 [[File:Foobar.jpg|link=]]
14995 <p><img alt="Foobar.jpg" src="http://example.com/images/3/3a/Foobar.jpg" decoding="async" width="1941" height="220" />
14998 <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>
15002 Image with link parameter (wiki target) and unnamed parameter
15004 [[File:Foobar.jpg|link=Main_Page|Title]]
15006 <p><a href="/wiki/Main_Page" title="Title"><img alt="Title" src="http://example.com/images/3/3a/Foobar.jpg" decoding="async" width="1941" height="220" /></a>
15009 <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>
15013 Image with link parameter (URL target) and unnamed parameter
15015 [[File:Foobar.jpg|link=http://example.com/|Title]]
15017 <p><a href="http://example.com/" title="Title" rel="nofollow"><img alt="Title" src="http://example.com/images/3/3a/Foobar.jpg" decoding="async" width="1941" height="220" /></a>
15020 <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>
15024 Thumbnail image with link parameter
15027 parsoid=wt2html,wt2wt,html2html
15029 [[File:Foobar.jpg|thumb|link=http://example.com/|Title]]
15031 <div class="thumb tright"><div class="thumbinner" style="width:222px;"><a href="http://example.com/"><img alt="" src="http://example.com/images/thumb/3/3a/Foobar.jpg/220px-Foobar.jpg" decoding="async" width="220" height="25" class="thumbimage" srcset="http://example.com/images/thumb/3/3a/Foobar.jpg/330px-Foobar.jpg 1.5x, http://example.com/images/thumb/3/3a/Foobar.jpg/440px-Foobar.jpg 2x" /></a> <div class="thumbcaption"><div class="magnify"><a href="/wiki/File:Foobar.jpg" class="internal" title="Enlarge"></a></div>Title</div></div></div>
15034 <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>
15038 Manually-specified thumbnail image
15042 [[File:Foobar.jpg|thumbnail=Thumb.png|Title]]
15044 <div class="thumb tright"><div class="thumbinner" style="width:137px;"><a href="/wiki/File:Foobar.jpg"><img alt="" src="http://example.com/images/e/ea/Thumb.png" decoding="async" width="135" height="135" class="thumbimage" /></a> <div class="thumbcaption"><div class="magnify"><a href="/wiki/File:Foobar.jpg" class="internal" title="Enlarge"></a></div>Title</div></div></div>
15047 <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>
15051 Manually-specified thumbnail image with explicit link to wiki page
15054 parsoid=wt2html,wt2wt,html2html
15056 [[File:Foobar.jpg|thumb=Thumb.png|link=Main_Page|Title]]
15058 <div class="thumb tright"><div class="thumbinner" style="width:137px;"><a href="/wiki/Main_Page" title="Main Page"><img alt="" src="http://example.com/images/e/ea/Thumb.png" decoding="async" width="135" height="135" class="thumbimage" /></a> <div class="thumbcaption"><div class="magnify"><a href="/wiki/File:Foobar.jpg" class="internal" title="Enlarge"></a></div>Title</div></div></div>
15061 <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>
15065 Manually-specified thumbnail image with explicit link to url
15068 parsoid=wt2html,wt2wt,html2html
15070 [[File:Foobar.jpg|thumb=Thumb.png|link=http://example.com|Title]]
15072 <div class="thumb tright"><div class="thumbinner" style="width:137px;"><a href="http://example.com"><img alt="" src="http://example.com/images/e/ea/Thumb.png" decoding="async" width="135" height="135" class="thumbimage" /></a> <div class="thumbcaption"><div class="magnify"><a href="/wiki/File:Foobar.jpg" class="internal" title="Enlarge"></a></div>Title</div></div></div>
15075 <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>
15079 Manually-specified thumbnail image with explicit no link
15082 parsoid=wt2html,wt2wt,html2html
15084 [[File:Foobar.jpg|thumb=Thumb.png|link=|Title]]
15086 <div class="thumb tright"><div class="thumbinner" style="width:137px;"><img alt="" src="http://example.com/images/e/ea/Thumb.png" decoding="async" width="135" height="135" class="thumbimage" /> <div class="thumbcaption"><div class="magnify"><a href="/wiki/File:Foobar.jpg" class="internal" title="Enlarge"></a></div>Title</div></div></div>
15089 <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>
15093 Manually-specified thumbnail image with explicit link and alt text
15096 parsoid=wt2html,wt2wt,html2html
15098 [[File:Foobar.jpg|thumb=Thumb.png|link=Main_Page|alt=alttext|Title]]
15100 <div class="thumb tright"><div class="thumbinner" style="width:137px;"><a href="/wiki/Main_Page" title="Main Page"><img alt="alttext" src="http://example.com/images/e/ea/Thumb.png" decoding="async" width="135" height="135" class="thumbimage" /></a> <div class="thumbcaption"><div class="magnify"><a href="/wiki/File:Foobar.jpg" class="internal" title="Enlarge"></a></div>Title</div></div></div>
15103 <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>
15107 Image with frame and link
15109 parsoid=wt2html,wt2wt,html2html
15111 [[File:Foobar.jpg|frame|left|This is a test image [[Main Page]]]]
15113 <div class="thumb tleft"><div class="thumbinner" style="width:1943px;"><a href="/wiki/File:Foobar.jpg" class="image"><img alt="" src="http://example.com/images/3/3a/Foobar.jpg" decoding="async" width="1941" height="220" class="thumbimage" /></a> <div class="thumbcaption">This is a test image <a href="/wiki/Main_Page" title="Main Page">Main Page</a></div></div></div>
15116 <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>
15120 Image with frame and link and explicit alt
15122 parsoid=wt2html,wt2wt,html2html
15124 [[Image:Foobar.jpg|frame|left|This is a test image [[Main Page]]|alt=Altitude]]
15126 <div class="thumb tleft"><div class="thumbinner" style="width:1943px;"><a href="/wiki/File:Foobar.jpg" class="image"><img alt="Altitude" src="http://example.com/images/3/3a/Foobar.jpg" decoding="async" width="1941" height="220" class="thumbimage" /></a> <div class="thumbcaption">This is a test image <a href="/wiki/Main_Page" title="Main Page">Main Page</a></div></div></div>
15129 <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>
15133 Image with wiki markup in implicit alt
15135 [[Image:Foobar.jpg|testing '''bold''' in alt]]
15137 [[Image:Foobar.jpg|alt=testing '''bold''' in alt]]
15139 <p><a href="/wiki/File:Foobar.jpg" class="image" title="testing bold in alt"><img alt="testing bold in alt" src="http://example.com/images/3/3a/Foobar.jpg" decoding="async" width="1941" height="220" /></a>
15140 </p><p><a href="/wiki/File:Foobar.jpg" class="image"><img alt="testing bold in alt" src="http://example.com/images/3/3a/Foobar.jpg" decoding="async" width="1941" height="220" /></a>
15143 <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>
15145 <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>
15149 Alt image option should handle most kinds of wikitext without barfing
15151 [[Image:Foobar.jpg|thumb|This is the image caption|alt=This is a [[link]] and a {{echo|''bold template''}}.]]
15153 <div class="thumb tright"><div class="thumbinner" style="width:182px;"><a href="/wiki/File:Foobar.jpg" class="image"><img alt="This is a link and a bold template." src="http://example.com/images/thumb/3/3a/Foobar.jpg/180px-Foobar.jpg" decoding="async" width="180" height="20" class="thumbimage" srcset="http://example.com/images/thumb/3/3a/Foobar.jpg/270px-Foobar.jpg 1.5x, http://example.com/images/thumb/3/3a/Foobar.jpg/360px-Foobar.jpg 2x" /></a> <div class="thumbcaption"><div class="magnify"><a href="/wiki/File:Foobar.jpg" class="internal" title="Enlarge"></a></div>This is the image caption</div></div></div>
15156 <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>
15160 Ampersand in alt attribute (T206940)
15163 "nativeGallery": true
15166 [[File:Foobar.jpg|alt=&amp;]]
15168 <!-- consistency with gallery extension -->
15170 File:Foobar.jpg|alt=&amp;
15173 <p><a href="/wiki/File:Foobar.jpg" class="image"><img alt="&amp;" src="http://example.com/images/3/3a/Foobar.jpg" decoding="async" width="1941" height="220" /></a>
15175 <ul class="gallery mw-gallery-traditional">
15176 <li class="gallerybox" style="width: 155px"><div style="width: 155px">
15177 <div class="thumb" style="width: 150px;"><div style="margin:68px auto;"><a href="/wiki/File:Foobar.jpg" class="image"><img alt="&amp;" src="http://example.com/images/thumb/3/3a/Foobar.jpg/120px-Foobar.jpg" decoding="async" width="120" height="14" srcset="http://example.com/images/thumb/3/3a/Foobar.jpg/180px-Foobar.jpg 1.5x, http://example.com/images/thumb/3/3a/Foobar.jpg/240px-Foobar.jpg 2x" /></a></div></div>
15178 <div class="gallerytext">
15183 <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>
15185 <!-- consistency with gallery extension -->
15186 <ul class="gallery mw-gallery-traditional" typeof="mw:Extension/gallery" data-mw='{"name":"gallery","attrs":{},"body":{}}'>
15187 <li class="gallerybox">
15188 <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>
15189 <div class="gallerytext"></div>
15195 Italics markup in alt attribute (T206940)
15197 [[File:Foobar.jpg|alt=''x''|caption]]
15199 <!-- consistency with gallery extension -->
15201 File:Foobar.jpg|alt=''x''|caption
15204 <p><a href="/wiki/File:Foobar.jpg" class="image" title="caption"><img alt="x" src="http://example.com/images/3/3a/Foobar.jpg" decoding="async" width="1941" height="220" /></a>
15206 <ul class="gallery mw-gallery-traditional">
15207 <li class="gallerybox" style="width: 155px"><div style="width: 155px">
15208 <div class="thumb" style="width: 150px;"><div style="margin:68px auto;"><a href="/wiki/File:Foobar.jpg" class="image"><img alt="x" src="http://example.com/images/thumb/3/3a/Foobar.jpg/120px-Foobar.jpg" decoding="async" width="120" height="14" srcset="http://example.com/images/thumb/3/3a/Foobar.jpg/180px-Foobar.jpg 1.5x, http://example.com/images/thumb/3/3a/Foobar.jpg/240px-Foobar.jpg 2x" /></a></div></div>
15209 <div class="gallerytext">
15216 <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>
15218 <!-- consistency with gallery extension -->
15219 <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"}}'>
15220 <li class="gallerybox">
15221 <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>
15222 <div class="gallerytext">caption</div>
15228 Nowiki markup in alt attribute (T206940)
15230 [[File:Foobar.jpg|alt=<nowiki>''</nowiki>x<nowiki>''</nowiki>|caption]]
15232 <!-- consistency with gallery extension -->
15234 File:Foobar.jpg|alt=<nowiki>''</nowiki>x<nowiki>''</nowiki>|caption
15237 <p><a href="/wiki/File:Foobar.jpg" class="image" title="caption"><img alt="''x''" src="http://example.com/images/3/3a/Foobar.jpg" decoding="async" width="1941" height="220" /></a>
15239 <ul class="gallery mw-gallery-traditional">
15240 <li class="gallerybox" style="width: 155px"><div style="width: 155px">
15241 <div class="thumb" style="width: 150px;"><div style="margin:68px auto;"><a href="/wiki/File:Foobar.jpg" class="image"><img alt="''x''" src="http://example.com/images/thumb/3/3a/Foobar.jpg/120px-Foobar.jpg" decoding="async" width="120" height="14" srcset="http://example.com/images/thumb/3/3a/Foobar.jpg/180px-Foobar.jpg 1.5x, http://example.com/images/thumb/3/3a/Foobar.jpg/240px-Foobar.jpg 2x" /></a></div></div>
15242 <div class="gallerytext">
15249 <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>
15251 <!-- consistency with gallery extension -->
15252 <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"}}'>
15253 <li class="gallerybox">
15254 <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>
15255 <div class="gallerytext">caption</div>
15261 Nowiki markup in alt attribute (edited html, no data-parsoid) (T206940)
15264 "nativeGallery": true
15267 [[File:Foobar.jpg|alt=<nowiki>''x''</nowiki>|caption]]
15269 <!-- consistency with gallery extension -->
15271 File:Foobar.jpg|alt=<nowiki>''x''</nowiki>|caption
15274 <p><a href="/wiki/File:Foobar.jpg" class="image" title="caption"><img alt="''x''" src="http://example.com/images/3/3a/Foobar.jpg" decoding="async" width="1941" height="220" /></a>
15276 <ul class="gallery mw-gallery-traditional">
15277 <li class="gallerybox" style="width: 155px"><div style="width: 155px">
15278 <div class="thumb" style="width: 150px;"><div style="margin:68px auto;"><a href="/wiki/File:Foobar.jpg" class="image"><img alt="''x''" src="http://example.com/images/thumb/3/3a/Foobar.jpg/120px-Foobar.jpg" decoding="async" width="120" height="14" srcset="http://example.com/images/thumb/3/3a/Foobar.jpg/180px-Foobar.jpg 1.5x, http://example.com/images/thumb/3/3a/Foobar.jpg/240px-Foobar.jpg 2x" /></a></div></div>
15279 <div class="gallerytext">
15286 <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>
15288 <!-- consistency with gallery extension -->
15289 <ul class="gallery mw-gallery-traditional" typeof="mw:Extension/gallery" data-mw='{"name":"gallery","attrs":{},"body":{}}'>
15290 <li class="gallerybox">
15291 <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>
15292 <div class="gallerytext">caption</div>
15298 Ampersand in link attribute (T206940)
15300 [[File:Foobar.jpg|link=Foo & bar]]
15302 <!-- consistency with gallery extension -->
15304 File:Foobar.jpg|link=Foo & bar
15307 <p><a href="/wiki/Foo_%26_bar" title="Foo & bar"><img alt="Foobar.jpg" src="http://example.com/images/3/3a/Foobar.jpg" decoding="async" width="1941" height="220" /></a>
15309 <ul class="gallery mw-gallery-traditional">
15310 <li class="gallerybox" style="width: 155px"><div style="width: 155px">
15311 <div class="thumb" style="width: 150px;"><div style="margin:68px auto;"><a href="/wiki/Foo_%26_bar"><img alt="Foobar.jpg" src="http://example.com/images/thumb/3/3a/Foobar.jpg/120px-Foobar.jpg" decoding="async" width="120" height="14" srcset="http://example.com/images/thumb/3/3a/Foobar.jpg/180px-Foobar.jpg 1.5x, http://example.com/images/thumb/3/3a/Foobar.jpg/240px-Foobar.jpg 2x" /></a></div></div>
15312 <div class="gallerytext">
15317 <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>
15319 <!-- consistency with gallery extension -->
15320 <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"}}'>
15321 <li class="gallerybox">
15322 <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>
15323 <div class="gallerytext"></div>
15329 Ampersand in link attribute (edited html, no data-parsoid) (T206940)
15332 "nativeGallery": true
15335 [[File:Foobar.jpg|link=Foo_&_bar]]
15337 <!-- consistency with gallery extension -->
15339 File:Foobar.jpg|link=Foo_&_bar
15342 <p><a href="/wiki/Foo_%26_bar" title="Foo & bar"><img alt="Foobar.jpg" src="http://example.com/images/3/3a/Foobar.jpg" decoding="async" width="1941" height="220" /></a>
15344 <ul class="gallery mw-gallery-traditional">
15345 <li class="gallerybox" style="width: 155px"><div style="width: 155px">
15346 <div class="thumb" style="width: 150px;"><div style="margin:68px auto;"><a href="/wiki/Foo_%26_bar"><img alt="Foobar.jpg" src="http://example.com/images/thumb/3/3a/Foobar.jpg/120px-Foobar.jpg" decoding="async" width="120" height="14" srcset="http://example.com/images/thumb/3/3a/Foobar.jpg/180px-Foobar.jpg 1.5x, http://example.com/images/thumb/3/3a/Foobar.jpg/240px-Foobar.jpg 2x" /></a></div></div>
15347 <div class="gallerytext">
15352 <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>
15354 <!-- consistency with gallery extension -->
15355 <ul class="gallery mw-gallery-traditional" typeof="mw:Extension/gallery" data-mw='{"name":"gallery","attrs":{},"body":{}}'>
15356 <li class="gallerybox">
15357 <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>
15358 <div class="gallerytext"></div>
15364 Italics markup in link attribute (T206940)
15368 <!-- Note that "italics" are stripped, even though this is a valid page title -->
15369 [[File:Foobar.jpg|link=Foo''s bar''s|caption1]]
15371 [[File:Foobar.jpg|link=''Main Page''|caption2]]
15373 <!-- consistency with gallery extension -->
15375 File:Foobar.jpg|link=Foo''s bar''s|caption1
15376 File:Foobar.jpg|link=''Main Page''|caption2
15379 <p><a href="/wiki/Foo%27%27s_bar%27%27s" title="Foo''s bar''s">Foo''s bar''s</a>
15380 </p><p><a href="/wiki/Foos_bars" title="caption1"><img alt="caption1" src="http://example.com/images/3/3a/Foobar.jpg" decoding="async" width="1941" height="220" /></a>
15381 </p><p><a href="/wiki/Main_Page" title="caption2"><img alt="caption2" src="http://example.com/images/3/3a/Foobar.jpg" decoding="async" width="1941" height="220" /></a>
15383 <ul class="gallery mw-gallery-traditional">
15384 <li class="gallerybox" style="width: 155px"><div style="width: 155px">
15385 <div class="thumb" style="width: 150px;"><div style="margin:68px auto;"><a href="/wiki/Foos_bars"><img alt="" src="http://example.com/images/thumb/3/3a/Foobar.jpg/120px-Foobar.jpg" decoding="async" width="120" height="14" srcset="http://example.com/images/thumb/3/3a/Foobar.jpg/180px-Foobar.jpg 1.5x, http://example.com/images/thumb/3/3a/Foobar.jpg/240px-Foobar.jpg 2x" /></a></div></div>
15386 <div class="gallerytext">
15391 <li class="gallerybox" style="width: 155px"><div style="width: 155px">
15392 <div class="thumb" style="width: 150px;"><div style="margin:68px auto;"><a href="/wiki/Main_Page"><img alt="" src="http://example.com/images/thumb/3/3a/Foobar.jpg/120px-Foobar.jpg" decoding="async" width="120" height="14" srcset="http://example.com/images/thumb/3/3a/Foobar.jpg/180px-Foobar.jpg 1.5x, http://example.com/images/thumb/3/3a/Foobar.jpg/240px-Foobar.jpg 2x" /></a></div></div>
15393 <div class="gallerytext">
15400 <p><a rel="mw:WikiLink" href="./Foo''s_bar''s" title="Foo''s bar''s">Foo''s bar''s</a></p>
15402 <!-- Note that "italics" are stripped, even though this is a valid page title -->
15403 <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>
15405 <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>
15407 <!-- consistency with gallery extension -->
15408 <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"}}'>
15409 <li class="gallerybox">
15410 <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>
15411 <div class="gallerytext">caption1</div>
15413 <li class="gallerybox">
15414 <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>
15415 <div class="gallerytext">caption2</div>
15421 Nowiki markup in link attribute (T206940)
15423 [[File:Foobar.jpg|link=Foo<nowiki>''</nowiki>s_bar<nowiki>''</nowiki>s|caption]]
15425 <!-- consistency with gallery extension -->
15427 File:Foobar.jpg|link=Foo<nowiki>''</nowiki>s_bar<nowiki>''</nowiki>s|caption
15430 <p><a href="/wiki/Foo%27%27s_bar%27%27s" title="caption"><img alt="caption" src="http://example.com/images/3/3a/Foobar.jpg" decoding="async" width="1941" height="220" /></a>
15432 <ul class="gallery mw-gallery-traditional">
15433 <li class="gallerybox" style="width: 155px"><div style="width: 155px">
15434 <div class="thumb" style="width: 150px;"><div style="margin:68px auto;"><a href="/wiki/Foo%27%27s_bar%27%27s"><img alt="" src="http://example.com/images/thumb/3/3a/Foobar.jpg/120px-Foobar.jpg" decoding="async" width="120" height="14" srcset="http://example.com/images/thumb/3/3a/Foobar.jpg/180px-Foobar.jpg 1.5x, http://example.com/images/thumb/3/3a/Foobar.jpg/240px-Foobar.jpg 2x" /></a></div></div>
15435 <div class="gallerytext">
15442 <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>
15444 <!-- consistency with gallery extension -->
15445 <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"}}'>
15446 <li class="gallerybox">
15447 <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>
15448 <div class="gallerytext">caption</div>
15454 Nowiki markup in link attribute (edited html, no data-parsoid) (T206940)
15457 "nativeGallery": true
15460 [[File:Foobar.jpg|link=Foo<nowiki>''s_bar''</nowiki>s|caption]]
15462 <!-- consistency with gallery extension -->
15464 File:Foobar.jpg|link=Foo<nowiki>''s_bar''</nowiki>s|caption
15467 <p><a href="/wiki/Foo%27%27s_bar%27%27s" title="caption"><img alt="caption" src="http://example.com/images/3/3a/Foobar.jpg" decoding="async" width="1941" height="220" /></a>
15469 <ul class="gallery mw-gallery-traditional">
15470 <li class="gallerybox" style="width: 155px"><div style="width: 155px">
15471 <div class="thumb" style="width: 150px;"><div style="margin:68px auto;"><a href="/wiki/Foo%27%27s_bar%27%27s"><img alt="" src="http://example.com/images/thumb/3/3a/Foobar.jpg/120px-Foobar.jpg" decoding="async" width="120" height="14" srcset="http://example.com/images/thumb/3/3a/Foobar.jpg/180px-Foobar.jpg 1.5x, http://example.com/images/thumb/3/3a/Foobar.jpg/240px-Foobar.jpg 2x" /></a></div></div>
15472 <div class="gallerytext">
15479 <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>
15481 <!-- consistency with gallery extension -->
15482 <ul class="gallery mw-gallery-traditional" typeof="mw:Extension/gallery" data-mw='{"name":"gallery","attrs":{},"body":{}}'>
15483 <li class="gallerybox">
15484 <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>
15485 <div class="gallerytext">caption</div>
15491 HTML entity prefix in link markup (T209236)
15493 [[File:Foobar.jpg|link=https://example.com?foo¶ms=bar]]
15495 <!-- consistency with gallery extension -->
15497 File:Foobar.jpg|link=https://example.com?foo¶ms=bar
15500 <p><a href="https://example.com?foo&params=bar" rel="nofollow"><img alt="Foobar.jpg" src="http://example.com/images/3/3a/Foobar.jpg" decoding="async" width="1941" height="220" /></a>
15502 <ul class="gallery mw-gallery-traditional">
15503 <li class="gallerybox" style="width: 155px"><div style="width: 155px">
15504 <div class="thumb" style="width: 150px;"><div style="margin:68px auto;"><a href="https://example.com?foo&params=bar"><img alt="Foobar.jpg" src="http://example.com/images/thumb/3/3a/Foobar.jpg/120px-Foobar.jpg" decoding="async" width="120" height="14" srcset="http://example.com/images/thumb/3/3a/Foobar.jpg/180px-Foobar.jpg 1.5x, http://example.com/images/thumb/3/3a/Foobar.jpg/240px-Foobar.jpg 2x" /></a></div></div>
15505 <div class="gallerytext">
15510 <p><figure-inline class="mw-default-size" typeof="mw:Image"><a href="https://example.com?foo&params=bar"><img resource="./File:Foobar.jpg" src="//example.com/images/3/3a/Foobar.jpg" data-file-width="1941" data-file-height="220" data-file-type="bitmap" height="220" width="1941"/></a></figure-inline></p>
15512 <!-- consistency with gallery extension -->
15513 <ul class="gallery mw-gallery-traditional" typeof="mw:Extension/gallery" data-mw='{"name":"gallery","attrs":{},"body":{"extsrc":"\nFile:Foobar.jpg|link=https://example.com?foo&params=bar\n"}}'>
15514 <li class="gallerybox">
15515 <div class="thumb"><figure-inline typeof="mw:Image"><a href="https://example.com?foo&params=bar"><img resource="./File:Foobar.jpg" src="//example.com/images/thumb/3/3a/Foobar.jpg/120px-Foobar.jpg" data-file-width="1941" data-file-height="220" data-file-type="bitmap" height="14" width="120"/></a></figure-inline></div>
15516 <div class="gallerytext"></div>
15522 Image with table with attributes in caption
15524 parsoid=wt2html,html2html
15526 [[File:Foobar.jpg|thumb|
15533 <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>
15534 <table class="123">
15535 <tbody><tr class="456" data-parsoid='{"startTagSrc":"|-"}'>
15538 </figcaption></figure>
15542 Image with table with rows from templates in caption
15544 [[File:Foobar.jpg|thumb|
15550 <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>
15552 <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>
15554 </figcaption></figure>
15558 Image with nested tables in caption
15560 [[File:Foobar.jpg|thumb|Foo<br />
15569 <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}'/>
15573 <tbody><tr><td>z</td></tr>
15574 </tbody></table></td></tr>
15576 </figcaption></figure>
15580 Image with heading and horizontal rule in caption
15582 [[File:Foobar.jpg|thumb|
15588 <div class="thumb tright"><div class="thumbinner" style="width:182px;"><a href="/wiki/File:Foobar.jpg" class="image"><img alt="" src="http://example.com/images/thumb/3/3a/Foobar.jpg/180px-Foobar.jpg" decoding="async" width="180" height="20" class="thumbimage" srcset="http://example.com/images/thumb/3/3a/Foobar.jpg/270px-Foobar.jpg 1.5x, http://example.com/images/thumb/3/3a/Foobar.jpg/360px-Foobar.jpg 2x" /></a> <div class="thumbcaption"><div class="magnify"><a href="/wiki/File:Foobar.jpg" class="internal" title="Enlarge"></a></div><h3><span class="mw-headline" id="Testing">Testing</span><span class="mw-editsection"><span class="mw-editsection-bracket">[</span><a href="/index.php?title=Parser_test&action=edit&section=1" title="Edit section: Testing">edit</a><span class="mw-editsection-bracket">]</span></span></h3> 123 <hr /></div></div></div>
15591 <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>
15592 <h3 id="Testing">Testing</h3>
15594 <hr data-parsoid='{"extra_dashes":10}'/>
15595 </figcaption></figure>
15598 ###################
15599 # Conflicting image format options.
15600 # First option specified should 'win'.
15601 # All three cases in each test should be identical.
15604 Image with 'frameless' first.
15606 parsoid=wt2html,wt2wt,html2html
15608 [[File:Foobar.jpg|frameless|caption]]
15610 [[File:Foobar.jpg|frameless|frame|caption]]
15612 [[File:Foobar.jpg|frameless|thumb|caption]]
15614 <p><a href="/wiki/File:Foobar.jpg" class="image" title="caption"><img alt="caption" src="http://example.com/images/thumb/3/3a/Foobar.jpg/180px-Foobar.jpg" decoding="async" width="180" height="20" srcset="http://example.com/images/thumb/3/3a/Foobar.jpg/270px-Foobar.jpg 1.5x, http://example.com/images/thumb/3/3a/Foobar.jpg/360px-Foobar.jpg 2x" /></a>
15615 </p><p><a href="/wiki/File:Foobar.jpg" class="image" title="caption"><img alt="caption" src="http://example.com/images/thumb/3/3a/Foobar.jpg/180px-Foobar.jpg" decoding="async" width="180" height="20" srcset="http://example.com/images/thumb/3/3a/Foobar.jpg/270px-Foobar.jpg 1.5x, http://example.com/images/thumb/3/3a/Foobar.jpg/360px-Foobar.jpg 2x" /></a>
15616 </p><p><a href="/wiki/File:Foobar.jpg" class="image" title="caption"><img alt="caption" src="http://example.com/images/thumb/3/3a/Foobar.jpg/180px-Foobar.jpg" decoding="async" width="180" height="20" srcset="http://example.com/images/thumb/3/3a/Foobar.jpg/270px-Foobar.jpg 1.5x, http://example.com/images/thumb/3/3a/Foobar.jpg/360px-Foobar.jpg 2x" /></a>
15619 <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>
15620 <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>
15621 <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>
15625 Image with 'frame' first.
15627 parsoid=wt2html,wt2wt,html2html
15629 [[File:Foobar.jpg|frame|caption]]
15630 [[File:Foobar.jpg|frame|frameless|caption]]
15631 [[File:Foobar.jpg|frame|thumb|caption]]
15633 <div class="thumb tright"><div class="thumbinner" style="width:1943px;"><a href="/wiki/File:Foobar.jpg" class="image"><img alt="" src="http://example.com/images/3/3a/Foobar.jpg" decoding="async" width="1941" height="220" class="thumbimage" /></a> <div class="thumbcaption">caption</div></div></div>
15634 <div class="thumb tright"><div class="thumbinner" style="width:1943px;"><a href="/wiki/File:Foobar.jpg" class="image"><img alt="" src="http://example.com/images/3/3a/Foobar.jpg" decoding="async" width="1941" height="220" class="thumbimage" /></a> <div class="thumbcaption">caption</div></div></div>
15635 <div class="thumb tright"><div class="thumbinner" style="width:1943px;"><a href="/wiki/File:Foobar.jpg" class="image"><img alt="" src="http://example.com/images/3/3a/Foobar.jpg" decoding="async" width="1941" height="220" class="thumbimage" /></a> <div class="thumbcaption">caption</div></div></div>
15638 <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>
15639 <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>
15640 <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>
15644 Image with 'thumb' first.
15646 parsoid=wt2html,wt2wt,html2html
15648 [[File:Foobar.jpg|thumb|caption]]
15649 [[File:Foobar.jpg|thumb|frameless|caption]]
15650 [[File:Foobar.jpg|thumb|frame|caption]]
15652 <div class="thumb tright"><div class="thumbinner" style="width:182px;"><a href="/wiki/File:Foobar.jpg" class="image"><img alt="" src="http://example.com/images/thumb/3/3a/Foobar.jpg/180px-Foobar.jpg" decoding="async" width="180" height="20" class="thumbimage" srcset="http://example.com/images/thumb/3/3a/Foobar.jpg/270px-Foobar.jpg 1.5x, http://example.com/images/thumb/3/3a/Foobar.jpg/360px-Foobar.jpg 2x" /></a> <div class="thumbcaption"><div class="magnify"><a href="/wiki/File:Foobar.jpg" class="internal" title="Enlarge"></a></div>caption</div></div></div>
15653 <div class="thumb tright"><div class="thumbinner" style="width:182px;"><a href="/wiki/File:Foobar.jpg" class="image"><img alt="" src="http://example.com/images/thumb/3/3a/Foobar.jpg/180px-Foobar.jpg" decoding="async" width="180" height="20" class="thumbimage" srcset="http://example.com/images/thumb/3/3a/Foobar.jpg/270px-Foobar.jpg 1.5x, http://example.com/images/thumb/3/3a/Foobar.jpg/360px-Foobar.jpg 2x" /></a> <div class="thumbcaption"><div class="magnify"><a href="/wiki/File:Foobar.jpg" class="internal" title="Enlarge"></a></div>caption</div></div></div>
15654 <div class="thumb tright"><div class="thumbinner" style="width:182px;"><a href="/wiki/File:Foobar.jpg" class="image"><img alt="" src="http://example.com/images/thumb/3/3a/Foobar.jpg/180px-Foobar.jpg" decoding="async" width="180" height="20" class="thumbimage" srcset="http://example.com/images/thumb/3/3a/Foobar.jpg/270px-Foobar.jpg 1.5x, http://example.com/images/thumb/3/3a/Foobar.jpg/360px-Foobar.jpg 2x" /></a> <div class="thumbcaption"><div class="magnify"><a href="/wiki/File:Foobar.jpg" class="internal" title="Enlarge"></a></div>caption</div></div></div>
15657 <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>
15658 <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>
15659 <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>
15662 ###################
15664 # See https://www.mediawiki.org/wiki/Help:Images#Size_and_frame
15665 # and https://phabricator.wikimedia.org/T64258
15666 # Foobar has actual size of 1941x220
15667 # 1. Thumbs & frameless always reduce, can't be enlarged unless it's
15668 # a scalable format.
15669 # 2. Framed images always ignore size options; always render at default size.
15670 # 3. "Unspecified format" and border are the only types which can be
15674 Image: unspecified format and border enlarge
15676 parsoid=wt2html,wt2wt,html2html
15678 [[File:Foobar.jpg|2000px]]
15680 [[File:Foobar.jpg|border|2000px]]
15682 <p><a href="/wiki/File:Foobar.jpg" class="image"><img alt="Foobar.jpg" src="http://example.com/images/3/3a/Foobar.jpg" decoding="async" width="2000" height="227" /></a>
15683 </p><p><a href="/wiki/File:Foobar.jpg" class="image"><img alt="Foobar.jpg" src="http://example.com/images/3/3a/Foobar.jpg" decoding="async" width="2000" height="227" class="thumbborder" /></a>
15686 <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>
15687 <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>
15691 Image: "unspecified format" and border reduce
15693 parsoid=wt2html,wt2wt,html2html
15695 [[File:Foobar.jpg|1000px]]
15697 [[File:Foobar.jpg|border|1000px]]
15699 <p><a href="/wiki/File:Foobar.jpg" class="image"><img alt="Foobar.jpg" src="http://example.com/images/thumb/3/3a/Foobar.jpg/1000px-Foobar.jpg" decoding="async" width="1000" height="113" srcset="http://example.com/images/thumb/3/3a/Foobar.jpg/1500px-Foobar.jpg 1.5x, http://example.com/images/3/3a/Foobar.jpg 2x" /></a>
15700 </p><p><a href="/wiki/File:Foobar.jpg" class="image"><img alt="Foobar.jpg" src="http://example.com/images/thumb/3/3a/Foobar.jpg/1000px-Foobar.jpg" decoding="async" width="1000" height="113" class="thumbborder" srcset="http://example.com/images/thumb/3/3a/Foobar.jpg/1500px-Foobar.jpg 1.5x, http://example.com/images/3/3a/Foobar.jpg 2x" /></a>
15703 <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>
15704 <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>
15708 Image: thumbs reduce
15710 parsoid=wt2html,wt2wt,html2html
15712 [[File:Foobar.jpg|thumb|50px]]
15714 <div class="thumb tright"><div class="thumbinner" style="width:52px;"><a href="/wiki/File:Foobar.jpg" class="image"><img alt="Foobar.jpg" src="http://example.com/images/thumb/3/3a/Foobar.jpg/50px-Foobar.jpg" decoding="async" width="50" height="6" class="thumbimage" srcset="http://example.com/images/thumb/3/3a/Foobar.jpg/75px-Foobar.jpg 1.5x, http://example.com/images/thumb/3/3a/Foobar.jpg/100px-Foobar.jpg 2x" /></a> <div class="thumbcaption"><div class="magnify"><a href="/wiki/File:Foobar.jpg" class="internal" title="Enlarge"></a></div></div></div></div>
15717 <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>
15721 Image: bitmap thumbs can't be enlarged past original size, but vector can.
15723 parsoid=wt2html,wt2wt,html2html
15725 [[File:Foobar.jpg|thumb|2000px]]
15727 [[File:Foobar.svg|thumb|2000px]]
15729 <div class="thumb tright"><div class="thumbinner" style="width:1943px;"><a href="/wiki/File:Foobar.jpg" class="image"><img alt="Foobar.jpg" src="http://example.com/images/3/3a/Foobar.jpg" decoding="async" width="1941" height="220" class="thumbimage" /></a> <div class="thumbcaption"><div class="magnify"><a href="/wiki/File:Foobar.jpg" class="internal" title="Enlarge"></a></div></div></div></div>
15730 <div class="thumb tright"><div class="thumbinner" style="width:2002px;"><a href="/wiki/File:Foobar.svg" class="image"><img alt="Foobar.svg" src="http://example.com/images/thumb/f/ff/Foobar.svg/2000px-Foobar.svg.png" decoding="async" width="2000" height="1500" class="thumbimage" srcset="http://example.com/images/thumb/f/ff/Foobar.svg/3000px-Foobar.svg.png 1.5x, http://example.com/images/thumb/f/ff/Foobar.svg/4000px-Foobar.svg.png 2x" /></a> <div class="thumbcaption"><div class="magnify"><a href="/wiki/File:Foobar.svg" class="internal" title="Enlarge"></a></div></div></div></div>
15733 <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>
15734 <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>
15738 Image: frameless can reduce in size
15740 parsoid=wt2html,wt2wt,html2html
15742 [[File:Foobar.jpg|frameless|50px]]
15744 <p><a href="/wiki/File:Foobar.jpg" class="image"><img alt="Foobar.jpg" src="http://example.com/images/thumb/3/3a/Foobar.jpg/50px-Foobar.jpg" decoding="async" width="50" height="6" srcset="http://example.com/images/thumb/3/3a/Foobar.jpg/75px-Foobar.jpg 1.5x, http://example.com/images/thumb/3/3a/Foobar.jpg/100px-Foobar.jpg 2x" /></a>
15747 <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>
15751 Image: bitmap frameless can't be enlarged past original size, but vector can
15753 parsoid=wt2html,wt2wt,html2html
15755 [[File:Foobar.jpg|frameless|2000px]]
15757 [[File:Foobar.svg|frameless|2000px]]
15759 <p><a href="/wiki/File:Foobar.jpg" class="image"><img alt="Foobar.jpg" src="http://example.com/images/3/3a/Foobar.jpg" decoding="async" width="1941" height="220" /></a>
15760 </p><p><a href="/wiki/File:Foobar.svg" class="image"><img alt="Foobar.svg" src="http://example.com/images/thumb/f/ff/Foobar.svg/2000px-Foobar.svg.png" decoding="async" width="2000" height="1500" srcset="http://example.com/images/thumb/f/ff/Foobar.svg/3000px-Foobar.svg.png 1.5x, http://example.com/images/thumb/f/ff/Foobar.svg/4000px-Foobar.svg.png 2x" /></a>
15763 <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>
15764 <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>
15768 Image: framed images are always unscaled.
15770 parsoid=wt2html,wt2wt,html2html
15772 [[File:Foobar.jpg|frame]]
15774 [[File:Foobar.jpg|frame|50px]]
15776 [[File:Foobar.jpg|frame|50x50px]]
15778 [[File:Foobar.jpg|frame|2000px]]
15780 <div class="thumb tright"><div class="thumbinner" style="width:1943px;"><a href="/wiki/File:Foobar.jpg" class="image"><img alt="Foobar.jpg" src="http://example.com/images/3/3a/Foobar.jpg" decoding="async" width="1941" height="220" class="thumbimage" /></a> <div class="thumbcaption"></div></div></div>
15781 <div class="thumb tright"><div class="thumbinner" style="width:1943px;"><a href="/wiki/File:Foobar.jpg" class="image"><img alt="Foobar.jpg" src="http://example.com/images/3/3a/Foobar.jpg" decoding="async" width="1941" height="220" class="thumbimage" /></a> <div class="thumbcaption"></div></div></div>
15782 <div class="thumb tright"><div class="thumbinner" style="width:1943px;"><a href="/wiki/File:Foobar.jpg" class="image"><img alt="Foobar.jpg" src="http://example.com/images/3/3a/Foobar.jpg" decoding="async" width="1941" height="220" class="thumbimage" /></a> <div class="thumbcaption"></div></div></div>
15783 <div class="thumb tright"><div class="thumbinner" style="width:1943px;"><a href="/wiki/File:Foobar.jpg" class="image"><img alt="Foobar.jpg" src="http://example.com/images/3/3a/Foobar.jpg" decoding="async" width="1941" height="220" class="thumbimage" /></a> <div class="thumbcaption"></div></div></div>
15786 <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>
15787 <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>
15788 <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>
15789 <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>
15792 ###################
15795 Link to image page- image page normally doesn't exists, hence edit link
15796 Add test with existing image page
15797 #<p><a href="/wiki/File:Test" title="Image:Test">Image:test</a>
15801 <p><a href="/index.php?title=File:Test&action=edit&redlink=1" class="new" title="File:Test (page does not exist)">Image:test</a>
15806 T20784 Link to non-existent image page with caption should use caption as link text
15808 [[:Image:test|caption]]
15810 <p><a href="/index.php?title=File:Test&action=edit&redlink=1" class="new" title="File:Test (page does not exist)">caption</a>
15815 Frameless image caption with a free URL
15817 [[File:Foobar.jpg|http://example.com]]
15819 <p><a href="/wiki/File:Foobar.jpg" class="image" title="http://example.com"><img alt="http://example.com" src="http://example.com/images/3/3a/Foobar.jpg" decoding="async" width="1941" height="220" /></a>
15822 <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>
15826 Thumbnail image caption with a free URL
15830 [[File:Foobar.jpg|thumb|http://example.com]]
15832 <div class="thumb tright"><div class="thumbinner" style="width:222px;"><a href="/wiki/File:Foobar.jpg" class="image"><img alt="" src="http://example.com/images/thumb/3/3a/Foobar.jpg/220px-Foobar.jpg" decoding="async" width="220" height="25" class="thumbimage" srcset="http://example.com/images/thumb/3/3a/Foobar.jpg/330px-Foobar.jpg 1.5x, http://example.com/images/thumb/3/3a/Foobar.jpg/440px-Foobar.jpg 2x" /></a> <div class="thumbcaption"><div class="magnify"><a href="/wiki/File:Foobar.jpg" class="internal" title="Enlarge"></a></div><a rel="nofollow" class="external free" href="http://example.com">http://example.com</a></div></div></div>
15835 <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>
15839 Thumbnail image caption with a free URL and explicit alt
15842 parsoid=wt2html,wt2wt,html2html
15844 [[File:Foobar.jpg|thumb|http://example.com|alt=Alteration]]
15846 <div class="thumb tright"><div class="thumbinner" style="width:222px;"><a href="/wiki/File:Foobar.jpg" class="image"><img alt="Alteration" src="http://example.com/images/thumb/3/3a/Foobar.jpg/220px-Foobar.jpg" decoding="async" width="220" height="25" class="thumbimage" srcset="http://example.com/images/thumb/3/3a/Foobar.jpg/330px-Foobar.jpg 1.5x, http://example.com/images/thumb/3/3a/Foobar.jpg/440px-Foobar.jpg 2x" /></a> <div class="thumbcaption"><div class="magnify"><a href="/wiki/File:Foobar.jpg" class="internal" title="Enlarge"></a></div><a rel="nofollow" class="external free" href="http://example.com">http://example.com</a></div></div></div>
15849 <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>
15853 SVG thumbnails with no language set
15856 [[File:Foobar.svg|thumb|caption]]
15858 <div class="thumb tright"><div class="thumbinner" style="width:182px;"><a href="/wiki/File:Foobar.svg" class="image"><img alt="" src="http://example.com/images/thumb/f/ff/Foobar.svg/180px-Foobar.svg.png" decoding="async" width="180" height="135" class="thumbimage" srcset="http://example.com/images/thumb/f/ff/Foobar.svg/270px-Foobar.svg.png 1.5x, http://example.com/images/thumb/f/ff/Foobar.svg/360px-Foobar.svg.png 2x" /></a> <div class="thumbcaption"><div class="magnify"><a href="/wiki/File:Foobar.svg" class="internal" title="Enlarge"></a></div>caption</div></div></div>
15861 <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>
15865 SVG thumbnails with language de
15867 parsoid=wt2html,wt2wt,html2html
15869 [[File:Foobar.svg|thumb|caption|lang=de]]
15871 <div class="thumb tright"><div class="thumbinner" style="width:182px;"><a href="/index.php?title=File:Foobar.svg&lang=de" class="image"><img alt="" src="http://example.com/images/thumb/f/ff/Foobar.svg/langde-180px-Foobar.svg.png" decoding="async" width="180" height="135" class="thumbimage" srcset="http://example.com/images/thumb/f/ff/Foobar.svg/langde-270px-Foobar.svg.png 1.5x, http://example.com/images/thumb/f/ff/Foobar.svg/langde-360px-Foobar.svg.png 2x" /></a> <div class="thumbcaption"><div class="magnify"><a href="/wiki/File:Foobar.svg" class="internal" title="Enlarge"></a></div>caption</div></div></div>
15874 <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>
15878 SVG thumbnails with invalid language code
15880 parsoid=wt2html,wt2wt,html2html
15882 [[File:Foobar.svg|thumb|caption|lang=invalid:language:code]]
15884 <div class="thumb tright"><div class="thumbinner" style="width:182px;"><a href="/wiki/File:Foobar.svg" class="image"><img alt="" src="http://example.com/images/thumb/f/ff/Foobar.svg/180px-Foobar.svg.png" decoding="async" width="180" height="135" class="thumbimage" srcset="http://example.com/images/thumb/f/ff/Foobar.svg/270px-Foobar.svg.png 1.5x, http://example.com/images/thumb/f/ff/Foobar.svg/360px-Foobar.svg.png 2x" /></a> <div class="thumbcaption"><div class="magnify"><a href="/wiki/File:Foobar.svg" class="internal" title="Enlarge"></a></div>lang=invalid:language:code</div></div></div>
15887 <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>
15891 SVG thumbnails in page language
15895 [[File:Foobar.svg]] [[File:Foobar.svg|lang=en]]
15897 <p><a href="/wiki/%D0%A4%D0%B0%D0%B9%D0%BB:Foobar.svg" class="image"><img alt="Foobar.svg" src="http://example.com/images/thumb/f/ff/Foobar.svg/langru-240px-Foobar.svg.png" decoding="async" width="240" height="180" srcset="http://example.com/images/thumb/f/ff/Foobar.svg/langru-360px-Foobar.svg.png 1.5x, http://example.com/images/thumb/f/ff/Foobar.svg/langru-480px-Foobar.svg.png 2x" /></a> <a href="/index.php?title=%D0%A4%D0%B0%D0%B9%D0%BB:Foobar.svg&lang=en" class="image"><img alt="Foobar.svg" src="http://example.com/images/thumb/f/ff/Foobar.svg/240px-Foobar.svg.png" decoding="async" width="240" height="180" srcset="http://example.com/images/thumb/f/ff/Foobar.svg/360px-Foobar.svg.png 1.5x, http://example.com/images/thumb/f/ff/Foobar.svg/480px-Foobar.svg.png 2x" /></a>
15902 SVG thumbnails in page language not present in the file
15906 [[File:Foobar.svg]] [[File:Foobar.svg|lang=ru]]
15908 <p><a href="/wiki/Datei:Foobar.svg" class="image"><img alt="Foobar.svg" src="http://example.com/images/thumb/f/ff/Foobar.svg/240px-Foobar.svg.png" decoding="async" width="240" height="180" srcset="http://example.com/images/thumb/f/ff/Foobar.svg/360px-Foobar.svg.png 1.5x, http://example.com/images/thumb/f/ff/Foobar.svg/480px-Foobar.svg.png 2x" /></a> <a href="/index.php?title=Datei:Foobar.svg&lang=ru" class="image"><img alt="Foobar.svg" src="http://example.com/images/thumb/f/ff/Foobar.svg/langru-240px-Foobar.svg.png" decoding="async" width="240" height="180" srcset="http://example.com/images/thumb/f/ff/Foobar.svg/langru-360px-Foobar.svg.png 1.5x, http://example.com/images/thumb/f/ff/Foobar.svg/langru-480px-Foobar.svg.png 2x" /></a>
15913 T3887: A ISBN with a thumbnail
15915 [[File:Foobar.jpg|thumb|ISBN 1235467890]]
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" decoding="async" width="180" height="20" class="thumbimage" srcset="http://example.com/images/thumb/3/3a/Foobar.jpg/270px-Foobar.jpg 1.5x, http://example.com/images/thumb/3/3a/Foobar.jpg/360px-Foobar.jpg 2x" /></a> <div class="thumbcaption"><div class="magnify"><a href="/wiki/File:Foobar.jpg" class="internal" title="Enlarge"></a></div><a href="/wiki/Special:BookSources/1235467890" class="internal mw-magiclink-isbn">ISBN 1235467890</a></div></div></div>
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><a href="./Special:BookSources/1235467890" rel="mw:WikiLink">ISBN 1235467890</a></figcaption></figure>
15924 T3887: A RFC with a thumbnail
15926 [[File:Foobar.jpg|thumb|This is RFC 12354]]
15928 <div class="thumb tright"><div class="thumbinner" style="width:182px;"><a href="/wiki/File:Foobar.jpg" class="image"><img alt="" src="http://example.com/images/thumb/3/3a/Foobar.jpg/180px-Foobar.jpg" decoding="async" width="180" height="20" class="thumbimage" srcset="http://example.com/images/thumb/3/3a/Foobar.jpg/270px-Foobar.jpg 1.5x, http://example.com/images/thumb/3/3a/Foobar.jpg/360px-Foobar.jpg 2x" /></a> <div class="thumbcaption"><div class="magnify"><a href="/wiki/File:Foobar.jpg" class="internal" title="Enlarge"></a></div>This is <a class="external mw-magiclink-rfc" rel="nofollow" href="https://tools.ietf.org/html/rfc12354">RFC 12354</a></div></div></div>
15931 <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>
15935 T3887: A mailto link with a thumbnail
15937 [[File:Foobar.jpg|thumb|Please mailto:nobody@example.com]]
15939 <div class="thumb tright"><div class="thumbinner" style="width:182px;"><a href="/wiki/File:Foobar.jpg" class="image"><img alt="" src="http://example.com/images/thumb/3/3a/Foobar.jpg/180px-Foobar.jpg" decoding="async" width="180" height="20" class="thumbimage" srcset="http://example.com/images/thumb/3/3a/Foobar.jpg/270px-Foobar.jpg 1.5x, http://example.com/images/thumb/3/3a/Foobar.jpg/360px-Foobar.jpg 2x" /></a> <div class="thumbcaption"><div class="magnify"><a href="/wiki/File:Foobar.jpg" class="internal" title="Enlarge"></a></div>Please <a rel="nofollow" class="external free" href="mailto:nobody@example.com">mailto:nobody@example.com</a></div></div></div>
15942 <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>
15945 # Pending resolution to T2368
15947 T2648: Frameless image caption with a link
15949 [[File:Foobar.jpg|text with a [[link]] in it]]
15951 <p><a href="/wiki/File:Foobar.jpg" class="image" title="text with a link in it"><img alt="text with a link in it" src="http://example.com/images/3/3a/Foobar.jpg" decoding="async" width="1941" height="220" /></a>
15954 <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>
15958 T2648: Frameless image caption with a link (suffix)
15960 [[File:Foobar.jpg|text with a [[link]]foo in it]]
15962 <p><a href="/wiki/File:Foobar.jpg" class="image" title="text with a linkfoo in it"><img alt="text with a linkfoo in it" src="http://example.com/images/3/3a/Foobar.jpg" decoding="async" width="1941" height="220" /></a>
15965 <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>
15969 T2648: Frameless image caption with an interwiki link
15971 [[File:Foobar.jpg|text with a [[MeatBall:Link]] in it]]
15973 <p><a href="/wiki/File:Foobar.jpg" class="image" title="text with a MeatBall:Link in it"><img alt="text with a MeatBall:Link in it" src="http://example.com/images/3/3a/Foobar.jpg" decoding="async" width="1941" height="220" /></a>
15976 <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>
15980 T2648: Frameless image caption with a piped interwiki link
15982 [[File:Foobar.jpg|text with a [[MeatBall:Link|link]] in it]]
15984 <p><a href="/wiki/File:Foobar.jpg" class="image" title="text with a link in it"><img alt="text with a link in it" src="http://example.com/images/3/3a/Foobar.jpg" decoding="async" width="1941" height="220" /></a>
15987 <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>
15991 T107474: Frameless image caption with <nowiki>
15993 [[File:Foobar.jpg|<nowiki>text with a [[MeatBall:Link|link]] in it</nowiki>]]
15995 <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>
15999 Escape HTML special chars in image alt text
16001 [[File:Foobar.jpg|& < > "]]
16003 <p><a href="/wiki/File:Foobar.jpg" class="image" title="& < > ""><img alt="& < > "" src="http://example.com/images/3/3a/Foobar.jpg" decoding="async" width="1941" height="220" /></a>
16006 <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>
16010 Escape HTML special chars in image alt text with LanguageConverter
16014 [[File:Foobar.jpg|& < > "]]
16016 <p><a href="/wiki/File:Foobar.jpg" class="image" title="& < > ""><img alt="& < > "" src="http://example.com/images/3/3a/Foobar.jpg" decoding="async" width="1941" height="220" /></a>
16019 <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>
16023 Entities in file name and attributes
16025 [[File:7%25 solution.gif|manualthumb=7%25 solution.gif|link=7%25 solution|[[7%25 solution]]]]
16027 <p><a href="/index.php?title=Special:Upload&wpDestFile=7%25_solution.gif" class="new" title="File:7% solution.gif">7% solution</a>
16030 <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>
16034 T2499: Alt text should have Ӓ, not &1234;
16036 [[File:Foobar.jpg|♀]]
16038 <p><a href="/wiki/File:Foobar.jpg" class="image" title="♀"><img alt="♀" src="http://example.com/images/3/3a/Foobar.jpg" decoding="async" width="1941" height="220" /></a>
16041 <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>
16045 Broken image caption with link
16047 parsoid=wt2html,wt2wt,html2html
16049 [[Image:Foobar.jpg|thumb|This is a broken caption. But [[Main Page|this]] is just an ordinary link.
16051 <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.
16054 <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>
16058 Image caption containing another image
16060 [[File:Foobar.jpg|thumb|This is a caption with another [[File:Thumb.png|image]] inside it!]]
16062 <div class="thumb tright"><div class="thumbinner" style="width:182px;"><a href="/wiki/File:Foobar.jpg" class="image"><img alt="" src="http://example.com/images/thumb/3/3a/Foobar.jpg/180px-Foobar.jpg" decoding="async" width="180" height="20" class="thumbimage" srcset="http://example.com/images/thumb/3/3a/Foobar.jpg/270px-Foobar.jpg 1.5x, http://example.com/images/thumb/3/3a/Foobar.jpg/360px-Foobar.jpg 2x" /></a> <div class="thumbcaption"><div class="magnify"><a href="/wiki/File:Foobar.jpg" class="internal" title="Enlarge"></a></div>This is a caption with another <a href="/wiki/File:Thumb.png" class="image" title="image"><img alt="image" src="http://example.com/images/e/ea/Thumb.png" decoding="async" width="135" height="135" /></a> inside it!</div></div></div>
16065 <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>
16069 Image: caption containing a newline
16071 [[File:Foobar.jpg|This
16074 <p><a href="/wiki/File:Foobar.jpg" class="image" title="This *is some text"><img alt="This *is some text" src="http://example.com/images/3/3a/Foobar.jpg" decoding="async" width="1941" height="220" /></a>
16077 <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>
16081 Image: caption containing leading space
16082 (The leading space should not trigger nowiki escaping in wt2wt mode)
16084 [[File:Foobar.jpg|thumb| bar]]
16086 <div class="thumb tright"><div class="thumbinner" style="width:182px;"><a href="/wiki/File:Foobar.jpg" class="image"><img alt="" src="http://example.com/images/thumb/3/3a/Foobar.jpg/180px-Foobar.jpg" decoding="async" width="180" height="20" class="thumbimage" srcset="http://example.com/images/thumb/3/3a/Foobar.jpg/270px-Foobar.jpg 1.5x, http://example.com/images/thumb/3/3a/Foobar.jpg/360px-Foobar.jpg 2x" /></a> <div class="thumbcaption"><div class="magnify"><a href="/wiki/File:Foobar.jpg" class="internal" title="Enlarge"></a></div>bar</div></div></div>
16089 <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>
16092 # html/php output not have newlines after table, td, th, etc. because
16093 # Linker::makeThumbLink2() replaces the newlines with spaces since
16094 # the table is inside a caption.
16095 # FIXME: Verify if that circa 2004 fix is still required.
16097 Image: caption containing a table
16099 parsoid=wt2html,wt2wt,html2html
16101 [[Image:Foobar.jpg|thumb|200px|This is an example image thumbnail caption with a table
16107 and some more text.]]
16109 <div class="thumb tright"><div class="thumbinner" style="width:202px;"><a href="/wiki/File:Foobar.jpg" class="image"><img alt="" src="http://example.com/images/thumb/3/3a/Foobar.jpg/200px-Foobar.jpg" decoding="async" width="200" height="23" class="thumbimage" srcset="http://example.com/images/thumb/3/3a/Foobar.jpg/300px-Foobar.jpg 1.5x, http://example.com/images/thumb/3/3a/Foobar.jpg/400px-Foobar.jpg 2x" /></a> <div class="thumbcaption"><div class="magnify"><a href="/wiki/File:Foobar.jpg" class="internal" title="Enlarge"></a></div>This is an example image thumbnail caption with a table <table> <tr> <th>Foo</th> <th>Bar </th></tr> <tr> <td>Foo1</td> <td>Bar1 </td></tr></table> and some more text.</div></div></div>
16112 <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
16115 <tr><th>Foo</th><th>Bar</th></tr>
16118 <td>Bar1</td></tr></tbody></table>and some more text.</figcaption></figure>
16122 T5090: External links other than http: in image captions
16124 [[File:Foobar.jpg|thumb|200x200px|This caption has [irc://example.net irc] and [https://example.com Secure] ext links in it.]]
16126 <div class="thumb tright"><div class="thumbinner" style="width:202px;"><a href="/wiki/File:Foobar.jpg" class="image"><img alt="" src="http://example.com/images/thumb/3/3a/Foobar.jpg/200px-Foobar.jpg" decoding="async" width="200" height="23" class="thumbimage" srcset="http://example.com/images/thumb/3/3a/Foobar.jpg/300px-Foobar.jpg 1.5x, http://example.com/images/thumb/3/3a/Foobar.jpg/400px-Foobar.jpg 2x" /></a> <div class="thumbcaption"><div class="magnify"><a href="/wiki/File:Foobar.jpg" class="internal" title="Enlarge"></a></div>This caption has <a rel="nofollow" class="external text" href="irc://example.net">irc</a> and <a rel="nofollow" class="external text" href="https://example.com">Secure</a> ext links in it.</div></div></div>
16129 <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>
16135 parsoid=wt2html,wt2wt,html2html
16137 [[Image:foobar.jpg|a|class=b]]
16139 <p><a href="/wiki/File:Foobar.jpg" class="image" title="a"><img alt="a" src="http://example.com/images/3/3a/Foobar.jpg" decoding="async" width="1941" height="220" class="b" /></a>
16142 <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>
16146 Localized image handling (1).
16148 parsoid=wt2html,wt2wt,html2html
16151 [[Archivo:Foobar.jpg|izquierda|enlace=foo|caption]]
16153 <div class="floatleft"><a href="/wiki/Foo" title="caption"><img alt="caption" src="http://example.com/images/3/3a/Foobar.jpg" decoding="async" width="1941" height="220" /></a></div>
16156 <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>
16160 Localized image handling (2).
16163 parsoid=wt2html,wt2wt,html2html
16166 [[Archivo:Foobar.jpg|miniatura|izquierda|enlace=foo|caption]]
16168 <div class="thumb tleft"><div class="thumbinner" style="width:222px;"><a href="/wiki/Foo" title="Foo"><img alt="" src="http://example.com/images/thumb/3/3a/Foobar.jpg/220px-Foobar.jpg" decoding="async" width="220" height="25" class="thumbimage" srcset="http://example.com/images/thumb/3/3a/Foobar.jpg/330px-Foobar.jpg 1.5x, http://example.com/images/thumb/3/3a/Foobar.jpg/440px-Foobar.jpg 2x" /></a> <div class="thumbcaption"><div class="magnify"><a href="/wiki/Archivo:Foobar.jpg" class="internal" title="Aumentar"></a></div>caption</div></div></div>
16171 <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>
16175 Localized image handling (3).
16180 <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>
16182 [[File:Foobar.jpg|بندانگشتی]]
16186 "border", "frameless" and "class" attributes on an image.
16189 parsoid=wt2html,wt2wt,html2html
16191 [[File:Foobar.jpg|frameless|border|class=extra|caption]]
16193 <p><a href="/wiki/File:Foobar.jpg" class="image" title="caption"><img alt="caption" src="http://example.com/images/thumb/3/3a/Foobar.jpg/220px-Foobar.jpg" decoding="async" width="220" height="25" class="extra thumbborder" srcset="http://example.com/images/thumb/3/3a/Foobar.jpg/330px-Foobar.jpg 1.5x, http://example.com/images/thumb/3/3a/Foobar.jpg/440px-Foobar.jpg 2x" /></a>
16196 <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>
16199 # Note that 'right' is the default alignment, despite the misspelled 'righ' below
16201 Invalid image attributes (T64500)
16204 parsoid=wt2html,wt2wt,html2html
16206 [[File:Foobar.jpg|thumb|float|left|caption]]
16208 [[File:Foobar.jpg|thumb|righ|caption]]
16210 [[File:Foobar.jpg|bogus1|thumb|bogus2|left|bogus3|caption]]
16212 <div class="thumb tleft"><div class="thumbinner" style="width:222px;"><a href="/wiki/File:Foobar.jpg" class="image"><img alt="" src="http://example.com/images/thumb/3/3a/Foobar.jpg/220px-Foobar.jpg" decoding="async" width="220" height="25" class="thumbimage" srcset="http://example.com/images/thumb/3/3a/Foobar.jpg/330px-Foobar.jpg 1.5x, http://example.com/images/thumb/3/3a/Foobar.jpg/440px-Foobar.jpg 2x" /></a> <div class="thumbcaption"><div class="magnify"><a href="/wiki/File:Foobar.jpg" class="internal" title="Enlarge"></a></div>caption</div></div></div>
16213 <div class="thumb tright"><div class="thumbinner" style="width:222px;"><a href="/wiki/File:Foobar.jpg" class="image"><img alt="" src="http://example.com/images/thumb/3/3a/Foobar.jpg/220px-Foobar.jpg" decoding="async" width="220" height="25" class="thumbimage" srcset="http://example.com/images/thumb/3/3a/Foobar.jpg/330px-Foobar.jpg 1.5x, http://example.com/images/thumb/3/3a/Foobar.jpg/440px-Foobar.jpg 2x" /></a> <div class="thumbcaption"><div class="magnify"><a href="/wiki/File:Foobar.jpg" class="internal" title="Enlarge"></a></div>caption</div></div></div>
16214 <div class="thumb tleft"><div class="thumbinner" style="width:222px;"><a href="/wiki/File:Foobar.jpg" class="image"><img alt="" src="http://example.com/images/thumb/3/3a/Foobar.jpg/220px-Foobar.jpg" decoding="async" width="220" height="25" class="thumbimage" srcset="http://example.com/images/thumb/3/3a/Foobar.jpg/330px-Foobar.jpg 1.5x, http://example.com/images/thumb/3/3a/Foobar.jpg/440px-Foobar.jpg 2x" /></a> <div class="thumbcaption"><div class="magnify"><a href="/wiki/File:Foobar.jpg" class="internal" title="Enlarge"></a></div>caption</div></div></div>
16217 <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>
16218 <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>
16219 <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>
16225 #REDIRECT [[File:Barfoo.jpg]]
16228 # FIXME: Parsoid should run this test -- but we'd need to teach the
16229 # mockAPI about the redirected Barfoo.jpg image.
16233 [[Image:Barfoo.jpg]]
16235 <p><a href="/wiki/File:Barfoo.jpg" class="mw-redirect" title="File:Barfoo.jpg">File:Barfoo.jpg</a>
16240 Missing image with uploads disabled
16244 [[File:Foobaz.jpg]]
16246 <p><a href="/wiki/File:Foobaz.jpg" title="File:Foobaz.jpg">File:Foobaz.jpg</a>
16249 <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>
16252 # Parsoid-specific testing for images
16253 # https://www.mediawiki.org/wiki/Parsoid/MediaWiki_DOM_spec#Images
16254 # Currently imperfect due to a flaw in the Parsoid testrunner
16256 # THESE TESTS SHOULD BE MOVED UP and merged with the php-specific
16260 Parsoid-specific image handling - simple image with size and middle alignment
16262 [[File:Foobar.jpg|middle|50px]]
16264 <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>
16268 Parsoid-specific image handling - simple image with size, middle alignment, non-standard namespace alias
16270 parsoid=wt2wt,wt2html,html2html
16272 [[Image:Foobar.jpg|middle|50px]]
16274 <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>
16278 Parsoid-specific image handling - simple image with size and middle alignment (existing content)
16280 [[File:Foobar.jpg|50px|middle]]
16282 <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>
16286 Parsoid-specific image handling - simple image with size and middle alignment and non-standard namespace name
16288 parsoid=wt2html,wt2wt,html2html
16290 [[Image:Foobar.jpg|50px|middle]]
16292 <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>
16296 Parsoid-specific image handling - simple image with both sizes, a baseline alignment, and a caption
16298 [[File:Foobar.jpg|500x10px|baseline|caption]]
16300 <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>
16304 Parsoid-specific image handling - simple image with border and size spec
16306 [[File:Foobar.jpg|50px|border|caption]]
16308 <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>
16312 Parsoid-specific image handling - thumbnail with halign, valign, and caption
16314 parsoid=wt2html,html2html
16316 [[File:Foobar.jpg|left|baseline|thumb|caption content]]
16318 <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>
16322 Parsoid-specific image handling - thumbnail with halign, valign, and caption (existing content)
16324 parsoid=wt2html,html2html
16326 [[File:Foobar.jpg|thumb|left|baseline|caption content]]
16328 <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>
16332 Parsoid-specific image handling - thumbnail with specific size, halign, valign, and caption
16334 parsoid=wt2html,html2html
16336 [[Image:Foobar.jpg|right|middle|thumb|50x50px|caption]]
16338 <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>
16342 Parsoid-specific image handling - thumbnail with specific size, halign, valign, and caption (existing content)
16344 parsoid=wt2html,html2html
16346 [[File:Foobar.jpg|thumb|50x50px|right|middle|caption]]
16348 <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>
16352 Parsoid-specific image handling - framed image with specific size and caption (size is ignored)
16354 parsoid=wt2html,wt2wt,html2html
16356 [[File:Foobar.jpg|frame|500x50px|caption]]
16358 <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>
16362 Parsoid-specific image handling - framed image with specific size, halign, valign, and caption (size is ignored)
16364 parsoid=wt2html,html2html
16366 [[File:Foobar.jpg|left|baseline|frame|500x50px|caption]]
16368 <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>
16372 Parsoid-specific image handling - frameless image with specific size, border, and caption
16374 [[File:Foobar.jpg|frameless|442x50px|border|caption]]
16376 <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>
16380 Parsoid-specific image handling - simple image with a formatted caption
16382 [[File:Foobar.jpg|<table><tr><td>a</td><td>b</td></tr><tr><td>c</td></tr></table>]]
16384 <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>
16388 Parsoid-specific image handling - caption with a template in it
16390 [[File:Foobar.jpg|thumb|200x23px|This caption has a {{echo|transclusion}} in it.]]
16392 <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>
16396 Parsoid-specific image handling - caption with unbalanced tags in it
16398 parsoid=wt2html,wt2wt,html2html
16401 [[File:Foobar.jpg|thumb|200x200px|This caption has a <center>unbalanced tag in it.]]
16405 <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>
16410 Parsoid-specific image handling - empty caption (1)
16412 parsoid=wt2html,wt2wt
16414 [[File:Foobar.jpg|thumb|]]
16416 <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>
16419 # empty captions don't get serialized unless we're in the "round trip" case
16421 Parsoid-specific image handling - empty caption (2)
16425 <figure class="mw-default-size" typeof="mw:Image/Thumb">
16426 <a href="./File:Foobar.jpg">
16427 <img resource="./File:Foobar.jpg"
16428 src="//example.com/images/3/3a/Foobar.jpg"
16429 data-file-width="1941" data-file-height="220" data-file-type="bitmap"
16430 height="25" width="220"/>
16432 <figcaption></figcaption>
16435 [[File:Foobar.jpg|thumb]]
16439 Parsoid-specific image handling - whitespace caption
16441 [[File:Foobar.jpg|thumb| ]]
16443 <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>
16447 Parsoid-specific image handling - lang option
16450 [[File:Foobar.svg|lang=de|caption]]
16454 <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>
16458 ## Edge case bugs in Parsoid from T93580
16460 T93580: 1. Templated <ref> inside block images
16462 [[File:Foobar.jpg|thumb|Caption with templated ref: {{echo|<ref>foo</ref>}}]]
16466 <figure class="mw-default-size" typeof="mw:Image/Thumb" data-parsoid='{"optList":[{"ck":"thumbnail","ak":"thumb"},{"ck":"caption","ak":"Caption with templated ref: {{echo|<ref>foo</ref>}}"}]}'><a href="./File:Foobar.jpg" data-parsoid='{"a":{"href":"./File:Foobar.jpg"},"sa":{}}'><img resource="./File:Foobar.jpg" src="//example.com/images/thumb/3/3a/Foobar.jpg/220px-Foobar.jpg" data-file-width="1941" data-file-height="220" data-file-type="bitmap" height="25" width="220" data-parsoid='{"a":{"resource":"./File:Foobar.jpg","height":"25","width":"220"},"sa":{"resource":"File:Foobar.jpg"}}'/></a><figcaption>Caption with templated ref: <sup about="#mwt5" class="mw-ref" id="cite_ref-1" rel="dc:references" typeof="mw:Transclusion mw:Extension/ref" data-mw='{"parts":[{"template":{"target":{"wt":"echo","href":"./Template:Echo"},"params":{"1":{"wt":"<ref>foo</ref>"}},"i":0}}]}'><a href="./Parser_test#cite_note-1" style="counter-reset: mw-Ref 1;"><span class="mw-reflink-text">[1]</span></a></sup></figcaption></figure>
16468 <ol class="mw-references references" typeof="mw:Extension/references" about="#mwt6" data-mw='{"name":"references","attrs":{}}'><li about="#cite_note-1" id="cite_note-1"><a href="./Parser_test#cite_ref-1" rel="mw:referencedBy"><span class="mw-linkback-text">↑ </span></a> <span id="mw-reference-text-cite_note-1" class="mw-reference-text" data-parsoid="{}">foo</span></li></ol>
16472 T93580: 2. <ref> inside inline images
16474 [[File:Foobar.jpg|Undisplayed caption in inline image with ref: <ref>foo</ref>]]
16478 <p><figure-inline class="mw-default-size" typeof="mw:Image" data-parsoid='{"optList":[{"ck":"caption","ak":"Undisplayed caption in inline image with ref: <ref>foo</ref>"}]}' data-mw='{"caption":"Undisplayed caption in inline image with ref: <sup about=\"#mwt2\" class=\"mw-ref\" id=\"cite_ref-1\" rel=\"dc:references\" typeof=\"mw:Extension/ref\" data-parsoid='{\"dsr\":[64,78,5,6]}' data-mw='{\"name\":\"ref\",\"attrs\":{},\"body\":{\"id\":\"mw-reference-text-cite_note-1\"}}'><a href=\"./Parser_test#cite_note-1\" style=\"counter-reset: mw-Ref 1;\" data-parsoid=\"{}\"><span class=\"mw-reflink-text\" data-parsoid=\"{}\">[1]</span></a></sup>"}'><a href="./File:Foobar.jpg" data-parsoid='{"a":{"href":"./File:Foobar.jpg"},"sa":{"href":"File:Foobar.jpg"}}'><img resource="./File:Foobar.jpg" src="//example.com/images/3/3a/Foobar.jpg" data-file-width="1941" data-file-height="220" data-file-type="bitmap" height="220" width="1941" data-parsoid='{"a":{"resource":"./File:Foobar.jpg","height":"220","width":"1941"},"sa":{"resource":"File:Foobar.jpg"}}'/></a></figure-inline></p>
16480 <ol class="mw-references references" typeof="mw:Extension/references" about="#mwt4" data-mw='{"name":"references","attrs":{}}'><li about="#cite_note-1" id="cite_note-1"><a href="./Parser_test#cite_ref-1" rel="mw:referencedBy"><span class="mw-linkback-text">↑ </span></a> <span id="mw-reference-text-cite_note-1" class="mw-reference-text">foo</span></li></ol>
16484 T93580: 3. Templated <ref> inside inline images
16486 [[File:Foobar.jpg|Undisplayed caption in inline image with ref: {{echo|<ref>{{echo|foo}}</ref>}}]]
16490 <p><figure-inline class="mw-default-size" typeof="mw:Image" data-parsoid='{"optList":[{"ck":"caption","ak":"Undisplayed caption in inline image with ref: {{echo|<ref>{{echo|foo}}</ref>}}"}]}' data-mw='{"caption":"Undisplayed caption in inline image with ref: <sup about=\"#mwt2\" class=\"mw-ref\" id=\"cite_ref-1\" rel=\"dc:references\" typeof=\"mw:Transclusion mw:Extension/ref\" data-parsoid='{\"dsr\":[64,96,null,null],\"pi\":[[{\"k\":\"1\"}]]}' data-mw='{\"parts\":[{\"template\":{\"target\":{\"wt\":\"echo\",\"href\":\"./Template:Echo\"},\"params\":{\"1\":{\"wt\":\"&lt;ref>{{echo|foo}}&lt;/ref>\"}},\"i\":0}}]}'><a href=\"./Parser_test#cite_note-1\" style=\"counter-reset: mw-Ref 1;\" data-parsoid=\"{}\"><span class=\"mw-reflink-text\" data-parsoid=\"{}\">[1]</span></a></sup>"}'><a href="./File:Foobar.jpg" data-parsoid='{"a":{"href":"./File:Foobar.jpg"},"sa":{"href":"File:Foobar.jpg"}}'><img resource="./File:Foobar.jpg" src="//example.com/images/3/3a/Foobar.jpg" data-file-width="1941" data-file-height="220" data-file-type="bitmap" height="220" width="1941" data-parsoid='{"a":{"resource":"./File:Foobar.jpg","height":"220","width":"1941"},"sa":{"resource":"File:Foobar.jpg"}}'/></a></figure-inline></p>
16492 <ol class="mw-references references" typeof="mw:Extension/references" about="#mwt6" data-mw='{"name":"references","attrs":{}}'><li about="#cite_note-1" id="cite_note-1"><a href="./Parser_test#cite_ref-1" rel="mw:referencedBy"><span class="mw-linkback-text">↑ </span></a> <span id="mw-reference-text-cite_note-1" class="mw-reference-text">foo</span></li></ol>
16499 Subpage test/subpage
16507 subpage title=[[Subpage test]]
16511 <p><a href="/wiki/Subpage_test/subpage" title="Subpage test/subpage">/subpage</a>
16516 Subpage noslash link
16518 subpage title=[[Subpage test]]
16522 <p><a href="/wiki/Subpage_test/subpage" title="Subpage test/subpage">subpage</a>
16527 Subpage test/1/2/subpage
16533 Relative subpage noslash link
16535 parsoid=wt2wt,wt2html,html2html
16536 subpage title=[[Subpage test/1/2/3/4]]
16542 <p><a href="/wiki/Subpage_test/1/2/subpage" title="Subpage test/1/2/subpage">subpage</a>
16543 </p><p><a href="/wiki/Subpage_test/1/2/subpage" title="Subpage test/1/2/subpage">Subpage test/1/2/subpage</a>
16546 <p><a rel="mw:WikiLink" href="./Subpage_test/1/2/subpage" title="Subpage test/1/2/subpage">subpage</a></p>
16547 <p><a rel="mw:WikiLink" href="./Subpage_test/1/2/subpage" title="Subpage test/1/2/subpage">Subpage_test/1/2/subpage</a></p>
16551 Parsoid: dot-slash prefixed wikilinks
16561 </p><p>[[././baz/]]
16566 </p><p>[[././baz/]]
16571 Render invalid page names as plain text (T53090)
16583 [[foo[http://example.com]xyz]]
16585 [[{{echo|./../foo}}|bar]]
16586 [[{{echo|foo/.}}|bar]]
16587 [[{{echo|foo/..}}|bar]]
16588 [[{{echo|foo~~~~bar}}]]
16589 [[{{echo|foo>bar}}]]
16590 [[{{echo|foo././bar}}]]
16591 [[{{echo|foo{bar}}]]
16592 [[{{echo|foo}bar}}]]
16593 [[{{echo|foo[bar}}]]
16594 [[{{echo|foo]bar}}]]
16595 [[{{echo|foo<bar}}]]
16597 <p>[[./../foo|bar]]
16607 [[foo<a rel="nofollow" class="external autonumber" href="http://example.com">[1]</a>xyz]]
16608 </p><p>[[./../foo|bar]]
16621 <p>[[./../foo|bar]]
16631 [[foo<a rel="mw:ExtLink" class="external autonumber" href="http://example.com"></a>xyz]]</p>
16633 <p>[[<span typeof="mw:Transclusion" data-mw='{"parts":[{"template":{"target":{"wt":"echo","href":"./Template:Echo"},"params":{"1":{"wt":"./../foo"}},"i":0}}]}'>./../foo</span>|bar]]
16634 [[<span typeof="mw:Transclusion" data-mw='{"parts":[{"template":{"target":{"wt":"echo","href":"./Template:Echo"},"params":{"1":{"wt":"foo/."}},"i":0}}]}'>foo/.</span>|bar]]
16635 [[<span typeof="mw:Transclusion" data-mw='{"parts":[{"template":{"target":{"wt":"echo","href":"./Template:Echo"},"params":{"1":{"wt":"foo/.."}},"i":0}}]}'>foo/..</span>|bar]]
16636 [[<span typeof="mw:Transclusion" data-mw='{"parts":[{"template":{"target":{"wt":"echo","href":"./Template:Echo"},"params":{"1":{"wt":"foo~~~~bar"}},"i":0}}]}'>foo~~~~bar</span>]]
16637 [[<span typeof="mw:Transclusion" data-mw='{"parts":[{"template":{"target":{"wt":"echo","href":"./Template:Echo"},"params":{"1":{"wt":"foo>bar"}},"i":0}}]}'>foo>bar</span>]]
16638 [[<span typeof="mw:Transclusion" data-mw='{"parts":[{"template":{"target":{"wt":"echo","href":"./Template:Echo"},"params":{"1":{"wt":"foo././bar"}},"i":0}}]}'>foo././bar</span>]]
16639 [[<span typeof="mw:Transclusion" data-mw='{"parts":[{"template":{"target":{"wt":"echo","href":"./Template:Echo"},"params":{"1":{"wt":"foo{bar"}},"i":0}}]}'>foo{bar</span>]]
16640 [[<span typeof="mw:Transclusion" data-mw='{"parts":[{"template":{"target":{"wt":"echo","href":"./Template:Echo"},"params":{"1":{"wt":"foo}bar"}},"i":0}}]}'>foo}bar</span>]]
16641 [[<span typeof="mw:Transclusion" data-mw='{"parts":[{"template":{"target":{"wt":"echo","href":"./Template:Echo"},"params":{"1":{"wt":"foo[bar"}},"i":0}}]}'>foo[bar</span>]]
16642 [[<span typeof="mw:Transclusion" data-mw='{"parts":[{"template":{"target":{"wt":"echo","href":"./Template:Echo"},"params":{"1":{"wt":"foo]bar"}},"i":0}}]}'>foo]bar</span>]]
16643 [[<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>
16651 <p><a href="/index.php?title=/subpage&action=edit&redlink=1" class="new" title="/subpage (page does not exist)">/subpage</a>
16656 T2561: {{/Subpage}}
16658 subpage title=[[Page]]
16662 <p><a href="/index.php?title=Page/Subpage&action=edit&redlink=1" class="new" title="Page/Subpage (page does not exist)">Page/Subpage</a>
16670 Category:MediaWiki User's Guide
16678 [[:Category:MediaWiki User's Guide]]
16680 <p><a href="/wiki/Category:MediaWiki_User%27s_Guide" title="Category:MediaWiki User's Guide">Category:MediaWiki User's Guide</a>
16689 [[Category:MediaWiki User's Guide]]
16691 cat=MediaWiki_User's_Guide sort=
16693 <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"}}'/>
16697 PAGESINCATEGORY invalid title fatal (r33546 fix)
16699 {{PAGESINCATEGORY:<bogus>}}
16706 Category with different sort key
16710 [[Category:MediaWiki User's Guide|Foo]]
16712 cat=MediaWiki_User's_Guide sort=Foo
16714 <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"}}'/>
16718 Category with identical sort key
16722 [[Category:MediaWiki User's Guide|MediaWiki User's Guide]]
16724 cat=MediaWiki_User's_Guide sort=MediaWiki User's Guide
16726 <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"}}'/>
16730 Category with empty sort key
16735 [[Category:MediaWiki User's Guide|]]
16737 [[Category:MediaWiki User's Guide|MediaWiki User's Guide]]
16741 Category with empty sort key and parentheses
16746 [[Category:Foo (bar)|]]
16748 [[Category:Foo (bar)|Foo]]
16752 Category with link tail
16757 123[[Category:Foo]]456
16759 123[[Category:Foo]]456
16763 Category with template
16768 [[Category:{{echo|Foo}}]]
16770 [[Category:{{echo|Foo}}]]
16774 Category with template in sort key
16779 [[Category:Foo|{{echo|Bar}}]]
16781 [[Category:Foo|{{echo|Bar}}]]
16785 Category with template in sort key and title
16790 [[Category:{{echo|Foo}}|{{echo|Bar}}]]
16792 [[Category:{{echo|Foo}}|{{echo|Bar}}]]
16795 ## We used to, but no longer wt2wt this test since the default serializer
16796 ## will normalize all categories to serialize on their own line.
16797 ## This wikitext usage is going to be fairly uncommon in production and
16798 ## selser will take care of preserving formatting in those scenarios.
16800 Category / paragraph interactions
16804 Foo [[Category:Baz]] Bar
16806 Foo [[Category:Baz]]
16814 [[Category:Baz]] Bar
16827 {{echo|[[Category:Baz]]}}
16840 <p>Foo <link rel="mw:PageProp/Category" href="./Category:Baz"/> Bar</p>
16841 <p>Foo <link rel="mw:PageProp/Category" href="./Category:Baz"/> Bar</p>
16842 <p>Foo <link rel="mw:PageProp/Category" href="./Category:Baz"/> Bar</p>
16843 <p>Foo <link rel="mw:PageProp/Category" href="./Category:Baz"/> Bar</p>
16844 <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>
16845 <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}}]}'/>
16846 <link rel="mw:PageProp/Category" href="./Category:Baz"/>
16849 ## We used to, but no longer wt2wt this test since the default serializer
16850 ## will normalize all categories to serialize on their own line.
16851 ## This wikitext usage is going to be fairly uncommon in production and
16852 ## selser will take care of preserving formatting in those scenarios.
16854 ## The whitespace on the empty line is part of the test. Please do not delete
16856 1. Categories and newlines: All preceding newlines should be suppressed (courtesy T2087)
16862 [[Category:Foo]] and this should be part of same paragraph (not an indent-pre)
16864 {{echo|[[Category:Foo]] and so should this!}}
16866 <p>This and this should be part of same paragraph (not an indent-pre) and so should this!
16871 <link rel="mw:PageProp/Category" href="./Category:Foo"/> and this should be part of same paragraph (not an indent-pre)
16873 <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>
16876 ## Parsoid will not try to wt2wt this while preserving newlines because
16877 ## it suppresses excess newlines within list items -- and we don't want to
16878 ## introduce a special case just for categories, which is, in reality somewhat
16879 ## odd behavior -- categories are unlikely to be used in list items like this
16880 ## in top-level pages and are only likely to show up in template-generated
16881 ## list items where this RT-ing is a non-issue.
16883 ## The whitespace on the empty line is part of the test. Please do not delete
16885 2. Categories and newlines: All preceding newlines should be suppressed (courtesy T2087)
16891 [[Category:Foo]] and this should be part of the same list item
16894 {{echo|[[Category:Foo]] and this should be part of the same list item}}
16896 <ul><li>This and this should be part of the same list item</li>
16897 <li>So should this and this should be part of the same list item</li></ul>
16900 <li>This <link rel="mw:PageProp/Category" href="./Category:Foo"/> and this should be part of the same list item</li>
16901 <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>
16905 ## Newlines and categories that follow the last item of a list
16906 ## are treated differently because this (list followed by categories)
16907 ## is an extremely common pattern on wikis.
16909 3. Categories and newlines: newline suppression for last list item should RT properly
16930 <link rel="mw:PageProp/Category" href="./Category:Foo"/>
16932 <link rel="mw:PageProp/Category" href="./Category:Bar"/>
16933 <link rel="mw:PageProp/Category" href="./Category:Baz"/>
16935 <dl><dd>c</dd></dl>
16937 <link rel="mw:PageProp/Category" href="./Category:C"/>
16939 <dl><dt>d</dt></dl>
16941 <link rel="mw:PageProp/Category" href="./Category:D"/>
16945 4. Categories and newlines: newline suppression for last list item should RT properly
16953 <ul><li><ul><li><ul><li>b</li></ul></li></ul></li></ul></li></ul>
16955 <link rel="mw:PageProp/Category" href="./Category:Foo" data-parsoid='{"stx":"simple","a":{"href":"./Category:Foo"},"sa":{"href":"Category:Foo"}}'/>
16958 ## only wt2html for this to make sure the algo only applies to the rightmost path
16960 5. Categories and newlines: migrateTrailingCategories dom pass should only run on the rightmost path of nested lists
16973 <link rel="mw:PageProp/Category" href="./Category:Foo" data-parsoid='{"stx":"simple","a":{"href":"./Category:Foo"},"sa":{"href":"Category:Foo"}}'/></li></ul></li>
16975 <ul><li>d</li></ul></li></ul>
16976 <link rel="mw:PageProp/Category" href="./Category:Foo" data-parsoid='{"stx":"simple","a":{"href":"./Category:Foo"},"sa":{"href":"Category:Foo"}}'/>
16979 ## We used to, but no longer wt2wt this test since the default serializer
16980 ## will normalize all categories to serialize on their own line.
16981 ## This wikitext usage is going to be fairly uncommon in production and
16982 ## selser will take care of preserving formatting in those scenarios.
16984 6. Categories and newlines: migrateTrailingCategories dom pass should not migrate categories not preceded by newlines
16988 *a [[Category:Foo]]
16990 <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>
16993 # This test also demonstrates because of newline+category tunneling
16994 # through the list hander, template wrapping doesn't expand to the
16995 # containing list when the list item swallows the category.
16997 7. Categories and newlines: migrateTrailingCategories dom pass should leave template content alone
17002 <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
17003 </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>
17007 8. Categories and newlines: migrateTrailingCategories dom pass should not get tripped by intervening templates
17011 {{echo|[[Category:Foo]]
17015 <ul><li>a</li></ul>
17017 <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">
17018 </span><link rel="mw:PageProp/Category" href="./Category:Bar" about="#mwt1" data-parsoid='{"stx":"simple","a":{"href":"./Category:Bar"},"sa":{"href":"Category:Bar"}}'/>
17019 <link rel="mw:PageProp/Category" href="./Category:Baz" data-parsoid='{"stx":"simple","a":{"href":"./Category:Baz"},"sa":{"href":"Category:Baz"}}'/>
17023 Categories and newlines: migrateTrailingCategories dom pass should not get tripped by comments and whitespace
17027 [[Category:Bar]]<!--boo1--> <!--boo2-->
17028 [[Category:Baz]]<!--boo3--> <!--boo4-->
17030 <ul><li>a</li></ul>
17032 <link rel="mw:PageProp/Category" href="./Category:Bar"/><!--boo1--> <!--boo2-->
17033 <link rel="mw:PageProp/Category" href="./Category:Baz"/><!--boo3--> <!--boo4-->
17037 Categories and newlines: should behave properly with linkprefix (T87753)
17052 <link rel="mw:PageProp/Category" href="./تصنيف:Foo"/>
17053 <link rel="mw:PageProp/Category" href="./تصنيف:Bar"/>
17057 No regressions on internal links following category (T174639)
17059 parsoid=wt2html,html2html
17061 [[Category:Foo]]<div>a
17066 <a href="/wiki/Foo" title="Foo">Foo</a></div>
17069 <link rel="mw:PageProp/Category" href="./Category:Foo"/><div>a
17071 <a rel="mw:WikiLink" href="./Foo" title="Foo">Foo</a></div>
17074 # Note that Parsoid differs slightly from PHP due to T175421
17076 11. Special case where only newlines separate links (T175416)
17078 parsoid=wt2html,html2html
17082 [[Foo]][[es:Alimento]]
17087 <a href="/wiki/Foo" title="Foo">Foo</a>
17088 </p><p><a href="/wiki/Foo" title="Foo">Foo</a>
17091 <link rel="mw:PageProp/Category" href="./Category:Foo"/>
17093 <p><a rel="mw:WikiLink" href="./Foo" title="Foo">Foo</a></p><link rel="mw:PageProp/Language" href="http://es.wikipedia.org/wiki/Alimento"/>
17095 <p><a rel="mw:WikiLink" href="./Foo" title="Foo">Foo</a></p>
17099 Category links with multiple namespaces
17101 [[Category:Project:Foo]]
17103 <link rel="mw:PageProp/Category" href="./Category:Project:Foo" />
17107 Parsoid: Serialize link to category page with colon escape
17111 [[:Category:Foo|Bar]]
17113 <p><a href="/index.php?title=Category:Foo&action=edit&redlink=1" class="new" title="Category:Foo (page does not exist)">Category:Foo</a>
17114 <a href="/index.php?title=Category:Foo&action=edit&redlink=1" class="new" title="Category:Foo (page does not exist)">Bar</a>
17118 <a rel="mw:WikiLink" href="./Category:Foo" title="Category:Foo">Category:Foo</a>
17119 <a rel="mw:WikiLink" href="./Category:Foo" title="Category:Foo">Bar</a>
17123 # We used to, but no longer wt2wt this test since the default serializer
17124 # will normalize all categories to serialize on their own line.
17125 # This wikitext usage is going to be fairly uncommon in production and
17126 # selser will take care of preventing whitespace insertion if this
17127 # occurs in an article.
17129 # html2html disabled for the same reason (whitespace insertion between
17132 # html2wt disabled because it localizes the "Category" namespace.
17134 Link prefix/suffixes aren't applied to category links
17144 <p>x<link rel="mw:PageProp/Category" href="./Flokkur:Foo" data-parsoid=""/>y</p>
17148 Link prefix/suffixes aren't applied to language links
17158 <p>x<link rel="mw:PageProp/Language" href="http://es.wikipedia.org/wiki/Foo" data-parsoid=""/>y</p>
17162 Parsoid: Serialize link to file page with colon escape
17166 [[:File:Foo.png|Bar]]
17168 <p><a href="/index.php?title=File:Foo.png&action=edit&redlink=1" class="new" title="File:Foo.png (page does not exist)">File:Foo.png</a>
17169 <a href="/index.php?title=File:Foo.png&action=edit&redlink=1" class="new" title="File:Foo.png (page does not exist)">Bar</a>
17173 <a rel="mw:WikiLink" href="./File:Foo.png" title="File:Foo.png">File:Foo.png</a>
17174 <a rel="mw:WikiLink" href="./File:Foo.png" title="File:Foo.png">Bar</a>
17179 Parsoid: Serialize a genuine category link without colon escape
17182 [[Category:Foo|Bar]]
17185 <link rel="mw:PageProp/Category" href="./Category:Foo">
17186 <link rel="mw:PageProp/Category" href="./Category:Foo#Bar">
17190 Normalize hrefs properly before testing for invalid link targets (T72894)
17194 <link rel="mw:PageProp/Category" href="./Category:Toxine_bactérienne"/>
17196 [[Category:Toxine bactérienne]]
17200 Parsoid: Defaultsort
17202 {{DEFAULTSORT:Foo}}
17204 <meta property="mw:PageProp/categorydefaultsort" content="Foo"/>
17207 # NOTE: mw:ExpandedAttrs is not the best typeof here. mw:Transclusion is better.
17208 # But, this is a limitation of our representation and is documented in
17209 # TemplateHandler.js in processSpecialMagicWord
17211 Parsoid: Defaultsort (template-generated)
17213 {{{{echo|DEFAULTSORT}}:Foo}}
17215 <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"}]]}'/>
17219 ### Inter-language links
17222 Interlanguage links
17230 es:Alimento fr:Nourriture zh:食品
17232 <link rel="mw:PageProp/Language" href="http://es.wikipedia.org/wiki/Alimento"/>
17233 <link rel="mw:PageProp/Language" href="http://fr.wikipedia.org/wiki/Nourriture"/>
17234 <link rel="mw:PageProp/Language" href="http://zh.wikipedia.org/wiki/食品"/>
17238 Duplicate interlanguage links (T26502)
17249 <link rel="mw:PageProp/Language" href="http://es.wikipedia.org/wiki/1"/>
17250 <link rel="mw:PageProp/Language" href="http://es.wikipedia.org/wiki/2"/>
17251 <link rel="mw:PageProp/Language" href="http://fr.wikipedia.org/wiki/1"/>
17252 <link rel="mw:PageProp/Language" href="http://fr.wikipedia.org/wiki/2"/>
17259 Basic section headings
17266 ===Smaller headline===
17269 <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>
17272 <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>
17275 <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>
17281 Section headings with TOC
17284 ===Subheadline 1===
17285 =====Skipping a level=====
17286 ======Skipping a level======
17290 ===Another headline===
17292 <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>
17294 <li class="toclevel-1 tocsection-1"><a href="#Headline_1"><span class="tocnumber">1</span> <span class="toctext">Headline 1</span></a>
17296 <li class="toclevel-2 tocsection-2"><a href="#Subheadline_1"><span class="tocnumber">1.1</span> <span class="toctext">Subheadline 1</span></a>
17298 <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>
17300 <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>
17307 <li class="toclevel-1 tocsection-5"><a href="#Headline_2"><span class="tocnumber">2</span> <span class="toctext">Headline 2</span></a>
17309 <li class="toclevel-2 tocsection-6"><a href="#Another_headline"><span class="tocnumber">2.1</span> <span class="toctext">Another headline</span></a></li>
17315 <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>
17316 <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>
17317 <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>
17318 <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>
17319 <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>
17322 <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>
17327 TOC anchors don't collide
17335 <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>
17337 <li class="toclevel-1 tocsection-1"><a href="#Headline_2"><span class="tocnumber">1</span> <span class="toctext">Headline 2</span></a></li>
17338 <li class="toclevel-1 tocsection-2"><a href="#Headline"><span class="tocnumber">2</span> <span class="toctext">Headline</span></a></li>
17339 <li class="toclevel-1 tocsection-3"><a href="#Headline_2_2"><span class="tocnumber">3</span> <span class="toctext">Headline 2</span></a></li>
17340 <li class="toclevel-1 tocsection-4"><a href="#Headline_3"><span class="tocnumber">4</span> <span class="toctext">Headline</span></a></li>
17344 <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>
17345 <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>
17346 <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>
17347 <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>
17351 # perl -e 'print "="x$_," Level $_ heading","="x$_,"\n" for 1..10'
17352 # Parsoid html2wt direction adds <nowiki> for level 7 and up.
17354 Handling of sections up to level 6 and beyond
17359 ==Level 2 Heading==
17360 ===Level 3 Heading===
17361 ====Level 4 Heading====
17362 =====Level 5 Heading=====
17363 ======Level 6 Heading======
17364 =======Level 7 Heading=======
17365 ========Level 8 Heading========
17366 =========Level 9 Heading=========
17367 ==========Level 10 Heading==========
17369 <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>
17371 <li class="toclevel-1 tocsection-1"><a href="#Level_1_Heading"><span class="tocnumber">1</span> <span class="toctext">Level 1 Heading</span></a>
17373 <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>
17375 <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>
17377 <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>
17379 <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>
17381 <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>
17382 <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>
17383 <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>
17384 <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>
17385 <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>
17399 <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>
17400 <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>
17401 <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>
17402 <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>
17403 <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>
17404 <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>
17405 <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>
17406 <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>
17407 <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>
17408 <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>
17411 <h1 id="Level_1_Heading" data-parsoid='{}'>Level 1 Heading</h1>
17412 <h2 id="Level_2_Heading" data-parsoid='{}'>Level 2 Heading</h2>
17413 <h3 id="Level_3_Heading" data-parsoid='{}'>Level 3 Heading</h3>
17414 <h4 id="Level_4_Heading" data-parsoid='{}'>Level 4 Heading</h4>
17415 <h5 id="Level_5_Heading" data-parsoid='{}'>Level 5 Heading</h5>
17416 <h6 id="Level_6_Heading" data-parsoid='{}'>Level 6 Heading</h6>
17417 <h6 id="=Level_7_Heading=" data-parsoid='{}'><span id=".3DLevel_7_Heading.3D" typeof="mw:FallbackId"></span>=Level 7 Heading=</h6>
17418 <h6 id="==Level_8_Heading==" data-parsoid='{}'><span id=".3D.3DLevel_8_Heading.3D.3D" typeof="mw:FallbackId"></span>==Level 8 Heading==</h6>
17419 <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>
17420 <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>
17424 TOC regression (T11764)
17428 ====title 1.1.1====
17433 <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>
17435 <li class="toclevel-1 tocsection-1"><a href="#title_1"><span class="tocnumber">1</span> <span class="toctext">title 1</span></a>
17437 <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>
17439 <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>
17442 <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>
17445 <li class="toclevel-1 tocsection-5"><a href="#title_2"><span class="tocnumber">2</span> <span class="toctext">title 2</span></a>
17447 <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>
17453 <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>
17454 <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>
17455 <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>
17456 <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>
17457 <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>
17458 <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>
17463 TOC for heading containing <span id="..."></span> (T96153)
17466 ==<span id="old-anchor"></span>New title==
17468 <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>
17470 <li class="toclevel-1 tocsection-1"><a href="#New_title"><span class="tocnumber">1</span> <span class="toctext">New title</span></a></li>
17474 <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>
17479 TOC with wgMaxTocLevel=3 (T8204)
17485 ====title 1.1.1====
17490 <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>
17492 <li class="toclevel-1 tocsection-1"><a href="#title_1"><span class="tocnumber">1</span> <span class="toctext">title 1</span></a>
17494 <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>
17495 <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>
17498 <li class="toclevel-1 tocsection-5"><a href="#title_2"><span class="tocnumber">2</span> <span class="toctext">title 2</span></a>
17500 <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>
17506 <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>
17507 <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>
17508 <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>
17509 <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>
17510 <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>
17511 <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>
17516 TOC with wgMaxTocLevel=3 and two level four headings (T8204)
17522 ====Section 1.1.1====
17523 ====Section 1.1.1.1====
17526 <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>
17528 <li class="toclevel-1 tocsection-1"><a href="#Section_1"><span class="tocnumber">1</span> <span class="toctext">Section 1</span></a>
17530 <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>
17533 <li class="toclevel-1 tocsection-5"><a href="#Section_2"><span class="tocnumber">2</span> <span class="toctext">Section 2</span></a></li>
17537 <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>
17538 <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>
17539 <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>
17540 <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>
17541 <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>
17547 Resolving duplicate section names
17552 <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>
17553 <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>
17558 Resolving duplicate section names with differing case (T12721)
17563 <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>
17564 <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>
17576 Template with sections, __NOTOC__
17583 <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>
17584 <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>
17585 <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>
17586 <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>
17591 __NOEDITSECTION__ keyword
17597 <h2><span class="mw-headline" id="Section_1">Section 1</span></h2>
17598 <h2><span class="mw-headline" id="Section_2">Section 2</span></h2>
17603 Link inside a section heading
17605 ==Section with a [[Main Page|link]] in it==
17607 <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>
17612 TOC regression (T14077)
17619 <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>
17621 <li class="toclevel-1 tocsection-1"><a href="#title_1"><span class="tocnumber">1</span> <span class="toctext">title 1</span></a>
17623 <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>
17626 <li class="toclevel-1 tocsection-3"><a href="#title_2"><span class="tocnumber">2</span> <span class="toctext">title 2</span></a></li>
17630 <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>
17631 <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>
17632 <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>
17637 T3219 URL next to image (good)
17639 http://example.com [[File:Foobar.jpg]]
17641 <p><a rel="nofollow" class="external free" href="http://example.com">http://example.com</a> <a href="/wiki/File:Foobar.jpg" class="image"><img alt="Foobar.jpg" src="http://example.com/images/3/3a/Foobar.jpg" decoding="async" width="1941" height="220" /></a>
17644 <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>
17647 # Parsoid doesn't wt2wt this cleanly because it adds <nowiki>s.
17649 Short headings with trailing space should match behavior of Parser::doHeadings (T21910)
17651 parsoid=wt2html,html2html
17654 The line above must have a trailing space!
17657 But just in case it doesn't...
17659 <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>
17660 <p>The line above must have a trailing space!
17662 <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>
17663 <p>But just in case it doesn't...
17666 <h1 id="="><span id=".3D" typeof="mw:FallbackId"></span>=</h1>
17667 <p>The line above must have a trailing space!</p>
17668 <h1 id="=_2"><span id=".3D_2" typeof="mw:FallbackId"></span>=</h1> <!--
17670 <p>But just in case it doesn't...</p>
17674 Header with special characters (T27462)
17676 The tooltips shall not show entities to the user (ie. be double escaped)
17693 <p>The tooltips shall not show entities to the user (ie. be double escaped)
17695 <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>
17697 <li class="toclevel-1 tocsection-1"><a href="#text_.3E_text"><span class="tocnumber">1</span> <span class="toctext">text > text</span></a></li>
17698 <li class="toclevel-1 tocsection-2"><a href="#text_.3C_text"><span class="tocnumber">2</span> <span class="toctext">text < text</span></a></li>
17699 <li class="toclevel-1 tocsection-3"><a href="#text_.26_text"><span class="tocnumber">3</span> <span class="toctext">text & text</span></a></li>
17700 <li class="toclevel-1 tocsection-4"><a href="#text_.27_text"><span class="tocnumber">4</span> <span class="toctext">text ' text</span></a></li>
17701 <li class="toclevel-1 tocsection-5"><a href="#text_.22_text"><span class="tocnumber">5</span> <span class="toctext">text " text</span></a></li>
17705 <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>
17708 <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>
17711 <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>
17714 <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>
17717 <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>
17721 <p>The tooltips shall not show entities to the user (ie. be double escaped)</p>
17723 <h2 id="text_>_text"><span id="text_.3E_text" typeof="mw:FallbackId"></span>text > text</h2>
17726 <h2 id="text_<_text"><span id="text_.3C_text" typeof="mw:FallbackId"></span>text < text</h2>
17729 <h2 id="text_&_text"><span id="text_.26_text" typeof="mw:FallbackId"></span>text & text</h2>
17732 <h2 id="text_'_text"><span id="text_.27_text" typeof="mw:FallbackId"></span>text ' text</h2>
17735 <h2 id='text_"_text'><span id="text_.22_text" typeof="mw:FallbackId"></span>text " text</h2>
17740 Header with space, plus and underscore as entity
17742 Id should not contain + for spaces
17744 ==Space between Text==
17747 ==Space-Entity between Text==
17750 ==Plus+between+Text==
17753 ==Plus-Entity+between+Text==
17756 ==Underscore_between_Text==
17759 ==Underscore-Entity_between_Text==
17762 [[#Space between Text]]
17763 [[#Space-Entity between Text]]
17764 [[#Plus+between+Text]]
17765 [[#Plus-Entity+between+Text]]
17766 [[#Underscore_between_Text]]
17767 [[#Underscore-Entity_between_Text]]
17769 <p>Id should not contain + for spaces
17771 <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>
17773 <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>
17774 <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>
17775 <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>
17776 <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>
17777 <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>
17778 <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>
17782 <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>
17785 <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>
17788 <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>
17791 <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>
17794 <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>
17797 <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>
17799 </p><p><a href="#Space_between_Text">#Space between Text</a>
17800 <a href="#Space-Entity_between_Text">#Space-Entity between Text</a>
17801 <a href="#Plus.2Bbetween.2BText">#Plus+between+Text</a>
17802 <a href="#Plus-Entity.2Bbetween.2BText">#Plus-Entity+between+Text</a>
17803 <a href="#Underscore_between_Text">#Underscore_between_Text</a>
17804 <a href="#Underscore-Entity_between_Text">#Underscore-Entity_between_Text</a>
17807 <p>Id should not contain + for spaces</p>
17809 <h2 id="Space_between_Text">Space between Text</h2>
17812 <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>
17815 <h2 id="Plus+between+Text"><span id="Plus.2Bbetween.2BText" typeof="mw:FallbackId"></span>Plus+between+Text</h2>
17818 <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>
17821 <h2 id="Underscore_between_Text">Underscore_between_Text</h2>
17824 <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>
17827 <p><a rel="mw:WikiLink" href="./Parser_test#Space_between_Text" data-parsoid='{"stx":"simple","a":{"href":"./Parser_test#Space_between_Text"},"sa":{"href":"#Space between Text"}}'>#Space between Text</a>
17828 <a rel="mw:WikiLink" href="./Parser_test#Space-Entity_between_Text" data-parsoid='{"stx":"simple","a":{"href":"./Parser_test#Space-Entity_between_Text"},"sa":{"href":"#Space-Entity&#32;between&#32;Text"}}'>#Space-Entity between Text</a>
17829 <a rel="mw:WikiLink" href="./Parser_test#Plus+between+Text" data-parsoid='{"stx":"simple","a":{"href":"./Parser_test#Plus+between+Text"},"sa":{"href":"#Plus+between+Text"}}'>#Plus+between+Text</a>
17830 <a rel="mw:WikiLink" href="./Parser_test#Plus-Entity+between+Text" data-parsoid='{"stx":"simple","a":{"href":"./Parser_test#Plus-Entity+between+Text"},"sa":{"href":"#Plus-Entity&#43;between&#43;Text"}}'>#Plus-Entity+between+Text</a>
17831 <a rel="mw:WikiLink" href="./Parser_test#Underscore_between_Text" data-parsoid='{"stx":"simple","a":{"href":"./Parser_test#Underscore_between_Text"},"sa":{"href":"#Underscore_between_Text"}}'>#Underscore_between_Text</a>
17832 <a rel="mw:WikiLink" href="./Parser_test#Underscore-Entity_between_Text" data-parsoid='{"stx":"simple","a":{"href":"./Parser_test#Underscore-Entity_between_Text"},"sa":{"href":"#Underscore-Entity&#95;between&#95;Text"}}'>#Underscore-Entity_between_Text</a></p>
17835 # Parsoid html2wt disabled because it adds padding spaces around =
17837 Headers with excess '=' characters
17838 (Are similar tests necessary beyond the 1st level?)
17840 parsoid=wt2html,wt2wt,html2html
17844 =''italic'' heading==
17845 ==''italic'' heading=
17847 <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>
17849 <li class="toclevel-1 tocsection-1"><a href="#foo.3D"><span class="tocnumber">1</span> <span class="toctext">foo=</span></a></li>
17850 <li class="toclevel-1 tocsection-2"><a href="#.3Dfoo"><span class="tocnumber">2</span> <span class="toctext">=foo</span></a></li>
17851 <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>
17852 <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>
17856 <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>
17857 <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>
17858 <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>
17859 <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>
17862 <h1 id="foo="><span id="foo.3D" typeof="mw:FallbackId"></span>foo=</h1>
17863 <h1 id="=foo"><span id=".3Dfoo" typeof="mw:FallbackId"></span>=foo</h1>
17864 <h1 id="italic_heading="><span id="italic_heading.3D" typeof="mw:FallbackId"></span><i>italic</i> heading=</h1>
17865 <h1 id="=italic_heading"><span id=".3Ditalic_heading" typeof="mw:FallbackId"></span>=<i>italic</i> heading</h1>
17869 HTML headers vs TOC (T25393)
17870 (__NOEDITSECTION__ for clearer output, doesn't matter here)
17882 <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>
17884 <li class="toclevel-1"><a href="#Header_1"><span class="tocnumber">1</span> <span class="toctext">Header 1</span></a>
17886 <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>
17887 <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>
17890 <li class="toclevel-1"><a href="#Header_2"><span class="tocnumber">2</span> <span class="toctext">Header 2</span></a>
17892 <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>
17893 <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>
17899 <h1><span class="mw-headline" id="Header_1">Header 1</span></h1>
17900 <h2><span class="mw-headline" id="Header_1.1">Header 1.1</span></h2>
17901 <h2><span class="mw-headline" id="Header_1.2">Header 1.2</span></h2>
17902 <h1><span class="mw-headline" id="Header_2">Header 2
17904 <h2><span class="mw-headline" id="Header_2.1">Header 2.1</span></h2>
17905 <h2><span class="mw-headline" id="Header_2.2">Header 2.2</span></h2>
17908 <h1 id="Header_1" data-parsoid='{"stx":"html"}'>Header 1</h1>
17909 <h2 id="Header_1.1" data-parsoid='{}'>Header 1.1</h2>
17910 <h2 id="Header_1.2" data-parsoid='{}'>Header 1.2</h2>
17912 <h1 id="Header_2" data-parsoid='{"stx":"html"}'>Header 2
17914 <h2 id="Header_2.1" data-parsoid='{}'>Header 2.1</h2>
17915 <h2 id="Header_2.2" data-parsoid='{}'>Header 2.2</h2>
17916 <meta property="mw:PageProp/noeditsection"/>
17920 Single-line or multiline-comments can follow headings
17922 parsoid=wt2html,wt2wt
17930 <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>
17931 <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>
17932 <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>
17935 <h2 id="foo">foo</h2><!---->
17936 <h2 id="bar">bar</h2><!--c1-->
17937 <h2 id="baz">baz</h2><!--
17943 T3219 URL next to image (broken)
17945 http://example.com[[File:Foobar.jpg]]
17947 <p><a rel="nofollow" class="external free" href="http://example.com">http://example.com</a><a href="/wiki/File:Foobar.jpg" class="image"><img alt="Foobar.jpg" src="http://example.com/images/3/3a/Foobar.jpg" decoding="async" width="1941" height="220" /></a>
17950 <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>
17954 T3186 news: in the middle of text
17956 http://en.wikinews.org/wiki/Wikinews:Workplace
17958 <p><a rel="nofollow" class="external free" href="http://en.wikinews.org/wiki/Wikinews:Workplace">http://en.wikinews.org/wiki/Wikinews:Workplace</a>
17964 Namespaced link must have a title
17973 Namespaced link must have a title (bad fragment version)
17975 [[Project:#fragment]]
17977 <p>[[Project:#fragment]]
17983 ### HTML tags and HTML attributes
17987 div with no attributes
17989 <div>HTML rocks</div>
17991 <div>HTML rocks</div>
17996 div with double-quoted attribute
17998 <div id="rock">HTML rocks</div>
18000 <div id="rock">HTML rocks</div>
18005 div with single-quoted attribute
18007 <div id='rock'>HTML rocks</div>
18009 <div id="rock">HTML rocks</div>
18014 div with unquoted attribute
18016 <div id=rock>HTML rocks</div>
18018 <div id="rock">HTML rocks</div>
18023 div with illegal double attributes
18025 <div id="a" id="b">HTML rocks</div>
18027 <div id="b">HTML rocks</div>
18032 div with empty attribute value, space before equals
18034 parsoid=wt2html,html2html
18036 <div class =>HTML rocks</div>
18038 <div class="">HTML rocks</div>
18041 <div class="" data-parsoid='{"stx":"html"}'>HTML rocks</div>
18045 div with multiple empty attribute values
18047 wgFragmentMode=[ 'html5', 'legacy' ]
18049 parsoid=wt2html,html2html
18051 <div id= title=>HTML rocks</div>
18053 <div id="title=">HTML rocks</div>
18056 <div id="title=" data-parsoid='{"stx":"html"}'>HTML rocks</div>
18059 # FIXME Parsoid doesn't actually match PHP here.
18061 Extension tag in attribute value
18065 <span title="<html><div>123</div></html>">ok</span>
18067 <p><span title="<div>123</div>">ok</span>
18070 <p><span title="123" about="#mwt4" typeof="mw:ExpandedAttrs" data-parsoid='{"stx":"html","a":{"title":"123"},"sa":{"title":"<html><div>123</div></html>"}}' data-mw='{"attribs":[[{"txt":"title"},{"html":"<div typeof=\"mw:Extension/html\" about=\"#mwt3\" data-parsoid='{\"dsr\":[13,40,2,2]}' data-mw='{\"name\":\"html\",\"attrs\":{},\"body\":{\"extsrc\":\"&lt;div>123&lt;/div>\"}}'>123</div>"}]]}'>ok</span></p>
18074 table with multiple empty attribute values
18076 parsoid=wt2html,html2html
18082 <table title="id=">
18088 <table title="id=">
18089 <tbody><tr><td>hi</td></tr>
18094 div with braces in attribute value
18096 <div title="{}">Foo</div>
18098 <div title="{}">Foo</div>
18101 <div title="{}">Foo</div>
18105 div with empty attribute value, no space before equals
18107 parsoid=wt2html,html2html
18109 <div class=>HTML rocks</div>
18111 <div class="">HTML rocks</div>
18114 <div class="">HTML rocks</div>
18118 HTML multiple attributes correction
18120 <p class="error" class="awesome">Awesome!</p>
18122 <p class="awesome">Awesome!</p>
18127 Table multiple attributes correction
18130 !+ class="error" class="awesome"|status
18135 <th class="awesome">status
18143 <DIV ID="x">HTML ROCKS</DIV>
18145 <div id="x">HTML ROCKS</div>
18150 Non-ASCII pseudo-tags are rendered as text
18159 Pseudo-tag with URL 'name' renders as url link
18161 <http://example.com/>
18163 <p><<a rel="nofollow" class="external free" href="http://example.com/">http://example.com/</a>>
18168 text with amp in the middle of nowhere
18172 <p>Remember AT&T?
18177 text with character entity: eacute
18179 I always thought é was a cute letter.
18181 <p>I always thought é was a cute letter.
18186 text with entity-escaped character entity-like string: eacute
18188 I always thought &eacute; was a cute letter.
18190 <p>I always thought &eacute; was a cute letter.
18195 text with undefined character entity: xacute
18197 I always thought &xacute; was a cute letter.
18199 <p>I always thought &xacute; was a cute letter.
18206 <data value="5">five</data>
18207 <time datetime="2000-01-01T00:00Z">The new millenium started</time>
18208 <mark>This highlighted text</mark>
18210 <p><data value="5">five</data>
18211 <time datetime="2000-01-01T00:00Z">The new millenium started</time>
18212 <mark>This highlighted text</mark>
18217 HTML tag with leading space is parsed as text
18221 <p>< div>foo< /div>
18225 ## FIXME: The untrimmed attribute in Parsoid is T205737
18227 Element with broken attribute syntax
18231 <div style=" style="123">hi</div>
18234 <div style="style=">hi</div>
18238 <div style=" style=" data-parsoid='{"stx":"html","a":{"123\"":null},"sa":{"123\"":""}}'>hi</div>
18239 <div data-parsoid='{"stx":"html","a":{"=":null},"sa":{"=":""}}'>ho</div>
18243 ### Nesting tests (see T43545, T52604, T53081)
18246 # This test case is fixed in Parsoid by domino 1.0.12. (T52604)
18247 # Note that html2wt is considerably more difficult if we use <b> in
18248 # the test case, instead of <small>
18250 Ensure that HTML adoption agency algorithm is properly implemented.
18252 <small>X<small>Y</small>Z</small>
18254 <p><small>X<small>Y</small>Z</small>
18258 # This was T43545 in the PHP parser.
18262 <kbd>X<kbd>Y</kbd>Z</kbd>
18264 <p><kbd>X<kbd>Y</kbd>Z</kbd>
18268 # The following cases were T53081 in the PHP parser.
18269 # Note that there are some other nestable tags (b, i, etc) which are
18270 # not covered; see T53081 for discussion.
18275 <em>X<em>Y</em>Z</em>
18277 <p><em>X<em>Y</em>Z</em>
18282 Nesting of <strong>
18284 <strong>X<strong>Y</strong>Z</strong>
18286 <p><strong>X<strong>Y</strong>Z</strong>
18295 <p><q>X<q>Y</q>Z</q>
18302 <ruby>X<ruby>Y</ruby>Z</ruby>
18304 <p><ruby>X<ruby>Y</ruby>Z</ruby>
18311 <bdo>X<bdo>Y</bdo>Z</bdo>
18313 <p><bdo>X<bdo>Y</bdo>Z</bdo>
18325 [[Media:Foobar.jpg]]
18326 [[Media:Video.ogv]]
18327 [[:Media:Video.ogv]]
18329 <p><a href="http://example.com/images/3/3a/Foobar.jpg" class="internal" title="Foobar.jpg">Media:Foobar.jpg</a>
18330 <a href="http://example.com/images/0/00/Video.ogv" class="internal" title="Video.ogv">Media:Video.ogv</a>
18331 <a href="http://example.com/images/0/00/Video.ogv" class="internal" title="Video.ogv">Media:Video.ogv</a>
18334 <p><a rel="mw:MediaLink" href="//example.com/images/3/3a/Foobar.jpg" resource="./Media:Foobar.jpg" title="Foobar.jpg">Media:Foobar.jpg</a>
18335 <a rel="mw:MediaLink" href="//example.com/images/0/00/Video.ogv" resource="./Media:Video.ogv" title="Video.ogv">Media:Video.ogv</a>
18336 <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>
18340 Media link with text
18342 [[Media:Foobar.jpg|A neat file to look at]]
18344 <p><a href="http://example.com/images/3/3a/Foobar.jpg" class="internal" title="Foobar.jpg">A neat file to look at</a>
18347 <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>
18351 Localized media link
18355 [[Miðill:Foobar.jpg]]
18357 [[Miðill:Foobar.jpg|Icelandic]]
18359 <p><a href="http://example.com/images/3/3a/Foobar.jpg" class="internal" title="Foobar.jpg">Miðill:Foobar.jpg</a>
18360 </p><p><a href="http://example.com/images/3/3a/Foobar.jpg" class="internal" title="Foobar.jpg">Icelandic</a>
18363 <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>
18364 <p><a rel="mw:MediaLink" href="//example.com/images/3/3a/Foobar.jpg" resource="./Miðill:Foobar.jpg" title="Foobar.jpg">Icelandic</a></p>
18367 # FIXME: this is still bad HTML tag nesting
18368 # FIXME: doBlockLevels won't wrap this in a paragraph because it contains a div
18369 # Parsoid & Remex fix the p-wrapping since they operate on the DOM.
18371 Media link with nasty text
18373 parsoid=wt2html,html2html
18375 [[Media:Foobar.jpg|Safe Link<div style=display:none>" onmouseover="alert(document.cookie)" onfoo="</div>]]
18377 <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>
18380 <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>
18382 <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>
18386 Media link from missing resource (parsoid-only)
18390 <a rel="mw:MediaLink" href="http://example.com/images/3/3a/Foobar.jpg">Bat!</a>
18392 [[Media:Foobar.jpg|Bat!]]
18396 Media link from missing resource, localized (parsoid-only)
18401 <a rel="mw:MediaLink" href="http://example.com/images/3/3a/Foobar.jpg">Bat!</a>
18403 [[Miðill:Foobar.jpg|Bat!]]
18406 # This is a sanity test to ensure we don't crash or choke when given
18407 # old cached 1.7.0 HTML for media links; we don't require that the
18408 # result be "valid" because wt2wt was completely broken in 1.7.0
18410 Media link from old 1.7.0 DOM spec (crash test, parsoid-only) T198511
18414 <p>This is what Parsoid would emit (and we still handle this HTML fine):</p>
18415 <p><a rel="mw:MediaLink" href="//example.com/images/3/3a/Foobar.jpg" title="Foobar.jpg">A neat file to look at</a></p>
18416 <p>But VisualEditor would mangle the rel attribute, and give us back this:</p>
18417 <p><a rel="mw:ExtLink" href="//example.com/images/3/3a/Foobar.jpg" title="Foobar.jpg">A neat file to look at</a></p>
18418 <p>But at least we don't crash when trying to handle the mangled HTML!</p>
18420 This is what Parsoid would emit (and we still handle this HTML fine):
18422 [[Media:Foobar.jpg|A neat file to look at]]
18424 But VisualEditor would mangle the rel attribute, and give us back this:
18426 [//example.com/images/3/3a/Foobar.jpg A neat file to look at]
18428 But at least we don't crash when trying to handle the mangled HTML!
18432 Media link to nonexistent file (T3702)
18434 [[Media:No such.jpg]]
18435 [[Media:No_such file.jpg]]
18437 <p><a href="/index.php?title=Special:Upload&wpDestFile=No_such.jpg" class="new" title="No such.jpg">Media:No such.jpg</a>
18438 <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>
18441 <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>
18442 <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>
18446 Image link to nonexistent file (T3850 - good)
18448 [[File:No_such.jpg]]
18450 <p><a href="/index.php?title=Special:Upload&wpDestFile=No_such.jpg" class="new" title="File:No such.jpg">File:No such.jpg</a>
18453 <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>
18457 :Image link to nonexistent file (T3850 - bad)
18459 [[:Image:No such.jpg]]
18461 <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>
18464 <p><a rel="mw:WikiLink" href="./File:No_such.jpg" title="File:No such.jpg">Image:No such.jpg</a></p>
18468 Character reference normalization in link text (T3938)
18470 [[Main Page|this&that]]
18472 <p><a href="/wiki/Main_Page" title="Main Page">this&that</a>
18479 Test for unicode normalization
18481 The page's name is U+05d0 U+05b7, with non-canonical form U+FB2E
18485 (T21451) Links should refer to the normalized form.
18493 <p><a href="/wiki/%D7%90%D6%B7" title="אַ">אַ</a>
18494 <a href="/wiki/%D7%90%D6%B7" title="אַ">אַ</a>
18495 <a href="/wiki/%D7%90%D6%B7" title="אַ">אַ</a>
18496 <a href="/wiki/%D7%90%D6%B7" title="אַ">אַ</a>
18497 <a href="/wiki/%D7%90%D6%B7" title="אַ">אַ</a>
18502 Empty attribute crash test (T4067)
18504 <font color="">foo</font>
18506 <p><font color="">foo</font>
18511 Empty attribute crash test single-quotes (T4067)
18513 <font color=''>foo</font>
18515 <p><font color="">foo</font>
18520 Attribute test: equals, then nothing
18522 parsoid=wt2html,html2html
18524 <font color=>foo</font>
18526 <p><font color="">foo</font>
18529 <p><font color="" data-parsoid='{"stx":"html"}'>foo</font></p>
18533 Attribute test: unquoted value
18535 parsoid=wt2html,html2html
18537 <font color=x>foo</font>
18539 <p><font color="x">foo</font>
18542 <p><font color="x" data-parsoid='{"stx":"html"}'>foo</font></p>
18546 Attribute test: unquoted but illegal value (hash)
18548 <font color=#x>foo</font>
18550 <p><font color="#x">foo</font>
18554 # Parsoid does not serialize to empty attribute syntax,
18555 # so wt2wt and html2wt cases are skipped
18557 Attribute test: no value (T54330)
18559 parsoid=wt2html,html2html
18561 <font color>foo</font>
18563 <p><font color="">foo</font>
18566 <p><font color="">foo</font></p>
18570 T4095: link with three closing brackets
18574 <p><a href="/wiki/Main_Page" title="Main Page">Main Page</a>]
18577 <p><a rel="mw:WikiLink" href="./Main_Page" title="Main Page">Main Page</a>]</p>
18581 T4095: link with pipe and three closing brackets
18583 [[Main Page|link]]]
18585 <p><a href="/wiki/Main_Page" title="Main Page">link</a>]
18588 <p><a rel="mw:WikiLink" href="./Main_Page" title="Main Page">link</a>]</p>
18592 T4095: link with pipe and three closing brackets, version 2
18594 [[Main Page|[http://example.com/]]]
18596 <p><a href="/wiki/Main_Page" title="Main Page">[http://example.com/]</a>
18599 <p><a rel="mw:WikiLink" href="./Main_Page" title="Main Page">[http://example.com/]</a></p>
18608 Template:Dangerous attribute
18610 " onmouseover="alert(document.cookie)
18614 Template:Dangerous style attribute
18616 border-size: expression(alert(document.cookie))
18622 <div style="float: right; {{{1}}}">Magic div</div>
18626 T4304: HTML attribute safety (safe template; regression T4309)
18628 <div title="{{test}}"></div>
18630 <div title="This is a test template"></div>
18633 <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>
18636 # Parsoid has enough context to handle this case
18638 T4304: HTML attribute safety (dangerous template; 2309)
18640 <div title="{{dangerous attribute}}"></div>
18642 <div title=""></div>
18645 <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>
18649 T4304: HTML attribute safety (dangerous style template; 2309)
18651 <div style="{{dangerous style attribute}}"></div>
18653 <div style="/* insecure input */"></div>
18656 <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>
18660 T4304: HTML attribute safety (safe parameter; 2309)
18662 {{div style|width: 200px}}
18664 <div style="float: right; width: 200px">Magic div</div>
18667 <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>
18671 T4304: HTML attribute safety (unsafe parameter; 2309)
18673 {{div style|width: expression(alert(document.cookie))}}
18675 <div style="/* insecure input */">Magic div</div>
18678 <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>
18681 ## Parsoid output here differs; needs investigation.
18683 T4304: HTML attribute safety (unsafe breakout parameter; 2309)
18685 {{div style|"><script>alert(document.cookie)</script>}}
18687 <div style="float: right;"><script>alert(document.cookie)</script>">Magic div</div>
18691 ## Parsoid output here differs; needs investigation.
18693 T4304: HTML attribute safety (unsafe breakout parameter 2; 2309)
18695 {{div style|" ><script>alert(document.cookie)</script>}}
18697 <div style="float: right;"><script>alert(document.cookie)</script>">Magic div</div>
18702 T4304: HTML attribute safety (link)
18704 <div title="[[Main Page]]"></div>
18706 <div title="[[Main Page]]"></div>
18709 <div title="[[Main Page]]"></div>
18713 T4304: HTML attribute safety (italics)
18715 <div title="''foobar''"></div>
18717 <div title="''foobar''"></div>
18722 T4304: HTML attribute safety (bold)
18724 <div title="'''foobar'''"></div>
18726 <div title="'''foobar'''"></div>
18731 T4304: HTML attribute safety (ISBN)
18733 <div title="ISBN 1234567890"></div>
18735 <div title="ISBN 1234567890"></div>
18740 T4304: HTML attribute safety (RFC)
18742 <div title="RFC 1234"></div>
18744 <div title="RFC 1234"></div>
18749 T4304: HTML attribute safety (PMID)
18751 <div title="PMID 1234567890"></div>
18753 <div title="PMID 1234567890"></div>
18758 T4304: HTML attribute safety (web link)
18760 <div title="http://example.com/"></div>
18762 <div title="http://example.com/"></div>
18767 T4304: HTML attribute safety (named web link)
18769 <div title="[http://example.com/ link]"></div>
18771 <div title="[http://example.com/ link]"></div>
18774 <div title="[http://example.com/ link]"></div>
18778 T5244: HTML attribute safety (extension; safe)
18780 <div style="<nowiki>background:blue</nowiki>"></div>
18782 <div style="background:blue"></div>
18785 <div style="background:blue" about="#mwt3" typeof="mw:ExpandedAttrs" data-parsoid='{"stx":"html","a":{"style":"background:blue"},"sa":{"style":"<nowiki>background:blue</nowiki>"}}' data-mw='{"attribs":[[{"txt":"style"},{"html":"<span typeof=\"mw:Nowiki\" data-parsoid='{\"dsr\":[12,44,8,9]}'>background:blue</span>"}]]}'></div>
18789 T5244: HTML attribute safety (extension; unsafe)
18791 <div style="<nowiki>border-left:expression(alert(document.cookie))</nowiki>"></div>
18793 <div style="/* insecure input */"></div>
18796 <div style="/* insecure input */" about="#mwt3" typeof="mw:ExpandedAttrs" data-parsoid='{"stx":"html","a":{"style":"/* insecure input */"},"sa":{"style":"<nowiki>border-left:expression(alert(document.cookie))</nowiki>"}}' data-mw='{"attribs":[[{"txt":"style"},{"html":"<span typeof=\"mw:Nowiki\" data-parsoid='{\"dsr\":[12,75,8,9]}'>border-left:expression(alert(document.cookie))</span>"}]]}'></div>
18799 # More MSIE fun discovered by Tom Gilder
18802 MSIE CSS safety test: spurious slash
18804 <div style="background-image:u\rl(javascript:alert('boo'))">evil</div>
18806 <div style="/* insecure input */">evil</div>
18809 <div style="/* insecure input */" data-parsoid='{"stx":"html","a":{"style":"/* insecure input */"},"sa":{"style":"background-image:u\\rl(javascript:alert('boo'))"}}'>evil</div>
18813 MSIE CSS safety test: hex code
18815 <div style="background-image:u\72l(javascript:alert('boo'))">evil</div>
18817 <div style="/* insecure input */">evil</div>
18820 <div style="/* insecure input */" data-parsoid='{"stx":"html","a":{"style":"/* insecure input */"},"sa":{"style":"background-image:u\\72l(javascript:alert('boo'))"}}'>evil</div>
18824 MSIE CSS safety test: comment in url
18826 <div style="background-image:u/**/rl(javascript:alert('boo'))">evil</div>
18828 <div style="background-image:u rl(javascript:alert('boo'))">evil</div>
18831 <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>
18835 MSIE CSS safety test: comment in expression
18837 <div style="background-image:expres/**/sion(alert('boo4'))">evil4</div>
18839 <div style="background-image:expres sion(alert('boo4'))">evil4</div>
18842 <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>
18846 CSS safety test (all browsers): vertical tab (T57332 / CVE-2013-4567)
18848 <p style="font-size: 100px; background-image:url\b(https://www.google.com/images/srpr/logo6w.png)">A</p>
18850 <p style="/* invalid control char */">A</p>
18853 <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>
18857 MSIE 6 CSS safety test: Fullwidth (T57332)
18859 <p style="font-size: 100px; color: expression((title='XSSed'),'red')">A</p>
18860 <div style="top:EXPRESSION(alert())">B</div>
18862 <p style="/* insecure input */">A</p>
18863 <div style="/* insecure input */">B</div>
18866 <p style="/* insecure input */" data-parsoid='{"stx":"html","a":{"style":"/* insecure input */"},"sa":{"style":"font-size: 100px; color: expression((title='XSSed'),'red')"}}'>A</p>
18867 <div style="/* insecure input */" data-parsoid='{"stx":"html","a":{"style":"/* insecure input */"},"sa":{"style":"top:EXPRESSION(alert())"}}'>B</div>
18871 MSIE 6 CSS safety test: IPA extensions (T57332)
18873 <div style="background-image:uʀʟ(javascript:alert())">A</div>
18874 <p style="font-size: 100px; color: expʀessɪoɴ((title='XSSed'),'red')">B</p>
18876 <div style="/* insecure input */">A</div>
18877 <p style="/* insecure input */">B</p>
18880 <div style="/* insecure input */" data-parsoid='{"stx":"html","a":{"style":"/* insecure input */"},"sa":{"style":"background-image:uʀʟ(javascript:alert())"}}'>A</div>
18881 <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>
18885 MSIE 6 CSS safety test: sup/sub script (T57332)
18887 <div style="background-image:url⁽javascript:alert())">A</div>
18888 <div style="background-image:url₍javascript:alert())">B</div>
18889 <p style="font-size: 100px; color: expressioⁿ((title='XSSed'),'red')">C</p>
18891 <div style="/* insecure input */">A</div>
18892 <div style="/* insecure input */">B</div>
18893 <p style="/* insecure input */">C</p>
18896 <div style="/* insecure input */" data-parsoid='{"stx":"html","a":{"style":"/* insecure input */"},"sa":{"style":"background-image:url⁽javascript:alert())"}}'>A</div>
18897 <div style="/* insecure input */" data-parsoid='{"stx":"html","a":{"style":"/* insecure input */"},"sa":{"style":"background-image:url₍javascript:alert())"}}'>B</div>
18898 <p style="/* insecure input */" data-parsoid='{"stx":"html","a":{"style":"/* insecure input */"},"sa":{"style":"font-size: 100px; color: expressioⁿ((title='XSSed'),'red')"}}'>C</p>
18904 parsoid=wt2html,html2html
18907 title="data:text/html,<img src=1 onerror=alert(1)>"
18908 style="-o-link:attr(title);-o-link-source:current">X</div>
18910 <div title="data:text/html,<img src=1 onerror=alert(1)>" style="/* insecure input */">X</div>
18913 <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>
18917 MSIE 6 CSS safety test: Repetition markers (T57332)
18919 <p style="font-size: 100px; color: expres〱ion((title='XSSed'),'red')">A</p>
18920 <p style="font-size: 100px; color: expresゝion((title='XSSed'),'red')">B</p>
18921 <p style="font-size: 100px; color: expresーion((title='XSSed'),'red')">C</p>
18922 <p style="font-size: 100px; color: expresヽion((title='XSSed'),'red')">D</p>
18923 <p style="font-size: 100px; color: expresﹽion((title='XSSed'),'red')">E</p>
18924 <p style="font-size: 100px; color: expresﹼion((title='XSSed'),'red')">F</p>
18925 <p style="font-size: 100px; color: expresーion((title='XSSed'),'red')">G</p>
18927 <p style="/* insecure input */">A</p>
18928 <p style="/* insecure input */">B</p>
18929 <p style="/* insecure input */">C</p>
18930 <p style="/* insecure input */">D</p>
18931 <p style="/* insecure input */">E</p>
18932 <p style="/* insecure input */">F</p>
18933 <p style="/* insecure input */">G</p>
18936 <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>
18937 <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>
18938 <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>
18939 <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>
18940 <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>
18941 <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>
18942 <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>
18946 Table attribute legitimate extension
18949 !+ style="<nowiki>color:blue</nowiki>"|status
18954 <th style="color:blue">status
18960 Table attribute safety
18963 !+ style="<nowiki>border-width:expression(0+alert(document.cookie))</nowiki>"|status
18968 <th style="/* insecure input */">status
18974 CSS line continuation 1
18976 <div style="background-image: u\ rl(test.jpg);"></div>
18978 <div style="/* insecure input */"></div>
18983 CSS line continuation 2
18985 <div style="background-image: u\ rl(test.jpg); "></div>
18987 <div style="/* invalid control char */"></div>
18998 Expansion of multi-line templates in attribute values (T8255)
19000 <div style="background: {{identity|#00FF00}}">-</div>
19002 <div style="background: #00FF00">-</div>
19007 Expansion of multi-line templates in attribute values (T8255 sanity check)
19009 <div style="background:
19012 <div style="background: #00FF00">-</div>
19015 <div style="background:
19020 Expansion of multi-line templates in attribute values (T8255 sanity check 2)
19022 <div style="background: #00FF00">-</div>
19024 <div style="background: #00FF00">-</div>
19029 Tags which are hidden from tidiers cannot pass through the Sanitizer
19031 <mw:toc><script>alert();</script></mw:toc>
19033 <p><mw:toc><script>alert();</script></mw:toc>
19038 ### Parser hooks (see tests/parser/ParserTestParserHook.php for the <tag> extension)
19042 Parser hook: empty input
19053 <pre typeof="mw:Extension/tag" data-mw='{"name":"tag","attrs":{},"body":{"extsrc":""}}' data-parsoid='{}' about="#mwt2"></pre>
19056 ## Don't expect parsoid to rt this form.
19058 Parser hook: empty input using terminated empty elements
19060 parsoid=wt2html,html2html
19071 <pre typeof="mw:Extension/tag" data-mw='{"name":"tag","attrs":{}}' data-parsoid='{}' about="#mwt2"></pre>
19075 Parser hook: empty input using terminated empty elements (space before)
19086 <pre typeof="mw:Extension/tag" data-mw='{"name":"tag","attrs":{}}' data-parsoid='{}' about="#mwt2"></pre>
19090 Parser hook: basic input
19101 <pre typeof="mw:Extension/tag" data-mw='{"name":"tag","attrs":{},"body":{"extsrc":"input"}}' data-parsoid='{}' about="#mwt2"></pre>
19104 ## Don't expect parsoid to rt this form.
19106 Parser hook: case insensitive
19108 parsoid=wt2html,html2html
19119 <pre typeof="mw:Extension/tag" data-mw='{"name":"tag","attrs":{},"body":{"extsrc":"input"}}' data-parsoid='{}' about="#mwt2"></pre>
19122 ## Don't expect parsoid to rt this form.
19124 Parser hook: case insensitive, redux
19126 parsoid=wt2html,html2html
19137 <pre typeof="mw:Extension/tag" data-mw='{"name":"tag","attrs":{},"body":{"extsrc":"input"}}' data-parsoid='{}' about="#mwt2"></pre>
19141 Parser hook: nested tags
19145 <tag><tag></tag></tag>
19157 </tag></pre><p></tag>
19160 <pre typeof="mw:Extension/tag" about="#mwt2" data-mw='{"name":"tag","attrs":{},"body":{"extsrc":"<tag>"}}'></pre><p></tag></p>
19164 Parser hook: basic arguments
19166 <tag width="200" height="100" depth="50" square=""></tag>
19179 <pre typeof="mw:Extension/tag" data-mw='{"name":"tag","attrs":{"width":"200","height":"100","depth":"50","square":""},"body":{"extsrc":""}}' data-parsoid='{}' about="#mwt2"></pre>
19182 ## Don't expect parsoid to rt this form.
19184 Parser hook: basic arguments, variations
19186 parsoid=wt2html,html2html
19188 <tag width=200 height = "100" depth = '50' square></tag>
19201 <pre typeof="mw:Extension/tag" data-mw='{"name":"tag","attrs":{"width":"200","height":"100","depth":"50","square":""},"body":{"extsrc":""}}' data-parsoid='{}' about="#mwt2"></pre>
19205 Parser hook: argument containing a forward slash (T7344)
19207 <tag filename="/tmp/bla"></tag>
19212 'filename' => '/tmp/bla',
19217 <pre typeof="mw:Extension/tag" data-mw='{"name":"tag","attrs":{"filename":"/tmp/bla"},"body":{"extsrc":""}}' data-parsoid='{}' about="#mwt2"></pre>
19220 ## Don't expect parsoid to rt this form.
19222 Parser hook: empty input using terminated empty elements (T4374)
19224 parsoid=wt2html,html2html
19236 <pre typeof="mw:Extension/tag" about="#mwt2" data-mw='{"name":"tag","attrs":{"foo":"bar"}}'></pre><p>text</p>
19239 ## </tag> should be output literally since there is no matching tag that begins it
19240 ## Don't expect parsoid to rt this form.
19242 Parser hook: basic arguments using terminated empty elements (T4374)
19246 <tag width=200 height = "100" depth = '50' square/>
19263 <pre typeof="mw:Extension/tag" data-mw='{"name":"tag","attrs":{"width":"200","height":"100","depth":"50","square":""}}' about="#mwt2"></pre><p>other stuff
19267 ## Don't expect parsoid to rt this form.
19269 Parser hook: Don't allow unclosed extension tags
19275 this is a '''test'''
19277 <p>test <tag>123
19278 </p><p>this is a <b>test</b>
19281 <p>test <tag>123</p>
19283 <p>this is a <b>test</b></p>
19287 Parser hook: horizontal rule inside extension tag that outputs <pre>
19308 ### (see tests/parser/ParserTestParserHook.php for the <statictag> extension)
19312 Parser hook: static parser hook not inside a comment
19314 <statictag>hello, world</statictag>
19316 <statictag action="flush" />
19322 <p><span typeof="mw:Extension/statictag" data-mw='{"name":"statictag","attrs":{},"body":{"extsrc":"hello, world"}}' about="#mwt2"></span></p>
19323 <p><span typeof="mw:Extension/statictag" data-mw='{"name":"statictag","attrs":{"action":"flush"}}' about="#mwt4">hello, world</span></p>
19327 Parser hook: static parser hook inside a comment
19329 <!-- <statictag>hello, world</statictag> -->
19330 <statictag action="flush" />
19335 <!-- <statictag>hello, world</statictag> -->
19336 <p><span typeof='mw:Extension/statictag' data-mw='{"name":"statictag","attrs":{"action":"flush"}}' data-parsoid='{}' about='#mwt2'></span></p>
19339 # Nested template calls; this case was broken by Parser.php rev 1.506,
19343 Template:One-parameter
19345 (My parameter is: {{{1}}})
19349 Template:Map-one-parameter
19351 {{{{{1}}}|{{{2}}}}}
19355 Nested template calls
19357 {{Map-one-parameter|One-parameter|param}}
19359 <p>(My parameter is: param)
19369 Sanitizer: Closing of open tags
19371 <s></s><table></table>
19373 <p><s></s></p><table></table>
19375 <p><s data-parsoid='{"stx":"html"}'></s></p><table data-parsoid='{"stx":"html"}'></table>
19379 Sanitizer: Closing of open but not closed tags
19388 Sanitizer: Closing of closed but not open tags
19394 <p class="mw-empty-elt">
19399 Sanitizer: Closing of closed but not open table tags
19403 Table not started</td></tr></table>
19405 <p>Table not started
19410 Sanitizer: Escaping of spaces, multibyte characters, colons & other stuff in id=""
19412 title=[[Main Page]]
19414 wgFragmentMode=[ 'html5', 'legacy' ]
19416 <span id="æ: v">byte</span>[[#æ: v|backlink]]
19418 <p><span id="æ:_v">byte</span><a href="#æ:_v">backlink</a>
19421 <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>
19425 Sanitizer: Escaping of spaces, multibyte characters, colons & other stuff in id="" (legacy)
19427 wgFragmentMode=[ 'legacy' ]
19429 <span id="æ: v">byte</span>[[#æ: v|backlink]]
19431 <p><span id=".C3.A6:_v">byte</span><a href="#.C3.A6:_v">backlink</a>
19435 # In HTML5, the restrictions are that id must contain at least one character,
19436 # and must not contain any space characters.
19438 Sanitizer: Validating the contents of the id attribute (T6515)
19442 <br id="" /><br id="a space" />
19447 # In HTML5, id must be unique amongst all the ids in the element's home subtree.
19449 Sanitizer: Validating id attribute uniqueness (T6515, T8301)
19453 <br id="foo" /><br id="foo" />
19455 Something need to be done. foo-2 ?
19459 Sanitizer: Validating that <meta> and <link> work, but only for Microdata
19462 <meta itemprop="hello" content="world">
19463 <meta http-equiv="refresh" content="5">
19464 <meta itemprop="hello" http-equiv="refresh" content="5">
19465 <link itemprop="hello" href="{{SERVER}}">
19466 <link rel="stylesheet" href="{{SERVER}}">
19467 <link rel="stylesheet" itemprop="hello" href="{{SERVER}}">
19471 <p> <meta itemprop="hello" content="world" />
19472 <meta http-equiv="refresh" content="5">
19473 <meta itemprop="hello" content="5" />
19474 <link itemprop="hello" href="http://example.org" />
19475 <link rel="stylesheet" href="<a rel="nofollow" class="external free" href="http://example.org">http://example.org</a>">
19476 <link itemprop="hello" href="http://example.org" />
19483 Sanitizer: Strip comments from CSS attributes
19485 parsoid=wt2html,wt2wt
19487 <span style="margin:/*negate mbox-text padding */-0.125em -0.45em; /*rainbow*/rgba(255, 0, 0, 0.3)">2013</span>
19489 <p><span style="margin: -0.125em -0.45em; rgba(255, 0, 0, 0.3)">2013</span>
19492 <p><span style="margin: -0.125em -0.45em; rgba(255, 0, 0, 0.3)">2013</span></p>
19496 Sanitizer: Avoid unnecessary percent encoded characters in interwiki links
19498 [[meatball:Soft"Security]]
19500 <p><a href="http://www.usemod.com/cgi-bin/mb.pl?Soft%22Security" class="extiw" title="meatball:Soft"Security">meatball:Soft"Security</a>
19503 <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>
19507 Sanitizer: angle brackets are invalid, even in interwiki links (T182338)
19509 [[meatball:Foo<Bar]]
19510 [[meatball:Foo>Bar]]
19511 [[meatball:Foo<bar]]
19512 [[meatball:Foo>bar]]
19514 <p>[[meatball:Foo<Bar]]
19515 [[meatball:Foo>Bar]]
19516 [[meatball:Foo<bar]]
19517 [[meatball:Foo>bar]]
19520 <p>[[meatball:Foo<Bar]]
19521 [[meatball:Foo>Bar]]
19522 [[meatball:Foo<span typeof="mw:Entity" data-parsoid='{"src":"&lt;","srcContent":"<"}'><</span>bar]]
19523 [[meatball:Foo<span typeof="mw:Entity" data-parsoid='{"src":"&gt;","srcContent":">"}'>></span>bar]]</p>
19527 Language converter: output gets cut off unexpectedly (T7757)
19531 this bit is safe: }-
19533 but if we add a conversion instance: -{zh-cn:xxx;zh-tw:yyy}-
19535 then we get cut off here: }-
19537 all additional text is vanished
19539 <p>this bit is safe: }-
19540 </p><p>but if we add a conversion instance: xxx
19541 </p><p>then we get cut off here: }-
19542 </p><p>all additional text is vanished
19545 <p>this bit is safe: }-</p>
19546 <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>
19547 <p>then we get cut off here: }-</p>
19548 <p>all additional text is vanished</p>
19552 Language converter glossary rules inside attributes (T119158)
19554 language=sr variant=sr-el
19556 -{H|foAjrjvi=>sr-el:" onload="alert(1)" data-foo="}-
19558 [[File:Foobar.jpg|alt=-{}-foAjrjvi-{}-]]
19561 </p><p><a href="/wiki/%D0%94%D0%B0%D1%82%D0%BE%D1%82%D0%B5%D0%BA%D0%B0:Foobar.jpg" class="image"><img alt="" onload="alert(1)" data-foo="" src="http://example.com/images/3/3a/Foobar.jpg" decoding="async" width="1941" height="220" /></a>
19564 <p><meta typeof="mw:LanguageVariant" data-mw-variant='{"add":true,"oneway":[{"f":"foAjrjvi","l":"sr-el","t":"\" onload=\"alert(1)\" data-foo=\""}]}'/></p>
19566 <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>
19570 Self closed html pairs (T7487)
19572 <center><font id="bug" />Centered text</center>
19573 <div><font id="bug2" />In div text</div>
19575 <center><font id="bug"></font>Centered text</center>
19576 <div><font id="bug2"></font>In div text</div>
19580 Punctuation: nbsp before exclamation
19584 <p>C'est grave !
19589 Punctuation: CSS !important (T13874)
19591 <div style="width:50% !important">important</div>
19593 <div style="width:50% !important">important</div>
19598 Punctuation: CSS ! important (T13874; with space after)
19600 <div style="width:50% ! important">important</div>
19602 <div style="width:50% ! important">important</div>
19607 HTML bullet list, closed tags (T7497)
19620 <ul data-parsoid='{"stx":"html"}'>
19621 <li data-parsoid='{"stx":"html"}'>One</li>
19622 <li data-parsoid='{"stx":"html"}'>Two</li>
19628 HTML bullet list, unclosed tags (T7497)
19640 <ul data-parsoid='{"stx":"html"}'>
19641 <li data-parsoid='{"stx":"html","autoInsertedEnd":true}'>One</li>
19642 <li data-parsoid='{"stx":"html","autoInsertedEnd":true}'>Two</li>
19648 HTML ordered list, closed tags (T7497)
19661 <ol data-parsoid='{"stx":"html"}'>
19662 <li data-parsoid='{"stx":"html"}'>One</li>
19663 <li data-parsoid='{"stx":"html"}'>Two</li>
19669 HTML ordered list, unclosed tags (T7497)
19682 <ol data-parsoid='{"stx":"html"}'>
19683 <li data-parsoid='{"stx":"html","autoInsertedEnd":true}'>One</li>
19684 <li data-parsoid='{"stx":"html","autoInsertedEnd":true}'>Two</li>
19690 HTML nested bullet list, closed tags (T7497)
19713 <ul data-parsoid='{"stx":"html"}'>
19714 <li data-parsoid='{"stx":"html"}'>One</li>
19715 <li data-parsoid='{"stx":"html"}'>Two:
19716 <ul data-parsoid='{"stx":"html"}'>
19717 <li data-parsoid='{"stx":"html"}'>Sub-one</li>
19718 <li data-parsoid='{"stx":"html"}'>Sub-two</li>
19725 HTML nested bullet list, open tags (T7497)
19747 HTML nested ordered list, closed tags (T7497)
19772 HTML nested ordered list, open tags (T7497)
19809 HTML ordered list item with parameters oddity
19811 <ol><li id="fragment">One</li>
19814 <ol><li id="fragment">One</li>
19819 # parsoid doesn't explicitly mark autonumbered links, see T55505
19821 T7918: autonumbering
19823 [http://first/] [http://second] [ftp://ftp]
19827 [mailto:enclosed@mail.tld With target]
19829 [mailto:enclosed@mail.tld]
19831 mailto:inline@mail.tld
19833 <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>
19834 </p><p><a rel="nofollow" class="external free" href="ftp://inlineftp">ftp://inlineftp</a>
19835 </p><p><a rel="nofollow" class="external text" href="mailto:enclosed@mail.tld">With target</a>
19836 </p><p><a rel="nofollow" class="external autonumber" href="mailto:enclosed@mail.tld">[4]</a>
19837 </p><p><a rel="nofollow" class="external free" href="mailto:inline@mail.tld">mailto:inline@mail.tld</a>
19840 <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>
19841 <p><a rel="mw:ExtLink" class="external free" href="ftp://inlineftp">ftp://inlineftp</a></p>
19842 <p><a rel="mw:ExtLink" class="external text" href="mailto:enclosed@mail.tld">With target</a></p>
19843 <p><a rel="mw:ExtLink" class="external autonumber" href="mailto:enclosed@mail.tld"></a></p>
19844 <p><a rel="mw:ExtLink" class="external free" href="mailto:inline@mail.tld">mailto:inline@mail.tld</a></p>
19849 # Security and HTML correctness
19850 # From Nick Jenkins' fuzz testing
19854 Fuzz testing: Parser13
19868 # Note that Parsoid output differs from the PHP parser here: the PHP
19869 # parser breaks the URL for the magic word, while in Parsoid the URL
19870 # production takes precedence.
19872 Fuzz testing: Parser14
19877 <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>
19878 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>
19880 <li class="toclevel-1 tocsection-1"><a href="#onmouseover.3D"><span class="tocnumber">1</span> <span class="toctext">onmouseover=</span></a></li>
19886 <h2><span class="mw-headline" id="onmouseover.3D">onmouseover=</span><span class="mw-editsection"><span class="mw-editsection-bracket">[</span><a href="/index.php?title=Parser_test&action=edit&section=1" title="Edit section: onmouseover=">edit</a><span class="mw-editsection-bracket">]</span></span></h2><p>
19887 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>
19889 <li class="toclevel-1 tocsection-1"><a href="#onmouseover.3D"><span class="tocnumber">1</span> <span class="toctext">onmouseover=</span></a></li>
19893 <h2 id="onmouseover="><span id="onmouseover.3D" typeof="mw:FallbackId"></span>onmouseover=</h2>
19894 <p><a rel="mw:ExtLink" class="external free" href="http://__TOC__" data-parsoid='{"stx":"url"}'>http://__TOC__</a></p>
19898 Fuzz testing: Parser14-table
19900 parsoid=wt2html,html2html
19905 <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>
19906 <table style="__TOC__">
19911 <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>
19912 <table style="__TOC__">
19913 <tbody><tr><td></td></tr>
19917 <table style="__TOC__"></table>
19920 # Known to produce bogus xml (extra </td>)
19921 # Don't add the html/php section since it generates broken HTML
19923 Fuzz testing: Parser16
19940 Fuzz testing: Parser21
19943 !irc://{{ftp://a" onmouseover="alert('hello world');"
19948 <th><a rel="nofollow" class="external free" href="irc://{{ftp://a">irc://{{ftp://a</a>" onmouseover="alert('hello world');"
19958 Fuzz testing: Parser22
19960 http://===r:::https://b
19964 <p><a rel="nofollow" class="external free" href="http://===r:::https://b">http://===r:::https://b</a>
19972 ## Remex doesn't account for fostered content.
19973 ## Known to produce bad XML for now
19975 Fuzz testing: Parser24
19982 | {{{{SSSll!!!!!!!VVVV)]]][[Special:*xxxxxxx--><noinclude>}}}} >
19983 <br style="onmouseover='alert(document.cookie);' " />
19985 MOVE YOUR MOUSE CURSOR OVER THIS TEXT
19990 <u class="|">}}}} >
19991 <br style="onmouseover='alert(document.cookie);'" />
19993 MOVE YOUR MOUSE CURSOR OVER THIS TEXT
20003 <u class="|">}}}} >
20004 <br style="onmouseover='alert(document.cookie);'" />
20006 MOVE YOUR MOUSE CURSOR OVER THIS TEXT
20007 </u><table><tbody><tr>
20011 </tbody></table><p><u class="|">
20014 <p data-parsoid='{"fostered":true,"autoInsertedEnd":true,"autoInsertedStart":true}'>
20016 <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>"}'/>}}}} >
20017 <br style="onmouseover='alert(document.cookie);' " data-parsoid='{"stx":"html","selfClose":true}'/>
20019 MOVE YOUR MOUSE CURSOR OVER THIS TEXT</u></p>
20020 <table data-parsoid='{"autoInsertedEnd":true}'><tbody><tr data-parsoid='{"autoInsertedStart":true}'><td></td></tr></tbody></table>
20023 # Note: the current result listed for this is not what the original one was,
20024 # but the original bug was JavaScript injection, which is fixed in any case.
20025 # It's not clear that the original result listed was any more correct than the
20026 # current one. Original result:
20029 # <li class="||">
20030 # }}}blah" onmouseover="alert('hello world');" align="left"<b>MOVE MOUSE CURSOR OVER HERE</b>
20032 Fuzz testing: Parser25 (T8055)
20038 }}}blah" onmouseover="alert('hello world');" align="left"'''MOVE MOUSE CURSOR OVER HERE
20040 <p><LI CLASS=blah" onmouseover="alert('hello world');" align="left"<b>MOVE MOUSE CURSOR OVER HERE</b>
20043 <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"]}'>
20044 </span><p about="#mwt1"><LI CLASS=blah" onmouseover="alert('hello world');" align="left"<b>MOVE MOUSE CURSOR OVER HERE</b></p>
20048 Fuzz testing: URL adjacent extension (with space, clean)
20050 http://example.com <nowiki>junk</nowiki>
20052 <p><a rel="nofollow" class="external free" href="http://example.com">http://example.com</a> junk
20055 <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>
20059 Fuzz testing: URL adjacent extension (no space, dirty; nowiki)
20061 http://example.com<nowiki>junk</nowiki>
20063 <p><a rel="nofollow" class="external free" href="http://example.com">http://example.com</a>junk
20066 <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>
20070 Fuzz testing: URL adjacent extension (no space, dirty; pre)
20072 http://example.com<pre>junk</pre>
20074 <a rel="nofollow" class="external free" href="http://example.com">http://example.com</a><pre>junk</pre>
20077 <p><a rel="nofollow" class="external free" href="http://example.com">http://example.com</a></p><pre>junk</pre>
20079 <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>
20083 Fuzz testing: image with bogus manual thumbnail
20085 [[Image:foobar.jpg|thumbnail= ]]
20087 <div class="thumb tright"><div class="thumbinner" style="width:182px;">Error creating thumbnail: <div class="thumbcaption"></div></div></div>
20090 <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>
20093 # Parsoid will emit the newline literally in wt2wt; see next test case.
20095 Fuzz testing: encoded newline in generated HTML replacements (T8577)
20099 <pre dir=" "></pre>
20101 <pre dir=" "></pre>
20105 " typeof="mw:Extension/pre" about="#mwt2"data-mw='{"name":"pre","attrs":{"dir":"\n"},"body":{"extsrc":""}}'></pre>
20109 Fuzz testing: encoded newline in generated HTML replacements, html2wt (T8577)
20113 <pre typeof="mw:Extension/pre" about="#mwt2" dir="
20114 " data-mw='{"name":"pre","attrs":{"dir":"\n"},"body":{"extsrc":""}}'></pre>
20124 Templates in extension attributes are not expanded
20126 <pre dir="{{echo|ltr}}"></pre>
20128 <pre dir="{{echo|ltr}}"></pre>
20131 <pre dir="{{echo|ltr}}" typeof="mw:Extension/pre" about="#mwt2" data-mw='{"name":"pre","attrs":{"dir":"{{echo|ltr}}"},"body":{"extsrc":""}}'></pre>
20135 Parsing optional HTML elements (T8171)
20140 <td> Some tabular data</td>
20141 <td> More tabular data ...
20142 <td> And yet som tabular data</td>
20148 <td> Some tabular data</td>
20149 <td> More tabular data ...
20150 </td><td> And yet som tabular data</td>
20157 Correct handling of <td>, <tr> (T8171)
20162 <td> Some tabular data</td>
20163 <td> More tabular data ...</td>
20164 <td> And yet som tabular data</td>
20170 <td> Some tabular data</td>
20171 <td> More tabular data ...</td>
20172 <td> And yet som tabular data</td>
20180 Parsing crashing regression (fr:JavaScript)
20184 <p></body></x>
20189 Inline wiki vs wiki block nesting
20195 <p><b>Bold paragraph</b>
20196 </p><p>New wiki paragraph
20200 # FIXME: The current php output is documented
20201 # and desired output is the parsoid target.
20203 Inline HTML vs wiki block nesting
20209 <p><b>Bold paragraph
20210 </p><p>New wiki paragraph</b>
20213 <p><b>Bold paragraph
20214 </b></p><p><b>New wiki paragraph
20217 <p><b>Bold paragraph</b>
20218 </p><p>New wiki paragraph
20222 # Original result was this:
20223 # <p><b>bold</b><b>bold<i>bolditalics</i></b>
20225 # While that might be marginally more intuitive, maybe, the six-apostrophe
20226 # construct is clearly pathological and the result stated here (which is what
20227 # the parser actually does) is about as reasonable as anything.
20229 Mixing markup for italics and bold
20232 '''bold''''''bold''bolditalics'''''
20234 <p>'<i>bold'</i><b>bold<i>bolditalics</i></b>
20242 Article for special page transclusion test
20246 Special page transclusion
20249 {{Special:Prefixindex/Xyzzyx}}
20251 <ul class="mw-prefixindex-list"><li><a href="/wiki/Xyzzyx" title="Xyzzyx">Xyzzyx</a></li>
20257 Special page transclusion twice (T7021)
20260 {{Special:Prefixindex/Xyzzyx}}
20261 {{Special:Prefixindex/Xyzzyx}}
20263 <ul class="mw-prefixindex-list"><li><a href="/wiki/Xyzzyx" title="Xyzzyx">Xyzzyx</a></li>
20265 <ul class="mw-prefixindex-list"><li><a href="/wiki/Xyzzyx" title="Xyzzyx">Xyzzyx</a></li>
20271 Transclusion of default MediaWiki message
20273 {{MediaWiki:Mainpage}}
20280 Transclusion of nonexistent MediaWiki message
20282 {{MediaWiki:Mainpagexxx}}
20284 <p><a href="/index.php?title=MediaWiki:Mainpagexxx&action=edit&redlink=1" class="new" title="MediaWiki:Mainpagexxx (page does not exist)">MediaWiki:Mainpagexxx</a>
20289 Transclusion of MediaWiki message with underscore
20291 {{MediaWiki:history_short}}
20298 Transclusion of MediaWiki message with space
20300 {{MediaWiki:history short}}
20307 Invalid header with following text
20317 Section extraction test (section 0)
20337 Section extraction test (section 1)
20359 Section extraction test (section 2)
20380 Section extraction test (section 3)
20400 Section extraction test (section 4)
20424 Section extraction test (section 5)
20444 Section extraction test (section 6)
20465 Section extraction test (section 7)
20485 Section extraction test (section 8)
20505 Section extraction test (section 9)
20526 Section extraction test (section 10)
20546 Section extraction test (nonexistent section 11)
20565 Section extraction test with bogus heading (section 1)
20570 ==bogus== not a legal section
20574 ==bogus== not a legal section
20578 Section extraction test with bogus heading (section 2)
20583 ==bogus== not a legal section
20590 Section extraction test with comment after heading (section 1)
20602 Section extraction test with comment after heading (section 2)
20614 Section extraction test with bogus <nowiki> heading (section 1)
20619 ==bogus== <nowiki>not a legal section</nowiki>
20623 ==bogus== <nowiki>not a legal section</nowiki>
20627 Section extraction test with bogus <nowiki> heading (section 2)
20632 ==bogus== <nowiki>not a legal section</nowiki>
20638 # Formerly testing for T4587, now resolved by the use of unmarked sections
20639 # instead of respecting commented sections
20641 Section extraction prefixed by comment (section 1)
20652 Section extraction prefixed by comment (section 2)
20662 # Formerly testing for T4607, now resolved by the use of unmarked sections
20663 # instead of respecting HTML-style headings
20665 Section extraction, mixed wiki and html (section 1)
20681 Section extraction, mixed wiki and html (section 2)
20697 # Formerly testing for T5342
20699 Section extraction, heading surrounded by <noinclude>
20703 <noinclude>==unmarked==</noinclude>
20709 # Test behavior of T21910
20711 Sectiion with all-equals
20716 The line above must have a trailing space
20719 But just in case it doesn't...
20723 But just in case it doesn't...
20727 Section replacement test (section 0)
20758 Section replacement test (section 1)
20787 Section replacement test (section 2)
20817 Section replacement test (section 3)
20848 Section replacement test (section 4)
20875 Section replacement test (section 5)
20906 Section replacement test (section 6)
20936 Section replacement test (section 7)
20967 Section replacement test (section 8)
20998 Section replacement test (section 9)
21027 Section replacement test (section 10)
21057 Section replacement test with initial whitespace (T15728)
21061 Preformatted initial line
21065 Preformatted initial line
21072 Section extraction, heading followed by pre with 20 spaces (T8398)
21084 Section extraction, heading followed by pre with 19 spaces (T8398 sanity check)
21097 Section extraction, <pre> around bogus header (T12309)
21114 Section replacement, <pre> around bogus header (T12309)
21135 Handling of 
 in URLs
21139 <ul><li><a rel="nofollow" class="external free" href="irc://%0Aa">irc://%0Aa</a></li></ul>
21141 <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>
21145 Handling of %0A in URLs
21149 <ul><li><a rel="nofollow" class="external free" href="irc://%0Aa">irc://%0Aa</a></li></ul>
21151 <ul><li><a rel="mw:ExtLink" class="external free" href="irc://%0Aa">irc://%0Aa</a></li></ul>
21154 # The PHP parser strips the empty tags out for giggles; parsoid doesn't.
21156 5 quotes, code coverage +1 line
21163 <p><b><i></i></b></p>
21166 # same html as previous, but wikitext adjusted to match parsoid html2wt
21167 # note that wt2html and html2html will put the <i> before the <b>
21169 5 quotes, code coverage +1 line w/ nowiki (1)
21171 parsoid=wt2wt,html2wt
21173 '''''<nowiki/>'''''
21178 <p><b><i></i></b></p>
21181 # same as previous, just swapping the <i> and <b>
21183 5 quotes, code coverage +1 line w/ nowiki (2)
21185 '''''<nowiki/>'''''
21190 <p><i><b></b></i></p>
21194 Special:Search page linking.
21198 <p><a href="/wiki/Special:Search" title="Special:Search">Special:Search</a>
21203 {{!}} is a magic word
21205 {{!}} is a magic word there and {{!}} is still a magic word here
21206 | is not a magic word here but {{!}} is still a magic word here
21208 <p>| is a magic word there and | is still a magic word here
21209 | is not a magic word here but | is still a magic word here
21212 <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
21213 | 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>
21219 title=[[Parser test]]
21233 *{{SUBJECTPAGENAME}}
21234 *{{SUBJECTPAGENAMEE}}
21237 *{{NAMESPACENUMBER}}
21242 *{{Dynamic|{{NUMBEROFUSERS}}|{{NUMBEROFPAGES}}|{{CURRENTVERSION}}|{{CONTENTLANGUAGE}}|{{DIRECTIONMARK}}|{{CURRENTTIMESTAMP}}|{{NUMBEROFARTICLES}}}}
21244 <ul><li>Parser test</li>
21245 <li>Parser_test</li>
21246 <li>Parser test</li>
21247 <li>Parser_test</li>
21248 <li>Parser test</li>
21249 <li>Parser_test</li>
21250 <li>Parser test</li>
21251 <li>Parser_test</li>
21252 <li>Parser test</li>
21253 <li>Parser_test</li>
21254 <li>Talk:Parser test</li>
21255 <li>Talk:Parser_test</li>
21256 <li>Parser test</li>
21257 <li>Parser_test</li>
21265 <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>
21267 ### Note: Above tests excludes the "{{NUMBEROFADMINS}}" magic word because it generates a MySQL error when included.
21270 Gallery with valid attributes
21272 <gallery type="123" summary="345">
21273 File:File:Foobar.jpg
21276 <ul class="gallery mw-gallery-traditional" type="123">
21277 <li class="gallerybox" style="width: 155px"><div style="width: 155px">
21278 <div class="thumb" style="height: 150px;">File:Foobar.jpg</div>
21279 <div class="gallerytext">
21285 <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"}}'>
21286 <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>
21290 ## Parsoid thinks the "centre" here is a property, not a caption.
21295 "modes": ["wt2html"],
21296 "nativeGallery": true
21304 image4 |300px| centre
21305 image5.svg| http://///////
21310 <ul class="gallery mw-gallery-traditional">
21311 <li class="gallerybox" style="width: 155px"><div style="width: 155px">
21312 <div class="thumb" style="height: 150px;">Image1.png</div>
21313 <div class="gallerytext">
21316 <li class="gallerybox" style="width: 155px"><div style="width: 155px">
21317 <div class="thumb" style="height: 150px;">Image2.gif</div>
21318 <div class="gallerytext">
21321 <li class="gallerybox" style="width: 155px"><div style="width: 155px">
21322 <div class="thumb" style="height: 150px;">Image3</div>
21323 <div class="gallerytext">
21326 <li class="gallerybox" style="width: 155px"><div style="width: 155px">
21327 <div class="thumb" style="height: 150px;">Image4</div>
21328 <div class="gallerytext">
21333 <li class="gallerybox" style="width: 155px"><div style="width: 155px">
21334 <div class="thumb" style="height: 150px;">Image5.svg</div>
21335 <div class="gallerytext">
21336 <p><a rel="nofollow" class="external free" href="http://///////">http://///////</a>
21340 <li class="gallerybox" style="width: 155px"><div style="width: 155px">
21341 <div class="thumb" style="height: 150px;">* image6</div>
21342 <div class="gallerytext">
21348 <ul class="gallery mw-gallery-traditional" typeof="mw:Extension/gallery" about="#mwt3" data-mw='{"name":"gallery","attrs":{},"body":{}}'>
21349 <li class="gallerybox" style="width: 155px;"><div class="thumb" style="width: 150px; height: 150px;"><figure-inline typeof="mw:Error mw:Image"><a href="./File: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>
21350 <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>
21351 <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>
21352 <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>
21353 <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>
21354 <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>
21359 Gallery (with options, html)
21362 "modes": ["wt2html", "html2html"],
21363 "nativeGallery": true
21366 <gallery widths="70px" heights="40px" perrow="2" caption="Foo [[Main Page]]">
21367 File:Nonexistent.jpg|caption
21368 File:Nonexistent.jpg
21369 image:foobar.jpg|some '''caption''' [[Main Page]]
21371 image:foobar.jpg|Blabla|alt=This is a foo-bar.|blabla.
21374 <ul class="gallery mw-gallery-traditional" style="max-width: 226px;_width: 226px;">
21375 <li class='gallerycaption'>Foo <a href="/wiki/Main_Page" title="Main Page">Main Page</a></li>
21376 <li class="gallerybox" style="width: 105px"><div style="width: 105px">
21377 <div class="thumb" style="height: 70px;">Nonexistent.jpg</div>
21378 <div class="gallerytext">
21383 <li class="gallerybox" style="width: 105px"><div style="width: 105px">
21384 <div class="thumb" style="height: 70px;">Nonexistent.jpg</div>
21385 <div class="gallerytext">
21388 <li class="gallerybox" style="width: 105px"><div style="width: 105px">
21389 <div class="thumb" style="width: 100px;"><div style="margin:31px auto;"><a href="/wiki/File:Foobar.jpg" class="image"><img alt="" src="http://example.com/images/thumb/3/3a/Foobar.jpg/70px-Foobar.jpg" decoding="async" width="70" height="8" srcset="http://example.com/images/thumb/3/3a/Foobar.jpg/105px-Foobar.jpg 1.5x, http://example.com/images/thumb/3/3a/Foobar.jpg/140px-Foobar.jpg 2x" /></a></div></div>
21390 <div class="gallerytext">
21391 <p>some <b>caption</b> <a href="/wiki/Main_Page" title="Main Page">Main Page</a>
21395 <li class="gallerybox" style="width: 105px"><div style="width: 105px">
21396 <div class="thumb" style="width: 100px;"><div style="margin:31px auto;"><a href="/wiki/File:Foobar.jpg" class="image"><img alt="Foobar.jpg" src="http://example.com/images/thumb/3/3a/Foobar.jpg/70px-Foobar.jpg" decoding="async" width="70" height="8" srcset="http://example.com/images/thumb/3/3a/Foobar.jpg/105px-Foobar.jpg 1.5x, http://example.com/images/thumb/3/3a/Foobar.jpg/140px-Foobar.jpg 2x" /></a></div></div>
21397 <div class="gallerytext">
21400 <li class="gallerybox" style="width: 105px"><div style="width: 105px">
21401 <div class="thumb" style="width: 100px;"><div style="margin:31px auto;"><a href="/wiki/File:Foobar.jpg" class="image"><img alt="This is a foo-bar." src="http://example.com/images/thumb/3/3a/Foobar.jpg/70px-Foobar.jpg" decoding="async" width="70" height="8" srcset="http://example.com/images/thumb/3/3a/Foobar.jpg/105px-Foobar.jpg 1.5x, http://example.com/images/thumb/3/3a/Foobar.jpg/140px-Foobar.jpg 2x" /></a></div></div>
21402 <div class="gallerytext">
21410 <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":{}}'>
21411 <li class="gallerycaption">Foo <a rel="mw:WikiLink" href="./Main_Page" title="Main Page">Main Page</a></li>
21412 <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>
21413 <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>
21414 <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>
21415 <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>
21416 <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>
21421 Gallery (with options, extsrc)
21424 "nativeGallery": false
21427 <gallery widths="70px" heights="40px" perrow="2" caption="Foo [[Main Page]]">
21428 File:Nonexistent.jpg|caption
21429 File:Nonexistent.jpg
21430 image:foobar.jpg|some '''caption''' [[Main Page]]
21432 image:foobar.jpg|Blabla|alt=This is a foo-bar.|blabla.
21435 <ul class="gallery mw-gallery-traditional" style="max-width: 226px;_width: 226px;">
21436 <li class='gallerycaption'>Foo <a href="/wiki/Main_Page" title="Main Page">Main Page</a></li>
21437 <li class="gallerybox" style="width: 105px"><div style="width: 105px">
21438 <div class="thumb" style="height: 70px;">Nonexistent.jpg</div>
21439 <div class="gallerytext">
21444 <li class="gallerybox" style="width: 105px"><div style="width: 105px">
21445 <div class="thumb" style="height: 70px;">Nonexistent.jpg</div>
21446 <div class="gallerytext">
21449 <li class="gallerybox" style="width: 105px"><div style="width: 105px">
21450 <div class="thumb" style="width: 100px;"><div style="margin:31px auto;"><a href="/wiki/File:Foobar.jpg" class="image"><img alt="" src="http://example.com/images/thumb/3/3a/Foobar.jpg/70px-Foobar.jpg" decoding="async" width="70" height="8" srcset="http://example.com/images/thumb/3/3a/Foobar.jpg/105px-Foobar.jpg 1.5x, http://example.com/images/thumb/3/3a/Foobar.jpg/140px-Foobar.jpg 2x" /></a></div></div>
21451 <div class="gallerytext">
21452 <p>some <b>caption</b> <a href="/wiki/Main_Page" title="Main Page">Main Page</a>
21456 <li class="gallerybox" style="width: 105px"><div style="width: 105px">
21457 <div class="thumb" style="width: 100px;"><div style="margin:31px auto;"><a href="/wiki/File:Foobar.jpg" class="image"><img alt="Foobar.jpg" src="http://example.com/images/thumb/3/3a/Foobar.jpg/70px-Foobar.jpg" decoding="async" width="70" height="8" srcset="http://example.com/images/thumb/3/3a/Foobar.jpg/105px-Foobar.jpg 1.5x, http://example.com/images/thumb/3/3a/Foobar.jpg/140px-Foobar.jpg 2x" /></a></div></div>
21458 <div class="gallerytext">
21461 <li class="gallerybox" style="width: 105px"><div style="width: 105px">
21462 <div class="thumb" style="width: 100px;"><div style="margin:31px auto;"><a href="/wiki/File:Foobar.jpg" class="image"><img alt="This is a foo-bar." src="http://example.com/images/thumb/3/3a/Foobar.jpg/70px-Foobar.jpg" decoding="async" width="70" height="8" srcset="http://example.com/images/thumb/3/3a/Foobar.jpg/105px-Foobar.jpg 1.5x, http://example.com/images/thumb/3/3a/Foobar.jpg/140px-Foobar.jpg 2x" /></a></div></div>
21463 <div class="gallerytext">
21471 <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"}}'>
21472 <li class="gallerycaption">Foo <a rel="mw:WikiLink" href="./Main_Page" title="Main Page">Main Page</a></li>
21473 <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>
21474 <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>
21475 <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>
21476 <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>
21477 <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>
21482 Gallery (without px units)
21484 <gallery widths="70" heights="40">
21488 <ul class="gallery mw-gallery-traditional">
21489 <li class="gallerybox" style="width: 105px"><div style="width: 105px">
21490 <div class="thumb" style="width: 100px;"><div style="margin:31px auto;"><a href="/wiki/File:Foobar.jpg" class="image"><img alt="Foobar.jpg" src="http://example.com/images/thumb/3/3a/Foobar.jpg/70px-Foobar.jpg" decoding="async" width="70" height="8" srcset="http://example.com/images/thumb/3/3a/Foobar.jpg/105px-Foobar.jpg 1.5x, http://example.com/images/thumb/3/3a/Foobar.jpg/140px-Foobar.jpg 2x" /></a></div></div>
21491 <div class="gallerytext">
21497 <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"}}'>
21498 <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>
21503 Gallery (with invalid units)
21505 <gallery widths="70em" heights="40em">
21509 <ul class="gallery mw-gallery-traditional">
21510 <li class="gallerybox" style="width: 155px"><div style="width: 155px">
21511 <div class="thumb" style="width: 150px;"><div style="margin:68px auto;"><a href="/wiki/File:Foobar.jpg" class="image"><img alt="Foobar.jpg" src="http://example.com/images/thumb/3/3a/Foobar.jpg/120px-Foobar.jpg" decoding="async" width="120" height="14" srcset="http://example.com/images/thumb/3/3a/Foobar.jpg/180px-Foobar.jpg 1.5x, http://example.com/images/thumb/3/3a/Foobar.jpg/240px-Foobar.jpg 2x" /></a></div></div>
21512 <div class="gallerytext">
21518 <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"}}'>
21519 <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>
21524 Gallery with link that has fragment
21527 "modes": ["wt2html", "html2html"],
21528 "nativeGallery": true
21532 image:foobar.jpg|link=Main_Page
21533 image:foobar.jpg|link=Main_Page#section
21534 image:foobar.jpg|link=Main Page#section|caption
21537 <ul class="gallery mw-gallery-traditional">
21538 <li class="gallerybox" style="width: 155px"><div style="width: 155px">
21539 <div class="thumb" style="width: 150px;"><div style="margin:68px auto;"><a href="/wiki/Main_Page"><img alt="Foobar.jpg" src="http://example.com/images/thumb/3/3a/Foobar.jpg/120px-Foobar.jpg" decoding="async" width="120" height="14" srcset="http://example.com/images/thumb/3/3a/Foobar.jpg/180px-Foobar.jpg 1.5x, http://example.com/images/thumb/3/3a/Foobar.jpg/240px-Foobar.jpg 2x" /></a></div></div>
21540 <div class="gallerytext">
21543 <li class="gallerybox" style="width: 155px"><div style="width: 155px">
21544 <div class="thumb" style="width: 150px;"><div style="margin:68px auto;"><a href="/wiki/Main_Page#section"><img alt="Foobar.jpg" src="http://example.com/images/thumb/3/3a/Foobar.jpg/120px-Foobar.jpg" decoding="async" width="120" height="14" srcset="http://example.com/images/thumb/3/3a/Foobar.jpg/180px-Foobar.jpg 1.5x, http://example.com/images/thumb/3/3a/Foobar.jpg/240px-Foobar.jpg 2x" /></a></div></div>
21545 <div class="gallerytext">
21548 <li class="gallerybox" style="width: 155px"><div style="width: 155px">
21549 <div class="thumb" style="width: 150px;"><div style="margin:68px auto;"><a href="/wiki/Main_Page#section"><img alt="" src="http://example.com/images/thumb/3/3a/Foobar.jpg/120px-Foobar.jpg" decoding="async" width="120" height="14" srcset="http://example.com/images/thumb/3/3a/Foobar.jpg/180px-Foobar.jpg 1.5x, http://example.com/images/thumb/3/3a/Foobar.jpg/240px-Foobar.jpg 2x" /></a></div></div>
21550 <div class="gallerytext">
21558 <ul class="gallery mw-gallery-traditional" typeof="mw:Extension/gallery" about="#mwt2" data-mw='{"name":"gallery","attrs":{},"body":{}}'>
21559 <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>
21560 <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>
21561 <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>
21566 Gallery with template inside caption
21569 "nativeGallery": true
21572 <gallery caption="{{echo|hi}}">
21573 File:Foobar.jpg|{{echo|ho}}
21576 <ul class="gallery mw-gallery-traditional">
21577 <li class='gallerycaption'>hi</li>
21578 <li class="gallerybox" style="width: 155px"><div style="width: 155px">
21579 <div class="thumb" style="width: 150px;"><div style="margin:68px auto;"><a href="/wiki/File:Foobar.jpg" class="image"><img alt="" src="http://example.com/images/thumb/3/3a/Foobar.jpg/120px-Foobar.jpg" decoding="async" width="120" height="14" srcset="http://example.com/images/thumb/3/3a/Foobar.jpg/180px-Foobar.jpg 1.5x, http://example.com/images/thumb/3/3a/Foobar.jpg/240px-Foobar.jpg 2x" /></a></div></div>
21580 <div class="gallerytext">
21588 <ul class="gallery mw-gallery-traditional" typeof="mw:Extension/gallery" about="#mwt6" data-mw='{"name":"gallery","attrs":{},"body":{}}'>
21589 <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>
21590 <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>
21595 Gallery with wikitext inside gallery caption
21597 <gallery caption="# List item
21599 Text '''bold''' [[link]] {{ns:-1}}
21601 [[File:Foobar.jpg|thumb|File in gallery caption]]">
21602 File:Foobar.jpg|Image caption
21605 <ul class="gallery mw-gallery-traditional">
21606 <li class='gallerycaption'># List item Text <b>bold</b> <a href="/index.php?title=Link&action=edit&redlink=1" class="new" title="Link (page does not exist)">link</a> Special <div class="thumb tright"><div class="thumbinner" style="width:182px;"><a href="/wiki/File:Foobar.jpg" class="image"><img alt="" src="http://example.com/images/thumb/3/3a/Foobar.jpg/180px-Foobar.jpg" decoding="async" width="180" height="20" class="thumbimage" srcset="http://example.com/images/thumb/3/3a/Foobar.jpg/270px-Foobar.jpg 1.5x, http://example.com/images/thumb/3/3a/Foobar.jpg/360px-Foobar.jpg 2x" /></a> <div class="thumbcaption"><div class="magnify"><a href="/wiki/File:Foobar.jpg" class="internal" title="Enlarge"></a></div>File in gallery caption</div></div></div></li>
21607 <li class="gallerybox" style="width: 155px"><div style="width: 155px">
21608 <div class="thumb" style="width: 150px;"><div style="margin:68px auto;"><a href="/wiki/File:Foobar.jpg" class="image"><img alt="" src="http://example.com/images/thumb/3/3a/Foobar.jpg/120px-Foobar.jpg" decoding="async" width="120" height="14" srcset="http://example.com/images/thumb/3/3a/Foobar.jpg/180px-Foobar.jpg 1.5x, http://example.com/images/thumb/3/3a/Foobar.jpg/240px-Foobar.jpg 2x" /></a></div></div>
21609 <div class="gallerytext">
21619 Gallery with wikitext inside caption
21622 "nativeGallery": true
21626 File:Foobar.jpg|alt=galleryalt|[[File:Foobar.jpg|alt=inneralt|20x20px|desc]]
21627 File:Foobar.jpg|alt=galleryalt|{{Test|unamedParam|alt=param}}
21630 <ul class="gallery mw-gallery-traditional">
21631 <li class="gallerybox" style="width: 155px"><div style="width: 155px">
21632 <div class="thumb" style="width: 150px;"><div style="margin:68px auto;"><a href="/wiki/File:Foobar.jpg" class="image"><img alt="galleryalt" src="http://example.com/images/thumb/3/3a/Foobar.jpg/120px-Foobar.jpg" decoding="async" width="120" height="14" srcset="http://example.com/images/thumb/3/3a/Foobar.jpg/180px-Foobar.jpg 1.5x, http://example.com/images/thumb/3/3a/Foobar.jpg/240px-Foobar.jpg 2x" /></a></div></div>
21633 <div class="gallerytext">
21634 <p><a href="/wiki/File:Foobar.jpg" class="image" title="desc"><img alt="inneralt" src="http://example.com/images/thumb/3/3a/Foobar.jpg/20px-Foobar.jpg" decoding="async" width="20" height="2" srcset="http://example.com/images/thumb/3/3a/Foobar.jpg/30px-Foobar.jpg 1.5x, http://example.com/images/thumb/3/3a/Foobar.jpg/40px-Foobar.jpg 2x" /></a>
21638 <li class="gallerybox" style="width: 155px"><div style="width: 155px">
21639 <div class="thumb" style="width: 150px;"><div style="margin:68px auto;"><a href="/wiki/File:Foobar.jpg" class="image"><img alt="galleryalt" src="http://example.com/images/thumb/3/3a/Foobar.jpg/120px-Foobar.jpg" decoding="async" width="120" height="14" srcset="http://example.com/images/thumb/3/3a/Foobar.jpg/180px-Foobar.jpg 1.5x, http://example.com/images/thumb/3/3a/Foobar.jpg/240px-Foobar.jpg 2x" /></a></div></div>
21640 <div class="gallerytext">
21641 <p>This is a test template
21648 <ul class="gallery mw-gallery-traditional" typeof="mw:Extension/gallery" about="#mwt6" data-mw='{"name":"gallery","attrs":{},"body":{}}'>
21649 <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>
21650 <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>
21655 Gallery (with showfilename option)
21658 "nativeGallery": true
21661 <gallery showfilename="">
21662 File:Nonexistent.jpg|caption
21663 File:Nonexistent.jpg
21664 File:Foobar.jpg|some '''caption''' [[Main Page]]
21668 <ul class="gallery mw-gallery-traditional">
21669 <li class="gallerybox" style="width: 155px"><div style="width: 155px">
21670 <div class="thumb" style="height: 150px;">Nonexistent.jpg</div>
21671 <div class="gallerytext">
21672 <p><a href="/wiki/File:Nonexistent.jpg" class="galleryfilename galleryfilename-truncate" title="File:Nonexistent.jpg">Nonexistent.jpg</a>
21677 <li class="gallerybox" style="width: 155px"><div style="width: 155px">
21678 <div class="thumb" style="height: 150px;">Nonexistent.jpg</div>
21679 <div class="gallerytext">
21680 <p><a href="/wiki/File:Nonexistent.jpg" class="galleryfilename galleryfilename-truncate" title="File:Nonexistent.jpg">Nonexistent.jpg</a>
21684 <li class="gallerybox" style="width: 155px"><div style="width: 155px">
21685 <div class="thumb" style="width: 150px;"><div style="margin:68px auto;"><a href="/wiki/File:Foobar.jpg" class="image"><img alt="" src="http://example.com/images/thumb/3/3a/Foobar.jpg/120px-Foobar.jpg" decoding="async" width="120" height="14" srcset="http://example.com/images/thumb/3/3a/Foobar.jpg/180px-Foobar.jpg 1.5x, http://example.com/images/thumb/3/3a/Foobar.jpg/240px-Foobar.jpg 2x" /></a></div></div>
21686 <div class="gallerytext">
21687 <p><a href="/wiki/File:Foobar.jpg" class="galleryfilename galleryfilename-truncate" title="File:Foobar.jpg">Foobar.jpg</a>
21688 some <b>caption</b> <a href="/wiki/Main_Page" title="Main Page">Main Page</a>
21692 <li class="gallerybox" style="width: 155px"><div style="width: 155px">
21693 <div class="thumb" style="width: 150px;"><div style="margin:68px auto;"><a href="/wiki/File:Foobar.jpg" class="image"><img alt="Foobar.jpg" src="http://example.com/images/thumb/3/3a/Foobar.jpg/120px-Foobar.jpg" decoding="async" width="120" height="14" srcset="http://example.com/images/thumb/3/3a/Foobar.jpg/180px-Foobar.jpg 1.5x, http://example.com/images/thumb/3/3a/Foobar.jpg/240px-Foobar.jpg 2x" /></a></div></div>
21694 <div class="gallerytext">
21695 <p><a href="/wiki/File:Foobar.jpg" class="galleryfilename galleryfilename-truncate" title="File:Foobar.jpg">Foobar.jpg</a>
21702 <ul class="gallery mw-gallery-traditional" typeof="mw:Extension/gallery" about="#mwt3" data-mw='{"name":"gallery","attrs":{"showfilename":""},"body":{}}'>
21703 <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>
21704 <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>
21705 <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>
21706 <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>
21710 ## Should Parsoid be preserving these variations? See T151367
21712 Gallery (with namespace-less filenames)
21715 "modes": ["wt2html", "html2html"],
21716 "nativeGallery": true
21720 File:Nonexistent.jpg
21726 <ul class="gallery mw-gallery-traditional">
21727 <li class="gallerybox" style="width: 155px"><div style="width: 155px">
21728 <div class="thumb" style="height: 150px;">Nonexistent.jpg</div>
21729 <div class="gallerytext">
21732 <li class="gallerybox" style="width: 155px"><div style="width: 155px">
21733 <div class="thumb" style="height: 150px;">Nonexistent.jpg</div>
21734 <div class="gallerytext">
21737 <li class="gallerybox" style="width: 155px"><div style="width: 155px">
21738 <div class="thumb" style="width: 150px;"><div style="margin:68px auto;"><a href="/wiki/File:Foobar.jpg" class="image"><img alt="Foobar.jpg" src="http://example.com/images/thumb/3/3a/Foobar.jpg/120px-Foobar.jpg" decoding="async" width="120" height="14" srcset="http://example.com/images/thumb/3/3a/Foobar.jpg/180px-Foobar.jpg 1.5x, http://example.com/images/thumb/3/3a/Foobar.jpg/240px-Foobar.jpg 2x" /></a></div></div>
21739 <div class="gallerytext">
21742 <li class="gallerybox" style="width: 155px"><div style="width: 155px">
21743 <div class="thumb" style="width: 150px;"><div style="margin:68px auto;"><a href="/wiki/File:Foobar.jpg" class="image"><img alt="Foobar.jpg" src="http://example.com/images/thumb/3/3a/Foobar.jpg/120px-Foobar.jpg" decoding="async" width="120" height="14" srcset="http://example.com/images/thumb/3/3a/Foobar.jpg/180px-Foobar.jpg 1.5x, http://example.com/images/thumb/3/3a/Foobar.jpg/240px-Foobar.jpg 2x" /></a></div></div>
21744 <div class="gallerytext">
21750 <ul class="gallery mw-gallery-traditional" typeof="mw:Extension/gallery" about="#mwt2" data-mw='{"name":"gallery","attrs":{},"body":{}}'>
21751 <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>
21752 <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>
21753 <li class="gallerybox" style="width: 155px;"><div class="thumb" style="width: 150px; height: 150px;"><figure-inline typeof="mw:Image"><a href="./File:Foobar.jpg"><img resource="./File:Foobar.jpg" src="//example.com/images/thumb/3/3a/Foobar.jpg/120px-Foobar.jpg" data-file-width="1941" data-file-height="220" data-file-type="bitmap" height="14" width="120"/></a></figure-inline></div><div class="gallerytext"></div></li>
21754 <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>
21759 Gallery override link with wikilink (T36852)
21762 "nativeGallery": true
21766 File:Foobar.jpg|alt=galleryalt|link=Wikilink
21769 <ul class="gallery mw-gallery-traditional">
21770 <li class="gallerybox" style="width: 155px"><div style="width: 155px">
21771 <div class="thumb" style="width: 150px;"><div style="margin:68px auto;"><a href="/wiki/Wikilink"><img alt="galleryalt" src="http://example.com/images/thumb/3/3a/Foobar.jpg/120px-Foobar.jpg" decoding="async" width="120" height="14" srcset="http://example.com/images/thumb/3/3a/Foobar.jpg/180px-Foobar.jpg 1.5x, http://example.com/images/thumb/3/3a/Foobar.jpg/240px-Foobar.jpg 2x" /></a></div></div>
21772 <div class="gallerytext">
21778 <ul class="gallery mw-gallery-traditional" typeof="mw:Extension/gallery" about="#mwt2" data-mw='{"name":"gallery","attrs":{},"body":{}}'>
21779 <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>
21784 Gallery override link with absolute external link (T36852)
21787 "nativeGallery": true
21791 File:Foobar.jpg|alt=galleryalt|link=http://www.example.org
21794 <ul class="gallery mw-gallery-traditional">
21795 <li class="gallerybox" style="width: 155px"><div style="width: 155px">
21796 <div class="thumb" style="width: 150px;"><div style="margin:68px auto;"><a href="http://www.example.org"><img alt="galleryalt" src="http://example.com/images/thumb/3/3a/Foobar.jpg/120px-Foobar.jpg" decoding="async" width="120" height="14" srcset="http://example.com/images/thumb/3/3a/Foobar.jpg/180px-Foobar.jpg 1.5x, http://example.com/images/thumb/3/3a/Foobar.jpg/240px-Foobar.jpg 2x" /></a></div></div>
21797 <div class="gallerytext">
21803 <ul class="gallery mw-gallery-traditional" typeof="mw:Extension/gallery" about="#mwt2" data-mw='{"name":"gallery","attrs":{},"body":{}}'>
21804 <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>
21809 Gallery override link with absolute external link with LanguageConverter
21814 File:foobar.jpg|caption|alt=galleryalt|link=http://www.example.org
21817 <ul class="gallery mw-gallery-traditional">
21818 <li class="gallerybox" style="width: 155px"><div style="width: 155px">
21819 <div class="thumb" style="width: 150px;"><div style="margin:68px auto;"><a href="http://www.example.org"><img alt="galleryalt" src="http://example.com/images/thumb/3/3a/Foobar.jpg/120px-Foobar.jpg" decoding="async" width="120" height="14" srcset="http://example.com/images/thumb/3/3a/Foobar.jpg/180px-Foobar.jpg 1.5x, http://example.com/images/thumb/3/3a/Foobar.jpg/240px-Foobar.jpg 2x" /></a></div></div>
21820 <div class="gallerytext">
21828 <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"}}'>
21829 <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>
21834 Gallery override link with malicious javascript (T36852)
21837 "modes": ["wt2html", "html2html"],
21838 "nativeGallery": true
21842 File:Foobar.jpg|alt=galleryalt|link=" onclick="alert('malicious javascript code!');
21845 <ul class="gallery mw-gallery-traditional">
21846 <li class="gallerybox" style="width: 155px"><div style="width: 155px">
21847 <div class="thumb" style="width: 150px;"><div style="margin:68px auto;"><a href="/wiki/%22_onclick%3D%22alert(%27malicious_javascript_code!%27);"><img alt="galleryalt" src="http://example.com/images/thumb/3/3a/Foobar.jpg/120px-Foobar.jpg" decoding="async" width="120" height="14" srcset="http://example.com/images/thumb/3/3a/Foobar.jpg/180px-Foobar.jpg 1.5x, http://example.com/images/thumb/3/3a/Foobar.jpg/240px-Foobar.jpg 2x" /></a></div></div>
21848 <div class="gallerytext">
21854 <ul class="gallery mw-gallery-traditional" typeof="mw:Extension/gallery" about="#mwt2" data-mw='{"name":"gallery","attrs":{},"body":{}}'>
21855 <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>
21859 # Note that parsoid uses the invalid link as a caption, PHP does not.
21861 Gallery with invalid title as link (T45964)
21864 "modes": ["wt2html", "html2html"],
21865 "nativeGallery": true
21869 File:Foobar.jpg|link=<
21872 <ul class="gallery mw-gallery-traditional">
21873 <li class="gallerybox" style="width: 155px"><div style="width: 155px">
21874 <div class="thumb" style="width: 150px;"><div style="margin:68px auto;"><a href="/wiki/File:Foobar.jpg" class="image"><img alt="Foobar.jpg" src="http://example.com/images/thumb/3/3a/Foobar.jpg/120px-Foobar.jpg" decoding="async" width="120" height="14" srcset="http://example.com/images/thumb/3/3a/Foobar.jpg/180px-Foobar.jpg 1.5x, http://example.com/images/thumb/3/3a/Foobar.jpg/240px-Foobar.jpg 2x" /></a></div></div>
21875 <div class="gallerytext">
21881 <ul class="gallery mw-gallery-traditional" typeof="mw:Extension/gallery" about="#mwt2" data-mw='{"name":"gallery","attrs":{},"body":{}}'>
21882 <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>
21887 Serialize gallery without attrs in data-mw
21890 "modes": ["html2wt"],
21891 "nativeGallery": true
21894 <ul class="gallery mw-gallery-traditional" typeof="mw:Extension/gallery" about="#mwt2" data-mw='{"name":"gallery","body":{}}'>
21895 <li class="gallerycaption">123</li>
21896 <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>
21899 <gallery caption="123">
21905 Gallery with class and style attributes
21908 "nativeGallery": true
21911 <gallery class="center" style="text-align: center;">
21915 <ul class="gallery mw-gallery-traditional center" style="text-align: center;">
21916 <li class="gallerybox" style="width: 155px"><div style="width: 155px">
21917 <div class="thumb" style="width: 150px;"><div style="margin:68px auto;"><a href="/wiki/File:Foobar.jpg" class="image"><img alt="Foobar.jpg" src="http://example.com/images/thumb/3/3a/Foobar.jpg/120px-Foobar.jpg" decoding="async" width="120" height="14" srcset="http://example.com/images/thumb/3/3a/Foobar.jpg/180px-Foobar.jpg 1.5x, http://example.com/images/thumb/3/3a/Foobar.jpg/240px-Foobar.jpg 2x" /></a></div></div>
21918 <div class="gallerytext">
21924 <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":{}}'>
21925 <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>
21930 Gallery in slideshow mode
21933 "nativeGallery": true
21936 <gallery mode="slideshow" showthumbnails="">
21940 <ul class="gallery mw-gallery-slideshow" data-showthumbnails="1">
21941 <li class="gallerybox" style="width: 155px"><div style="width: 155px">
21942 <div class="thumb" style="width: 150px;"><div style="margin:68px auto;"><a href="/wiki/File:Foobar.jpg" class="image"><img alt="Foobar.jpg" src="http://example.com/images/thumb/3/3a/Foobar.jpg/120px-Foobar.jpg" decoding="async" width="120" height="14" srcset="http://example.com/images/thumb/3/3a/Foobar.jpg/180px-Foobar.jpg 1.5x, http://example.com/images/thumb/3/3a/Foobar.jpg/240px-Foobar.jpg 2x" /></a></div></div>
21943 <div class="gallerytext">
21949 <ul class="gallery mw-gallery-slideshow" data-showthumbnails="1" typeof="mw:Extension/gallery" about="#mwt2" data-mw='{"name":"gallery","attrs":{"mode":"slideshow","showthumbnails":""},"body":{}}'>
21950 <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>
21955 Serialize gallery image captions on a line
21958 "modes": ["html2wt"],
21959 "nativeGallery": true
21962 <ul class="gallery mw-gallery-traditional" typeof="mw:Extension/gallery" about="#mwt2" data-mw='{"name":"gallery","attrs":{},"body":{}}'>
21963 <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>
21964 <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>
21968 File:Foobar.jpg| hi ho
21969 File:Foobar.jpg|hi<br />ho
21974 HTML Hex character encoding (spells the word "JavaScript")
21976 parsoid=wt2html,wt2wt,html2html
21978 JavaScript
21980 <p>JavaScript
21983 <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>
21987 HTML Hex character encoding bogus encoding (T28437 regression check)
21991 <p>&#xsee;&#XSEE;
21996 HTML Hex character encoding mixed case
21998 parsoid=wt2html,wt2wt,html2html
22005 <p><span typeof="mw:Entity">î</span><span typeof="mw:Entity">î</span></p>
22008 # See: https://www.w3.org/TR/html5/syntax.html#character-references
22009 # Note that U+000C (form feed) is not a valid XML character, so
22010 # it is banned even though allowed in HTML5.
22012 Illegal character references (T106578)
22017 ; Control (low): 
22018 ; Control (high):  Ÿ
22019 ; Surrogate: ��
22020 ; This is an okay astral character: 💩
22028 <dt>Control (low)</dt>
22030 <dt>Control (high)</dt>
22031 <dd>&#x7F; &#x9F;</dd>
22033 <dd>&#xD83D;&#xDCA9;</dd>
22034 <dt>This is an okay astral character</dt>
22035 <dd>💩</dd></dl>
22039 __FORCETOC__ override
22051 ISBN 978-0-1234-56 789
22053 <p><a href="/wiki/Special:BookSources/9780123456" class="internal mw-magiclink-isbn">ISBN 978-0-1234-56</a> 789
22056 <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>
22060 ISBN followed by 5 spaces
22071 ISBN ISBN 1234567890
22073 <p>ISBN <a href="/wiki/Special:BookSources/1234567890" class="internal mw-magiclink-isbn">ISBN 1234567890</a>
22076 <p>ISBN <a href="./Special:BookSources/1234567890" rel="mw:WikiLink" data-parsoid='{"stx":"magiclink"}'>ISBN 1234567890</a></p>
22079 # Uppercase X and lowercase x as well
22090 <p><a href="/wiki/Special:BookSources/346204561X" class="internal mw-magiclink-isbn">ISBN 3-462-04561-X</a>
22091 <a href="/wiki/Special:BookSources/346204561X" class="internal mw-magiclink-isbn">ISBN 3-462-04561-x</a>
22092 <a href="/wiki/Special:BookSources/080442957X" class="internal mw-magiclink-isbn">ISBN 080442957X</a>
22093 <a href="/wiki/Special:BookSources/080442957X" class="internal mw-magiclink-isbn">ISBN 080442957x</a>
22094 <a href="/wiki/Special:BookSources/978080442957X" class="internal mw-magiclink-isbn">ISBN 978080442957X</a>
22095 <a href="/wiki/Special:BookSources/978080442957X" class="internal mw-magiclink-isbn">ISBN 978080442957x</a>
22098 <p><a href="./Special:BookSources/346204561X" rel="mw:WikiLink" data-parsoid='{"stx":"magiclink"}'>ISBN 3-462-04561-X</a>
22099 <a href="./Special:BookSources/346204561X" rel="mw:WikiLink" data-parsoid='{"stx":"magiclink"}'>ISBN 3-462-04561-x</a>
22100 <a href="./Special:BookSources/080442957X" rel="mw:WikiLink" data-parsoid='{"stx":"magiclink"}'>ISBN 080442957X</a>
22101 <a href="./Special:BookSources/080442957X" rel="mw:WikiLink" data-parsoid='{"stx":"magiclink"}'>ISBN 080442957x</a>
22102 <a href="./Special:BookSources/978080442957X" rel="mw:WikiLink" data-parsoid='{"stx":"magiclink"}'>ISBN 978080442957X</a>
22103 <a href="./Special:BookSources/978080442957X" rel="mw:WikiLink" data-parsoid='{"stx":"magiclink"}'>ISBN 978080442957x</a></p>
22107 ISBN with empty prefix (parsoid test)
22111 <p><a href="/wiki/Special:BookSources/1234567890" class="internal mw-magiclink-isbn">ISBN 1234567890</a>
22114 <p><a href="./Special:BookSources/1234567890" rel="mw:WikiLink">ISBN 1234567890</a></p>
22118 T24905: <abbr> followed by ISBN followed by </a>
22120 <abbr>(fr)</abbr> ISBN 2753300917 [http://www.example.com example.com]
22122 <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>
22125 <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>
22133 <p>RFC <a class="external mw-magiclink-rfc" rel="nofollow" href="https://tools.ietf.org/html/rfc1234">RFC 1234</a>
22136 <p>RFC <a href="https://tools.ietf.org/html/rfc1234" rel="mw:ExtLink" class="external mw-magiclink">RFC 1234</a></p>
22140 Double RFC with a wiki link
22144 <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>
22147 <p>RFC <a rel="mw:WikiLink" href="./RFC_1234" title="RFC 1234">RFC 1234</a></p>
22155 <p><a class="external mw-magiclink-rfc" rel="nofollow" href="https://tools.ietf.org/html/rfc983">RFC 983</a> 987
22158 <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>
22162 Centre-aligned image
22164 [[Image:foobar.jpg|centre]]
22166 <div class="center"><div class="floatnone"><a href="/wiki/File:Foobar.jpg" class="image"><img alt="Foobar.jpg" src="http://example.com/images/3/3a/Foobar.jpg" decoding="async" width="1941" height="220" /></a></div></div>
22169 <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>
22175 [[Image:foobar.jpg|none]]
22177 <div class="floatnone"><a href="/wiki/File:Foobar.jpg" class="image"><img alt="Foobar.jpg" src="http://example.com/images/3/3a/Foobar.jpg" decoding="async" width="1941" height="220" /></a></div>
22180 <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>
22184 Width + Height sized image (using px) (height is ignored)
22186 [[Image:foobar.jpg|640x480px]]
22188 <p><a href="/wiki/File:Foobar.jpg" class="image"><img alt="Foobar.jpg" src="http://example.com/images/thumb/3/3a/Foobar.jpg/640px-Foobar.jpg" decoding="async" width="640" height="73" srcset="http://example.com/images/thumb/3/3a/Foobar.jpg/960px-Foobar.jpg 1.5x, http://example.com/images/thumb/3/3a/Foobar.jpg/1280px-Foobar.jpg 2x" /></a>
22191 <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>
22195 Width-sized image (using px, no following whitespace)
22197 [[Image:foobar.jpg|640px]]
22199 <p><a href="/wiki/File:Foobar.jpg" class="image"><img alt="Foobar.jpg" src="http://example.com/images/thumb/3/3a/Foobar.jpg/640px-Foobar.jpg" decoding="async" width="640" height="73" srcset="http://example.com/images/thumb/3/3a/Foobar.jpg/960px-Foobar.jpg 1.5x, http://example.com/images/thumb/3/3a/Foobar.jpg/1280px-Foobar.jpg 2x" /></a>
22202 <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>
22206 Width-sized image (using px, with following whitespace - test regression from r39467)
22208 [[Image:foobar.jpg|640px ]]
22210 <p><a href="/wiki/File:Foobar.jpg" class="image"><img alt="Foobar.jpg" src="http://example.com/images/thumb/3/3a/Foobar.jpg/640px-Foobar.jpg" decoding="async" width="640" height="73" srcset="http://example.com/images/thumb/3/3a/Foobar.jpg/960px-Foobar.jpg 1.5x, http://example.com/images/thumb/3/3a/Foobar.jpg/1280px-Foobar.jpg 2x" /></a>
22213 <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>
22217 Width-sized image (using px, with preceding whitespace - test regression from r39467)
22219 [[Image:foobar.jpg| 640px]]
22221 <p><a href="/wiki/File:Foobar.jpg" class="image"><img alt="Foobar.jpg" src="http://example.com/images/thumb/3/3a/Foobar.jpg/640px-Foobar.jpg" decoding="async" width="640" height="73" srcset="http://example.com/images/thumb/3/3a/Foobar.jpg/960px-Foobar.jpg 1.5x, http://example.com/images/thumb/3/3a/Foobar.jpg/1280px-Foobar.jpg 2x" /></a>
22224 <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>
22228 Image with page parameter
22232 [[File:LoremIpsum.djvu|page=2]]
22234 <p><a href="/index.php?title=File:LoremIpsum.djvu&page=2" class="image"><img alt="LoremIpsum.djvu" src="http://example.com/images/thumb/5/5f/LoremIpsum.djvu/page2-2480px-LoremIpsum.djvu.jpg" decoding="async" width="2480" height="3508" srcset="http://example.com/images/thumb/5/5f/LoremIpsum.djvu/page2-3720px-LoremIpsum.djvu.jpg 1.5x, http://example.com/images/thumb/5/5f/LoremIpsum.djvu/page2-4960px-LoremIpsum.djvu.jpg 2x" /></a>
22237 <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>
22241 Another italics / bold test
22249 # FIXME: The php output seems broken. It's interleaving some open/close tags.
22255 <dl><dd><dl><dt><dl><dt><dl><dt><dl><dd><dl><dd></dt></dl></dd></dl></dd></dl></dd></dl></dd></dl></dd></dl>
22257 <dl><dd><dl><dt><dl><dt><dl><dt><dl><dd><dl><dd></dd></dl></dd></dl></dt></dl></dt></dl></dt></dl></dd></dl>
22261 # Images with the "|" character in external URLs in comment tags; Eats half the comment, leaves unmatched "</a>" tag.
22263 Images with the "|" character in the comment
22265 [[File:Foobar.jpg|thumb|An [http://test/?param1=|left|¶m2=|x external] URL]]
22267 <div class="thumb tright"><div class="thumbinner" style="width:182px;"><a href="/wiki/File:Foobar.jpg" class="image"><img alt="" src="http://example.com/images/thumb/3/3a/Foobar.jpg/180px-Foobar.jpg" decoding="async" width="180" height="20" class="thumbimage" srcset="http://example.com/images/thumb/3/3a/Foobar.jpg/270px-Foobar.jpg 1.5x, http://example.com/images/thumb/3/3a/Foobar.jpg/360px-Foobar.jpg 2x" /></a> <div class="thumbcaption"><div class="magnify"><a href="/wiki/File:Foobar.jpg" class="internal" title="Enlarge"></a></div>An <a rel="nofollow" class="external text" href="http://test/?param1=%7Cleft%7C&param2=%7Cx">external</a> URL</div></div></div>
22270 <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>
22274 [Before] HTML without raw HTML enabled ($wgRawHtml==false)
22276 <html><script>alert(1);</script></html>
22278 <p><html><script>alert(1);</script></html>
22283 HTML with raw HTML ($wgRawHtml==true)
22287 <html><script>alert(1);</script></html>
22289 <p><script>alert(1);</script>
22292 <p><script typeof="mw:Extension/html" about="#mwt3" data-mw='{"name":"html","attrs":{},"body":{"extsrc":"<script>alert(1);</script>"}}'>alert(1);</script></p>
22296 Parents of subpages, one level up
22298 subpage title=[[Subpage test/L1/L2/L3]]
22302 <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>
22308 Parents of subpages, one level up, not named
22310 subpage title=[[Subpage test/L1/L2/L3]]
22314 <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>
22321 Parents of subpages, two levels up
22323 subpage title=[[Subpage test/L1/L2/L3]]
22329 <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
22330 </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>
22335 Parents of subpages, two levels up, without trailing slash or name.
22337 subpage title=[[Subpage test/L1/L2/L3]]
22346 Parents of subpages, two levels up, with lots of extra trailing slashes.
22348 subpage title=[[Subpage test/L1/L2/L3]]
22352 <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>
22357 Subpage test/L1/L2/L3Sibling
22363 Transclusion of a sibling page (one level up)
22365 subpage title=[[Subpage test/L1/L2/L3]]
22374 Transclusion of a child page
22376 subpage title=[[Subpage test/L1/L2]]
22384 # This is wt2html only in Parsoid because we add <nowiki>
22385 # because of {{..}} and we don't expect to fix that to
22386 # eliminate the nowikis selective for {{..}} markup.
22388 Non-transclusion because of too many up levels
22390 subpage title=[[Subpage test/L1/L2/L3]]
22393 {{../../../../More than parent}}
22395 <p>{{../../../../More than parent}}
22398 <p>{{../../../../More than parent}}</p>
22402 Definition list code coverage
22415 <dl><dt>title </dt><dd>def</dd>
22416 <dt>title </dt><dd>def</dd>
22417 <dt>title</dt><dd>def</dd></dl>
22421 Don't fall for the self-closing div
22423 <div>hello world</div/>
22425 <div>hello world</div>
22434 <p>[[:Template:Msg]]
22443 <p><a href="/index.php?title=Template:QUERTY&action=edit&redlink=1" class="new" title="Template:QUERTY (page does not exist)">Template:QUERTY</a>
22447 # This isn't needed for XHTML conformance, but would be handy as a fallback security measure
22449 Always escape literal '>' in output, not just after '<'
22463 <p>This is a test template
22464 This is a test template
22476 Inclusion of !userCanEdit() content
22480 <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>
22486 Out-of-order TOC heading levels
22495 <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>
22497 <li class="toclevel-1 tocsection-1"><a href="#2"><span class="tocnumber">1</span> <span class="toctext">2</span></a>
22499 <li class="toclevel-2 tocsection-2"><a href="#6"><span class="tocnumber">1.1</span> <span class="toctext">6</span></a></li>
22500 <li class="toclevel-2 tocsection-3"><a href="#3"><span class="tocnumber">1.2</span> <span class="toctext">3</span></a></li>
22503 <li class="toclevel-1 tocsection-4"><a href="#1"><span class="tocnumber">2</span> <span class="toctext">1</span></a>
22505 <li class="toclevel-2 tocsection-5"><a href="#5"><span class="tocnumber">2.1</span> <span class="toctext">5</span></a></li>
22506 <li class="toclevel-2 tocsection-6"><a href="#2_2"><span class="tocnumber">2.2</span> <span class="toctext">2</span></a></li>
22512 <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>
22513 <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>
22514 <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>
22515 <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>
22516 <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>
22517 <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>
22523 ISBN with a dummy number
22533 ISBN with space-delimited number
22537 <p><a href="/wiki/Special:BookSources/9290170328" class="internal mw-magiclink-isbn">ISBN 92 9017 032 8</a>
22540 <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>
22545 ISBN with multiple spaces, no number
22564 </p><p><a href="/wiki/Special:BookSources/1234567890" class="internal mw-magiclink-isbn">ISBN 1234567890</a>
22565 </p><p>ISBN 12345678901
22568 <p>ISBN 123456789</p>
22570 <p><a href="./Special:BookSources/1234567890" rel="mw:WikiLink" data-parsoid='{"stx":"magiclink"}'>ISBN 1234567890</a></p>
22572 <p>ISBN 12345678901</p>
22577 ISBN with trailing year (T9110)
22579 ISBN 1-234-56789-0 - 2006
22581 ISBN 1 234 56789 0 - 2006
22583 <p><a href="/wiki/Special:BookSources/1234567890" class="internal mw-magiclink-isbn">ISBN 1-234-56789-0</a> - 2006
22584 </p><p><a href="/wiki/Special:BookSources/1234567890" class="internal mw-magiclink-isbn">ISBN 1 234 56789 0</a> - 2006
22587 <p><a href="./Special:BookSources/1234567890" rel="mw:WikiLink" data-parsoid='{"stx":"magiclink"}'>ISBN 1-234-56789-0</a> - 2006</p>
22589 <p><a href="./Special:BookSources/1234567890" rel="mw:WikiLink" data-parsoid='{"stx":"magiclink"}'>ISBN 1 234 56789 0</a> - 2006</p>
22596 wgFragmentMode=[ 'html5', 'legacy' ]
22598 {{anchorencode:foo bar©#%n}}
22603 <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>
22607 anchorencode (legacy)
22609 wgFragmentMode=[ 'legacy' ]
22611 {{anchorencode:foo bar©#%n}}
22613 <p>foo_bar.C2.A9.23.25n
22618 anchorencode trims spaces
22620 wgFragmentMode=[ 'html5', 'legacy' ]
22622 {{anchorencode: __pretty__please__}}
22627 <p about="#mwt1" typeof="mw:Transclusion" data-mw='{"parts":[{"template":{"target":{"wt":"anchorencode: __pretty__please__","function":"anchorencode"},"params":{},"i":0}}]}'>pretty_please</p>
22631 anchorencode deals with links
22633 wgFragmentMode=[ 'html5', 'legacy' ]
22635 {{anchorencode: [[hello|world]] [[hi]]}}
22640 <p about="#mwt1" typeof="mw:Transclusion" data-mw='{"parts":[{"template":{"target":{"wt":"anchorencode: [[hello|world]] [[hi]]","function":"anchorencode"},"params":{},"i":0}}]}'>world_hi</p>
22644 anchorencode deals with templates
22646 wgFragmentMode=[ 'html5', 'legacy' ]
22648 {{anchorencode: {{Foo}} x}}
22653 <p about="#mwt2" typeof="mw:Transclusion" data-mw='{"parts":[{"template":{"target":{"wt":"anchorencode: {{Foo}} x","function":"anchorencode"},"params":{},"i":0}}]}'>FOO_x</p>
22657 anchorencode encodes like the TOC generator: (T20431)
22659 wgFragmentMode=[ 'html5', 'legacy' ]
22661 ===_ +:.3A%3A _ &&]] x===
22662 {{anchorencode: _ +:.3A%3A _ &&]] x}}
22665 <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>
22666 <p>+:.3A%3A_&&]]_x
22669 <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>
22670 <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>
22671 <meta property="mw:PageProp/noeditsection"/>
22675 anchorencode encodes like the TOC generator: (T20431) (legacy)
22677 wgFragmentMode=[ 'legacy' ]
22679 ===_ +:.3A%3A&&]]===
22680 {{anchorencode: _ +:.3A%3A&&]] }}
22683 <h3><span class="mw-headline" id=".2B:.3A.253A.26.26.5D.5D">_ +:.3A%3A&&]]</span></h3>
22684 <p>.2B:.3A.253A.26.26.5D.5D
22689 T8200: blockquotes and paragraph formatting
22710 T10293: Use of center tag ruins paragraph formatting
22731 Parsing of overlapping (improperly nested) inline html tags
22733 <span><s>x</span></s>
22735 <p><span><s>x</span></s></span>
22738 <p><span><s>x</s></span>
22743 ### Language variants related tests
22746 # Parsoid does not mark self-links.
22747 # Parsoid does not convert links; PHP will do any necessary redirects.
22750 Self-link in language variants
22752 title=[[Dunav]] language=sr
22754 Both [[Dunav]] and [[Дунав]] are names for this river.
22756 <p>Both <a class="mw-selflink selflink">Dunav</a> and <a class="mw-selflink selflink">Дунав</a> are names for this river.
22759 <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>
22769 Link to another existing title shouldn't be parsed as self-link even if it's a variant of this title
22771 title=[[Duna]] language=sr
22773 [[Дуна]] is not a self-link while [[Duna]] and [[Dуна]] are still self-links.
22775 <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.
22778 <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>
22782 Link to a section of a variant of this title shouldn't be parsed as self-link
22784 title=[[Duna]] language=sr
22786 [[Dуна]] is a self-link while [[Dunа#Foo]] and [[Dуна#Foo]] are not self-links.
22788 <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.
22791 <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>
22795 Link to pages in language variants
22799 Main Page can be written as [[Маин Паге]]
22801 <p>Main Page can be written as <a href="/wiki/Main_Page" title="Main Page">Маин Паге</a>
22804 <p>Main Page can be written as <a rel="mw:WikiLink" href="./Маин_Паге" title="Маин Паге">Маин Паге</a></p>
22809 Multiple links to pages in language variants
22813 [[Main Page]] can be written as [[Маин Паге]] same as [[Маин Паге]].
22815 <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>.
22818 <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>
22823 Simple template in language variants
22829 <p>This is a test template
22835 Template with explicit namespace in language variants
22841 <p>This is a test template
22847 Basic test for template parameter in language variants
22851 {{парамтест|param=foo}}
22853 <p>This is a test template with parameter foo
22858 Simple category in language variants
22862 [[Category:МедиаWики Усер'с Гуиде]]
22864 cat=МедиаWики_Усер'с_Гуиде sort=
22866 <link rel="mw:PageProp/Category" href="./Категорија:МедиаWики_Усер'с_Гуиде" data-parsoid='{"stx":"simple","a":{"href":"./Категорија:МедиаWики_Усер'с_Гуиде"},"sa":{"href":"Category:МедиаWики Усер'с Гуиде"}}'/>
22881 ## We used to, but no longer wt2wt this test since the default serializer
22882 ## will normalize all categories to serialize on their own line.
22883 ## This wikitext usage is going to be fairly uncommon in production and
22884 ## selser will take care of preserving formatting in those scenarios.
22886 Don't convert blue categorylinks to another variant (T35210)
22892 [[A]][[Category:分类]]
22896 <p><a rel="mw:WikiLink" href="./A" title="A">A</a></p>
22897 <link rel="mw:PageProp/Category" href="./Category:分类"/>
22901 Stripping -{}- tags (language variants)
22905 Latin proverb: -{Ne nuntium necare}-
22907 <p>Latin proverb: Ne nuntium necare
22910 <p>Latin proverb: <span typeof="mw:LanguageVariant" data-mw-variant='{"disabled":{"t":"Ne nuntium necare"}}'></span></p>
22915 Prevent conversion with -{}- tags (language variants)
22917 language=sr variant=sr-ec
22919 Latinski: -{Ne nuntium necare}-
22921 <p>Латински: Ne nuntium necare
22924 <p>Latinski: <span typeof="mw:LanguageVariant" data-mw-variant='{"disabled":{"t":"Ne nuntium necare"}}'></span></p>
22929 Prevent conversion of text with -{}- tags (language variants)
22931 language=sr variant=sr-ec
22933 Latinski: -{Ne nuntium necare}-
22935 <p>Латински: Ne nuntium necare
22938 <p>Latinski: <span typeof="mw:LanguageVariant" data-mw-variant='{"disabled":{"t":"Ne nuntium necare"}}'></span></p>
22943 Prevent conversion of links with -{}- tags (language variants)
22945 language=sr variant=sr-ec
22949 <p><a href="/wiki/Main_Page" title="Main Page">Main Page</a>
22952 <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>
22957 -{}- tags within headlines (within html for parserConvert())
22959 wgFragmentMode=[ 'html5', 'legacy' ]
22961 language=sr variant=sr-ec
22965 Note that even an unprotected headline ID is not affected by language
22970 <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>
22971 <p>Ноте тхат евен ан унпротецтед хеадлине ИД ис нот аффецтед бy лангуаге
22974 <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>
22977 <h2 id="-{Naslov}-"><span id="-.7BNaslov.7D-" typeof="mw:FallbackId"></span><span typeof="mw:LanguageVariant" data-mw-variant='{"disabled":{"t":"Naslov"}}'></span></h2>
22979 <p>Note that even an unprotected headline ID is not affected by language
22982 <h2 id="Latinski">Latinski</h2>
22986 Explicit definition of language variant alternatives
22988 language=zh variant=zh-tw
22990 -{zh:China;zh-tw:Taiwan}-, not China
22992 <p>Taiwan, not China
22995 <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>
22999 Explicit definition of language variant alternatives (BCP 47 codes)
23001 language=zh variant=zh-tw
23003 -{zh:China;zh-Hant-TW:Taiwan}-, not China
23005 <p>Taiwan, not China
23008 <p><span typeof="mw:LanguageVariant" data-parsoid='{"tSp":[6]}' data-mw-variant='{"twoway":[{"l":"zh","t":"China"},{"l":"zh-Hant-TW","t":"Taiwan"}]}'></span>, not China</p>
23012 Filter syntax for language variants
23014 language=zh variant=zh-tw
23016 foo-{zh;zh-hans;zh-hant|blog, WEBJOURNAL, WEBLOG}-quux
23018 <p>fooblog, WEBJOURNAL, WEBLOGquux
23021 <p>foo<span typeof="mw:LanguageVariant" data-mw-variant='{"filter":{"l":["zh","zh-hans","zh-hant"],"t":"blog, WEBJOURNAL, WEBLOG"}}'></span>quux</p>
23024 # Note that Parsoid post-processing for language variants needs to
23025 # update the `title` attribute here, based on the mw:ExpandedAttrs property
23027 Conversion around HTML tags
23029 language=sr variant=sr-ec
23031 -{H|span=>sr-ec:script;title=>sr-ec:src}-
23032 <span title="La-{sr-el:L;sr-ec:C}-tin">ski</span>
23035 <span title="ЛаCтин">ски</span>
23038 <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"}]}'/>
23039 <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>
23043 Explicit session-wise two-way language variant mapping (A flag and - flag)
23045 language=zh variant=zh-tw
23047 This is -{zh:China; zh-tw:Taiwan}-, but we'll forget that now.
23049 Taiwan is not China.
23051 But -{A|zh:China; zh-tw:Taiwan}- is China,
23053 (This-{-|zh:China; zh-tw:Taiwan}- should be stripped!)
23055 and -{China}- is China.
23057 <p>This is Taiwan, but we'll forget that now.
23058 </p><p>Taiwan is not China.
23059 </p><p>But Taiwan is Taiwan,
23060 </p><p>(This should be stripped!)
23061 </p><p>and China is China.
23064 <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>
23065 <p>Taiwan is not China.</p>
23066 <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>
23067 <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>
23068 <p>and <span typeof="mw:LanguageVariant" data-mw-variant='{"disabled":{"t":"China"}}'></span> is China.</p>
23072 Explicit session-wise one-way language variant mapping (A flag and - flag)
23074 language=zh variant=zh-tw
23076 This is -{COUNTRY=>zh:China;COUNTRY=>zh-tw:Taiwan}-, but we'll forget that now.
23078 COUNTRY is China or Taiwan.
23080 But -{A|COUNTRY=>zh:China;COUNTRY=>zh-tw:Taiwan}- is COUNTRY,
23082 (This-{-|COUNTRY=>zh:China;COUNTRY=>zh-tw:Taiwan}- should be stripped!)
23084 and -{COUNTRY}- is COUNTRY.
23086 <p>This is Taiwan, but we'll forget that now.
23087 </p><p>COUNTRY is China or Taiwan.
23088 </p><p>But Taiwan is Taiwan,
23089 </p><p>(This should be stripped!)
23090 </p><p>and COUNTRY is COUNTRY.
23093 <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>
23094 <p>COUNTRY is China or Taiwan.</p>
23095 <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>
23096 <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>
23097 <p>and <span typeof="mw:LanguageVariant" data-mw-variant='{"disabled":{"t":"COUNTRY"}}'></span> is COUNTRY.</p>
23101 Explicit session-wise two-way language variant mapping (H flag for hide)
23103 language=zh variant=zh-tw
23105 (This-{H|zh:China;zh-tw:Taiwan}- should be stripped!)
23109 <p>(This should be stripped!)
23110 </p><p>Taiwan is Taiwan.
23113 <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>
23114 <p>Taiwan is China.</p>
23118 Explicit session-wise one-way language variant mapping (H flag for hide)
23120 language=zh variant=zh-tw
23122 (This-{H|COUNTRY=>zh:China;COUNTRY=>zh-tw:Taiwan}- should be stripped!)
23124 COUNTRY is Taiwan or China.
23126 <p>(This should be stripped!)
23127 </p><p>Taiwan is Taiwan or China.
23130 <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>
23131 <p>COUNTRY is Taiwan or China.</p>
23134 ## Note that parsoid test runner does not support 'showtitle' option.
23136 Adding explicit conversion rule for title (T flag)
23138 language=zh variant=zh-tw showtitle
23140 Should be stripped-{T|zh:China;zh-tw:Taiwan}-!
23145 <p>Should be stripped!
23146 </p><p>Taiwan is China.
23149 <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>
23150 <p>Taiwan is China.</p>
23154 Code coverage: T combined with H flag
23156 language=zh variant=zh-tw showtitle
23158 Should be stripped-{T;H|zh:China; zh-tw:Taiwan}-!
23163 <p>Should be stripped!
23164 </p><p>Taiwan is Taiwan.
23167 <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>
23168 <p>Taiwan is China.</p>
23172 Code coverage: T with no variants
23174 language=zh variant=zh-tw showtitle
23176 -{H|zh:China; zh-tw:Taiwan}-
23177 Taiwan is China.-{T|Taiwan is China}-
23184 <p><meta typeof="mw:LanguageVariant" data-mw-variant='{"add":true,"twoway":[{"l":"zh","t":"China"},{"l":"zh-tw","t":"Taiwan"}]}'/>
23185 Taiwan is China.<meta typeof="mw:LanguageVariant" data-mw-variant='{"disabled":{"t":"Taiwan is China"},"title":true}'/></p>
23189 Code coverage: rules with no variants
23191 language=zh variant=zh-tw
23193 -{H|zh:China; zh-tw:Taiwan}-
23204 <p><meta typeof="mw:LanguageVariant" data-mw-variant='{"add":true,"twoway":[{"l":"zh","t":"China"},{"l":"zh-tw","t":"Taiwan"}]}'/>
23206 <meta typeof="mw:LanguageVariant" data-mw-variant='{"add":true,"twoway":[{"l":"*","t":"China"}]}'/>
23207 Taiwan is China.</p>
23212 Code coverage: D flag for conversion rule
23214 language=zh variant=zh-tw
23216 -{D|zh-cn:XA; zh-tw:YA}-
23217 -{A;D|zh-cn:XB; zh-tw:YB}-
23218 -{D;H|zh-cn:XC; zh-tw:YC}-
23220 -{D;H|FOO=>zh-tw:BAR;FOO=>zh-cn:BAT}-
23226 XA XB XC YA YB YC FOO BAR BAT 012345
23231 </p><p>FOO⇒台灣:BAR;FOO⇒大陆:BAT;
23235 </p><p>XA YB YC YA YB YC BAR BAR BAT 013355
23238 <p><span typeof="mw:LanguageVariant" data-mw-variant='{"describe":true,"twoway":[{"l":"zh-cn","t":"XA"},{"l":"zh-tw","t":"YA"}]}'></span>
23239 <meta typeof="mw:LanguageVariant" data-mw-variant='{"add":true,"describe":true,"twoway":[{"l":"zh-cn","t":"XB"},{"l":"zh-tw","t":"YB"}]}'/>
23240 <span typeof="mw:LanguageVariant" data-mw-variant='{"add":true,"describe":true,"twoway":[{"l":"zh-cn","t":"XC"},{"l":"zh-tw","t":"YC"}]}'></span></p>
23241 <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>
23242 <p><span typeof="mw:LanguageVariant" data-mw-variant='{"describe":true,"oneway":[{"f":"0","l":"zh-tw","t":"1"}]}'></span>
23243 <meta typeof="mw:LanguageVariant" data-mw-variant='{"add":true,"describe":true,"oneway":[{"f":"2","l":"zh-tw","t":"3"}]}'/>
23244 <span typeof="mw:LanguageVariant" data-mw-variant='{"add":true,"describe":true,"oneway":[{"f":"4","l":"zh-tw","t":"5"}]}'></span></p>
23245 <p>XA XB XC YA YB YC FOO BAR BAT 012345</p>
23249 Code coverage: N flag for conversion rule
23251 language=zh variant=zh-cn
23261 </p><p>српски (ћирилица)
23264 <p><span typeof="mw:LanguageVariant" data-mw-variant='{"name":{"t":"zh-cn"}}'></span></p>
23265 <p><span typeof="mw:LanguageVariant" data-mw-variant='{"name":{"t":"zh-tw"}}'></span></p>
23266 <p><span typeof="mw:LanguageVariant" data-mw-variant='{"name":{"t":"sr-ec"}}'></span></p>
23269 # html2wt suppresses the bogus 'D' flag, so this is wt2html only
23271 Code coverage: N flag for conversion rule (wt2html only)
23273 language=zh variant=zh-cn
23274 parsoid=wt2html,html2html
23281 <p><span typeof="mw:LanguageVariant" data-mw-variant='{"name":{"t":"en"}}' data-parsoid='{"fl":["D","N"]}'></span></p>
23285 Testing that changing the language variant here in the tests actually works
23287 language=zh variant=zh showtitle
23289 Should be stripped-{T|zh:China; zh-tw:Taiwan}-!
23292 <p>Should be stripped!
23295 <p>Should be stripped<meta typeof="mw:LanguageVariant" data-mw-variant='{"title":true,"twoway":[{"l":"zh","t":"China"},{"l":"zh-tw","t":"Taiwan"}]}'/>!</p>
23299 Recursive conversion of alt and title attrs shouldn't clear converter state
23301 language=zh variant=zh-cn
23304 -{H|zh-cn:Exclamation; zh-tw:exclamation}-
23305 Should be stripped-{T|zh-cn:China; zh-tw:Taiwan}-<span title="exclamation">!</span>
23309 Should be stripped<span title="Exclamation">!</span>
23312 <p><meta typeof="mw:LanguageVariant" data-mw-variant='{"add":true,"twoway":[{"l":"zh-cn","t":"Exclamation"},{"l":"zh-tw","t":"exclamation"}]}'/>
23313 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>
23317 T26072: more test on conversion rule for title
23319 language=zh variant=zh-tw showtitle
23321 This should be stripped-{T|zh:China; zh-tw:Taiwan}-!
23323 This won't take interferes with the title rule-{H|zh:Beijing; zh-tw:Taipei}-.
23326 <p>This should be stripped!
23327 </p><p>This won't take interferes with the title rule.
23330 <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>
23331 <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>
23335 Partly disable title conversion if variant == main language code
23337 language=zh variant=zh title=[[ZH]] showtitle
23339 -{T|zh-cn:CN;zh-tw:TW}-
23345 <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>
23349 Partly disable title conversion if variant == main language code, more
23351 language=zh variant=zh title=[[ZH]] showtitle
23359 <p><meta typeof="mw:LanguageVariant" data-mw-variant='{"disabled":{"t":"TW"},"title":true}'/></p>
23363 Raw output of variant escape tags (R flag)
23365 language=zh variant=zh-tw
23367 Raw: -{R|zh:China;zh-tw:Taiwan}-
23369 <p>Raw: zh:China;zh-tw:Taiwan
23372 <p>Raw: <span typeof="mw:LanguageVariant" data-mw-variant='{"disabled":{"t":"zh:China;zh-tw:Taiwan"}}'></span></p>
23375 # html2wt suppresses the bogus 'D' flags, so this is wt2html only
23377 Raw output of variant escape tags (R flag) (wt2html only)
23379 language=zh variant=zh-tw
23380 parsoid=wt2html,html2html
23382 -{Variant}- -{D|syntax}- -{D;R|options}-
23384 <p>Variant syntax options
23387 <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>
23391 Nested markup inside raw output of variant escape tags (R flag)
23393 language=zh variant=zh-tw
23395 Nested raw: -{R|nested -{zh:China;zh-tw:Taiwan}- nested}-
23397 <p>Nested raw: nested Taiwan nested
23400 <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>
23404 Nested markup and spaces inside raw output of variant escape tags (R flag)
23406 language=zh variant=zh-tw
23408 X-{ outer -{ inner }- outer }-X
23410 <p>X outer inner outer X
23413 <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>
23417 Templates inside raw output of variant escape tags (R flag)
23419 language=zh variant=zh-tw
23421 Nested raw: -{R|nested {{echo|hi}} templates}-
23423 <p>Nested raw: nested hi templates
23426 <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>
23430 Strings evaluating false shouldn't be ignored by Language converter (T51072)
23432 language=zh variant=zh-cn
23434 -{zh-cn:0;zh-sg:1;zh-tw:2;zh-hk:3}-
23439 <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>
23443 Conversion rules from [numeric-only string] to [something else] (T48634)
23445 language=zh variant=zh-cn
23447 -{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
23452 <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>
23456 Two-way converter rule entries with an empty value should be ignored (T53551)
23458 language=zh variant=zh-cn
23460 -{H|zh-cn:foo;zh-tw:;}-foobar
23465 <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>
23469 One-way converter rule entries with an empty "from" string should be ignored (T53551)
23471 language=zh variant=zh-cn
23473 -{H|=>zh-cn:foo;}-foobar
23478 <p><meta typeof="mw:LanguageVariant" data-parsoid='{"tSp":[5]}' data-mw-variant='{"add":true,"oneway":[{"f":"","l":"zh-cn","t":"foo"}]}'/>foobar</p>
23482 Empty converter rule entries shouldn't be inserted into the conversion table (T53551)
23484 language=zh variant=zh-cn
23491 <p><meta typeof="mw:LanguageVariant" data-mw-variant='{"add":true,"twoway":[{"l":"*","t":""}]}'/>foobar</p>
23495 Nested using of manual convert syntax
23497 language=zh variant=zh-hk
23499 Nested: -{zh-hans:Hi -{zh-cn:China;zh-sg:Singapore;}-;zh-hant:Hello -{zh-tw:Taiwan;zh-hk:H-{ong}- K-{}-ong;}-;}-!
23501 <p>Nested: Hello Hong Kong!
23504 <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>
23508 HTML markups with conversion syntax in attribs, nested in other conversion blocks
23510 language=zh variant=zh-cn
23512 -{zh;zh-hans;zh-hant|<span title="-{X}-">A</span>}-
23514 <p><span title="X">A</span>
23517 <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>
23521 HTML markups with conversion syntax in attribs, nested in other conversion blocks (not working yet in PHP parser)
23523 language=zh variant=zh-cn
23525 -{<span title="-{X}-">A</span>}-
23526 !! html/php+disabled
23527 <p><span title="X">A</span>
23530 <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>
23533 # Parsoid and PHP disagree on how to parse this example: Parsoid
23534 # insists that the content of a language converter element be a valid
23535 # DOM fragment or attribute string
23537 Language converter markup with block content
23539 language=zh variant=zh-cn
23541 <span>a-{b<div>c}-d
23543 <span>a-{zh;zh-hans;zh-hant|b<div>c}-d
23545 <span>a-{H|0=>zh-cn:x<span>y;0=>zh-tw:b<div>c}-d
23550 </span></div></span></div></span>
23552 <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
23554 <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
23556 <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>
23560 LanguageConverter selser (1)
23562 language=zh variant=zh-cn
23564 "modes": ["wt2wt", "selser"],
23566 ["span[typeof]", "attr", "data-mw-variant", "{\"disabled\":{\"t\":\"edited\"}}"]
23576 LanguageConverter selser (2)
23578 language=zh variant=zh-cn
23580 "modes": ["wt2wt", "selser"],
23582 ["span[class='x']", "contents", "text", "-{foo}-"],
23583 ["a", "contents", "text", "-{"],
23584 ["span[typeof]", "attr", "data-mw", "{\"parts\":[{\"template\":{\"target\":{\"wt\":\"1x\",\"href\":\"./Template:1x\"},\"params\":{\"1\":{\"wt\":\"-{\"}},\"i\":0}}]}"]
23588 <span class="x">TEXT1</span>
23589 [http://example.com TEXT2]
23593 <span class="x"><nowiki>-{foo}-</nowiki></span>
23594 [http://example.com -{]
23595 [[Foo|<nowiki>-{</nowiki>]]
23596 {{1x|<nowiki>-{</nowiki>}}
23599 # Tests LanguageVariantText in ConstrainedText
23601 LanguageConverter selser (3)
23603 language=zh variant=zh-cn
23605 "modes": ["wt2wt", "selser"],
23607 ["td > span", "attr", "typeof", "mw:LanguageVariant"],
23608 ["td > span", "attr", "data-mw-variant", "{\"disabled\":{\"t\":\"edited\"}}"]
23619 |<nowiki/>-{edited}-
23623 # Tests LanguageVariantText._fromSelSer
23625 LanguageConverter selser (4)
23627 language=zh variant=zh-cn
23629 "modes": ["wt2wt", "selser"],
23631 ["td > span.x", "remove"]
23637 |<span class="x">Foo</span>-{Bar}-
23638 ||<span class="x">Foo</span>-{Bar}-
23648 # Since Parsoid is starting to emit canonical wikitext for links,
23649 # [http://example.com http://example.com] will not RT back to that
23651 # Parsoid does not language-convert links (it is done in a
23652 # post-processing step)
23654 Proper conversion of text in external links
23656 language=sr variant=sr-ec
23659 http://www.google.com
23660 gopher://www.google.com
23661 [http://www.google.com http://www.google.com]
23662 [gopher://www.google.com gopher://www.google.com]
23663 [https://www.google.com irc://www.google.com]
23664 [ftp://www.google.com www.google.com/ftp://dir]
23665 [//www.google.com www.google.com]
23667 <p><a rel="nofollow" class="external free" href="http://www.google.com">http://www.google.com</a>
23668 <a rel="nofollow" class="external free" href="gopher://www.google.com">gopher://www.google.com</a>
23669 <a rel="nofollow" class="external text" href="http://www.google.com">http://www.google.com</a>
23670 <a rel="nofollow" class="external text" href="gopher://www.google.com">gopher://www.google.com</a>
23671 <a rel="nofollow" class="external text" href="https://www.google.com">irc://www.google.com</a>
23672 <a rel="nofollow" class="external text" href="ftp://www.google.com">www.гоогле.цом/фтп://дир</a>
23673 <a rel="nofollow" class="external text" href="//www.google.com">www.гоогле.цом</a>
23676 <p><a rel="mw:ExtLink" class="external free" href="http://www.google.com">http://www.google.com</a>
23677 <a rel="mw:ExtLink" class="external free" href="gopher://www.google.com">gopher://www.google.com</a>
23678 <a rel="mw:ExtLink" class="external text" href="http://www.google.com">http://www.google.com</a>
23679 <a rel="mw:ExtLink" class="external text" href="gopher://www.google.com">gopher://www.google.com</a>
23680 <a rel="mw:ExtLink" class="external text" href="https://www.google.com">irc://www.google.com</a>
23681 <a rel="mw:ExtLink" class="external text" href="ftp://www.google.com">www.google.com/ftp://dir</a>
23682 <a rel="mw:ExtLink" class="external text" href="//www.google.com">www.google.com</a></p>
23686 Do not convert roman numbers to language variants
23688 language=sr variant=sr-ec
23692 <p>Фридрих IV је цар.
23695 <p>Fridrih IV je car.</p>
23699 Unclosed language converter markup "-{"
23710 Don't convert raw rule "-{R|=>}-" to "=>"
23719 <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>
23723 Don't break link parsing if language converter markup is in the caption.
23725 language=sr variant=sr-ec
23727 [[Main Page|-{R|main page}-]]
23729 <p><a href="/wiki/Main_Page" title="Маин Паге">main page</a>
23732 <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>
23736 T146304: Don't break template parsing if language converter markup is in the parameter.
23738 language=sr variant=sr-ec
23745 <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>
23749 T146305: Don't break image parsing if language converter markup is in the caption.
23753 [[Датотека:Foobar.jpg|thumb|-{R|caption:}-]]
23755 <div class="thumb tright"><div class="thumbinner" style="width:182px;"><a href="/wiki/%D0%94%D0%B0%D1%82%D0%BE%D1%82%D0%B5%D0%BA%D0%B0:Foobar.jpg" class="image"><img alt="" src="http://example.com/images/thumb/3/3a/Foobar.jpg/180px-Foobar.jpg" decoding="async" width="180" height="20" class="thumbimage" srcset="http://example.com/images/thumb/3/3a/Foobar.jpg/270px-Foobar.jpg 1.5x, http://example.com/images/thumb/3/3a/Foobar.jpg/360px-Foobar.jpg 2x" /></a> <div class="thumbcaption"><div class="magnify"><a href="/wiki/%D0%94%D0%B0%D1%82%D0%BE%D1%82%D0%B5%D0%BA%D0%B0:Foobar.jpg" class="internal" title="Повећајте"></a></div>caption:</div></div></div>
23758 <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>
23762 T146305: Don't break image parsing if nested language converter markup is in the caption.
23764 language=zh variant=zh-cn
23766 [[File:Foobar.jpg|thumb|-{|zh-cn:blog (hk: -{zh-hans|WEBJOURNAL}-, tw: -{zh-hans|WEBLOG}-)}-]]
23768 <div class="thumb tright"><div class="thumbinner" style="width:182px;"><a href="/wiki/File:Foobar.jpg" class="image"><img alt="" src="http://example.com/images/thumb/3/3a/Foobar.jpg/180px-Foobar.jpg" decoding="async" width="180" height="20" class="thumbimage" srcset="http://example.com/images/thumb/3/3a/Foobar.jpg/270px-Foobar.jpg 1.5x, http://example.com/images/thumb/3/3a/Foobar.jpg/360px-Foobar.jpg 2x" /></a> <div class="thumbcaption"><div class="magnify"><a href="/wiki/File:Foobar.jpg" class="internal" title="放大"></a></div>blog (hk: WEBJOURNAL, tw: WEBLOG)</div></div></div>
23771 <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>
23774 # XXX html2wt disabled because rich markup in alt is not preserved.
23776 Don't break gallery if language converter markup is inside.
23781 File:foobar.jpg|[[File:foobar.jpg|20px|desc|alt=-{R|foo}-|-{R|bar}-]]|alt=-{R|bat}-
23782 File:foobar.jpg|{{Test|unamedParam|alt=-{R|param}-}}|alt=galleryalt
23785 <ul class="gallery mw-gallery-traditional">
23786 <li class="gallerybox" style="width: 155px"><div style="width: 155px">
23787 <div class="thumb" style="width: 150px;"><div style="margin:68px auto;"><a href="/wiki/File:Foobar.jpg" class="image"><img alt="bat" src="http://example.com/images/thumb/3/3a/Foobar.jpg/120px-Foobar.jpg" decoding="async" width="120" height="14" srcset="http://example.com/images/thumb/3/3a/Foobar.jpg/180px-Foobar.jpg 1.5x, http://example.com/images/thumb/3/3a/Foobar.jpg/240px-Foobar.jpg 2x" /></a></div></div>
23788 <div class="gallerytext">
23789 <p><a href="/wiki/File:Foobar.jpg" class="image" title="bar"><img alt="foo" src="http://example.com/images/thumb/3/3a/Foobar.jpg/20px-Foobar.jpg" decoding="async" width="20" height="2" srcset="http://example.com/images/thumb/3/3a/Foobar.jpg/30px-Foobar.jpg 1.5x, http://example.com/images/thumb/3/3a/Foobar.jpg/40px-Foobar.jpg 2x" /></a>
23793 <li class="gallerybox" style="width: 155px"><div style="width: 155px">
23794 <div class="thumb" style="width: 150px;"><div style="margin:68px auto;"><a href="/wiki/File:Foobar.jpg" class="image"><img alt="galleryalt" src="http://example.com/images/thumb/3/3a/Foobar.jpg/120px-Foobar.jpg" decoding="async" width="120" height="14" srcset="http://example.com/images/thumb/3/3a/Foobar.jpg/180px-Foobar.jpg 1.5x, http://example.com/images/thumb/3/3a/Foobar.jpg/240px-Foobar.jpg 2x" /></a></div></div>
23795 <div class="gallerytext">
23796 <p>This is a test template
23803 <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"}}'>
23804 <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>
23805 <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>
23810 T153135: Don't break list handling if language converter markup is in the item.
23812 language=zh variant=zh-cn
23814 ;-{zh-cn:AAA;zh-tw:BBB}-
23818 <dt>foo:bar</dt></dl>
23820 <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>
23821 <dt data-parsoid='{"dsr":[25,39,1,0]}'><span typeof="mw:LanguageVariant" data-mw-variant='{"disabled":{"t":"foo:bar"}}'></span></dt>
23825 // Note that parsoid does not protect colons unless language converter
23826 // markup is properly nested, because it is a backtracking parser.
23828 T153135: Unclosed markup in definition list (code coverage)
23830 language=zh variant=zh-cn
23835 <dl><dt><b>foo:bar</b></dt><b>
23836 <dt>-{zh-cn:AAA</dt></b></dl>
23838 <dl><dt data-parsoid='{}'><b data-parsoid='{"stx":"html","autoInsertedEnd":true}'>foo:bar</b></dt><b data-parsoid='{"stx":"html","autoInsertedEnd":true,"autoInsertedStart":true}'>
23839 <dt data-parsoid='{}'>-{zh-cn</dt><dd data-parsoid='{"stx":"row"}'>AAA</dd></b></dl>
23843 T153135: Nested language converter markup in definition list (code coverage)
23845 language=zh variant=zh-cn
23847 ;-{|zh-cn:AAA -{zh-hans|foo:bar}- -{R|bat:baz}-}-:def
23849 <dl><dt>AAA foo:bar bat:baz</dt>
23852 <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>
23853 <dd data-parsoid='{"stx":"row","dsr":[49,53,1,0]}'>def</dd>
23857 # html2wt mode disabled due to <nowiki> insertion.
23859 T153140: Don't break table handling if language converter markup is in the cell.
23861 language=sr variant=sr-ec
23862 parsoid=wt2html,wt2wt,html2html
23879 <td><span typeof="mw:LanguageVariant" data-mw-variant='{"disabled":{"t":"B"}}'></span></td>
23886 Language converter tricky html2wt cases (1)
23889 parsoid=html2wt,wt2wt
23891 <p><span typeof="mw:LanguageVariant" data-mw-variant='{"disabled":{"t":"}-"}}'></span></p>
23893 -{<nowiki>}-</nowiki>}-
23900 Language converter tricky html2wt cases (2)
23903 parsoid=html2wt,wt2wt
23907 <nowiki>-{foo}-</nowiki>
23909 <p>-{foo}-
23914 Language converter tricky html2wt cases (3)
23917 parsoid=html2wt,wt2wt
23919 <p><span typeof="mw:LanguageVariant" data-mw-variant='{"disabled":{"t":"|"}}'></span></p>
23920 <p><span typeof="mw:LanguageVariant" data-mw-variant='{"disabled":{"t":"R|raw"}}'></span></p>
23921 <p><span typeof="mw:LanguageVariant" data-mw-variant='{"disabled":{"t":"-{foo}-"}}'></span></p>
23927 -{<nowiki>-{foo}-</nowiki>}-
23931 </p><p>-{foo}-
23936 Language converter tricky html2wt cases (4)
23939 parsoid=html2wt,wt2wt
23941 <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>
23949 # Note that the <nowiki> escaping added by parsoid for source text,
23950 # destination text, and language names only works on the PHP side
23951 # for *destination text*. (HTML entity escaping wouldn't work
23952 # any better.) This is probably a bug, at least for source texts.
23953 # (For language names PHP uses a precise regexp based on the languages
23954 # it currently knows have variants, which is fragile since this set
23955 # can grow/shrink over time.)
23957 Language converter tricky html2wt cases (5)
23959 language=zh variant=zh-cn
23961 <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>
23962 <p><meta typeof="mw:LanguageVariant" data-mw-variant='{"add":true,"oneway":[{"f":"A","l":"bo:g;us","t":"B"}]}'/></p>
23963 <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>
23964 <p><span typeof="mw:LanguageVariant" data-mw-variant='{"twoway":[{"l":"bo:g;us","t":"xyz"},{"l":"zh-cn","t":"abc"}]}'></span></p>
23967 -{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
23969 -{H|A=><nowiki>bo:g;us</nowiki>:B}-
23971 -{A|zh-tw:xyz; zh-cn:<nowiki>0;zh-tw:bar</nowiki>}-
23973 -{<nowiki>bo:g;us</nowiki>:xyz; zh-cn:abc}-
23976 !! html/php+disabled
23977 <p>foobat;xyz=>zh-cn:abc
23981 </p><p>a:b=>c 0;zh-tw:bar
23986 T179579: Nowiki and lc interaction
23993 -{123<nowiki>|</nowiki>456}-
23995 <p><span typeof="mw:LanguageVariant" data-mw-variant='{"disabled":{"t":"&lt;/nowiki>123"}}' data-parsoid='{"fl":[],"src":"-{</nowiki>123}-"}'></span></p>
23997 <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>
24001 T2529: Uncovered bullet
24010 T2529: Uncovered bullet in a deeply nested list
24012 *******Foo {{bullet}}
24014 <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>
24019 T2529: Uncovered table already at line-start
24042 T2529: Uncovered bullet in parser function result
24044 *Foo {{lc:{{bullet}} }}
24051 T7678: Double-parsed template argument
24053 {{lc:{{{1}}}|hello}}
24060 T7678: Double-parsed template invocation
24062 {{lc:{{paramtest {{!}} param = hello }} }}
24064 <p>{{paramtest | param = hello }}
24069 Case insensitivity of parser functions for non-ASCII characters (T10143)
24072 title=[[Main Page]]
24074 {{PRVNÍVELKÉ:ěščř}}
24075 {{prvnívelké:ěščř}}
24095 Morwen/13: Unclosed link followed by heading
24102 <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>
24107 HHP2.1: Heuristics for headings in preprocessor parenthetical structures
24114 <h1><span class="mw-headline" id="heading">heading</span></h1>
24119 HHP2.2: Heuristics for headings in preprocessor parenthetical structures
24126 <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>
24141 Paragraphs inside divs (no extra line breaks)
24153 Paragraphs inside divs (extra line break on open)
24168 Paragraphs inside divs (extra line break on close)
24183 Paragraphs inside divs (extra line break on open and close)
24199 # doBlockLevels screws up this output and Remex cleans up as much as it can.
24201 Nesting tags, paragraphs on lines which begin with <div>
24203 <div></div><strong>A
24206 <div></div><p><strong>A
24207 </strong></p><strong></strong><p><strong>B</strong>
24210 <div data-parsoid='{"stx":"html"}'></div><p><strong data-parsoid='{"stx":"html","autoInsertedEnd":true}'>A</strong></p>
24211 <p><strong data-parsoid='{"stx":"html","autoInsertedStart":true}'>B</strong></p>
24214 # T8200: <blockquote> should behave like <div> with respect to line breaks
24216 T8200: paragraphs inside blockquotes (no extra line breaks)
24218 <blockquote>Line one
24220 Line two</blockquote>
24222 <blockquote>Line one
24223 Line two</blockquote>
24226 <blockquote><p>Line one
24227 Line two</p></blockquote>
24231 T8200: paragraphs inside blockquotes (extra line break on open)
24236 Line two</blockquote>
24241 Line two</blockquote>
24247 Line two</p></blockquote>
24251 T8200: paragraphs inside blockquotes (extra line break on close)
24253 <blockquote>Line one
24258 <blockquote>Line one
24264 <blockquote><p>Line one
24271 T8200: paragraphs inside blockquotes (extra line break on open and close)
24287 ## This is a corner case interaction between the paragraph wrapping in the
24288 ## php parser's BlockLevelPass and Remex. `doBlockLevels` has a notion of
24289 ## some tags which close paragraphs (and thus prevent wrapping on their line),
24290 ## of which "div" is one, but do p-wrapping inside them. These are referred
24291 ## to as "never suppressing". Remex, for its part, doesn't traverse into
24292 ## "div"s to p-wrap. Hence, we only get this partial wrapping.
24294 Paragraphs inside blockquotes/divs (no extra line breaks)
24296 <blockquote><div>Line one
24298 Line two</div></blockquote>
24300 <blockquote><div>Line one
24301 Line two</div></blockquote>
24306 Paragraphs inside blockquotes/divs (extra line break on open)
24311 Line two</div></blockquote>
24316 Line two</div></blockquote>
24321 Paragraphs inside blockquotes/divs (extra line break on close)
24323 <blockquote><div>Line one
24326 </div></blockquote>
24328 <blockquote><div>Line one
24331 </div></blockquote>
24336 Paragraphs inside blockquotes/divs (extra line break on open and close)
24342 </div></blockquote>
24348 </div></blockquote>
24353 Interwiki links trounced by replaceExternalLinks after early LinkHolderArray expansion
24355 wgLinkHolderBatchSize=0
24361 <p><a href="http://www.usemod.com/cgi-bin/mb.pl?1" class="extiw" title="meatball:1">meatball:1</a>
24362 <a href="http://www.usemod.com/cgi-bin/mb.pl?2" class="extiw" title="meatball:2">meatball:2</a>
24363 <a href="http://www.usemod.com/cgi-bin/mb.pl?3" class="extiw" title="meatball:3">meatball:3</a>
24368 Free external link invading image caption
24370 [[Image:Foobar.jpg|thumb|http://x|hello]]
24372 <div class="thumb tright"><div class="thumbinner" style="width:182px;"><a href="/wiki/File:Foobar.jpg" class="image"><img alt="" src="http://example.com/images/thumb/3/3a/Foobar.jpg/180px-Foobar.jpg" decoding="async" width="180" height="20" class="thumbimage" srcset="http://example.com/images/thumb/3/3a/Foobar.jpg/270px-Foobar.jpg 1.5x, http://example.com/images/thumb/3/3a/Foobar.jpg/360px-Foobar.jpg 2x" /></a> <div class="thumbcaption"><div class="magnify"><a href="/wiki/File:Foobar.jpg" class="internal" title="Enlarge"></a></div>hello</div></div></div>
24375 <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>
24379 T17196: localised external link numbers
24383 [http://en.wikipedia.org/]
24385 <p><a rel="nofollow" class="external autonumber" href="http://en.wikipedia.org/">[۱]</a>
24388 <p><a rel="mw:ExtLink" class="external autonumber" href="http://en.wikipedia.org/"></a></p>
24392 Multibyte character in padleft
24394 {{padleft:-Hello|7|Æ}}
24399 <p typeof="mw:Transclusion" data-mw='{"parts":[{"template":{"target":{"wt":"padleft:-Hello","function":"padleft"},"params":{"1":{"wt":"7"},"2":{"wt":"Æ"}},"i":0}}]}'>Æ-Hello</p>
24403 Multibyte character in padright
24405 {{padright:Hello-|7|Æ}}
24410 <p typeof="mw:Transclusion" data-mw='{"parts":[{"template":{"target":{"wt":"padright:Hello-","function":"padright"},"params":{"1":{"wt":"7"},"2":{"wt":"Æ"}},"i":0}}]}'>Hello-Æ</p>
24414 formatdate parser function
24416 {{#formatdate:2009-03-24}}
24418 <p><span class="mw-formatted-date" title="2009-03-24">2009-03-24</span>
24423 formatdate parser function, with default format
24425 {{#formatdate:2009-03-24|mdy}}
24427 <p><span class="mw-formatted-date" title="2009-03-24">March 24, 2009</span>
24432 Spacing of numbers in formatted dates
24434 {{#formatdate:January 15}}
24436 <p><span class="mw-formatted-date" title="01-15">January 15</span>
24441 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
24443 language=nl title=[[MediaWiki:Common.css]]
24445 {{#formatdate:2009-03-24|dmy}}
24447 <p><span class="mw-formatted-date" title="2009-03-24">24 March 2009</span>
24460 Edit comment with link
24464 I like the [[Main Page]] a lot
24466 I like the <a href="/wiki/Main_Page" title="Main Page">Main Page</a> a lot
24470 Edit comment with link and link text
24474 I like the [[Main Page|best pages]] a lot
24476 I like the <a href="/wiki/Main_Page" title="Main Page">best pages</a> a lot
24480 Edit comment with link and link text with suffix
24484 I like the [[Main Page|best page]]s a lot
24486 I like the <a href="/wiki/Main_Page" title="Main Page">best pages</a> a lot
24490 Edit comment with section link (non-local, eg in history list)
24492 comment title=[[Main Page]]
24494 /* External links */ removed bogus entries
24496 <span dir="auto"><span class="autocomment"><a href="/wiki/Main_Page#External_links" title="Main Page">→External links</a>: </span> removed bogus entries</span>
24500 Edit comment with section link and text before it (non-local, eg in history list)
24502 comment title=[[Main Page]]
24504 pre-comment text /* External links */ removed bogus entries
24506 pre-comment text <span dir="auto"><span class="autocomment"><a href="/wiki/Main_Page#External_links" title="Main Page">→External links</a>: </span> removed bogus entries</span>
24510 Edit comment with section link (local, eg in diff view)
24512 comment local title=[[Main Page]]
24514 /* External links */ removed bogus entries
24516 <span dir="auto"><span class="autocomment"><a href="#External_links">→External links</a>: </span> removed bogus entries</span>
24520 Edit comment with section link that has a link in it
24522 comment local title=[[Main Page]]
24526 <span dir="auto"><span class="autocomment"><a href="#A_link">→[[A link]]</a></span></span>
24530 Edit comment with section link that has a template in it
24532 comment local title=[[Main Page]]
24534 /* {{foobar|param}} */
24536 <span dir="auto"><span class="autocomment"><a href="#.7B.7Bfoobar.7Cparam.7D.7D">→{{foobar|param}}</a></span></span>
24540 Edit comment with subpage link (T16080)
24544 title=[[Subpage test]]
24546 Poked at a [[/subpage]] here...
24548 Poked at a <a href="/wiki/Subpage_test/subpage" title="Subpage test/subpage">/subpage</a> here...
24552 Edit comment with subpage link and link text (T16080)
24556 title=[[Subpage test]]
24558 Poked at a [[/subpage|neat little page]] here...
24560 Poked at a <a href="/wiki/Subpage_test/subpage" title="Subpage test/subpage">neat little page</a> here...
24564 Edit comment with bogus subpage link in non-subpage NS (T16080)
24567 title=[[Subpage test]]
24569 Poked at a [[/subpage]] here...
24571 Poked at a <a href="/index.php?title=/subpage&action=edit&redlink=1" class="new" title="/subpage (page does not exist)">/subpage</a> here...
24575 Edit comment with bare anchor link (local, as on diff)
24579 title=[[Main Page]]
24583 <a href="#section">#section</a>
24587 Edit comment with bare anchor link (non-local, as on history)
24590 title=[[Main Page]]
24594 <a href="/wiki/Main_Page#section" title="Main Page">#section</a>
24598 Anchor starting with underscore
24604 <p><a href="#_ref">One</a>
24607 <p><a rel="mw:WikiLink" href="./Foo#_ref" data-parsoid='{"stx":"piped","a":{"href":"./Foo#_ref"},"sa":{"href":"#_ref"}}'>One</a></p>
24611 Id starting with underscore
24613 <div id="_ref"></div>
24615 <div id="_ref"></div>
24620 Edit comment with link with more than one pipe (T99346)
24624 [[Main Page|Many|pipes]]
24626 <a href="/wiki/Main_Page" title="Main Page">Many|pipes</a>
24630 Complex edit comment with link with more than one pipe (T99346)
24634 Created page with "<noinclude>[[Category:Requests for permissions/Bot|{{subst:#titleparts:{{subst:PAGENAME}}|1|3}}]]</noinclude> === [[User:MineoBot|]] 8=== {{Request for permissions/links|Mineo..."
24636 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..."
24640 Space normalisation on autocomment (T24784)
24643 title=[[Main Page]]
24645 /* __hello__world__ */
24647 <span dir="auto"><span class="autocomment"><a href="/wiki/Main_Page#hello_world" title="Main Page">→__hello__world__</a></span></span>
24651 percent-encoding and + signs in comments (T28410)
24655 [[ABC%33D% ++]] [[ABC%33D% ++|+%20]]
24657 <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>
24660 # Parsoid doesn't support this yet: see T75581
24661 # but it *should* omit the 'src' attribute if the image is bad.
24662 # PHP side of tests was disabled in
24663 # mediawiki/core:6bd31e7d95161a6e88fa86df60871051da997c3c
24664 # because of issues in the PHP parserTests infrastructure
24665 # (but the output below is indeed what the PHP side emits)
24667 Bad images - basic functionality
24670 !! html/php+disabled
24672 <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>
24676 Bad images - T18039: text after bad image disappears
24681 !! html/php+disabled
24687 <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>
24692 Verify that displaytitle works (T24501) no displaytitle
24696 wgAllowDisplayTitle=true
24697 wgRestrictDisplayTitle=false
24699 this is not the the title
24702 <p>this is not the the title
24707 Verify that displaytitle works (T24501) RestrictDisplayTitle=false
24712 wgAllowDisplayTitle=true
24713 wgRestrictDisplayTitle=false
24715 this is not the the title
24716 {{DISPLAYTITLE:whatever}}
24719 <p>this is not the the title
24724 Verify that displaytitle works (T24501) RestrictDisplayTitle=true mismatch
24729 wgAllowDisplayTitle=true
24730 wgRestrictDisplayTitle=true
24732 this is not the the title
24733 {{DISPLAYTITLE:whatever}}
24736 <p>this is not the the title
24741 Verify that displaytitle works (T24501) RestrictDisplayTitle=true matching
24746 wgAllowDisplayTitle=true
24747 wgRestrictDisplayTitle=true
24749 this is not the the title
24750 {{DISPLAYTITLE:screen}}
24753 <p>this is not the the title
24758 Verify that displaytitle works (T24501) AllowDisplayTitle=false
24763 wgAllowDisplayTitle=false
24765 this is not the the title
24766 {{DISPLAYTITLE:screen}}
24769 <p>this is not the the title
24770 <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>
24775 Verify that displaytitle works (T24501) AllowDisplayTitle=false no DISPLAYTITLE
24780 wgAllowDisplayTitle=false
24782 this is not the the title
24785 <p>this is not the the title
24790 Verify that displaytitle handles inline CSS styles (T28547) - rejected value
24795 wgAllowDisplayTitle=true
24796 wgRestrictDisplayTitle=true
24798 this is not the the title
24799 {{DISPLAYTITLE:<span style="display: none;">s</span>creen}}
24801 <span style="/* attempt to bypass $wgRestrictDisplayTitle */">s</span>creen
24802 <p>this is not the the title
24807 Verify that displaytitle handles inline CSS styles (T28547) - accepted value
24812 wgAllowDisplayTitle=true
24813 wgRestrictDisplayTitle=true
24815 this is not the the title
24816 {{DISPLAYTITLE:<span style="color: red;">s</span>creen}}
24818 <span style="color: red;">s</span>creen
24819 <p>this is not the the title
24824 Page status indicators: Empty name is invalid
24828 <indicator name=" "></indicator>
24829 <indicator></indicator>
24831 <p><span class="error"><strong>Error:</strong> Page status indicators' <code>name</code> attribute must not be empty.</span>
24832 <span class="error"><strong>Error:</strong> Page status indicators' <code>name</code> attribute must not be empty.</span>
24837 Page status indicators: Weird syntaxes that are okay
24841 <indicator name="empty" />
24842 <indicator name="name"></indicator>
24851 Page status indicators: Torture test
24855 <indicator name="01">hello world</indicator>
24856 <indicator name="02">[[Main Page]]</indicator>
24857 <indicator name="03">[[File:Foobar.jpg|25px|link=]]</indicator>
24858 <indicator name="04">[[File:Foobar.jpg|25px]]</indicator>
24859 <indicator name="05">*foo
24861 <indicator name="06"><nowiki>foo</nowiki></indicator>
24862 <indicator name="07"> Preformatted</indicator>
24863 <indicator name="08"><div>Broken tag</indicator>
24864 <indicator name="09">{| class=wikitable
24867 <indicator name="10">Two
24869 paragraphs</indicator>
24872 02=<a href="/wiki/Main_Page" title="Main Page">Main Page</a>
24873 03=<img alt="Foobar.jpg" src="http://example.com/images/thumb/3/3a/Foobar.jpg/25px-Foobar.jpg" decoding="async" width="25" height="3" srcset="http://example.com/images/thumb/3/3a/Foobar.jpg/38px-Foobar.jpg 1.5x, http://example.com/images/thumb/3/3a/Foobar.jpg/50px-Foobar.jpg 2x" />
24874 04=<a href="/wiki/File:Foobar.jpg" class="image"><img alt="Foobar.jpg" src="http://example.com/images/thumb/3/3a/Foobar.jpg/25px-Foobar.jpg" decoding="async" width="25" height="3" srcset="http://example.com/images/thumb/3/3a/Foobar.jpg/38px-Foobar.jpg 1.5x, http://example.com/images/thumb/3/3a/Foobar.jpg/50px-Foobar.jpg 2x" /></a>
24875 05=<ul><li>foo</li>
24878 07=<pre>Preformatted
24880 08=<div>Broken tag</div>
24882 09=<table class="wikitable">
24899 preload: check <noinclude> and <includeonly>
24903 Hello <noinclude>cruel</noinclude><includeonly>kind</includeonly> world.
24909 preload: check <onlyinclude>
24913 Goodbye <onlyinclude>Hello world</onlyinclude>
24919 preload: can pass tags through if we want to
24923 <includeonly><</includeonly>includeonly>Hello world<includeonly><</includeonly>/includeonly>
24925 <includeonly>Hello world</includeonly>
24929 preload: check that it doesn't try to do tricks
24933 * <!-- Hello --> ''{{world}}'' {{<includeonly>subst:</includeonly>How are you}}{{ {{{|safesubst:}}} #if:1|2|3}}
24935 * <!-- Hello --> ''{{world}}'' {{subst:How are you}}{{ {{{|safesubst:}}} #if:1|2|3}}
24939 Play a bit with r67090 and T5158
24941 <div style="width:50% !important"> </div>
24942 <div style="width:50% !important"> </div>
24943 <div style="width:50% !important"> </div>
24944 <div style="border : solid;"> </div>
24946 <div style="width:50% !important"> </div>
24947 <div style="width:50% !important"> </div>
24948 <div style="width:50% !important"> </div>
24949 <div style="border : solid;"> </div>
24952 <div style="width:50% !important" data-parsoid='{"stx":"html"}'><span typeof="mw:Entity" data-parsoid='{"srcContent":" "}'> </span></div>
24953 <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>
24954 <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>
24955 <div style="border : solid;" data-parsoid='{"stx":"html"}'><span typeof="mw:Entity" data-parsoid='{"srcContent":" "}'> </span></div>
24960 French spaces in wikitext
24962 foo ! bar ? bat 50 % is less than 75 %.
24964 Hello : this ; is « something ‹ else › again »
24966 <p>foo ! bar ? bat 50 % is less than 75 %.
24967 </p><p>Hello : this ; is « something ‹ else › again »
24971 # It would be reasonable for Parsoid and PHP to differ here.
24972 # The PHP behavior is arguably a bug.
24974 Corner case: french spaces in definition list
24978 <dl><dt>foo </dt>
24983 T5158: Test for French spaces in attributes
24985 <br style=" clear : both ; " />
24987 <p><br style="clear : both ;" />
24992 HTML5 data attributes
24994 <span data-foo="bar">Baz</span>
24995 <p data-abc-def_hij="">Quuz</p>
24997 <p><span data-foo="bar">Baz</span>
24999 <p data-abc-def_hij="">Quuz</p>
25002 <p><span data-foo="bar" data-parsoid='{"stx":"html"}'>Baz</span></p>
25003 <p data-abc-def_hij="" data-parsoid='{"stx":"html"}'>Quuz</p>
25007 Strip reserved data attributes
25009 <div data-mw="foo" data-parsoid="bar" data-mw-someext="baz" data-ok="fred" data-ooui="xyzzy" data-bad:ns="ns">d</div>
25011 <div data-ok="fred">d</div>
25014 <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>
25018 percent-encoding and + signs in internal links (T28410)
25020 [[User:+%]] [[Page+title%]]
25021 [[%+]] [[%+|%20]] [[%+ ]] [[%+r]]
25022 [[%]] [[+]] [[File:%+abc%39|foo|[[bar]]]]
25023 [[%33%45]] [[%33%45+]]
25025 <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>
25026 <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>
25027 <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>
25028 <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>
25031 <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>
25032 <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>
25033 <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>
25034 <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>
25038 Special characters in embedded file links (T29679)
25040 [[File:Contains & ampersand.jpg]]
25041 [[File:Does not exist.jpg|Title with & ampersand]]
25043 <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>
25044 <a href="/index.php?title=Special:Upload&wpDestFile=Does_not_exist.jpg" class="new" title="File:Does not exist.jpg">Title with & ampersand</a>
25047 <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>
25048 <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>
25052 Confirm that 'apos' named character reference doesn't make it to output (not legal in HTML 4)
25054 Text's been normalized?
25056 <p>Text's been normalized?
25061 T21052 U+3000 IDEOGRAPHIC SPACE should terminate free external links
25063 http://www.example.org/ <-- U+3000 (vim: ^Vu3000)
25065 <p><a rel="nofollow" class="external free" href="http://www.example.org/">http://www.example.org/</a> <-- U+3000 (vim: ^Vu3000)
25070 T21052 U+3000 IDEOGRAPHIC SPACE should terminate bracketed external links
25072 [http://www.example.org/ ideograms]
25074 <p><a rel="nofollow" class="external text" href="http://www.example.org/">ideograms</a>
25079 T21052 U+3000 IDEOGRAPHIC SPACE should terminate external images links
25081 http://www.example.org/pic.png <-- U+3000 (vim: ^Vu3000)
25083 <p><img src="http://www.example.org/pic.png" alt="pic.png"/> <-- U+3000 (vim: ^Vu3000)
25107 T33098 Template which includes system messages which includes the template
25111 <p><span class="error">Template loop detected: <a href="/wiki/Template:Identical" title="Template:Identical">Template:Identical</a></span>
25112 <span class="error">Template loop detected: <a href="/wiki/Template:Identical" title="Template:Identical">Template:Identical</a></span>
25117 T33490 Turkish: ucfirst 'blah'
25128 T33490 Turkish: ucfirst 'ix'
25139 T33490 Turkish: lcfirst 'BLAH'
25150 T33490 Turkish: ucfırst (with a dotless i)
25156 <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>
25161 T33490 ucfırst (with a dotless i) with English language
25167 <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>
25171 # Note that Parsoid doesn't emit an explicit TOC.
25172 # Note also that the html2wt direction tends to emit an extra newline
25173 # between the __TOC__ magicword and the first heading unless *both*
25174 # the <meta> and the <h2> have a data-parsoid attribute set (even if
25178 T28375: TOC with italics
25180 title=[[Main Page]]
25183 ==''Lost'' episodes==
25185 <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>
25187 <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>
25191 <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>
25194 <meta property="mw:PageProp/toc" data-parsoid='{}'/>
25195 <h2 id="Lost_episodes" data-parsoid='{}'><i>Lost</i> episodes</h2>
25199 T28375: TOC with bold
25201 title=[[Main Page]]
25204 =='''should be bold''' then normal text==
25206 <div id="toc" class="toc"><input type="checkbox" role="button" id="toctogglecheckbox" class="toctogglecheckbox" style="display:none"/><div class="toctitle" lang="en" dir="ltr"><h2>Contents</h2><span class="toctogglespan"><label class="toctogglelabel" for="toctogglecheckbox"></label></span></div>
25208 <li class="toclevel-1 tocsection-1"><a href="#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>
25212 <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>
25215 <meta property="mw:PageProp/toc" data-parsoid='{}'/>
25216 <h2 id="should_be_bold_then_normal_text" data-parsoid='{}'><b>should be bold</b> then normal text</h2>
25220 T35845: Headings become cursive in TOC when they contain an image
25222 title=[[Main Page]]
25225 ==Image [[Image:foobar.jpg]]==
25227 <div id="toc" class="toc"><input type="checkbox" role="button" id="toctogglecheckbox" class="toctogglecheckbox" style="display:none"/><div class="toctitle" lang="en" dir="ltr"><h2>Contents</h2><span class="toctogglespan"><label class="toctogglelabel" for="toctogglecheckbox"></label></span></div>
25229 <li class="toclevel-1 tocsection-1"><a href="#Image"><span class="tocnumber">1</span> <span class="toctext">Image</span></a></li>
25233 <h2><span class="mw-headline" id="Image">Image <a href="/wiki/File:Foobar.jpg" class="image"><img alt="Foobar.jpg" src="http://example.com/images/3/3a/Foobar.jpg" decoding="async" width="1941" height="220" /></a></span><span class="mw-editsection"><span class="mw-editsection-bracket">[</span><a href="/index.php?title=Main_Page&action=edit&section=1" title="Edit section: Image">edit</a><span class="mw-editsection-bracket">]</span></span></h2>
25236 <meta property="mw:PageProp/toc" data-parsoid='{}'/>
25237 <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>
25241 T35845 (2): Headings become bold in TOC when they contain a blockquote
25243 title=[[Main Page]]
25246 ==<blockquote>Quote</blockquote>==
25248 <div id="toc" class="toc"><input type="checkbox" role="button" id="toctogglecheckbox" class="toctogglecheckbox" style="display:none"/><div class="toctitle" lang="en" dir="ltr"><h2>Contents</h2><span class="toctogglespan"><label class="toctogglelabel" for="toctogglecheckbox"></label></span></div>
25250 <li class="toclevel-1 tocsection-1"><a href="#Quote"><span class="tocnumber">1</span> <span class="toctext">Quote</span></a></li>
25254 <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>
25257 <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>
25259 <li class="toclevel-1 tocsection-1"><a href="#Quote"><span class="tocnumber">1</span> <span class="toctext">Quote</span></a></li>
25263 <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>
25265 <meta property="mw:PageProp/toc" data-parsoid='{}'/>
25266 <h2 id="Quote" data-parsoid='{}'><blockquote><p>Quote</p></blockquote></h2>
25270 Unclosed tags in TOC
25272 wgFragmentMode=[ 'html5', 'legacy' ]
25274 title=[[Main Page]]
25278 <small>Hanc marginis exiguitas non caperet.</small>
25281 <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>
25283 <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>
25287 <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>
25288 <p><small>Hanc marginis exiguitas non caperet.</small>
25292 <meta property="mw:PageProp/toc" data-parsoid='{}'/>
25293 <h2 id="Proof:_2_<_3" data-parsoid='{}'><span id="Proof:_2_.3C_3" typeof="mw:FallbackId"></span>Proof: 2 < 3</h2>
25294 <p><small>Hanc marginis exiguitas non caperet.</small>
25299 Multiple tags in TOC
25302 ==<i>Foo</i> <b>Bar</b>==
25304 ==<i>Foo</i> <blockquote>Bar</blockquote>==
25306 <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>
25308 <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>
25309 <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>
25313 <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>
25314 <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>
25317 <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>
25319 <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>
25320 <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>
25324 <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>
25325 <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>
25327 <meta property="mw:PageProp/toc" data-parsoid='{}'/>
25328 <h2 id="Foo_Bar" data-parsoid='{}'><i data-parsoid='{"stx":"html"}'>Foo</i> <b data-parsoid='{"stx":"html"}'>Bar</b></h2>
25330 <h2 id="Foo_Bar_2" data-parsoid='{}'><i data-parsoid='{"stx":"html"}'>Foo</i> <blockquote><p>Bar</p></blockquote></h2>
25333 # Don't expect Parsoid to roundtrip this until the php parser comes closer to
25334 # html5 tag parsing.
25336 Tags with parameters in TOC
25341 ==<sup class="in-h2">Hello</sup>==
25343 ==<sup class="a > b">Evilbye</sup>==
25345 <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>
25347 <li class="toclevel-1 tocsection-1"><a href="#Hello"><span class="tocnumber">1</span> <span class="toctext"><sup>Hello</sup></span></a></li>
25348 <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>
25352 <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>
25353 <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>
25356 <meta property="mw:PageProp/toc" />
25357 <h2 id="Hello"><sup class="in-h2" data-parsoid='{"stx":"html"}'>Hello</sup></h2>
25359 <h2 id='b">Evilbye'><span id="b.22.3EEvilbye" typeof="mw:FallbackId"></span><sup class="a " data-parsoid='{"stx":"html"}'> b">Evilbye</sup></h2>
25363 span tags with directionality in TOC
25366 ==<span dir="ltr">C++</span>==
25368 ==<span dir="rtl">זבנג!</span>==
25370 ==<span style="font-style: italic">The attributes on these span tags must be deleted from the TOC</span>==
25372 ==<span style="font-style: italic" dir="ltr">All attributes on these span tags must be deleted from the TOC</span>==
25374 ==<span dir="ltr" style="font-style: italic">Attributes after dir on these span tags must be deleted from the TOC</span>==
25376 <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>
25378 <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>
25379 <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>
25380 <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>
25381 <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>
25382 <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>
25386 <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>
25387 <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>
25388 <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>
25389 <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>
25390 <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>
25393 <meta property="mw:PageProp/toc" data-parsoid='{}'/>
25394 <h2 id="C++" data-parsoid='{}'><span id="C.2B.2B" typeof="mw:FallbackId"></span><span dir="ltr">C++</span></h2>
25395 <h2 id="זבנג!"><span id=".D7.96.D7.91.D7.A0.D7.92.21" typeof="mw:FallbackId"></span><span dir="rtl">זבנג!</span></h2>
25396 <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>
25397 <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>
25398 <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>
25402 T74884: bdi element in ToC
25405 ==<bdi>test</bdi>==
25407 <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>
25409 <li class="toclevel-1 tocsection-1"><a href="#test"><span class="tocnumber">1</span> <span class="toctext"><bdi>test</bdi></span></a></li>
25413 <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>
25416 <meta property="mw:PageProp/toc" data-parsoid='{}'/>
25417 <h2 id="test" data-parsoid='{}'><bdi>test</bdi></h2>
25421 T35715: s/strike element in ToC
25424 ==<s>test</s> test <strike>test</strike>==
25426 <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>
25428 <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>
25432 <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>
25435 <meta property="mw:PageProp/toc" data-parsoid='{}'/>
25436 <h2 id="test_test_test" data-parsoid='{}'><s>test</s> test <strike>test</strike></h2>
25440 T198618: style element in ToC
25445 ==<style>.foo {}</style>Style<style>.bar {}</style>==
25447 <div id="toc" class="toc"><input type="checkbox" role="button" id="toctogglecheckbox" class="toctogglecheckbox" style="display:none"/><div class="toctitle" lang="en" dir="ltr"><h2>Contents</h2><span class="toctogglespan"><label class="toctogglelabel" for="toctogglecheckbox"></label></span></div>
25449 <li class="toclevel-1 tocsection-1"><a href="#Style"><span class="tocnumber">1</span> <span class="toctext">Style</span></a></li>
25453 <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>
25456 <meta property="mw:PageProp/toc" data-parsoid="{}"/>
25457 <h2 id="Style" data-parsoid="{}"><style typeof="mw:Extension/style" data-mw='{"name":"style","attrs":{},"body":{"extsrc":".foo {}"}}'>.foo {}</style>Style<style typeof="mw:Extension/style" data-mw='{"name":"style","attrs":{},"body":{"extsrc":".bar {}"}}'>.bar {}</style></h2>
25461 T198618: script element in ToC
25466 ==<html><script>alert(1);</script></html>Script<html><script>alert(1);</script></html>==
25468 <div id="toc" class="toc"><input type="checkbox" role="button" id="toctogglecheckbox" class="toctogglecheckbox" style="display:none"/><div class="toctitle" lang="en" dir="ltr"><h2>Contents</h2><span class="toctogglespan"><label class="toctogglelabel" for="toctogglecheckbox"></label></span></div>
25470 <li class="toclevel-1 tocsection-1"><a href="#Script"><span class="tocnumber">1</span> <span class="toctext">Script</span></a></li>
25474 <h2><span class="mw-headline" id="Script"><script>alert(1);</script>Script<script>alert(1);</script></span><span class="mw-editsection"><span class="mw-editsection-bracket">[</span><a href="/index.php?title=Parser_test&action=edit&section=1" title="Edit section: Script">edit</a><span class="mw-editsection-bracket">]</span></span></h2>
25477 <meta property="mw:PageProp/toc" data-parsoid='{}'/>
25478 <h2 id="Script" data-parsoid='{}'><script typeof="mw:Extension/html" about="#mwt4" data-mw='{"name":"html","attrs":{},"body":{"extsrc":"<script>alert(1);</script>"}}'>alert(1);</script>Script<script typeof="mw:Extension/html" about="#mwt6" data-mw='{"name":"html","attrs":{},"body":{"extsrc":"<script>alert(1);</script>"}}'>alert(1);</script></h2>
25482 Empty <p> tag in TOC, removed by Sanitizer (T92892)
25487 <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>
25489 <li class="toclevel-1 tocsection-1"><a href="#x"><span class="tocnumber">1</span> <span class="toctext">x</span></a></li>
25493 <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>
25496 <meta property="mw:PageProp/toc" data-parsoid='{}'/>
25497 <h2 id="x" data-parsoid='{}'>x</h2>
25503 == {{int:headline_sample}} ==
25507 T34057: Title needed when expanding <h> nodes.
25509 title=[[Main Page]]
25513 <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>
25518 Strip marker in urlencode
25520 {{urlencode:x<nowiki/>y}}
25521 {{urlencode:x<nowiki/>y|wiki}}
25522 {{urlencode:x<nowiki/>y|path}}
25523 {{urlencode:x<pre id="one">two</pre>y}}
25551 Strip marker in formatNum
25553 {{formatnum:1<nowiki/>2}}
25554 {{formatnum:1<nowiki/>2|R}}
25562 Check noCommafy in formatNum
25566 {{formatnum:123456.78}}
25567 {{formatnum:123456.78|NOSEP}}
25575 Wrong option for formatNum (T58199)
25577 {{formatnum:1,234.56|Random}}
25578 {{formatnum:1,234.56|EVERYTHING}}
25579 {{formatnum:1234.56|any argument that has the string 'NOSEP'}}
25588 Strip marker in grammar
25592 {{grammar:elative|foo<nowiki/>bar}}
25599 Strip marker in padleft
25601 {{padleft:|2|x<nowiki/>y}}
25608 Strip marker in padright
25610 {{padright:|2|x<nowiki/>y}}
25617 Strip marker in anchorencode
25619 {{anchorencode:x<nowiki/>y}}
25624 <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>
25628 nowiki inside link inside heading (T20295)
25630 ==[[foo|x<nowiki>y</nowiki>z]]==
25632 <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>
25637 new support for bdi element (T33817)
25639 <p dir="rtl" lang="he">ולדימיר לנין (ברוסית: <bdi lang="ru">Владимир Ленин</bdi>, 24 באפריל 1870–22 בינואר 1924) הוא מנהיג פוליטי קומוניסטי רוסי.</p>
25641 <p dir="rtl" lang="he">ולדימיר לנין (ברוסית: <bdi lang="ru">Владимир Ленин</bdi>, 24 באפריל 1870–22 בינואר 1924) הוא מנהיג פוליטי קומוניסטי רוסי.</p>
25646 Ignore pipe between table row attributes
25650 |- id=foo | style='color: red'
25658 <tr id="foo" style="color: red">
25665 Language parser function
25674 Padleft and padright (default 0-padding)
25683 <p><span typeof="mw:Transclusion" data-mw='{"parts":[{"template":{"target":{"wt":"padleft:xyz","function":"padleft"},"params":{"1":{"wt":"5"}},"i":0}}]}'>00xyz</span>
25684 <span typeof="mw:Transclusion" data-mw='{"parts":[{"template":{"target":{"wt":"padright:xyz","function":"padright"},"params":{"1":{"wt":"5"}},"i":0}}]}'>xyz00</span></p>
25688 Padleft and padright (partial fill)
25690 {{padleft:xyz|6|ab}}
25691 {{padright:xyz|6|ab}}
25697 <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>
25698 <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>
25702 Padleft and padright as substr
25704 {{padleft:|3|abcde}}
25705 {{padright:|3|abcde}}
25711 <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>
25712 <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>
25716 Padleft and padright with non-numerical length (T180403)
25718 {{padleft:abcdef|junk}}
25719 {{padright:abcdef|junk}}
25727 Special parser function
25729 {{#special:RandomPage}}
25730 {{#special:BaDtItLe}}
25731 {{#special:Foobar}}
25740 T36939 - Case insensitive link parsing ([HttP://])
25742 [HttP://MediaWiki.Org/]
25744 <p><a rel="nofollow" class="external autonumber" href="HttP://MediaWiki.Org/">[1]</a>
25747 <p><a rel="mw:ExtLink" class="external autonumber" href="HttP://MediaWiki.Org/"></a></p>
25751 T36939 - Case insensitive link parsing ([HttP:// title])
25753 [HttP://MediaWiki.Org/ MediaWiki]
25755 <p><a rel="nofollow" class="external text" href="HttP://MediaWiki.Org/">MediaWiki</a>
25760 T36939 - Case insensitive link parsing (HttP://)
25762 HttP://MediaWiki.Org/
25764 <p><a rel="nofollow" class="external free" href="HttP://MediaWiki.Org/">HttP://MediaWiki.Org/</a>
25767 <p><a rel="mw:ExtLink" class="external free" href="HttP://MediaWiki.Org/">HttP://MediaWiki.Org/</a></p>
25785 <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>
25786 <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>
25787 <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>
25788 <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>
25789 <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>
25795 ### Parsoid-specific tests
25796 ### Parsoid-PHP parser incompatibilities
25799 1. SOL-sensitive wikitext tokens as template-args
25801 parsoid=wt2html,wt2wt
25807 <ul><li>a</li></ul>
25808 <ol><li>a</li></ol>
25809 <dl><dd>a</dd></dl>
25811 <span about="#mwt1" typeof="mw:Transclusion">
25812 </span><ul about="#mwt1"><li>a</li>
25814 <span about="#mwt2" typeof="mw:Transclusion">
25815 </span><ol about="#mwt2"><li>a</li>
25817 <span about="#mwt3" typeof="mw:Transclusion">
25818 </span><dl about="#mwt3"><dd>a</dd>
25822 #### -----------------------------------------------------------------
25823 #### Parsoid-specific functionality tests
25824 #### -----------------------------------------------------------------
25826 # T65642/T68749: Formatting elt fixup around images.
25827 # We know wt2wt will fail, but we expect selser to pass.
25828 # Due to the nature of our testing, wt2wt and selser tests will enter the
25829 # blacklist and we'll catch selser regressions based on changes to the
25830 # blacklist entries for selser tests.
25832 1. Treebuilder fixup of formatting elt
25834 parsoid=wt2html,wt2wt
25839 [[Image:Foobar.jpg|right|Test]]
25847 </small></p><small>
25848 <div class="floatright"><a href="/wiki/File:Foobar.jpg" class="image" title="Test"><img alt="Test" src="http://example.com/images/3/3a/Foobar.jpg" decoding="async" width="1941" height="220" /></a></div>
25849 </small><p><small></small>
25851 </td></tr></tbody></table>
25855 <p><small data-parsoid='{"stx":"html","autoInsertedEnd":true}'></small></p><small data-parsoid='{"stx":"html","autoInsertedEnd":true,"autoInsertedStart":true}'>
25856 <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>
25857 <p><small data-parsoid='{"stx":"html","autoInsertedStart":true}'></small></p></td></tr>
25862 2. Treebuilder fixup of formatting elt
25864 parsoid=wt2html,wt2wt
25866 '''foo[[File:Foobar.jpg|thumb|caption]]bar'''
25868 <small>[[Image:Foobar.jpg|right|300px]]</small>
25870 <p><b>foo</b></p><b><div class="thumb tright"><div class="thumbinner" style="width:182px;"><a href="/wiki/File:Foobar.jpg" class="image"><img alt="" src="http://example.com/images/thumb/3/3a/Foobar.jpg/180px-Foobar.jpg" decoding="async" width="180" height="20" class="thumbimage" srcset="http://example.com/images/thumb/3/3a/Foobar.jpg/270px-Foobar.jpg 1.5x, http://example.com/images/thumb/3/3a/Foobar.jpg/360px-Foobar.jpg 2x" /></a> <div class="thumbcaption"><div class="magnify"><a href="/wiki/File:Foobar.jpg" class="internal" title="Enlarge"></a></div>caption</div></div></div></b><p><b>bar</b>
25871 </p><small><div class="floatright"><a href="/wiki/File:Foobar.jpg" class="image"><img alt="Foobar.jpg" src="http://example.com/images/thumb/3/3a/Foobar.jpg/300px-Foobar.jpg" decoding="async" width="300" height="34" srcset="http://example.com/images/thumb/3/3a/Foobar.jpg/450px-Foobar.jpg 1.5x, http://example.com/images/thumb/3/3a/Foobar.jpg/600px-Foobar.jpg 2x" /></a></div></small>
25873 <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>
25875 <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>
25879 3. Treebuilder fixup of formatting elt
25881 parsoid=wt2html,wt2wt
25883 <small>'''foo[[File:Foobar.jpg|thumb|caption]]bar'''</small>
25885 <p><small><b>foo</b></small></p><small><b><div class="thumb tright"><div class="thumbinner" style="width:182px;"><a href="/wiki/File:Foobar.jpg" class="image"><img alt="" src="http://example.com/images/thumb/3/3a/Foobar.jpg/180px-Foobar.jpg" decoding="async" width="180" height="20" class="thumbimage" srcset="http://example.com/images/thumb/3/3a/Foobar.jpg/270px-Foobar.jpg 1.5x, http://example.com/images/thumb/3/3a/Foobar.jpg/360px-Foobar.jpg 2x" /></a> <div class="thumbcaption"><div class="magnify"><a href="/wiki/File:Foobar.jpg" class="internal" title="Enlarge"></a></div>caption</div></div></div></b></small><p><small><b>bar</b></small>
25888 <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>
25892 4. Treebuilder fixup of formatting elt: formatting tags around captionless images
25894 parsoid=wt2html,wt2wt
25896 '''<small>[[Image:Foobar.jpg|right|300px]]</small>'''
25898 <b><small><div class="floatright"><a href="/wiki/File:Foobar.jpg" class="image"><img alt="Foobar.jpg" src="http://example.com/images/thumb/3/3a/Foobar.jpg/300px-Foobar.jpg" decoding="async" width="300" height="34" srcset="http://example.com/images/thumb/3/3a/Foobar.jpg/450px-Foobar.jpg 1.5x, http://example.com/images/thumb/3/3a/Foobar.jpg/600px-Foobar.jpg 2x" /></a></div></small></b>
25900 <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>
25903 #### ----------------------------------------------------------------
25904 #### Parsoid-only testing of Parsoid's impl of LST
25905 #### Not implemented yet, see
25906 #### https://www.mediawiki.org/wiki/Parsoid/HTML_based_LST
25907 #### ----------------------------------------------------------------
25909 ## We still need to support serializing the older format while content is stored.
25911 LST Sections: Backwards compatibility
25914 "suppressErrors": true,
25915 "modes": ["html2wt"]
25918 <section begin="2011-05-16" />
25919 <section end="2014-04-10 (MW 1.23wmf22)" />
25921 <p><meta typeof="mw:Extension/LabeledSectionTransclusion/begin" content="2011-05-16"/>
25922 <meta typeof="mw:Extension/LabeledSectionTransclusion/end" content="2014-04-10 (MW 1.23wmf22)"/></p>
25926 LST Sections: Newfangled approach
25928 <section begin="2011-05-16" />
25929 <section end="2014-04-10 (MW 1.23wmf22)" />
25931 <p><span typeof="mw:Extension/section" about="#mwt4" data-mw='{"name":"section","attrs":{"begin":"2011-05-16"}}'>
25933 <span typeof="mw:Extension/section" about="#mwt6" data-mw='{"name":"section","attrs":{"end":"2014-04-10 (MW 1.23wmf22)"}}'>
25937 #--------- Test stripping of empty nodes in template content ----------
25940 Empty LI and TR nodes should be stripped from template content
25945 <ul about="#mwt1" typeof="mw:Transclusion" data-mw='{"parts":[{"template":{"target":{"wt":"EmptyLITest","href":"./Template:EmptyLITest"},"params":{},"i":0}}]}'>
25949 <table about="#mwt2" typeof="mw:Transclusion" data-mw='{"parts":[{"template":{"target":{"wt":"EmptyTRTest","href":"./Template:EmptyTRTest"},"params":{},"i":0}}]}'>
25962 Empty LI and TR nodes should not be stripped from top-level content
25976 <li class='mw-empty-elt'></li>
25981 <tr class='mw-empty-elt'></tr>
25990 Empty TR nodes should not be stripped if they have any attributes set
25992 {{EmptyTRWithHTMLAttrTest}}
25994 <table about="#mwt1" typeof="mw:Transclusion" data-mw='{"parts":[{"template":{"target":{"wt":"EmptyTRWithHTMLAttrTest","href":"./Template:EmptyTRWithHTMLAttrTest"},"params":{},"i":0}}]}'>
25995 <tr align='center'></tr>
25996 <tr><td>foo</td></tr>
25997 <tr align='center'></tr>
25998 <tr><td>bar</td></tr>
26002 #### ----------------------------------------------------------------
26003 #### The following section of tests are primarily to test
26004 #### wikitext escaping capabilities of Parsoid. Given that
26005 #### escaping can be done any number of ways, the wikitext (input)
26006 #### is always adjusted to reflect how Parsoid adds nowiki
26009 #### We are marking several tests as parsoid-only since the
26010 #### HTML in the result section is different from what the
26011 #### PHP parser generates for it.
26012 #### ----------------------------------------------------------------
26015 #### --------------- Headings ---------------
26017 #### 1. Nested inside html <h1>=foo=</h1>
26018 #### 2. Outside heading nest on a single line <h1>foo</h1>*bar
26019 #### 3. Nested inside html with wikitext split by html tags
26020 #### 4. No escape needed
26021 #### 5. Empty headings <h1></h1>
26022 #### 6. Heading chars in SOL context
26023 #### ----------------------------------------
26025 Headings: 0. Unnested
26035 <p>=foo<i>a</i>=</p>
26037 <nowiki>=foo=</nowiki>
26039 <nowiki> </nowiki>=foo=
26041 <nowiki>=foo=</nowiki>
26043 =foo''a''<nowiki>=</nowiki>
26046 # New headings and existing headings are handled differently
26048 Headings: 1. Nested inside html
26056 <h1 data-parsoid=''>=foo=</h1>
26057 <h2 data-parsoid=''>=foo=</h2>
26058 <h3 data-parsoid=''>=foo=</h3>
26059 <h4 data-parsoid=''>=foo=</h4>
26060 <h5 data-parsoid=''>=foo=</h5>
26061 <h6 data-parsoid=''>=foo=</h6>
26069 =<nowiki>=foo=</nowiki>=
26070 ==<nowiki>=foo=</nowiki>==
26071 ===<nowiki>=foo=</nowiki>===
26072 ====<nowiki>=foo=</nowiki>====
26073 =====<nowiki>=foo=</nowiki>=====
26074 ======<nowiki>=foo=</nowiki>======
26079 Headings: 2. Outside heading nest on a single line <h1>foo</h1>*bar
26088 <nowiki>*</nowiki>bar
26094 <nowiki>=bar=</nowiki>
26098 Headings: 3. Nested inside html with wikitext split by html tags
26102 <h1>=<b>bold</b>foo=</h1>
26104 = ='''bold'''foo= =
26108 Headings: 4a. No escaping needed (testing just h1 and h2)
26119 <h1><i>=</i>foo=</h1>
26139 Headings: 4b. No escaping needed (inside p-tags)
26156 Headings: 4c. Short headings (1)
26163 <nowiki>===</nowiki>
26169 # in the html2wt direction we emit '= = =' or '=<nowiki>=</nowiki>='
26171 Headings: 4d. Short headings (2)
26173 parsoid=wt2html,html2html
26184 <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>
26185 <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>
26186 <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>
26191 <h1 id="="><span id=".3D" typeof="mw:FallbackId"></span>=</h1>
26192 <h1 id="=="><span id=".3D.3D" typeof="mw:FallbackId"></span>==</h1>
26193 <h2 id="=_2"><span id=".3D_2" typeof="mw:FallbackId"></span>=</h2>
26197 Headings: 5. Empty headings
26201 <h1 data-parsoid='{}'></h1>
26203 <h2 data-parsoid='{}'></h2>
26205 <h3 data-parsoid='{}'></h3>
26207 <h4 data-parsoid='{}'></h4>
26209 <h5 data-parsoid='{}'></h5>
26211 <h6 data-parsoid='{}'></h6>
26221 =====<nowiki/>=====
26223 ======<nowiki/>======
26227 Headings: 6a. Heading chars in SOL context (with trailing spaces)
26237 <nowiki>=a=</nowiki>
26239 <nowiki>=a=</nowiki>
26241 <nowiki>=a=</nowiki>
26245 Headings: 6b. Heading chars in SOL context (with trailing newlines)
26258 <nowiki>=a=</nowiki>
26261 <nowiki>=a=</nowiki>
26264 <nowiki>=a=</nowiki>
26269 Headings: 6c. Heading chars in SOL context (leading newline break)
26277 <nowiki>=b=</nowiki>
26281 Headings: 6d. Heading chars in SOL context (with interspersed comments)
26285 <!--c0--><p>=a=</p>
26287 <!--c1--><p>=a=</p> <!--c2--> <!--c3-->
26289 <!--c0--><nowiki>=a=</nowiki>
26291 <!--c1--><nowiki>=a=</nowiki> <!--c2--> <!--c3-->
26295 Headings: 6d. Heading chars in SOL context (No escaping needed)
26305 Headings: 7. Insert a newline between new content and headings
26311 <h2 data-parsoid='{}'>A</h2>
26312 <p data-parsoid='{}'>a</p>
26323 Headings: Used as horizontal rule
26325 wgFragmentMode=[ 'html5', 'legacy' ]
26331 <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>
26334 <h6 id="==="><span id=".3D.3D.3D" typeof="mw:FallbackId"></span>===</h6>
26337 #### --------------- Lists ---------------
26338 #### 0. Outside nests (*foo, etc.)
26339 #### 1. Nested inside html <ul><li>*foo</li></ul>
26340 #### 2. Inside definition lists
26341 #### 3. Only bullets at start should be escaped
26342 #### 4. No escapes needed
26343 #### 5. No unnecessary escapes
26344 #### 6. Escape bullets in SOL position
26345 #### 7. Escape bullets in a multi-line context
26346 #### ----------------------------------------
26349 Lists: 0. Outside nests
26359 <nowiki>*</nowiki>foo
26361 <nowiki>#</nowiki>foo
26363 <nowiki>;</nowiki>Foo<nowiki>:</nowiki>bar
26366 ## Making these next 3 tests Parsoid-only since they are html2wt tests
26367 ## to test wikitext escaping, and insignificant whitespace diffs
26368 ## cause PHP parser tests to barf
26370 Lists: 1. Nested inside html (No unnecessary escapes)
26379 <li data-parsoid='{}'>*foo</li>
26380 <li data-parsoid='{}'>#foo</li>
26381 <li data-parsoid='{}'>:foo</li>
26382 <li data-parsoid='{}'>;foo</li>
26390 <li data-parsoid='{}'>*foo</li>
26391 <li data-parsoid='{}'>#foo</li>
26392 <li data-parsoid='{}'>:foo</li>
26393 <li data-parsoid='{}'>;foo</li>
26400 *<nowiki>*foo</nowiki>
26401 *<nowiki>#foo</nowiki>
26402 *<nowiki>:foo</nowiki>
26403 *<nowiki>;foo</nowiki>
26409 #<nowiki>*foo</nowiki>
26410 #<nowiki>#foo</nowiki>
26411 #<nowiki>:foo</nowiki>
26412 #<nowiki>;foo</nowiki>
26416 Lists: 2. Inside definition lists
26420 <dl><dt>;foo</dt></dl>
26421 <dl><dt>:foo</dt></dl>
26424 <dl><dd>:foo</dd></dl>
26428 ; <nowiki>:foo</nowiki>
26430 ; <nowiki>:foo</nowiki>
26437 Lists: 3. Only bullets at start of text in wikitext-generated HTML should be escaped
26443 <li data-parsoid='{}'>*foo<i>it</i>*bar</li>
26447 *<nowiki>*foo</nowiki>''it''*bar
26451 Lists: 4. No escapes needed
26464 <li><a rel="mw:WikiLink" href="Foo" title="Foo">Foo</a>: bar
26468 <li><a rel="mw:WikiLink" href="Foo" title="Foo">Foo</a>*bar
26482 Lists: 5. No unnecessary escapes
26486 <ul><li> bar <span>[[foo]]</span></li></ul>
26487 <ul><li> =bar <span>[[foo]]</span></li></ul>
26488 <ul><li> [[bar <span>[[foo]]</span></li></ul>
26489 <ul><li> ]]bar <span>[[foo]]</span></li></ul>
26490 <ul><li> =bar <span>foo]]</span>=</li></ul>
26491 <ul><li> <s></s>: a</li></ul>
26492 <ul><li> <i>* foo</i></li></ul>
26495 * bar <span><nowiki>[[foo]]</nowiki></span>
26497 * =bar <span><nowiki>[[foo]]</nowiki></span>
26499 * [[bar <span><nowiki>[[foo]]</nowiki></span>
26501 * ]]bar <span><nowiki>[[foo]]</nowiki></span>
26503 * =bar <span>foo]]</span>=
26511 Lists: 6. Escape bullets in SOL position
26515 <p><!--cmt-->*foo</p>
26517 <!--cmt--><nowiki>*</nowiki>foo
26521 Lists: 7. Escape bullets in a multi-line context
26530 <nowiki>*</nowiki>b
26534 Lists: 8. Escape colons only if not present in tags
26538 <dl><dt>a:b<i>c:d</i></dt></dl>
26540 ; <nowiki>a:b</nowiki>''c:d''
26543 #### --------------- HRs ---------------
26544 #### 1. Single line
26545 #### -----------------------------------
26548 HRs: 1. Single line
26556 ----<nowiki>----</nowiki>
26561 #### --------------- Tables ---------------
26562 #### 1a. Simple example
26563 #### 1b. No escaping needed (!foo)
26564 #### 1c. No escaping needed (|foo)
26565 #### 1d. No escaping needed (|}foo)
26567 #### 2a. Nested in td (<td>foo|bar</td>)
26568 #### 2b. Nested in td (<td>foo||bar</td>)
26569 #### 2c. Nested in td -- no escaping needed(<td>foo!!bar</td>)
26571 #### 3a. Nested in th (<th>foo!bar</th>)
26572 #### 3b. Nested in th (<th>foo!!bar</th>)
26573 #### 3c. Nested in th -- no escaping needed(<th>foo||bar</th>)
26577 #### 4c. No escaping needed
26578 #### --------------------------------------
26581 Tables: 1a. Simple example
26589 <nowiki>{|</nowiki>
26594 Tables: 1b. No escaping needed
26605 Tables: 1c. No escaping needed
26616 Tables: 1d. No escaping needed
26627 Tables: 2a. Nested in td
26632 <td>foo|bar</td></tr>
26633 <tr><td>x<div>a|b</div></td>
26637 |<nowiki>foo|bar</nowiki>
26639 |x<div><nowiki>a|b</nowiki></div>
26647 <td>x<div>a|b</div>
26648 </td></tr></tbody></table>
26652 Tables: 2b. Nested in td
26658 <td>a<i>b||c</i></td>
26659 <td>a<i><div>b||c</div></i></td>
26660 </tr></tbody></table>
26663 |<nowiki>foo||bar</nowiki>
26664 |a''<nowiki>b||c</nowiki>''
26665 |a''<div><nowiki>b||c</nowiki></div>''
26674 <td>a<i><div>b||c</div></i>
26680 Tables: 2c. Nested in td -- no escaping needed
26696 Tables: 3a. Nested in th
26712 Tables: 3b. Nested in th
26717 <tr><th>foo!!bar</th>
26718 <th><i>foo|bar</i></th>
26719 <th><i>foo!!bar</i></th>
26720 <th><i><span>foo!!bar</span></i></th>
26721 </tr></tbody></table>
26724 !<nowiki>foo!!bar</nowiki>
26725 !''<nowiki>foo|bar</nowiki>''
26726 !''<nowiki>foo!!bar</nowiki>''
26727 !''<span><nowiki>foo!!bar</nowiki></span>''
26736 <th><i>foo!!bar</i>
26738 <th><i><span>foo!!bar</span></i>
26744 Tables: 3c. Nested in th
26749 <tr><th>foo||bar</th>
26750 <th><span typeof="mw:Nowiki">foo||bar</span></th>
26751 </tr></tbody></table>
26754 !<nowiki>foo||bar</nowiki>
26755 !<nowiki>foo||bar</nowiki>
26768 Tables: 4a. Escape -
26784 |<nowiki>-bar</nowiki>
26789 Tables: 4b. Escape +
26805 |<nowiki>+bar</nowiki>
26810 Tables: 4c. No escaping needed
26815 <tr><td>foo-bar</td><td>foo+bar</td></tr>
26816 <tr><td><i>foo</i>-bar</td><td><i>foo</i>+bar</td></tr>
26822 <div>a|b</div></td>
26867 Tables: 4d. No escaping needed
26872 <tbody><tr><td><a rel="mw:WikiLink" href="./Foo" title="Foo">Foo</a>-bar</td>
26873 <td data-parsoid='{"startTagSrc":"|","attrSepSrc":"|"}'>+1</td>
26874 <td data-parsoid='{"startTagSrc":"|","attrSepSrc":"|"}'>-2</td></tr>
26885 <td><a href="/wiki/Foo" title="Foo">Foo</a>-bar
26895 Tables: 4e. Escape }
26900 <tr><td>}</td></tr>
26901 <tr><td>x</td><td data-parsoid='{"stx":"row"}'>}</td></tr></table>
26905 |<nowiki>}</nowiki>
26922 Tables: 5. Empty table cells should get whitespace to avoid need for nowikis
26926 <table><tr><td></td><td align="center" data-parsoid='{"stx":"row"}'></td><td data-parsoid='{"stx":"row"}'></td></tr></table>
26928 <table><tr><td></td><td align="center"></td><td></td></tr></table>
26930 <table><tr><td></td><td align="center" data-parsoid='{"stx":"row", "startTagSrc":"{{!}}{{!}}"}'></td><td data-parsoid='{"stx":"row"}'></td></tr></table>
26932 <table><tr><th></th><th align="center" data-parsoid='{"stx":"row"}'></th><th data-parsoid='{"stx":"row"}'></th></tr></table>
26935 | || align="center" | ||
26945 | {{!}}{{!}} align="center" | ||
26949 ! !! align="center" | !!
26955 <td align="center"></td>
26957 </td></tr></tbody></table>
26962 <td align="center">
26965 </td></tr></tbody></table>
26969 <td align="center"></td>
26971 </td></tr></tbody></table>
26975 <th align="center"></th>
26977 </th></tr></tbody></table>
26981 T97430: Don't emit empty nowiki pairs around marker meta tags
26985 <p>*This is a long sentence here that will make the nowiki algo split up the nowikis into multiple pairs
26986 |** Make this another long long long sentence forcing the nowiki algo to split up the nowikis.</p>
26988 <nowiki>*</nowiki>This is a long sentence here that will make the nowiki algo split up the nowikis into multiple pairs
26989 |** Make this another long long long sentence forcing the nowiki algo to split up the nowikis.
26993 Unclosed xmlish element in table line shouldn't eat end delimiters
26998 <tbody><tr><td> <foo</td>
26999 <td> bar></td></tr>
27016 #### --------------- Links ----------------
27017 #### 1. Quote marks in link text
27018 #### 2. Wikilinks: Escapes needed
27019 #### 3. Wikilinks: No escapes needed
27020 #### 4. Extlinks: Escapes needed
27021 #### 5. Extlinks: No escapes needed
27022 #### --------------------------------------
27024 Links 1. WikiLinks: No escapes needed
27028 <p><a rel="mw:WikiLink" href="Foo" title="Foo">Foo<i>boo</i></a>
27029 <a rel="mw:WikiLink" href="Foo" title="Foo">[Foobar]</a>
27030 <a rel="mw:WikiLink" href="Foo" title="Foo">x [Foobar] x</a></p>
27034 [[Foo|x [Foobar] x]]
27036 <p><a href="/wiki/Foo" title="Foo">Foo<i>boo</i></a>
27037 <a href="/wiki/Foo" title="Foo">[Foobar]</a>
27038 <a href="/wiki/Foo" title="Foo">x [Foobar] x</a>
27043 Links 2. WikiLinks: Escapes needed
27047 <a href="Foo" rel="mw:WikiLink">Foobar]</a>
27048 <a href="Foo" rel="mw:WikiLink">x [http://google.com g] x</a>
27049 <a href="Foo" rel="mw:WikiLink">[[Bar]]</a>
27050 <a href="Foo" rel="mw:WikiLink">x [[Bar]] x</a>
27051 <a href="Foo" rel="mw:WikiLink">|Bar</a>
27052 <a href="Foo" rel="mw:WikiLink">]]bar</a>
27053 <a href="Foo" rel="mw:WikiLink">[[bar</a>
27054 <a href="Foo" rel="mw:WikiLink">x [[ y</a>
27055 <a href="Foo" rel="mw:WikiLink">x ]] y</a>
27056 <a href="Foo" rel="mw:WikiLink">x ]] y [[ z</a>
27058 [[Foo|<nowiki>Foobar]</nowiki>]]
27059 [[Foo|x <nowiki>[http://google.com g]</nowiki> x]]
27060 [[Foo|<nowiki>[[Bar]]</nowiki>]]
27061 [[Foo|<nowiki>x [[Bar]] x</nowiki>]]
27062 [[Foo|<nowiki>|Bar</nowiki>]]
27063 [[Foo|<nowiki>]]bar</nowiki>]]
27064 [[Foo|<nowiki>[[bar</nowiki>]]
27065 [[Foo|<nowiki>x [[ y</nowiki>]]
27066 [[Foo|<nowiki>x ]] y</nowiki>]]
27067 [[Foo|<nowiki>x ]] y [[ z</nowiki>]]
27069 <p><a href="/wiki/Foo" title="Foo">Foobar]</a>
27070 <a href="/wiki/Foo" title="Foo">x [http://google.com g] x</a>
27071 <a href="/wiki/Foo" title="Foo">[[Bar]]</a>
27072 <a href="/wiki/Foo" title="Foo">x [[Bar]] x</a>
27073 <a href="/wiki/Foo" title="Foo">|Bar</a>
27074 <a href="/wiki/Foo" title="Foo">]]bar</a>
27075 <a href="/wiki/Foo" title="Foo">[[bar</a>
27076 <a href="/wiki/Foo" title="Foo">x [[ y</a>
27077 <a href="/wiki/Foo" title="Foo">x ]] y</a>
27078 <a href="/wiki/Foo" title="Foo">x ]] y [[ z</a>
27083 Links 3. WikiLinks: No escapes needed
27087 <p><a rel="mw:WikiLink" href="Foo">[Foobar</a>
27088 <a rel="mw:WikiLink" href="Foo" title="Foo">foo|bar</a></p>
27093 <p><a href="/wiki/Foo" title="Foo">[Foobar</a>
27094 <a href="/wiki/Foo" title="Foo">foo|bar</a>
27099 Links 4. ExtLinks: Escapes needed
27103 <p><a rel="mw:ExtLink" href="http://google.com">[google]</a>
27104 <a rel="mw:ExtLink" href="http://google.com">google]</a>
27105 <a rel="mw:ExtLink" href="http://google.com">goog] le</a></p>
27106 <p>[http://google.com]</p>
27107 <p>[http://google.com google]</p>
27108 <p>[<a rel="mw:ExtLink" href="http://google.com">http://google.com</a>]</p>
27109 <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>
27111 [http://google.com <nowiki>[google]</nowiki>]
27112 [http://google.com <nowiki>google]</nowiki>]
27113 [http://google.com <nowiki>goog] le</nowiki>]
27115 <nowiki>[http://google.com]</nowiki>
27117 <nowiki>[http://google.com google]</nowiki>
27119 [http://google.com<nowiki>]</nowiki>
27121 [{{echo|http://google.com}}<nowiki>]</nowiki>
27123 <p><a rel="nofollow" class="external text" href="http://google.com">[google]</a>
27124 <a rel="nofollow" class="external text" href="http://google.com">google]</a>
27125 <a rel="nofollow" class="external text" href="http://google.com">goog] le</a>
27126 </p><p>[http://google.com]
27127 </p><p>[http://google.com google]
27128 </p><p>[<a rel="nofollow" class="external free" href="http://google.com">http://google.com</a>]
27129 </p><p>[<a rel="nofollow" class="external free" href="http://google.com">http://google.com</a>]
27134 Links 5. ExtLinks: No escapes needed
27138 <p><a rel="mw:ExtLink" href="http://google.com">[google</a></p>
27139 <p>[<a ref="mw:ExtLink" href="http://google.com"></a>]</p>
27141 [http://google.com [google]
27143 [[http://google.com]]
27145 <p><a rel="nofollow" class="external text" href="http://google.com">[google</a>
27146 </p><p>[<a rel="nofollow" class="external autonumber" href="http://google.com">[1]</a>]
27151 Links 6. Add <nowiki/>s between text-nodes and url-links when required (T66300)
27155 <p>x<a rel="mw:ExtLink" href="http://example.com" data-parsoid='{"stx":"url"}'>http://example.com</a>y
27156 <a rel="mw:ExtLink" href="http://example.com" data-parsoid='{"stx":"url"}'>http://example.com</a>?x
27157 <a rel="mw:ExtLink" href="http://example.com" data-parsoid='{"stx":"url"}'>http://example.com</a>&x
27158 <a rel="mw:ExtLink" href="http://example.com" data-parsoid='{"stx":"url"}'>http://example.com</a>'x
27159 <a rel="mw:ExtLink" href="http://example.com" data-parsoid='{"stx":"url"}'>http://example.com</a>,x
27160 <a rel="mw:ExtLink" href="http://example.com" data-parsoid='{"stx":"url"}'>http://example.com</a>.x
27161 <a rel="mw:ExtLink" href="http://example.com" data-parsoid='{"stx":"url"}'>http://example.com</a>;x
27162 <a rel="mw:ExtLink" href="http://example.com" data-parsoid='{"stx":"url"}'>http://example.com</a>:x
27163 <a rel="mw:ExtLink" href="http://example.com" data-parsoid='{"stx":"url"}'>http://example.com</a>;x
27164 <a rel="mw:ExtLink" href="http://example.com" data-parsoid='{"stx":"url"}'>http://example.com</a>!x
27165 <a rel="mw:ExtLink" href="http://example.com" data-parsoid='{"stx":"url"}'>http://example.com</a>=x
27166 <a rel="mw:ExtLink" href="http://example.com" data-parsoid='{"stx":"url"}'>http://example.com</a>(x)
27167 <a rel="mw:ExtLink" href="http://example.com(x" data-parsoid='{"stx":"url"}'>http://example.com(x</a>)
27170 x<nowiki/>http://example.com<nowiki/>y
27171 http://example.com<nowiki/>?x
27172 http://example.com<nowiki/>&x
27173 http://example.com<nowiki/>'x
27174 http://example.com<nowiki/>,x
27175 http://example.com<nowiki/>.x
27176 http://example.com<nowiki/>;x
27177 http://example.com<nowiki/>:x
27178 http://example.com<nowiki/>;x
27179 http://example.com<nowiki/>!x
27180 http://example.com<nowiki/>=x
27181 http://example.com<nowiki/>(x)
27182 http://example.com(x<nowiki/>)
27186 Links 7a. Don't add spurious <nowiki/>s between text-nodes and url-links (T66300)
27191 <a rel="mw:ExtLink" href="http://example.com" data-parsoid='{"stx":"url"}'>http://example.com</a>
27193 "<a rel="mw:ExtLink" href="http://example.com" data-parsoid='{"stx":"url"}'>http://example.com</a>"
27194 (<a rel="mw:ExtLink" href="http://example.com" data-parsoid='{"stx":"url"}'>http://example.com</a>)
27195 (<a rel="mw:ExtLink" href="http://example.com" data-parsoid='{"stx":"url"}'>http://example.com</a>) foo
27196 <a rel="mw:ExtLink" href="http://example.com" data-parsoid='{"stx":"url"}'>http://example.com</a>,
27197 <a rel="mw:ExtLink" href="http://example.com" data-parsoid='{"stx":"url"}'>http://example.com</a>, foo
27203 "http://example.com"
27204 (http://example.com)
27205 (http://example.com) foo
27206 http://example.com,
27207 http://example.com, foo
27210 <a rel="nofollow" class="external free" href="http://example.com">http://example.com</a>
27212 "<a rel="nofollow" class="external free" href="http://example.com">http://example.com</a>"
27213 (<a rel="nofollow" class="external free" href="http://example.com">http://example.com</a>)
27214 (<a rel="nofollow" class="external free" href="http://example.com">http://example.com</a>) foo
27215 <a rel="nofollow" class="external free" href="http://example.com">http://example.com</a>,
27216 <a rel="nofollow" class="external free" href="http://example.com">http://example.com</a>, foo
27221 Links 7b. Don't add spurious <nowiki/>s between text-nodes and url-links (T66300)
27225 <p><a rel="mw:ExtLink" href="http://example.com" data-parsoid='{"stx":"url"}'>http://example.com</a>.,;:!?\
27226 -<a rel="mw:ExtLink" href="http://example.com">http://example.com</a>:</p>
27228 http://example.com.,;:!?\
27229 -http://example.com:
27231 <p><a rel="nofollow" class="external free" href="http://example.com">http://example.com</a>.,;:!?\
27232 -<a rel="nofollow" class="external free" href="http://example.com">http://example.com</a>:
27237 Links 8. Add <nowiki/>s between text-nodes and RFC-links when required (T66300)
27241 <p><a href="https://tools.ietf.org/html/rfc123" rel="mw:ExtLink" data-parsoid='{"stx":"magiclink"}'>RFC 123</a>4
27242 <a href="https://tools.ietf.org/html/rfc123" rel="mw:ExtLink" data-parsoid='{"stx":"magiclink"}'>RFC 123</a>y
27243 X<a href="https://tools.ietf.org/html/rfc123" rel="mw:ExtLink" data-parsoid='{"stx":"magiclink"}'>RFC 123</a>y</p>
27247 X<nowiki/>RFC 123<nowiki/>y
27251 Links 9. Don't add spurious <nowiki/>s between text-nodes and RFC-links (T66300)
27255 <p><a href="https://tools.ietf.org/html/rfc123" rel="mw:ExtLink" data-parsoid='{"stx":"magiclink"}'>RFC 123</a>?foo
27256 <a href="https://tools.ietf.org/html/rfc123" rel="mw:ExtLink" data-parsoid='{"stx":"magiclink"}'>RFC 123</a>&foo
27257 -<a href="https://tools.ietf.org/html/rfc123" rel="mw:ExtLink" data-parsoid='{"stx":"magiclink"}'>RFC 123</a>-
27264 <p><a class="external mw-magiclink-rfc" rel="nofollow" href="https://tools.ietf.org/html/rfc123">RFC 123</a>?foo
27265 <a class="external mw-magiclink-rfc" rel="nofollow" href="https://tools.ietf.org/html/rfc123">RFC 123</a>&foo
27266 -<a class="external mw-magiclink-rfc" rel="nofollow" href="https://tools.ietf.org/html/rfc123">RFC 123</a>-
27271 Links 10. Add <nowiki/>s between text-nodes and PMID-links when required (T66300)
27275 <p><a href="//www.ncbi.nlm.nih.gov/pubmed/123?dopt=Abstract" rel="mw:ExtLink" data-parsoid='{"stx":"magiclink"}'>PMID 123</a>4
27276 <a href="//www.ncbi.nlm.nih.gov/pubmed/123?dopt=Abstract" rel="mw:ExtLink" data-parsoid='{"stx":"magiclink"}'>PMID 123</a>y
27277 X<a href="//www.ncbi.nlm.nih.gov/pubmed/123?dopt=Abstract" rel="mw:ExtLink" data-parsoid='{"stx":"magiclink"}'>PMID 123</a>y
27281 X<nowiki/>PMID 123<nowiki/>y
27285 Links 11. Don't add spurious <nowiki/>s between text-nodes and PMID-links (T66300)
27289 <p><a href="//www.ncbi.nlm.nih.gov/pubmed/123?dopt=Abstract" rel="mw:ExtLink" data-parsoid='{"stx":"magiclink"}'>PMID 123</a>?foo
27290 <a href="//www.ncbi.nlm.nih.gov/pubmed/123?dopt=Abstract" rel="mw:ExtLink" data-parsoid='{"stx":"magiclink"}'>PMID 123</a>&foo
27291 -<a href="//www.ncbi.nlm.nih.gov/pubmed/123?dopt=Abstract" rel="mw:ExtLink" data-parsoid='{"stx":"magiclink"}'>PMID 123</a>-
27298 <p><a class="external mw-magiclink-pmid" rel="nofollow" href="//www.ncbi.nlm.nih.gov/pubmed/123?dopt=Abstract">PMID 123</a>?foo
27299 <a class="external mw-magiclink-pmid" rel="nofollow" href="//www.ncbi.nlm.nih.gov/pubmed/123?dopt=Abstract">PMID 123</a>&foo
27300 -<a class="external mw-magiclink-pmid" rel="nofollow" href="//www.ncbi.nlm.nih.gov/pubmed/123?dopt=Abstract">PMID 123</a>-
27305 Links 12. Add <nowiki/>s between text-nodes and ISBN-links when required (T66300)
27309 <p><a href="./Special:BookSources/1234567890" rel="mw:WikiLink" data-parsoid='{"stx":"magiclink"}'>ISBN 1234567890</a>1
27310 <a href="./Special:BookSources/1234567890" rel="mw:WikiLink" data-parsoid='{"stx":"magiclink"}'>ISBN 1234567890</a>x
27311 a<a href="./Special:BookSources/1234567890" rel="mw:WikiLink" data-parsoid='{"stx":"magiclink"}'>ISBN 1234567890</a>b
27314 ISBN 1234567890<nowiki/>1
27315 ISBN 1234567890<nowiki/>x
27316 a<nowiki/>ISBN 1234567890<nowiki/>b
27320 Links 13. Don't add spurious <nowiki/>s between text-nodes and ISBN-links (T66300)
27324 <p>-<a href="./Special:BookSources/1234567890" rel="mw:WikiLink" data-parsoid='{"stx":"magiclink"}'>ISBN 1234567890</a>'s
27328 <p>-<a href="/wiki/Special:BookSources/1234567890" class="internal mw-magiclink-isbn">ISBN 1234567890</a>'s
27333 Links 14. Protect link-like plain text. (Parsoid bug T78425)
27337 <p>this is not a link: http://example.com
27340 this is not a link: <nowiki>http://example.com</nowiki>
27344 Links 15. Link trails can't become link prefixes.
27349 <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>
27351 [[Söfnuður]]-[[00]]
27353 <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>
27357 #### --------------- Quotes ---------------
27358 #### 1. Quotes inside <b> and <i>
27359 #### 2. Link fragments separated by <i> and <b> tags
27360 #### 3. Link fragments inside <i> and <b>
27361 #### 4. No escaping needed
27362 #### --------------------------------------
27364 1a. Quotes inside <b> and <i>
27375 <b>foo'<i>bar'</i>baz</b>
27384 <i>fools'<span> errand</span></i>
27385 <i><span>fool</span>'s errand</i>
27386 '<i>foo</i> bar '<i>baz</i>
27387 a|!*#-:;+-~[]{}b'<i>x</i>
27391 ''<nowiki>''foo''</nowiki>''
27392 ''<nowiki>'''foo'''</nowiki>''
27394 '''<nowiki/>'foo''''
27395 '''<nowiki>''foo''</nowiki>'''
27396 '''<nowiki>'''foo'''</nowiki>'''
27397 '''foo'<nowiki/>''bar'<nowiki/>''baz'''
27398 '''foo'''<nowiki/>'s
27404 '''foo'''<nowiki/>'
27405 ''''foo'''<nowiki/>'
27406 ''fools'<span> errand</span>''
27407 ''<span>fool</span>'s errand''
27408 '<nowiki/>''foo'' bar '''baz''
27409 a|!*#-:;+-~[]{}b'''x''
27413 1b. Quotes inside <b> and <i> with other tags on same line
27417 '<i>a</i> foo <i><a rel="mw:WikiLink" href="Bar" title="Bar">bar</a></i>
27418 <i>a'</i> foo <i><a rel="mw:WikiLink" href="Bar" title="Bar">bar</a></i>
27419 <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>
27420 <a rel="mw:WikiLink" href="Foo" title="Foo">foo</a> x'<i><a href="Bar" rel="mw:WikiLink" title="Bar">bar</a></i>
27421 '<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>
27422 '<i>foo</i> <div title="name">test</div>
27423 '<i>foo</i> and <br data-parsoid='{"stx":"html","noClose":true}'/> bar
27424 <ol class="mw-references references" typeof="mw:Extension/references" about="#mwt5" data-mw='{"name":"references","attrs":{}}'>
27425 <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>
27428 '''a'' foo ''[[bar]]''
27429 ''a''' foo ''[[bar]]''
27430 ''a''' foo '''{{echo|[[bar]]}}'''
27431 [[foo]] x'''[[bar]]''
27432 '''foo'' <ref>test</ref>
27433 '''foo'' <div title="name">test</div>
27434 '''foo'' and <br> bar
27439 2. Link fragments separated by <i> and <b> tags
27443 <p>[[<i>foo</i>hello]]</p>
27444 <p>[[<b>foo</b>hello]]</p>
27446 [[''foo''<nowiki>hello]]</nowiki>
27448 [['''foo'''<nowiki>hello]]</nowiki>
27451 # FIXME: Escaping one or both of [[ and ]] is also acceptable --
27452 # this is one of the shortcomings of this format
27454 3. Link fragments inside <i> and <b>
27458 <p><i>[[foo</i>]]</p>
27459 <p><b>[[foo</b>]]</p>
27461 ''[[foo''<nowiki>]]</nowiki>
27463 '''[[foo'''<nowiki>]]</nowiki>
27467 4. No escaping needed
27471 <p>'<span><i>bar</i></span>'
27472 '<span><b>bar</b></span>'
27476 '<span>''bar''</span>'
27477 '<span>'''bar'''</span>'
27481 #### ----------- Paragraphs ---------------
27482 #### 1. No unnecessary escapes
27483 #### --------------------------------------
27486 1. No unnecessary escapes
27490 <p>bar <span>[[foo]]</span>
27491 </p><p>=bar <span>[[foo]]</span>
27492 </p><p>[[bar <span>[[foo]]</span>
27493 </p><p>]]bar <span>[[foo]]</span>
27494 </p><p>=bar <span>foo]]</span>=
27497 bar <span><nowiki>[[foo]]</nowiki></span>
27499 =bar <span><nowiki>[[foo]]</nowiki></span>
27501 [[bar <span><nowiki>[[foo]]</nowiki></span>
27503 ]]bar <span><nowiki>[[foo]]</nowiki></span>
27505 =bar <span>foo]]</span><nowiki>=</nowiki>
27508 #### ----------------------- PRE --------------------------
27510 1. Leading whitespace in SOL context should be escaped
27533 <nowiki> </nowiki>a
27535 <nowiki> </nowiki> a
27539 <nowiki> </nowiki> a
27541 <nowiki> </nowiki>a
27544 <nowiki> </nowiki>b
27567 2. Leading whitespace in non-indent-pre contexts should not be escaped
27571 <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>
27572 <ol class="mw-references references" typeof="mw:Extension/references" about="#mwt4" data-mw='{"name":"references","attrs":{}}'>
27573 <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>
27583 3. Leading whitespace in indent-pre suppressing contexts should not be escaped
27602 4. Leading whitespace in indent-pre suppressing contexts should not be escaped
27606 <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>
27608 [[File:Foobar.jpg|thumb|caption]]
27612 5. Nowiki escaping should account for indent-pres
27622 T95794: nowiki escaping should account for leading space at start-of-line in an indent-pre block
27636 Whitespace scrubbing in SOL position should account for SOL-sensitive wikitext markup
27639 "modes": ["html2wt"],
27640 "scrubWikitext": true
27648 <p><link rel="mw:PageProp/Category" href="./Category:Foo" data-parsoid="{}"> *foo</p>
27649 <p> <link rel="mw:PageProp/Category" href="./Category:Foo" data-parsoid="{}">*foo</p>
27650 <p> <!--boo-->*foo</p>
27651 <p><!--boo--> *foo</p>
27652 <p><!--a--> <!--b--> <!--c--> <!--d--> <!--e--> foo</p>
27653 <p><!--a--> <!--b--> <!--c--> <!--d--> <!--e--> *foo</p>
27669 <nowiki>*</nowiki>foo
27671 <nowiki/><!--boo-->*foo
27673 <!--boo--><nowiki/>*foo
27675 <!--a--><!--b--><!--c--><!--d--><!--e-->foo
27677 <!--a--><nowiki/><!--b--><!--c--><!--d--><!--e-->*foo
27680 #### --------------- Behavior Switches --------------------
27683 1. Valid behavior switches should be escaped
27690 <nowiki>__TOC__</nowiki>
27691 ''<nowiki>__TOC__</nowiki>''
27695 2. Invalid behavior switches should not be escaped
27706 # We use indent-pre as an indirect way to test for sol-transparent behavior.
27708 Behavior switches should be SOL-transparent
27712 <meta property="mw:PageProp/toc" />
27714 <!-- this one's bogus -->
27717 <pre data-parsoid='{}'><meta property="mw:PageProp/toc" data-parsoid='{"src":"__TOC__","magicSrc":"__TOC__"}'/> foo</pre>
27719 <meta property="mw:PageProp/toc" data-parsoid='{"src":"__TOC__","magicSrc":"__TOC__"}'/><pre data-parsoid='{}'>bar</pre>
27723 <!-- this one's bogus -->
27732 #### --------------- HTML tags ---------------
27735 #### 3. multi-line html tag
27736 #### 4. extension tags
27737 #### -----------------------------------------
27743 <a href="http://google.com">google</a>
27745 <a href="http://google.com">google</a>
27753 <ul><li> <div>foo</div></li>
27754 <li> <div style="color:red">foo</div></li>
27755 <li> <td></li></ul>
27758 * <nowiki><div>foo</div></nowiki>
27759 * <nowiki><div style="color:red">foo</div></nowiki>
27760 * <nowiki><td></nowiki>
27764 3. multi-line html tag
27783 <p><ref>foo</ref>
27784 </p><p><ref>bar
27785 </p><p>baz</ref>
27788 <nowiki><ref>foo</ref></nowiki>
27790 <nowiki><ref>bar</nowiki>
27792 baz<nowiki></ref></nowiki>
27796 Parsoid: newline inducing block nodes don't suppress <nowiki>
27802 <nowiki> </nowiki>a
27807 #### --------------- Others ---------------
27813 <p><nowiki>foo</nowiki>
27816 <nowiki>foo</nowiki>
27819 ## The quote-char in the input is necessary for triggering the bug
27821 (T54035) Nowiki-escaping should not get tripped by " :" in text
27830 #----------- End of wikitext escaping tests --------------
27834 Tag-like HTML structures are passed through as text
27856 </p><p>1<d e>f
27861 HTML tag with necessary entities in attributes
27863 <span title="&amp;">foo</span>
27865 <p><span title="&amp;">foo</span>
27870 HTML tag with 'unnecessary' entity encoding in attributes
27872 <span title="&">foo</span>
27874 <p><span title="&">foo</span>
27879 HTML tag with broken attribute value quoting
27881 parsoid=wt2html,html2html
27883 <span title="Hello world>Foo</span>
27885 <p><span title="Hello world">Foo</span>
27888 <p><span title="Hello world">Foo</span></p>
27892 Self-closed tag with broken attribute value quoting
27894 parsoid=wt2html,html2html
27896 <div title="Hello world />Foo
27898 <div title="Hello world"></div><p>Foo
27901 <div title="Hello world " data-parsoid='{"stx":"html","selfClose":true}'></div><p>Foo</p>
27905 Table with broken attribute value quoting
27907 parsoid=wt2html,html2html
27910 | title="Hello world|Foo
27915 <td title="Hello world">Foo
27921 <td title="Hello world">Foo
27927 Table with broken attribute value quoting on consecutive lines
27929 parsoid=wt2html,html2html
27932 | title="Hello world|Foo
27933 | style="color:red|Bar
27938 <td title="Hello world">Foo
27940 <td style="color:red">Bar
27946 <td title="Hello world">Foo
27947 </td><td style="color: red">Bar
27948 </td></tr></tbody></table>
27953 Accept empty td cell attribute
27956 | align="center" |foo|| |
27961 <td align="center">foo</td>
27968 Non-empty attributes in th-cells
27971 !Foo!! style="color: red" |Bar
27977 <th style="color: red">Bar
27983 Accept empty attributes in th-cells
27998 Empty table rows go away
28019 ### Parsoid-centric tests for testing RTing of inter-element separators
28020 ### Edge cases not tested by existing parser tests and specific to
28021 ### Parsoid-specific serialization strategies.
28025 RT-ed inter-element separators should be valid separators
28037 <tbody><tr class='mw-empty-elt' data-parsoid='{"startTagSrc":"|-","a":{"[[foo]]":null},"sa":{"[[foo]]":""},"autoInsertedEnd":true}'></tr>
28041 # Parsoid-only test of a DOM pass
28043 Trailing newlines in a deep dom-subtree that ends a wikitext line should be migrated out
28055 <tbody><tr data-parsoid='{"autoInsertedEnd":true,"autoInsertedStart":true}'><td data-parsoid='{"autoInsertedEnd":true}'><small data-parsoid='{"stx":"html","autoInsertedEnd":true}'>foo
28056 <p>bar</p></small></td></tr>
28060 <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>
28064 # Note that the "style" attribute is really a template parameter here.
28065 # The = would have to be {{=}} if you wanted the literal.
28067 Empty TD followed by TD with tpl-generated attribute
28072 |{{echo|style='color:red'}}|foo
28086 Indented table with an empty td
28105 Indented table with blank lines in between (T85627)
28124 <br /></p></td></tr>
28129 Indented block & table
28143 <div data-parsoid='{"stx":"html"}'>foo</div>
28145 <tr data-parsoid='{"autoInsertedEnd":true,"autoInsertedStart":true}'><td data-parsoid='{"autoInsertedEnd":true}'>foo</td></tr>
28150 Indent and comment before table row
28165 <!--hi--><tbody><tr data-parsoid='{"startTagSrc":"|-","autoInsertedEnd":true}'>
28166 <td data-parsoid='{"autoInsertedEnd":true}'> there</td></tr>
28170 # PHP parser omits empty TR
28172 Empty TR followed by a template-generated TR
28176 {{echo|<tr><td>foo</td></tr>}}
28181 <tbody><tr><td>foo</td></tr>
28186 <tr class='mw-empty-elt'></tr>
28187 <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}}]}'>
28192 ## PHP and parsoid output differ for this; as usual PHP omits empty
28193 ## elements, and since it strips the comments the TR is empty.
28195 Empty TR followed by mixed-ws-comment line should RT correctly
28211 <tr class='mw-empty-elt'></tr>
28214 <!--c--> </tr><!--d-->
28220 Multi-line image caption generated by templates with/without trailing newlines
28222 [[File:Foobar.jpg|thumb|300x300px|foo\n{{echo|A}}\n{{echo|B}}\n{{echo|C}}]]
28223 [[File:Foobar.jpg|thumb|300x300px|foo\n{{echo|A}}\n{{echo|B}}\n{{echo|C}}\n\n]]
28225 <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>
28226 <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>
28230 New element inserted (without intervening newlines) after an old sol-transparent node should serialize correctly
28234 <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>
28236 <link rel="mw:PageProp/Category" href="./Category:Foo" data-parsoid='{}'/><h1>new heading</h1>
28238 <includeonly>foo</includeonly>
28246 ## PHP emits broken html for this, and since this is primarily
28247 ## a Parsoid serializer test, marking this Parsoid only
28249 Improperly nested inline or quotes tags with whitespace in between
28251 <span> <s>x</span> </s>
28254 <p><span> <s>x</s></span><s> </s>
28255 <b> <i>x</i></b><i> </i>
28260 Encapsulate protected attributes from wt
28262 <div typeof="mw:placeholder stuff" data-mw="whoo" data-parsoid="weird" data-parsoid-other="no" about="time" rel="mw:true">foo</div>
28264 {| typeof="mw:placeholder stuff" data-mw="whoo" data-parsoid="weird" data-parsoid-other="no" about="time" rel="mw:true"
28268 <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>
28270 <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">
28271 <tbody><tr><td data-parsoid='{"autoInsertedEnd":true}'>ok</td></tr>
28275 ## Currently the p-wrapper is fragile in how it adds / removes transformations.
28276 ## Having nested or stray pre tags results in the attempt to add duplicates,
28277 ## causing an assertion fail. This test tries to prevent that situation.
28279 Ensure ParagraphWrapper can deal with stray closing pre tags
28288 ## Remex doesn't account for fostered content.
28290 1. Ensure fostered text content is wrapped in element nodes
28294 <table>hi</table><table>ho</table>
28296 hi<table></table>ho<table></table>
28298 <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>
28301 ## Remex doesn't account for fostered content.
28303 2. Ensure fostered text content is wrapped in element nodes (traps regressions around fostered marker on the element getting lost)
28305 parsoid=wt2html,wt2wt
28315 </td></tr></tbody></table>
28317 <p data-parsoid='{"fostered":true,"autoInsertedEnd":true,"autoInsertedStart":true}'> || ||</p>
28318 <table data-parsoid='{"stx":"html"}'>
28319 <tbody><tr data-parsoid='{"stx":"html","autoInsertedEnd":true}'><td data-parsoid='{"stx":"html","autoInsertedEnd":true}'> a
28320 </td></tr></tbody></table>
28323 ## Remex doesn't account for fostered content.
28325 Encapsulation properly handles null DSR information from foster box
28327 parsoid=wt2html,wt2wt
28329 {{echo|<table>foo<tr><td>bar</td></tr></table>}}
28331 <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>
28334 ## Remex doesn't account for fostered content.
28336 1. Encapsulate foster-parented transclusion content
28338 parsoid=wt2wt,wt2html
28340 <table>{{echo|foo<tr><td>bar</td></tr>}}</table>
28342 foo<table><tbody><tr><td>bar</td></tr></tbody></table>
28344 <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>
28348 2. Encapsulate foster-parented transclusion content
28350 parsoid=wt2wt,wt2html
28352 <table><div>{{echo|foo}}</div><tr><td>bar</td></tr></table>
28354 <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>
28365 3. Encapsulate foster-parented transclusion content
28367 parsoid=wt2wt,wt2html
28369 <table><div><p>{{echo|foo</p></div><tr><td>}}bar</td></tr></table>
28371 <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>"]}">
28384 4. Encapsulate foster-parented transclusion content
28386 parsoid=wt2wt,wt2html
28388 <table><div><p>{{echo|foo</p></div><tr><td>}}bar</td></tr></table>
28390 <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>"]}">
28402 ## Remex doesn't account for fostered content.
28404 5. Encapsulate foster-parented transclusion content
28406 parsoid=wt2wt,wt2html
28408 <table><tr><td><div><p>{{echo|foo</p></div></td>foo}}</tr></table>
28410 foo<table><tbody><tr><td><div><p>foo</p></div></td></tr></tbody></table>
28412 <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>
28415 ## Remex doesn't account for fostered content.
28417 6. Encapsulate foster-parented transclusion content
28419 parsoid=wt2wt,wt2html
28421 <table><tr><td><div><p>{{echo|foo</p></div></td>foo</tr></table>}}<p>ok</p>
28423 foo<table><tbody><tr><td><div><p>foo</p></div></td></tr></tbody></table><p>ok</p>
28425 <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>
28429 7. Encapsulate foster-parented transclusion content
28431 parsoid=wt2wt,wt2html
28433 <table>{{echo|<p>foo</p>}}<td>bar</td></table>
28435 <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>
28445 ## Remex doesn't account for fostered content.
28446 # Note that the wt is broken on purpose: the = should be {{=}} if you
28447 # don't want it to be a template parameter key.
28449 8. Encapsulate foster-parented transclusion content
28451 parsoid=wt2wt,wt2html
28454 }}{|{{echo|style='color:red'}}
28465 </td></tr></tbody></table>
28467 <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">
28468 </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">
28471 </td></tr></tbody></table>
28474 ## Remex doesn't account for fostered content.
28476 9. Encapsulate foster-parented transclusion content
28478 parsoid=wt2wt,wt2html
28480 <table>{{echo|hi</table>hello}}
28482 hi<table></table><p>hello
28485 <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>
28489 Table in fosterable position
28500 <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">
28502 <table about="#mwt1" data-parsoid='{"autoInsertedEnd":true}'></table>
28508 # Parsoid only for T66747
28510 Properly encapsulate empty-content transclusions in fosterable positions
28518 <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"}]]}'>
28523 ## No longer captures its original intention
28525 Always encapsulate foster box when template range is expanded to table
28539 T115289: Unclosed table
28541 {{echo|<table>}}<!--c-->[[Category:Two]]
28543 <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>
28547 T115289: Don't migrate newlines out of tables with fostered content
28549 <table><td></td>{{echo|<tr>[[Category:One]]}}<!--c-->[[Category:Two]]
28551 <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>
28555 T73074: More fostering fun
28557 <table><td></td>{{echo|<tr>}}<!--c-->[[Category:Two]]
28559 <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>
28563 Support <object> element with .data attribute
28567 <object data="test.swf"></object>
28569 <object data="test.swf"></object>
28573 Don't block XML namespace declaration
28575 <span xmlns:dct="http://purl.org/dc/terms/" property="dct:title">MediaWiki</span>
28577 <p><span xmlns:dct="http://purl.org/dc/terms/" property="dct:title">MediaWiki</span>
28580 <p><span xmlns:dct="http://purl.org/dc/terms/" data-x-property="dct:title" data-parsoid='{"stx":"html"}'>MediaWiki</span></p>
28583 # -----------------------------------------------------------------
28584 # The following section of tests are primarily to spec requirements
28585 # around Parsoid's serialization (old, new, edited content)
28587 # All these tests are marked Parsoid html2wt and html2html only
28588 # ----------------------------------------------------------------
28591 Ignore rel attribute in a-tags during serialization to url-links
28595 <a href='http://en.wikipedia.org/wiki/Foobar'>http://en.wikipedia.org/wiki/Foobar</a>
28596 <a href='http://en.wikipedia.org/wiki/Foobar' rel='mw:ExtLink'>http://en.wikipedia.org/wiki/Foobar</a>
28597 <a href='http://en.wikipedia.org/wiki/Foobar' rel='mw:WikiLink'>http://en.wikipedia.org/wiki/Foobar</a>
28599 http://en.wikipedia.org/wiki/Foobar
28600 http://en.wikipedia.org/wiki/Foobar
28601 http://en.wikipedia.org/wiki/Foobar
28604 # 'mi' is a localinterwiki prefix as well as a language
28606 Serialize interwiki links pointing to the current wiki as plain wiki links (T67869)
28610 <p><a rel="mw:ExtLink" href="http://mi.wikipedia.org/wiki/Foo">Foo</a></p>
28616 Parsoid should accept interwiki shortcuts
28620 <p><a rel='mw:WikiLink' href='./fr:Foo'>Foo</a>
28621 <a rel='mw:ExtLink' href='./fr:Foo'>Foo</a>
28622 <a href='./fr:Foo'>Foo</a></p>
28623 <p><a rel='mw:WikiLink' href='fr%3AFoo'>Foo</a>
28624 <a rel='mw:ExtLink' href='fr%3AFoo'>Foo</a>
28625 <a href='fr%3AFoo'>Foo</a></p>
28626 <p><a href='FR%3AFoo'>Foo</a>
28627 <a href='./FR:Foo'>Foo</a></p>
28642 Parsoid should not accept invalid interwiki shortcuts
28646 <p><a rel='mw:WikiLink' href='news:Foo'>Foo</a>
28647 <a rel='mw:ExtLink' href='news:Foo'>Foo</a>
28648 <a href='news:Foo'>Foo</a></p>
28657 New wikilinks should be serialized properly
28661 <a rel="mw:WikiLink" href="./Foo" title="Foo" data-parsoid='{}'>Foo</a>
28662 <a rel="mw:WikiLink" href="./Foo" title="Foo">Foo</a>
28663 <a href="//en.wikipedia.org/wiki/Foo">//en.wikipedia.org/wiki/Foo</a>
28664 <a href="http://en.wikipedia.org/wiki/Foo">http://en.wikipedia.org/wiki/Foo</a>
28665 <a href="//en.wikipedia.org/wiki/Foo_bar">//en.wikipedia.org/wiki/Foo bar</a>
28669 [[:en:Foo|//en.wikipedia.org/wiki/Foo]]
28670 http://en.wikipedia.org/wiki/Foo
28671 [[:en:Foo_bar|//en.wikipedia.org/wiki/Foo bar]]
28675 New wiki links (href variations)
28679 <a rel="mw:WikiLink" href="./Foo_bar">Foo_bar</a>
28680 <a rel="mw:WikiLink" href="Foo_bar">Foo_bar</a>
28681 <a rel="mw:WikiLink" href="Foo bar">Foo_bar</a>
28682 <a rel="mw:WikiLink" href="./Toxine_bact%C3%A9rienne">Toxine bactérienne</a>
28687 [[Toxine bactérienne]]
28691 New wiki links (content string variations)
28695 <a rel="mw:WikiLink" href="./Foo_bar">Foo_bar</a>
28696 <a rel="mw:WikiLink" href="./Foo_bar">Foo bar</a>
28697 <a rel="mw:WikiLink" href="./Foo_bar">./Foo_bar</a>
28701 [[Foo_bar|./Foo_bar]]
28705 New category links (href variations)
28709 <link rel="mw:PageProp/Category" href="./Category:Toxine_bactérienne" />
28710 <link rel="mw:PageProp/Category" href="./Category:Toxine_bact%C3%A9rienne" />
28711 <link rel="mw:PageProp/Category" href="Category:Toxine_bact%C3%A9rienne" />
28713 [[Category:Toxine bactérienne]]
28714 [[Category:Toxine bactérienne]]
28715 [[Category:Toxine bactérienne]]
28719 New sol transparent links don't need indent-pre nowiki protection
28724 <link rel="mw:PageProp/redirect" href="./Main_Page">
28725 <!-- this is good --> <link rel="mw:PageProp/Category" href="./Category:Good" />
28726 <!-- this is great --> <link rel="mw:PageProp/Category" href="./Kategorie:Great" />
28728 #WEITERLEITUNG [[Main Page]]
28729 <!-- this is good --> [[Category:Good]]
28730 <!-- this is great --> [[Kategorie:Great]]
28734 New interlanguage links (href variations)
28738 <link rel="mw:PageProp/Language" href="http://es.wikipedia.org/wiki/Toxine bactérienne" />
28739 <link rel="mw:PageProp/Language" href="http://es.wikipedia.org/wiki/Toxine_bactérienne" />
28740 <link rel="mw:PageProp/Language" href="http://es.wikipedia.org/wiki/Toxine_bact%C3%A9rienne" />
28742 [[es:Toxine bactérienne]]
28743 [[es:Toxine_bactérienne]]
28744 [[es:Toxine_bactérienne]]
28748 Image: Modifying size of an image (1)
28751 "modes": ["wt2wt"],
28753 ["img[height]", "attr", "height", "22"],
28754 ["img[width]", "attr", "width", "200"]
28758 [[Image:Foobar.jpg|230x230px]]
28760 [[Image:Foobar.jpg|200x200px]]
28764 Image: Modifying size of an image (2)
28767 "modes": ["wt2wt"],
28769 ["img[height]", "attr", "height", "100"],
28770 ["img[width]", "attr", "width", "500"]
28774 [[Image:Foobar.jpg|230x230px]]
28776 [[Image:Foobar.jpg|500x500px]]
28779 # Change in size is ignored so long as class='mw-default-size'
28781 Image: Modifying size of an image (3)
28784 "modes": ["wt2wt"],
28786 ["figure[class]", "removeClass", "mw-default-size"],
28787 ["figure img", "attr", "height", "19"],
28788 ["figure img", "attr", "width", "170"]
28792 [[Image:Foobar.jpg|thumb]]
28794 [[Image:Foobar.jpg|thumb|170x170px]]
28798 Image: Modifying alignment of an image (T50665)
28801 "modes": ["wt2wt"],
28803 ["figure[class]", "removeClass", "mw-halign-right"],
28804 ["figure[class]", "addClass", "mw-halign-left"]
28808 [[Image:Foobar.jpg|thumb|caption|right]]
28810 [[Image:Foobar.jpg|thumb|caption|left]]
28814 Image: Modifying mw-default-size of an frameless image (T64805)
28817 "modes": ["wt2wt"],
28819 ["figure.mw-default-size", "removeClass", "mw-default-size"]
28823 [[Image:Foobar.jpg|frameless|right]]
28825 [[Image:Foobar.jpg|frameless|right|220x220px]]
28829 Image: Modifying valign of an image (T51221)
28832 "modes": ["wt2wt"],
28834 ["*[typeof=\"mw:Image\"]", "removeClass", "mw-valign-middle"],
28835 ["*[typeof=\"mw:Image\"]", "addClass", "mw-valign-text-top"]
28839 [[File:Foobar.jpg|20px|middle]]
28841 [[File:Foobar.jpg|20px|text-top]]
28845 Image: Modifying alt attribute of an image (T58400)
28848 "modes": ["wt2wt"],
28850 ["img[alt]", "attr", "alt", "some alternate edited text"]
28854 [[File:Foobar.jpg|thumb|some caption|alt=some alternate text]]
28856 [[File:Foobar.jpg|thumb|some caption|alt=some alternate edited text]]
28860 Image: Modifying caption of an image
28863 "modes": ["wt2wt"],
28865 ["figcaption", "text", "new caption"]
28869 [[Image:Foobar.jpg|thumb|original caption]]
28871 [[Image:Foobar.jpg|thumb|new caption]]
28875 Image: empty alt attribute (T50924)
28877 [[File:Foobar.jpg|thumb|alt=|bar]]
28879 <div class="thumb tright"><div class="thumbinner" style="width:182px;"><a href="/wiki/File:Foobar.jpg" class="image"><img alt="" src="http://example.com/images/thumb/3/3a/Foobar.jpg/180px-Foobar.jpg" decoding="async" width="180" height="20" class="thumbimage" srcset="http://example.com/images/thumb/3/3a/Foobar.jpg/270px-Foobar.jpg 1.5x, http://example.com/images/thumb/3/3a/Foobar.jpg/360px-Foobar.jpg 2x" /></a> <div class="thumbcaption"><div class="magnify"><a href="/wiki/File:Foobar.jpg" class="internal" title="Enlarge"></a></div>bar</div></div></div>
28881 <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>
28885 Image: new attributes should be serialized in wiki's language for RTL languages (T53852)
28891 <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>
28893 [[Imagen:Foobar.jpg|derecha|miniaturadeimagen]]
28897 Image: Block level image should have \n before and after
28900 [[File:Foobar.jpg|right|thumb|150x150px]]
28904 <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>
28909 Image: New block level image should have \n before and after (existing content)
28912 [[File:Foobar.jpg|right|thumb|150x150px]]
28916 <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>
28921 Image: upright option (parsoid)
28923 [[File:Foobar.jpg|thumb|upright|caption]]
28924 [[File:Foobar.jpg|thumb|upright=0.5|caption]]
28925 [[File:Foobar.jpg|thumb|500x500px|upright=0.5|caption]]
28927 <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>
28928 <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>
28929 <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>
28933 Image: upright option is ignored on inline and frame images (parsoid)
28935 [[File:Foobar.jpg|500x500px|upright=0.5|caption]]
28937 <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>
28941 Image: in template parameter with empty parameter
28943 {{echo|[[File:Foobar.jpg|link=]]}}
28945 <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>
28949 Image: from basic HTML (1)
28953 <span typeof="mw:Image">
28954 <img src="./File:Foobar.jpg" width=100 height=100 alt="Alt">
28957 [[File:Foobar.jpg|link=|alt=Alt|100x100px]]
28961 Image: from basic HTML (2)
28965 <img src="./File:Foobar.jpg" width=100 height=100 alt="Alt">
28967 [[File:Foobar.jpg|link=|alt=Alt|100x100px]]
28971 Image: from basic HTML (3)
28975 <a href="Main"><img src="./File:Foobar.jpg" width=100 height=100 alt="Alt"></a>
28977 [[File:Foobar.jpg|link=Main|alt=Alt|100x100px]]
28981 Image: from basic HTML (4)
28985 <img src="./File:Foobar.jpg">
28987 [[File:Foobar.jpg|link=]]
28991 Image: Invalid title as link
28993 [[File:Foobar.jpg|link=<]]
28995 <p><a href="/wiki/File:Foobar.jpg" class="image" title="link=<"><img alt="link=<" src="http://example.com/images/3/3a/Foobar.jpg" decoding="async" width="1941" height="220" /></a>
28998 <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>
29002 Various link types in alt and link options
29004 [[File:Foobar.jpg|link=[[Main Page]]|alt=[[Main Page]]|caption]]
29006 [[File:Foobar.jpg|link=[[Media:Thumb.png]]|alt=[[Media:Thumb.png]]|caption]]
29008 [[File:Foobar.jpg|link=[[wikipedia:Foo]]|alt=[[wikipedia:Foo]]|caption]]
29010 <p><a href="/wiki/Main_Page" title="caption"><img alt="Main Page" src="http://example.com/images/3/3a/Foobar.jpg" decoding="async" width="1941" height="220" /></a>
29011 </p><p><a href="/wiki/Media:Thumb.png" title="caption"><img alt="Media:Thumb.png" src="http://example.com/images/3/3a/Foobar.jpg" decoding="async" width="1941" height="220" /></a>
29012 </p><p><a href="http://en.wikipedia.org/wiki/Foo" title="caption"><img alt="wikipedia:Foo" src="http://example.com/images/3/3a/Foobar.jpg" decoding="async" width="1941" height="220" /></a>
29015 <p><figure-inline class="mw-default-size" typeof="mw:Image" data-mw='{"caption":"caption"}'><a href="./Main_Page" data-parsoid='{"a":{"href":"./Main_Page"},"sa":{"href":"link=[[Main Page]]"}}'><img alt="Main Page" resource="./File:Foobar.jpg" src="//example.com/images/3/3a/Foobar.jpg" data-file-width="1941" data-file-height="220" data-file-type="bitmap" height="220" width="1941" data-parsoid='{"a":{"alt":"Main Page","resource":"./File:Foobar.jpg","height":"220","width":"1941"},"sa":{"alt":"alt=[[Main Page]]","resource":"File:Foobar.jpg"}}'/></a></figure-inline></p>
29017 <p><figure-inline class="mw-default-size" typeof="mw:Image" data-mw='{"caption":"caption"}'><a href="./Media:Thumb.png" data-parsoid='{"a":{"href":"./Media:Thumb.png"},"sa":{"href":"link=[[Media:Thumb.png]]"}}'><img alt="Media:Thumb.png" resource="./File:Foobar.jpg" src="//example.com/images/3/3a/Foobar.jpg" data-file-width="1941" data-file-height="220" data-file-type="bitmap" height="220" width="1941" data-parsoid='{"a":{"alt":"Media:Thumb.png","resource":"./File:Foobar.jpg","height":"220","width":"1941"},"sa":{"alt":"alt=[[Media:Thumb.png]]","resource":"File:Foobar.jpg"}}'/></a></figure-inline></p>
29019 <p><figure-inline class="mw-default-size" typeof="mw:Image" data-mw='{"caption":"caption"}'><a href="http://en.wikipedia.org/wiki/Foo" data-parsoid='{"a":{"href":"http://en.wikipedia.org/wiki/Foo"},"sa":{"href":"link=[[wikipedia:Foo]]"}}'><img alt="wikipedia:Foo" resource="./File:Foobar.jpg" src="//example.com/images/3/3a/Foobar.jpg" data-file-width="1941" data-file-height="220" data-file-type="bitmap" height="220" width="1941" data-parsoid='{"a":{"alt":"wikipedia:Foo","resource":"./File:Foobar.jpg","height":"220","width":"1941"},"sa":{"alt":"alt=[[wikipedia:Foo]]","resource":"File:Foobar.jpg"}}'/></a></figure-inline></p>
29023 Lists: Serialize correctly even when list content is wrapped in p-tags (like VE does)
29028 <li><p>foo</p></li>
29035 Lists: Serialize correctly even when list tags has unneeded whitespace between tags
29039 <ul> <li>foo</li></ul>
29045 Don't strip leading whitespace when handling indent-pre suppressing tags
29050 <tr><td> indented row</td></tr>
29053 <b>This is very bold of you!</b>
29056 indented cell (no pre-wrapping!)
29066 '''This is very bold of you!'''
29070 indented cell (no pre-wrapping!)
29078 Nowiki-wrap leading whitespace when handling indent-pre inducing tags
29100 <nowiki> </nowiki></span>bar2
29103 <nowiki> </nowiki><span>bar</span>
29106 <nowiki> </nowiki><span>foo</span>
29111 Lists: Dont insert newlines in a serialized list item.
29115 <ul><li>a<br>b</li><li>c</li></ul>
29122 1. Headings: Force sol-transparent links and behavior switches to serialize before/after
29125 "modes": ["html2wt"],
29126 "scrubWikitext": false
29129 <h2>hello there<link href="./Category:A1" rel="mw:PageProp/Category" /></h2>
29130 <h2><link href="./Category:A2" rel="mw:PageProp/Category" />hi pal</h2>
29132 <h2><!--foo--> <link href="./Category:A3" rel="mw:PageProp/Category" /> how goes it</h2>
29133 <h2>it goes well <link href="./Category:A4" rel="mw:PageProp/Category" /> <!--bar--></h2>
29135 <h2 data-parsoid='{}'>howdy<link href="./Category:A5" rel="mw:PageProp/Category" /></h2>
29137 <h2><meta property="mw:PageProp/toc" /> ok</h2>
29139 == hello there [[Category:A1]] ==
29141 == [[Category:A2]] hi pal ==
29143 == <!--foo--> [[Category:A3]] how goes it ==
29145 == it goes well [[Category:A4]] <!--bar--> ==
29147 ==howdy [[Category:A5]]==
29153 2. Headings: Force sol-transparent links and behavior switches to serialize before/after
29156 "modes": ["html2wt"],
29157 "scrubWikitext": true
29160 <h2>hello there<link href="./Category:A1" rel="mw:PageProp/Category" /></h2>
29161 <h2><link href="./Category:A2" rel="mw:PageProp/Category" />hi pal</h2>
29163 <h2><!--foo--> <link href="./Category:A3" rel="mw:PageProp/Category" /> how goes it</h2>
29164 <h2>it goes well <link href="./Category:A4" rel="mw:PageProp/Category" /> <!--bar--></h2>
29166 <h2><meta property="mw:PageProp/toc" /> ok</h2>
29174 <!--foo-->[[Category:A3]]
29179 [[Category:A4]] <!--bar-->
29187 Headings: Don't hoist metas that come from templates
29190 "modes": ["html2wt"],
29191 "scrubWikitext": true
29194 <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>
29196 == {{echo|foo [[Category:Foo]]}} ==
29200 Headings: Category in ref isn't hoisted
29203 "modes": ["html2wt"],
29204 "scrubWikitext": true
29207 <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>
29209 <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>
29212 [[Category:Baz]] </ref> ==
29218 Parsoid: Serialize positional parameters with = in them as named parameter
29222 <p about="#mwt1" typeof="mw:Transclusion"
29223 data-mw='{"parts":[{"template":{"target":{"wt":"echo","href":"./Template:Echo"},"params":{"1":{"wt":"f=oo"}},"i":0}}]}'>foo</p>
29225 <p about="#mwt1" typeof="mw:Transclusion"
29226 data-mw='{"parts":[{"template":{"target":{"wt":"echo","href":"./Template:Echo"},"params":{"1":{"wt":"f=oo"}, "2":{"wt":"bar"}},"i":0}}]}'>foo</p>
29228 <!--Orig params with data-parsoid has heuristics for handling = chars-->
29229 <!--FIXME: But maybe the heuristic needs fixing to apply to new params as well-->
29230 <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>
29234 {{echo|1=f=oo|2=bar}}
29236 <!--Orig params with data-parsoid has heuristics for handling = chars-->
29237 <!--FIXME: But maybe the heuristic needs fixing to apply to new params as well-->
29238 {{echo|<nowiki>f=oo</nowiki>|bar}}
29242 Parsoid: Serialize positional parameters with = in extlink as named parameter
29246 <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>
29248 {{echo|1=http://stuff?is=ok}}
29252 Parsoid: Correctly serialize block-node children when they are a combination of text and p-nodes
29256 <div>a<p>b</p></div>
29277 Substrings resembling wikitext in hrefs should not get nowiki escapes
29281 <a rel="mw:WikiLink" href="./Foo''bar''baz">Foo''bar''baz</a>
29287 Enforce single-line context in the serializer
29294 <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">
29295 </span><span about="#mwt1">you</span> </h2>
29297 <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>
29299 <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
29300 there</span></li></ol>
29312 ho </dt><dd data-parsoid='{"stx":"row"}'> hi
29319 </tbody></table></dd></dl>
29323 == hi {{bogus|there
29334 * foo '''bar''' baz
29346 Serialize new placeholder space without spans
29350 <p>foo<span typeof="mw:Placeholder"> </span>: bar</p>
29352 <p>foo<span typeof="mw:DisplaySpace mw:Placeholder" data-parsoid='{"src":" ","isDisplayHack":true}'> </span>: bar</p>
29354 <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>
29360 <ref>foo : bar</ref>ok
29364 #-----------------------
29365 # Tag minimization tests
29366 #-----------------------
29369 1. I/B quote minimization: wikitext-only tags should be combined
29373 <p><i>A</i><i>B</i></p>
29374 <p><b>A</b><b>B</b></p>
29375 <p><i>A</i><b><i>B</i></b></p>
29376 <p><b>A</b><i><b>B</b></i></p>
29377 <p><b>A</b><i><b>B</b><b>C</b></i><b>D</b></p>
29378 <p><i><b>A</b></i><i><b>B</b></i></p>
29379 <p><i><b>A</b></i><b><i>B</i></b></p>
29380 <p><b><i>A</i></b><i><b>B</b></i></p>
29400 2. I/B quote minimization: wikitext and html tags should not be combined
29404 <p><i>A</i><i data-parsoid='{"stx":"html"}'>B</i></p>
29405 <p><i>A</i><b><i data-parsoid='{"stx":"html"}'>B</i></b></p>
29409 ''A''<nowiki/>'''<i>B</i>'''
29413 3. I/B quote minimization: templated content stops minimization
29417 <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>
29418 <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>
29420 ''A''{{echo|''B''}}
29422 ''A''{{echo|'''''B'''''}}
29426 4. I/B quote minimization: new content should be mimimized with adjacent old content
29430 <p><i>A</i><i>B</i></p>
29431 <p><b>A</b><b>B</b></p>
29432 <p><i>A</i><b><i>B</i></b></p>
29442 5a. Merge adjacent quote nodes if they've been edited
29445 "modes": ["wt2wt", "selser"],
29447 ["p", "contents", "remove", ":contains('b')"]
29457 5b. Merge adjacent quote nodes if they've been edited
29460 "modes": ["wt2wt", "selser"],
29466 ''a''<span id="x">b</span>''c''
29472 1. Merge adjacent link nodes as long as at least one element is new
29475 "modes": ["html2wt"],
29476 "scrubWikitext": true
29479 <a rel="mw:WikiLink" href="./Football">Foot</a><a rel="mw:WikiLink" href="./Football">ball</a>
29480 <a data-parsoid="{}" rel="mw:WikiLink" href="./Football">Foot</a><a rel="mw:WikiLink" href="./Football">ball</a>
29481 <a data-parsoid="{}" rel="mw:WikiLink" href="./Football">Foot</a><a data-parsoid="{}" rel="mw:WikiLink" href="./Football">ball</a>
29485 [[Football|Foot]][[Football|ball]]
29489 2. Merge adjacent link nodes and enable additional normalizations
29492 "modes": ["html2wt"],
29493 "scrubWikitext": true
29496 <a rel="mw:WikiLink" href="./Football"><i>Foot</i></a><a rel="mw:WikiLink" href="./Football"><i>ball</i></a>
29502 3. Don't merge adjacent link nodes if scrubWikitext is false
29505 "modes": ["html2wt"],
29506 "scrubWikitext": false
29509 <a rel="mw:WikiLink" href="./Football">Foot</a><a rel="mw:WikiLink" href="./Football">ball</a>
29511 [[Football|Foot]][[Football|ball]]
29515 1. Move format tags outside of WikiLink
29518 "modes": ["html2wt"],
29519 "scrubWikitext": true
29522 <a rel="mw:WikiLink" href="./Football"><i>Football</i></a>
29523 <a rel="mw:WikiLink" href="./Football"><i><b>Football</b></i></a>
29524 <a rel="mw:WikiLink" href="./Football"><u><i><b>Football</b></i></u></a>
29527 '''''[[Football]]'''''
29528 <u>'''''[[Football]]'''''</u>
29532 2. Move format tags outside of WikiLink with mergable A tags
29535 "modes": ["html2wt"],
29536 "scrubWikitext": true
29539 <a rel="mw:WikiLink" href="./Football"><i><b>Foot</b></i></a><a rel="mw:WikiLink" href="./Football"><i><b>ball</b></i></a>
29541 '''''[[Football]]'''''
29545 3. Move format tags outside of WikiLink while preserving formats already outside WikiLink
29548 "modes": ["html2wt"],
29549 "scrubWikitext": true
29552 <font color="red"><a rel="mw:WikiLink" href="./Foo" title="Foo" class="mw-redirect"><u><b>Foo</b></u></a></font>
29554 <font color="red"><u>'''[[Foo]]'''</u></font>
29558 4. Do not move format tags outside of WikiLink which includes attributes color, style and class
29561 "modes": ["html2wt"],
29562 "scrubWikitext": true
29565 <a rel="mw:WikiLink" href="./Foo" title="Foo" class="mw-redirect"><font color="red">Foo</font></a>
29566 <a rel="mw:WikiLink" href="./Foo" title="Foo" class="mw-redirect"><span style="color: blue; font-size: 46px;">Foo></span></a>
29567 <a rel="mw:WikiLink" href="./Foo" title="Foo" class="mw-redirect"><span class="Bar">Foo</span></a>
29569 [[Foo|<font color="red">Foo</font>]]
29570 [[Foo|<span style="color: blue; font-size: 46px;">Foo></span>]]
29571 [[Foo|<span class="Bar">Foo</span>]]
29575 5. T194083 Regression test: Manual edit test that also enables scrubWikitext to move format tags outside wikilinks
29578 "modes": ["selser"],
29579 "scrubWikitext": true,
29581 ["a", "html", "<i>Foo</i>"]
29591 6. Regression test: Manual edit test to ensure diff markers are not lost
29594 "modes": ["selser"],
29595 "scrubWikitext": true,
29597 ["i", "wrap", "<a href='./Foo' rel='mw:WikiLink'></a>"]
29607 7. T194083 Regression test: Manual edit test to ensure nested diff markers aren't inserted
29610 "modes": ["selser"],
29611 "scrubWikitext": true,
29613 ["div", "after", "\n<p><a href='./Foo' rel='mw:WikiLink'>Foo </a>, placeholder</p>"]
29617 <div>placeholder</div>
29619 <div>placeholder</div>
29620 [[Foo]] , placeholder
29623 #------------------------------
29624 # End of tag minimization tests
29625 #------------------------------
29628 T56262: New entities
29632 <span typeof="mw:Entity"> </span>
29637 ## Note that there is no wikitext output for 'unknownproperty' ##
29638 ## Unknown magic words are silently dropped ##
29645 <meta property='mw:PageProp/toc' />
29646 <meta property='mw:PageProp/notoc' />
29647 <meta property='mw:PageProp/forcetoc' />
29648 <meta property='mw:PageProp/index' />
29649 <meta property='mw:PageProp/noindex' />
29650 <meta property='mw:PageProp/nogallery' />
29651 <meta property='mw:PageProp/noeditsection' />
29652 <meta property='mw:PageProp/notitleconvert' />
29653 <meta property='mw:PageProp/nocontentconvert' />
29654 <meta property='mw:PageProp/unknownproperty' />
29664 __NOCONTENTCONVERT__
29668 Consecutive <pre>s should not get merged
29670 parsoid=html2wt,html2html
29672 <pre>a</pre><pre>b</pre>
29700 Edited ISBN links not serializable as ISBN links should serialize as wikilinks
29704 <a href="./Special:BookSources/1234567890" rel="mw:ExtLink">ISBN 1234567895</a>
29706 [[Special:BookSources/1234567890|ISBN 1234567895]]
29710 Edited RFC links not serializable as RFC links should serialize as extlinks
29714 <a href="https://tools.ietf.org/html/rfc123" rel="mw:ExtLink">New RFC</a>
29716 [https://tools.ietf.org/html/rfc123 New RFC]
29720 Edited PMID links not serializable as PMID links should serialize as extlinks
29724 <a href="//www.ncbi.nlm.nih.gov/pubmed/123?dopt=Abstract" rel="mw:ExtLink">New PMID</a>
29726 [//www.ncbi.nlm.nih.gov/pubmed/123?dopt=Abstract New PMID]
29730 WTS of autolinks with trailing/surrounding context
29734 <p><a href="http://cscott.net">http://cscott.net</a><b>foo</b></p>
29735 <p><a href="http://cscott.net">http://cscott.net</a><b data-parsoid='{"stx":"html"}'>foo</b></p>
29736 <p><b><a href="http://cscott.net">http://cscott.net</a></b></p>
29737 <p><b><a href="http://cscott.net">http://cscott.net</a> </b></p>
29738 <p><b><a href="http://cscott.net">http://cscott.net</a>x</b></p>
29739 <p><a href="http://cscott.net">http://cscott.net</a>x</p>
29741 http://cscott.net'''foo'''
29743 http://cscott.net<b>foo</b>
29745 '''http://cscott.net'''
29747 '''http://cscott.net '''
29749 '''http://cscott.net<nowiki/>x'''
29751 http://cscott.net<nowiki/>x
29755 WTS of autolinks with nowikis (round-trip)
29757 x<nowiki/>http://cscott.net<nowiki/>x
29759 <p>x<a rel="mw:ExtLink" class="external free" href="http://cscott.net">http://cscott.net</a>x</p>
29762 # this is the "easy" test because it leaves in place all the
29763 # data-parsoid information indicating this is an autolink
29765 WTS of autolinks with escapes (editing)
29768 "modes": ["wt2wt"],
29770 [ "span", "remove" ]
29774 x<nowiki/>http://cscott.net<nowiki/>x
29776 x<nowiki/>http://cscott.net<nowiki/>x
29780 WTS of edited autolink-like text (T103364)
29783 "modes": ["wt2wt"],
29785 [ "span[typeof]", "removeAttr", "typeof" ]
29789 Not a link: <nowiki>http://example.com</nowiki>.
29791 Not a link: <span><nowiki>http://example.com</nowiki></span>.
29795 WTS of newly-authored autolink-like text (T103364)
29799 <p>http://example.com is not a link.</p>
29801 <nowiki>http://example.com</nowiki> is not a link.
29805 WTS of autolink-like text after an autolink (T108563)
29809 <p><a rel="mw:ExtLink" href="http://example.com">http://example.com</a> http://example.com is not a link.</p>
29811 http://example.com <nowiki>http://example.com</nowiki> is not a link.
29815 Magic links inside links (not autolinked)
29817 [[Foo|http://example.com]]
29820 [[Foo|ISBN 123456789x]]
29822 [http://foo.com http://example.com]
29823 [http://foo.com RFC 1234]
29824 [http://foo.com PMID 1234]
29825 [http://foo.com ISBN 123456789x]
29827 <p><a href="/wiki/Foo" title="Foo">http://example.com</a>
29828 <a href="/wiki/Foo" title="Foo">RFC 1234</a>
29829 <a href="/wiki/Foo" title="Foo">PMID 1234</a>
29830 <a href="/wiki/Foo" title="Foo">ISBN 123456789x</a>
29831 </p><p><a rel="nofollow" class="external text" href="http://foo.com">http://example.com</a>
29832 <a rel="nofollow" class="external text" href="http://foo.com">RFC 1234</a>
29833 <a rel="nofollow" class="external text" href="http://foo.com">PMID 1234</a>
29834 <a rel="nofollow" class="external text" href="http://foo.com">ISBN 123456789x</a>
29837 <p><a rel="mw:WikiLink" href="./Foo" title="Foo">http://example.com</a>
29838 <a rel="mw:WikiLink" href="./Foo" title="Foo">RFC 1234</a>
29839 <a rel="mw:WikiLink" href="./Foo" title="Foo">PMID 1234</a>
29840 <a rel="mw:WikiLink" href="./Foo" title="Foo">ISBN 123456789x</a></p>
29842 <p><a rel="mw:ExtLink" class="external text" href="http://foo.com">http://example.com</a>
29843 <a rel="mw:ExtLink" class="external text" href="http://foo.com">RFC 1234</a>
29844 <a rel="mw:ExtLink" class="external text" href="http://foo.com">PMID 1234</a>
29845 <a rel="mw:ExtLink" class="external text" href="http://foo.com">ISBN 123456789x</a></p>
29849 Magic links inside image captions (autolinked)
29851 [[File:Foobar.jpg|thumb|http://example.com]]
29852 [[File:Foobar.jpg|thumb|RFC 1234]]
29853 [[File:Foobar.jpg|thumb|PMID 1234]]
29854 [[File:Foobar.jpg|thumb|ISBN 123456789x]]
29856 <div class="thumb tright"><div class="thumbinner" style="width:182px;"><a href="/wiki/File:Foobar.jpg" class="image"><img alt="" src="http://example.com/images/thumb/3/3a/Foobar.jpg/180px-Foobar.jpg" decoding="async" width="180" height="20" class="thumbimage" srcset="http://example.com/images/thumb/3/3a/Foobar.jpg/270px-Foobar.jpg 1.5x, http://example.com/images/thumb/3/3a/Foobar.jpg/360px-Foobar.jpg 2x" /></a> <div class="thumbcaption"><div class="magnify"><a href="/wiki/File:Foobar.jpg" class="internal" title="Enlarge"></a></div><a rel="nofollow" class="external free" href="http://example.com">http://example.com</a></div></div></div>
29857 <div class="thumb tright"><div class="thumbinner" style="width:182px;"><a href="/wiki/File:Foobar.jpg" class="image"><img alt="" src="http://example.com/images/thumb/3/3a/Foobar.jpg/180px-Foobar.jpg" decoding="async" width="180" height="20" class="thumbimage" srcset="http://example.com/images/thumb/3/3a/Foobar.jpg/270px-Foobar.jpg 1.5x, http://example.com/images/thumb/3/3a/Foobar.jpg/360px-Foobar.jpg 2x" /></a> <div class="thumbcaption"><div class="magnify"><a href="/wiki/File:Foobar.jpg" class="internal" title="Enlarge"></a></div><a class="external mw-magiclink-rfc" rel="nofollow" href="https://tools.ietf.org/html/rfc1234">RFC 1234</a></div></div></div>
29858 <div class="thumb tright"><div class="thumbinner" style="width:182px;"><a href="/wiki/File:Foobar.jpg" class="image"><img alt="" src="http://example.com/images/thumb/3/3a/Foobar.jpg/180px-Foobar.jpg" decoding="async" width="180" height="20" class="thumbimage" srcset="http://example.com/images/thumb/3/3a/Foobar.jpg/270px-Foobar.jpg 1.5x, http://example.com/images/thumb/3/3a/Foobar.jpg/360px-Foobar.jpg 2x" /></a> <div class="thumbcaption"><div class="magnify"><a href="/wiki/File:Foobar.jpg" class="internal" title="Enlarge"></a></div><a class="external mw-magiclink-pmid" rel="nofollow" href="//www.ncbi.nlm.nih.gov/pubmed/1234?dopt=Abstract">PMID 1234</a></div></div></div>
29859 <div class="thumb tright"><div class="thumbinner" style="width:182px;"><a href="/wiki/File:Foobar.jpg" class="image"><img alt="" src="http://example.com/images/thumb/3/3a/Foobar.jpg/180px-Foobar.jpg" decoding="async" width="180" height="20" class="thumbimage" srcset="http://example.com/images/thumb/3/3a/Foobar.jpg/270px-Foobar.jpg 1.5x, http://example.com/images/thumb/3/3a/Foobar.jpg/360px-Foobar.jpg 2x" /></a> <div class="thumbcaption"><div class="magnify"><a href="/wiki/File:Foobar.jpg" class="internal" title="Enlarge"></a></div><a href="/wiki/Special:BookSources/123456789X" class="internal mw-magiclink-isbn">ISBN 123456789x</a></div></div></div>
29861 <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>
29862 <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>
29863 <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>
29864 <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>
29868 WTS of magic word text (T109371)
29873 <p><a href="http://foo.com" rel="mw:ExtLink">RFC 1234</a></p>
29874 <p><a href="./Foo" rel="mw:WikiLink">RFC 1234</a></p>
29876 <nowiki>RFC 1234</nowiki>
29878 [http://foo.com RFC 1234]
29884 Edited Redirect link should emit a non-piped wikitext link
29888 <link rel="mw:PageProp/redirect" href="Bar" data-parsoid='{"a":{"href":"./Foo"},"sa":{"href":"Foo"}}'>
29894 T75121: Infer extension name from typeOf if data-mw is not present
29896 parsoid={ "modes": ["html2wt"], "suppressErrors": true }
29898 <div typeOf="mw:Extension/foo"></div>
29903 # Note that the <p> wrapping isn't present in PHP parser output
29904 # The important thing for this test is that P-wrapping doesn't
29905 # interfere with the <nowiki> protection for leading - in <td>
29906 # (which isn't necessary for <th>).
29908 T88318: p-wrapped dash in table.
29910 parsoid=html2wt,wt2wt
29913 <tr><th><p>-</p></th><th><p>- </p></th></tr>
29914 <tr><td><p>-</p></td><td><p>- </p></td></tr>
29915 <tr><td><small>-</small></td><td><br/><p>-</p></td><td><br/>-</td></tr>
29922 |<nowiki>-</nowiki>
29923 |<nowiki>- </nowiki>
29943 <td><small>-</small>
29950 </td></tr></tbody></table>
29954 T149209: WTS: Handle newlines in table cells properly
29962 </td><td data-parsoid='{"stx":"row"}'>c</td></tr>
29964 </td><td data-parsoid='{"stx":"row", "startTagSrc": "{{!}}{{!}}"}'>y</td></tr>
29970 </th><th data-parsoid='{"stx":"row"}'>c</th></tr>
29972 </th><th data-parsoid='{"stx":"row"}'>y</th></tr>
29994 T149209: Selser: Handle newlines in table cells properly
29997 "modes": ["selser"],
29999 [ "#h1", "html", "a\nb\n" ],
30000 [ "#h2", "html", "a\nb\n" ],
30001 [ "#c1", "html", "a\nb\n" ],
30002 [ "#c2", "html", "<p>a</p>" ],
30003 [ "#c3", "html", "<p>a</p>" ],
30004 [ "#c4", "html", "edit-me<p>a</p>" ]
30009 ! id="h1" |edit-me!!1
30011 ! id="h2" |edit-me||2
30013 | id="c1" |edit-me||3
30015 | id="c2" |edit-me||4
30017 | id="c3" |edit-me||p||q||r
30019 | id="c4" |edit-me||p||q||r
30048 HTML id attribute with Parsoid-like element ids should not be serialized to wikitext
30053 <td id='mwAc'>foo</td>
30054 <td id='serialize-this'>bar</td>
30059 | id="serialize-this" |bar
30064 Parsoid-like element ids should not be serialized to wikitext unless shadowed
30068 <div id="mwAQ" data-parsoid='{"stx":"html","a":{"id":"mwAQ"},"sa":{"id":"hello"}}'>ok</div>
30070 <div id="hello">ok</div>
30074 Testing serialization after deletion in references
30077 "modes": ["wt2wt"],
30083 hi <ref><div id="x">ho</div></ref>
30093 Testing serialization after deletion of table cells
30096 "modes": ["wt2wt", "selser"],
30104 | id="x" |c1 {{!}}{{!}}{{!}}c2 |||c3
30114 Testing selser after addition of new row before first row (T125419)
30117 "modes": ["wt2wt", "selser"],
30119 [ "tr", "before", "<tr><td>X</td></tr>" ]
30135 Serialize new table rows in a HTML table using HTML tags
30138 "modes": ["wt2wt", "selser"],
30140 [ "tr", "before", "<tr><td>X</td></tr>" ]
30144 <table><tr><td>a</td></tr></table>
30146 <table><tr><td>X</td></tr><tr><td>a</td></tr></table>
30150 Serialize new table cells in a HTML row using HTML tags
30153 "modes": ["wt2wt", "selser"],
30155 [ "td", "before", "<td>X</td>" ]
30159 <table><tr><td>a</td></tr></table>
30161 <table><tr><td>X</td><td>a</td></tr></table>
30165 Serialize wikitext list items as HTML list items when embedded in a HTML list
30169 <ul data-parsoid='{"stx": "html"}'>
30170 <li data-parsoid='{}'>a</li>
30185 # Nested list should be inside <li>, that is
30186 # <ul><li>foo<ul>..</ul></li></ul> instead of
30187 # <ul><li>foo</li><ul>..</ul></ul>
30188 # See https://stackoverflow.com/questions/5899337/proper-way-to-make-html-nested-list
30190 Wikitext lists can be nested inside HTML lists
30194 <ul data-parsoid='{"stx": "html"}'>
30195 <li data-parsoid='{"stx": "html"}'>a
30196 <ul><li>b</li></ul>
30200 <ul data-parsoid='{"stx": "html"}'>
30202 <ul><li>y</li></ul>
30220 <ul><li>b</li></ul>
30225 <ul><li>y</li></ul>
30234 "modes": ["wt2wt"],
30236 [ "#xyz", "before", "<b>before</b> stuff " ],
30237 [ "#xyz", "after", " stuff <i>after</i>" ],
30238 [ "#xyz", "html", "x <b>y</b> z" ]
30242 <span id="xyz">hello</span>
30244 '''before''' stuff <span id="xyz">x '''y''' z</span> stuff ''after''
30248 Never serialize a-tag as html, regardless of what data-parsoid has to say
30250 parsoid={ "modes": ["html2wt"], "suppressErrors": true }
30252 <a rel="mw:WikiLink" href="./Foo" title="Foo" data-parsoid='{"stx":"html"}'>Foo</a>
30257 ## SSS FIXME: This is broken output nevertheless.
30258 ## What might be a reasonable non-broken output for this?
30259 ## This is an edge case unlikely to be seen in production
30260 ## that I am not wasting more time on this right now.
30262 Never serialize a-tag as html, no matter what attributes it has
30264 parsoid={ "modes": ["html2wt"], "suppressErrors": true }
30266 <a bad='true' href='http://boo.org'><img src='http://boohoo.org' /></a>
30268 [http://boo.org http://boohoo.org]
30271 # Misnested is an indication that selser can reuse the source but these have
30272 # shown to sneak through on occasion. See T101768.
30273 # The original wikitext here is: [http://test.com [[one]] two three]
30275 Strip span tags added to mark misnested links
30279 <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>
30281 [http://test.com][[one]] two three
30285 Catch regression when unpacking misnested links
30289 {{echo|hi}}[http://example.com [[ho]]]
30291 <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>
30295 Catch regression when unpacking with trailing content
30297 {{echo|Foo <references/> bar}}
30299 <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>
30303 Use data-parsoid.firstWikitextNode to compute newline constraints for template content
30307 <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|}"]}'>
30319 ## This test verifies the presence and computation of this attribute indirectly
30320 ## by making an edit and ensuring that the serialization is correct (which it would be
30321 ## only if firstWikitextNode is properly set).
30323 data-parsoid.firstWikitextNode should be computed properly in the presence of fostered content
30326 "modes": ["wt2wt"],
30328 [ "div#x", "remove" ],
30329 [ "div", "before", "<div>new</div>" ]
30333 <div id="x">foo</div>
30335 {{echo|<div>boo</div>
30343 {{echo|<div>boo</div>
30349 # --------------------------------------------
30350 # Tests spec'ing wikitext serialization norms |
30351 # --------------------------------------------
30354 Serialize multi-line indent-pre starting with wikitext syntax
30368 1. Categories should always be serialized on their own line
30372 foo<link rel="mw:PageProp/Category" href="./Category:Foo">bar
30380 2. Categories that are part of templates should not introduce a line break
30382 foo {{echo|<span>bar</span> [[Category:baz]]}} bar
30384 <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>
30387 # Careful while editing these next 2 tests. There are \u200f characters
30388 # before and after the <link> tags in the HTML and following some
30389 # of the categories in wikitext
30390 # Do not remove these characters in edits.
30392 # As part of the serialization, these bidi characters will get stripped.
30394 RTL (\u200f) and LTR (\u200e) markers around category tags should be stripped
30397 "modes": ["html2wt"],
30398 "scrubWikitext": true
30401 <p><link rel="mw:PageProp/Category" href="./קטגוריה:טקסים" />
30402 <link rel="mw:PageProp/Category" href="./קטגוריה:_שיטות_משפט" /></p>
30405 [[קטגוריה: שיטות משפט]]
30409 RTL (\u200f) and LTR (\u200e) markers should not be stripped if followed by a text node
30412 "modes": ["html2wt"],
30413 "scrubWikitext": true
30416 <p><link rel="mw:PageProp/Category" href="./קטגוריה:טקסים" />y</p>
30423 Lists: Add space after bullets
30430 <li><span> baz</span></li>
30435 * <span> baz</span>
30439 1. Headings: Add space before/after == (T53744)
30446 <h2><span> baz</span></h2>
30454 == <span> baz</span> ==
30458 2. Headings: Add space before/after == even after hoisted content
30461 "modes": ["html2wt"],
30462 "scrubWikitext": true
30465 <h2> <link href="./Category:A2" rel="mw:PageProp/Category" />ok</h2>
30473 1. Headings: suppress newly created empty headings
30476 "modes": ["html2wt"],
30477 "scrubWikitext": true
30485 2. Headings: don't suppress empty headings if scrubWikitext is false
30495 3. Headings: suppress empty headings on edits
30498 "modes": ["selser"],
30499 "scrubWikitext": true,
30505 ==<span id="x">foo</span>==
30510 Headings: Replace <br/> with a single whitespace char (when scrubWikitext = true)
30513 "modes": ["html2wt"],
30514 "scrubWikitext": true
30517 <h2>foo<br/>bar</h2>
30518 <h2>foo <span><br/>bar</span> baz</h2>
30522 == foo <span> bar</span> baz ==
30526 Headings: Replace <br/> with a single whitespace char (when scrubWikitext = false)
30529 "modes": ["html2wt"],
30530 "scrubWikitext": false
30533 <h2>foo<br/>bar</h2>
30539 1. WT Quote Tags: suppress newly created empty style tags
30542 "modes": ["html2wt"],
30543 "scrubWikitext": true
30551 2. WT Quote Tags: don't suppress empty style tags if scrubWikitext is false
30557 ''<nowiki/>'''''<nowiki/>'''
30561 3. WT Quote Tags: suppress empty style tags on edits
30564 "modes": ["selser"],
30565 "scrubWikitext": true,
30571 '''<span id="x">foo</span>'''
30576 1. Anchors: suppress newly created empty anchors
30579 "modes": ["html2wt"],
30580 "scrubWikitext": true
30583 <a rel="mw:WikiLink" href="./Test" title="Test"></a>
30588 2. Anchors: don't suppress empty anchors if scrubWikitext is false
30591 "modes": ["html2wt"],
30592 "scrubWikitext": false
30595 <a rel="mw:WikiLink" href="./Test" title="Test"></a>
30601 3. Anchors: suppress empty anchors on edits
30604 "modes": ["selser"],
30605 "scrubWikitext": true,
30611 [[Test|<span id="x">foo</span>]]
30616 3a. Anchors: do not suppress numbered extlinks
30619 "modes": ["wt2wt"],
30620 "scrubWikitext": true
30625 <a rel="mw:ExtLink" href="http://foo.com"></a>
30629 3b. Anchors: do not suppress numbered extlinks
30632 "modes": ["wt2wt"],
30633 "scrubWikitext": true,
30639 [http://foo.com <span id="x">foo</span>]
30645 Normalizations should be restricted to edited content
30648 "modes": ["selser"],
30649 "scrubWikitext": true,
30651 [ "h1", "before", "<i></i>"]
30665 1. Multiple normalizations (html2wt)
30668 "modes": ["html2wt"],
30669 "scrubWikitext": true
30673 <p><a href='Foo' rel='mw:WikiLink'>foo<i></i>
30674 </a><b><i></i></b>x</p>
30683 2. Multiple normalizations (selser)
30686 "modes": ["selser"],
30687 "scrubWikitext": true,
30689 [ "#x", "after", "<h1><i></i></h1>\n<p> bar<b></b></p>"]
30693 <div id="x">foo</div>
30695 <div id="x">foo</div>
30700 1. Indent Pre Nowiki: suppress whitespace at the start of new paragraph
30703 "modes": ["html2wt"],
30704 "scrubWikitext": true
30716 2. Indent Pre Nowiki: don't suppress whitespace at the start of new paragraph if scrubWikitext is false
30723 <nowiki> </nowiki>hi
30725 <nowiki> </nowiki> hello
30729 3. Indent Pre Nowiki: suppress whitespace after newlines in new paragraph or table cell
30732 "modes": ["html2wt"],
30733 "scrubWikitext": true
30742 baz bang</td></tr></table>
30748 bar<span>boo</span></p>
30764 bar<span>boo</span>
30768 4. Indent Pre Nowiki: suppress leading whitespace in edited paragraphs
30771 "modes": ["selser"],
30772 "scrubWikitext": true,
30774 [ "p", "html", " a\n b" ]
30785 1. New links that end in spaces
30788 "modes": ["html2wt"],
30789 "scrubWikitext": false
30792 <p><a rel="mw:WikiLink" href="./Berlin" title="Berlin">Berlin </a>is the capital of Germany.</p>
30793 <p><a rel="mw:WikiLink" href="./Foo" title="Foo">Foo </a><b>bar</b></p>
30794 <p><a rel="mw:WikiLink" href="./Boston" title="Boston">Boston </a> is a city.</p>
30796 [[Berlin ]]<nowiki/>is the capital of Germany.
30800 [[Boston ]] is a city.
30804 2. New links that end in spaces
30807 "modes": ["html2wt"],
30808 "scrubWikitext": true
30811 <p><a rel="mw:WikiLink" href="./Berlin" title="Berlin">Berlin </a>is the capital of Germany.</p>
30812 <p><a rel="mw:WikiLink" href="./Foo" title="Foo">Foo </a><b>bar</b></p>
30813 <p><a rel="mw:WikiLink" href="./Boston" title="Boston">Boston </a> is a city.</p>
30815 [[Berlin]] is the capital of Germany.
30819 [[Boston]] is a city.
30823 1. Table cells with escapable prefixes
30826 "modes": ["html2wt"],
30827 "scrubWikitext": false
30831 <tr><td>a</td></tr>
30832 <tr><td>-</td></tr>
30833 <tr><td>+</td></tr>
30834 <tr><td>}</td></tr>
30840 |<nowiki>-</nowiki>
30842 |<nowiki>+</nowiki>
30844 |<nowiki>}</nowiki>
30849 2. Table cells with escapable prefixes
30852 "modes": ["html2wt"],
30853 "scrubWikitext": true
30857 <tr><td>a</td></tr>
30858 <tr><td>-</td></tr>
30859 <tr><td>+</td></tr>
30860 <tr><td>}</td></tr>
30875 3a. Table cells with escapable prefixes after edits
30878 "modes": ["selser"],
30879 "scrubWikitext": true,
30881 [ "table tbody tr:first-child td:first-child", "remove"]
30895 3b. Table cells with escapable prefixes after edits
30898 "modes": ["selser"],
30899 "scrubWikitext": true,
30901 [ "table tbody tr:first-child td:first-child", "html", "-" ],
30908 |<span id="x">foo</span>+
30917 # FIXME: This test will fail because
30918 # normalization doesn't realize that the id attribute
30919 # will eliminate the escapable scenario
30921 4a. Table cells without escapable prefixes after edits
30924 "modes": ["selser"],
30925 "scrubWikitext": true,
30927 [ "#x", "html", "-" ]
30940 ## This tests normalizer's ability to discriminate between
30941 ## cells having identical content.
30943 4b. Table cells without escapable prefixes after edits
30946 "modes": ["selser"],
30947 "scrubWikitext": true,
30949 [ "td", "html", "-" ]
30962 ## This tests normalizer's ability to not be tripped by
30963 ## comments (and whitespace)
30965 4c. Table cells without escapable prefixes after edits
30968 "modes": ["selser"],
30969 "scrubWikitext": true,
30971 [ "table tbody tr td:first-child", "remove" ]
30986 ## This tests normalizer's ability to handle HTML cells
30988 4d. Table cells without escapable prefixes after edits
30991 "modes": ["selser"],
30992 "scrubWikitext": true,
30994 [ "td", "html", "-" ]
30999 <tr><td>a</td></tr>
31003 <tr><td>-</td></tr>
31007 ## T111151 Remove font elements without attributes
31009 5a. font tags without attributes should be dropped in scrubWikitext mode
31012 "modes": ["html2wt"],
31013 "scrubWikitext": true
31017 <font><font>bar</font></font>
31018 <font class="x">boo</font>
31022 <font class="x">boo</font>
31026 5b. font tags should not be dropped without scrubWikitext being enabled
31029 "modes": ["html2wt"],
31030 "scrubWikitext": false
31039 Ignore empty <p></p> when scrubWikitext is false
31042 "modes": ["html2wt"],
31043 "scrubWikitext": false
31047 <p>a</p><p></p><p>b</p>
31088 Normalize empty paragraphs to HTML form that html2wt expects
31091 "modes": ["html2wt"],
31092 "scrubWikitext": true
31096 <p>a</p><p></p><p>b</p>
31161 Empty paragraphs (marked with mw-empty-elt) found in source should not be normalized away
31164 "modes": ["html2wt"],
31165 "scrubWikitext": true
31173 <p class="mw-empty-elt"></p>
31177 <caption></caption>
31188 Templated content should be skipped over by normalization
31191 "modes": ["html2wt"],
31192 "scrubWikitext": true
31195 <p about="#mwt1" typeof="mw:Transclusion" data-mw='{"parts":[{"template":{"target":{"wt":"SomeTemplate1","href":"./Template:SomeTemplate1"},"params":{"1":{"wt":"boo"}},"i":0}}]}'>foobar</p><p about="#mwt2" typeof="mw:Transclusion" data-mw='{"parts":[{"template":{"target":{"wt":"SomeTemplate2","href":"./Template:SomeTemplate2"},"params":{"1":{"wt":"booboo"}},"i":0}}]}'>foobar</p><span about="#mwt2">
31196 </span><p about="#mwt2"></p><span about="#mwt2">
31199 {{SomeTemplate1|boo}}{{SomeTemplate2|booboo}}
31203 Escape nowiki DOM elements
31207 <nowiki><i>foo</i></nowiki>
31209 <nowiki>''foo''</nowiki>
31212 # This is meant to be an interim fix while we go about figuring out
31213 # how to not introduce these trailing <nowiki/>s in the first place.
31215 T115717: Strip trailing <nowiki/>s (without affecting valid uses)
31219 <p>x<meta typeof="mw:Placeholder" data-parsoid='{"src":"<nowiki/>"}'/><meta typeof="mw:Placeholder" data-parsoid='{"src":"<nowiki/>"}'/>
31221 <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>
31222 <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>
31236 New list is serialized on newlines
31240 <p>The quick brown fox jumps over the lazy dog.</p><ul>
31244 </ul><p>The quick onyx goblin jumps over the lazy dwarf.</p>
31246 The quick brown fox jumps over the lazy dog.
31252 The quick onyx goblin jumps over the lazy dwarf.
31256 New lists in formatting elements serialized w/o newlines
31268 <small><ul><li>hi</li></ul></small>
31280 New list in table doesn't need newlines
31284 <table><tr><td><ul><li>test</li><li>123</li></td></tr></table>
31293 # ---------------------------------------------------
31294 # End of tests spec'ing wikitext serialization norms |
31295 # ---------------------------------------------------
31299 Bare inline nodes not wrapped inside p-tags should be treated as p-wrapped
31307 <td><b>c</b><p>d</p></td>
31326 Anchor without href scenarios
31328 parsoid={ "modes": ["html2wt"], "suppressErrors": true }
31331 <a class="no">dice</a>
31336 <span name="foo"></span>
31340 New transclusion added after a list should be serialized after the list
31344 <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>
31350 # -----------------------------------------------------------------
31351 # End of section for Parsoid-only html2wt tests for serialization
31353 # -----------------------------------------------------------------
31355 # -----------------------------------------------------------------
31356 # The following section of tests are primarily to spec behavior of
31357 # the selective serializer. All these tests have manual selser
31358 # changes. The automated selser changes for all tests handle the
31359 # wide variation of changes, but these tests here capture specs
31360 # deterministically.
31361 # ----------------------------------------------------------------
31365 Selser: New comments should not be lost
31368 "modes": ["selser"],
31370 [ "#a", "after", "<!--c1-->" ],
31371 [ "#b", "before", "<!--c2-->" ]
31375 <span id="a">a</span>
31377 <span id="b">b</span>
31379 <span id="a">a</span><!--c1-->
31381 <!--c2--><span id="b">b</span>
31386 Selser: Check for validity of DSR before using it
31389 "modes": ["selser"],
31391 [ "#a", "before", "<meta property='mw:PageProp/displaytitle' content='foo'>" ]
31395 <span id="a">a</span>
31397 {{DISPLAYTITLE:foo}}
31398 <span id="a">a</span>
31402 1. DOMDiff: Changes to <ref> content should be looked up using id
31405 "modes": ["selser"],
31407 ["#X", "after", "bar"],
31408 ["#Y", "after", "baz"]
31412 X <ref><span id="X">foo</span></ref>
31415 <ref name="a"><span id="Y">foo</span></ref>
31418 X <ref><span id="X">foo</span>bar</ref>
31421 <ref name="a"><span id="Y">foo</span>baz</ref>
31426 2. DOMDiff: Changes to <ref> content should be looked up using id
31429 "modes": ["selser"],
31431 ["#Z", "after", "bar"]
31435 A <ref>foo bar for a</ref>
31436 B <ref group="X" name="b" />
31440 <references group="X">
31441 <ref name="b"><span id="Z">foo</span></ref>
31444 A <ref>foo bar for a</ref>
31445 B <ref group="X" name="b" />
31449 <references group="X">
31450 <ref name="b"><span id="Z">foo</span>bar</ref>
31455 DOMDiff: Edits to content nested in elements with templated attributes should not be lost (T139388)
31458 "modes": ["selser"],
31460 [ "div:first-child", "text", "bar" ]
31464 <div style="{{1x|color:red;}}%">foo</div>
31466 <div style="{{1x|color:red;}}%">bar</div>
31478 <li class="mw-empty-elt"></li>
31479 <li class="mw-empty-elt"></li>
31486 [[File:Thumb.png|thumb]]
31488 <div class="thumb tright"><div class="thumbinner" style="width:137px;"><a href="/wiki/File:Thumb.png" class="image"><img alt="Thumb.png" src="http://example.com/images/e/ea/Thumb.png" decoding="async" width="135" height="135" class="thumbimage" /></a> <div class="thumbcaption"><div class="magnify"><a href="/wiki/File:Thumb.png" class="internal" title="Enlarge"></a></div></div></div></div>
31490 <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>
31494 unclosed internal link XSS (T137264)
31496 [[#%3Cscript%3Ealert(1)%3C/script%3E|
31498 <p>[[#<script>alert(1)</script>|
31501 <p>[[#%3Cscript%3Ealert(1)%3C/script%3E|</p>
31505 Validating that <style> isn't eaten by tidy (T167349)
31510 <style>.foo::before { content: "<foo>"; }</style>
31511 <style data-mw-foobar="baz">.foo::after { content: "<bar>"; }</style>
31515 <style>.foo::before { content: "<foo>"; }</style>
31516 <style data-mw-foobar="baz">.foo::after { content: "<bar>"; }</style>
31520 <style typeof="mw:Extension/style" data-mw='{"name":"style","attrs":{},"body":{"extsrc":".foo::before { content: \"<foo>\"; }"}}'>.foo::before { content: "<foo>"; }</style>
31521 <style data-x-data-mw-foobar="baz" typeof="mw:Extension/style" data-mw='{"name":"style","attrs":{"data-x-data-mw-foobar":"baz"},"body":{"extsrc":".foo::after { content: \"<bar>\"; }"}}'>.foo::after { content: "<bar>"; }</style>
31525 ## Right now, Parsoid doesn't de-duplicate style tags.
31526 ## So, we shouldn't see link tags that need to bypass the sanitizer.
31527 ## In a followup patch, when we de-duplicate style tags and
31528 ## introduce link tags, we'll add a hook for link tags in
31529 ## the parser test runner script.
31531 Validating that <style> isn't wrapped in a paragraph (T186965)
31535 A style tag, by itself or with other style/link tags, shouldn't be wrapped in a paragraph
31537 <style>.foo::before { content: "<foo>"; }</style>
31539 <style>.foo::before { content: "<foo>"; }</style> <link rel="foo" href="bar"/><style>.foo::before { content: "<foo>"; }</style>
31541 But if it's on a line with other content, let it be wrapped.
31543 <style>.foo::before { content: "<foo>"; }</style> bar
31545 foo <style>.foo::before { content: "<foo>"; }</style>
31547 foo <style>.foo::before { content: "<foo>"; }</style> bar
31549 And the same if we have non-paragraph-breaking whitespace
31552 <style>.foo::before { content: "<foo>"; }</style>
31555 <p>A style tag, by itself or with other style/link tags, shouldn't be wrapped in a paragraph
31557 <style>.foo::before { content: "<foo>"; }</style>
31558 <style>.foo::before { content: "<foo>"; }</style> <link rel="foo" href="bar"/><style>.foo::before { content: "<foo>"; }</style>
31559 <p>But if it's on a line with other content, let it be wrapped.
31560 </p><p><style>.foo::before { content: "<foo>"; }</style> bar
31561 </p><p>foo <style>.foo::before { content: "<foo>"; }</style>
31562 </p><p>foo <style>.foo::before { content: "<foo>"; }</style> bar
31563 </p><p>And the same if we have non-paragraph-breaking whitespace
31565 <style>.foo::before { content: "<foo>"; }</style>
31569 <p>A style tag, by itself or with other style/link tags, shouldn't be wrapped in a paragraph</p>
31571 <style typeof="mw:Extension/style" data-mw='{"name":"style","attrs":{},"body":{"extsrc":".foo::before { content: \"<foo>\"; }"}}'>.foo::before { content: "<foo>"; }</style>
31573 <p><style typeof="mw:Extension/style" data-mw='{"name":"style","attrs":{},"body":{"extsrc":".foo::before { content: \"<foo>\"; }"}}'>.foo::before { content: "<foo>"; }</style> <link rel="foo" href="bar"/><style typeof="mw:Extension/style" data-mw='{"name":"style","attrs":{},"body":{"extsrc":".foo::before { content: \"<foo>\"; }"}}'>.foo::before { content: "<foo>"; }</style></p>
31575 <p>But if it's on a line with other content, let it be wrapped.</p>
31577 <p><style typeof="mw:Extension/style" data-mw='{"name":"style","attrs":{},"body":{"extsrc":".foo::before { content: \"<foo>\"; }"}}'>.foo::before { content: "<foo>"; }</style> bar</p>
31579 <p>foo <style typeof="mw:Extension/style" data-mw='{"name":"style","attrs":{},"body":{"extsrc":".foo::before { content: \"<foo>\"; }"}}'>.foo::before { content: "<foo>"; }</style></p>
31581 <p>foo <style typeof="mw:Extension/style" data-mw='{"name":"style","attrs":{},"body":{"extsrc":".foo::before { content: \"<foo>\"; }"}}'>.foo::before { content: "<foo>"; }</style> bar</p>
31583 <p>And the same if we have non-paragraph-breaking whitespace</p>
31586 <style typeof="mw:Extension/style" data-mw='{"name":"style","attrs":{},"body":{"extsrc":".foo::before { content: \"<foo>\"; }"}}'>.foo::before { content: "<foo>"; }</style>
31591 Validating that <link> isn't wrapped in a paragraph (T186965)
31595 A link tag, by itself or with other style/link tags, shouldn't be wrapped in a paragraph
31597 <link rel="foo" href="bar"/>
31599 <link rel="foo" href="bar"/> <style>.foo::before { content: "<foo>"; }</style><link rel="foo" href="bar"/>
31601 But if it's on a line with other content, let it be wrapped.
31603 <link rel="foo" href="bar"/> bar
31605 foo <link rel="foo" href="bar"/>
31607 foo <link rel="foo" href="bar"/> bar
31609 And the same if we have non-paragraph-breaking whitespace
31612 <link rel="foo" href="bar"/>
31615 <p>A link tag, by itself or with other style/link tags, shouldn't be wrapped in a paragraph
31617 <link rel="foo" href="bar"/>
31618 <link rel="foo" href="bar"/> <style>.foo::before { content: "<foo>"; }</style><link rel="foo" href="bar"/>
31619 <p>But if it's on a line with other content, let it be wrapped.
31620 </p><p><link rel="foo" href="bar"/> bar
31621 </p><p>foo <link rel="foo" href="bar"/>
31622 </p><p>foo <link rel="foo" href="bar"/> bar
31623 </p><p>And the same if we have non-paragraph-breaking whitespace
31625 <link rel="foo" href="bar"/>
31631 Extension returning multiple nodes starting with a style tag roundtrips
31636 {{echo|<html><style>.hi { color: red; }</style>
31638 <tr><td class="hi">ho</td></tr>
31641 <p about="#mwt5" typeof="mw:Transclusion" data-parsoid='{"fostered":true,"autoInsertedEnd":true,"autoInsertedStart":true,"firstWikitextNode":"TABLE_html","pi":[[{"k":"1"}]]}' data-mw='{"parts":["<table>\n",{"template":{"target":{"wt":"echo","href":"./Template:Echo"},"params":{"1":{"wt":"<html><style>.hi { color: red; }</style>\n</html>"}},"i":0}},"\n<tr><td class=\"hi\">ho</td></tr>\n</table>"]}'><style typeof="mw:Extension/html" about="#mwt4" data-mw='{"name":"html","attrs":{},"body":{"extsrc":"<style>.hi { color: red; }</style>\n"}}'>.hi { color: red; }</style><span about="#mwt4">
31642 </span></p><table about="#mwt5" data-parsoid='{"stx":"html"}'>
31644 <tbody><tr><td class="hi">ho</td></tr>
31649 Decoding of HTML entities in headings and links for IDs and link fragments (T103714)
31651 wgFragmentMode=[ 'html5', 'legacy' ]
31653 ==A&B&C&amp;D&amp;amp;E==
31654 [[#A&B&C&amp;D&amp;amp;E]]
31656 <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>
31657 <p><a href="#A&B&C&amp;D&amp;amp;E">#A&B&C&amp;D&amp;amp;E</a>
31660 <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>
31661 <p><a rel="mw:WikiLink" href="./Parser_test#A&B&C&amp;D&amp;amp;E" data-parsoid='{"stx":"simple","a":{"href":"./Parser_test#A&B&C&amp;D&amp;amp;E"},"sa":{"href":"#A&B&amp;C&amp;amp;D&amp;amp;amp;E"}}'>#A&B&C&amp;D&amp;amp;E</a></p>
31665 Decoding of HTML entities in headings and links for IDs and link fragments (T103714) (legacy)
31667 wgFragmentMode=[ 'legacy' ]
31669 ==A&B&C&amp;D&amp;amp;E==
31670 [[#A&B&C&amp;D&amp;amp;E]]
31672 <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>
31673 <p><a href="#A.26B.26C.26amp.3BD.26amp.3Bamp.3BE">#A&B&C&amp;D&amp;amp;E</a>
31678 Decoding of HTML entities in embedded HTML tags
31680 <table class="1&2&3&amp;4&amp;amp;5"><tr><td>x</td></tr></table>
31682 <table class="1&2&3&amp;4&amp;amp;5"><tr><td>x</td></tr></table>
31685 <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>
31689 Decoding of HTML entities in indicator names for IDs (T104196)
31691 parsoid=wt2html,html2html
31694 <indicator name="1&2&3&amp;4&amp;amp;5">Indicator</indicator>
31696 1&2&3&4&amp;5=Indicator
31699 <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>
31702 # this version of the test strips out the ambiguity so Parsoid rts cleanly
31704 Decoding of HTML entities in indicator names for IDs (unambiguous) (T104196)
31708 <indicator name="1&2&3&amp;4&amp;amp;5">Indicator</indicator>
31710 1&2&3&4&amp;5=Indicator
31713 <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>
31716 # This fragment mode is what Parsoid supports.
31718 HTML5 ids: fallback to legacy
31720 wgFragmentMode=[ 'html5', 'legacy' ]
31732 ==Hey < # " > % : '==
31733 [[#Foo bar]] [[#foo Bar]] [[#Тест]] [[#тест]] [[#Hey < # " > % : ']]
31735 {{anchorencode:💩}} <span id="{{anchorencode:💩}}"></span>
31737 <!-- These two links should produce identical HTML -->
31738 [[#啤酒]] [[#%E5%95%A4%E9%85%92]]
31741 <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>
31743 <li class="toclevel-1 tocsection-1"><a href="#Foo_bar"><span class="tocnumber">1</span> <span class="toctext">Foo bar</span></a></li>
31744 <li class="toclevel-1 tocsection-2"><a href="#foo_Bar_2"><span class="tocnumber">2</span> <span class="toctext">foo Bar</span></a></li>
31745 <li class="toclevel-1 tocsection-3"><a href="#Тест"><span class="tocnumber">3</span> <span class="toctext">Тест</span></a></li>
31746 <li class="toclevel-1 tocsection-4"><a href="#Тест_2"><span class="tocnumber">4</span> <span class="toctext">Тест</span></a></li>
31747 <li class="toclevel-1 tocsection-5"><a href="#тест"><span class="tocnumber">5</span> <span class="toctext">тест</span></a></li>
31748 <li class="toclevel-1 tocsection-6"><a href="#Hey_<_#_"_>_%_:_'"><span class="tocnumber">6</span> <span class="toctext">Hey < # " > % : '</span></a></li>
31752 <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>
31753 <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>
31754 <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>
31755 <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>
31756 <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>
31757 <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>
31758 <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>
31759 </p><p>💩 <span id="💩"></span>
31760 </p><p><a href="#啤酒">#啤酒</a> <a href="#啤酒">#啤酒</a>
31763 <h2 id="Foo_bar">Foo bar</h2>
31765 <h2 id="foo_Bar_2">foo Bar</h2>
31767 <h2 id="Тест"><span id=".D0.A2.D0.B5.D1.81.D1.82" typeof="mw:FallbackId"></span>Тест</h2>
31769 <h2 id="Тест_2"><span id=".D0.A2.D0.B5.D1.81.D1.82_2" typeof="mw:FallbackId"></span>Тест</h2>
31771 <h2 id="тест"><span id=".D1.82.D0.B5.D1.81.D1.82" typeof="mw:FallbackId"></span>тест</h2>
31773 <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>
31774 <p><a rel="mw:WikiLink" href="./Parser_test#Foo_bar">#Foo bar</a> <a rel="mw:WikiLink" href="./Parser_test#foo_Bar">#foo Bar</a> <a rel="mw:WikiLink" href="./Parser_test#Тест">#Тест</a> <a rel="mw:WikiLink" href="./Parser_test#тест">#тест</a> <a rel="mw:WikiLink" href="./Parser_test#Hey_<_#_"_>_%_:_'" data-parsoid='{"stx":"simple","a":{"href":"./Parser_test#Hey_<_#_\"_>_%_:_'"},"sa":{"href":"#Hey < # \" > % : '"}}'>#Hey < # " > % : '</a></p>
31776 <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>
31778 <!-- These two links should produce identical HTML -->
31779 <p><a rel="mw:WikiLink" href="./Parser_test#啤酒">#啤酒</a> <a rel="mw:WikiLink" href="./Parser_test#啤酒" data-parsoid='{"stx":"simple","a":{"href":"./Parser_test#啤酒"},"sa":{"href":"#%E5%95%A4%E9%85%92"}}'>#啤酒</a></p>
31782 # Parsoid doesn't support this mode
31784 HTML5 ids: legacy with a fallback to modern
31786 wgFragmentMode=[ 'legacy', 'html5' ]
31798 ==Hey < # " > % : '==
31799 [[#Foo bar]] [[#foo Bar]] [[#Тест]] [[#тест]] [[#Hey < # " > % : ']]
31801 {{anchorencode:💩}} <span id="{{anchorencode:💩}}"></span>
31803 <!-- These two links should produce identical HTML -->
31804 [[#啤酒]] [[#%E5%95%A4%E9%85%92]]
31807 <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>
31809 <li class="toclevel-1 tocsection-1"><a href="#Foo_bar"><span class="tocnumber">1</span> <span class="toctext">Foo bar</span></a></li>
31810 <li class="toclevel-1 tocsection-2"><a href="#foo_Bar_2"><span class="tocnumber">2</span> <span class="toctext">foo Bar</span></a></li>
31811 <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>
31812 <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>
31813 <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>
31814 <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>
31818 <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>
31819 <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>
31820 <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>
31821 <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>
31822 <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>
31823 <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>
31824 <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>
31825 </p><p>.F0.9F.92.A9 <span id=".F0.9F.92.A9"></span>
31826 </p><p><a href="#.E5.95.A4.E9.85.92">#啤酒</a> <a href="#.E5.95.A4.E9.85.92">#啤酒</a>
31830 # Parsoid doesn't support this mode.
31832 HTML5 ids: no legacy
31834 wgFragmentMode=[ 'html5' ]
31846 ==Hey < # " > % : '==
31847 [[#Foo bar]] [[#foo Bar]] [[#Тест]] [[#тест]] [[#Hey < # " > % : ']]
31849 {{anchorencode:💩}} <span id="{{anchorencode:💩}}"></span>
31851 <!-- These two links should produce identical HTML -->
31852 [[#啤酒]] [[#%E5%95%A4%E9%85%92]]
31855 <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>
31857 <li class="toclevel-1 tocsection-1"><a href="#Foo_bar"><span class="tocnumber">1</span> <span class="toctext">Foo bar</span></a></li>
31858 <li class="toclevel-1 tocsection-2"><a href="#foo_Bar_2"><span class="tocnumber">2</span> <span class="toctext">foo Bar</span></a></li>
31859 <li class="toclevel-1 tocsection-3"><a href="#Тест"><span class="tocnumber">3</span> <span class="toctext">Тест</span></a></li>
31860 <li class="toclevel-1 tocsection-4"><a href="#Тест_2"><span class="tocnumber">4</span> <span class="toctext">Тест</span></a></li>
31861 <li class="toclevel-1 tocsection-5"><a href="#тест"><span class="tocnumber">5</span> <span class="toctext">тест</span></a></li>
31862 <li class="toclevel-1 tocsection-6"><a href="#Hey_<_#_"_>_%_:_'"><span class="tocnumber">6</span> <span class="toctext">Hey < # " > % : '</span></a></li>
31866 <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>
31867 <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>
31868 <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>
31869 <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>
31870 <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>
31871 <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>
31872 <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>
31873 </p><p>💩 <span id="💩"></span>
31874 </p><p><a href="#啤酒">#啤酒</a> <a href="#啤酒">#啤酒</a>
31879 T90902: Normalize weird characters in section IDs
31881 wgFragmentMode=[ 'html5', 'legacy' ]
31887 <h2><span class="mw-headline" id="Foo_bar">Foo bar</span><span class="mw-editsection"><span class="mw-editsection-bracket">[</span><a href="/index.php?title=Parser_test&action=edit&section=1" title="Edit section: Foo bar">edit</a><span class="mw-editsection-bracket">]</span></span></h2>
31888 <p><a href="#Foo_bar">#Foo bar</a>
31891 <h2 id="Foo_bar"> Foo<span typeof="mw:Entity" data-parsoid='{"src":"&nbsp;","srcContent":" "}'> </span>bar </h2>
31892 <p><a rel="mw:WikiLink" href="./Parser_test#Foo_bar" data-parsoid='{"stx":"simple","a":{"href":"./Parser_test#Foo_bar"},"sa":{"href":"#Foo&nbsp;bar"}}'>#Foo bar</a></p>
31896 T51672: Test for brackets in attributes of elements in external link texts
31898 [http://example.com/ link <span title="title with [brackets]">span</span>]
31899 [http://example.com/ link <span title="title with [brackets]">span</span>]
31902 <p><a rel="nofollow" class="external text" href="http://example.com/">link <span title="title with [brackets]">span</span></a>
31903 <a rel="nofollow" class="external text" href="http://example.com/">link <span title="title with [brackets]">span</span></a>
31906 <p><a rel="mw:ExtLink" class="external text" href="http://example.com/">link <span title="title with [brackets]">span</span></a>
31907 <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>
31911 T72875: Test for brackets in attributes of elements in internal link texts
31913 [[Foo|link <span title="title with [[double brackets]]">span</span>]]
31914 [[Foo|link <span title="title with [[double brackets]]">span</span>]]
31917 <p><a href="/wiki/Foo" title="Foo">link <span title="title with [[double brackets]]">span</span></a>
31918 <a href="/wiki/Foo" title="Foo">link <span title="title with [[double brackets]]">span</span></a>
31921 <p><a rel="mw:WikiLink" href="./Foo" title="Foo">link <span title="title with [[double brackets]]">span</span></a>
31922 <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>
31926 T199926: html arrow wt: Parsoid sometimes trips up on verticalbar chars in hrefs
31929 "modes": ["html2wt"]
31932 <a href="https://stats.wikimedia.org/v2/#/fr.wikipedia.org/reading/page-views-by-country/normal|map|2-Year~2016060100~2018071100|~total">9</a>
31933 <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>
31935 [https://stats.wikimedia.org/v2/#/fr.wikipedia.org/reading/page-views-by-country/normal|map|2-Year~2016060100~2018071100|~total 9]
31936 [[stats:v2/#/fr.wikipedia.org/reading/page-views-by-country/normal%7Cmap%7C2-Year~2016060100~2018071100%7C~total|10]]
31940 T179544: {{anchorencode:}} output should be always usable in links
31942 wgFragmentMode=[ 'html5' ]
31944 <span id="{{anchorencode:[foo]}}"></span>[[#{{anchorencode:[foo]}}]]
31946 <p><span id="[foo]"></span><a href="#[foo]">#[foo]</a>
31949 <p><span id="[foo]" about="#mwt3" typeof="mw:ExpandedAttrs" data-parsoid='{"stx":"html","a":{"id":"[foo]"},"sa":{"id":"{{anchorencode:[foo]}}"}}' data-mw='{"attribs":[[{"txt":"id"},{"html":"<span typeof=\"mw:Transclusion mw:Entity\" about=\"#mwt1\" data-parsoid='{\"srcContent\":\"[\",\"dsr\":[10,32,null,null],\"pi\":[[]]}' data-mw='{\"parts\":[{\"template\":{\"target\":{\"wt\":\"anchorencode:[foo]\",\"function\":\"anchorencode\"},\"params\":{},\"i\":0}}]}'>[</span><span about=\"#mwt1\" data-parsoid=\"{}\">foo</span><span typeof=\"mw:Entity\" about=\"#mwt1\" data-parsoid='{\"src\":\"&amp;#x5D;\",\"srcContent\":\"]\"}'>]</span>"}]]}'></span><a typeof="mw:ExpandedAttrs" about="#mwt4" rel="mw:WikiLink" href="./Parser_test#[foo]" data-parsoid='{"stx":"simple","a":{"href":"./Parser_test#[foo]"},"sa":{"href":"#{{anchorencode:[foo]}}"}}' data-mw='{"attribs":[[{"txt":"href"},{"html":"#<span typeof=\"mw:Transclusion mw:Entity\" about=\"#mwt2\" data-parsoid='{\"srcContent\":\"[\",\"dsr\":[44,66,null,null],\"pi\":[[]]}' data-mw='{\"parts\":[{\"template\":{\"target\":{\"wt\":\"anchorencode:[foo]\",\"function\":\"anchorencode\"},\"params\":{},\"i\":0}}]}'>[</span><span about=\"#mwt2\" data-parsoid=\"{}\">foo</span><span typeof=\"mw:Entity\" about=\"#mwt2\" data-parsoid='{\"src\":\"&amp;#x5D;\",\"srcContent\":\"]\"}'>]</span>"}]]}'>#[foo]</a></p>
31952 ## ------------------------------
31953 ## Parsoid section-wrapping tests
31954 ## ------------------------------
31956 Section wrapping for well-nested sections (no leading content)
31959 "wrapSections": true
31980 <section data-mw-section-id="0"></section><section data-mw-section-id="1"><h1 id="1">1</h1>
31983 </section><section data-mw-section-id="2"><h1 id="2">2</h1>
31986 <section data-mw-section-id="3"><h2 id="2.1">2.1</h2>
31989 </section><section data-mw-section-id="4"><h2 id="2.2">2.2</h2>
31992 <section data-mw-section-id="5"><h3 id="2.2.1">2.2.1</h3>
31995 </section></section></section><section data-mw-section-id="6"><h1 id="3">3</h1>
32002 Section wrapping for well-nested sections (with leading content)
32005 "wrapSections": true
32010 Para 2 with a <div>nested in it</div>
32023 <section data-mw-section-id="0"><p>Para 1.</p>
32025 <p>Para 2 with a </p><div>nested in it</div>
32029 </section><section data-mw-section-id="1"><h1 id="1">1</h1>
32032 </section><section data-mw-section-id="2"><h1 id="2">2</h1>
32035 <section data-mw-section-id="3"><h2 id="2.1">2.1</h2>
32038 </section></section>
32042 Section wrapping with template-generated sections (good nesting 1)
32045 "wrapSections": true
32062 <section data-mw-section-id="0"></section><section data-mw-section-id="1"><h1 id="1">1</h1>
32065 <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">
32066 </span><p about="#mwt1">b</p>
32067 </section><section data-mw-section-id="3"><h2 id="1.2">1.2</h2>
32070 </section></section><section data-mw-section-id="4"><h1 id="2">2</h1>
32074 # In this example, the template scope is mildly expanded to incorporate the
32075 # trailing newline after the transclusion since that is part of section 1.1.1
32077 Section wrapping with template-generated sections (good nesting 2)
32080 "wrapSections": true,
32081 "modes": ["wt2html", "wt2wt"]
32096 <section data-mw-section-id="0"></section><section data-mw-section-id="1"><h1 id="1">1</h1>
32099 <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">
32100 </span><p about="#mwt1">b</p><span about="#mwt1">
32101 </span><section data-mw-section-id="-1" about="#mwt1"><h3 about="#mwt1" id="1.1.1">1.1.1</h3><span about="#mwt1">
32102 </span><p about="#mwt1">d</p><span about="#mwt1">
32103 </span></section></section></section><section data-mw-section-id="4" data-parsoid="{}"><h1 id="2">2</h1>
32107 # In this example, the template scope is mildly expanded to incorporate the
32108 # trailing newline after the transclusion since that is part of section 1.2.1
32110 Section wrapping with template-generated sections (good nesting 3)
32113 "wrapSections": true,
32114 "modes": ["wt2html", "wt2wt"]
32132 <section data-mw-section-id="0"></section><section data-mw-section-id="1" data-parsoid="{}"><h1 id="1"> 1 </h1>
32135 <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">
32136 </span><section data-mw-section-id="-1" about="#mwt1"><h2 about="#mwt1" id="1.1">1.1</h2><span about="#mwt1">
32137 </span><p about="#mwt1">b</p><span about="#mwt1">
32138 </span></section><section data-mw-section-id="-1" about="#mwt1"><h2 about="#mwt1" id="1.2">1.2</h2><span about="#mwt1">
32139 </span><p about="#mwt1">c</p><span about="#mwt1">
32140 </span><section data-mw-section-id="-1" about="#mwt1"><h3 about="#mwt1" id="1.2.1">1.2.1</h3><span about="#mwt1">
32141 </span><p about="#mwt1">d</p><span about="#mwt1">
32142 </span></section></section></section><section data-mw-section-id="5"><h1 id="2">2</h1>
32146 # Because of section-wrapping and template-wrapping interactions,
32147 # the scope of the template is expanded so that the template markup
32148 # is valid in the presence of <section> tags.
32149 # This exercises the s1 is null scenario in the wrapSections code
32151 Section wrapping with template-generated sections (bad nesting 1)
32154 "wrapSections": true
32168 <section data-mw-section-id="-1"></section><section data-mw-section-id="-2"><div data-parsoid='{"stx":"html"}'>
32171 <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"]}'>
32172 </span><section data-mw-section-id="-1" about="#mwt1"><h1 about="#mwt1" id="1">1</h1><span about="#mwt1">
32173 </span><p about="#mwt1">b
32174 </p><span about="#mwt1">
32176 </span><p about="#mwt1">c</p><span about="#mwt1">
32177 </span></section></div></section>
32180 # Because of section-wrapping and template-wrapping interactions,
32181 # the scope of the template is expanded so that the template markup
32182 # is valid in the presence of <section> tags.
32183 # This exercises the s1 is ancestor of s2 scenario in the wrapSections code
32185 Section wrapping with template-generated sections (bad nesting 2)
32188 "wrapSections": true
32206 <section data-mw-section-id="0"></section><section data-mw-section-id="1"><h1 id="1">1</h1>
32209 </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">
32210 </span><p about="#mwt1">b</p><span about="#mwt1">
32211 </span><section data-mw-section-id="-1" about="#mwt1"><h2 about="#mwt1" id="2.1">2.1</h2><span about="#mwt1">
32212 </span><p about="#mwt1">c</p><span about="#mwt1">
32214 </span><p about="#mwt1">d</p><span about="#mwt1">
32216 </span></section></section><section data-mw-section-id="4"><h1 id="3">3</h1>
32220 # Because of section-wrapping and template-wrapping interactions,
32221 # additional template wrappers are added to <section> tags
32222 # so that template wrapping semantics are valid whether section
32223 # tags are retained or stripped. But, the template scope can expand
32224 # greatly when accounting for section tags.
32225 # This exercises the s1 and s2 are in different subtrees scenario
32227 Section wrapping with template-generated sections (bad nesting 3)
32230 "wrapSections": true,
32231 "modes": ["wt2html", "wt2wt"]
32249 <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>
32252 <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">
32253 </span><p about="#mwt1">b</p><span about="#mwt1">
32254 </span></section></section><section data-mw-section-id="-1" about="#mwt1"><h1 about="#mwt1" id="2">2</h1><span about="#mwt1">
32255 </span><p about="#mwt1">c</p>
32258 </section><section data-mw-section-id="4" data-parsoid="{}"><h1 id="3">3</h1>
32263 Section wrapping with uneditable lead section + div wrapping multiple sections
32266 "wrapSections": true
32271 <div style="border:1px solid red;">
32288 <section data-mw-section-id="-1"><p>foo</p>
32290 </section><section data-mw-section-id="-2"><div style="border:1px solid red;">
32291 <section data-mw-section-id="1"><h1 id="1">1</h1>
32294 <section data-mw-section-id="2"><h2 id="1.1">1.1</h2>
32297 </section></section><section data-mw-section-id="-1"><h1 id="2">2</h1>
32301 </section><section data-mw-section-id="4"><h1 id="3">3</h1>
32304 <section data-mw-section-id="5"><h2 id="3.1">3.1</h2>
32306 </section></section>
32310 Section wrapping with editable lead section + div overlapping multiple sections
32313 "wrapSections": true
32320 <div style="border:1px solid red;">
32337 <section data-mw-section-id="0"><p>foo</p>
32339 </section><section data-mw-section-id="-1"><h1 id="1">1</h1>
32341 </section><section data-mw-section-id="-2"><div style="border:1px solid red;">
32344 <section data-mw-section-id="2"><h2 id="1.1">1.1</h2>
32347 </section><section data-mw-section-id="-1"><h1 id="2">2</h1>
32352 </section><section data-mw-section-id="4"><h1 id="3">3</h1>
32355 <section data-mw-section-id="5"><h2 id="3.1">3.1</h2>
32357 </section></section>
32361 HTML header tags should not be wrapped in section tags
32364 "wrapSections": true
32377 <section data-mw-section-id="0"><p>foo</p>
32379 <h1 id="a" data-parsoid='{"stx":"html"}'>a</h1>
32381 </section><section data-mw-section-id="1"><h1 id="b">b</h1>
32383 <h1 id="c" data-parsoid='{"stx":"html"}'>c</h1>
32385 </section><section data-mw-section-id="2"><h1 id="d">d</h1></section>
32389 Lead section containing only whitespace and comments.
32392 "wrapSections": true
32396 <!-- this is a comment, presumably significant to editors -->
32403 <section data-mw-section-id="0" data-parsoid="{}">
32404 <!-- this is a comment, presumably significant to editors -->
32405 </section><section data-mw-section-id="1"><h1 id="1">1</h1>
32408 </section><section data-mw-section-id="2"><h1 id="2">2</h1>
32413 Pseudo-sections emitted by templates should have id -2
32416 "wrapSections": true
32426 <section data-mw-section-id="-1"><p>foo</p>
32427 </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}}]}'>
32428 <section data-mw-section-id="-1"><h2 id="a">a</h2>
32429 </section><section data-mw-section-id="-1"><h2 id="b">b</h2>
32430 </section></div><span about="#mwt1">
32434 ##########################################################################
32435 Tests demonstrating white-space insensitivity in input wikitext
32436 for wikitext headings, wikitext list items, and wikitext table captions,
32437 headings, and cells. HTML versions of the same should preserve whitespace.
32438 ##########################################################################
32440 Trim whitespace in wikitext headings, list items, table captions, headings, and cells
32443 "modes": ["wt2html"],
32444 "preserveIEW": true
32448 == <!--c1--> <!--c2--> Spaces <!--c3--> <!--c4--> ==
32449 == <!--c1--> <!--c2--> Tabs <!--c3--><!--c4--> ==
32450 == <!--Headings with fallback ids--> Личная жизнь ==
32451 * <!--c1--> <!--c2--> List item <!--c3--> <!--c4-->
32452 ; <!--term to define--> term : <!--term's definition--> definition
32454 |+ <!--c1--> <!--c2--> Table Caption <!--c3--> <!--c4-->
32456 ! <!--c1--> <!--c2--> Table Heading 1 <!--c3--> <!--c4--> !! Table Heading 2 <!--c5-->
32458 | <!--c1--> <!--c2--> Table Cell 1 <!--c3--> <!--c4--> || Table Cell 2 <!--c5-->
32460 | class="foo" || <!--c1--> <!--c2--> Table Cell 3 <!--c3--> <!--c4-->
32462 | <!--c1--> testing [[one|two]] <!--c2--> | <!--c3--> some content
32465 | <!--c1--> <!--c2--> Table Cell 1 <!--c3--> <!--c4--> || Table Cell 2 <!--c5-->
32468 <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>
32469 <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>
32470 <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>
32471 <ul><li>List item</li></ul>
32472 <dl><dt>term </dt>
32473 <dd>definition</dd></dl>
32475 <caption>Table Caption
32478 <th>Table Heading 1</th>
32479 <th>Table Heading 2
32482 <td>Table Cell 1</td>
32486 <td>class="foo"</td>
32490 <td>testing <a href="/index.php?title=One&action=edit&redlink=1" class="new" title="One (page does not exist)">two</a> | some content
32491 </td></tr></tbody></table>
32494 <td>Table Cell 1</td>
32496 </td></tr></tbody></table> foo</dd></dl>
32498 <meta property="mw:PageProp/notoc">
32499 <h2 id="Spaces"><!--c1--><!--c2-->Spaces<!--c3--><!--c4--></h2>
32500 <h2 id="Tabs"><!--c1--><!--c2-->Tabs<!--c3--><!--c4--></h2>
32501 <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>
32502 <ul><li><!--c1--><!--c2-->List item<!--c3--><!--c4--></li></ul>
32503 <dl><dt><!--term to define-->term </dt><dd><!--term's definition-->definition</dd></dl>
32505 <caption><!--c1--><!--c2-->Table Caption<!--c3--><!--c4--></caption>
32507 <th><!--c1--><!--c2-->Table Heading 1<!--c3--><!--c4--></th><th>Table Heading 2<!--c5--></th></tr>
32509 <td><!--c1--><!--c2-->Table Cell 1<!--c3--><!--c4--></td><td>Table Cell 2<!--c5--></td></tr>
32511 <td>class="foo"</td><td><!--c1--><!--c2-->Table Cell 3<!--c3--><!--c4--></td></tr>
32513 <td><!--c1-->testing <a rel="mw:WikiLink" href="./One" title="One">two</a> <!--c2--> | <!--c3--> some content</td></tr>
32516 <tbody><tr><td><!--c1--><!--c2-->Table Cell 1<!--c3--><!--c4--></td><td>Table Cell 2<!--c5--></td></tr>
32517 </tbody></table> foo<!--c1--></dd></dl>
32520 # Looks like <caption> is not accepted in HTML
32522 Do not trim whitespace in HTML headings, list items, table captions, headings, and cells
32525 "modes": ["wt2html"],
32526 "preserveIEW": true
32530 <h2> <!--c1--> <!--c2--> Heading <!--c3--> <!--c4--> </h2>
32531 <ul><li> <!--c1--> <!--c2--> List item <!--c3--> <!--c4--> </li></ul>
32533 <tr><th> <!--c1--> <!--c2--> Table Heading <!--c3--> <!--c4--> <th></tr>
32534 <tr><td> <!--c1--> <!--c2--> Table Cell <!--c3--> <!--c4--> <th></tr>
32537 <h2><span class="mw-headline" id="Heading"> Heading </span></h2>
32538 <ul><li> List item </li></ul>
32540 <tbody><tr><th> Table Heading </th><th></th></tr>
32541 <tr><td> Table Cell </td><th></th></tr>
32544 <meta property="mw:PageProp/notoc"/>
32545 <h2 id="Heading"> <!--c1--> <!--c2--> Heading <!--c3--> <!--c4--> </h2>
32546 <ul><li> <!--c1--> <!--c2--> List item <!--c3--> <!--c4--> </li></ul>
32548 <tbody><tr><th> <!--c1--> <!--c2--> Table Heading <!--c3--> <!--c4--> </th><th></th></tr>
32549 <tr><td> <!--c1--> <!--c2--> Table Cell <!--c3--> <!--c4--> </td><th></th></tr>
32554 Do not trim whitespace in links and quotes
32557 "modes": ["wt2html"],
32558 "preserveIEW": true
32561 foo '' <!--c1--> italic <!--c2--> '' and ''' <!--c3--> bold <!--c4--> '''
32562 [[Foo| some text ]]
32564 <p>foo <i> italic </i> and <b> bold </b>
32565 <a href="/wiki/Foo" title="Foo"> some text </a>
32568 <p>foo <i> <!--c1--> italic <!--c2--> </i> and <b> <!--c3--> bold <!--c4--> </b>
32569 <a rel="mw:WikiLink" href="./Foo" title="Foo"> some text </a></p>
32573 Remove p tags surrounding a single element in a figcaption
32577 [[File:Foobar.jpg|right|200x200px|Caption]]
32579 <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>
32583 Selser preserves lack of newline before list and allows newline after the list
32586 "modes": ["selser"],
32587 "scrubWikitext": true,
32589 [ "ul", "after", "<p>footer</p>" ]
32606 Selser does not introduce newlines between unedited paragraph preceding the list
32609 "modes": ["selser"],
32611 [ "table tbody tr td p:last-child", "empty" ]
32633 Selser does not introduce newlines between unedited paragraph following the list
32636 "modes": ["selser"],
32638 [ "table tbody tr td p:first-child", "empty" ]
32660 Remove a list item but do not insert newline above list
32663 "modes": ["selser"],
32665 [ "ul li:last-child", "remove" ]