1 # MediaWiki Parser test cases
2 # Some taken from http://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 # ill add inter-language links
18 # subpage enable subpages (disabled by default)
19 # noxml don't check for XML well-formedness
20 # title=[[XXX]] run test using article title XXX
21 # language=XXX set content language to XXX for this test
22 # variant=XXX set the variant of language for this test (eg zh-tw)
23 # disabled do not run test
24 # parsoid parsoid-specific options (not run by PHP parser unless
25 # the test includes an html/php section)
26 # php php-only test (not run by the parsoid parser unless
27 # the test includes an html/parsoid section)
28 # showtitle make the first line the title
29 # comment run through Linker::formatComment() instead of main parser
30 # local format section links in edit comment text as local links
31 # notoc disable table of contents
32 # thumbsize=NNN set the default thumb size to NNNpx for this test
34 # You can also set the following parser properties via test options:
35 # wgEnableUploads, wgAllowExternalImages, wgMaxTocLevel,
36 # wgLinkHolderBatchSize, wgRawHtml
38 # For testing purposes, temporary articles can created:
39 # !!article / NAMESPACE:TITLE / !!text / ARTICLE TEXT / !!endarticle
40 # where '/' denotes a newline.
42 # This is the standard article assumed to exist.
73 MediaWiki:bad image list
75 * [[File:Bad.jpg]] except [[Nasty page]]
103 Template:echo_with_span
109 Template:echo_with_div
115 Template:table_attribs
118 |</noinclude>style="color: red"| Foo
124 {{table_attribs}} || Bar || Baz
128 Template:image_attribs
131 [[File:foobar.jpg|</noinclude>right|Caption text<noinclude>]]</noinclude>
134 ## See T48811 for details
136 Template:mixed_attr_content_template
138 style="color:red;" title="T48811"
184 Template:EmptyTRWithHTMLAttrTest
187 <tr align="center"></tr>
188 <tr><td>foo</td></tr>
189 <tr align="center"></tr>
190 <tr><td>bar</td></tr>
207 This is a simple paragraph.
209 <p>This is a simple paragraph.
214 Paragraphs with extra newline spacing
237 Paragraphs with newline spacing with comment lines in between
245 <!--foo--><!--More than 1 comment, still stripped-->
249 <!--foo--> <!----> <!-- bar -->
310 Paragraphs with newline spacing with non-empty white-space lines in between
337 Paragraphs with newline spacing with non-empty mixed comment and white-space lines in between
345 <!--foo--><!--More than 1 comment doesn't disable stripping of this line!-->
384 Extra newlines: More paragraphs with indented comment
399 Extra newlines followed by heading
414 <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>
415 <p><a href="/index.php?title=A&action=edit&redlink=1" class="new" title="A (page does not exist)">a</a>
418 <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>
423 Extra newlines between heading and content are swallowed
431 <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>
432 <p><a href="/index.php?title=A&action=edit&redlink=1" class="new" title="A (page does not exist)">a</a>
439 http://fr.wikipedia.org/wiki/🍺
440 <!-- EasterEgg we love beer, better be able be able to link to it -->
442 <p><a rel="nofollow" class="external free" href="http://fr.wikipedia.org/wiki/🍺">http://fr.wikipedia.org/wiki/🍺</a>
446 # Note that the html+tidy output removes the spaces after the <li>,
447 # which is a bug (http://sourceforge.net/p/tidy/bugs/945/, etc).
448 # This is an issue for all tests with lists. We intentionally do
449 # *not* add html+tidy clauses for these, as we don't want to
450 # document/test the broken behavior. (Parsoid matches the non-tidy
451 # output in these cases.)
460 <li> Item 2</li></ul>
468 * plain''italic''plain
469 * plain''italic''plain''italic''plain
470 * plain'''bold'''plain
471 * plain'''bold'''plain'''bold'''plain
472 * plain''italic''plain'''bold'''plain
473 * plain'''bold'''plain''italic''plain
474 * plain''italic'''bold-italic'''italic''plain
475 * plain'''bold''bold-italic''bold'''plain
476 * plain'''''bold-italic'''italic''plain
477 * plain'''''bold-italic''bold'''plain
478 * plain''italic'''bold-italic'''''plain
479 * plain'''bold''bold-italic'''''plain
480 * plain l'''italic''plain
481 * plain l''''bold''' plain
484 <li> plain<i>italic</i>plain</li>
485 <li> plain<i>italic</i>plain<i>italic</i>plain</li>
486 <li> plain<b>bold</b>plain</li>
487 <li> plain<b>bold</b>plain<b>bold</b>plain</li>
488 <li> plain<i>italic</i>plain<b>bold</b>plain</li>
489 <li> plain<b>bold</b>plain<i>italic</i>plain</li>
490 <li> plain<i>italic<b>bold-italic</b>italic</i>plain</li>
491 <li> plain<b>bold<i>bold-italic</i>bold</b>plain</li>
492 <li> plain<i><b>bold-italic</b>italic</i>plain</li>
493 <li> plain<b><i>bold-italic</i>bold</b>plain</li>
494 <li> plain<i>italic<b>bold-italic</b></i>plain</li>
495 <li> plain<b>bold<i>bold-italic</i></b>plain</li>
496 <li> plain l'<i>italic</i>plain</li>
497 <li> plain l'<b>bold</b> plain</li></ul>
501 # this example taken from the [[simple:Moon]] article (bug 47326)
503 Italics and possessives (1)
505 obtained by ''[[Lunar Prospector]]'''s gamma-ray spectrometer
507 <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
511 # this example taken from [[en:Flaming Pie]] (bug 49926)
513 Italics and possessives (2)
515 '''''Flaming Pie''''' is ... released in 1997. In ''Flaming Pie'''s liner notes
517 <p><i><b>Flaming Pie</b></i> is ... released in 1997. In <i>Flaming Pie'</i>s liner notes
521 # this example taken from [[en:Dictionary]] (bug 49926)
523 Italics and possessives (3)
525 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''.
527 <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>.
533 ### 2-quote opening sequence tests
536 Italics and bold: 2-quote opening sequence: (2,2)
545 Italics and bold: 2-quote opening sequence: (2,3)
554 Italics and bold: 2-quote opening sequence: (2,4)
564 # same html as previous, but wikitext adjusted to match parsoid html2wt
566 Italics and bold: 2-quote opening sequence: (2,4) w/ nowiki
568 ''foo<nowiki>''</nowiki>''
574 # The PHP parser strips the empty tags out for giggles; parsoid doesn't.
576 Italics and bold: 2-quote opening sequence: (2,5)
589 # same html as previous, but wikitext adjusted to match parsoid html2wt
591 Italics and bold: 2-quote opening sequence: (2,5+3) w/ nowiki
593 ''foo'''''<nowiki/>'''
604 ### 3-quote opening sequence tests
608 Italics and bold: 3-quote opening sequence: (3,2)
617 Italics and bold: 3-quote opening sequence: (3,3)
626 Italics and bold: 3-quote opening sequence: (3,4)
634 # The PHP parser strips the empty tags out for giggles; parsoid doesn't.
636 Italics and bold: 3-quote opening sequence: (3,5)
649 # same html as previous, but wikitext adjusted to match parsoid html2wt
651 Italics and bold: 3-quote opening sequence: (3,5+2) w/ nowiki
653 '''foo'''''<nowiki/>''
664 ### 4-quote opening sequence tests
668 Italics and bold: 4-quote opening sequence: (4,2)
678 # same html as previous, but wikitext adjusted to match parsoid html2wt
680 Italics and bold: 4-quote opening sequence: (4,2) w/ nowiki
682 <nowiki>''</nowiki>''foo''
689 Italics and bold: 4-quote opening sequence: (4,3)
698 Italics and bold: 4-quote opening sequence: (4,4)
708 # same html as previous, but wikitext adjusted to match parsoid html2wt
710 Italics and bold: 4-quote opening sequence: (4,4) w/ nowiki
718 # The PHP parser strips the empty tags out for giggles; parsoid doesn't.
720 Italics and bold: 4-quote opening sequence: (4,5)
729 <p>'<b>foo</b><i></i>
733 # same html as previous, but wikitext adjusted to match parsoid html2wt
735 Italics and bold: 4-quote opening sequence: (4,5+2) w/ nowiki
737 '<nowiki/>'''foo'''''<nowiki/>''
742 <p>'<b>foo</b><i></i>
748 ### 5-quote opening sequence tests
752 Italics and bold: 5-quote opening sequence: (5,2)
762 # same html as previous, but wikitext adjusted to match parsoid html2wt
763 # skipping wt2html and html2html because it wants to put <i> before <b>
765 Italics and bold: 5-quote opening sequence: (5,2+3)
767 parsoid=wt2wt,html2wt
776 Italics and bold: 5-quote opening sequence: (5,3)
786 # same html as previous, but wikitext adjusted to match parsoid html2wt
788 Italics and bold: 5-quote opening sequence: (5,3+2)
797 Italics and bold: 5-quote opening sequence: (5,4)
803 <p><i><b>foo'</b></i>
808 Italics and bold: 5-quote opening sequence: (5,5)
817 Italics and bold: 5-quote opening sequence: (5,6)
821 <p><i><b>foo'</b></i>
826 ### multiple quote sequences in a line
829 Italics and bold: multiple quote sequences: (2,4,2)
835 <p><i>foo'<b>bar</b></i>
840 # same html as previous, but wikitext adjusted to match parsoid html2wt
842 Italics and bold: multiple quote sequences: (2,4,2+3) w/ nowiki
844 ''foo'<nowiki/>'''bar'''''
846 <p><i>foo'<b>bar</b></i>
852 Italics and bold: multiple quote sequences: (2,4,3)
858 <p><i>foo'<b>bar</b></i>
863 # same html as previous, but wikitext adjusted to match parsoid html2wt
865 Italics and bold: multiple quote sequences: (2,4,3+2) w/ nowiki
867 ''foo'<nowiki/>'''bar'''''
869 <p><i>foo'<b>bar</b></i>
875 Italics and bold: multiple quote sequences: (2,4,4)
881 <p><i>foo'<b>bar'</b></i>
886 # same html as previous, but wikitext adjusted to match parsoid html2wt
888 Italics and bold: multiple quote sequences: (2,4,4+2) w/ nowiki
890 ''foo'<nowiki/>'''bar'<nowiki/>'''''
892 <p><i>foo'<b>bar'</b></i>
897 # The PHP parser strips the empty tags out for giggles; parsoid doesn't.
899 Italics and bold: multiple quote sequences: (3,4,2)
908 <p><b>foo'</b>bar<i></i>
912 # same html as previous, but wikitext adjusted to match parsoid html2wt
914 Italics and bold: multiple quote sequences: (3,4,2+2) w/ nowiki
918 '''<nowiki>foo'</nowiki>'''bar''<nowiki/>''
923 <p><b><span typeof="mw:Nowiki">foo'</span></b>bar<i></i>
928 # The PHP parser strips the empty tags out for giggles; parsoid doesn't.
930 Italics and bold: multiple quote sequences: (3,4,3)
939 <p><b>foo'</b>bar<b></b>
943 # same html as previous, but wikitext adjusted to match parsoid html2wt
945 Italics and bold: multiple quote sequences: (3,4,3+3) w/ nowiki
947 '''<nowiki>foo'</nowiki>'''bar'''<nowiki/>'''
952 <p><b><span typeof="mw:Nowiki">foo'</span></b>bar<b></b>
957 ### other quote tests
960 Italics and bold: other quote tests: (2,3,5)
962 ''this is about '''foo's family'''''
964 <p><i>this is about <b>foo's family</b></i>
970 Italics and bold: other quote tests: (2,(3,3),2)
972 ''this is about '''foo's''' family''
974 <p><i>this is about <b>foo's</b> family</i>
980 Italics and bold: other quote tests: (3,2,3,2)
984 '''this is about ''foo'''s family''
986 <p><b>this is about <i>foo</i></b><i>s family</i>
991 # same html as previous, but wikitext adjusted to match parsoid html2wt
993 Italics and bold: other quote tests: (3,2,3+2+2,2)
995 '''this is about ''foo'''''<nowiki/>''s family''
997 <p><b>this is about <i>foo</i></b><i>s family</i>
1003 Italics and bold: other quote tests: (3,2,3,3)
1005 '''this is about ''foo'''s family'''
1007 <p>'<i>this is about </i>foo<b>s family</b>
1013 Italics and bold: other quote tests: (3,(2,2),3)
1015 '''this is about ''foo's'' family'''
1017 <p><b>this is about <i>foo's</i> family</b>
1023 Italicized possessive
1025 The ''[[Main Page]]'''s talk page.
1027 <p>The <i><a href="/wiki/Main_Page" title="Main Page">Main Page</a>'</i>s talk page.
1030 <p>The <i><a rel="mw:WikiLink" href="Main_Page" title="Main Page">Main Page</a>'</i>s talk page.</p>
1034 Parsoid only: Quote balancing context should be restricted to td/th cells on the same wikitext line
1035 (Requires tidy for PHP parser output to be fixed up)
1037 parsoid=wt2html,wt2wt
1054 <tbody><tr><th><i>a</i></th><th><i>b</i></th>
1055 <td><i>a</i></td><td><i>b</i></td></tr>
1064 Non-html5 tags should be accepted
1066 <center>''foo''</center>
1068 <font>''foo''</font>
1069 <strike>''foo''</strike>
1072 <center><i>foo</i></center>
1073 <p><big><i>foo</i></big>
1074 <font><i>foo</i></font>
1075 <strike><i>foo</i></strike>
1081 <wbr> is valid wikitext (bug 52468)
1089 # <strike> is HTML4, <s> is HTML4/5.
1091 <s> or <strike> for strikethrough
1093 <strike>strike</strike>
1097 <p><strike>strike</strike>
1105 Text-level semantic html elements in wikitext
1108 <strong>text</strong>
1124 <ruby><rb>明日</rb><rp>(</rp><rt>Ashita</rt><rp> </rp><rtc>あした</rtc><rp>)</rp></ruby>
1131 <strong>text</strong>
1147 <ruby><rb>明日</rb><rp>(</rp><rt>Ashita</rt><rp> </rp><rtc>あした</rtc><rp>)</rp></ruby>
1155 # test cases taken from
1156 # http://www.w3.org/TR/html5/text-level-semantics.html#the-ruby-element
1158 Ruby markup (W3C-style)
1160 ; Mono-ruby for individual base characters
1161 : <ruby>日<rt>に</rt>本<rt>ほん</rt>語<rt>ご</rt></ruby>
1163 : <ruby>今日<rt>きょう</rt></ruby>
1165 : <ruby>法<rb>華</rb><rb>経</rb><rt>ほ</rt><rt>け</rt><rt>きょう</rt></ruby>
1167 : <ruby>東<rb>京</rb><rp>(</rp><rt>とう</rt><rt>きょう</rt><rp>)</rp></ruby>
1169 : <ruby><rb>旧</rb><rb>金</rb><rb>山</rb><rt>jiù</rt><rt>jīn</rt><rt>shān</rt><rtc>San Francisco</rtc></ruby>
1171 <rb>♥</rb><rtc><rt>Heart</rt></rtc><rtc lang="fr"><rt>Cœur</rt></rtc>
1172 <rb>☘</rb><rtc><rt>Shamrock</rt></rtc><rtc lang="fr"><rt>Trèfle</rt></rtc>
1173 <rb>✶</rb><rtc><rt>Star</rt></rtc><rtc lang="fr"><rt>Étoile</rt></rtc>
1176 <dl><dt> Mono-ruby for individual base characters</dt>
1177 <dd> <ruby>日<rt>に</rt>本<rt>ほん</rt>語<rt>ご</rt></ruby></dd>
1178 <dt> Group ruby</dt>
1179 <dd> <ruby>今日<rt>きょう</rt></ruby></dd>
1180 <dt> Jukugo ruby</dt>
1181 <dd> <ruby>法<rb>華</rb><rb>経</rb><rt>ほ</rt><rt>け</rt><rt>きょう</rt></ruby></dd>
1182 <dt> Inline ruby</dt>
1183 <dd> <ruby>東<rb>京</rb><rp>(</rp><rt>とう</rt><rt>きょう</rt><rp>)</rp></ruby></dd>
1184 <dt> Double-sided ruby</dt>
1185 <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>
1187 <rb>♥</rb><rtc><rt>Heart</rt></rtc><rtc lang="fr"><rt>Cœur</rt></rtc>
1188 <rb>☘</rb><rtc><rt>Shamrock</rt></rtc><rtc lang="fr"><rt>Trèfle</rt></rtc>
1189 <rb>✶</rb><rtc><rt>Star</rt></rtc><rtc lang="fr"><rt>Étoile</rt></rtc>
1194 # The next two test different paths in the sanitizer.
1196 Non-word characters don't terminate tag names (bug 17663, 40670, 52022)
1198 <b→> doesn't terminate </b→>
1200 <bä> doesn't terminate </bä>
1202 <boo> doesn't terminate </boo>
1204 <s.foo> doesn't terminate </s.foo>
1208 <p><b→> doesn't terminate </b→>
1209 </p><p><bä> doesn't terminate </bä>
1210 </p><p><boo> doesn't terminate </boo>
1211 </p><p><s.foo> doesn't terminate </s.foo>
1212 </p><p><sub-ID#1>
1216 # There is a tidy bug here: http://sourceforge.net/p/tidy/bugs/946/
1218 Non-word characters don't terminate tag names + tidy
1220 <b→> doesn't terminate </b→>
1222 <bä> doesn't terminate </bä>
1224 <boo> doesn't terminate </boo>
1226 <s.foo> doesn't terminate </s.foo>
1230 <p><b→> doesn't terminate </b→></p>
1231 <p><bä> doesn't terminate </bä></p>
1232 <p><boo> doesn't terminate </boo></p>
1233 <p><s.foo> doesn't terminate </s.foo></p>
1234 <p><sub-ID#1></p>
1238 Isolated close tags should be treated as literal text (bug 52760)
1245 </p><p><s.foo>s</s>
1250 ### Special characters
1254 Bare pipe character (bug 52363)
1263 Bare pipe character from a template (bug 52363)
1272 ### <nowiki> test cases
1276 <nowiki> unordered list
1278 <nowiki>* This is not an unordered list item.</nowiki>
1280 <p>* This is not an unordered list item.
1287 <nowiki>Lorem ipsum dolor
1295 <p>Lorem ipsum dolor
1308 :There is not nowiki.
1309 :There is <nowiki>nowiki</nowiki>.
1311 #There is not nowiki.
1312 #There is <nowiki>nowiki</nowiki>.
1314 *There is not nowiki.
1315 *There is <nowiki>nowiki</nowiki>.
1317 <dl><dd>There is not nowiki.</dd>
1318 <dd>There is nowiki.</dd></dl>
1319 <ol><li>There is not nowiki.</li>
1320 <li>There is nowiki.</li></ol>
1321 <ul><li>There is not nowiki.</li>
1322 <li>There is nowiki.</li></ul>
1327 Entities inside <nowiki>
1329 <nowiki><</nowiki>
1336 Entities inside template parameters
1342 <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>
1346 Properly escape nowiki when combined with other wiki markup
1350 <p>* </nowiki> tag</p>
1352 <nowiki>* </nowiki></nowiki> tag
1359 Comments and Indent-Pre
1361 <!-- comment 1 --> asdf
1363 <!-- comment 1 --> asdf
1366 <!-- comment 1 --> asdf
1367 <!-- comment 2 -->xyz
1369 <!-- comment 1 --> asdf
1370 <!-- comment 2 --> xyz
1426 asdf<!-- comment 1 -->jkl
1436 <!-- foo --> b <!-- bar -->
1450 <!-- returns a single newline, not nothing, since the newline after > is not stripped -->
1456 Comment semantics and delimiters
1458 <!-- --><!----><!-----><!------>
1464 Comment semantics and delimiters, redux
1466 <!-- In SGML every "foo" here would actually show up in the text -- foo -- bar
1467 -- foo -- funky huh? ... -->
1473 Comment semantics and delimiters: directors cut
1475 <!-- ... However we like to keep things simple and somewhat XML-ish so we eat
1476 everything starting with < followed by !-- until the first -- and > we see,
1477 that wouldn't be valid XML however, since in XML -- has to terminate a comment
1485 Comment semantics: nesting
1487 <!--<!-- no, we're not going to do anything fancy here -->-->
1494 Comment semantics: unclosed comment at end
1496 <!--This comment will run out to the end of the document
1501 # Bug 58184: document parsoid's behaviour
1503 Suppress comment closing tag in lenient browsers
1505 parsoid=wt2html,html2html
1507 <!-- Browsers--!> think this is closed -->
1511 <!-- Browsers--¡> think this is closed -->
1515 Comment in template title
1524 Comment on its own line post-expand
1536 Comment on its own line post-expand with non-significant whitespace
1548 Multiple comments should still parse as SOL-transparent
1550 parsoid=wt2html,wt2wt
1553 <!--c2--><!--c3--><!--c4-->*b
1564 ### paragraph wrapping tests
1579 Block tag on one line (<div>)
1595 Block tag on one line (<blockquote>)
1597 a <blockquote>foo</blockquote>
1601 a <blockquote>foo</blockquote>
1613 Block tag on both lines (<div>)
1630 Block tag on both lines (<blockquote>)
1632 a <blockquote>foo</blockquote>
1634 b <blockquote>foo</blockquote>
1636 a <blockquote>foo</blockquote>
1637 b <blockquote>foo</blockquote>
1651 Multiple lines without block tags
1675 # Tidy strips out the empty <div> tags. Parsoid doesn't.
1676 # So, we have a separate section for Parsoid. We don't want
1677 # to mimic this stripping behavior in Parsoid. It affects
1678 # editing experience and also requires us to maintain additional
1681 Empty lines between lines with block tags
1719 <div data-parsoid='{"stx":"html"}'></div>
1722 <div data-parsoid='{"stx":"html"}'></div><p>a</p>
1725 <div data-parsoid='{"stx":"html"}'>a</div><p>b</p>
1727 <div data-parsoid='{"stx":"html"}'>b</div><p>d</p>
1730 <div data-parsoid='{"stx":"html"}'>e</div>
1733 ## PHP parser emits output which is broken
1734 ## XXX The parsoid output doesn't match the tidy output.
1736 Unclosed HTML p-tags should be handled properly
1744 <p>foo</div></p>
1748 <div data-parsoid='{"stx":"html"}'><p data-parsoid='{"stx":"html", "autoInsertedEnd":true}'>foo</p></div>
1753 ## SSS FIXME: I can come up with other scenarios where this doesn't work because
1754 ## of eager output of buffered tokens in the p-wrapper. But, I'm going to ignore
1757 1. P-wrapping should leave sol-transparent tags outside p-tags where possible
1761 a [[Category:A1]] [[Category:A2]]
1766 <link href="Category:A1"/> <link href="Category:A2"/> <link href="Category:A3"/> <link href="Category:A4"/>
1770 2. P-wrapping should leave sol-transparent tags outside p-tags where possible
1776 <link href="Category:A1"/><p>a</p>
1780 ### Preformatted text
1789 And a [[Main Page|link]]
1795 And a <a href="/wiki/Main_Page" title="Main Page">link</a>
1800 Tabs don't trigger preformatted text
1804 This is preformatted text.
1810 <pre>This is preformatted text.
1816 Ident preformatting with inline content
1827 <pre> with <nowiki> inside (compatibility with 1.6 and earlier)
1844 Regression with preformatted in <center>
1858 Bug 52763: Preformatted in <blockquote>
1864 indented cell (no pre-wrapping!)
1874 <p> indented cell (no pre-wrapping!)
1882 Bug 51086: Double newlines in blockquotes should be turned into paragraphs
1899 Bug 15491: <ins>/<del> in blockquote
1902 Foo <del>bar</del> <ins>baz</ins> quux
1906 <p>Foo <del>bar</del> <ins>baz</ins> quux
1912 # Note that the p-wrapping is newline sensitive, which could be
1913 # considered a bug: tidy will wrap only the 'Foo' in the example
1914 # below in a <p> tag. (see comment 23-25 of bug #6200)
1916 Bug 15491: <ins>/<del> in blockquote (2)
1918 <blockquote>Foo <del>bar</del> <ins>baz</ins> quux
1921 <blockquote>Foo <del>bar</del> <ins>baz</ins> quux
1927 <del>bar</del> <ins>baz</ins> quux</blockquote>
1931 <pre> with attributes (bug 3202)
1933 <pre style="background: blue; color:white">Bluescreen of WikiDeath</pre>
1935 <pre style="background: blue; color:white">Bluescreen of WikiDeath</pre>
1940 <pre> with width attribute (bug 3202)
1942 <pre width="8">Narrow screen goodies</pre>
1944 <pre width="8">Narrow screen goodies</pre>
1949 <pre> with forbidden attribute (bug 3202)
1951 <pre width="8" onmouseover="alert(document.cookie)">Narrow screen goodies</pre>
1953 <pre width="8">Narrow screen goodies</pre>
1958 Entities inside <pre>
1967 <pre> with forbidden attribute values (bug 3202)
1969 <pre width="8" style="border-width: expression(alert(document.cookie))">Narrow screen goodies</pre>
1971 <pre width="8" style="/* insecure input */">Narrow screen goodies</pre>
1976 <nowiki> inside <pre> (bug 13238)
1984 <pre><nowiki><nowiki></nowiki>Foo<nowiki></nowiki></nowiki></pre>
1992 <pre><nowiki>Foo</nowiki></pre>
1997 <nowiki> and <pre> preference (first one wins)
2028 </pre> inside nowiki
2030 <nowiki></pre></nowiki>
2036 # Parsoid doesn't strip empty tags, like Tidy does.
2038 Empty pre; pre inside other HTML tags (bug 54946)
2040 parsoid=wt2html,wt2wt
2071 HTML pre followed by indent-pre
2086 <p><pre>foo</pre></p>
2088 <p data-parsoid='{"stx":"html","autoInsertedEnd":true}'></p><pre data-parsoid='{"stx":"html"}'>foo</pre><p data-parsoid='{"autoInsertedStart":true,"stx":"html"}'></p>
2092 Templates: Indent-Pre: 1a. Templates that break a line should suppress <pre>
2100 Templates: Indent-Pre: 1b. Templates that break a line should suppress <pre>
2110 Templates: Indent-Pre: 1c: Wrapping should be based on expanded content
2122 Templates: Indent-Pre: 1d: Wrapping should be based on expanded content
2143 Templates: Indent-Pre: 1e. Wrapping should be based on expanded content
2147 {{echo| foo}}{{echo| bar}}
2152 {{echo|<!--cmt--> foo}}
2154 <!--cmt-->{{echo| foo}}
2156 {{echo|{{echo| }}bar}}
2174 Templates: Indent-Pre: 1f: Wrapping should be based on expanded content
2211 Things that look like <pre> tags aren't treated as such
2213 Barack Obama <President> of the United States
2214 <President></President>
2216 <p>Barack Obama <President> of the United States
2217 <President></President>
2221 ## PHP parser discards the "<pre " string
2223 Handle broken pre-like tags (bug 64025)
2227 {{echo|<pre <pre>x</pre>}}
2229 <table><pre </table>
2232 <table><pre></pre></table>
2235 <pre about="#mwt1" typeof="mw:Transclusion" data-parsoid='{"a":{"<pre":null},"sa":{"<pre":""},"stx":"html","pi":[[{"k":"1","spc":["","","",""]}]]}' data-mw='{"parts":[{"template":{"target":{"wt":"echo","href":"./Template:Echo"},"params":{"1":{"wt":"<pre <pre>x</pre>"}},"i":0}}]}'>x</pre>
2244 Parsoid: handle pre with space after attribute
2248 <pre style="width:50%;" >{{echo|foo}}</pre>
2250 <pre style="width:50%;">{{echo|foo}}</pre>
2253 # TODO / maybe: fix wt2wt for this
2255 Parsoid: Don't paragraph-wrap fosterable content
2281 Parsoid: Don't paragraph-wrap fosterable content even if table syntax is unbalanced
2309 #--------------------------------------------------------------------
2310 # Transclusion parameter whitespace stripping tests
2311 # Behavior is different for positional and named parameters
2312 #--------------------------------------------------------------------
2314 Templates: Strip leading and trailing whitespace from named-param values
2318 {{echo|1= {{echo|b}} }}
2331 <ul><li> d</li></ul>
2336 Templates: Don't strip whitespace from positional-param values
2340 {{echo|{{echo|b}} }}
2372 <ul><li> f</li></ul>
2380 Templates: Handle empty comment-and-ws-only lines correctly
2383 <!--should be ignored-->
2384 <!--should be ignored as well-->
2393 Templates: Handle comments in the target
2396 <!-- should be ignored -->
2399 {{echo<!-- should be ignored -->
2402 {{echo<!-- should be ignored -->|foo}}
2404 {{<!-- should be ignored -->echo|foo}}
2406 <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>
2408 <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>
2410 <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>
2412 <p typeof="mw:Transclusion" data-mw='{"parts":[{"template":{"target":{"wt":"echo","href":"./Template:Echo"},"params":{"1":{"wt":"foo"}},"i":0}}]}'>foo</p>
2416 Templates: Handle comments in parameter names (bug 67657)
2419 <!-- should be ignored -->
2423 <!-- should be ignored -->
2426 {{echo|1<!-- should be ignored --> = foo}}
2428 {{echo|<!-- should be ignored -->1 = foo}}
2430 <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>
2432 <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>
2434 <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>
2436 <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>
2440 Templates: Other wikitext in parameter names (bug 67657)
2444 <p typeof="mw:Transclusion" data-mw='{"parts":[{"template":{"target":{"wt":"echo","href":"./Template:Echo"},"params":{"''1''":{"wt":"foo"}},"i":0}}]}'>{{{1}}}</p>
2450 #--------------------------------------------------------------------
2451 # Transclusion parameter escaping tests
2452 #--------------------------------------------------------------------
2454 Templates: Parsoid parameter escaping test 1
2458 {{echo|[foo]|{{echo|[bar]}}}}
2460 <p about="#mwt1" typeof="mw:Transclusion"
2461 data-mw='{"parts":[{"template":{"target":{"wt":"echo","href":"./Template:Echo"},"params":{"1":{"wt":"[foo]"},"2":{"wt":"{{echo|[bar]}}"}},"i":0}}]}'>[foo]</p>
2465 Parsoid: Pipes in external links in template parameter
2469 {{echo|[{{echo|http://example.com}} link]}}
2471 <p><a rel="mw:ExtLink" 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>
2475 Parsoid: pipe in transclusion parameter
2479 {{echo|http://foo.com/a|b}}
2481 <p><a rel="mw:ExtLink" href="http://foo.com/a|b" about="#mwt1"
2482 typeof="mw:Transclusion"
2483 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|b</a></p>
2487 Parsoid: Pipe in external link target and content in template parameter
2489 parsoid=html2wt,wt2wt
2491 {{echo|[http://foo.com/a|b a|b]}}
2493 <p><a rel="mw:ExtLink" href="http://foo.com/a|b" about="#mwt1"
2494 typeof="mw:Transclusion"
2495 data-mw='{"parts":[{"template":{"target":{"wt":"echo","href":"./Template:Echo"},
2496 "params":{"1":{"wt":"[http://foo.com/a|b a|b]"}},"i":0}}]}'>a|b</a></p>
2500 Parsoid: Pipe in template with nested template in external link target in template parameter (seriously)
2504 {{echo|[{{fullurl:{{FULLPAGENAME}}|action=edit}} bar]}}
2506 <p typeof="mw:Transclusion" data-mw='{"parts":[{"template":{"target":{"wt":"echo","href":"./Template:Echo"},"params":{"1":{"wt":"[{{fullurl:{{FULLPAGENAME}}|action=edit}} bar]"}},"i":0}}]}'>[Main Page bar]</p>
2510 Templates: Don't escape already nowiki-escaped text in template parameters
2512 parsoid=html2wt,wt2wt
2514 {{echo|foo<nowiki>|</nowiki>bar}}
2515 {{echo|<nowiki><div></nowiki>}}
2516 {{echo|<nowiki></nowiki>}}
2518 <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>
2519 <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>
2520 <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>
2526 Templates: '=' char in nested transclusions should not trigger nowiki escapes or conversion to named param
2528 parsoid=html2wt,wt2wt
2530 {{echo|{{echo|1=bar}}}}
2532 <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>
2537 Templates parameters with special tokenizing behavior dont get modified because of arg escaping
2543 <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:Placeholder" data-parsoid='{"isDisplayHack":true}'> </span>: b</p>
2548 Templates: Preserve blank parameter names
2555 <p about="#mwt1" typeof="mw:Transclusion" data-mw='{"parts":[{"template":{"target":{"wt":"echo","href":"./Template:Echo"},"params":{"":{"wt":"foo"}},"i":0}}]}'>{{{1}}}</p>
2559 ### Parsoid-centric tests for testing RT edge cases for pre
2563 1a. Indent-Pre and Comments
2576 1b. Indent-Pre and Comments
2589 1c. Indent-Pre and Comments
2602 1d. Indent-Pre and Comments
2603 (Pre-handler currently cannot distinguish between comment/ws order and normalizes them to [comment,ws] order)
2616 2a. Indent-Pre and tables
2637 2b. Indent-Pre and tables
2653 2c. Indent-Pre and tables (bug 42252)
2670 2d. Indent-Pre and tables
2687 <tbody><tr><td> b</td></tr>
2692 2e. Indent-Pre and table-line syntax
2705 2f. Indent-pre started by table-line syntax
2724 3a. Indent-Pre and block tags (single-line html)
2728 c <blockquote> foo </blockquote>
2733 c <blockquote> foo </blockquote>
2734 <pre><span> foo </span>
2737 <p>a </p><p data-parsoid='{"stx":"html"}'> foo </p>
2738 <p>b </p><div data-parsoid='{"stx":"html"}'> foo </div>
2739 <p>c </p><blockquote data-parsoid='{"stx":"html"}'> foo </blockquote>
2740 <pre><span> foo </span>
2757 3b. Indent-Pre and block tags (multi-line html)
2762 <pre>a <span>foo</span>
2767 <pre>a <span data-parsoid='{"stx":"html"}'>foo</span></pre>
2768 b <div data-parsoid='{"stx":"html"}'> foo </div>
2778 3c. Indent-Pre and block tags (pre-content on separate line)
2842 4. Indent-Pre and extension tags
2848 a <ul class="gallery mw-gallery-traditional">
2849 <li class="gallerybox" style="width: 155px"><div style="width: 155px">
2850 <div class="thumb" style="width: 150px;"><div style="margin:68px auto;"><a href="/wiki/File:Foobar.jpg" class="image"><img alt="Foobar.jpg" src="http://example.com/images/thumb/3/3a/Foobar.jpg/120px-Foobar.jpg" width="120" height="14" /></a></div></div>
2851 <div class="gallerytext">
2858 <ul class="gallery mw-gallery-traditional">
2859 <li class="gallerybox" style="width: 155px">
2860 <div style="width: 155px">
2861 <div class="thumb" style="width: 150px;">
2862 <div style="margin:68px auto;"><a href="/wiki/File:Foobar.jpg" class="image"><img alt="Foobar.jpg" src="http://example.com/images/thumb/3/3a/Foobar.jpg/120px-Foobar.jpg" width="120" height="14" /></a></div>
2864 <div class="gallerytext"></div>
2871 Table wikitext syntax outside wiki-tables
2874 ! not a table heading
2877 | class="foo bar" | baz
2884 ! not a table heading
2887 | class="foo bar" | baz
2896 Render paragraphs when indent-pre is suppressed in blocklevels
2913 4. Multiple spaces at start-of-line
2931 ## NOTE: the leading white-space chars on empty line are significant
2933 5a. White-space in indent-pre
2945 ## NOTE: the leading white-space chars on empty line are significant
2947 5b. White-space in indent-pre
2966 5c. White-space in indent-pre
2979 6. Pre-blocks should extend across lines with leading WS even when there is no wrappable content
3002 7a. Indent-pre and category links
3004 parsoid=wt2html,wt2wt
3006 [[Category:foo]] <!-- No pre-wrapping -->
3007 {{echo| [[Category:foo]]}} <!-- No pre-wrapping -->
3009 <link rel="mw:PageProp/Category" href="./Category:Foo"> <!-- No pre-wrapping -->
3010 <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 -->
3014 7b. Indent-pre and category links
3016 parsoid=wt2html,wt2wt
3019 [[Category:foo]] {{echo|b}}
3022 <link rel="mw:PageProp/Category" href="./Category:Foo"> a
3023 <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>
3027 ### HTML-pre (some to spec PHP parser behavior and some Parsoid-RT-centric)
3031 HTML-pre: 1. embedded newlines
3065 <pre data-parsoid='{"stx":"html"}'>foo</pre>
3067 <pre data-parsoid='{"stx":"html","strippedNL":"\n"}'>
3071 <pre data-parsoid='{"stx":"html"}'>
3076 <pre data-parsoid='{"stx":"html"}'>
3084 HTML-pre: big spaces
3121 <pre data-parsoid='{"stx":"html"}'>
3140 HTML-pre: 2: indented text
3153 HTML-pre: 3: other wikitext
3174 ### Definition lists
3181 <dl><dt> name </dt>
3182 <dd> Definition</dd></dl>
3187 Definition list for indentation only
3191 <dl><dd> Indented text</dd></dl>
3196 Definition list with no space
3201 <dd>Definition</dd></dl>
3206 Definition list with URL link
3208 ; http://example.com/ : definition
3210 <dl><dt> <a rel="nofollow" class="external free" href="http://example.com/">http://example.com/</a> </dt>
3211 <dd> definition</dd></dl>
3216 Definition list with bracketed URL link
3218 ;[http://www.example.com/ Example]:Something about it
3220 <dl><dt><a rel="nofollow" class="external text" href="http://www.example.com/">Example</a></dt>
3221 <dd>Something about it</dd></dl>
3226 Definition list with wikilink containing colon
3228 ; [[Help:FAQ]]: The least-read page on Wikipedia
3230 <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>
3231 <dd> The least-read page on Wikipedia</dd></dl>
3235 # At Brion's and JeLuF's insistence... :)
3237 Definition list with news link containing colon
3239 ; news:alt.wikipedia.rox: This isn't even a real newsgroup!
3241 <dl><dt> <a rel="nofollow" class="external free" href="news:alt.wikipedia.rox">news:alt.wikipedia.rox</a></dt>
3242 <dd> This isn't even a real newsgroup!</dd></dl>
3245 <dl><dt> <a rel="mw:ExtLink" 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>
3249 Malformed definition list with colon
3251 ; news:alt.wikipedia.rox -- don't crash or enter an infinite loop
3253 <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>
3258 Definition lists: colon in external link text
3260 ; [http://www.wikipedia2.org/ Wikipedia : The Next Generation]: OK, I made that up
3262 <dl><dt> <a rel="nofollow" class="external text" href="http://www.wikipedia2.org/">Wikipedia : The Next Generation</a></dt>
3263 <dd> OK, I made that up</dd></dl>
3268 Definition lists: colon in HTML attribute
3270 ;<b style="display: inline">bold</b>
3272 <dl><dt><b style="display: inline">bold</b></dt></dl>
3277 Definition lists: self-closed tag
3279 ;one<br/>two : two-line fun
3281 <dl><dt>one<br />two </dt>
3282 <dd> two-line fun</dd></dl>
3287 Bug 11748: Literal closing tags
3291 <dd>test test test test test</dd>
3293 <dd>test test test test test</dd>
3298 <dd>test test test test test</dd>
3300 <dd>test test test test test</dd>
3306 Definition and unordered list using wiki syntax nested in unordered list using html tags.
3309 ; term : description
3314 <dl><dt> term </dt>
3315 <dd> description</dd></dl>
3316 <ul><li> unordered</li></ul>
3323 Definition list with empty definition and following paragraph
3335 Nested definition lists using html syntax
3344 Definition Lists: No nesting: Multiple dd's
3357 Definition Lists: Indentation: Regular
3365 <dl><dd>i3</dd></dl></dd></dl></dd></dl>
3370 Definition Lists: Indentation: Missing 1st level
3376 <dl><dd>i3</dd></dl></dd></dl></dd></dl>
3381 Definition Lists: Indentation: Multi-level indent
3385 <dl><dd><dl><dd><dl><dd>i3</dd></dl></dd></dl></dd></dl>
3390 Definition Lists: Hacky use to indent tables
3397 should be left alone
3399 <dl><dd><dl><dd><table>
3404 </td></tr></table></dd></dl></dd></dl>
3406 should be left alone
3411 Definition Lists: Hacky use to indent tables, with comments (bug 63979)
3419 should be left alone
3422 <dl><dd><dl><dd><table><tr>
3425 </tr></table><!-- bar --></dd></dl></dd></dl>
3427 should be left alone</p>
3431 Definition Lists: Hacky use to indent tables, with comment before table
3437 <dl><dd><dl><dd><!-- foo --><table><tr>
3439 </tr></table></dd></dl></dd></dl>
3444 Definition Lists: Hacky use to indent tables (WS-insensitive)
3453 <dd> <table><tr><td>a</td></tr></table> </dd>
3456 ## The PHP parser treats : items (dd) without a corresponding ; item (dt)
3457 ## as an empty dt item. It also ignores all but the last ";" when followed
3458 ## by ":" later on. So, ";" are not ignored in ";;;t3" but are ignored in
3459 ## ";;;t3 :d1". So, PHP parser behavior is a little inconsistent wrt multiple
3462 ## Ex: ";;t2 ::d2" is transformed into:
3474 ## But, Parsoid treats "; :" as a tight atomic unit and excess ":" as plain text
3475 ## So, the same wikitext above (;;t2 ::d2) is transformed into:
3486 ## All Parsoid only definition list tests have this difference.
3488 ## See also: https://bugzilla.wikimedia.org/show_bug.cgi?id=6569
3489 ## and http://lists.wikimedia.org/pipermail/wikitext-l/2011-November/000483.html
3492 Table / list interaction: indented table with lists in table contents
3507 <ul><li> b</li></ul>
3511 <ul><li> d</li></ul>
3512 </td></tr></table></dd></dl>
3517 Table / list interaction: lists nested in tables nested in indented lists
3540 </td></tr></table></dd></dl>
3547 Definition Lists: Nesting: Multi-level (Parsoid only)
3577 Definition Lists: Nesting: Test 2 (Parsoid only)
3597 Definition Lists: Nesting: Test 3 (Parsoid only)
3625 Definition Lists: Nesting: Test 4
3630 <dl><dd><dl><dd><dl><dt>t3</dt>
3631 <dd>d3</dd></dl></dd></dl></dd></dl>
3636 ## The Parsoid team believes the following three test exposes a
3637 ## bug in the PHP parser. (Parsoid team thinks the PHP parser is
3638 ## wrong to close the <dl> after the <dt> containing the <ul>.)
3639 ## It also exposes a "misfeature" in tidy, which doesn't like
3640 ## <dl> tags with a single <dt> child; it converts the <dt> into
3641 ## a <dd> in that case. (Parsoid leaves the <dt> alone!)
3643 Definition Lists: Mixed Lists: Test 1
3649 <dl><dd><dl><dt><ul><li> foo</li>
3650 <li> bar</li></ul></dt></dl>
3651 <dl><dt> baz</dt></dl></dd></dl>
3686 Definition Lists: Mixed Lists: Test 2
3691 <ul><li><dl><dd> d1</dd>
3692 <dd> d2</dd></dl></li></ul>
3698 Definition Lists: Mixed Lists: Test 3
3703 <ul><li><dl><dd><dl><dd><dl><dd> d1</dd>
3704 <dd> d2</dd></dl></dd></dl></dd></dl></li></ul>
3710 Definition Lists: Mixed Lists: Test 4
3715 <ul><li><dl><dt>d1 </dt>
3718 <dd>d4</dd></dl></li></ul>
3724 Definition Lists: Mixed Lists: Test 5
3730 <dl><dd> d2</dd></dl></dd></dl></li></ul>
3736 Definition Lists: Mixed Lists: Test 6
3741 <ol><li><ul><li><dl><dd>d1
3742 <dl><dd><dl><dd> d3</dd></dl></dd></dl></dd></dl></li></ul></li></ol>
3748 Definition Lists: Mixed Lists: Test 7
3753 <dl><dd><ul><li> d1</li>
3754 <li> d2</li></ul></dd></dl>
3760 Definition Lists: Mixed Lists: Test 8
3765 <dl><dd><ul><li> d1</li></ul>
3766 <dl><dd><ul><li> d2</li></ul></dd></dl></dd></dl>
3772 Definition Lists: Mixed Lists: Test 9
3776 <ul><li><dl><dt>foo </dt>
3777 <dd>bar</dd></dl></li></ul>
3783 Definition Lists: Mixed Lists: Test 10
3787 <ul><li><ol><li><dl><dt>foo </dt>
3788 <dd>bar</dd></dl></li></ol></li></ul>
3792 # The Parsoid team disagrees with the PHP parser's seemingly-random
3793 # rules regarding dd/dt on the next two tests. Parsoid is more
3794 # consistent, and recognizes the shared nesting and keeps the
3795 # still-open tags around until the nesting is complete.
3796 # (And tidy again converts <dt> to <dd> before 'bar'.)
3799 Definition Lists: Mixed Lists: Test 11
3804 <ul><li><ol><li><ul><li><ol><li><dl><dt>foo </dt>
3805 <dd><ul><li><dl><dt><dl><dt>bar</dt></dl></dd></dl></li></ul></dd></dl>
3806 <dl><dt>boo </dt>
3807 <dd>baz</dd></dl></li></ol></li></ul></li></ol></li></ul>
3862 <dt>foo<span typeof="mw:Placeholder" data-parsoid='{"src":" "}'> </span></dt>
3863 <dd data-parsoid='{"stx":"row"}'>bar</dd>
3867 <dt>boo<span typeof="mw:Placeholder" data-parsoid='{"src":" "}'> </span></dt>
3868 <dd data-parsoid='{"stx":"row"}'>baz</dd>
3877 # Another case where tidy converts a <dt> to a <dd> (but Parsoid doesn't).
3879 Definition Lists: Weird Ones: Test 1
3881 *#;*::;; foo : bar (who uses this?)
3883 <ul><li><ol><li><dl><dt> foo </dt>
3884 <dd><ul><li><dl><dd><dl><dd><dl><dt><dl><dt> bar (who uses this?)</dt></dl></dd></dl></dd></dl></dd></dl></li></ul></dd></dl></li></ol></li></ul>
3903 <dt>bar (who uses this?)</dt>
3935 <dt> foo<span typeof="mw:Placeholder"> </span></dt>
3936 <dd data-parsoid='{"stx":"row"}'> bar (who uses this?)</dd>
3948 Definition Lists: colons occurring in tags
3962 <dt><span>a:b</span></dt>
3963 <dt><div>a:b</div></dt>
3966 <dt><i>a:b</i></dt></dl>
3971 Definition Lists: colons and tables 1
3983 </td></tr></table></dd></dl>
3987 </td></tr></table></dd></dl>
3991 # Parsoid's output (as documented below) differs from php's in this case.
3992 # This is probably a bug. If we fixup parsoid to match php's output, the
3993 # above test should pass and the below test case can be removed. It is
3994 # unclear which output is more desirable.
3997 Definition Lists: colons and tables 2
4009 </td></tr></table></dd>
4013 </td></tr></table></dd></dl>
4021 External links: non-bracketed
4023 Non-bracketed: http://example.com
4025 <p>Non-bracketed: <a rel="nofollow" class="external free" href="http://example.com">http://example.com</a>
4029 # parsoid doesn't explicitly mark autonumbered links, see bug 53505
4031 External links: numbered
4033 Numbered: [http://example.com]
4034 Numbered: [http://example.net]
4035 Numbered: [http://example.com]
4037 <p>Numbered: <a rel="nofollow" class="external autonumber" href="http://example.com">[1]</a>
4038 Numbered: <a rel="nofollow" class="external autonumber" href="http://example.net">[2]</a>
4039 Numbered: <a rel="nofollow" class="external autonumber" href="http://example.com">[3]</a>
4042 <p>Numbered: <a rel="mw:ExtLink" href="http://example.com"></a>
4043 Numbered: <a rel="mw:ExtLink" href="http://example.net"></a>
4044 Numbered: <a rel="mw:ExtLink" href="http://example.com"></a></p>
4048 External links: specified text
4050 Specified text: [http://example.com link]
4052 <p>Specified text: <a rel="nofollow" class="external text" href="http://example.com">link</a>
4057 External links: trail
4059 Linktrails should not work for external links: [http://example.com link]s
4061 <p>Linktrails should not work for external links: <a rel="nofollow" class="external text" href="http://example.com">link</a>s
4066 External links: dollar sign in URL
4068 http://example.com/1$2345
4070 <p><a rel="nofollow" class="external free" href="http://example.com/1$2345">http://example.com/1$2345</a>
4074 # parsoid doesn't explicitly mark autonumbered links, see bug 53505
4076 External links: dollar sign in URL (autonumber)
4078 [http://example.com/1$2345]
4080 <p><a rel="nofollow" class="external autonumber" href="http://example.com/1$2345">[1]</a>
4083 <p><a rel="mw:ExtLink" href="http://example.com/1$2345"></a></p>
4087 External links: open square bracket forbidden in URL (bug 4377)
4089 parsoid=wt2html,wt2wt,html2html
4091 http://example.com/1[2345
4093 <p><a rel="nofollow" class="external free" href="http://example.com/1">http://example.com/1</a>[2345
4096 <p><a rel="mw:ExtLink" href="http://example.com/1">http://example.com/1</a>[2345</p>
4100 External links: open square bracket forbidden in URL (named) (bug 4377)
4102 parsoid=wt2html,html2html
4104 [http://example.com/1[2345]
4106 <p><a rel="nofollow" class="external text" href="http://example.com/1">[2345</a>
4109 <p><a rel="mw:ExtLink" href="http://example.com/1">[2345</a></p>
4112 # parsoid adds a space before the link name
4114 External links: open square bracket forbidden in URL (named) (bug 4377)
4117 [http://example.com/1 [2345]
4119 <p><a rel="nofollow" class="external text" href="http://example.com/1">[2345</a>
4124 External links: nowiki in URL link text (bug 6230)
4126 [http://example.com/ <nowiki>''example site''</nowiki>]
4128 <p><a rel="nofollow" class="external text" href="http://example.com/">''example site''</a>
4133 External links: newline forbidden in text (bug 6230 regression check)
4135 [http://example.com/ first
4138 <p>[<a rel="nofollow" class="external free" href="http://example.com/">http://example.com/</a> first
4144 External links: Pipe char between url and text
4146 [http://example.com | link]
4148 <p><a rel="nofollow" class="external text" href="http://example.com">| link</a>
4153 External links: protocol-relative URL in brackets
4155 [//example.com/ Test]
4157 <p><a rel="nofollow" class="external text" href="//example.com/">Test</a>
4161 # parsoid doesn't explicitly mark autonumbered links, see bug 53505
4163 External links: protocol-relative URL in brackets without text
4167 <p><a rel="nofollow" class="external autonumber" href="//example.com">[1]</a>
4170 <p><a rel="mw:ExtLink" href="//example.com"></a></p>
4174 External links: protocol-relative URL in free text is left alone
4178 <p>//example.com/Foo
4183 External links: protocol-relative URL in the middle of a word is left alone (bug 30269)
4185 foo//example.com/Foo
4187 <p>foo//example.com/Foo
4192 External links: with no contents
4194 [http://en.wikipedia.org/wiki/Foo]
4196 [[wikipedia:Foo|Bar]]
4198 [[wikipedia:Foo|<span>Bar</span>]]
4200 <p><a rel="nofollow" class="external autonumber" href="http://en.wikipedia.org/wiki/Foo">[1]</a>
4201 </p><p><a href="http://en.wikipedia.org/wiki/Foo" class="extiw" title="wikipedia:Foo">Bar</a>
4202 </p><p><a href="http://en.wikipedia.org/wiki/Foo" class="extiw" title="wikipedia:Foo"><span>Bar</span></a>
4205 <p><a rel="mw:ExtLink" href="http://en.wikipedia.org/wiki/Foo"></a></p>
4206 <p><a rel="mw:ExtLink" href="http://en.wikipedia.org/wiki/Foo" title="wikipedia:Foo">Bar</a></p>
4207 <p><a rel="mw:ExtLink" href="http://en.wikipedia.org/wiki/Foo" title="wikipedia:Foo"><span>Bar</span></a></p>
4211 External links: Free with trailing punctuation
4221 http://example.com/url_with_(brackets)
4222 (http://example.com/url_without_brackets)
4223 http://example.com/url_with_entity
4224 http://example.com/url_with_entity 
4225 http://example.com/url_with_entity 
4226 http://example.com/url_with_entity<
4227 http://example.com/url_with_entity<
4228 http://example.com/url_with_entity<
4230 <p><a rel="nofollow" class="external free" href="http://example.com">http://example.com</a>,
4231 <a rel="nofollow" class="external free" href="http://example.com">http://example.com</a>;
4232 <a rel="nofollow" class="external free" href="http://example.com">http://example.com</a>\
4233 <a rel="nofollow" class="external free" href="http://example.com">http://example.com</a>.
4234 <a rel="nofollow" class="external free" href="http://example.com">http://example.com</a>:
4235 <a rel="nofollow" class="external free" href="http://example.com">http://example.com</a>!
4236 <a rel="nofollow" class="external free" href="http://example.com">http://example.com</a>?
4237 <a rel="nofollow" class="external free" href="http://example.com">http://example.com</a>)
4238 <a rel="nofollow" class="external free" href="http://example.com/url_with_(brackets)">http://example.com/url_with_(brackets)</a>
4239 (<a rel="nofollow" class="external free" href="http://example.com/url_without_brackets">http://example.com/url_without_brackets</a>)
4240 <a rel="nofollow" class="external free" href="http://example.com/url_with_entity ">http://example.com/url_with_entity </a>
4241 <a rel="nofollow" class="external free" href="http://example.com/url_with_entity ">http://example.com/url_with_entity </a>
4242 <a rel="nofollow" class="external free" href="http://example.com/url_with_entity ">http://example.com/url_with_entity </a>
4243 <a rel="nofollow" class="external free" href="http://example.com/url_with_entity">http://example.com/url_with_entity</a><
4244 <a rel="nofollow" class="external free" href="http://example.com/url_with_entity%3C">http://example.com/url_with_entity%3C</a>
4245 <a rel="nofollow" class="external free" href="http://example.com/url_with_entity%3C">http://example.com/url_with_entity%3C</a>
4248 <p><a rel="mw:ExtLink" href="http://example.com">http://example.com</a>,
4249 <a rel="mw:ExtLink" href="http://example.com">http://example.com</a>;
4250 <a rel="mw:ExtLink" href="http://example.com">http://example.com</a>\
4251 <a rel="mw:ExtLink" href="http://example.com">http://example.com</a>.
4252 <a rel="mw:ExtLink" href="http://example.com">http://example.com</a>:
4253 <a rel="mw:ExtLink" href="http://example.com">http://example.com</a>!
4254 <a rel="mw:ExtLink" href="http://example.com">http://example.com</a>?
4255 <a rel="mw:ExtLink" href="http://example.com">http://example.com</a>)
4256 <a rel="mw:ExtLink" href="http://example.com/url_with_(brackets)">http://example.com/url_with_(brackets)</a>
4257 (<a rel="mw:ExtLink" href="http://example.com/url_without_brackets">http://example.com/url_without_brackets</a>)
4258 <a rel="mw:ExtLink" href="http://example.com/url_with_entity ">http://example.com/url_with_entity </a>
4259 <a rel="mw:ExtLink" href="http://example.com/url_with_entity ">http://example.com/url_with_entity </a>
4260 <a rel="mw:ExtLink" href="http://example.com/url_with_entity ">http://example.com/url_with_entity </a>
4261 <a rel="mw:ExtLink" href="http://example.com/url_with_entity">http://example.com/url_with_entity</a><span typeof="mw:Entity"><</span>
4262 <a rel="mw:ExtLink" href="http://example.com/url_with_entity<">http://example.com/url_with_entity<</a>
4263 <a rel="mw:ExtLink" href="http://example.com/url_with_entity<">http://example.com/url_with_entity<</a></p>
4267 External links: No preceding word characters allowed (bug 65278)
4269 NOPEhttp://example.com
4270 N0http://example.com
4271 ok:http://example.com
4272 ok-http://example.com
4274 <p>NOPEhttp://example.com
4275 N0http://example.com
4276 ok:<a rel="nofollow" class="external free" href="http://example.com">http://example.com</a>
4277 ok-<a rel="nofollow" class="external free" href="http://example.com">http://example.com</a>
4284 External image: http://meta.wikimedia.org/upload/f/f1/Ncwikicol.png
4286 <p>External image: <img src="http://meta.wikimedia.org/upload/f/f1/Ncwikicol.png" alt="Ncwikicol.png" />
4291 External image from https
4293 External image from https: https://meta.wikimedia.org/upload/f/f1/Ncwikicol.png
4295 <p>External image from https: <img src="https://meta.wikimedia.org/upload/f/f1/Ncwikicol.png" alt="Ncwikicol.png" />
4300 External image (when not allowed)
4302 wgAllowExternalImages=0
4304 External image: http://meta.wikimedia.org/upload/f/f1/Ncwikicol.png
4306 <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>
4311 Link to non-http image, no img tag
4313 Link to non-http image, no img tag: ftp://example.com/test.jpg
4315 <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>
4320 External links: terminating separator
4322 Terminating separator: http://example.com/thing,
4324 <p>Terminating separator: <a rel="nofollow" class="external free" href="http://example.com/thing">http://example.com/thing</a>,
4329 External links: intervening separator
4331 Intervening separator: http://example.com/1,2,3
4333 <p>Intervening separator: <a rel="nofollow" class="external free" href="http://example.com/1,2,3">http://example.com/1,2,3</a>
4338 External links: old bug with URL in query
4340 Old bug with URL in query: [http://example.com/thing?url=http://example.com link]
4342 <p>Old bug with URL in query: <a rel="nofollow" class="external text" href="http://example.com/thing?url=http://example.com">link</a>
4347 External links: old URL-in-URL bug, mixed protocols
4349 And again with mixed protocols: [ftp://example.com?url=http://example.com link]
4351 <p>And again with mixed protocols: <a rel="nofollow" class="external text" href="ftp://example.com?url=http://example.com">link</a>
4356 External links: URL in text
4358 URL in text: [http://example.com http://example.com]
4360 <p>URL in text: <a rel="nofollow" class="external free" href="http://example.com">http://example.com</a>
4365 External links: Clickable images
4367 ja-style clickable images: [http://example.com http://meta.wikimedia.org/upload/f/f1/Ncwikicol.png]
4369 <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>
4372 <p>ja-style clickable images: <a rel="mw:ExtLink" href="http://example.com"><img src="http://meta.wikimedia.org/upload/f/f1/Ncwikicol.png" alt="Ncwikicol.png" data-parsoid='{"type":"extlink"}'/></a></p>
4376 External links: raw ampersand
4378 Old & use: http://x&y
4380 <p>Old & use: <a rel="nofollow" class="external free" href="http://x&y">http://x&y</a>
4385 External links: encoded ampersand
4387 Old & use: http://x&y
4389 <p>Old & use: <a rel="nofollow" class="external free" href="http://x&y">http://x&y</a>
4392 <p>Old <span typeof="mw:Entity">&</span> use: <a rel="mw:ExtLink" href="http://x&y">http://x&y</a></p>
4396 External links: encoded equals (bug 6102)
4398 http://example.com/?foo=bar
4400 <p><a rel="nofollow" class="external free" href="http://example.com/?foo=bar">http://example.com/?foo=bar</a>
4403 <p><a rel="mw:ExtLink" href="http://example.com/?foo=bar">http://example.com/?foo=bar</a></p>
4407 ## Note that parsoid doesn't explicit mark autonumbered links, nor
4408 ## does it number them. As discussed in bug 53505, we can identify
4409 ## autonumbered links via CSS.
4413 External links: [raw ampersand]
4415 Old & use: [http://x&y]
4417 <p>Old & use: <a rel="nofollow" class="external autonumber" href="http://x&y">[1]</a>
4420 <p>Old <span typeof="mw:Entity">&</span> use: <a rel="mw:ExtLink" href="http://x&y"></a></p>
4423 # note that parsoid html is identical to [raw ampersand] case; so html2wt
4424 # mode will return the [raw ampersand] wikitext
4426 External links: [encoded ampersand]
4428 parsoid=wt2html,wt2wt,html2html
4430 Old & use: [http://x&y]
4432 <p>Old & use: <a rel="nofollow" class="external autonumber" href="http://x&y">[1]</a>
4435 <p>Old <span typeof="mw:Entity">&</span> use: <a rel="mw:ExtLink" href="http://x&y"></a></p>
4439 External links: [raw equals]
4441 [http://example.com/?foo=bar]
4443 <p><a rel="nofollow" class="external autonumber" href="http://example.com/?foo=bar">[1]</a>
4446 <p><a rel="mw:ExtLink" href="http://example.com/?foo=bar"></a></p>
4449 # note that parsoid html is identical to [raw equals] case; so html2wt
4450 # mode will return the [raw equals] wikitext
4452 External links: [encoded equals] (bug 6102)
4454 parsoid=wt2html,wt2wt,html2html
4456 [http://example.com/?foo=bar]
4458 <p><a rel="nofollow" class="external autonumber" href="http://example.com/?foo=bar">[1]</a>
4461 <p><a rel="mw:ExtLink" href="http://example.com/?foo=bar"></a></p>
4464 # xxx parsoid strips the IDN character, so the round-trip tests will
4465 # obviously fail and are disabled. --cscott
4467 External links: [IDN ignored character reference in hostname; strip it right off]
4469 parsoid=wt2html,wt2wt,html2html
4471 [http://e‌xample.com/]
4473 <p><a rel="nofollow" class="external autonumber" href="http://example.com/">[1]</a>
4476 <p><a rel="mw:ExtLink" href="http://example.com/"></a></p>
4479 # FIXME: This test (the IDN characters in the text of a link) is an inconsistency.
4480 # Where an external link could easily circumvent the sanitization of the text of
4481 # a link like this (where an IDN-ignore character is in the URL somewhere), this
4482 # test demands a higher standard. That's a bit strange.
4486 # http://example.com -> [http://example.com|http://example.com]
4487 # [http://example.com|http://example.com] -> [http://example.com|http://example.com]
4489 # The first example is sanitized, but the second is not. Any security benefits
4490 # from this production are trivial to circumvent. Either remove this test and
4491 # let the parser(s) do their thing unaccosted, or fix the inconsistency and change
4492 # the test accordingly.
4496 # xxx parsoid strips the IDN character, so the round-trip tests will
4497 # obviously fail and are disabled. --cscott
4499 External links: IDN ignored character reference in hostname; strip it right off
4501 parsoid=wt2html,html2html
4503 http://e‌xample.com/
4505 <p><a rel="nofollow" class="external free" href="http://example.com/">http://example.com/</a>
4508 <p><a rel="mw:ExtLink" href="http://example.com/">http://example.com/</a></p>
4512 External links: www.jpeg.org (bug 554)
4516 <p><a rel="nofollow" class="external free" href="http://www.jpeg.org">http://www.jpeg.org</a>
4520 # parsoid doesn't explicitly mark autonumbered links, see bug 53505
4522 External links: URL within URL (original bug 2)
4524 [http://www.unausa.org/newindex.asp?place=http://www.unausa.org/programs/mun.asp]
4526 <p><a rel="nofollow" class="external autonumber" href="http://www.unausa.org/newindex.asp?place=http://www.unausa.org/programs/mun.asp">[1]</a>
4529 <p><a rel="mw:ExtLink" href="http://www.unausa.org/newindex.asp?place=http://www.unausa.org/programs/mun.asp"></a></p>
4533 BUG 361: URL inside bracketed URL
4535 [http://www.example.com/foo http://www.example.com/bar]
4537 <p><a rel="nofollow" class="external text" href="http://www.example.com/foo">http://www.example.com/bar</a>
4542 BUG 361: URL within URL, not bracketed
4544 http://www.example.com/foo?=http://www.example.com/bar
4546 <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>
4551 BUG 289: ">"-token in URL-tail
4553 http://www.example.com/<hello>
4555 <p><a rel="nofollow" class="external free" href="http://www.example.com/">http://www.example.com/</a><hello>
4560 BUG 289: literal ">"-token in URL-tail
4562 http://www.example.com/<b>html</b>
4564 <p><a rel="nofollow" class="external free" href="http://www.example.com/">http://www.example.com/</a><b>html</b>
4567 <p><a rel="mw:ExtLink" href="http://www.example.com/" data-parsoid='{"stx":"url"}'>http://www.example.com/</a><b data-parsoid='{"stx":"html"}'>html</b></p>
4571 BUG 289: ">"-token in bracketed URL
4573 [http://www.example.com/<hello> stuff]
4575 <p><a rel="nofollow" class="external text" href="http://www.example.com/"><hello> stuff</a>
4580 BUG 289: literal ">"-token in bracketed URL
4582 [http://www.example.com/<b>html</b> stuff]
4584 <p><a rel="nofollow" class="external text" href="http://www.example.com/"><b>html</b> stuff</a>
4589 BUG 289: literal double quote at end of URL
4591 http://www.example.com/"hello"
4593 <p><a rel="nofollow" class="external free" href="http://www.example.com/">http://www.example.com/</a>"hello"
4598 BUG 289: literal double quote in bracketed URL
4600 [http://www.example.com/"hello" stuff]
4602 <p><a rel="nofollow" class="external text" href="http://www.example.com/">"hello" stuff</a>
4607 External links: multiple legal whitespace is fine, Magnus. Don't break it please. (bug 5081)
4609 [http://www.example.com test]
4611 <p><a rel="nofollow" class="external text" href="http://www.example.com">test</a>
4616 External links: link text with spaces
4618 [http://www.example.com a b c]
4619 [http://www.example.com ''a'' ''b'']
4621 <p><a rel="nofollow" class="external text" href="http://www.example.com">a b c</a>
4622 <a rel="nofollow" class="external text" href="http://www.example.com"><i>a</i> <i>b</i></a>
4627 External links: wiki links within external link (Bug 3695)
4629 [http://example.com [[wikilink]] embedded in ext link]
4631 <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>
4634 <p><a rel="mw:ExtLink" href="http://example.com"></a><a rel="mw:WikiLink" href="./Wikilink" title="Wikilink">wikilink</a><span> embedded in ext link</span></p>
4638 BUG 787: Links with one slash after the url protocol are invalid
4642 [http:/example.com title]
4644 <p>http:/example.com
4645 </p><p>[http:/example.com title]
4650 Bracketed external links with template-generated invalid target
4652 [{{echo|http:/example.com}} title]
4654 <p>[http:/example.com title]
4659 Bug 2702: Mismatched <i>, <b> and <a> tags are invalid
4661 ''[http://example.com text'']
4662 [http://example.com '''text]'''
4663 ''Something [http://example.com in italic'']
4664 ''Something [http://example.com mixed''''', even bold]'''
4665 '''''Now [http://example.com both''''']
4667 <p><a rel="nofollow" class="external text" href="http://example.com"><i>text</i></a>
4668 <a rel="nofollow" class="external text" href="http://example.com"><b>text</b></a>
4669 <i>Something </i><a rel="nofollow" class="external text" href="http://example.com"><i>in italic</i></a>
4670 <i>Something </i><a rel="nofollow" class="external text" href="http://example.com"><i>mixed</i><b>, even bold</b></a>
4671 <i><b>Now </b></i><a rel="nofollow" class="external text" href="http://example.com"><i><b>both</b></i></a>
4677 Bug 4781: %26 in URL
4679 http://www.example.com/?title=AT%26T
4681 <p><a rel="nofollow" class="external free" href="http://www.example.com/?title=AT%26T">http://www.example.com/?title=AT%26T</a>
4684 <p><a rel="mw:ExtLink" href="http://www.example.com/?title=AT%26T">http://www.example.com/?title=AT%26T</a></p>
4687 # According to http://www.w3.org/TR/2011/WD-html5-20110525/Overview.html#parsing-urls a plain
4688 # % is actually legal in HTML5. Any change in output would need testing though.
4690 Bug 4781, 5267: %25 in URL
4692 http://www.example.com/?title=100%25_Bran
4694 <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>
4697 <p><a rel="mw:ExtLink" href="http://www.example.com/?title=100%25_Bran">http://www.example.com/?title=100%25_Bran</a></p>
4701 Bug 4781, 5267: %28, %29 in URL
4703 http://www.example.com/?title=Ben-Hur_%281959_film%29
4705 <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>
4708 <p><a rel="mw:ExtLink" href="http://www.example.com/?title=Ben-Hur_%281959_film%29">http://www.example.com/?title=Ben-Hur_%281959_film%29</a></p>
4713 Bug 4781: %26 in autonumber URL
4715 [http://www.example.com/?title=AT%26T]
4717 <p><a rel="nofollow" class="external autonumber" href="http://www.example.com/?title=AT%26T">[1]</a>
4720 <p><a rel="mw:ExtLink" href="http://www.example.com/?title=AT%26T"></a></p>
4724 Bug 4781, 5267: %26 in autonumber URL
4726 [http://www.example.com/?title=100%25_Bran]
4728 <p><a rel="nofollow" class="external autonumber" href="http://www.example.com/?title=100%25_Bran">[1]</a>
4731 <p><a rel="mw:ExtLink" href="http://www.example.com/?title=100%25_Bran"></a></p>
4735 Bug 4781, 5267: %28, %29 in autonumber URL
4737 [http://www.example.com/?title=Ben-Hur_%281959_film%29]
4739 <p><a rel="nofollow" class="external autonumber" href="http://www.example.com/?title=Ben-Hur_%281959_film%29">[1]</a>
4742 <p><a rel="mw:ExtLink" href="http://www.example.com/?title=Ben-Hur_%281959_film%29"></a></p>
4747 Bug 4781: %26 in bracketed URL
4749 [http://www.example.com/?title=AT%26T link]
4751 <p><a rel="nofollow" class="external text" href="http://www.example.com/?title=AT%26T">link</a>
4754 <p><a rel="mw:ExtLink" href="http://www.example.com/?title=AT%26T">link</a></p>
4758 Bug 4781, 5267: %25 in bracketed URL
4760 [http://www.example.com/?title=100%25_Bran link]
4762 <p><a rel="nofollow" class="external text" href="http://www.example.com/?title=100%25_Bran">link</a>
4767 Bug 4781, 5267: %28, %29 in bracketed URL
4769 [http://www.example.com/?title=Ben-Hur_%281959_film%29 link]
4771 <p><a rel="nofollow" class="external text" href="http://www.example.com/?title=Ben-Hur_%281959_film%29">link</a>
4774 <p><a rel="mw:ExtLink" href="http://www.example.com/?title=Ben-Hur_%281959_film%29">link</a></p>
4778 External link containing a period in the anchor. (bug 63947)
4780 [//foo.org/bar#baz. bang]
4782 [//foo.org/bar. bang]
4784 <p><a rel="nofollow" class="external text" href="//foo.org/bar#baz.">bang</a>
4785 </p><p><a rel="nofollow" class="external text" href="//foo.org/bar.">bang</a>
4788 <p><a rel="mw:ExtLink" href="//foo.org/bar#baz.">bang</a></p>
4789 <p><a rel="mw:ExtLink" href="//foo.org/bar.">bang</a></p>
4793 External link containing a single quote. (bug 63947)
4797 [//foo.org/bar'baz bang]
4799 <p><a rel="nofollow" class="external autonumber" href="//foo.org/bar'baz">[1]</a>
4800 </p><p><a rel="nofollow" class="external text" href="//foo.org/bar'baz">bang</a>
4803 <p><a rel="mw:ExtLink" href="//foo.org/bar'baz"></a></p>
4804 <p><a rel="mw:ExtLink" href="//foo.org/bar'baz">bang</a></p>
4809 External link containing a period in the anchor. (bug 63947)
4811 [//foo.org/bar#baz. bang]
4813 [//foo.org/bar. bang]
4815 <p><a rel="nofollow" class="external text" href="//foo.org/bar#baz.">bang</a>
4816 </p><p><a rel="nofollow" class="external text" href="//foo.org/bar.">bang</a>
4819 <p><a rel="mw:ExtLink" href="//foo.org/bar#baz.">bang</a></p>
4820 <p><a rel="mw:ExtLink" href="//foo.org/bar.">bang</a></p>
4824 External link containing a single quote. (bug 63947)
4828 [//foo.org/bar'baz bang]
4830 <p><a rel="nofollow" class="external autonumber" href="//foo.org/bar'baz">[1]</a>
4831 </p><p><a rel="nofollow" class="external text" href="//foo.org/bar'baz">bang</a>
4834 <p><a rel="mw:ExtLink" href="//foo.org/bar'baz"></a></p>
4835 <p><a rel="mw:ExtLink" href="//foo.org/bar'baz">bang</a></p>
4840 External link containing double-single-quotes in text '' (bug 4598 sanity check)
4842 Some [http://example.com/ pretty ''italics'' and stuff]!
4844 <p>Some <a rel="nofollow" class="external text" href="http://example.com/">pretty <i>italics</i> and stuff</a>!
4849 External link containing double-single-quotes in text embedded in italics (bug 4598 sanity check)
4851 ''Some [http://example.com/ pretty ''italics'' and stuff]!''
4853 <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>
4858 External link containing double-single-quotes with no space separating the url from text in italics
4860 [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]].]
4862 <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 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>.</a>
4865 <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>.</p>
4867 <p><a rel="mw:ExtLink" 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>
4871 External link with comments in link text
4873 [http://www.google.com Google <!-- comment -->]
4875 <p><a rel="nofollow" class="external text" href="http://www.google.com">Google </a>
4880 URL-encoding in URL functions (single parameter)
4882 {{localurl:Some page|amp=&}}
4884 <p>/index.php?title=Some_page&amp=&
4889 URL-encoding in URL functions (multiple parameters)
4891 {{localurl:Some page|q=?&=&}}
4893 <p>/index.php?title=Some_page&q=?&amp=&
4900 http://example.com/index.php?foozoid%5B%5D=bar
4902 http://example.com/index.php?foozoid[]=bar
4904 <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>
4905 </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>
4908 <p><a rel="mw:ExtLink" href="http://example.com/index.php?foozoid%5B%5D=bar">http://example.com/index.php?foozoid%5B%5D=bar</a></p>
4910 <p><a rel="mw:ExtLink" href="http://example.com/index.php?foozoid[]=bar">http://example.com/index.php?foozoid[]=bar</a></p>
4914 IPv6 urls (bug 21261)
4918 http://[2404:130:0:1000::187:2]/index.php
4920 <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>
4925 Non-extlinks in brackets
4934 [{{echo|foo}} ''bar'']
4935 [{{echo|foo}}l's] errand
4936 [{{echo|foo}}l's errand]
4938 [url=http://example.com]
4951 [url=<a rel="nofollow" class="external free" href="http://example.com">http://example.com</a>]
4956 Percent encoding in external links
4958 [https://github.com/search?l=&q=ResourceLoader+%40wikimedia Search]
4960 <p><a rel="nofollow" class="external text" href="https://github.com/search?l=&q=ResourceLoader+%40wikimedia">Search</a>
4963 <p><a rel="mw:ExtLink"
4964 href="https://github.com/search?l=&q=ResourceLoader+%40wikimedia">Search</a></p>
4968 Use url link syntax for links where the content is equal the link target
4972 <p><a rel="nofollow" class="external free" href="http://example.com">http://example.com</a>
4975 <p><a rel="mw:ExtLink" href="http://example.com">http://example.com</a></p>
4979 Parenthesis in external links, especially URL links
4983 http://example.com/test)
4985 http://example.com/(test)
4987 http://example.com/((test)
4989 (http://example.com/(test))
4991 (http://example.com/(test)))))
4993 http://example.com/a)b
4995 [http://example.com) foo]
4997 <p><a rel="nofollow" class="external free" href="http://example.com">http://example.com</a>)
4998 </p><p><a rel="nofollow" class="external free" href="http://example.com/test">http://example.com/test</a>)
4999 </p><p><a rel="nofollow" class="external free" href="http://example.com/(test)">http://example.com/(test)</a>
5000 </p><p><a rel="nofollow" class="external free" href="http://example.com/((test)">http://example.com/((test)</a>
5001 </p><p>(<a rel="nofollow" class="external free" href="http://example.com/(test))">http://example.com/(test))</a>
5002 </p><p>(<a rel="nofollow" class="external free" href="http://example.com/(test)))))">http://example.com/(test)))))</a>
5003 </p><p><a rel="nofollow" class="external free" href="http://example.com/a)b">http://example.com/a)b</a>
5004 </p><p><a rel="nofollow" class="external text" href="http://example.com)">foo</a>
5007 <p><a rel="mw:ExtLink" href="http://example.com">http://example.com</a>)</p>
5008 <p><a rel="mw:ExtLink" href="http://example.com/test">http://example.com/test</a>)</p>
5009 <p><a rel="mw:ExtLink" href="http://example.com/(test)">http://example.com/(test)</a></p>
5010 <p><a rel="mw:ExtLink" href="http://example.com/((test)">http://example.com/((test)</a></p>
5011 <p>(<a rel="mw:ExtLink" href="http://example.com/(test))">http://example.com/(test))</a></p>
5012 <p>(<a rel="mw:ExtLink" href="http://example.com/(test)))))">http://example.com/(test)))))</a></p>
5013 <p><a rel="mw:ExtLink" href="http://example.com/a)b">http://example.com/a)b</a></p>
5014 <p><a rel="mw:ExtLink" href="http://example.com)">foo</a></p>
5018 Parenthesis in external links, w/ transclusion or comment
5020 (http://example.com/{{echo|hi}})
5022 (http://example.com<!-- hi -->)
5024 <p>(<a rel="nofollow" class="external free" href="http://example.com/hi">http://example.com/hi</a>)
5025 </p><p>(<a rel="nofollow" class="external free" href="http://example.com">http://example.com</a>)
5028 <p>(<a typeof="mw:ExpandedAttrs" about="#mwt2" rel="mw:ExtLink" 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=\"{&quot;pi&quot;:[[{&quot;k&quot;:&quot;1&quot;,&quot;spc&quot;:[&quot;&quot;,&quot;&quot;,&quot;&quot;,&quot;&quot;]}]],&quot;dsr&quot;:[20,31,null,null]}\" data-mw=\"{&quot;parts&quot;:[{&quot;template&quot;:{&quot;target&quot;:{&quot;wt&quot;:&quot;echo&quot;,&quot;href&quot;:&quot;./Template:Echo&quot;},&quot;params&quot;:{&quot;1&quot;:{&quot;wt&quot;:&quot;hi&quot;}},&quot;i&quot;:0}}]}\">hi</span>"}]]}'>http://example.com/hi</a>)</p>
5030 <p>(<a rel="mw:ExtLink" href="http://example.com" data-parsoid='{"stx":"url","a":{"href":"http://example.com"},"sa":{"href":"http://example.com<!-- hi -->"}}'>http://example.com</a>)</p>
5034 Replace invalid link targets when serializing
5038 <a rel="mw:WikiLink" href="./]] foo [[bar">Manual</a>
5040 [[MediaWiki:Badtitletext|Manual]]
5050 Normal text. '''Bold text.''' Normal text. ''Italic text.''
5052 Normal text. '''''Bold italic text.''''' Normal text.
5054 <p>Normal text. <b>Bold text.</b> Normal text. <i>Italic text.</i>
5055 </p><p>Normal text. <i><b>Bold italic text.</b></i> Normal text.
5060 # Parsoid inserts an empty bold tag pair at the end of the line, that the PHP
5061 # parser strips. The wikitext contains just the first half of the bold
5064 Unclosed and unmatched quotes
5066 '''''Bold italic text '''with bold deactivated''' in between.'''''
5068 '''''Bold italic text ''with italic deactivated'' in between.'''''
5072 ..spanning two paragraphs (should not work).'''
5074 '''Bold tag left open
5076 ''Italic tag left open
5080 <!-- Unmatching number of opening, closing tags: -->
5081 '''This year''''s election ''should'' beat '''last year''''s.
5083 ''Tom'''s car is bigger than ''Susan'''s.
5085 Plain ''italic'''s plain
5087 <p><i><b>Bold italic text </b>with bold deactivated<b> in between.</b></i>
5088 </p><p><b><i>Bold italic text </i>with italic deactivated<i> in between.</i></b>
5089 </p><p><b>Bold text..</b>
5090 </p><p>..spanning two paragraphs (should not work).
5091 </p><p><b>Bold tag left open</b>
5092 </p><p><i>Italic tag left open</i>
5094 </p><p><b>This year'</b>s election <i>should</i> beat <b>last year'</b>s.
5095 </p><p><i>Tom<b>s car is bigger than </b></i><b>Susan</b>s.
5096 </p><p>Plain <i>italic'</i>s plain
5099 <p><i><b>Bold italic text </b>with bold deactivated<b> in between.</b></i>
5100 </p><p><b><i>Bold italic text </i>with italic deactivated<i> in between.</i></b>
5101 </p><p><b>Bold text..</b>
5102 </p><p>..spanning two paragraphs (should not work).<b></b>
5103 </p><p><b>Bold tag left open</b>
5104 </p><p><i>Italic tag left open</i>
5106 </p><p><b>This year'</b>s election <i>should</i> beat <b>last year'</b>s.
5107 </p><p><i>Tom<b>s car is bigger than </b></i><b>Susan</b>s.
5108 </p><p>Plain <i>italic'</i>s plain
5115 ### some content taken from http://meta.wikimedia.org/wiki/MediaWiki_User%27s_Guide:_Using_tables
5118 # This should not produce <table></table> as <table><tr><td></td></tr></table>
5119 # is the bare minimum required by the spec, see:
5120 # http://www.w3.org/TR/xhtml-modularization/dtd_module_defs.html#a_module_Basic_Tables
5121 # Parsoid team replies: empty table tags are legal in HTML5
5123 A table with no data.
5136 A table with stray table end tags on start tag line (wt2html)
5140 {|style="color: red;"|}
5142 {|style="color: red;" |}
5146 {|style="color: red;"|} id="foo"
5150 {|style="color: red;" |} id="foo"
5154 <table style="color: red;"></table>
5156 <table style="color: red;">
5162 <table style="color: red;" id="foo">
5168 <table style="color: red;" id="foo">
5177 A table with no data (take 2)
5185 # A table with nothing but a caption is invalid XHTML, we might want to render
5186 # this as <p>caption</p>
5187 # Parsoid team replies: table with only a caption is legal in HTML5
5189 A table with nothing but a caption
5197 </caption><tr><td></td></tr></table>
5200 <table><caption> caption</caption></table>
5204 A table with caption with default-spaced attributes and a table row
5207 |+ style="color: red;" | caption1
5213 <caption style="color: red;"> caption1
5222 A table with captions with non-default spaced attributes and a table row
5225 |+style="color: red;"|caption2
5226 |+ style="color: red;"| caption3
5232 <caption style="color: red;">caption2
5234 <caption style="color: red;"> caption3
5243 Table td-cell syntax variations
5247 | foo bar foo || baz
5248 | style='color:red;' | baz
5249 | style='color:red;' || baz
5256 <td> foo bar foo </td>
5259 <td style="color:red;"> baz
5261 <td> style='color:red;' </td>
5289 Simple table but with multiple dashes for row wikitext
5307 Multiplication table
5309 {| border="1" cellpadding="2"
5310 |+Multiplication table
5312 ! × !! 1 !! 2 !! 3
5330 <table border="1" cellpadding="2">
5331 <caption>Multiplication table
5378 Accept "||" in table headings
5393 Accept "!!" in table data
5407 <tbody><tr data-parsoid='{"autoInsertedEnd":true,"autoInsertedStart":true}'><td data-parsoid='{"autoInsertedEnd":true}'> Foo!! </td><td data-parsoid='{"stx_v":"row","autoInsertedEnd":true}'></td></tr>
5412 Accept "||" in indented table headings
5422 </th></tr></table></dd></dl>
5427 Accept empty attributes in td/th cells (td/th cells starting with leading ||)
5444 Accept "| !" at start of line in tables (ignore !-attribute)
5448 | !style="color:red" | bar
5460 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 +/-
5464 |style='color:red;'|+1
5465 |style='color:blue;'|-1
5477 <td style="color:red;">+1
5479 <td style="color:blue;">-1
5503 |rowspan=2| Cell 2, row 1 (and 2)
5514 <td rowspan="2"> Cell 2, row 1 (and 2)
5532 {| bgcolor=#ABCDEF border=2
5537 |the original table again
5545 <table bgcolor="#ABCDEF" border="2">
5553 <td>the original table again
5559 Invalid attributes in table cell (bug 1830)
5572 # The "|}" to close the table is missing from the input, so parsoid's
5573 # *2wt modes will fail.
5575 Table security: embedded pipes (http://lists.wikimedia.org/mailman/htdig/wikitech-l/2006-April/022293.html)
5577 parsoid=wt2html,html2html
5580 | |[ftp://|x||]" onmouseover="alert(document.cookie)">test
5584 <td>[<a rel="nofollow" class="external free" href="ftp://%7Cx">ftp://%7Cx</a></td>
5585 <td>]" onmouseover="alert(document.cookie)">test
5593 <td><a rel="mw:ExtLink" href="ftp://|x||"></a>" onmouseover="alert(document.cookie)">test</td></tr></tbody></table>
5596 # FIXME: The php output is broken.
5598 ! and || in td attributes should not be parsed as <th>/<td>
5601 | style="color: red !important;" data-contrived="put this here ||" | foo
5606 <td> style="color: red !important;" data-contrived="put this here </td>
5612 <tbody><tr><td style="color: red !important;" data-contrived="put this here ||" data-parsoid='{"autoInsertedEnd":true}'> foo</td></tr>
5617 Indented table markup mixed with indented pre content (proposed in bug 6200)
5622 Text that should be rendered preformatted
5630 <pre>Text that should be rendered preformatted
5639 Template-generated table cell attributes and cell content
5644 | <!--foo--> <!--bar--> <!--baz--> {{table_attribs}}
5645 |align=center {{table_attribs}}
5646 | <!--foo--> align=center <!--bar--> {{table_attribs}}
5651 <td style="color: red"> Foo
5653 <td style="color: red"> Foo
5655 <td style="color: red"> Foo
5657 <td align="center" style="color: red"> Foo
5659 <td align="center" style="color: red"> Foo
5665 Template-generated table cell attributes and cell content (2)
5668 |align=center {{table_cells}}
5673 <td align="center" style="color: red"> Foo </td>
5681 Table with row followed by newlines and table heading
5699 Table with empty line following the start tag
5716 # FIXME: Preserve the attribute properly (with an empty string as value) in
5717 # the PHP parser. Parsoid implements the behavior below.
5719 Table attributes with empty value
5729 </td></tr></tbody></table>
5734 Wikitext table with a lot of comments
5757 Wikitext table with double-line table cell
5774 Table cell with a single comment
5791 Table-cell after a comment-only-empty-line
5808 <tbody><tr data-parsoid='{"autoInsertedEnd":true,"autoInsertedStart":true}'><td data-parsoid='{"autoInsertedEnd":true}'>a</td>
5810 <!--c2--><td data-parsoid='{"autoInsertedEnd":true}'> b</td></tr>
5816 Build table with {{!}}
5818 {{{!}} class="wikitable"
5821 {{!}}- style="color:red;"
5822 {{!}} data {{!}}{{!}} style="color:red;" {{!}} second data
5825 <table class="wikitable">
5831 <tr style="color:red;">
5833 <td style="color:red;"> second data
5839 Build table with pipe as data
5841 {| class="wikitable"
5844 |- style="color:red;"
5845 | data || style="color:red;" | second data
5847 | style="color:red;" | data with | || style="color:red;" | second data with |
5849 || data with | ||| second data with |
5852 <table class="wikitable">
5858 <tr style="color:red;">
5860 <td style="color:red;"> second data
5863 <td style="color:red;"> data with | </td>
5864 <td style="color:red;"> second data with |
5867 <td> data with | </td>
5868 <td> second data with |
5874 Build table with wikilink
5876 {| class="wikitable"
5877 ! header || second header
5878 |- style="color:red;"
5879 | data [[Main Page|linktext]] || second data [[Main Page|linktext]]
5881 | data || second data [[Main Page|link|text with pipe]]
5884 <table class="wikitable">
5889 <tr style="color:red;">
5890 <td> data <a href="/wiki/Main_Page" title="Main Page">linktext</a> </td>
5891 <td> second data <a href="/wiki/Main_Page" title="Main Page">linktext</a>
5895 <td> second data <a href="/wiki/Main_Page" title="Main Page">link|text with pipe</a>
5900 # The expected HTML structure in this test is debatable. The PHP parser does
5901 # not parse this kind of table at all. The main focus for Parsoid is on
5902 # round-tripping, so this output is ok for now. TODO: revisit!
5904 Wikitext table with html-syntax row
5914 <td>foo</td></tr></tbody></table>
5917 ## Note that Parsoid output differs from PHP and PHP+tidy here.
5918 ## The lack of <tr> tags in the PHP output is arguably a bug in the
5919 ## PHP parser, which tidy then compounds by fostering the content
5920 ## entirely out of the table. Parsoid recognizes the table context
5921 ## and generates <tr> and <td> wrappers as needed. Hopefully nobody
5922 ## depends on PHP's treatment of broken table markup!
5924 Implicit <td> after a |-
5926 parsoid=wt2html,html2html
5946 # Again, Parsoid adds implicit <td>s here, PHP and Tidy strip the b out.
5948 <pre> tags should be recognized in an explicit <td> context, but not in an implicit <td> context
5950 parsoid=wt2html,html2html
5983 <tr><td><pre>a</pre></td></tr>
5984 <tr><td> b</td></tr>
5989 # PHP + Tidy strips the list out of the table; Parsoid wraps it.
5990 # Parsoid generates the missing <td>, so wt2wt won't succeed.
5992 Lists should be recognized in an implicit <td> context
5994 parsoid=wt2html,html2html
6021 Parsoid: Round-trip tables directly followed by content (bug 51219)
6023 parsoid=wt2html,wt2wt
6048 Parsoid: Default to a newline after tables in new content (bug 51219)
6053 <tr><td>foo</td></tr></tbody></table> bar
6055 <tr><td>baz</td></tr></tbody></table><b>quux</b>
6060 <nowiki> </nowiki>bar
6068 Parsoid: newline inducing block nodes don't suppress <nowiki>
6080 Parsoid: Row-syntax table headings followed by comment & table cells
6082 parsoid=wt2html,wt2wt
6086 <!-- foo --> || baz || quux
6100 <tbody><tr><th> foo </th><th> bar
6101 <!-- foo --> </th><td> baz </td><td> quux</td></tr>
6106 # PHP throws away the (semi-broken) "foo" class here; Parsoid
6109 Parsoid: Recover better from broken table attributes
6129 <p>foo</p></td></tr>
6134 Strip unsupported table tags
6185 Plain link, capitalized
6189 <p><a href="/wiki/Main_Page" title="Main Page">Main Page</a>
6194 Plain link, uncapitalized
6198 <p><a href="/wiki/Main_Page" title="Main Page">main Page</a>
6205 [[Main Page|The Main Page]]
6207 <p><a href="/wiki/Main_Page" title="Main Page">The Main Page</a>
6212 Piped link with comment in link text
6214 [[Main Page|The Main<!--front--> Page]]
6216 <p><a href="/wiki/Main_Page" title="Main Page">The Main Page</a>
6221 Piped link with multiple pipe characters in link text
6223 [[Main Page||The|Main|Page|]]
6225 <p><a href="/wiki/Main_Page" title="Main Page">|The|Main|Page|</a>
6228 <p><a rel="mw:WikiLink" href="Main_Page" title="Main Page">|The|Main|Page|</a></p>
6236 <p><a href="/index.php?title=Zigzagzogzagzig&action=edit&redlink=1" class="new" title="Zigzagzogzagzig (page does not exist)">Zigzagzogzagzig</a>
6241 Broken link with fragment
6243 [[Zigzagzogzagzig#zug]]
6245 <p><a href="/index.php?title=Zigzagzogzagzig&action=edit&redlink=1" class="new" title="Zigzagzogzagzig (page does not exist)">Zigzagzogzagzig#zug</a>
6250 Special page link with fragment
6252 [[Special:Version#anchor]]
6254 <p><a href="/wiki/Special:Version#anchor" title="Special:Version">Special:Version#anchor</a>
6259 Nonexistent special page link with fragment
6261 [[Special:ThisNameWillHopefullyNeverBeUsed#anchor]]
6263 <p><a href="/wiki/Special:ThisNameWillHopefullyNeverBeUsed" class="new" title="Special:ThisNameWillHopefullyNeverBeUsed (page does not exist)">Special:ThisNameWillHopefullyNeverBeUsed#anchor</a>
6270 xxx[[main Page]], xxx[[Main Page]], Xxx[[main Page]] XXX[[main Page]], XXX[[Main Page]]
6272 <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>
6279 [[Main Page]]xxx, [[Main Page]]XXX, [[Main Page]]!!!
6281 <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>!!!
6292 Bug 43661: Piped links with identical prefixes
6294 [[prefixed article|prefixed articles with spaces]]
6296 [[prefixed article|prefixed articlesaoeu]]
6298 [[Main Page|Main Page test]]
6300 <p><a href="/wiki/Prefixed_article" title="Prefixed article">prefixed articles with spaces</a>
6301 </p><p><a href="/wiki/Prefixed_article" title="Prefixed article">prefixed articlesaoeu</a>
6302 </p><p><a href="/wiki/Main_Page" title="Main Page">Main Page test</a>
6308 Link with HTML entity in suffix / tail
6310 [[Main Page]]", [[Main Page]]a
6312 <p><a href="/wiki/Main_Page" title="Main Page">Main Page</a>", <a href="/wiki/Main_Page" title="Main Page">Main Page</a>a
6315 <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>
6319 Link with 3 brackets
6328 Link with 4 brackets
6332 <p>[[<a href="/wiki/Main_Page" title="Main Page">Main Page</a>]]
6337 Piped link with 3 brackets
6339 [[[main page|the main page]]]
6341 <p>[[[main page|the main page]]]
6346 Piped link with extlink-like text
6349 [[Main Page|This is a [bar]]]
6351 <p><a href="/wiki/Main_Page" title="Main Page">[bar]</a>
6352 <a href="/wiki/Main_Page" title="Main Page">This is a [bar]</a>
6355 <p><a rel="mw:WikiLink" href="./Main_Page" title="Main Page" data-parsoid='{"stx":"piped"}'>[bar]</a>
6356 <a rel="mw:WikiLink" href="./Main_Page" title="Main Page" data-parsoid='{"stx":"piped"}'>This is a [bar]</a></p>
6360 Link with multiple pipes
6362 [[Main Page|The|Main|Page]]
6364 <p><a href="/wiki/Main_Page" title="Main Page">The|Main|Page</a>
6368 # Note that parsoid does not munge anchor text; all non-space
6369 # characters are valid in HTML5 ids.
6371 Anchor containing a #. (bug 63430)
6373 [[Main Page#And#Link]]
6375 <p><a href="/wiki/Main_Page#And.23Link" title="Main Page">Main Page#And#Link</a>
6378 <p><a rel="mw:WikiLink" href="./Main_Page#And%23Link" title="Main Page">Main Page#And#Link</a></p>
6384 [[Talk:Parser testing]], [[Meta:Disclaimers]]
6386 <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>
6391 Link with space in namespace
6393 [[User talk:Foo bar]]
6395 <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>
6400 MemoryAlpha:AlphaTest
6402 This is an article in the MemoryAlpha namespace
6403 (which shadows the memoryalpha interwiki link).
6407 Namespace takes precedence over interwiki link (bug 51680)
6409 [[MemoryAlpha:AlphaTest]]
6411 <p><a href="/wiki/MemoryAlpha:AlphaTest" title="MemoryAlpha:AlphaTest">MemoryAlpha:AlphaTest</a>
6415 # The previous test doesn't work correctly in html2*, due to not recognizing the
6416 # link as an internal one. This one checks for the correct behavior.
6418 Link to namespace preferred over interwiki with correct rel attribute
6420 parsoid=html2wt,html2html
6422 <p><a rel="mw:WikiLink" href="./MemoryAlpha:AlphaTest" title="MemoryAlpha:AlphaTest">MemoryAlpha:AlphaTest</a></p>
6424 [[MemoryAlpha:AlphaTest]]
6428 Piped link to namespace
6430 [[Meta:Disclaimers|The disclaimers]]
6432 <p><a href="/index.php?title=Meta:Disclaimers&action=edit&redlink=1" class="new" title="Meta:Disclaimers (page does not exist)">The disclaimers</a>
6439 [[Usually caused by a typo (oops}]]
6441 <p>[[Usually caused by a typo (oops}]]
6448 Just a test of an article title containing a percent.
6452 Link containing % (not as a hex sequence)
6456 <p><a href="/wiki/7%25_Solution" title="7% Solution">7% Solution</a>
6459 <p><a rel="mw:WikiLink" href="./7%25_Solution" title="7% Solution">7% Solution</a></p>
6462 # note that the parsoid HTML is identical to the previous test output,
6463 # so the previous test ensures that the html2wt mode will generate the
6464 # "not as a hex sequence" wikitext.
6466 Link containing % as a single hex sequence interpreted to char
6468 parsoid=wt2wt,wt2html,html2html
6472 <p><a href="/wiki/7%25_Solution" title="7% Solution">7% Solution</a>
6475 <p><a rel="mw:WikiLink" href="./7%25_Solution" title="7% Solution">7% Solution</a></p>
6479 Link containing % as a double hex sequence interpreted to hex sequence
6483 <p>[[7%2525 Solution]]
6487 # note that parsoid does not munge anchor text; all non-space
6488 # characters are valid in HTML5 anchors.
6490 Link containing "#<" and "#>" % as a hex sequences- these are valid section anchors
6491 Example for such a section: == < ==
6493 [[%23%3c]][[%23%3e]]
6495 <p><a href="#.3C">#<</a><a href="#.3E">#></a>
6498 <p><a rel="mw:WikiLink" href="./Main%20Page#%3C" title="Main Page">#<</a><a rel="mw:WikiLink" href="./Main%20Page#%3E" title="Main Page">#></a></p>
6502 Link containing "<#" and ">#" as a hex sequences
6504 [[%3c%23]][[%3e%23]]
6506 <p>[[%3c%23]][[%3e%23]]
6511 Link containing an equals sign
6513 [[Special:BookSources/isbn=4-00-026157-6]]
6515 <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>
6518 <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>
6524 Just a test of an article title containing a tilde.
6527 # note that links containing signatures, like [[Foo~~~~]], are
6528 # massaged by the pre-save transform (PST) and so the tildes are never
6529 # seen by the parser.
6531 Link containing a tilde
6535 <p><a href="/wiki/Foo%7Ebar" title="Foo~bar">Foo~bar</a>
6538 <p><a rel="mw:WikiLink" href="./Foo~bar" title="Foo~bar">Foo~bar</a></p>
6542 Link containing double-single-quotes '' (bug 4598)
6544 [[Lista d''e paise d''o munno]]
6546 <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>
6549 <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>
6553 Link containing double-single-quotes '' in text (bug 4598 sanity check)
6555 Some [[Link|pretty ''italics'' and stuff]]!
6557 <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>!
6560 <p>Some <a rel="mw:WikiLink" href="Link" title="Link">pretty <i>italics</i> and stuff</a>!</p>
6564 Link containing double-single-quotes '' in text embedded in italics (bug 4598 sanity check)
6566 ''Some [[Link|pretty ''italics'' and stuff]]!''
6568 <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>
6573 Link with double quotes in title part (literal) and alternate part (interpreted)
6575 [[File:Denys_Savchenko_''Pentecoste''.jpg]]
6579 [[''Pentecoste''|Pentecoste]]
6581 [[''Pentecoste''|''Pentecoste'']]
6583 <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>
6584 </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>
6585 </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>
6586 </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>
6589 <p><span class="mw-default-size" typeof="mw:Error mw:Image" data-mw='{"errors":[{"key":"missing-image","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></span></p>
6590 <p><a rel="mw:WikiLink" href="''Pentecoste''" title="''Pentecoste''">''Pentecoste''</a></p>
6591 <p><a rel="mw:WikiLink" href="''Pentecoste''" title="''Pentecoste''">Pentecoste</a></p>
6592 <p><a rel="mw:WikiLink" href="''Pentecoste''" title="''Pentecoste''"><i>Pentecoste</i></a></p>
6596 Broken image links with HTML captions (bug 39700)
6598 [[File:Nonexistent|<script></script>]]
6599 [[File:Nonexistent|100x100px|<script></script>]]
6600 [[File:Nonexistent|<]]
6601 [[File:Nonexistent|a<i>b</i>c]]
6603 <p><a href="/index.php?title=Special:Upload&wpDestFile=Nonexistent" class="new" title="File:Nonexistent"><script></script></a>
6604 <a href="/index.php?title=Special:Upload&wpDestFile=Nonexistent" class="new" title="File:Nonexistent"><script></script></a>
6605 <a href="/index.php?title=Special:Upload&wpDestFile=Nonexistent" class="new" title="File:Nonexistent"><</a>
6606 <a href="/index.php?title=Special:Upload&wpDestFile=Nonexistent" class="new" title="File:Nonexistent">abc</a>
6609 <p><span class="mw-default-size" typeof="mw:Error mw:Image" data-mw='{"errors":[{"key":"missing-image","message":"This image does not exist."}],"caption":"<script></script>"}'><a href="./File:Nonexistent"><img resource="./File:Nonexistent" src="./Special:FilePath/Nonexistent" height="220" width="220"/></a></span>
6610 <span typeof="mw:Error mw:Image" data-mw='{"errors":[{"key":"missing-image","message":"This image does not exist."}],"caption":"<script></script>"}'><a href="./File:Nonexistent" data-parsoid='{"a":{"href":"./File:Nonexistent"},"sa":{}}'><img resource="./File:Nonexistent" src="./Special:FilePath/Nonexistent" height="100" width="100"/></a></span>
6611 <span class="mw-default-size" typeof="mw:Error mw:Image" data-mw='{"errors":[{"key":"missing-image","message":"This image does not exist."}],"caption":"&lt;"}'><a href="./File:Nonexistent"><img resource="./File:Nonexistent" src="./Special:FilePath/Nonexistent" height="220" width="220"/></a></span>
6612 <span class="mw-default-size" typeof="mw:Error mw:Image" data-mw='{"errors":[{"key":"missing-image","message":"This image does not exist."}],"caption":"a<i>b</i>c"}'><a href="./File:Nonexistent"><img resource="./File:Nonexistent" src="./Special:FilePath/Nonexistent" height="220" width="220"/></a></span></p>
6618 [[http://www.example.com]]
6620 <p>[<a rel="nofollow" class="external autonumber" href="http://www.example.com">[1]</a>]
6623 <p>[<a rel="mw:ExtLink" href="http://www.example.com"></a>]</p>
6627 Plain link to URL with link text
6629 [[http://www.example.com Link text]]
6631 <p>[<a rel="nofollow" class="external text" href="http://www.example.com">Link text</a>]
6636 Plain link to protocol-relative URL
6638 [[//www.example.com]]
6640 <p>[<a rel="nofollow" class="external autonumber" href="//www.example.com">[1]</a>]
6643 <p>[<a rel="mw:ExtLink" href="//www.example.com"></a>]</p>
6647 Plain link to protocol-relative URL with link text
6649 [[//www.example.com Link text]]
6651 <p>[<a rel="nofollow" class="external text" href="//www.example.com">Link text</a>]
6656 Plain link to page with question mark in title
6662 <p><a href="/wiki/A%3Fb" title="A?b">A?b</a>
6663 </p><p><a href="/wiki/A%3Fb" title="A?b">Baz</a>
6668 # I'm fairly sure the expected result here is wrong.
6669 # We want these to be URL links, not pseudo-pages with URLs for titles....
6670 # However the current output is also pretty screwy.
6673 # I'm changing it to match the current output--it arguably makes more
6674 # sense in the light of the test above. Old expected result was:
6675 #<p>Piped link to URL: <a href="/index.php?title=Http://www.example.com&action=edit" class="new">an example URL</a>
6677 # But I think this test is bordering on "garbage in, garbage out" anyway.
6682 Piped link to URL: [[http://www.example.com|an example URL]]
6684 <p>Piped link to URL: [<a rel="nofollow" class="external text" href="http://www.example.com%7Can">example URL</a>]
6687 <p>Piped link to URL: [<a rel="mw:ExtLink" href="http://www.example.com|an">example URL</a>]</p>
6691 BUG 2: [[page|http://url/]] should link to page, not http://url/
6693 [[Main Page|http://url/]]
6695 <p><a href="/wiki/Main_Page" title="Main Page">http://url/</a>
6698 <p><a rel="mw:WikiLink" href="./Main_Page" title="Main Page">http://url/</a></p>
6701 # Parsoid does not mark self-links, by design.
6703 BUG 337: Escaped self-links should be bold
6707 [[Bug462]] [[Bug462]]
6709 <p><strong class="selflink">Bug462</strong> <strong class="selflink">Bug462</strong>
6712 <p><strong class="selflink">Bug462</strong> <strong class="selflink">Bug462</strong></p>
6714 <p><a rel="mw:WikiLink" href="./Bug462" title="Bug462">Bug462</a> <a rel="mw:WikiLink" href="./Bug462" title="Bug462">Bug462</a></p>
6718 Self-link to section should not be bold
6722 [[Main Page#section]]
6724 <p><a href="/wiki/Main_Page#section" title="Main Page">Main Page#section</a>
6735 Self-link to numeric title
6741 <p><strong class="selflink">0</strong>
6746 Link to numeric-equivalent title
6752 <p><a href="/wiki/00" title="00">00</a>
6757 <nowiki> inside a link
6759 [[Main<nowiki> Page</nowiki>]] [[Main Page|the main page <nowiki>[it's not very good]</nowiki>]]
6761 <p>[[Main Page]] <a href="/wiki/Main_Page" title="Main Page">the main page [it's not very good]</a>
6766 Non-breaking spaces in title
6768 [[ Main Page ]]
6770 <p><a href="/wiki/Main_Page" title="Main Page">  Main   Page  </a>
6775 Internal link with ca linktrail, surrounded by bold apostrophes (bug 27473 primary issue)
6781 <p><b><a href="/wiki/Main_Page" title="Main Page">Main Page</a></b>
6786 Internal link with ca linktrail, surrounded by italic apostrophes (bug 27473 primary issue)
6792 <p><i><a href="/wiki/Main_Page" title="Main Page">Main Page</a></i>
6797 Internal link with en linktrail: no apostrophes (bug 27473)
6803 <p><a href="/index.php?title=Something&action=edit&redlink=1" class="new" title="Something (page does not exist)">Something</a>'nice
6808 Internal link with ca linktrail with apostrophes (bug 27473)
6814 <p><a href="/index.php?title=Something&action=edit&redlink=1" class="new" title="Something (encara no existeix)">Something'nice</a>
6819 Internal link with kaa linktrail with apostrophes (bug 27473)
6825 <p><a href="/index.php?title=Something&action=edit&redlink=1" class="new" title="Something (bet ele jaratılmag'an)">Something'nice</a>
6830 Link with multiple ":" in a subpage-supporting namespace (bug 63636)
6832 [[User:Foo/Test/63636:Bar|Test]]
6834 <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>
6837 <p><a rel="mw:WikiLink" href="./User:Foo/Test/63636:Bar" title="User:Foo/Test/63636:Bar">Test</a></p>
6841 Purely hash wikilink
6843 title=[[User:test/123]]
6847 <p><a href="#a">b</a>
6850 <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>
6854 1. Interaction of linktrail and template encapsulation
6860 <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>
6864 2. Interaction of linktrail and template encapsulation
6868 {{echo|Some [[Fool]]}}s
6870 <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","spc":["","","",""]}]]}'>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>
6874 3. Interaction of linktrail and template encapsulation
6878 {{echo|Some [[Fool]]s are '''bold and foolish'''}}
6880 <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","spc":["","","",""]}]]}'>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>
6890 Internal link with is link prefix
6894 Aðrir mótmælenda[[söfnuður|söfnuðir]] og
6896 <p>Aðrir <a href="/wiki/S%C3%B6fnu%C3%B0ur" title="Söfnuður">mótmælendasöfnuðir</a> og
6907 Internal link with is link trail and link prefix
6911 [[mótmælendatrú|xxx]]ar
6913 mótmælenda[[söfnuður]]
6914 mótmælenda[[söfnuður|söfnuðir]]
6915 mótmælenda[[söfnuður|söfnuðir]]xxx
6917 <p><a href="/wiki/M%C3%B3tm%C3%A6lendatr%C3%BA" title="Mótmælendatrú">xxxar</a>
6918 <a href="/wiki/M%C3%B3tm%C3%A6lendatr%C3%BA" title="Mótmælendatrú">mótmælendatrúar</a>
6919 <a href="/wiki/S%C3%B6fnu%C3%B0ur" title="Söfnuður">mótmælendasöfnuður</a>
6920 <a href="/wiki/S%C3%B6fnu%C3%B0ur" title="Söfnuður">mótmælendasöfnuðir</a>
6921 <a href="/wiki/S%C3%B6fnu%C3%B0ur" title="Söfnuður">mótmælendasöfnuðirxxx</a>
6926 Parsoid link trail escaping
6928 parsoid=html2wt,html2html
6930 <p><a rel="mw:WikiLink" href="Apple" title="Apple">apple</a>s</p>
6936 Parsoid link prefix escaping
6939 parsoid=html2wt,html2html
6941 <p>Aðrir mótmælenda<a rel="mw:WikiLink" href="Söfnuður" title="Söfnuður">söfnuður</a></p>
6943 Aðrir mótmælenda<nowiki/>[[söfnuður]]
6947 Parsoid-centric test: Whitespace in ext- and wiki-links should be preserved
6955 [http://wp.org ''foo'']
6957 <p><a href="/wiki/Foo" title="Foo"> bar</a>
6958 </p><p><a href="/wiki/Foo" title="Foo"> <i>bar</i></a>
6959 </p><p><a rel="nofollow" class="external text" href="http://wp.org">foo</a>
6960 </p><p><a rel="nofollow" class="external text" href="http://wp.org"><i>foo</i></a>
6965 Parsoid: Scoped parsing should handle mixed transclusions and plain text
6969 [[Foo|{{echo|a}} b {{echo|c}}]]
6971 <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>
6975 Link with angle bracket after anchor
6979 <p><a href="/wiki/Foo#.3Cbar.3E" title="Foo">Foo#<bar></a>
6982 <p><a rel="mw:WikiLink" href="./Foo#%3Cbar%3E" title="Foo" data-parsoid='{"stx":"simple","a":{"href":"./Foo#%3Cbar%3E"},"sa":{"href":"Foo#<bar>"}}'>Foo#<bar></a></p>
6986 ### Interwiki links (see maintenance/interwiki.sql)
6990 Inline interwiki link
6992 parsoid=wt2html,wt2wt,html2html
6994 [[MeatBall:SoftSecurity]]
6996 <p><a href="http://www.usemod.com/cgi-bin/mb.pl?SoftSecurity" class="extiw" title="meatball:SoftSecurity">MeatBall:SoftSecurity</a>
6999 <p><a rel="mw:ExtLink" href="http://www.usemod.com/cgi-bin/mb.pl?SoftSecurity" title="meatball:SoftSecurity">MeatBall:SoftSecurity</a></p>
7003 Inline interwiki link with empty title (bug 2372)
7005 parsoid=wt2html,wt2wt,html2html
7009 <p><a href="http://www.usemod.com/cgi-bin/mb.pl" class="extiw" title="meatball:">MeatBall:</a>
7012 <p><a rel="mw:ExtLink" href="http://www.usemod.com/cgi-bin/mb.pl?" title="meatball:">MeatBall:</a></p>
7016 Interwiki link encoding conversion (bug 1636)
7018 *[[Wikipedia:ro:Olteniţa]]
7019 *[[Wikipedia:ro:Olteniţa]]
7021 <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>
7022 <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>
7026 <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>
7027 <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>
7032 Interwiki link with fragment (bug 2130)
7034 [[MeatBall:SoftSecurity#foo]]
7036 <p><a href="http://www.usemod.com/cgi-bin/mb.pl?SoftSecurity#foo" class="extiw" title="meatball:SoftSecurity">MeatBall:SoftSecurity#foo</a>
7040 # Ideally the wikipedia: prefix here should be proto-relative too
7041 # [CSA]: this is kind of a bogus test, as the PHP parser test doesn't
7042 # define the 'en' prefix, and originally the test used 'wikipedia',
7043 # which isn't a localinterwiki prefix hence the links to the 'en:Foo'
7046 Different interwiki prefixes mapping to the same URL
7054 [[:wikipedia:Foo|Foo]]
7056 [[wikipedia:en:Foo]]
7058 [[:wikipedia:en:Foo]]
7062 <p><a rel="mw:ExtLink" 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>
7064 <p><a rel="mw:ExtLink" 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>
7066 <p><a rel="mw:ExtLink" 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>
7068 <p><a rel="mw:ExtLink" 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>
7070 <p><a rel="mw:ExtLink" 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>
7072 <p><a rel="mw:ExtLink" 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>
7074 <p><a rel="mw:ExtLink" 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>
7078 Interwiki links that cannot be represented in wiki syntax
7081 [[meatball:ok#foo|ok with fragment]]
7082 [[meatball:ok_as_well?|ok ending with ? mark]]
7083 [http://de.wikipedia.org/wiki/Foo?action=history has query]
7084 [http://de.wikipedia.org/wiki/#foo is just fragment]
7087 <p><a href="http://www.usemod.com/cgi-bin/mb.pl?ok" class="extiw" title="meatball:ok">meatball:ok</a>
7088 <a href="http://www.usemod.com/cgi-bin/mb.pl?ok#foo" class="extiw" title="meatball:ok">ok with fragment</a>
7089 <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>
7090 <a rel="nofollow" class="external text" href="http://de.wikipedia.org/wiki/Foo?action=history">has query</a>
7091 <a rel="nofollow" class="external text" href="http://de.wikipedia.org/wiki/#foo">is just fragment</a>
7094 <p><a rel="mw:ExtLink" href="http://www.usemod.com/cgi-bin/mb.pl?ok" title="meatball:ok">meatball:ok</a>
7095 <a rel="mw:ExtLink" href="http://www.usemod.com/cgi-bin/mb.pl?ok#foo" title="meatball:ok">ok with fragment</a>
7096 <a rel="mw:ExtLink" href="http://www.usemod.com/cgi-bin/mb.pl?ok_as_well?" title="meatball:ok as well?">ok ending with ? mark</a>
7097 <a rel="mw:ExtLink" href="http://de.wikipedia.org/wiki/Foo?action=history">has query</a>
7098 <a rel="mw:ExtLink" href="http://de.wikipedia.org/wiki/#foo">is just fragment</a></p>
7102 Interwiki links: trail
7104 [[wikipedia:Foo|Ba]]r
7106 <p><a href="http://en.wikipedia.org/wiki/Foo" class="extiw" title="wikipedia:Foo">Bar</a>
7109 <p><a rel="mw:ExtLink" 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>
7113 Local interwiki link
7115 parsoid=wt2html,wt2wt,html2html
7117 [[local:Template:Foo]]
7119 <p><a href="/wiki/Template:Foo" title="Template:Foo">local:Template:Foo</a>
7122 <p><a rel="mw:WikiLink" href="./Template:Foo" title="Template:Foo">local:Template:Foo</a></p>
7125 # Parsoid does not mark self-links, by design.
7127 Local interwiki link: self-link to current page
7130 parsoid=wt2html,wt2wt,html2html
7134 <p><strong class="selflink">local:Main Page</strong>
7137 <p><a rel="mw:WikiLink" href="./Main_Page" title="Main Page">local:Main Page</a></p>
7141 Local interwiki link: prefix only (bug 64167)
7143 parsoid=wt2html,wt2wt,html2html
7147 <p><a href="/wiki/Main_Page" title="Main Page">local:</a>
7150 <p><a rel="mw:WikiLink" href="./Main_Page" title="Main Page">local:</a></p>
7154 Local interwiki link: with additional interwiki prefix (bug 61357)
7156 parsoid=wt2html,wt2wt,html2html
7158 [[local:meatball:Hello]]
7160 <p><a href="http://www.usemod.com/cgi-bin/mb.pl?Hello" class="extiw" title="meatball:Hello">local:meatball:Hello</a>
7163 <p><a rel="mw:ExtLink" href="http://www.usemod.com/cgi-bin/mb.pl?Hello" title="meatball:Hello">local:meatball:Hello</a></p>
7167 Multiple local interwiki link prefixes
7169 [[local:local:local:local:mi:local:Foo]]
7171 parsoid=wt2html,wt2wt,html2html
7173 <p><a href="/wiki/Foo" title="Foo">local:local:local:local:mi:local:Foo</a>
7176 <p><a rel="mw:WikiLink" href="./Foo" title="Foo">local:local:local:local:mi:local:Foo</a></p>
7180 ### Interlanguage links
7181 ### Language links (so that searching for '### language' matches..)
7187 parsoid=wt2html,wt2wt,html2html
7195 <p>Blah blah blah</p>
7196 <link rel="mw:PageProp/Language" href="http://zh.wikipedia.org/wiki/Chinese"/>
7200 Interlanguage link with spacing
7202 parsoid=wt2html,wt2wt,html2html
7210 <p>Blah blah blah</p>
7211 <link rel="mw:PageProp/Language" href="http://zh.wikipedia.org/wiki/Chinese"/>
7215 Double interlanguage link
7217 parsoid=wt2html,wt2wt,html2html
7226 <p>Blah blah blah</p>
7227 <link rel="mw:PageProp/Language" href="http://es.wikipedia.org/wiki/Spanish"/>
7228 <link rel="mw:PageProp/Language" href="http://zh.wikipedia.org/wiki/Chinese"/>
7232 Interlanguage link variations
7234 parsoid=wt2html,wt2wt,html2html
7245 <p>Blah blah blah</p>
7246 <link rel="mw:PageProp/Language" href="http://es.wikipedia.org/wiki/Spanish" />
7247 <link rel="mw:PageProp/Language" href="http://zh.wikipedia.org/wiki/Chinese" />
7248 <link rel="mw:PageProp/Language" href="http://es.wikipedia.org/wiki/Foo_bar" />
7249 <link rel="mw:PageProp/Language" href="http://es.wikipedia.org/wiki/Foo_bar" />
7253 Interlanguage link, with prefix links
7263 <p>Blah blah blah</p>
7264 <link rel="mw:PageProp/Language" href="http://zh.wikipedia.org/wiki/Chinese"/>
7268 Double interlanguage link, with prefix links (bug 8897)
7279 <p>Blah blah blah</p>
7280 <link rel="mw:PageProp/Language" href="http://es.wikipedia.org/wiki/Spanish"/>
7281 <link rel="mw:PageProp/Language" href="http://zh.wikipedia.org/wiki/Chinese"/>
7285 "Extra" interlanguage links (bug 32189 / gerrit 111390)
7293 <p>Blah blah blah</p>
7294 <link rel="mw:PageProp/Language" title="Multilingual" href="http://wikisource.org/wiki/Article"/>
7298 Parsoid-specific test: Wikilinks with should RT properly
7304 <p><a href="/index.php?title=WW_II&action=edit&redlink=1" class="new" title="WW II (lonkásá ezalí tɛ̂)">WW II</a>
7309 Parsoid bug 53221: Wikilinks should be properly entity-escaped
7313 <p>He&nbsp;llo <a href="Foo" rel="mw:WikiLink">He&nbsp;llo</a></p>
7314 <p>He&nbsp;llo <a href="He&nbsp;llo" rel="mw:WikiLink">He&nbsp;llo</a></p>
7316 He&nbsp;llo [[Foo|He&nbsp;llo]]
7318 He&nbsp;llo [[He&nbsp;llo]]
7322 Parsoid: handle constructor well
7328 <p><a href="/index.php?title=Constructor&action=edit&redlink=1" class="new" title="Constructor (page does not exist)">constructor</a>
7329 </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>
7332 <p><a rel="mw:WikiLink" href="./Constructor" title="Constructor" data-parsoid="{"stx":"simple","a":{"href":"./Constructor"},"sa":{"href":"constructor"}}">constructor</a></p>
7334 <p><a rel="mw:WikiLink" href="./Foo" title="Foo" data-parsoid="{"stx":"simple","a":{"href":"./Foo"},"sa":{"href":"constructor:foo"}}">constructor:foo</a></p>
7343 # Note that `ko` isn't a known interlanguage prefix
7345 Parsoid: recognize interlanguage links without a target page
7355 <link rel="mw:PageProp/Language" href="http://es.wikipedia.org/wiki/"/>
7357 <p><a rel="mw:WikiLink" href="./Ko:" title="Ko:">ko:</a></p>
7360 # Note that `ko` isn't a known interwiki prefix
7362 Parsoid: recognize interwiki links without a target page
7364 parsoid=wt2html,wt2wt,html2html
7370 <p><a href="http://es.wikipedia.org/wiki/" class="extiw" title="es:">es:</a>
7371 </p><p><a href="/wiki/Ko:" title="Ko:">ko:</a>
7374 <p><a rel="mw:ExtLink" href="http://es.wikipedia.org/wiki/" title="es:">es:</a></p>
7375 <p><a rel="mw:WikiLink" href="./Ko:" title="Ko:">ko:</a></p>
7379 Handle interwiki links pointing to the current wiki as plain wiki links (bug 45209)
7383 <p><a href="/wiki/Foo" title="Foo">mi:Foo</a>
7386 <p><a rel="mw:WikiLink" href="./Foo" title="Foo" data-parsoid='{"stx":"simple","a":{"href":"./Foo"},"sa":{"href":"mi:Foo"}}'>mi:Foo</a></p>
7390 Interlanguage link with preceding local interwiki link (bug 68085)
7392 parsoid=wt2html,wt2wt,html2html
7395 [[local:es:Spanish]]
7398 <a href="http://es.wikipedia.org/wiki/Spanish" class="extiw" title="es:Spanish">local:es:Spanish</a>
7402 <a rel="mw:ExtLink" href="http://es.wikipedia.org/wiki/Spanish" title="es:Spanish">local:es:Spanish</a></p>
7406 Looks like an interlanguage link, but is actually a local interwiki
7408 parsoid=wt2html,wt2wt,html2html
7414 <a href="/wiki/Template:Foo" title="Template:Foo">mi:Template:Foo</a>
7418 <a rel="mw:WikiLink" href="Template:Foo" title="Template:Foo">mi:Template:Foo</a></p>
7422 ### Redirects, Parsoid-only
7425 1. Simple redirect to page
7429 #REDIRECT [[Main Page]]
7431 <link rel="mw:PageProp/redirect" href="./Main_Page">
7434 # Only wt2html and html2html since "Main_Page" will serialize to "Main Page"
7436 2. Other redirect variants
7438 parsoid=wt2html,wt2wt
7440 #REDIRECT [[Main_Page]]
7441 #REDIRECT [[<nowiki>[[Bar]]</nowiki>]]
7443 <link rel="mw:PageProp/redirect" href="./Main_Page"><link rel="mw:PageProp/redirect" href="./%5B%5BBar%5D%5D">
7449 parsoid=wt2html,wt2wt
7454 <li>REDIRECT [[]]</li></ol>
7458 Optional colon in #REDIRECT
7460 # the colon is archaic syntax. we support it for wt2html, but we
7461 # don't care that it roundtrips back to the modern syntax.
7462 parsoid=wt2html,html2html
7464 #REDIRECT:[[Main Page]]
7466 <link rel="mw:PageProp/redirect" href="./Main_Page">
7470 Whitespace in #REDIRECT with optional colon
7472 # the colon and gratuitous whitespace is archaic syntax. we support
7473 # it for wt2html, but we don't care that it roundtrips back to the
7474 # modern syntax (without extra whitespace)
7475 parsoid=wt2html,html2html
7482 <link rel="mw:PageProp/redirect" href="./Main_Page">
7486 Piped link in #REDIRECT
7488 # content after piped link is ignored. we support this syntax,
7489 # but don't care that the piped link is lost when we roundtrip this.
7492 #REDIRECT [[Main Page|bar]]
7494 <link rel="mw:PageProp/redirect" href="./Main_Page">
7498 Redirect to category
7502 #REDIRECT [[Category:Foo]]
7504 <link rel="mw:PageProp/redirect" href="./Category:Foo"><link rel="mw:PageProp/Category" href="./Category:Foo">
7508 Redirect to category with URL encoding
7512 #REDIRECT [[Category%3AFoo]]
7514 <link rel="mw:PageProp/redirect" href="./Category:Foo"><link rel="mw:PageProp/Category" href="./Category:Foo">
7518 Redirect to category page
7520 parsoid=wt2html,html2html
7522 #REDIRECT [[:Category:Foo]]
7524 <p><a rel="mw:WikiLink" href="Category:Foo" title="Category:Foo">Category:Foo</a></p>
7528 Redirect to image page (1)
7532 #REDIRECT [[File:Wiki.png]]
7534 <link rel="mw:PageProp/redirect" href="./File:Wiki.png">
7538 Redirect to image page (2)
7542 #REDIRECT [[Image:Wiki.png]]
7544 <link rel="mw:PageProp/redirect" href="./File:Wiki.png">
7548 Redirect to language
7552 #REDIRECT [[en:File:Wiki.png]]
7554 <link rel="mw:PageProp/redirect" href="File:Wiki.png">
7558 Redirect to interwiki
7562 #REDIRECT [[meatball:File:Wiki.png]]
7564 <link rel="mw:PageProp/redirect" href="File:Wiki.png">
7568 Non-English #REDIRECT
7573 #TILVÍSUN [[Main Page]]
7575 <link rel="mw:PageProp/redirect" href="./Main_Page">
7583 <p>Foo<link rel="mw:PageProp/redirect" href="./Foo"></p>
7603 Broken br tag sanitization
7611 # TODO: Fix html2html mode (bug 51055)!
7612 # This </br> handling was added as part of bug 50831; but it
7613 # differs from how PHP+tidy handles this. We should investigate
7616 Parsoid: Broken br tag recognition
7632 Incorrecly removing closing slashes from correctly formed XHTML
7634 <br style="clear:both;" />
7636 <p><br style="clear:both;" />
7641 Failing to transform badly formed HTML into correct XHTML
7643 <br style="clear: left;">
7644 <br style="clear: right;">
7645 <br style="clear: both;">
7647 <p><br style="clear: left;" />
7648 <br style="clear: right;" />
7649 <br style="clear: both;" />
7653 ## FIXME: Is Parsoid's acceptance of self-closing html-tags
7654 ## a feature or a bug? See https://phabricator.wikimedia.org/T76962
7656 Handling html with a div self-closing tag
7665 <p><div title />
7669 <p><div title=bar />
7670 <div title=bar/>
7672 <div title="bar/"></div>
7676 <div title="" data-parsoid='{"stx":"html","selfClose":true}'></div>
7677 <div title="" data-parsoid='{"stx":"html","selfClose":true}'></div>
7678 <div title="" data-parsoid='{"stx":"html","selfClose":true,"brokenHTMLTag":true}'></div>
7679 <div title="bar" data-parsoid='{"stx":"html","selfClose":true}'></div>
7680 <div title="bar" data-parsoid='{"stx":"html","selfClose":true}'></div>
7681 <div title="bar/" data-parsoid='{"stx":"html","autoInsertedEnd":true}'></div>
7685 Handling html with a br self-closing tag
7694 <p><br title="title" />
7695 <br title="title" />
7712 Horizontal ruler (should it add that extra space?)
7727 Horizontal ruler -- 4+ dashes render hr
7736 Horizontal ruler -- eats additional dashes on the same line
7745 Horizontal ruler -- does not collapse dashes on consecutive lines
7756 Horizontal ruler -- <4 dashes render as plain text
7765 Horizontal ruler -- Supports content following dashes on same line
7777 ### Block-level elements
7786 <ul><li>Common list</li>
7788 <li>item 3</li></ul>
7799 <ol><li>Numbered list</li>
7801 <li> item 3</li></ol>
7815 ***#Number on level 4
7817 **#Number on level 3
7818 **#Number on level 3
7822 #** Level 3, but ordered
7825 <ol><li> with numbers</li></ol>
7826 <ul><li> and bullets</li></ul>
7827 <ol><li> and numbers</li></ol></li>
7829 <ul><li>bullet level 2
7830 <ul><li>bullet level 3
7831 <ol><li>Number on level 4</li></ol></li></ul></li>
7833 <ol><li>Number on level 3</li>
7834 <li>Number on level 3</li></ol></li></ul>
7835 <ol><li>number level 2</li></ol></li>
7837 <ul><li><ul><li> Level 3</li></ul></li></ul></li></ul>
7838 <ol><li><ul><li><ul><li> Level 3, but ordered</li></ul></li></ul></li></ol>
7849 <ul><li>bar</li></ul></li></ul>
7859 <ul><li><ul><li>foo</li></ul></li>
7865 Nested lists 3 (first element empty)
7871 <ul><li>bar</li></ul></li></ul>
7876 Nested lists 4 (first element empty)
7881 <ul><li><ul><li></li></ul></li>
7887 Nested lists 5 (both elements empty)
7892 <ul><li><ul><li></li></ul></li>
7898 Nested lists 6 (both elements empty)
7904 <ul><li></li></ul></li></ul>
7909 Nested lists 7 (skip initial nesting levels)
7913 <ul><li><ul><li><ul><li> foo</li></ul></li></ul></li></ul>
7918 Nested lists 8 (multiple nesting transitions)
7926 <ul><li><ul><li> bar</li></ul></li>
7927 <li> baz</li></ul></li>
7933 1. Lists with start-of-line-transparent tokens before bullets: Comments
7946 2. Lists with start-of-line-transparent tokens before bullets: Template close
7951 <ul><li>foo bar</li>
7957 List items are not parsed correctly following a <pre> block (bug 785)
7963 <ul><li> <pre>foo</pre></li>
7964 <li> <pre>bar</pre></li>
7970 List items from template
7981 * notSOL{{inner list}}
7984 <ul><li> item 1</li>
7985 <li> item 2</li></ul>
7986 <ul><li> item 0</li>
7988 <li> item 2</li></ul>
7989 <ul><li> item 0</li>
7992 <li> item 2</li></ul>
7997 List interrupted by empty line or heading
8005 <ul><li> foo</li></ul>
8006 <ul><li><ul><li> bar</li></ul></li></ul>
8007 <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>
8008 <ul><li> Another list item</li></ul>
8013 Multiple list tags generated by templates
8034 Single-comment whitespace lines dont break lists, and neither do multi-comment whitespace lines
8037 <!--This line will NOT split the list-->
8039 <!--This line will NOT split the list either-->
8041 <!--foo--> <!----> <!--This line NOT split the list either-->
8052 Replacing whitespace with tabs still doesn't break the list (gerrit 78327)
8055 <!--This line will NOT split the list-->
8057 <!--This line will NOT split the list either-->
8059 <!--foo--> <!----> <!--This line NOT split the list
8072 (The PHP parser relies on Tidy for the hack)
8074 parsoid=wt2html,wt2wt
8078 * {{echo|<li>templated li-hack}}
8079 * <!--foo--> <li> unsupported li-hack with preceding comments
8082 <li><li>not a li-hack
8089 <li>templated li-hack</li>
8090 <li>unsupported li-hack with preceding comments</li>
8093 <li>not a li-hack</li>
8098 Parsoid: Make sure nested lists are serialized on their own line even if HTML contains no newlines
8125 Parsoid: Test of whitespace serialization with Templated bullets
8132 <li> </li><li about="#mwt1" typeof="mw:Transclusion" data-mw='{"parts":[{"template":{"target":{"wt":"bullet","href":"./Template:Bullet"},"params":{},"i":0}}]}'> Bar</li>
8136 # ------------------------------------------------------------------------
8137 # The next set of tests are about Parsoid's ability to handle badly nested
8138 # tags (parse, minimize scope of fixup, and roundtrip back)
8139 # ------------------------------------------------------------------------
8142 Unbalanced closing block tags break a list
8143 (php parser relies on Tidy to fix up)
8161 # Parsoid fails this test, but it might be tricky to support properly.
8164 Unbalanced closing non-block tags don't break a list
8165 (php parser relies on Tidy to fix up)
8172 <li><span>a</span></li>
8173 <li><span>b</span></li>
8187 Unclosed formatting tags that straddle lists are closed and reopened
8188 (php parser relies on Tidy to fix up)
8190 parsoid=wt2html,wt2wt,html2html
8200 <ol><li> <s> a</s></li>
8201 <li><s> b </s></li></ol>
8204 # Parsoid fails this test, but it might be tricky to support properly.
8207 List embedded in a non-block tag
8208 (Ugly Parsoid output -- worth fixing; PHP parser relies on Tidy)
8215 <li><small>foo</small></li>
8225 # This is a bug in the PHP parser + tidy combination.
8226 # (The </tr> tag gets parsed as text and html-escaped by PHP,
8227 # and then fostered out of the table by tidy.)
8228 # We believe the Parsoid output to be correct.
8230 Table with missing opening <tr> tag
8232 parsoid=wt2html,wt2wt
8257 # Note that the current date is hard-coded as
8258 # 1970-01-01T00:02:03Z (a Thursday)
8259 # when running parser tests. The timezone is also fixed to GMT, so
8260 # local date will be identical to current date.
8263 Magic Word: {{CURRENTDAY}}
8272 Magic Word: {{CURRENTDAY2}}
8281 Magic Word: {{CURRENTDAYNAME}}
8290 Magic Word: {{CURRENTDOW}}
8299 Magic Word: {{CURRENTMONTH}}
8308 Magic Word: {{CURRENTMONTH1}}
8317 Magic Word: {{CURRENTMONTHABBREV}}
8319 {{CURRENTMONTHABBREV}}
8326 Magic Word: {{CURRENTMONTHNAME}}
8328 {{CURRENTMONTHNAME}}
8335 Magic Word: {{CURRENTMONTHNAMEGEN}}
8337 {{CURRENTMONTHNAMEGEN}}
8344 Magic Word: {{CURRENTTIME}}
8353 Magic Word: {{CURRENTHOUR}}
8362 Magic Word: {{CURRENTWEEK}} (@bug 4594)
8371 Magic Word: {{CURRENTYEAR}}
8380 Magic Word: {{CURRENTTIMESTAMP}}
8382 {{CURRENTTIMESTAMP}}
8389 Magic Words LOCAL (UTC)
8393 * {{LOCALMONTHNAME}}
8394 * {{LOCALMONTHNAMEGEN}}
8395 * {{LOCALMONTHABBREV}}
8404 * {{LOCALTIMESTAMP}}
8419 <li> 19700101000203</li></ul>
8424 Magic Word: {{FULLPAGENAME}}
8426 title=[[User:Ævar Arnfjörð Bjarmason]]
8430 <p>User:Ævar Arnfjörð Bjarmason
8435 Magic Word: {{FULLPAGENAMEE}}
8437 title=[[User:Ævar Arnfjörð Bjarmason]]
8441 <p>User:%C3%86var_Arnfj%C3%B6r%C3%B0_Bjarmason
8446 Magic Word: {{TALKSPACE}}
8448 title=[[User:Ævar Arnfjörð Bjarmason]]
8457 Magic Word: {{TALKSPACE}}, same namespace
8459 title=[[User talk:Ævar Arnfjörð Bjarmason]]
8468 Magic Word: {{TALKSPACE}}, main namespace
8470 title=[[Parser Test]]
8479 Magic Word: {{TALKSPACEE}}
8481 title=[[User:Ævar Arnfjörð Bjarmason]]
8490 Magic Word: {{SUBJECTSPACE}}
8492 title=[[User talk:Ævar Arnfjörð Bjarmason]]
8501 Magic Word: {{SUBJECTSPACE}}, same namespace
8503 title=[[User:Ævar Arnfjörð Bjarmason]]
8512 Magic Word: {{SUBJECTSPACE}}, main namespace
8514 title=[[Parser Test]]
8522 Magic Word: {{SUBJECTSPACEE}}
8524 title=[[User talk:Ævar Arnfjörð Bjarmason]]
8533 Magic Word: {{NAMESPACE}}
8535 title=[[User:Ævar Arnfjörð Bjarmason]]
8544 Magic Word: {{NAMESPACEE}}
8546 title=[[User:Ævar Arnfjörð Bjarmason]]
8555 Magic Word: {{NAMESPACENUMBER}}
8557 title=[[User:Ævar Arnfjörð Bjarmason]]
8566 Magic Word: {{SUBPAGENAME}}
8568 title=[[Ævar Arnfjörð Bjarmason/sub ö]] subpage
8577 Magic Word: {{SUBPAGENAMEE}}
8579 title=[[Ævar Arnfjörð Bjarmason/sub ö]] subpage
8588 Magic Word: {{ROOTPAGENAME}}
8590 title=[[Ævar Arnfjörð Bjarmason/sub/sub2]] subpage
8594 <p>Ævar Arnfjörð Bjarmason
8599 Magic Word: {{ROOTPAGENAMEE}}
8601 title=[[Ævar Arnfjörð Bjarmason/sub/sub2]] subpage
8605 <p>%C3%86var_Arnfj%C3%B6r%C3%B0_Bjarmason
8610 Magic Word: {{BASEPAGENAME}}
8612 title=[[Ævar Arnfjörð Bjarmason/sub]] subpage
8616 <p>Ævar Arnfjörð Bjarmason
8621 Magic Word: {{BASEPAGENAMEE}}
8623 title=[[Ævar Arnfjörð Bjarmason/sub]] subpage
8627 <p>%C3%86var_Arnfj%C3%B6r%C3%B0_Bjarmason
8632 Magic Word: {{TALKPAGENAME}}
8634 title=[[User:Ævar Arnfjörð Bjarmason]]
8638 <p>User talk:Ævar Arnfjörð Bjarmason
8643 Magic Word: {{TALKPAGENAMEE}}
8645 title=[[User:Ævar Arnfjörð Bjarmason]]
8649 <p>User_talk:%C3%86var_Arnfj%C3%B6r%C3%B0_Bjarmason
8654 Magic Word: {{SUBJECTPAGENAME}}
8656 title=[[User talk:Ævar Arnfjörð Bjarmason]]
8660 <p>User:Ævar Arnfjörð Bjarmason
8665 Magic Word: {{SUBJECTPAGENAMEE}}
8667 title=[[User talk:Ævar Arnfjörð Bjarmason]]
8669 {{SUBJECTPAGENAMEE}}
8671 <p>User:%C3%86var_Arnfj%C3%B6r%C3%B0_Bjarmason
8676 Magic Word: {{NUMBEROFFILES}}
8685 Magic Word: {{PAGENAME}}
8687 title=[[User:Ævar Arnfjörð Bjarmason]]
8691 <p>Ævar Arnfjörð Bjarmason
8696 Magic Word: {{PAGENAME}} with metacharacters
8698 title=[['foo & bar = baz']]
8702 <p><i>'foo & bar = baz'</i>
8705 <p><i>'foo & bar = baz'</i></p>
8709 Magic Word: {{PAGENAME}} with metacharacters (bug 26781)
8711 title=[[*RFC 1234 http://example.com/]]
8715 <p>*RFC 1234 http://example.com/
8718 <p>*RFC 1234 http://example.com/</p>
8722 Magic Word: {{PAGENAMEE}}
8724 title=[[User:Ævar Arnfjörð Bjarmason]]
8728 <p>%C3%86var_Arnfj%C3%B6r%C3%B0_Bjarmason
8733 Magic Word: {{PAGENAMEE}} with metacharacters (bug 26781)
8735 title=[[*RFC 1234 http://example.com/]]
8739 <p>*RFC_1234_http://example.com/
8742 <p>*RFC_1234_http://example.com/</p>
8746 Magic Word: {{REVISIONID}}
8755 Magic Word: {{SCRIPTPATH}}
8764 Magic Word: {{STYLEPATH}}
8773 Magic Word: {{SERVER}}
8777 <p><a rel="nofollow" class="external free" href="http://example.org">http://example.org</a>
8782 Magic Word: {{SERVERNAME}}
8791 Magic Word: {{SITENAME}}
8800 Case-sensitive magic words, when cased differently, should just be template transclusions
8807 <p><a href="/index.php?title=Template:CurrentMonth&action=edit&redlink=1" class="new" title="Template:CurrentMonth (page does not exist)">Template:CurrentMonth</a>
8808 <a href="/index.php?title=Template:Currentday&action=edit&redlink=1" class="new" title="Template:Currentday (page does not exist)">Template:Currentday</a>
8809 <a href="/index.php?title=Template:CURreNTweEK&action=edit&redlink=1" class="new" title="Template:CURreNTweEK (page does not exist)">Template:CURreNTweEK</a>
8810 <a href="/index.php?title=Template:CurrentHour&action=edit&redlink=1" class="new" title="Template:CurrentHour (page does not exist)">Template:CurrentHour</a>
8815 Case-insensitive magic words should still work with weird casing.
8825 <a rel="nofollow" class="external free" href="http://example.org">http://example.org</a>
8829 # From plwiki:PLOS_ONE
8831 Parsoid: Page property magic word with magic word contents
8835 {{DISPLAYTITLE:''{{PAGENAME}}''}}
8837 <meta property="mw:PageProp/displaytitle" content="Main Page" about="#mwt2" typeof="mw:ExpandedAttrs" data-mw='{"attribs":[[{"txt":"content"},{"html":"<i data-parsoid=\"{&quot;dsr&quot;:[15,31,2,2]}\"><span about=\"#mwt1\" typeof=\"mw:Transclusion\" data-parsoid=\"{&quot;pi&quot;:[[]],&quot;dsr&quot;:[17,29,null,null]}\" data-mw=\"{&quot;parts&quot;:[{&quot;template&quot;:{&quot;target&quot;:{&quot;wt&quot;:&quot;PAGENAME&quot;,&quot;function&quot;:&quot;pagename&quot;},&quot;params&quot;:{},&quot;i&quot;:0}}]}\">Main Page</span></i>"}]]}'/>
8841 Namespace 1 {{ns:1}}
8850 Namespace 1 {{ns:01}}
8859 Namespace 0 {{ns:0}} (bug 4783)
8867 Namespace 0 {{ns:00}} (bug 4783)
8875 Namespace -1 {{ns:-1}}
8884 Namespace User {{ns:User}}
8893 Namespace User talk {{ns:User_talk}}
8902 Namespace User talk {{ns:uSeR tAlK}}
8911 Namespace File {{ns:File}}
8920 Namespace File {{ns:Image}}
8929 Namespace (lang=de) Benutzer {{ns:User}}
8940 Namespace (lang=de) Benutzer Diskussion {{ns:3}}
8946 <p>Benutzer Diskussion
8954 {{urlencode:hi world?!}}
8955 {{urlencode:hi world?!|WIKI}}
8956 {{urlencode:hi world?!|PATH}}
8957 {{urlencode:hi world?!|QUERY}}
8967 Magic Word: prioritize type info over data-parsoid
8971 <meta property="mw:PageProp/forcetoc" data-parsoid='{"magicSrc":"__NOTOC__"}'/>
8977 Magic Word: serialize on separate line (parsoid)
8979 parsoid=wt2wt,html2wt
8985 foo<meta property="mw:PageProp/notoc"/>bar
8989 Magic Word: rt non-english wikis
8996 <meta property="mw:PageProp/noeditsection" data-parsoid='{"magicSrc":"__NOEDITSECTION__"}'/>
9003 Magic links: internal link to RFC (bug 479)
9007 <p><a href="/index.php?title=RFC_123&action=edit&redlink=1" class="new" title="RFC 123 (page does not exist)">RFC 123</a>
9012 Magic links: RFC (bug 479)
9016 <p><a class="external mw-magiclink-rfc" rel="nofollow" href="//tools.ietf.org/html/rfc822">RFC 822</a>
9021 Magic links: RFC (bug 65278)
9023 This is RFC 822 but thisRFC 822 is not RFC 822linked.
9025 <p>This is <a class="external mw-magiclink-rfc" rel="nofollow" href="//tools.ietf.org/html/rfc822">RFC 822</a> but thisRFC 822 is not RFC 822linked.
9030 Magic links: RFC (w/ non-newline whitespace, bug 28950/29025)
9032 RFC      822
9036 <p><a class="external mw-magiclink-rfc" rel="nofollow" href="//tools.ietf.org/html/rfc822">RFC 822</a>
9043 Magic links: ISBN (bug 1937)
9047 <p><a href="/wiki/Special:BookSources/0306406152" class="internal mw-magiclink-isbn">ISBN 0-306-40615-2</a>
9052 Magic links: ISBN (bug 65278)
9054 This is ISBN 978-0-316-09811-3 but thisISBN 978-0-316-09811-3 is not ISBN 978-0-316-09811-3linked.
9056 <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.
9059 <p>This is <a href="./Special:BookSources/9780316098113" rel="mw:ExtLink">ISBN 978-0-316-09811-3</a> but thisISBN 978-0-316-09811-3 is not ISBN 978-0-316-09811-3linked.</p>
9063 Magic links: ISBN (w/ non-newline whitespace, bug 28950/29025)
9065 ISBN      978 0 316 09811 3
9071 <p><a href="/wiki/Special:BookSources/9780316098113" class="internal mw-magiclink-isbn">ISBN 978 0 316 09811 3</a>
9080 Magic links: PMID incorrectly converts space to underscore
9084 <p><a class="external mw-magiclink-pmid" rel="nofollow" href="//www.ncbi.nlm.nih.gov/pubmed/1234?dopt=Abstract">PMID 1234</a>
9089 Magic links: PMID (bug 65278)
9091 This is PMID 1234 but thisPMID 1234 is not PMID 1234linked.
9093 <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.
9098 Magic links: PMID (w/ non-newline whitespace, bug 28950/29025)
9100 PMID      1234
9104 <p><a class="external mw-magiclink-pmid" rel="nofollow" href="//www.ncbi.nlm.nih.gov/pubmed/1234?dopt=Abstract">PMID 1234</a>
9115 Nonexistent template
9117 {{thistemplatedoesnotexist}}
9119 <p><a href="/index.php?title=Template:Thistemplatedoesnotexist&action=edit&redlink=1" class="new" title="Template:Thistemplatedoesnotexist (page does not exist)">Template:Thistemplatedoesnotexist</a>
9124 Template with invalid target containing tags
9126 {{a<b>b</b>|{{echo|foo}}|{{echo|a}}={{echo|b}}|a = b}}
9128 <p>{{a<b>b</b>|foo|a=b|a = b}}
9133 Template with invalid target containing unclosed tag
9135 {{a<b>|{{echo|foo}}|{{echo|a}}={{echo|b}}|a = b}}
9137 <p>{{a<b>|foo|a=b|a = b}}</b>
9142 Template with invalid target containing wikilink
9146 <p>{{<a href="/wiki/Main_Page" title="Main Page">Main Page</a>}}
9149 <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>
9153 Template with just whitespace in it, bug #68421
9157 <p><span typeof="mw:Transclusion mw:Nowiki" about="#mwt1" data-mw='{"parts":[{"template":{"target":{"wt":"echo","href":"./Template:Echo"},"params":{"1":{"wt":"{{ }}"}},"i":0}}]}'>{{ }}</span></p>
9163 This is a test template
9171 <p>This is a test template
9176 Template with explicit namespace
9180 <p>This is a test template
9188 This is a test template with parameter {{{param}}}
9194 {{paramtest|param=foo}}
9196 <p>This is a test template with parameter foo
9201 Template:paramtestnum
9207 Template unnamed parameter
9209 {{paramtestnum|Main Page|the main page}}
9211 <p><a href="/wiki/Main_Page" title="Main Page">the main page</a>
9216 Template:templatesimple
9222 Template:templateredirect
9224 #redirect [[Template:templatesimple]]
9228 Template:templateasargtestnum
9234 Template:templateasargtest
9236 {{template{{{templ}}}}}
9240 Template:templateasargtest2
9246 Template with template name as unnamed argument
9248 {{templateasargtestnum|templatesimple}}
9255 Template with template name as argument
9257 {{templateasargtest|templ=simple}}
9264 Template with template name as argument (2)
9266 {{templateasargtest2|templ=templatesimple}}
9273 Template:templateasargtestdefault
9275 {{{{{templ|templatesimple}}}}}
9285 Template with default value
9287 {{templateasargtestdefault}}
9294 Template with default value (value set)
9296 {{templateasargtestdefault|templ=templa}}
9305 {{templateredirect}}
9312 Template with argument in separate line
9314 {{ templateasargtest |
9322 Template with complex template as argument
9325 param ={{ templateasargtest |
9328 <p>This is a test template with parameter (test)
9333 Template with thumb image (with link in description)
9335 {{paramtest|param =[[Image:noimage.png|thumb|[[no link|link]] [[no link|caption]]]]}}
9337 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>
9340 <p>This is a test template with parameter</p>
9341 <div class="thumb tright">
9342 <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>
9343 <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>
9347 <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":"missing-image","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>
9351 Template:complextemplate
9353 {{{1}}} {{paramtest|
9354 param ={{{param}}}}}
9358 Template with complex arguments
9361 param ={{ templateasargtest |
9362 templ = simple }}|[[Template:complextemplate|link]]}}
9364 <p><a href="/wiki/Template:Complextemplate" title="Template:Complextemplate">link</a> This is a test template with parameter (test)
9369 BUG 553: link with two variables in a piped link
9372 |[[{{{1}}}|{{{2}}}]]
9377 <td>[[{{{1}}}|{{{2}}}]]
9383 Magic variable as template parameter
9385 {{paramtest|param={{SITENAME}}}}
9387 <p>This is a test template with parameter MediaWiki
9394 [[{{{param}}}|link]]
9398 Template parameter as link source
9400 {{linktest|param=Main Page}}
9402 <p><a href="/wiki/Main_Page" title="Main Page">link</a>
9409 including another template, {{paramtest|param={{{arg}}}}}
9413 Template passing argument to another template
9415 {{paramtest2|arg='hmm'}}
9417 <p>including another template, This is a test template with parameter 'hmm'
9428 Template as link source
9432 [[{{linktest2}}|Main Page]]
9434 [[{{linktest2}}]]Page
9436 <p><a href="/wiki/Main_Page" title="Main Page">Main Page</a>
9437 </p><p><a href="/wiki/Main_Page" title="Main Page">Main Page</a>
9438 </p><p><a href="/wiki/Main_Page" title="Main Page">Main Page</a>Page
9456 Template infinite loop
9460 <p><span class="error">Template loop detected: <a href="/wiki/Template:Loop1" title="Template:Loop1">Template:Loop1</a></span>
9465 Template from main namespace
9484 BUG 529: Template with table, not included at beginning of line
9503 BUG 523: Template shouldn't eat newline (or add an extra one before table)
9523 BUG 41: Template parameters shown as broken links
9532 Template with targets containing wikilinks
9536 {{[[{{echo|foo}}]]}}
9538 {{{{echo|[[foo}}]]}}
9540 <p>{{<a href="/wiki/Foo" title="Foo">foo</a>}}
9541 </p><p>{{<a href="/wiki/Foo" title="Foo">foo</a>}}
9549 ''None'' of '''this''' should be
9551 but rather passed unmodified
9558 # hmm, fix this or just deprecate msgnw and document its behavior?
9562 {{msgnw:MSGNW test}}
9564 <p>''None'' of '''this''' should be
9566  but rather passed unmodified
9567 {{test}}
9577 {{int:youhavenewmessages|lots of money|not!}}
9579 <p>You have lots of money (not!).
9586 Foo<noinclude>zar</noinclude><includeonly>bar</includeonly>
9590 <includeonly> and <noinclude> being included
9601 <onlyinclude>Foo</onlyinclude>bar
9605 <onlyinclude> being included
9617 <onlyinclude>Foo</onlyinclude>bar<includeonly>zar</includeonly>
9621 <onlyinclude> and <includeonly> being included
9630 <includeonly> and <noinclude> on a page
9632 Foo<noinclude>zar</noinclude><includeonly>bar</includeonly>
9639 Un-closed <noinclude>
9646 <onlyinclude> on a page
9648 <onlyinclude>Foo</onlyinclude>bar
9655 Un-closed <onlyinclude>
9662 Self-closed noinclude, includeonly, onlyinclude tags
9673 Unbalanced includeonly and noinclude tags
9677 |b</noinclude></noinclude>
9678 |c</noinclude></includeonly>
9679 |d</includeonly></includeonly>
9688 <td>c</includeonly>
9690 <td>d</includeonly></includeonly>
9696 Template:Includeonly section
9699 ==Includeonly section==
9705 Bug 6563: Edit link generation for section shown by <includeonly>
9707 {{includeonly section}}
9709 <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>
9710 <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>
9714 # Uses same input as the contents of [[Template:Includeonly section]]
9716 Bug 6563: Section extraction for section shown by <includeonly>
9721 ==Includeonly section==
9729 Bug 6563: Edit link generation for section suppressed by <includeonly>
9732 ==Includeonly section==
9736 <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>
9741 Bug 6563: Section extraction for section suppressed by <includeonly>
9746 ==Includeonly section==
9754 Un-closed <includeonly>
9761 Includes and comments at SOL
9763 <!-- comment --><noinclude><!-- comment --></noinclude><!-- comment -->== hu ==
9770 <includeonly>can have stuff</includeonly>=== here ===
9773 <h2><span class="mw-headline" id="hu">hu</span></h2>
9778 <h3><span class="mw-headline" id="here">here</span></h3>
9781 <!-- comment --><meta typeof="mw:Includes/NoInclude" data-parsoid='{"src":"<noinclude>"}'/><!-- comment --><meta typeof="mw:Includes/NoInclude/End" data-parsoid='{"src":"</noinclude>"}'/><!-- comment --><h2> hu </h2>
9783 <meta typeof="mw:Includes/NoInclude" data-parsoid='{"src":"<noinclude>"}'/>
9785 <meta typeof="mw:Includes/NoInclude/End" data-parsoid='{"src":"</noinclude>"}'/><ul><li> stuff</li>
9788 <meta typeof="mw:Includes/IncludeOnly" data-parsoid='{"src":"<includeonly>can have stuff</includeonly>"}'/><meta typeof="mw:Includes/IncludeOnly/End" data-parsoid='{"src":""}'/><h3> here </h3>
9792 # TODO: test with DOM fragment reuse!
9794 Parsoid: DOM fragment reuse
9796 parsoid=wt2wt,wt2html
9798 a{{echo|b<table></table>c}}d
9810 <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","spc":["","","",""]}]]}'>ab</p><table about="#mwt1" data-parsoid='{"stx":"html"}'></table><p about="#mwt1">cd</p>
9812 <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","spc":["","","",""]}]]}'>ab</p><span about="#mwt2">
9813 </span><table about="#mwt2" data-parsoid='{"stx":"html"}'></table><span about="#mwt2">
9814 </span><p about="#mwt2">cd</p>
9816 <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","spc":["","","",""]}]]}'>a</p><span about="#mwt3">
9818 </span><table about="#mwt3" data-parsoid='{"stx":"html"}'></table><span about="#mwt3">
9820 </span><p about="#mwt3">b</p>
9824 Parsoid: Merge double tds (bug 50603)
9833 <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>
9838 Parsoid: Merge double tds in nested transclusion content (bug 50603)
9848 <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}}]}'>
9850 <tr><td data-mw='{"parts":["|"]}'> foo</td></tr>
9856 ### <includeonly> and <noinclude> in attributes
9859 0. includeonly around the entire attribute
9861 <span <includeonly>id="v1"</includeonly><noinclude>id="v2"</noinclude>>bar</span>
9863 <p><span id="v2">bar</span>
9868 1. includeonly in html attr key
9870 <span <noinclude>id</noinclude><includeonly>about</includeonly>="foo">bar</span>
9872 <p><span id="foo">bar</span>
9877 2. includeonly in html attr value
9879 <span id="<noinclude>v1</noinclude><includeonly>v2</includeonly>">bar</span>
9880 <span id=<noinclude>"v1"</noinclude><includeonly>"v2"</includeonly>>bar</span>
9882 <p><span id="v1">bar</span>
9883 <span id="v1">bar</span>
9888 3. includeonly in part of an attr value
9890 <span style="color:<noinclude>red</noinclude><includeonly>blue</includeonly>;">bar</span>
9892 <p><span style="color:red;">bar</span>
9897 4. includeonly in table attributes
9921 ### Token Stream Patcher tests
9923 ### These tests won't always pass wt2wt and other modes because
9924 ### on serialization, the table will be output on a new line.
9925 ### For now, we are blacklisting them, and using this to test selser.
9929 1. Table tag in SOL posn. should get reparsed correctly with valid TSR
9931 parsoid=wt2html,wt2wt
9933 {{echo|}}{| width = '100%'
9937 <span typeof="mw:Transclusion" data-mw='{"parts":[{"template":{"target":{"wt":"echo","href":"./Template:Echo"},"params":{"1":{"wt":""}},"i":0}}]}'></span><table width="100%">
9938 <tbody><tr><td>foo</td></tr>
9943 2. Table tag in SOL posn. should get reparsed correctly with valid TSR
9945 parsoid=wt2html,wt2wt
9947 <includeonly>a</includeonly>{| {{{b}}}
9951 <meta typeof="mw:Includes/IncludeOnly"/><meta typeof="mw:Includes/IncludeOnly/End"/><table about="#mwt2" typeof="mw:ExpandedAttrs" data-mw='{"attribs":[[{"txt":"{{{b}}}","html":"<span about=\"#mwt1\" typeof=\"mw:Param\" data-parsoid=\"{&quot;dsr&quot;:[31,38,null,null],&quot;src&quot;:&quot;{{{b}}}&quot;}\">{{{b}}}</span>"},{"html":""}]]}' data-parsoid='{"a":{"{{{b}}}":null},"sa":{"{{{b}}}":""}}'>
9952 <tbody><tr><td>c</td></tr>
9958 ### Testing parsing of templates where a template arg
9959 ### has the same name as the template itself.
9969 Templates: Template Name/Arg clash: 1. Use of positional param
9978 Templates: Template Name/Arg clash: 2. Use of named param
9987 Templates: Template Name/Arg clash: 3. Use of named param with empty input
9996 ### Parsoid-centric tests to stress Parsoid's ability to RT them unchanged
10000 Templates: 1. Simple use
10009 Templates: 2. Inside a block tag
10011 <div>{{echo|Foo}}</div>
10012 <blockquote>{{echo|Foo}}</blockquote>
10015 <blockquote>Foo</blockquote>
10025 Templates: P-wrapping: 1a. Templates on consecutive lines
10036 Templates: P-wrapping: 1b. Templates on consecutive lines
10050 Templates: P-wrapping: 1c. Templates on consecutive lines
10053 {{echo|bar}} <div>baz</div>
10066 Templates: P-wrapping: 1d. Template preceded by comment-only line
10075 <p about="#mwt223" typeof="mw:Transclusion" data-mw='{"parts":[{"template":{"target":{"wt":"echo","href":"./Template:Echo"},"params":{"1":{"wt":"Bar"}},"i":0}}]}'>Bar</p>
10079 Templates: Inline Text: 1. Multiple template uses
10081 {{echo|Foo}}bar{{echo|baz}}
10088 Templates: Inline Text: 2. Back-to-back template uses
10090 {{echo|Foo}}{{echo|bar}}
10097 Templates: Block Tags: 1. Multiple template uses
10099 {{echo|<div>Foo</div>}}<div>bar</div>{{echo|<div>baz</div>}}
10101 <div>Foo</div><div>bar</div><div>baz</div>
10106 Templates: Block Tags: 2. Back-to-back template uses
10108 {{echo|<div>Foo</div>}}{{echo|<div>bar</div>}}
10110 <div>Foo</div><div>bar</div>
10114 # This is an edge case relating to paragraph wrapping.
10116 Templates: Correctly encapsulate templates producing </p> tag without a corresponding <p> tag
10121 <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
10126 Templates: Links: 1. Simple example
10128 {{echo|[[Foo|bar]]}}
10130 <p><a href="/wiki/Foo" title="Foo">bar</a>
10135 Templates: Links: 2. Generation of link href
10137 [[{{echo|Foo}}|bar]]
10139 <p><a href="/wiki/Foo" title="Foo">bar</a>
10144 Templates: Links: 3. Generation of part of a link href
10146 [[Fo{{echo|o}}|bar]]
10148 [[Foo{{echo|bar}}]]
10150 [[Foo{{echo|bar}}baz]]
10152 [[Foo{{echo|bar}}|bar]]
10154 [[:Foo{{echo|bar}}]]
10156 [[:Foo{{echo|bar}}|bar]]
10158 <p><a href="/wiki/Foo" title="Foo">bar</a>
10159 </p><p><a href="/index.php?title=Foobar&action=edit&redlink=1" class="new" title="Foobar (page does not exist)">Foobar</a>
10160 </p><p><a href="/index.php?title=Foobarbaz&action=edit&redlink=1" class="new" title="Foobarbaz (page does not exist)">Foobarbaz</a>
10161 </p><p><a href="/index.php?title=Foobar&action=edit&redlink=1" class="new" title="Foobar (page does not exist)">bar</a>
10162 </p><p><a href="/index.php?title=Foobar&action=edit&redlink=1" class="new" title="Foobar (page does not exist)">Foobar</a>
10163 </p><p><a href="/index.php?title=Foobar&action=edit&redlink=1" class="new" title="Foobar (page does not exist)">bar</a>
10168 Templates: Links: 4. Multiple templates generating link href
10170 [[{{echo|F}}{{echo|o}}ob{{echo|ar}}]]
10172 <p><a href="/index.php?title=Foobar&action=edit&redlink=1" class="new" title="Foobar (page does not exist)">Foobar</a>
10177 Templates: Links: 5. Generation of link text
10179 [[Foo|{{echo|bar}}]]
10181 <p><a href="/wiki/Foo" title="Foo">bar</a>
10186 Templates: Links: 5. Nested templates (only outermost template should be marked)
10188 {{echo|[[{{echo|Foo}}|bar]]}}
10190 <p><a href="/wiki/Foo" title="Foo">bar</a>
10195 Templates: HTML Tag: 1. Generation of HTML attr. key
10197 <div {{echo|style}}="color:red;">foo</div>
10199 <div style="color:red;">foo</div>
10204 Templates: HTML Tag: 2. Generation of HTML attr. value
10206 <div style={{echo|'color:red;'}}>foo</div>
10208 <div style="color:red;">foo</div>
10213 Templates: HTML Tag: 3. Generation of HTML attr key and value
10215 <div {{echo|style}}={{echo|'color:red;'}}>foo</div>
10217 <div style="color:red;">foo</div>
10222 Templates: HTML Tag: 4. Generation of starting piece of HTML attr value
10224 <div title="{{echo|This is a long title}} with just one piece templated">foo</div>
10226 <div title="This is a long title with just one piece templated">foo</div>
10231 Templates: HTML Tag: 5. Generation of middle piece of HTML attr value
10233 <div title="This is a long title with just {{echo|one piece}} templated">foo</div>
10235 <div title="This is a long title with just one piece templated">foo</div>
10240 Templates: HTML Tag: 6. Generation of end piece of HTML attr value
10242 <div title="This is a long title with just one piece {{echo|templated}}">foo</div>
10244 <div title="This is a long title with just one piece templated">foo</div>
10248 # SSS FIXME: While it is great we added support for all this,
10249 # do we want to make this part of the spec? Maybe we want to
10250 # deprecate this kind of usage in the future?
10252 Templates: HTML Tag: 7. Generation of partial attribute key string
10254 <div st{{echo|yle}}="color:red;">foo</div>
10256 <div style="color:red;">foo</div>
10261 Templates: HTML Tag: 8. Template-generated attribute (k=v)
10263 <div {{echo|1=id="v1"}}>bar</div>
10265 <div id="v1">bar</div>
10270 Templates: HTML Tag: 9. Multiple template-generated attributes
10272 <div {{echo|1=id="v1" title="foo"}}>bar</div>
10274 <div id="v1" title="foo">bar</div>
10279 Templates: Support for templates generating attributes and content
10281 {| {{mixed_attr_content_template}}
10286 <table style="color:red;" title="T48811">
10296 <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|}"]}'>
10305 Templates: HTML Tables: 1. Generating start of a HTML table
10307 {{echo|<table><tr><td>foo</td>}}</tr></table>
10309 <table><tr><td>foo</td></tr></table>
10314 Templates: HTML Tables: 2a. Generating middle of a HTML table
10316 <table><tr>{{echo|<td>foo</td>}}</tr></table>
10318 <table><tr><td>foo</td></tr></table>
10323 Templates: HTML Tables: 2b. Generating middle of a HTML table
10325 <table>{{echo|<tr><td>foo</td></tr>}}</table>
10327 <table><tr><td>foo</td></tr></table>
10332 Templates: HTML Tables: 3. Generating end of a HTML table
10334 <table><tr>{{echo|<td>foo</td></tr></table>}}
10336 <table><tr><td>foo</td></tr></table>
10341 Templates: HTML Tables: 4a. Generating a single tag of a HTML table
10343 {{echo|<table>}}<tr><td>foo</td></tr></table>
10345 <table><tr><td>foo</td></tr></table>
10350 Templates: HTML Tables: 4b. Generating a single tag of a HTML table
10352 <table>{{echo|<tr>}}<td>foo</td></tr></table>
10354 <table><tr><td>foo</td></tr></table>
10359 Templates: HTML Tables: 4c. Generating a single tag of a HTML table
10361 <table><tr>{{echo|<td>}}foo</td></tr></table>
10363 <table><tr><td>foo</td></tr></table>
10368 Templates: HTML Tables: 4d. Generating a single tag of a HTML table
10370 <table><tr><td>foo{{echo|</td>}}</tr></table>
10372 <table><tr><td>foo</td></tr></table>
10377 Templates: HTML Tables: 4e. Generating a single tag of a HTML table
10379 <table><tr><td>foo</td>{{echo|</tr>}}</table>
10381 <table><tr><td>foo</td></tr></table>
10386 Templates: HTML Tables: 4f. Generating a single tag of a HTML table
10388 <table><tr><td>foo</td></tr>{{echo|</table>}}
10390 <table><tr><td>foo</td></tr></table>
10395 Templates: HTML Tables: 5. Proper fostering of categories from inside
10397 parsoid=wt2html,wt2wt
10399 <table>[[Category:foo1]]<tr><td>foo</td></tr></table>
10400 <!--Two categories (Bug 50330)-->
10401 <table>[[Category:bar1]][[Category:bar2]]<tr><td>foo</td></tr></table>
10403 <link rel="mw:PageProp/Category" href="./Category:Foo1"><table><tbody><tr><td>foo</td></tr></tbody></table>
10404 <!--Two categories (Bug 50330)-->
10405 <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>
10409 Templates: Wiki Tables: 1a. Fostering of entire template content
10417 <tr><td></td></tr></table>
10429 Templates: Wiki Tables: 1b. Fostering of entire template content
10442 <tr><td></td></tr></table>
10456 Templates: Wiki Tables: 2. Fostering of partial template content
10466 <tr><td></td></tr></table>
10479 Templates: Wiki Tables: 3. td-content via multiple templates
10482 {{echo|{{pipe}}a}}{{echo|b}}
10493 Templates: Wiki Tables: 4. Templated tags, no content
10499 <tr><td></td></tr></table>
10504 Templates: Wiki Tables: 5. Templated tags, regular td-tags
10518 Templates: Wiki Tables: 6. Templated tags, templated td-tags
10532 Templates: Lists: Multi-line list-items via templates
10534 *{{echo|a {{nonexistent|
10536 *{{echo|b {{nonexistent|
10539 <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>
10540 <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>
10545 Templates: Ugly nesting: 1. Quotes opened/closed across templates (echo)
10547 {{echo|''a}}{{echo|b''c''d}}{{echo|''e}}
10549 <p><i>ab</i>c<i>d</i>e
10554 Templates: Ugly nesting: 2. Quotes opened/closed across templates (echo_with_span)
10555 (PHP parser generates misnested html)
10557 {{echo_with_span|''a}}{{echo_with_span|b''c''d}}{{echo_with_span|''e}}
10559 <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>
10563 Templates: Ugly nesting: 3. Quotes opened/closed across templates (echo_with_div)
10564 (PHP parser generates misnested html; Parsoid html2wt mode adds newlines between {{echo}}s)
10566 parsoid=wt2html,wt2wt
10568 {{echo_with_div|''a}}{{echo_with_div|b''c''d}}{{echo_with_div|''e}}
10570 <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>
10571 <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>
10572 <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>
10576 Templates: Ugly nesting: 4. Divs opened/closed across templates
10578 a<div>b{{echo|c</div>d}}e
10589 Templates: Ugly templates: 1. Navbox template parses badly leading to table misnesting
10595 |{{echo|foo</table>}}
10599 <table about="#mwt1" typeof="mw:Transclusion" data-mw='{"parts":["{|\n|",{"template":{"target":{"wt":"echo","href":"./Template:Echo"},"params":{"1":{"wt":"foo</table>"}},"i":0}},"\n|bar\n|}"]}'>
10603 <td>foo</td></tr></tbody></table><span about="#mwt1">
10604 </span><span about="#mwt1">|bar</span><span about="#mwt1">
10609 Templates: Ugly templates: 2. Navbox template parses badly leading to table misnesting
10619 <td>1. {{echo|foo </table>}}</td>
10621 <td>2. {{echo|baz </table>}}</td>
10634 <table about="#mwt2" typeof="mw:Transclusion" data-mw='{"parts":["<table>\n <tr>\n <td>\n <table>\n <tr>\n <td>1. ",{"template":{"target":{"wt":"echo","href":"./Template:Echo"},"params":{"1":{"wt":"foo </table>"}},"i":0}},"</td>\n <td> bar </td>\n <td>2. ",{"template":{"target":{"wt":"echo","href":"./Template:Echo"},"params":{"1":{"wt":"baz </table>"}},"i":1}},"</td>\n </tr>\n <tr>\n <td>abc</td>\n </tr>\n </table>\n </td>\n </tr>\n <tr>\n <td>xyz</td>\n </tr>\n</table>"]}'>
10639 <td>1. foo </td></tr></tbody></table></td>
10641 <td>2. baz </td></tr></tbody></table><span about="#mwt2">
10642 </span><span about="#mwt2">
10643 </span><span about="#mwt2">
10644 </span><span about="#mwt2">abc</span><span about="#mwt2">
10645 </span><span about="#mwt2">
10646 </span><span about="#mwt2">
10647 </span><span about="#mwt2">
10648 </span><span about="#mwt2">
10649 </span><span about="#mwt2">
10650 </span><span about="#mwt2">xyz</span><span about="#mwt2">
10651 </span><span about="#mwt2">
10656 Templates: Ugly templates: 3. newline-only template parameter
10665 # This looks like a bug: a single newline triggers p/br for some reason.
10667 Templates: Ugly templates: 4. newline-only template parameter inconsistency
10676 # Bug 64017 -- ugly wikitext with fostered content generates two template ranges that
10677 # have a true overlap (T1-start - T2-start - T1-end - T2-end).
10679 Templates: Ugly templates: 5. Template encapsulation test: Non-trivial overlap of template ranges is properly handled
10685 <div about="#mwt1" typeof="mw:Transclusion" 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}}]}' data-parsoid='{"stx":"html","autoInsertedEnd":true,"pi":[[{"k":"1","spc":["","","",""]}],[{"k":"1","spc":["","","",""]}],[{"k":"1","spc":["","","",""]}]]}'>foo
10686 </div><table about="#mwt1" data-parsoid='{"stx":"html"}'>
10690 # Bug 64017 -- ugly wikitext with fostered content generates two template ranges
10691 # that are "identical" and generate nesting cycles in the algorithm
10693 Templates: Ugly templates: 6. Template encapsulation test: Cyclical nesting of template ranges is properly handled
10695 {{echo|<table><tr><td><table>}}
10699 <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","spc":["","","",""]}],[{"k":"1","spc":["","","",""]}],[{"k":"1","spc":["","","",""]}]]}'><tbody><tr data-parsoid='{"stx":"html"}'><td data-parsoid='{"stx":"html"}'><div data-parsoid='{"stx":"html"}'>
10700 </div><table about="#mwt1" data-parsoid='{"stx":"html"}'>
10701 </table></td></tr></tbody></table>
10705 Parser Functions: 1. Simple example
10714 Parser Functions: 2. Nested use (only outermost should be marked up)
10723 ### Pre-save transform tests
10726 pre-save transform: subst:
10732 This is a test template
10736 pre-save transform: normal template
10746 pre-save transform: nonexistent template
10750 {{thistemplatedoesnotexist}}
10752 {{thistemplatedoesnotexist}}
10757 pre-save transform: subst magic variables
10766 # This is bug 89, which I fixed. -- wtm
10768 pre-save transform: subst: templates with parameters
10772 {{subst:paramtest|param="something else"}}
10774 This is a test template with parameter "something else"
10778 Template:nowikitest
10780 <nowiki>'''not wiki'''</nowiki>
10784 pre-save transform: nowiki in subst (bug 1188)
10788 {{subst:nowikitest}}
10790 <nowiki>'''not wiki'''</nowiki>
10795 Template:commenttest
10797 This template has <!-- a comment --> in it.
10801 pre-save transform: comment in subst (bug 1936)
10805 {{subst:commenttest}}
10807 This template has <!-- a comment --> in it.
10811 pre-save transform: unclosed tag
10815 <nowiki>'''not wiki'''
10817 <nowiki>'''not wiki'''
10821 pre-save transform: mixed tag case
10825 <NOwiki>'''not wiki'''</noWIKI>
10827 <NOwiki>'''not wiki'''</noWIKI>
10831 pre-save transform: unclosed comment in <nowiki>
10835 wiki<nowiki>nowiki<!--nowiki</nowiki>wiki
10837 wiki<nowiki>nowiki<!--nowiki</nowiki>wiki
10840 # Leading @ in this template definition works around a limitation
10841 # in parsoid's parserTests which otherwise strips the <span> from the
10842 # result (confusing it for a template wrapper)
10846 @<span onmouseover="alert('crap')">Oh no</span>
10850 (confirming safety of fix for subst bug 1936)
10852 {{Template:dangerous}}
10854 <p>@<span>Oh no</span>
10859 pre-save transform: comment containing gallery (bug 5024)
10863 <!-- <gallery>data</gallery> -->
10865 <!-- <gallery>data</gallery> -->
10869 pre-save transform: comment containing extension
10873 <!-- <tag>data</tag> -->
10875 <!-- <tag>data</tag> -->
10879 pre-save transform: comment containing nowiki
10883 <!-- <nowiki>data</nowiki> -->
10885 <!-- <nowiki>data</nowiki> -->
10889 pre-save transform: <noinclude> in subst (bug 3298)
10899 pre-save transform: <onlyinclude> in subst (bug 3298)
10903 {{subst:Includes2}}
10911 {{<includeonly>subst:</includeonly>Includes}}
10915 Template:SafeSubstTest
10917 {{<includeonly>safesubst:</includeonly>Includes}}
10921 bug 22297: safesubst: works during PST
10925 {{subst:SafeSubstTest}}{{safesubst:SubstTest}}
10931 bug 22297: safesubst: works during normal parse
10940 subst: does not work during normal parse
10944 <p>{{subst:Includes}}
10949 pre-save transform: context links ("pipe trick")
10953 [[Article (context)|]]
10956 [[Bar:Article (context)|]]
10957 [[:Bar:Article (context)|]]
10959 [[|Article (context)]]
10963 [[Article (context)|Article]]
10964 [[Bar:Article|Article]]
10965 [[:Bar:Article|Article]]
10966 [[Bar:Article (context)|Article]]
10967 [[:Bar:Article (context)|Article]]
10969 [[Article (context)]]
10970 [[Bar:X (Y) Z|X (Y) Z]]
10971 [[:Bar:X (Y) Z|X (Y) Z]]
10975 pre-save transform: context links ("pipe trick") with interwiki prefix
10979 [[interwiki:Article|]]
10980 [[:interwiki:Article|]]
10981 [[interwiki:Bar:Article|]]
10982 [[:interwiki:Bar:Article|]]
10984 [[interwiki:Article|Article]]
10985 [[:interwiki:Article|Article]]
10986 [[interwiki:Bar:Article|Bar:Article]]
10987 [[:interwiki:Bar:Article|Bar:Article]]
10991 pre-save transform: context links ("pipe trick") with parens in title
10993 pst title=[[Somearticle (context)]]
10997 [[Article (context)|Article]]
11001 pre-save transform: context links ("pipe trick") with comma in title
11003 pst title=[[Someplace, Somewhere]]
11006 [[Otherplace, Elsewhere|]]
11007 [[Otherplace, Elsewhere, Anywhere|]]
11009 [[Otherplace, Somewhere|Otherplace]]
11010 [[Otherplace, Elsewhere|Otherplace]]
11011 [[Otherplace, Elsewhere, Anywhere|Otherplace]]
11015 pre-save transform: context links ("pipe trick") with parens and comma
11017 pst title=[[Someplace (IGNORED), Somewhere]]
11020 [[Otherplace (place), Elsewhere|]]
11022 [[Otherplace, Somewhere|Otherplace]]
11023 [[Otherplace (place), Elsewhere|Otherplace]]
11027 pre-save transform: context links ("pipe trick") with comma and parens
11029 pst title=[[Who, me? (context)]]
11032 [[Me, Myself, and I (1937 song)|]]
11034 [[Yes, you. (context)|Yes, you.]]
11035 [[Me, Myself, and I (1937 song)|Me, Myself, and I]]
11039 pre-save transform: context links ("pipe trick") with namespace
11041 pst title=[[Ns:Somearticle]]
11045 [[Ns:Article|Article]]
11049 pre-save transform: context links ("pipe trick") with namespace and parens
11051 pst title=[[Ns:Somearticle (context)]]
11055 [[Ns:Article (context)|Article]]
11059 pre-save transform: context links ("pipe trick") with namespace and comma
11061 pst title=[[Ns:Somearticle, Context, Whatever]]
11065 [[Ns:Article, Context, Whatever|Article]]
11069 pre-save transform: context links ("pipe trick") with namespace, comma and parens
11071 pst title=[[Ns:Somearticle, Context (context)]]
11075 [[Ns:Article (context)|Article]]
11079 pre-save transform: context links ("pipe trick") with namespace, parens and comma
11081 pst title=[[Ns:Somearticle (IGNORED), Context]]
11085 [[Ns:Article, Context|Article]]
11089 pre-save transform: context links ("pipe trick") with full-width parens and no space (Japanese and Chinese style, bug 30149)
11093 [[Article(context)|]]
11094 [[Bar:Article(context)|]]
11095 [[:Bar:Article(context)|]]
11096 [[|Article(context)]]
11100 [[Article(context)|Article]]
11101 [[Bar:Article(context)|Article]]
11102 [[:Bar:Article(context)|Article]]
11103 [[Article(context)]]
11104 [[Bar:X(Y)Z|X(Y)Z]]
11105 [[:Bar:X(Y)Z|X(Y)Z]]
11109 pre-save transform: context links ("pipe trick") with full-width parens and space (Japanese and Chinese style, bug 30149)
11113 [[Article (context)|]]
11114 [[Bar:Article (context)|]]
11115 [[:Bar:Article (context)|]]
11116 [[|Article (context)]]
11120 [[Article (context)|Article]]
11121 [[Bar:Article (context)|Article]]
11122 [[:Bar:Article (context)|Article]]
11123 [[Article (context)]]
11124 [[Bar:X (Y) Z|X (Y) Z]]
11125 [[:Bar:X (Y) Z|X (Y) Z]]
11129 pre-save transform: context links ("pipe trick") with parens and no space (Korean style, bug 30149)
11133 [[Article(context)|]]
11134 [[Bar:Article(context)|]]
11135 [[:Bar:Article(context)|]]
11136 [[|Article(context)]]
11140 [[Article(context)|Article]]
11141 [[Bar:Article(context)|Article]]
11142 [[:Bar:Article(context)|Article]]
11143 [[Article(context)]]
11144 [[Bar:X(Y)Z|X(Y)Z]]
11145 [[:Bar:X(Y)Z|X(Y)Z]]
11149 pre-save transform: context links ("pipe trick") with commas (bug 21660)
11153 [[Article (context), context|]]
11154 [[Article (context),context|]]
11155 [[Bar:Article (context), context|]]
11156 [[Bar:Article (context),context|]]
11157 [[:Bar:Article (context), context|]]
11158 [[:Bar:Article (context),context|]]
11160 [[Article (context), context|Article]]
11161 [[Article (context),context|Article]]
11162 [[Bar:Article (context), context|Article]]
11163 [[Bar:Article (context),context|Article]]
11164 [[:Bar:Article (context), context|Article]]
11165 [[:Bar:Article (context),context|Article]]
11169 pre-save transform: trim trailing empty lines
11173 Empty lines are trimmed
11179 Empty lines are trimmed
11183 pre-save transform: Signature expansion
11188 * <noinclude>~~~</noinclude>
11189 * <includeonly>~~~</includeonly>
11190 * <onlyinclude>~~~</onlyinclude>
11192 * [[Special:Contributions/127.0.0.1|127.0.0.1]]
11193 * <noinclude>[[Special:Contributions/127.0.0.1|127.0.0.1]]</noinclude>
11194 * <includeonly>[[Special:Contributions/127.0.0.1|127.0.0.1]]</includeonly>
11195 * <onlyinclude>[[Special:Contributions/127.0.0.1|127.0.0.1]]</onlyinclude>
11200 pre-save transform: Signature expansion in nowiki tags (bug 93)
11206 <nowiki>~~~~</nowiki>
11208 <includeonly><nowiki>~~~~</nowiki></includeonly>
11210 <noinclude><nowiki>~~~~</nowiki></noinclude>
11212 <onlyinclude><nowiki>~~~~</nowiki></onlyinclude>
11214 {{subst:Foo}} shall be converted to FOO
11216 As well as inside noinclude/onlyinclude
11217 <noinclude>{{subst:Foo}}</noinclude>
11218 <onlyinclude>{{subst:Foo}}</onlyinclude>
11220 But not inside includeonly
11221 <includeonly>{{subst:Foo}}</includeonly>
11225 <nowiki>~~~~</nowiki>
11227 <includeonly><nowiki>~~~~</nowiki></includeonly>
11229 <noinclude><nowiki>~~~~</nowiki></noinclude>
11231 <onlyinclude><nowiki>~~~~</nowiki></onlyinclude>
11233 FOO shall be converted to FOO
11235 As well as inside noinclude/onlyinclude
11236 <noinclude>FOO</noinclude>
11237 <onlyinclude>FOO</onlyinclude>
11239 But not inside includeonly
11240 <includeonly>{{subst:Foo}}</includeonly>
11244 Parsoid: Recognize nowiki with trailing space in tags
11248 <nowiki ><div>[[foo]]</nowiki >
11256 <p><span typeof="mw:Nowiki"><div>[[foo]]</span></p>
11263 Parsoid: Recognize nowiki with odd capitalization
11267 <noWikI ><div>[[foo]]</Nowiki >
11269 <p><span typeof="mw:Nowiki"><div>[[foo]]</span></p>
11274 Parsoid: Escape nowiki with trailing space in tags
11278 <p><nowiki > foo </nowiki ></p>
11279 <p>a<nowiki />b</p>
11280 <p>c<nowiki/ >d</p>
11282 <nowiki > foo </nowiki >
11290 Parsoid: Escape weird noWikI capitalizations
11294 <p><noWikI > foo </NoWikI ></p>
11296 <noWikI > foo </NoWikI >
11300 ### Message transform tests
11303 message transform: magic variables
11313 message transform: should not transform wiki markup
11323 message transform: <noinclude> in transcluded template (bug 4926)
11333 message transform: <onlyinclude> in transcluded template (bug 4926)
11343 {{#special:}} page name, known
11347 {{#special:Recentchanges}}
11349 Special:RecentChanges
11353 {{#special:}} page name with subpage, known
11357 {{#special:Recentchanges/param}}
11359 Special:RecentChanges/param
11363 {{#special:}} page name, unknown
11367 {{#special:foobar nonexistent}}
11369 Special:Foobar nonexistent
11373 {{#speciale:}} page name, known
11377 {{#speciale:Recentchanges}}
11379 Special:RecentChanges
11383 {{#speciale:}} page name with subpage, known
11387 {{#speciale:Recentchanges/param}}
11389 Special:RecentChanges/param
11393 {{#speciale:}} page name, unknown
11397 {{#speciale:foobar nonexistent}}
11399 Special:Foobar_nonexistent
11405 ### For Parsoid-specific tests, see
11406 #### https://www.mediawiki.org/wiki/Parsoid/MediaWiki_DOM_spec#Images
11411 parsoid=wt2html,wt2wt,html2html
11413 [[Image:foobar.jpg]]
11415 <p><a href="/wiki/File:Foobar.jpg" class="image"><img alt="Foobar.jpg" src="http://example.com/images/3/3a/Foobar.jpg" width="1941" height="220" /></a>
11418 <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" height="220" width="1941"></a></span></p>
11422 Simple image (using File: namespace, now canonical)
11424 [[File:Foobar.jpg]]
11426 <p><a href="/wiki/File:Foobar.jpg" class="image"><img alt="Foobar.jpg" src="http://example.com/images/3/3a/Foobar.jpg" width="1941" height="220" /></a>
11429 <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" height="220" width="1941"></a></span></p>
11433 Right-aligned image
11435 [[File:Foobar.jpg|right]]
11437 <div class="floatright"><a href="/wiki/File:Foobar.jpg" class="image"><img alt="Foobar.jpg" src="http://example.com/images/3/3a/Foobar.jpg" width="1941" height="220" /></a></div>
11440 <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" height="220" width="1941"></a></figure>
11446 [[File:Foobar.jpg|right|Caption text]]
11448 <div class="floatright"><a href="/wiki/File:Foobar.jpg" class="image" title="Caption text"><img alt="Caption text" src="http://example.com/images/3/3a/Foobar.jpg" width="1941" height="220" /></a></div>
11451 <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" height="220" width="1941"></a><figcaption>Caption text</figcaption></figure>
11455 Image with caption, bug 53312 #1
11457 [[File:Foobar.jpg|right|Caption page stuff]]
11459 <div class="floatright"><a href="/wiki/File:Foobar.jpg" class="image" title="Caption page stuff"><img alt="Caption page stuff" src="http://example.com/images/3/3a/Foobar.jpg" width="1941" height="220" /></a></div>
11462 <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" height="220" width="1941"></a><figcaption>Caption page stuff</figcaption></figure>
11466 Image with caption, bug 53312 #2
11468 [[File:Foobar.jpg|right|Caption page=]]
11470 <div class="floatright"><a href="/wiki/File:Foobar.jpg" class="image" title="Caption page="><img alt="Caption page=" src="http://example.com/images/3/3a/Foobar.jpg" width="1941" height="220" /></a></div>
11473 <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" height="220" width="1941"></a><figcaption>Caption page=</figcaption></figure>
11477 Image with caption, bug 53312 #3
11479 [[File:Foobar.jpg|right|Caption page=stuff]]
11481 <div class="floatright"><a href="/wiki/File:Foobar.jpg" class="image" title="Caption page=stuff"><img alt="Caption page=stuff" src="http://example.com/images/3/3a/Foobar.jpg" width="1941" height="220" /></a></div>
11484 <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" height="220" width="1941"></a><figcaption>Caption page=stuff</figcaption></figure>
11488 Allow empty links in image captions (Bug 60753)
11492 [[File:Foobar.jpg|thumb|Caption [[Link1]]
11497 <div class="thumb tright"><div class="thumbinner" style="width:222px;"><a href="/wiki/File:Foobar.jpg" class="image"><img alt="" src="http://example.com/images/thumb/3/3a/Foobar.jpg/220px-Foobar.jpg" width="220" height="25" class="thumbimage" srcset="http://example.com/images/thumb/3/3a/Foobar.jpg/330px-Foobar.jpg 1.5x, http://example.com/images/thumb/3/3a/Foobar.jpg/440px-Foobar.jpg 2x" /></a> <div class="thumbcaption"><div class="magnify"><a href="/wiki/File:Foobar.jpg" class="internal" title="Enlarge"></a></div>Caption <a href="/index.php?title=Link1&action=edit&redlink=1" class="new" title="Link1 (page does not exist)">Link1</a> [[]] <a href="/index.php?title=Link2&action=edit&redlink=1" class="new" title="Link2 (page does not exist)">Link2</a></div></div></div>
11500 <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" 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>
11502 <a rel="mw:WikiLink" href="./Link2" title="Link2" data-parsoid='{"stx":"simple","a":{"href":"./Link2"},"sa":{"href":"Link2"}}'>Link2</a>
11503 </figcaption></figure>
11507 Titles in unlinked images (T23454)
11509 [[File:Foobar.jpg|link=|stuff]]
11511 <p><img alt="stuff" src="http://example.com/images/3/3a/Foobar.jpg" title="stuff" width="1941" height="220" />
11516 Link with empty target
11525 Image with link trail
11527 Linktrails should not work for images: [[File:Foobar.jpg]]s
11529 <p>Linktrails should not work for images: <a href="/wiki/File:Foobar.jpg" class="image"><img alt="Foobar.jpg" src="http://example.com/images/3/3a/Foobar.jpg" width="1941" height="220" /></a>s
11532 <p>Linktrails should not work for images: <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" height="220" width="1941"/></a></span>s</p>
11536 Image with empty attribute
11538 parsoid=wt2html,wt2wt,html2html
11540 [[File:Foobar.jpg|right||Caption text]]
11542 <div class="floatright"><a href="/wiki/File:Foobar.jpg" class="image" title="Caption text"><img alt="Caption text" src="http://example.com/images/3/3a/Foobar.jpg" width="1941" height="220" /></a></div>
11545 <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" height="220" width="1941"></a><figcaption>Caption text</figcaption></figure>
11549 1. Block image with individual attributes from templates
11551 [[File:Foobar.jpg|thumb|{{echo|137px}}|This is a caption]]
11553 <div class="thumb tright"><div class="thumbinner" style="width:139px;"><a href="/wiki/File:Foobar.jpg" class="image"><img alt="" src="http://example.com/images/thumb/3/3a/Foobar.jpg/137px-Foobar.jpg" width="137" height="16" class="thumbimage" srcset="http://example.com/images/thumb/3/3a/Foobar.jpg/206px-Foobar.jpg 1.5x, http://example.com/images/thumb/3/3a/Foobar.jpg/274px-Foobar.jpg 2x" /></a> <div class="thumbcaption"><div class="magnify"><a href="/wiki/File:Foobar.jpg" class="internal" title="Enlarge"></a></div>This is a caption</div></div></div>
11556 <figure typeof="mw:Image/Thumb mw:ExpandedAttrs" about="#mwt2" data-mw='{"attribs":[["thumbnail",{"html":"thumb"}],["width",{"html":"<span about=\"#mwt1\" typeof=\"mw:Transclusion\" data-parsoid=\"{&quot;pi&quot;:[[{&quot;k&quot;:&quot;1&quot;,&quot;spc&quot;:[&quot;&quot;,&quot;&quot;,&quot;&quot;,&quot;&quot;]}]],&quot;dsr&quot;:[24,38,null,null]}\" data-mw=\"{&quot;parts&quot;:[{&quot;template&quot;:{&quot;target&quot;:{&quot;wt&quot;:&quot;echo&quot;,&quot;href&quot;:&quot;./Template:Echo&quot;},&quot;params&quot;:{&quot;1&quot;:{&quot;wt&quot;:&quot;137px&quot;}},&quot;i&quot;:0}}]}\">137px</span>"}]]}'><a href="./File:Foobar.jpg"><img resource="./File:Foobar.jpg" src="//example.com/images/thumb/3/3a/Foobar.jpg/137px-Foobar.jpg" height="16" width="137"/></a><figcaption>This is a caption</figcaption></figure>
11560 2. Block Image with individual attributes from templates
11562 [[File:Foobar.jpg|{{echo|thumb}}|{{echo|137px}}|This is a caption]]
11564 <div class="thumb tright"><div class="thumbinner" style="width:139px;"><a href="/wiki/File:Foobar.jpg" class="image"><img alt="" src="http://example.com/images/thumb/3/3a/Foobar.jpg/137px-Foobar.jpg" width="137" height="16" class="thumbimage" srcset="http://example.com/images/thumb/3/3a/Foobar.jpg/206px-Foobar.jpg 1.5x, http://example.com/images/thumb/3/3a/Foobar.jpg/274px-Foobar.jpg 2x" /></a> <div class="thumbcaption"><div class="magnify"><a href="/wiki/File:Foobar.jpg" class="internal" title="Enlarge"></a></div>This is a caption</div></div></div>
11567 <figure typeof="mw:Image/Thumb mw:ExpandedAttrs" about="#mwt3" data-mw='{"attribs":[["thumbnail",{"html":"<span about=\"#mwt1\" typeof=\"mw:Transclusion\" data-parsoid=\"{&quot;pi&quot;:[[{&quot;k&quot;:&quot;1&quot;,&quot;spc&quot;:[&quot;&quot;,&quot;&quot;,&quot;&quot;,&quot;&quot;]}]],&quot;dsr&quot;:[18,32,null,null]}\" data-mw=\"{&quot;parts&quot;:[{&quot;template&quot;:{&quot;target&quot;:{&quot;wt&quot;:&quot;echo&quot;,&quot;href&quot;:&quot;./Template:Echo&quot;},&quot;params&quot;:{&quot;1&quot;:{&quot;wt&quot;:&quot;thumb&quot;}},&quot;i&quot;:0}}]}\">thumb</span>"}],["width",{"html":"<span about=\"#mwt2\" typeof=\"mw:Transclusion\" data-parsoid=\"{&quot;pi&quot;:[[{&quot;k&quot;:&quot;1&quot;,&quot;spc&quot;:[&quot;&quot;,&quot;&quot;,&quot;&quot;,&quot;&quot;]}]],&quot;dsr&quot;:[33,47,null,null]}\" data-mw=\"{&quot;parts&quot;:[{&quot;template&quot;:{&quot;target&quot;:{&quot;wt&quot;:&quot;echo&quot;,&quot;href&quot;:&quot;./Template:Echo&quot;},&quot;params&quot;:{&quot;1&quot;:{&quot;wt&quot;:&quot;137px&quot;}},&quot;i&quot;:0}}]}\">137px</span>"}]]}'><a href="./File:Foobar.jpg"><img resource="./File:Foobar.jpg" src="//example.com/images/thumb/3/3a/Foobar.jpg/137px-Foobar.jpg" height="16" width="137"/></a><figcaption>This is a caption</figcaption></figure>
11571 3. Inline image with individual attributes from templates
11573 [[File:Foobar.jpg|{{echo|50px}}]]
11575 <p><a href="/wiki/File:Foobar.jpg" class="image"><img alt="Foobar.jpg" src="http://example.com/images/thumb/3/3a/Foobar.jpg/50px-Foobar.jpg" width="50" height="6" srcset="http://example.com/images/thumb/3/3a/Foobar.jpg/75px-Foobar.jpg 1.5x, http://example.com/images/thumb/3/3a/Foobar.jpg/100px-Foobar.jpg 2x" /></a>
11578 <p><span 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=\"{&quot;pi&quot;:[[{&quot;k&quot;:&quot;1&quot;,&quot;spc&quot;:[&quot;&quot;,&quot;&quot;,&quot;&quot;,&quot;&quot;]}]],&quot;dsr&quot;:[18,31,null,null]}\" data-mw=\"{&quot;parts&quot;:[{&quot;template&quot;:{&quot;target&quot;:{&quot;wt&quot;:&quot;echo&quot;,&quot;href&quot;:&quot;./Template:Echo&quot;},&quot;params&quot;:{&quot;1&quot;:{&quot;wt&quot;:&quot;50px&quot;}},&quot;i&quot;: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" height="6" width="50"/></a></span></p>
11581 ## Parsoid does not provide editing support for images where templates produce multiple image attributes.
11582 ## To signal this, we add a 'mw:Placeholder' type to such images. This could change in the future.
11584 Image with multiple attributes from the same template
11586 [[File:Foobar.jpg|{{image_attribs}}]]
11588 <div class="floatright"><a href="/wiki/File:Foobar.jpg" class="image" title="Caption text"><img alt="Caption text" src="http://example.com/images/3/3a/Foobar.jpg" width="1941" height="220" /></a></div>
11591 <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" height="220" width="1941"></a><figcaption>Caption text</figcaption></figure>
11595 Image with link tails
11599 123[[File:Foobar.jpg]]456
11600 123[[File:Foobar.jpg|right]]456
11601 123[[File:Foobar.jpg|thumb]]456
11603 <p>123<a href="/wiki/File:Foobar.jpg" class="image"><img alt="Foobar.jpg" src="http://example.com/images/3/3a/Foobar.jpg" width="1941" height="220" /></a>456
11605 123<div class="floatright"><a href="/wiki/File:Foobar.jpg" class="image"><img alt="Foobar.jpg" src="http://example.com/images/3/3a/Foobar.jpg" width="1941" height="220" /></a></div>456
11606 123<div class="thumb tright"><div class="thumbinner" style="width:222px;"><a href="/wiki/File:Foobar.jpg" class="image"><img alt="Foobar.jpg" src="http://example.com/images/thumb/3/3a/Foobar.jpg/220px-Foobar.jpg" width="220" height="25" class="thumbimage" srcset="http://example.com/images/thumb/3/3a/Foobar.jpg/330px-Foobar.jpg 1.5x, http://example.com/images/thumb/3/3a/Foobar.jpg/440px-Foobar.jpg 2x" /></a> <div class="thumbcaption"><div class="magnify"><a href="/wiki/File:Foobar.jpg" class="internal" title="Enlarge"></a></div></div></div></div>456
11609 <p>123<a href="/wiki/File:Foobar.jpg" class="image"><img alt="Foobar.jpg" src="http://example.com/images/3/3a/Foobar.jpg" width="1941" height="220" /></a>456</p>
11611 <div class="floatright"><a href="/wiki/File:Foobar.jpg" class="image"><img alt="Foobar.jpg" src="http://example.com/images/3/3a/Foobar.jpg" width="1941" height="220" /></a></div>
11613 <div class="thumb tright">
11614 <div class="thumbinner" style="width:222px;"><a href="/wiki/File:Foobar.jpg" class="image"><img alt="Foobar.jpg" src="http://example.com/images/thumb/3/3a/Foobar.jpg/220px-Foobar.jpg" width="220" height="25" class="thumbimage" srcset="http://example.com/images/thumb/3/3a/Foobar.jpg/330px-Foobar.jpg 1.5x, http://example.com/images/thumb/3/3a/Foobar.jpg/440px-Foobar.jpg 2x" /></a>
11615 <div class="thumbcaption">
11616 <div class="magnify"><a href="/wiki/File:Foobar.jpg" class="internal" title="Enlarge"></a></div>
11622 <p>123<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" height="220" width="1941"></a></span>456</p>
11623 <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" height="220" width="1941"></a></figure><p>456</p>
11624 <p>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/180px-Foobar.jpg" height="25" width="220"></a></figure><p>456</p>
11628 Image with multiple captions -- only last one is accepted
11630 [[File:Foobar.jpg|right|Caption1 - ignored|[[Caption2]] - ignored|Caption3 - accepted]]
11632 <div class="floatright"><a href="/wiki/File:Foobar.jpg" class="image" title="Caption3 - accepted"><img alt="Caption3 - accepted" src="http://example.com/images/3/3a/Foobar.jpg" width="1941" height="220" /></a></div>
11635 <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" height="220" width="1941"></a><figcaption>Caption3 - accepted</figcaption></figure>
11639 Image with multiple widths -- use last
11641 [[File:Foobar.jpg|200px|300px|caption]]
11643 <p><a href="/wiki/File:Foobar.jpg" class="image" title="caption"><img alt="caption" src="http://example.com/images/thumb/3/3a/Foobar.jpg/300px-Foobar.jpg" width="300" height="34" srcset="http://example.com/images/thumb/3/3a/Foobar.jpg/450px-Foobar.jpg 1.5x, http://example.com/images/thumb/3/3a/Foobar.jpg/600px-Foobar.jpg 2x" /></a>
11646 <p><span 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" height="34" width="300"/></a></span></p>
11650 Image with multiple alignments -- use first (bug 48664)
11654 [[File:Foobar.jpg|thumb|left|right|center|caption]]
11656 [[File:Foobar.jpg|middle|text-top|caption]]
11658 <div class="thumb tleft"><div class="thumbinner" style="width:222px;"><a href="/wiki/File:Foobar.jpg" class="image"><img alt="" src="http://example.com/images/thumb/3/3a/Foobar.jpg/220px-Foobar.jpg" width="220" height="25" class="thumbimage" srcset="http://example.com/images/thumb/3/3a/Foobar.jpg/330px-Foobar.jpg 1.5x, http://example.com/images/thumb/3/3a/Foobar.jpg/440px-Foobar.jpg 2x" /></a> <div class="thumbcaption"><div class="magnify"><a href="/wiki/File:Foobar.jpg" class="internal" title="Enlarge"></a></div>caption</div></div></div>
11659 <p><a href="/wiki/File:Foobar.jpg" class="image" title="caption"><img alt="caption" src="http://example.com/images/3/3a/Foobar.jpg" width="1941" height="220" style="vertical-align: middle" /></a>
11662 <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/3/3a/Foobar.jpg" height="25" width="220"/></a><figcaption>caption</figcaption></figure>
11663 <p><span 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" height="220" width="1941"/></a></span></p>
11667 Image with width attribute at different positions
11669 [[File:Foobar.jpg|200px|right|Caption]]
11670 [[File:Foobar.jpg|right|200px|Caption]]
11671 [[File:Foobar.jpg|right|Caption|200px]]
11673 <div class="floatright"><a href="/wiki/File:Foobar.jpg" class="image" title="Caption"><img alt="Caption" src="http://example.com/images/thumb/3/3a/Foobar.jpg/200px-Foobar.jpg" width="200" height="23" srcset="http://example.com/images/thumb/3/3a/Foobar.jpg/300px-Foobar.jpg 1.5x, http://example.com/images/thumb/3/3a/Foobar.jpg/400px-Foobar.jpg 2x" /></a></div>
11674 <div class="floatright"><a href="/wiki/File:Foobar.jpg" class="image" title="Caption"><img alt="Caption" src="http://example.com/images/thumb/3/3a/Foobar.jpg/200px-Foobar.jpg" width="200" height="23" srcset="http://example.com/images/thumb/3/3a/Foobar.jpg/300px-Foobar.jpg 1.5x, http://example.com/images/thumb/3/3a/Foobar.jpg/400px-Foobar.jpg 2x" /></a></div>
11675 <div class="floatright"><a href="/wiki/File:Foobar.jpg" class="image" title="Caption"><img alt="Caption" src="http://example.com/images/thumb/3/3a/Foobar.jpg/200px-Foobar.jpg" width="200" height="23" srcset="http://example.com/images/thumb/3/3a/Foobar.jpg/300px-Foobar.jpg 1.5x, http://example.com/images/thumb/3/3a/Foobar.jpg/400px-Foobar.jpg 2x" /></a></div>
11678 <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" height="23" width="200"></a><figcaption>Caption</figcaption></figure>
11679 <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" height="23" width="200"></a><figcaption>Caption</figcaption></figure>
11680 <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" height="23" width="200"></a><figcaption>Caption</figcaption></figure>
11683 # a sad bit of backward-compatibility
11685 Image with size specified with pxpx (bug 13500, 51628)
11687 parsoid=wt2html,wt2wt,html2html
11689 [[File:Foobar.jpg|20pxpx]]
11690 [[File:Foobar.jpg|200x20pxpx]]
11692 <p><a href="/wiki/File:Foobar.jpg" class="image"><img alt="Foobar.jpg" src="http://example.com/images/thumb/3/3a/Foobar.jpg/20px-Foobar.jpg" width="20" height="2" srcset="http://example.com/images/thumb/3/3a/Foobar.jpg/30px-Foobar.jpg 1.5x, http://example.com/images/thumb/3/3a/Foobar.jpg/40px-Foobar.jpg 2x" /></a>
11693 <a href="/wiki/File:Foobar.jpg" class="image"><img alt="Foobar.jpg" src="http://example.com/images/thumb/3/3a/Foobar.jpg/177px-Foobar.jpg" width="177" height="20" srcset="http://example.com/images/thumb/3/3a/Foobar.jpg/265px-Foobar.jpg 1.5x, http://example.com/images/thumb/3/3a/Foobar.jpg/353px-Foobar.jpg 2x" /></a>
11696 <p><span typeof="mw:Image"><a href="File:Foobar.jpg"><img resource="./File:Foobar.jpg" src="//example.com/images/3/3a/Foobar.jpg" height="2" width="20"/></a></span> <span typeof="mw:Image"><a href="File:Foobar.jpg"><img resource="./File:Foobar.jpg" src="//example.com/images/3/3a/Foobar.jpg" height="20" width="177"/></a></span></p>
11700 Image with link parameter, wiki target
11702 [[File:Foobar.jpg|link=Main Page]]
11704 <p><a href="/wiki/Main_Page" title="Main Page"><img alt="Foobar.jpg" src="http://example.com/images/3/3a/Foobar.jpg" width="1941" height="220" /></a>
11707 <p><span class="mw-default-size" typeof="mw:Image"><a href="Main_Page"><img resource="./File:Foobar.jpg" src="//example.com/images/3/3a/Foobar.jpg" height="220" width="1941"></a></span></p>
11710 # parsoid bug 49293 (part 1)
11712 Image with link parameter, URL target
11714 [[File:Foobar.jpg|link=http://example.com/]]
11716 <p><a href="http://example.com/" rel="nofollow"><img alt="Foobar.jpg" src="http://example.com/images/3/3a/Foobar.jpg" width="1941" height="220" /></a>
11719 <p><span 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" height="220" width="1941"></a></span></p>
11722 # parsoid bug 49293 (part 2)
11724 Image with link parameter, protocol-less URL target
11726 [[File:Foobar.jpg|link=//example.com/]]
11728 <p><a href="//example.com/" rel="nofollow"><img alt="Foobar.jpg" src="http://example.com/images/3/3a/Foobar.jpg" width="1941" height="220" /></a>
11731 <p><span class="mw-default-size" typeof="mw:Image"><a href="//example.com/"><img resource="./File:Foobar.jpg" src="//example.com/images/3/3a/Foobar.jpg" height="220" width="1941"></a></span></p>
11735 Image with link parameter, wgExternalLinkTarget
11737 [[Image:foobar.jpg|link=http://example.com/]]
11739 wgExternalLinkTarget='foobar'
11741 <p><a href="http://example.com/" target="foobar" rel="nofollow"><img alt="Foobar.jpg" src="http://example.com/images/3/3a/Foobar.jpg" width="1941" height="220" /></a>
11746 Image with link parameter, wgNoFollowLinks set to false
11748 [[Image:foobar.jpg|link=http://example.com/]]
11750 wgNoFollowLinks=false
11752 <p><a href="http://example.com/"><img alt="Foobar.jpg" src="http://example.com/images/3/3a/Foobar.jpg" width="1941" height="220" /></a>
11757 Image with link parameter, wgNoFollowDomainExceptions
11759 [[Image:foobar.jpg|link=http://example.com/]]
11761 wgNoFollowDomainExceptions='example.com'
11763 <p><a href="http://example.com/"><img alt="Foobar.jpg" src="http://example.com/images/3/3a/Foobar.jpg" width="1941" height="220" /></a>
11768 Image with link parameter, wgExternalLinkTarget, unnamed parameter
11770 [[Image:foobar.jpg|link=http://example.com/|Title]]
11772 wgExternalLinkTarget='foobar'
11774 <p><a href="http://example.com/" title="Title" target="foobar" rel="nofollow"><img alt="Title" src="http://example.com/images/3/3a/Foobar.jpg" width="1941" height="220" /></a>
11779 Image with empty link parameter
11781 [[File:Foobar.jpg|link=]]
11783 <p><img alt="Foobar.jpg" src="http://example.com/images/3/3a/Foobar.jpg" width="1941" height="220" />
11786 <p><span class="mw-default-size" typeof="mw:Image"><span><img resource="./File:Foobar.jpg" src="//example.com/images/3/3a/Foobar.jpg" height="220" width="1941"></span></span></p>
11790 Image with link parameter (wiki target) and unnamed parameter
11792 [[File:Foobar.jpg|link=Main_Page|Title]]
11794 <p><a href="/wiki/Main_Page" title="Title"><img alt="Title" src="http://example.com/images/3/3a/Foobar.jpg" width="1941" height="220" /></a>
11797 <p><span 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" height="220" width="1941"></a></span></p>
11801 Image with link parameter (URL target) and unnamed parameter
11803 [[File:Foobar.jpg|link=http://example.com/|Title]]
11805 <p><a href="http://example.com/" title="Title" rel="nofollow"><img alt="Title" src="http://example.com/images/3/3a/Foobar.jpg" width="1941" height="220" /></a>
11808 <p><span 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" height="220" width="1941"></a></span></p>
11812 Thumbnail image with link parameter
11815 parsoid=wt2html,wt2wt,html2html
11817 [[File:Foobar.jpg|thumb|link=http://example.com/|Title]]
11819 <div class="thumb tright"><div class="thumbinner" style="width:222px;"><a href="http://example.com/"><img alt="" src="http://example.com/images/thumb/3/3a/Foobar.jpg/220px-Foobar.jpg" width="220" height="25" class="thumbimage" srcset="http://example.com/images/thumb/3/3a/Foobar.jpg/330px-Foobar.jpg 1.5x, http://example.com/images/thumb/3/3a/Foobar.jpg/440px-Foobar.jpg 2x" /></a> <div class="thumbcaption"><div class="magnify"><a href="/wiki/File:Foobar.jpg" class="internal" title="Enlarge"></a></div>Title</div></div></div>
11822 <figure class="mw-default-size" typeof="mw:Image/Thumb"><a href="http://example.com/"><img resource="./File:Foobar.jpg" src="//example.com/images/3/3a/Foobar.jpg" height="25" width="220"/></a><figcaption>Title</figcaption></figure>
11826 Manually-specified thumbnail image
11830 [[File:Foobar.jpg|thumb=Thumb.png|Title]]
11832 <div class="thumb tright"><div class="thumbinner" style="width:137px;"><a href="/wiki/File:Foobar.jpg"><img alt="" src="http://example.com/images/e/ea/Thumb.png" width="135" height="135" class="thumbimage" /></a> <div class="thumbcaption"><div class="magnify"><a href="/wiki/File:Foobar.jpg" class="internal" title="Enlarge"></a></div>Title</div></div></div>
11835 <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" height="135" width="135"/></a><figcaption>Title</figcaption></figure>
11839 Manually-specified thumbnail image with explicit link to wiki page
11842 parsoid=wt2html,wt2wt,html2html
11844 [[File:Foobar.jpg|thumb=Thumb.png|link=Main_Page|Title]]
11846 <div class="thumb tright"><div class="thumbinner" style="width:137px;"><a href="/wiki/Main_Page" title="Main Page"><img alt="" src="http://example.com/images/e/ea/Thumb.png" width="135" height="135" class="thumbimage" /></a> <div class="thumbcaption"><div class="magnify"><a href="/wiki/File:Foobar.jpg" class="internal" title="Enlarge"></a></div>Title</div></div></div>
11849 <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" height="135" width="135"/></a><figcaption>Title</figcaption></figure>
11853 Manually-specified thumbnail image with explicit link to url
11856 parsoid=wt2html,wt2wt,html2html
11858 [[File:Foobar.jpg|thumb=Thumb.png|link=http://example.com|Title]]
11860 <div class="thumb tright"><div class="thumbinner" style="width:137px;"><a href="http://example.com"><img alt="" src="http://example.com/images/e/ea/Thumb.png" width="135" height="135" class="thumbimage" /></a> <div class="thumbcaption"><div class="magnify"><a href="/wiki/File:Foobar.jpg" class="internal" title="Enlarge"></a></div>Title</div></div></div>
11863 <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" height="135" width="135"/></a><figcaption>Title</figcaption></figure>
11867 Manually-specified thumbnail image with explicit no link
11870 parsoid=wt2html,wt2wt,html2html
11872 [[File:Foobar.jpg|thumb=Thumb.png|link=|Title]]
11874 <div class="thumb tright"><div class="thumbinner" style="width:137px;"><img alt="" src="http://example.com/images/e/ea/Thumb.png" width="135" height="135" class="thumbimage" /> <div class="thumbcaption"><div class="magnify"><a href="/wiki/File:Foobar.jpg" class="internal" title="Enlarge"></a></div>Title</div></div></div>
11877 <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" height="135" width="135"/></span><figcaption>Title</figcaption></figure>
11881 Manually-specified thumbnail image with explicit link and alt text
11884 parsoid=wt2html,wt2wt,html2html
11886 [[File:Foobar.jpg|thumb=Thumb.png|link=Main_Page|alt=alttext|Title]]
11888 <div class="thumb tright"><div class="thumbinner" style="width:137px;"><a href="/wiki/Main_Page" title="Main Page"><img alt="alttext" src="http://example.com/images/e/ea/Thumb.png" width="135" height="135" class="thumbimage" /></a> <div class="thumbcaption"><div class="magnify"><a href="/wiki/File:Foobar.jpg" class="internal" title="Enlarge"></a></div>Title</div></div></div>
11891 <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" height="135" width="135"/></a><figcaption>Title</figcaption></figure>
11895 Image with frame and link
11897 parsoid=wt2html,wt2wt,html2html
11899 [[File:Foobar.jpg|frame|left|This is a test image [[Main Page]]]]
11901 <div class="thumb tleft"><div class="thumbinner" style="width:1943px;"><a href="/wiki/File:Foobar.jpg" class="image"><img alt="" src="http://example.com/images/3/3a/Foobar.jpg" width="1941" height="220" class="thumbimage" /></a> <div class="thumbcaption">This is a test image <a href="/wiki/Main_Page" title="Main Page">Main Page</a></div></div></div>
11904 <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" 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>
11908 Image with frame and link and explicit alt
11910 parsoid=wt2html,wt2wt,html2html
11912 [[Image:Foobar.jpg|frame|left|This is a test image [[Main Page]]|alt=Altitude]]
11914 <div class="thumb tleft"><div class="thumbinner" style="width:1943px;"><a href="/wiki/File:Foobar.jpg" class="image"><img alt="Altitude" src="http://example.com/images/3/3a/Foobar.jpg" width="1941" height="220" class="thumbimage" /></a> <div class="thumbcaption">This is a test image <a href="/wiki/Main_Page" title="Main Page">Main Page</a></div></div></div>
11917 <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" 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>
11921 Image with wiki markup in implicit alt
11923 parsoid=wt2html,wt2wt,html2html
11925 [[Image:Foobar.jpg|testing '''bold''' in alt]]
11927 [[Image:Foobar.jpg|alt=testing '''bold''' in alt]]
11929 <p><a href="/wiki/File:Foobar.jpg" class="image" title="testing bold in alt"><img alt="testing bold in alt" src="http://example.com/images/3/3a/Foobar.jpg" width="1941" height="220" /></a>
11930 </p><p><a href="/wiki/File:Foobar.jpg" class="image"><img alt="testing bold in alt" src="http://example.com/images/3/3a/Foobar.jpg" width="1941" height="220" /></a>
11933 <p><span class="mw-default-size" typeof="mw:Image" data-mw="{"caption":"testing '''bold''' in alt"}"><a href="File:Foobar.jpg"><img resource="./File:Foobar.jpg" src="//example.com/images/3/3a/Foobar.jpg" height="220" width="1941"/></a></span></p>
11934 <p><span class="mw-default-size" typeof="mw:Image"><a href="File:Foobar.jpg"><img alt="testing bold in alt" resource="./File:Foobar.jpg" src="//example.com/images/3/3a/Foobar.jpg" height="220" width="1941"/></a></span></p>
11937 ###################
11938 # Conflicting image format options.
11939 # First option specified should 'win'.
11940 # All three cases in each test should be identical.
11943 Image with 'frameless' first.
11945 parsoid=wt2html,wt2wt,html2html
11947 [[File:Foobar.jpg|frameless|caption]]
11949 [[File:Foobar.jpg|frameless|frame|caption]]
11951 [[File:Foobar.jpg|frameless|thumb|caption]]
11953 <p><a href="/wiki/File:Foobar.jpg" class="image" title="caption"><img alt="caption" src="http://example.com/images/thumb/3/3a/Foobar.jpg/180px-Foobar.jpg" width="180" height="20" srcset="http://example.com/images/thumb/3/3a/Foobar.jpg/270px-Foobar.jpg 1.5x, http://example.com/images/thumb/3/3a/Foobar.jpg/360px-Foobar.jpg 2x" /></a>
11954 </p><p><a href="/wiki/File:Foobar.jpg" class="image" title="caption"><img alt="caption" src="http://example.com/images/thumb/3/3a/Foobar.jpg/180px-Foobar.jpg" width="180" height="20" srcset="http://example.com/images/thumb/3/3a/Foobar.jpg/270px-Foobar.jpg 1.5x, http://example.com/images/thumb/3/3a/Foobar.jpg/360px-Foobar.jpg 2x" /></a>
11955 </p><p><a href="/wiki/File:Foobar.jpg" class="image" title="caption"><img alt="caption" src="http://example.com/images/thumb/3/3a/Foobar.jpg/180px-Foobar.jpg" width="180" height="20" srcset="http://example.com/images/thumb/3/3a/Foobar.jpg/270px-Foobar.jpg 1.5x, http://example.com/images/thumb/3/3a/Foobar.jpg/360px-Foobar.jpg 2x" /></a>
11958 <p><span 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/3/3a/Foobar.jpg" height="25" width="220"/></a></span></p>
11959 <p><span 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/3/3a/Foobar.jpg" height="25" width="220"/></a></span></p>
11960 <p><span 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/3/3a/Foobar.jpg" height="25" width="220"/></a></span></p>
11964 Image with 'frame' first.
11966 parsoid=wt2html,wt2wt,html2html
11968 [[File:Foobar.jpg|frame|caption]]
11969 [[File:Foobar.jpg|frame|frameless|caption]]
11970 [[File:Foobar.jpg|frame|thumb|caption]]
11972 <div class="thumb tright"><div class="thumbinner" style="width:1943px;"><a href="/wiki/File:Foobar.jpg" class="image"><img alt="" src="http://example.com/images/3/3a/Foobar.jpg" width="1941" height="220" class="thumbimage" /></a> <div class="thumbcaption">caption</div></div></div>
11973 <div class="thumb tright"><div class="thumbinner" style="width:1943px;"><a href="/wiki/File:Foobar.jpg" class="image"><img alt="" src="http://example.com/images/3/3a/Foobar.jpg" width="1941" height="220" class="thumbimage" /></a> <div class="thumbcaption">caption</div></div></div>
11974 <div class="thumb tright"><div class="thumbinner" style="width:1943px;"><a href="/wiki/File:Foobar.jpg" class="image"><img alt="" src="http://example.com/images/3/3a/Foobar.jpg" width="1941" height="220" class="thumbimage" /></a> <div class="thumbcaption">caption</div></div></div>
11977 <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" height="220" width="1941"/></a><figcaption>caption</figcaption></figure>
11978 <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" height="220" width="1941"/></a><figcaption>caption</figcaption></figure>
11979 <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" height="220" width="1941"/></a><figcaption>caption</figcaption></figure>
11983 Image with 'thumb' first.
11985 parsoid=wt2html,wt2wt,html2html
11987 [[File:Foobar.jpg|thumb|caption]]
11988 [[File:Foobar.jpg|thumb|frameless|caption]]
11989 [[File:Foobar.jpg|thumb|frame|caption]]
11991 <div class="thumb tright"><div class="thumbinner" style="width:182px;"><a href="/wiki/File:Foobar.jpg" class="image"><img alt="" src="http://example.com/images/thumb/3/3a/Foobar.jpg/180px-Foobar.jpg" width="180" height="20" class="thumbimage" srcset="http://example.com/images/thumb/3/3a/Foobar.jpg/270px-Foobar.jpg 1.5x, http://example.com/images/thumb/3/3a/Foobar.jpg/360px-Foobar.jpg 2x" /></a> <div class="thumbcaption"><div class="magnify"><a href="/wiki/File:Foobar.jpg" class="internal" title="Enlarge"></a></div>caption</div></div></div>
11992 <div class="thumb tright"><div class="thumbinner" style="width:182px;"><a href="/wiki/File:Foobar.jpg" class="image"><img alt="" src="http://example.com/images/thumb/3/3a/Foobar.jpg/180px-Foobar.jpg" width="180" height="20" class="thumbimage" srcset="http://example.com/images/thumb/3/3a/Foobar.jpg/270px-Foobar.jpg 1.5x, http://example.com/images/thumb/3/3a/Foobar.jpg/360px-Foobar.jpg 2x" /></a> <div class="thumbcaption"><div class="magnify"><a href="/wiki/File:Foobar.jpg" class="internal" title="Enlarge"></a></div>caption</div></div></div>
11993 <div class="thumb tright"><div class="thumbinner" style="width:182px;"><a href="/wiki/File:Foobar.jpg" class="image"><img alt="" src="http://example.com/images/thumb/3/3a/Foobar.jpg/180px-Foobar.jpg" width="180" height="20" class="thumbimage" srcset="http://example.com/images/thumb/3/3a/Foobar.jpg/270px-Foobar.jpg 1.5x, http://example.com/images/thumb/3/3a/Foobar.jpg/360px-Foobar.jpg 2x" /></a> <div class="thumbcaption"><div class="magnify"><a href="/wiki/File:Foobar.jpg" class="internal" title="Enlarge"></a></div>caption</div></div></div>
11996 <figure class="mw-default-size" typeof="mw:Image/Thumb"><a href="File:Foobar.jpg"><img resource="./File:Foobar.jpg" src="//example.com/images/3/3a/Foobar.jpg" height="25" width="220"/></a><figcaption>caption</figcaption></figure>
11997 <figure class="mw-default-size" typeof="mw:Image/Thumb"><a href="File:Foobar.jpg"><img resource="./File:Foobar.jpg" src="//example.com/images/3/3a/Foobar.jpg" height="25" width="220"/></a><figcaption>caption</figcaption></figure>
11998 <figure class="mw-default-size" typeof="mw:Image/Thumb"><a href="File:Foobar.jpg"><img resource="./File:Foobar.jpg" src="//example.com/images/3/3a/Foobar.jpg" height="25" width="220"/></a><figcaption>caption</figcaption></figure>
12001 ###################
12003 # See https://www.mediawiki.org/wiki/Help:Images#Size_and_frame
12004 # and https://bugzilla.wikimedia.org/show_bug.cgi?id=62258
12005 # Foobar has actual size of 1941x220
12006 # 1. Thumbs & frameless always reduce, can't be enlarged unless it's
12007 # a scalable format.
12008 # 2. Framed images always ignore size options; always render at default size.
12009 # 3. "Unspecified format" and border are the only types which can be
12013 Image: "unspecified format" and border enlarge
12015 parsoid=wt2html,wt2wt,html2html
12017 [[File:Foobar.jpg|2000px]]
12019 [[File:Foobar.jpg|border|2000px]]
12021 <p><a href="/wiki/File:Foobar.jpg" class="image"><img alt="Foobar.jpg" src="http://example.com/images/3/3a/Foobar.jpg" width="2000" height="227" /></a>
12022 </p><p><a href="/wiki/File:Foobar.jpg" class="image"><img alt="Foobar.jpg" src="http://example.com/images/3/3a/Foobar.jpg" width="2000" height="227" class="thumbborder" /></a>
12025 <p><span typeof="mw:Image"><a href="File:Foobar.jpg"><img resource="./File:Foobar.jpg" src="//example.com/images/3/3a/Foobar.jpg" height="227" width="2000"/></a></span></p>
12026 <p><span 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" height="227" width="2000"/></a></span></p>
12030 Image: "unspecified format" and border reduce
12032 parsoid=wt2html,wt2wt,html2html
12034 [[File:Foobar.jpg|1000px]]
12036 [[File:Foobar.jpg|border|1000px]]
12038 <p><a href="/wiki/File:Foobar.jpg" class="image"><img alt="Foobar.jpg" src="http://example.com/images/thumb/3/3a/Foobar.jpg/1000px-Foobar.jpg" width="1000" height="113" srcset="http://example.com/images/thumb/3/3a/Foobar.jpg/1500px-Foobar.jpg 1.5x, http://example.com/images/3/3a/Foobar.jpg 2x" /></a>
12039 </p><p><a href="/wiki/File:Foobar.jpg" class="image"><img alt="Foobar.jpg" src="http://example.com/images/thumb/3/3a/Foobar.jpg/1000px-Foobar.jpg" width="1000" height="113" class="thumbborder" srcset="http://example.com/images/thumb/3/3a/Foobar.jpg/1500px-Foobar.jpg 1.5x, http://example.com/images/3/3a/Foobar.jpg 2x" /></a>
12042 <p><span typeof="mw:Image"><a href="File:Foobar.jpg"><img resource="./File:Foobar.jpg" src="//example.com/images/3/3a/Foobar.jpg" height="113" width="1000"/></a></span></p>
12043 <p><span 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" height="113" width="1000"/></a></span></p>
12047 Image: thumbs reduce
12049 parsoid=wt2html,wt2wt,html2html
12051 [[File:Foobar.jpg|thumb|50px]]
12053 <div class="thumb tright"><div class="thumbinner" style="width:52px;"><a href="/wiki/File:Foobar.jpg" class="image"><img alt="Foobar.jpg" src="http://example.com/images/thumb/3/3a/Foobar.jpg/50px-Foobar.jpg" width="50" height="6" class="thumbimage" srcset="http://example.com/images/thumb/3/3a/Foobar.jpg/75px-Foobar.jpg 1.5x, http://example.com/images/thumb/3/3a/Foobar.jpg/100px-Foobar.jpg 2x" /></a> <div class="thumbcaption"><div class="magnify"><a href="/wiki/File:Foobar.jpg" class="internal" title="Enlarge"></a></div></div></div></div>
12056 <figure typeof="mw:Image/Thumb"><a href="File:Foobar.jpg"><img resource="./File:Foobar.jpg" src="//example.com/images/3/3a/Foobar.jpg" height="6" width="50"/></a></figure>
12060 Image: bitmap thumbs can't be enlarged past original size, but vector can.
12062 parsoid=wt2html,wt2wt,html2html
12064 [[File:Foobar.jpg|thumb|2000px]]
12066 [[File:Foobar.svg|thumb|2000px]]
12068 <div class="thumb tright"><div class="thumbinner" style="width:1943px;"><a href="/wiki/File:Foobar.jpg" class="image"><img alt="Foobar.jpg" src="http://example.com/images/3/3a/Foobar.jpg" width="1941" height="220" class="thumbimage" /></a> <div class="thumbcaption"><div class="magnify"><a href="/wiki/File:Foobar.jpg" class="internal" title="Enlarge"></a></div></div></div></div>
12069 <div class="thumb tright"><div class="thumbinner" style="width:2002px;"><a href="/wiki/File:Foobar.svg" class="image"><img alt="Foobar.svg" src="http://example.com/images/thumb/f/ff/Foobar.svg/2000px-Foobar.svg.png" width="2000" height="1500" class="thumbimage" srcset="http://example.com/images/thumb/f/ff/Foobar.svg/3000px-Foobar.svg.png 1.5x, http://example.com/images/thumb/f/ff/Foobar.svg/4000px-Foobar.svg.png 2x" /></a> <div class="thumbcaption"><div class="magnify"><a href="/wiki/File:Foobar.svg" class="internal" title="Enlarge"></a></div></div></div></div>
12072 <figure typeof="mw:Image/Thumb"><a href="File:Foobar.jpg"><img resource="./File:Foobar.jpg" src="//example.com/images/3/3a/Foobar.jpg" height="220" width="1941"/></a></figure>
12073 <figure typeof="mw:Image/Thumb"><a href="File:Foobar.svg"><img resource="./File:Foobar.svg" src="//example.com/images/f/ff/Foobar.svg" height="1500" width="2000"/></a></figure>
12077 Image: frameless can reduce in size
12079 parsoid=wt2html,wt2wt,html2html
12081 [[File:Foobar.jpg|frameless|50px]]
12083 <p><a href="/wiki/File:Foobar.jpg" class="image"><img alt="Foobar.jpg" src="http://example.com/images/thumb/3/3a/Foobar.jpg/50px-Foobar.jpg" width="50" height="6" srcset="http://example.com/images/thumb/3/3a/Foobar.jpg/75px-Foobar.jpg 1.5x, http://example.com/images/thumb/3/3a/Foobar.jpg/100px-Foobar.jpg 2x" /></a>
12086 <p><span typeof="mw:Image/Frameless"><a href="File:Foobar.jpg"><img resource="./File:Foobar.jpg" src="//example.com/images/3/3a/Foobar.jpg" height="6" width="50"/></a></span></p>
12090 Image: bitmap frameless can't be enlarged past original size, but vector can
12092 parsoid=wt2html,wt2wt,html2html
12094 [[File:Foobar.jpg|frameless|2000px]]
12096 [[File:Foobar.svg|frameless|2000px]]
12098 <p><a href="/wiki/File:Foobar.jpg" class="image"><img alt="Foobar.jpg" src="http://example.com/images/3/3a/Foobar.jpg" width="1941" height="220" /></a>
12099 </p><p><a href="/wiki/File:Foobar.svg" class="image"><img alt="Foobar.svg" src="http://example.com/images/thumb/f/ff/Foobar.svg/2000px-Foobar.svg.png" width="2000" height="1500" srcset="http://example.com/images/thumb/f/ff/Foobar.svg/3000px-Foobar.svg.png 1.5x, http://example.com/images/thumb/f/ff/Foobar.svg/4000px-Foobar.svg.png 2x" /></a>
12102 <p><span typeof="mw:Image/Frameless"><a href="File:Foobar.jpg"><img resource="./File:Foobar.jpg" src="//example.com/images/3/3a/Foobar.jpg" height="220" width="1941"/></a></span></p>
12103 <p><span typeof="mw:Image/Frameless"><a href="File:Foobar.svg"><img resource="./File:Foobar.svg" src="//example.com/images/f/ff/Foobar.svg" height="1500" width="2000"/></a></span></p>
12107 Image: framed images are always unscaled.
12109 parsoid=wt2html,wt2wt,html2html
12111 [[File:Foobar.jpg|frame]]
12113 [[File:Foobar.jpg|frame|50px]]
12115 [[File:Foobar.jpg|frame|50x50px]]
12117 [[File:Foobar.jpg|frame|2000px]]
12119 <div class="thumb tright"><div class="thumbinner" style="width:1943px;"><a href="/wiki/File:Foobar.jpg" class="image"><img alt="Foobar.jpg" src="http://example.com/images/3/3a/Foobar.jpg" width="1941" height="220" class="thumbimage" /></a> <div class="thumbcaption"></div></div></div>
12120 <div class="thumb tright"><div class="thumbinner" style="width:1943px;"><a href="/wiki/File:Foobar.jpg" class="image"><img alt="Foobar.jpg" src="http://example.com/images/3/3a/Foobar.jpg" width="1941" height="220" class="thumbimage" /></a> <div class="thumbcaption"></div></div></div>
12121 <div class="thumb tright"><div class="thumbinner" style="width:1943px;"><a href="/wiki/File:Foobar.jpg" class="image"><img alt="Foobar.jpg" src="http://example.com/images/3/3a/Foobar.jpg" width="1941" height="220" class="thumbimage" /></a> <div class="thumbcaption"></div></div></div>
12122 <div class="thumb tright"><div class="thumbinner" style="width:1943px;"><a href="/wiki/File:Foobar.jpg" class="image"><img alt="Foobar.jpg" src="http://example.com/images/3/3a/Foobar.jpg" width="1941" height="220" class="thumbimage" /></a> <div class="thumbcaption"></div></div></div>
12125 <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" height="220" width="1941"/></a></figure>
12126 <figure typeof="mw:Image/Frame"><a href="File:Foobar.jpg"><img resource="./File:Foobar.jpg" src="//example.com/images/3/3a/Foobar.jpg" height="220" width="1941"/></a></figure>
12127 <figure typeof="mw:Image/Frame"><a href="File:Foobar.jpg"><img resource="./File:Foobar.jpg" src="//example.com/images/3/3a/Foobar.jpg" height="220" width="1941"/></a></figure>
12128 <figure typeof="mw:Image/Frame"><a href="File:Foobar.jpg"><img resource="./File:Foobar.jpg" src="//example.com/images/3/3a/Foobar.jpg" height="220" width="1941"/></a></figure>
12131 ###################
12134 Link to image page- image page normally doesn't exists, hence edit link
12135 Add test with existing image page
12136 #<p><a href="/wiki/File:Test" title="Image:Test">Image:test</a>
12140 <p><a href="/index.php?title=File:Test&action=edit&redlink=1" class="new" title="File:Test (page does not exist)">Image:test</a>
12145 bug 18784 Link to non-existent image page with caption should use caption as link text
12147 [[:Image:test|caption]]
12149 <p><a href="/index.php?title=File:Test&action=edit&redlink=1" class="new" title="File:Test (page does not exist)">caption</a>
12154 Frameless image caption with a free URL
12156 [[File:Foobar.jpg|http://example.com]]
12158 <p><a href="/wiki/File:Foobar.jpg" class="image" title="http://example.com"><img alt="http://example.com" src="http://example.com/images/3/3a/Foobar.jpg" width="1941" height="220" /></a>
12161 <p><span class="mw-default-size" typeof="mw:Image" data-mw='{"caption":"http://example.com"}'><a href="File:Foobar.jpg"><img resource="./File:Foobar.jpg" src="//example.com/images/3/3a/Foobar.jpg" height="220" width="1941"/></a></span></p>
12165 Thumbnail image caption with a free URL
12169 [[File:Foobar.jpg|thumb|http://example.com]]
12171 <div class="thumb tright"><div class="thumbinner" style="width:222px;"><a href="/wiki/File:Foobar.jpg" class="image"><img alt="" src="http://example.com/images/thumb/3/3a/Foobar.jpg/220px-Foobar.jpg" width="220" height="25" class="thumbimage" srcset="http://example.com/images/thumb/3/3a/Foobar.jpg/330px-Foobar.jpg 1.5x, http://example.com/images/thumb/3/3a/Foobar.jpg/440px-Foobar.jpg 2x" /></a> <div class="thumbcaption"><div class="magnify"><a href="/wiki/File:Foobar.jpg" class="internal" title="Enlarge"></a></div><a rel="nofollow" class="external free" href="http://example.com">http://example.com</a></div></div></div>
12174 <figure class="mw-default-size" typeof="mw:Image/Thumb"><a href="File:Foobar.jpg"><img resource="./File:Foobar.jpg" src="//example.com/images/3/3a/Foobar.jpg" height="25" width="220"/></a><figcaption><a rel="mw:ExtLink" href="http://example.com">http://example.com</a></figcaption></figure>
12178 Thumbnail image caption with a free URL and explicit alt
12181 parsoid=wt2html,wt2wt,html2html
12183 [[File:Foobar.jpg|thumb|http://example.com|alt=Alteration]]
12185 <div class="thumb tright"><div class="thumbinner" style="width:222px;"><a href="/wiki/File:Foobar.jpg" class="image"><img alt="Alteration" src="http://example.com/images/thumb/3/3a/Foobar.jpg/220px-Foobar.jpg" width="220" height="25" class="thumbimage" srcset="http://example.com/images/thumb/3/3a/Foobar.jpg/330px-Foobar.jpg 1.5x, http://example.com/images/thumb/3/3a/Foobar.jpg/440px-Foobar.jpg 2x" /></a> <div class="thumbcaption"><div class="magnify"><a href="/wiki/File:Foobar.jpg" class="internal" title="Enlarge"></a></div><a rel="nofollow" class="external free" href="http://example.com">http://example.com</a></div></div></div>
12188 <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/3/3a/Foobar.jpg" height="25" width="220"/></a><figcaption><a rel="mw:ExtLink" href="http://example.com">http://example.com</a></figcaption></figure>
12192 SVG thumbnails with no language set
12195 [[File:Foobar.svg|thumb|caption]]
12197 <div class="thumb tright"><div class="thumbinner" style="width:182px;"><a href="/wiki/File:Foobar.svg" class="image"><img alt="" src="http://example.com/images/thumb/f/ff/Foobar.svg/180px-Foobar.svg.png" width="180" height="135" class="thumbimage" srcset="http://example.com/images/thumb/f/ff/Foobar.svg/270px-Foobar.svg.png 1.5x, http://example.com/images/thumb/f/ff/Foobar.svg/360px-Foobar.svg.png 2x" /></a> <div class="thumbcaption"><div class="magnify"><a href="/wiki/File:Foobar.svg" class="internal" title="Enlarge"></a></div>caption</div></div></div>
12200 <figure class="mw-default-size" typeof="mw:Image/Thumb"><a href="File:Foobar.svg"><img resource="./File:Foobar.svg" src="//example.com/images/f/ff/Foobar.svg" height="165" width="220"/></a><figcaption>caption</figcaption></figure>
12204 SVG thumbnails with language de
12206 parsoid=wt2html,wt2wt,html2html
12208 [[File:Foobar.svg|thumb|caption|lang=de]]
12210 <div class="thumb tright"><div class="thumbinner" style="width:182px;"><a href="/index.php?title=File:Foobar.svg&lang=de" class="image"><img alt="" src="http://example.com/images/thumb/f/ff/Foobar.svg/langde-180px-Foobar.svg.png" width="180" height="135" class="thumbimage" srcset="http://example.com/images/thumb/f/ff/Foobar.svg/langde-270px-Foobar.svg.png 1.5x, http://example.com/images/thumb/f/ff/Foobar.svg/langde-360px-Foobar.svg.png 2x" /></a> <div class="thumbcaption"><div class="magnify"><a href="/wiki/File:Foobar.svg" class="internal" title="Enlarge"></a></div>caption</div></div></div>
12213 <figure class="mw-default-size" typeof="mw:Image/Thumb"><a href="File:Foobar.svg"><img resource="./File:Foobar.svg" src="//example.com/images/f/ff/Foobar.svg" lang="de" height="165" width="220"/></a><figcaption>caption</figcaption></figure>
12217 SVG thumbnails with invalid language code
12219 parsoid=wt2html,wt2wt,html2html
12221 [[File:Foobar.svg|thumb|caption|lang=invalid.language.code]]
12223 <div class="thumb tright"><div class="thumbinner" style="width:182px;"><a href="/wiki/File:Foobar.svg" class="image"><img alt="" src="http://example.com/images/thumb/f/ff/Foobar.svg/180px-Foobar.svg.png" width="180" height="135" class="thumbimage" srcset="http://example.com/images/thumb/f/ff/Foobar.svg/270px-Foobar.svg.png 1.5x, http://example.com/images/thumb/f/ff/Foobar.svg/360px-Foobar.svg.png 2x" /></a> <div class="thumbcaption"><div class="magnify"><a href="/wiki/File:Foobar.svg" class="internal" title="Enlarge"></a></div>lang=invalid.language.code</div></div></div>
12226 <figure class="mw-default-size" typeof="mw:Image/Thumb"><a href="File:Foobar.svg"><img resource="./File:Foobar.svg" src="//example.com/images/f/ff/Foobar.svg" height="165" width="220"/></a><figcaption>lang=invalid.language.code</figcaption></figure>
12230 BUG 1887: A ISBN with a thumbnail
12232 [[File:Foobar.jpg|thumb|ISBN 1235467890]]
12234 <div class="thumb tright"><div class="thumbinner" style="width:182px;"><a href="/wiki/File:Foobar.jpg" class="image"><img alt="" src="http://example.com/images/thumb/3/3a/Foobar.jpg/180px-Foobar.jpg" width="180" height="20" class="thumbimage" srcset="http://example.com/images/thumb/3/3a/Foobar.jpg/270px-Foobar.jpg 1.5x, http://example.com/images/thumb/3/3a/Foobar.jpg/360px-Foobar.jpg 2x" /></a> <div class="thumbcaption"><div class="magnify"><a href="/wiki/File:Foobar.jpg" class="internal" title="Enlarge"></a></div><a href="/wiki/Special:BookSources/1235467890" class="internal mw-magiclink-isbn">ISBN 1235467890</a></div></div></div>
12237 <figure class="mw-default-size" typeof="mw:Image/Thumb"><a href="File:Foobar.jpg"><img resource="./File:Foobar.jpg" src="//example.com/images/3/3a/Foobar.jpg" height="25" width="220"/></a><figcaption><a href="Special:BookSources/1235467890" rel="mw:ExtLink">ISBN 1235467890</a></figcaption></figure>
12241 BUG 1887: A RFC with a thumbnail
12243 [[File:Foobar.jpg|thumb|This is RFC 12354]]
12245 <div class="thumb tright"><div class="thumbinner" style="width:182px;"><a href="/wiki/File:Foobar.jpg" class="image"><img alt="" src="http://example.com/images/thumb/3/3a/Foobar.jpg/180px-Foobar.jpg" width="180" height="20" class="thumbimage" srcset="http://example.com/images/thumb/3/3a/Foobar.jpg/270px-Foobar.jpg 1.5x, http://example.com/images/thumb/3/3a/Foobar.jpg/360px-Foobar.jpg 2x" /></a> <div class="thumbcaption"><div class="magnify"><a href="/wiki/File:Foobar.jpg" class="internal" title="Enlarge"></a></div>This is <a class="external mw-magiclink-rfc" rel="nofollow" href="//tools.ietf.org/html/rfc12354">RFC 12354</a></div></div></div>
12248 <figure class="mw-default-size" typeof="mw:Image/Thumb"><a href="File:Foobar.jpg"><img resource="./File:Foobar.jpg" src="//example.com/images/3/3a/Foobar.jpg" height="25" width="220"/></a><figcaption>This is <a href="//tools.ietf.org/html/rfc12354" rel="mw:ExtLink">RFC 12354</a></figcaption></figure>
12252 BUG 1887: A mailto link with a thumbnail
12254 [[File:Foobar.jpg|thumb|Please mailto:nobody@example.com]]
12256 <div class="thumb tright"><div class="thumbinner" style="width:182px;"><a href="/wiki/File:Foobar.jpg" class="image"><img alt="" src="http://example.com/images/thumb/3/3a/Foobar.jpg/180px-Foobar.jpg" width="180" height="20" class="thumbimage" srcset="http://example.com/images/thumb/3/3a/Foobar.jpg/270px-Foobar.jpg 1.5x, http://example.com/images/thumb/3/3a/Foobar.jpg/360px-Foobar.jpg 2x" /></a> <div class="thumbcaption"><div class="magnify"><a href="/wiki/File:Foobar.jpg" class="internal" title="Enlarge"></a></div>Please <a rel="nofollow" class="external free" href="mailto:nobody@example.com">mailto:nobody@example.com</a></div></div></div>
12259 <figure class="mw-default-size" typeof="mw:Image/Thumb"><a href="File:Foobar.jpg"><img resource="./File:Foobar.jpg" src="//example.com/images/3/3a/Foobar.jpg" height="25" width="220"/></a><figcaption>Please <a rel="mw:ExtLink" href="mailto:nobody@example.com">mailto:nobody@example.com</a></figcaption></figure>
12262 # Pending resolution to bug 368
12264 BUG 648: Frameless image caption with a link
12266 [[File:Foobar.jpg|text with a [[link]] in it]]
12268 <p><a href="/wiki/File:Foobar.jpg" class="image" title="text with a link in it"><img alt="text with a link in it" src="http://example.com/images/3/3a/Foobar.jpg" width="1941" height="220" /></a>
12271 <p><span class="mw-default-size" typeof="mw:Image" data-mw='{"caption":"text with a [[link]] in it"}'><a href="File:Foobar.jpg"><img resource="./File:Foobar.jpg" src="//example.com/images/3/3a/Foobar.jpg" height="220" width="1941"/></a></span></p>
12275 BUG 648: Frameless image caption with a link (suffix)
12277 [[File:Foobar.jpg|text with a [[link]]foo in it]]
12279 <p><a href="/wiki/File:Foobar.jpg" class="image" title="text with a linkfoo in it"><img alt="text with a linkfoo in it" src="http://example.com/images/3/3a/Foobar.jpg" width="1941" height="220" /></a>
12282 <p><span class="mw-default-size" typeof="mw:Image" data-mw='{"caption":"text with a [[link]]foo in it"}'><a href="File:Foobar.jpg"><img resource="./File:Foobar.jpg" src="//example.com/images/3/3a/Foobar.jpg" height="220" width="1941"/></a></span></p>
12286 BUG 648: Frameless image caption with an interwiki link
12288 [[File:Foobar.jpg|text with a [[MeatBall:Link]] in it]]
12290 <p><a href="/wiki/File:Foobar.jpg" class="image" title="text with a MeatBall:Link in it"><img alt="text with a MeatBall:Link in it" src="http://example.com/images/3/3a/Foobar.jpg" width="1941" height="220" /></a>
12293 <p><span class="mw-default-size" typeof="mw:Image" data-mw='{"caption":"text with a [[MeatBall:Link]] in it"}'><a href="File:Foobar.jpg"><img resource="./File:Foobar.jpg" src="//example.com/images/3/3a/Foobar.jpg" height="220" width="1941"/></a></span></p>
12297 BUG 648: Frameless image caption with a piped interwiki link
12299 [[File:Foobar.jpg|text with a [[MeatBall:Link|link]] in it]]
12301 <p><a href="/wiki/File:Foobar.jpg" class="image" title="text with a link in it"><img alt="text with a link in it" src="http://example.com/images/3/3a/Foobar.jpg" width="1941" height="220" /></a>
12304 <p><span class="mw-default-size" typeof="mw:Image" data-mw='{"caption":"text with a [[MeatBall:Link|link]] in it"}'><a href="File:Foobar.jpg"><img resource="./File:Foobar.jpg" src="//example.com/images/3/3a/Foobar.jpg" height="220" width="1941"/></a></span></p>
12308 Escape HTML special chars in image alt text
12310 [[File:Foobar.jpg|& < > "]]
12312 <p><a href="/wiki/File:Foobar.jpg" class="image" title="& < > ""><img alt="& < > "" src="http://example.com/images/3/3a/Foobar.jpg" width="1941" height="220" /></a>
12315 <p><span class="mw-default-size" typeof="mw:Image" data-mw='{"caption":"& < > \""}'><a href="File:Foobar.jpg"><img resource="./File:Foobar.jpg" src="//example.com/images/3/3a/Foobar.jpg" height="220" width="1941"/></a></span></p>
12319 BUG 499: Alt text should have Ӓ, not &1234;
12321 [[File:Foobar.jpg|♀]]
12323 <p><a href="/wiki/File:Foobar.jpg" class="image" title="♀"><img alt="♀" src="http://example.com/images/3/3a/Foobar.jpg" width="1941" height="220" /></a>
12326 <p><span class="mw-default-size" typeof="mw:Image" data-mw='{"caption":"&#9792;"}'><a href="File:Foobar.jpg"><img resource="./File:Foobar.jpg" src="//example.com/images/3/3a/Foobar.jpg" height="220" width="1941"/></a></span></p>
12330 Broken image caption with link
12332 parsoid=wt2html,wt2wt,html2html
12334 [[Image:Foobar.jpg|thumb|This is a broken caption. But [[Main Page|this]] is just an ordinary link.
12336 <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.
12339 <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>
12343 Image caption containing another image
12345 [[File:Foobar.jpg|thumb|This is a caption with another [[File:Thumb.png|image]] inside it!]]
12347 <div class="thumb tright"><div class="thumbinner" style="width:182px;"><a href="/wiki/File:Foobar.jpg" class="image"><img alt="" src="http://example.com/images/thumb/3/3a/Foobar.jpg/180px-Foobar.jpg" width="180" height="20" class="thumbimage" srcset="http://example.com/images/thumb/3/3a/Foobar.jpg/270px-Foobar.jpg 1.5x, http://example.com/images/thumb/3/3a/Foobar.jpg/360px-Foobar.jpg 2x" /></a> <div class="thumbcaption"><div class="magnify"><a href="/wiki/File:Foobar.jpg" class="internal" title="Enlarge"></a></div>This is a caption with another <a href="/wiki/File:Thumb.png" class="image" title="image"><img alt="image" src="http://example.com/images/e/ea/Thumb.png" width="135" height="135" /></a> inside it!</div></div></div>
12350 <figure class="mw-default-size" typeof="mw:Image/Thumb"><a href="File:Foobar.jpg"><img resource="./File:Foobar.jpg" src="//example.com/images/3/3a/Foobar.jpg" height="25" width="220"/></a><figcaption>This is a caption with another <span 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" height="135" width="135"/></a></span> inside it!</figcaption></figure>
12354 Image: caption containing a newline
12356 [[File:Foobar.jpg|This
12359 <p><a href="/wiki/File:Foobar.jpg" class="image" title="This *is some text"><img alt="This *is some text" src="http://example.com/images/3/3a/Foobar.jpg" width="1941" height="220" /></a>
12362 <p><span 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" height="220" width="1941"/></a></span></p>
12366 Image: caption containing leading space
12367 (The leading space should not trigger nowiki escaping in wt2wt mode)
12369 [[File:Foobar.jpg|thumb| bar]]
12371 <div class="thumb tright"><div class="thumbinner" style="width:182px;"><a href="/wiki/File:Foobar.jpg" class="image"><img alt="" src="http://example.com/images/thumb/3/3a/Foobar.jpg/180px-Foobar.jpg" width="180" height="20" class="thumbimage" srcset="http://example.com/images/thumb/3/3a/Foobar.jpg/270px-Foobar.jpg 1.5x, http://example.com/images/thumb/3/3a/Foobar.jpg/360px-Foobar.jpg 2x" /></a> <div class="thumbcaption"><div class="magnify"><a href="/wiki/File:Foobar.jpg" class="internal" title="Enlarge"></a></div>bar</div></div></div>
12374 <figure class="mw-default-size" typeof="mw:Image/Thumb"><a href="File:Foobar.jpg"><img resource="./File:Foobar.jpg" src="//example.com/images/3/3a/Foobar.jpg" height="25" width="220"/></a><figcaption> bar</figcaption></figure>
12378 Image: caption containing a table
12380 parsoid=wt2html,wt2wt,html2html
12382 [[Image:Foobar.jpg|thumb|200px|This is an example image thumbnail caption with a table
12388 and some more text.]]
12390 <div class="thumb tright"><div class="thumbinner" style="width:202px;"><a href="/wiki/File:Foobar.jpg" class="image"><img alt="" src="http://example.com/images/thumb/3/3a/Foobar.jpg/200px-Foobar.jpg" width="200" height="23" class="thumbimage" srcset="http://example.com/images/thumb/3/3a/Foobar.jpg/300px-Foobar.jpg 1.5x, http://example.com/images/thumb/3/3a/Foobar.jpg/400px-Foobar.jpg 2x" /></a> <div class="thumbcaption"><div class="magnify"><a href="/wiki/File:Foobar.jpg" class="internal" title="Enlarge"></a></div>This is an example image thumbnail caption with a table <table> <tr> <th> Foo </th> <th> Bar </th></tr> <tr> <td> Foo1 </td> <td> Bar1 </td></tr></table> and some more text.</div></div></div>
12393 <figure typeof="mw:Image/Thumb"><a href="File:Foobar.jpg"><img resource="./File:Foobar.jpg" src="//example.com/images/3/3a/Foobar.jpg" height="23" width="200"/></a><figcaption>This is an example image thumbnail caption with a table
12396 <tr><th>Foo </th><th>Bar</th></tr>
12399 <td>Bar1</td></tr></tbody></table>and some more text.</figcaption></figure>
12403 Bug 3090: External links other than http: in image captions
12405 [[File:Foobar.jpg|thumb|200x200px|This caption has [irc://example.net irc] and [https://example.com Secure] ext links in it.]]
12407 <div class="thumb tright"><div class="thumbinner" style="width:202px;"><a href="/wiki/File:Foobar.jpg" class="image"><img alt="" src="http://example.com/images/thumb/3/3a/Foobar.jpg/200px-Foobar.jpg" width="200" height="23" class="thumbimage" srcset="http://example.com/images/thumb/3/3a/Foobar.jpg/300px-Foobar.jpg 1.5x, http://example.com/images/thumb/3/3a/Foobar.jpg/400px-Foobar.jpg 2x" /></a> <div class="thumbcaption"><div class="magnify"><a href="/wiki/File:Foobar.jpg" class="internal" title="Enlarge"></a></div>This caption has <a rel="nofollow" class="external text" href="irc://example.net">irc</a> and <a rel="nofollow" class="external text" href="https://example.com">Secure</a> ext links in it.</div></div></div>
12410 <figure typeof="mw:Image/Thumb"><a href="File:Foobar.jpg"><img resource="./File:Foobar.jpg" src="//example.com/images/3/3a/Foobar.jpg" height="23" width="200"/></a><figcaption>This caption has <a rel="mw:ExtLink" href="irc://example.net">irc</a> and <a rel="mw:ExtLink" href="https://example.com">Secure</a> ext links in it.</figcaption></figure>
12416 parsoid=wt2html,wt2wt,html2html
12418 [[Image:foobar.jpg|a|class=b]]
12420 <p><a href="/wiki/File:Foobar.jpg" class="image" title="a"><img alt="a" src="http://example.com/images/3/3a/Foobar.jpg" width="1941" height="220" class="b" /></a>
12423 <p><span 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" height="220" width="1941"/></a></span></p>
12427 Localized image handling (1).
12429 parsoid=wt2html,wt2wt,html2html
12432 [[Archivo:Foobar.jpg|izquierda|enlace=foo|caption]]
12434 <div class="floatleft"><a href="/wiki/Foo" title="caption"><img alt="caption" src="http://example.com/images/3/3a/Foobar.jpg" width="1941" height="220" /></a></div>
12437 <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" height="220" width="1941"/></a><figcaption>caption</figcaption></figure>
12441 Localized image handling (2).
12444 parsoid=wt2html,wt2wt,html2html
12447 [[Archivo:Foobar.jpg|miniatura|izquierda|enlace=foo|caption]]
12449 <div class="thumb tleft"><div class="thumbinner" style="width:222px;"><a href="/wiki/Foo" title="Foo"><img alt="" src="http://example.com/images/thumb/3/3a/Foobar.jpg/220px-Foobar.jpg" width="220" height="25" class="thumbimage" srcset="http://example.com/images/thumb/3/3a/Foobar.jpg/330px-Foobar.jpg 1.5x, http://example.com/images/thumb/3/3a/Foobar.jpg/440px-Foobar.jpg 2x" /></a> <div class="thumbcaption"><div class="magnify"><a href="/wiki/Archivo:Foobar.jpg" class="internal" title="Aumentar"></a></div>caption</div></div></div>
12452 <figure class="mw-default-size mw-halign-left" typeof="mw:Image/Thumb"><a href="./Foo"><img resource="./Archivo:Foobar.jpg" src="//example.com/images/3/3a/Foobar.jpg" height="25" width="220"/></a><figcaption>caption</figcaption></figure>
12456 "border", "frameless" and "class" attributes on an image.
12459 parsoid=wt2html,wt2wt,html2html
12461 [[File:Foobar.jpg|frameless|border|class=extra|caption]]
12463 <p><a href="/wiki/File:Foobar.jpg" class="image" title="caption"><img alt="caption" src="http://example.com/images/thumb/3/3a/Foobar.jpg/220px-Foobar.jpg" width="220" height="25" class="extra thumbborder" srcset="http://example.com/images/thumb/3/3a/Foobar.jpg/330px-Foobar.jpg 1.5x, http://example.com/images/thumb/3/3a/Foobar.jpg/440px-Foobar.jpg 2x" /></a>
12466 <p><span 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/3/3a/Foobar.jpg" height="25" width="220"/></a></span></p>
12469 # Note that 'right' is the default alignment, despite the misspelled 'righ' below
12471 Invalid image attributes (bug 62500)
12474 parsoid=wt2html,wt2wt,html2html
12476 [[File:Foobar.jpg|thumb|float|left|caption]]
12478 [[File:Foobar.jpg|thumb|righ|caption]]
12480 [[File:Foobar.jpg|bogus1|thumb|bogus2|left|bogus3|caption]]
12482 <div class="thumb tleft"><div class="thumbinner" style="width:222px;"><a href="/wiki/File:Foobar.jpg" class="image"><img alt="" src="http://example.com/images/thumb/3/3a/Foobar.jpg/220px-Foobar.jpg" width="220" height="25" class="thumbimage" srcset="http://example.com/images/thumb/3/3a/Foobar.jpg/330px-Foobar.jpg 1.5x, http://example.com/images/thumb/3/3a/Foobar.jpg/440px-Foobar.jpg 2x" /></a> <div class="thumbcaption"><div class="magnify"><a href="/wiki/File:Foobar.jpg" class="internal" title="Enlarge"></a></div>caption</div></div></div>
12483 <div class="thumb tright"><div class="thumbinner" style="width:222px;"><a href="/wiki/File:Foobar.jpg" class="image"><img alt="" src="http://example.com/images/thumb/3/3a/Foobar.jpg/220px-Foobar.jpg" width="220" height="25" class="thumbimage" srcset="http://example.com/images/thumb/3/3a/Foobar.jpg/330px-Foobar.jpg 1.5x, http://example.com/images/thumb/3/3a/Foobar.jpg/440px-Foobar.jpg 2x" /></a> <div class="thumbcaption"><div class="magnify"><a href="/wiki/File:Foobar.jpg" class="internal" title="Enlarge"></a></div>caption</div></div></div>
12484 <div class="thumb tleft"><div class="thumbinner" style="width:222px;"><a href="/wiki/File:Foobar.jpg" class="image"><img alt="" src="http://example.com/images/thumb/3/3a/Foobar.jpg/220px-Foobar.jpg" width="220" height="25" class="thumbimage" srcset="http://example.com/images/thumb/3/3a/Foobar.jpg/330px-Foobar.jpg 1.5x, http://example.com/images/thumb/3/3a/Foobar.jpg/440px-Foobar.jpg 2x" /></a> <div class="thumbcaption"><div class="magnify"><a href="/wiki/File:Foobar.jpg" class="internal" title="Enlarge"></a></div>caption</div></div></div>
12487 <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/3/3a/Foobar.jpg" height="25" width="220"/></a><figcaption>caption</figcaption></figure>
12488 <figure class="mw-default-size" typeof="mw:Image/Thumb"><a href="File:Foobar.jpg"><img resource="./File:Foobar.jpg" src="//example.com/images/3/3a/Foobar.jpg" height="25" width="220"/></a><figcaption>caption</figcaption></figure>
12489 <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/3/3a/Foobar.jpg" height="25" width="220"/></a><figcaption>caption</figcaption></figure>
12495 #REDIRECT [[File:Barfoo.jpg]]
12498 # FIXME: Parsoid should run this test -- but we'd need to teach the
12499 # mockAPI about the redirected Barfoo.jpg image.
12503 [[Image:Barfoo.jpg]]
12505 <p><a href="/wiki/File:Barfoo.jpg" title="File:Barfoo.jpg">File:Barfoo.jpg</a>
12510 Missing image with uploads disabled
12514 [[File:Foobaz.jpg]]
12516 <p><a href="/wiki/File:Foobaz.jpg" title="File:Foobaz.jpg">File:Foobaz.jpg</a>
12519 <p><span class="mw-default-size" typeof="mw:Error mw:Image" data-mw='{"errors":[{"key":"missing-image","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></span></p>
12522 # Parsoid-specific testing for images
12523 # https://www.mediawiki.org/wiki/Parsoid/MediaWiki_DOM_spec#Images
12524 # Currently imperfect due to a flaw in the Parsoid testrunner
12526 # THESE TESTS SHOULD BE MOVED UP and merged with the php-specific
12530 Parsoid-specific image handling - simple image with size and middle alignment
12532 [[File:Foobar.jpg|middle|50px]]
12534 <p><span 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" height="6" width="50"></a></span></p>
12538 Parsoid-specific image handling - simple image with size, middle alignment,
12539 non-standard namespace alias
12541 parsoid=wt2wt,wt2html,html2html
12543 [[Image:Foobar.jpg|middle|50px]]
12545 <p><span 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" height="6" width="50"></a></span></p>
12549 Parsoid-specific image handling - simple image with size and middle alignment
12552 [[File:Foobar.jpg|50px|middle]]
12554 <p><span 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" height="6" width="50" data-parsoid='{"a":{"resource":"./File:Foobar.jpg","height":"6","width":"50"},"sa":{"resource":"File:Foobar.jpg"}}'/></a></span></p>
12558 Parsoid-specific image handling - simple image with size and middle alignment
12559 and non-standard namespace name
12561 parsoid=wt2html,wt2wt,html2html
12563 [[Image:Foobar.jpg|50px|middle]]
12565 <p><span 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" height="6" width="50"></a></span></p>
12569 Parsoid-specific image handling - simple image with both sizes, a baseline alignment, and a caption
12571 [[File:Foobar.jpg|500x10px|baseline|caption]]
12573 <p><span 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" height="10" width="89" data-parsoid='{"a":{"resource":"./File:Foobar.jpg","height":"10","width":"89"},"sa":{"resource":"File:Foobar.jpg"}}'/></a></span></p>
12577 Parsoid-specific image handling - simple image with border and size spec
12579 [[File:Foobar.jpg|50px|border|caption]]
12581 <p><span 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" height="6" width="50" data-parsoid='{"a":{"resource":"./File:Foobar.jpg","height":"6","width":"50"},"sa":{"resource":"File:Foobar.jpg"}}'/></a></span></p>
12585 Parsoid-specific image handling - thumbnail with halign, valign, and caption
12587 [[File:Foobar.jpg|left|baseline|thumb|caption content]]
12589 <figure class="mw-default-size mw-halign-left mw-valign-baseline" typeof="mw:Image/Thumb"><a href="File:Foobar.jpg"><img resource="./File:Foobar.jpg" src="//example.com/images/thumb/3/3a/Foobar.jpg/180px-Foobar.jpg" height="25" width="220" /></a><figcaption>caption content</figcaption></figure>
12593 Parsoid-specific image handling - thumbnail with halign, valign, and caption
12596 [[File:Foobar.jpg|thumb|left|baseline|caption content]]
12598 <figure class="mw-default-size mw-halign-left mw-valign-baseline" 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/180px-Foobar.jpg" 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>
12602 Parsoid-specific image handling - thumbnail with specific size, halign, valign, and caption
12604 [[Image:Foobar.jpg|right|middle|thumb|50x50px|caption]]
12606 <figure class="mw-halign-right mw-valign-middle" 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" height="6" width="50" /></a><figcaption>caption</figcaption></figure>
12610 Parsoid-specific image handling - thumbnail with specific size, halign,
12611 valign, and caption (existing content)
12613 [[File:Foobar.jpg|thumb|50x50px|right|middle|caption]]
12615 <figure class="mw-halign-right mw-valign-middle" 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" 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>
12619 Parsoid-specific image handling - framed image with specific size and caption
12622 parsoid=wt2html,wt2wt,html2html
12624 [[File:Foobar.jpg|frame|500x50px|caption]]
12626 <figure typeof="mw:Image/Frame"><a href="File:Foobar.jpg"><img resource="./File:Foobar.jpg" src="//example.com/images/3/3a/Foobar.jpg" height="220" width="1941" /></a><figcaption>caption</figcaption></figure>
12630 Parsoid-specific image handling - framed image with specific size, halign, valign, and caption
12633 parsoid=wt2html,wt2wt,html2html
12635 [[File:Foobar.jpg|left|baseline|frame|500x50px|caption]]
12637 <figure class="mw-halign-left mw-valign-baseline" typeof="mw:Image/Frame"><a href="File:Foobar.jpg"><img resource="./File:Foobar.jpg" src="//example.com/images/3/3a/Foobar.jpg" height="220" width="1941" /></a><figcaption>caption</figcaption></figure>
12641 Parsoid-specific image handling - frameless image with specific size, border, and caption
12643 [[File:Foobar.jpg|frameless|442x50px|border|caption]]
12645 <p><span 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" height="50" width="442" data-parsoid='{"a":{"resource":"./File:Foobar.jpg","height":"50","width":"442"},"sa":{"resource":"File:Foobar.jpg"}}'/></a></span></p>
12649 Parsoid-specific image handling - simple image with a formatted caption
12651 [[File:Foobar.jpg|<table><tr><td>a</td><td>b</td></tr><tr><td>c</td></tr></table>]]
12653 <p><span class="mw-default-size" typeof="mw:Image" data-mw='{"caption":"<table><tr><td>a</td><td>b</td></tr><tr><td>c</td></tr></table>"}'><a href="File:Foobar.jpg"><img resource="./File:Foobar.jpg" src="//example.com/images/3/3a/Foobar.jpg" height="220" width="1941"></a></span></p>
12657 Parsoid-specific image handling - caption with a template in it
12659 [[File:Foobar.jpg|thumb|200x23px|This caption has a {{echo|transclusion}} in it.]]
12661 <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" 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>
12665 Parsoid-specific image handling - caption with unbalanced tags in it
12667 parsoid=wt2html,wt2wt,html2html
12670 [[File:Foobar.jpg|thumb|200x200px|This caption has a <center>unbalanced tag in it.]]
12674 <figure typeof="mw:Image/Thumb"><a href="File:Foobar.jpg"><img resource="./File:Foobar.jpg" src="//example.com/images/3/3a/Foobar.jpg" height="23" width="200"></a><figcaption>This caption has a <center>unbalanced tag in it.</center></figcaption></figure>
12679 Parsoid-specific image handling - empty caption (1)
12681 parsoid=wt2html,wt2wt
12683 [[File:Foobar.jpg|thumb|]]
12685 <figure class="mw-default-size" typeof="mw:Image/Thumb"><a href="File:Foobar.jpg"><img resource="./File:Foobar.jpg" src="//example.com/images/3/3a/Foobar.jpg" height="25" width="220"/></a><figcaption></figcaption></figure>
12688 # empty captions don't get serialized unless we're in the "round trip" case
12690 Parsoid-specific image handling - empty caption (2)
12694 <figure class="mw-default-size" typeof="mw:Image/Thumb">
12695 <a href="File:Foobar.jpg">
12696 <img resource="./File:Foobar.jpg"
12697 src="//example.com/images/3/3a/Foobar.jpg"
12698 height="25" width="220"/>
12700 <figcaption></figcaption>
12703 [[File:Foobar.jpg|thumb]]
12707 Parsoid-specific image handling - whitespace caption
12709 [[File:Foobar.jpg|thumb| ]]
12711 <figure class="mw-default-size" typeof="mw:Image/Thumb"><a href="File:Foobar.jpg"><img resource="./File:Foobar.jpg" src="//example.com/images/3/3a/Foobar.jpg" height="25" width="220"/></a><figcaption> </figcaption></figure>
12715 Parsoid-specific image handling - lang option
12718 [[File:Foobar.svg|lang=de|caption]]
12722 <span 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" height="180" width="240"/></a></span>
12731 Subpage test/subpage
12739 subpage title=[[Subpage test]]
12743 <p><a href="/wiki/Subpage_test/subpage" title="Subpage test/subpage">/subpage</a>
12748 Subpage noslash link
12750 subpage title=[[Subpage test]]
12754 <p><a href="/wiki/Subpage_test/subpage" title="Subpage test/subpage">subpage</a>
12759 Subpage test/1/2/subpage
12765 Relative subpage noslash link
12767 parsoid=wt2wt,wt2html,html2html
12768 subpage title=[[Subpage test/1/2/3/4]]
12774 <p><a href="/wiki/Subpage_test/1/2/subpage" title="Subpage test/1/2/subpage">subpage</a>
12775 </p><p><a href="/wiki/Subpage_test/1/2/subpage" title="Subpage test/1/2/subpage">Subpage test/1/2/subpage</a>
12778 <p><a rel="mw:WikiLink" href="Subpage_test/1/2/subpage" title="Subpage test/1/2/subpage">subpage</a></p>
12779 <p><a rel="mw:WikiLink" href="Subpage_test/1/2/subpage" title="Subpage test/1/2/subpage">Subpage_test/1/2/subpage</a></p>
12783 Parsoid: dot-slash prefixed wikilinks
12793 </p><p>[[././baz/]]
12798 </p><p>[[././baz/]]
12803 Render invalid page names as plain text (bug 51090)
12816 [[{{echo|./../foo}}|bar]]
12817 [[{{echo|foo/.}}|bar]]
12818 [[{{echo|foo/..}}|bar]]
12819 [[{{echo|foo~~~~bar}}]]
12820 [[{{echo|foo>bar}}]]
12821 [[{{echo|foo././bar}}]]
12822 [[{{echo|foo{bar}}]]
12823 [[{{echo|foo}bar}}]]
12824 [[{{echo|foo[bar}}]]
12825 [[{{echo|foo]bar}}]]
12826 [[{{echo|foo<bar}}]]
12828 <p>[[./../foo|bar]]
12838 </p><p>[[./../foo|bar]]
12851 <p>[[./../foo|bar]]
12862 <p>[[<span typeof="mw:Transclusion" data-mw='{"parts":[{"template":{"target":{"wt":"echo","href":"./Template:Echo"},"params":{"1":{"wt":"./../foo"}},"i":0}}]}'>./../foo</span>|bar]]
12863 [[<span typeof="mw:Transclusion" data-mw='{"parts":[{"template":{"target":{"wt":"echo","href":"./Template:Echo"},"params":{"1":{"wt":"foo/."}},"i":0}}]}'>foo/.</span>|bar]]
12864 [[<span typeof="mw:Transclusion" data-mw='{"parts":[{"template":{"target":{"wt":"echo","href":"./Template:Echo"},"params":{"1":{"wt":"foo/.."}},"i":0}}]}'>foo/..</span>|bar]]
12865 [[<span typeof="mw:Transclusion" data-mw='{"parts":[{"template":{"target":{"wt":"echo","href":"./Template:Echo"},"params":{"1":{"wt":"foo~~~~bar"}},"i":0}}]}'>foo~~~~bar</span>]]
12866 [[<span typeof="mw:Transclusion" data-mw='{"parts":[{"template":{"target":{"wt":"echo","href":"./Template:Echo"},"params":{"1":{"wt":"foo>bar"}},"i":0}}]}'>foo>bar</span>]]
12867 [[<span typeof="mw:Transclusion" data-mw='{"parts":[{"template":{"target":{"wt":"echo","href":"./Template:Echo"},"params":{"1":{"wt":"foo././bar"}},"i":0}}]}'>foo././bar</span>]]
12868 [[<span typeof="mw:Transclusion" data-mw='{"parts":[{"template":{"target":{"wt":"echo","href":"./Template:Echo"},"params":{"1":{"wt":"foo{bar"}},"i":0}}]}'>foo{bar</span>]]
12869 [[<span typeof="mw:Transclusion" data-mw='{"parts":[{"template":{"target":{"wt":"echo","href":"./Template:Echo"},"params":{"1":{"wt":"foo}bar"}},"i":0}}]}'>foo}bar</span>]]
12870 [[<span typeof="mw:Transclusion" data-mw='{"parts":[{"template":{"target":{"wt":"echo","href":"./Template:Echo"},"params":{"1":{"wt":"foo[bar"}},"i":0}}]}'>foo[bar</span>]]
12871 [[<span typeof="mw:Transclusion" data-mw='{"parts":[{"template":{"target":{"wt":"echo","href":"./Template:Echo"},"params":{"1":{"wt":"foo]bar"}},"i":0}}]}'>foo]bar</span>]]
12872 [[<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>
12880 <p><a href="/index.php?title=/subpage&action=edit&redlink=1" class="new" title="/subpage (page does not exist)">/subpage</a>
12885 BUG 561: {{/Subpage}}
12887 subpage title=[[Page]]
12891 <p><a href="/index.php?title=Page/Subpage&action=edit&redlink=1" class="new" title="Page/Subpage (page does not exist)">Page/Subpage</a>
12899 Category:MediaWiki User's Guide
12907 [[:Category:MediaWiki User's Guide]]
12909 <p><a href="/wiki/Category:MediaWiki_User%27s_Guide" title="Category:MediaWiki User's Guide">Category:MediaWiki User's Guide</a>
12918 [[Category:MediaWiki User's Guide]]
12920 <a href="/wiki/Category:MediaWiki_User%27s_Guide" title="Category:MediaWiki User's Guide">MediaWiki User's Guide</a>
12924 PAGESINCATEGORY invalid title fatal (r33546 fix)
12926 {{PAGESINCATEGORY:<bogus>}}
12933 Category with different sort key
12937 [[Category:MediaWiki User's Guide|Foo]]
12939 <a href="/wiki/Category:MediaWiki_User%27s_Guide" title="Category:MediaWiki User's Guide">MediaWiki User's Guide</a>
12943 Category with identical sort key
12947 [[Category:MediaWiki User's Guide|MediaWiki User's Guide]]
12949 <a href="/wiki/Category:MediaWiki_User%27s_Guide" title="Category:MediaWiki User's Guide">MediaWiki User's Guide</a>
12953 Category with empty sort key
12958 [[Category:MediaWiki User's Guide|]]
12960 [[Category:MediaWiki User's Guide|MediaWiki User's Guide]]
12964 Category with empty sort key and parentheses
12969 [[Category:Foo (bar)|]]
12971 [[Category:Foo (bar)|Foo]]
12975 Category with link tail
12980 123[[Category:Foo]]456
12982 123[[Category:Foo]]456
12986 Category with template
12991 [[Category:{{echo|Foo}}]]
12993 [[Category:{{echo|Foo}}]]
12997 Category with template in sort key
13002 [[Category:Foo|{{echo|Bar}}]]
13004 [[Category:Foo|{{echo|Bar}}]]
13008 Category with template in sort key and title
13013 [[Category:{{echo|Foo}}|{{echo|Bar}}]]
13015 [[Category:{{echo|Foo}}|{{echo|Bar}}]]
13019 Category / paragraph interactions
13021 Foo [[Category:Baz]] Bar
13023 Foo [[Category:Baz]]
13031 [[Category:Baz]] Bar
13044 {{echo|[[Category:Baz]]}}
13059 Parsoid: Serialize link to category page with colon escape
13065 [[:Category:Foo|Bar]]
13068 <a rel="mw:WikiLink" href="Category:Foo" title="Category:Foo">Category:Foo</a>
13069 <a rel="mw:WikiLink" href="Category:Foo" title="Category:Foo">Bar</a>
13074 Parsoid: Link prefix/suffixes aren't applied to category links
13076 parsoid=wt2html,wt2wt,html2html
13081 <p>x<link rel="mw:PageProp/Category" href="Category:Foo">y</p>
13085 Parsoid: Serialize link to file page with colon escape
13091 [[:File:Foo.png|Bar]]
13094 <a rel="mw:WikiLink" href="File:Foo.png" title="File:Foo.png">File:Foo.png</a>
13095 <a rel="mw:WikiLink" href="File:Foo.png" title="File:Foo.png">Bar</a>
13100 Parsoid: Serialize a genuine category link without colon escape
13105 [[Category:Foo|Bar]]
13107 <link rel="mw:PageProp/Category" href="Category:Foo">
13108 <link rel="mw:PageProp/Category" href="Category:Foo#Bar">
13112 Normalize hrefs properly before testing for invalid link targets (bug 70894)
13116 <link rel="mw:PageProp/Category" href="./Category:Toxine_bactérienne"/>
13118 [[Category:Toxine bactérienne]]
13122 Parsoid: Defaultsort
13126 {{DEFAULTSORT:Foo}}
13128 <meta property="mw:PageProp/categorydefaultsort" content="Foo"/>
13132 ### Inter-language links
13135 Interlanguage links
13143 es:Alimento fr:Nourriture zh:食品
13145 <link rel="mw:PageProp/Language" href="http://es.wikipedia.org/wiki/Alimento"/>
13146 <link rel="mw:PageProp/Language" href="http://fr.wikipedia.org/wiki/Nourriture"/>
13147 <link rel="mw:PageProp/Language" href="http://zh.wikipedia.org/wiki/食品"/>
13151 Duplicate interlanguage links (bug 24502)
13162 <link rel="mw:PageProp/Language" href="http://es.wikipedia.org/wiki/1"/>
13163 <link rel="mw:PageProp/Language" href="http://es.wikipedia.org/wiki/2"/>
13164 <link rel="mw:PageProp/Language" href="http://fr.wikipedia.org/wiki/1"/>
13165 <link rel="mw:PageProp/Language" href="http://fr.wikipedia.org/wiki/2"/>
13172 Basic section headings
13179 ===Smaller headline===
13182 <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>
13185 <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>
13188 <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>
13194 Section headings with TOC
13197 === Subheadline 1 ===
13198 ===== Skipping a level =====
13199 ====== Skipping a level ======
13203 ===Another headline===
13205 <div id="toc" class="toc"><div id="toctitle"><h2>Contents</h2></div>
13207 <li class="toclevel-1 tocsection-1"><a href="#Headline_1"><span class="tocnumber">1</span> <span class="toctext">Headline 1</span></a>
13209 <li class="toclevel-2 tocsection-2"><a href="#Subheadline_1"><span class="tocnumber">1.1</span> <span class="toctext">Subheadline 1</span></a>
13211 <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>
13213 <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>
13220 <li class="toclevel-1 tocsection-5"><a href="#Headline_2"><span class="tocnumber">2</span> <span class="toctext">Headline 2</span></a>
13222 <li class="toclevel-2 tocsection-6"><a href="#Another_headline"><span class="tocnumber">2.1</span> <span class="toctext">Another headline</span></a></li>
13228 <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>
13229 <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>
13230 <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>
13231 <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>
13232 <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>
13235 <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>
13240 TOC anchors don't collide
13248 <div id="toc" class="toc"><div id="toctitle"><h2>Contents</h2></div>
13250 <li class="toclevel-1 tocsection-1"><a href="#Headline_2"><span class="tocnumber">1</span> <span class="toctext">Headline 2</span></a></li>
13251 <li class="toclevel-1 tocsection-2"><a href="#Headline"><span class="tocnumber">2</span> <span class="toctext">Headline</span></a></li>
13252 <li class="toclevel-1 tocsection-3"><a href="#Headline_2_2"><span class="tocnumber">3</span> <span class="toctext">Headline 2</span></a></li>
13253 <li class="toclevel-1 tocsection-4"><a href="#Headline_3"><span class="tocnumber">4</span> <span class="toctext">Headline</span></a></li>
13257 <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>
13258 <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>
13259 <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>
13260 <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>
13264 # perl -e 'print "="x$_," Level $_ heading","="x$_,"\n" for 1..10'
13266 Handling of sections up to level 6 and beyond
13269 == Level 2 Heading==
13270 === Level 3 Heading===
13271 ==== Level 4 Heading====
13272 ===== Level 5 Heading=====
13273 ====== Level 6 Heading======
13274 ======= Level 7 Heading=======
13275 ======== Level 8 Heading========
13276 ========= Level 9 Heading=========
13277 ========== Level 10 Heading==========
13279 <div id="toc" class="toc"><div id="toctitle"><h2>Contents</h2></div>
13281 <li class="toclevel-1 tocsection-1"><a href="#Level_1_Heading"><span class="tocnumber">1</span> <span class="toctext">Level 1 Heading</span></a>
13283 <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>
13285 <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>
13287 <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>
13289 <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>
13291 <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>
13292 <li class="toclevel-6 tocsection-7"><a href="#.3D_Level_7_Heading.3D"><span class="tocnumber">1.1.1.1.1.2</span> <span class="toctext">= Level 7 Heading=</span></a></li>
13293 <li class="toclevel-6 tocsection-8"><a href="#.3D.3D_Level_8_Heading.3D.3D"><span class="tocnumber">1.1.1.1.1.3</span> <span class="toctext">== Level 8 Heading==</span></a></li>
13294 <li class="toclevel-6 tocsection-9"><a href="#.3D.3D.3D_Level_9_Heading.3D.3D.3D"><span class="tocnumber">1.1.1.1.1.4</span> <span class="toctext">=== Level 9 Heading===</span></a></li>
13295 <li class="toclevel-6 tocsection-10"><a href="#.3D.3D.3D.3D_Level_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>
13309 <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>
13310 <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>
13311 <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>
13312 <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>
13313 <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>
13314 <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>
13315 <h6><span class="mw-headline" id=".3D_Level_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>
13316 <h6><span class="mw-headline" id=".3D.3D_Level_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>
13317 <h6><span class="mw-headline" id=".3D.3D.3D_Level_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>
13318 <h6><span class="mw-headline" id=".3D.3D.3D.3D_Level_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>
13323 TOC regression (bug 9764)
13327 ==== title 1.1.1 ====
13332 <div id="toc" class="toc"><div id="toctitle"><h2>Contents</h2></div>
13334 <li class="toclevel-1 tocsection-1"><a href="#title_1"><span class="tocnumber">1</span> <span class="toctext">title 1</span></a>
13336 <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>
13338 <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>
13341 <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>
13344 <li class="toclevel-1 tocsection-5"><a href="#title_2"><span class="tocnumber">2</span> <span class="toctext">title 2</span></a>
13346 <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>
13352 <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>
13353 <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>
13354 <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>
13355 <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>
13356 <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>
13357 <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>
13362 TOC with wgMaxTocLevel=3 (bug 6204)
13368 ==== title 1.1.1 ====
13373 <div id="toc" class="toc"><div id="toctitle"><h2>Contents</h2></div>
13375 <li class="toclevel-1 tocsection-1"><a href="#title_1"><span class="tocnumber">1</span> <span class="toctext">title 1</span></a>
13377 <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>
13378 <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>
13381 <li class="toclevel-1 tocsection-5"><a href="#title_2"><span class="tocnumber">2</span> <span class="toctext">title 2</span></a>
13383 <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>
13389 <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>
13390 <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>
13391 <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>
13392 <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>
13393 <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>
13394 <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>
13399 TOC with wgMaxTocLevel=3 and two level four headings (bug 6204)
13405 ====Section 1.1.1====
13406 ====Section 1.1.1.1====
13409 <div id="toc" class="toc"><div id="toctitle"><h2>Contents</h2></div>
13411 <li class="toclevel-1 tocsection-1"><a href="#Section_1"><span class="tocnumber">1</span> <span class="toctext">Section 1</span></a>
13413 <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>
13416 <li class="toclevel-1 tocsection-5"><a href="#Section_2"><span class="tocnumber">2</span> <span class="toctext">Section 2</span></a></li>
13420 <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>
13421 <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>
13422 <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>
13423 <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>
13424 <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>
13430 Resolving duplicate section names
13435 <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>
13436 <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>
13441 Resolving duplicate section names with differing case (bug 10721)
13446 <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>
13447 <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>
13459 Template with sections, __NOTOC__
13466 <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>
13467 <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>
13468 <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>
13469 <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>
13474 __NOEDITSECTION__ keyword
13480 <h2><span class="mw-headline" id="Section_1">Section 1</span></h2>
13481 <h2><span class="mw-headline" id="Section_2">Section 2</span></h2>
13486 Link inside a section heading
13488 ==Section with a [[Main Page|link]] in it==
13490 <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>
13495 TOC regression (bug 12077)
13502 <div id="toc" class="toc"><div id="toctitle"><h2>Contents</h2></div>
13504 <li class="toclevel-1 tocsection-1"><a href="#title_1"><span class="tocnumber">1</span> <span class="toctext">title 1</span></a>
13506 <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>
13509 <li class="toclevel-1 tocsection-3"><a href="#title_2"><span class="tocnumber">2</span> <span class="toctext">title 2</span></a></li>
13513 <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>
13514 <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>
13515 <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>
13520 BUG 1219 URL next to image (good)
13522 http://example.com [[File:Foobar.jpg]]
13524 <p><a rel="nofollow" class="external free" href="http://example.com">http://example.com</a> <a href="/wiki/File:Foobar.jpg" class="image"><img alt="Foobar.jpg" src="http://example.com/images/3/3a/Foobar.jpg" width="1941" height="220" /></a>
13527 <p><a rel="mw:ExtLink" href="http://example.com">http://example.com</a> <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" height="220" width="1941"/></a></span></p>
13531 Short headings with trailing space should match behavior of Parser::doHeadings (bug 19910)
13534 The line above must have a trailing space!
13537 But just in case it doesn't...
13539 <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>
13540 <p>The line above must have a trailing space!
13542 <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>
13543 <p>But just in case it doesn't...
13548 Header with special characters (bug 25462)
13550 The tooltips shall not show entities to the user (ie. be double escaped)
13567 <p>The tooltips shall not show entities to the user (ie. be double escaped)
13569 <div id="toc" class="toc"><div id="toctitle"><h2>Contents</h2></div>
13571 <li class="toclevel-1 tocsection-1"><a href="#text_.3E_text"><span class="tocnumber">1</span> <span class="toctext">text > text</span></a></li>
13572 <li class="toclevel-1 tocsection-2"><a href="#text_.3C_text"><span class="tocnumber">2</span> <span class="toctext">text < text</span></a></li>
13573 <li class="toclevel-1 tocsection-3"><a href="#text_.26_text"><span class="tocnumber">3</span> <span class="toctext">text & text</span></a></li>
13574 <li class="toclevel-1 tocsection-4"><a href="#text_.27_text"><span class="tocnumber">4</span> <span class="toctext">text ' text</span></a></li>
13575 <li class="toclevel-1 tocsection-5"><a href="#text_.22_text"><span class="tocnumber">5</span> <span class="toctext">text " text</span></a></li>
13579 <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>
13582 <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>
13585 <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>
13588 <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>
13591 <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>
13597 Header with space, plus and underscore as entity
13599 Id should not contain + for spaces
13601 == Space between Text ==
13604 == Space-Entity between Text ==
13607 == Plus+between+Text ==
13610 == Plus-Entity+between+Text ==
13613 == Underscore_between_Text ==
13616 == Underscore-Entity_between_Text ==
13619 [[#Space between Text]]
13620 [[#Space-Entity between Text]]
13621 [[#Plus+between+Text]]
13622 [[#Plus-Entity+between+Text]]
13623 [[#Underscore_between_Text]]
13624 [[#Underscore-Entity_between_Text]]
13626 <p>Id should not contain + for spaces
13628 <div id="toc" class="toc"><div id="toctitle"><h2>Contents</h2></div>
13630 <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>
13631 <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>
13632 <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>
13633 <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>
13634 <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>
13635 <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>
13639 <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>
13642 <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>
13645 <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>
13648 <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>
13651 <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>
13654 <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>
13656 </p><p><a href="#Space_between_Text">#Space between Text</a>
13657 <a href="#Space-Entity_between_Text">#Space-Entity between Text</a>
13658 <a href="#Plus.2Bbetween.2BText">#Plus+between+Text</a>
13659 <a href="#Plus-Entity.2Bbetween.2BText">#Plus-Entity+between+Text</a>
13660 <a href="#Underscore_between_Text">#Underscore_between_Text</a>
13661 <a href="#Underscore-Entity_between_Text">#Underscore-Entity_between_Text</a>
13666 Headers with excess '=' characters
13667 (Are similar tests necessary beyond the 1st level?)
13671 =''italic'' heading==
13672 ==''italic'' heading=
13674 <div id="toc" class="toc"><div id="toctitle"><h2>Contents</h2></div>
13676 <li class="toclevel-1 tocsection-1"><a href="#foo.3D"><span class="tocnumber">1</span> <span class="toctext">foo=</span></a></li>
13677 <li class="toclevel-1 tocsection-2"><a href="#.3Dfoo"><span class="tocnumber">2</span> <span class="toctext">=foo</span></a></li>
13678 <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>
13679 <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>
13683 <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>
13684 <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>
13685 <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>
13686 <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>
13691 HTML headers vs TOC (bug 23393)
13692 (__NOEDITSECTION__ for clearer output, doesn't matter here)
13704 <div id="toc" class="toc"><div id="toctitle"><h2>Contents</h2></div>
13706 <li class="toclevel-1"><a href="#Header_1"><span class="tocnumber">1</span> <span class="toctext">Header 1</span></a>
13708 <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>
13709 <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>
13712 <li class="toclevel-1"><a href="#Header_2"><span class="tocnumber">2</span> <span class="toctext">Header 2</span></a>
13714 <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>
13715 <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>
13721 <h1><span class="mw-headline" id="Header_1">Header 1</span></h1>
13722 <h2><span class="mw-headline" id="Header_1.1">Header 1.1</span></h2>
13723 <h2><span class="mw-headline" id="Header_1.2">Header 1.2</span></h2>
13724 <h1><span class="mw-headline" id="Header_2">Header 2</span></h1>
13725 <h2><span class="mw-headline" id="Header_2.1">Header 2.1</span></h2>
13726 <h2><span class="mw-headline" id="Header_2.2">Header 2.2</span></h2>
13731 Single-line or multiline-comments can follow headings
13733 parsoid=wt2html,wt2wt
13741 <h2><span class="mw-headline" id="foo">foo</span></h2>
13742 <h2><span class="mw-headline" id="bar">bar</span></h2>
13743 <h2><span class="mw-headline" id="baz">baz</span></h2>
13748 BUG 1219 URL next to image (broken)
13750 http://example.com[[File:Foobar.jpg]]
13752 <p><a rel="nofollow" class="external free" href="http://example.com">http://example.com</a><a href="/wiki/File:Foobar.jpg" class="image"><img alt="Foobar.jpg" src="http://example.com/images/3/3a/Foobar.jpg" width="1941" height="220" /></a>
13755 <p><a rel="mw:ExtLink" href="http://example.com">http://example.com</a><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" height="220" width="1941"/></a></span></p>
13759 Bug 1186 news: in the middle of text
13761 http://en.wikinews.org/wiki/Wikinews:Workplace
13763 <p><a rel="nofollow" class="external free" href="http://en.wikinews.org/wiki/Wikinews:Workplace">http://en.wikinews.org/wiki/Wikinews:Workplace</a>
13769 Namespaced link must have a title
13778 Namespaced link must have a title (bad fragment version)
13780 [[Project:#fragment]]
13782 <p>[[Project:#fragment]]
13788 ### HTML tags and HTML attributes
13792 div with no attributes
13794 <div>HTML rocks</div>
13796 <div>HTML rocks</div>
13801 div with double-quoted attribute
13803 <div id="rock">HTML rocks</div>
13805 <div id="rock">HTML rocks</div>
13810 div with single-quoted attribute
13812 <div id='rock'>HTML rocks</div>
13814 <div id="rock">HTML rocks</div>
13819 div with unquoted attribute
13821 <div id=rock>HTML rocks</div>
13823 <div id="rock">HTML rocks</div>
13828 div with illegal double attributes
13830 <div id="a" id="b">HTML rocks</div>
13832 <div id="b">HTML rocks</div>
13836 # FIXME: produce empty string instead of "class" in the PHP parser, following
13839 div with empty attribute value, space before equals
13843 <div class =>HTML rocks</div>
13845 <div class="">HTML rocks</div>
13850 div with multiple empty attribute values
13854 <div id= title=>HTML rocks</div>
13856 <div id="" title="">HTML rocks</div>
13861 table with multiple empty attribute values
13869 <table title="" id="">
13870 <tbody><tr><td> hi</td></tr>
13875 div with braces in attribute value
13877 <div title="{}">Foo</div>
13879 <div title="{}">Foo</div>
13882 <div title="{}">Foo</div>
13885 # This it very inconsistent in the PHP parser: it returns
13886 # class="class" if there is a space between the name and the equal sign (see
13887 # 'div with empty attribute value, space before equals'), but strips the
13888 # attribute completely if the space is missing. We hope that not much content
13889 # depends on this, so are implementing the behavior below in Parsoid for
13890 # consistencies' sake.
13891 # FIXME: fix this behavior in the PHP parser?
13893 div with empty attribute value, no space before equals
13895 parsoid=wt2html,html2html
13897 <div class=>HTML rocks</div>
13899 <div>HTML rocks</div>
13902 <div class="">HTML rocks</div>
13906 HTML multiple attributes correction
13908 <p class="error" class="awesome">Awesome!</p>
13910 <p class="awesome">Awesome!</p>
13915 Table multiple attributes correction
13918 !+ class="error" class="awesome"| status
13923 <th class="awesome"> status
13931 <DIV ID="x">HTML ROCKS</DIV>
13933 <div id="x">HTML ROCKS</div>
13938 Non-ASCII pseudo-tags are rendered as text
13947 Pseudo-tag with URL 'name' renders as url link
13949 <http://example.com/>
13951 <p><<a rel="nofollow" class="external free" href="http://example.com/">http://example.com/</a>>
13956 text with amp in the middle of nowhere
13960 <p>Remember AT&T?
13965 text with character entity: eacute
13967 I always thought é was a cute letter.
13969 <p>I always thought é was a cute letter.
13972 <p>I always thought é was a cute letter.</p>
13976 text with entity-escaped character entity-like string: eacute
13978 I always thought &eacute; was a cute letter.
13980 <p>I always thought &eacute; was a cute letter.
13985 text with undefined character entity: xacute
13987 I always thought &xacute; was a cute letter.
13989 <p>I always thought &xacute; was a cute letter.
13993 # TODO: generalize to PHP parser?
13999 <data value="5">five</data>
14000 <time datetime="2000-01-01T00:00Z">The new millenium started</time>
14001 <mark>This highlighted text</mark>
14003 <p><data value="5">five</data>
14004 <time datetime="2000-01-01T00:00Z">The new millenium started</time>
14005 <mark>This highlighted text</mark></p>
14009 HTML tag with leading space is parsed as text
14013 <p>< div>foo< /div>
14018 ### Nesting tests (see bug 41545, 50604, 51081)
14021 # This test case is fixed in Parsoid by domino 1.0.12. (bug 50604)
14022 # Note that html2wt is considerably more difficult if we use <b> in
14023 # the test case, instead of <big>
14025 Ensure that HTML adoption agency algorithm is properly implemented.
14027 <big>X<big>Y</big>Z</big>
14029 <p><big>X<big>Y</big>Z</big>
14033 # This was bug 41545 in the PHP parser.
14034 # Note that tidy doesn't handle this correctly.
14038 <kbd>X<kbd>Y</kbd>Z</kbd>
14040 <p><kbd>X<kbd>Y</kbd>Z</kbd>
14044 # The following cases were bug 51081 in the PHP parser.
14045 # Note that there are some other nestable tags (b, i, etc) which are
14046 # not covered; see bug 51081 for discussion.
14048 # Note that tidy doesn't handle this correctly.
14052 <em>X<em>Y</em>Z</em>
14054 <p><em>X<em>Y</em>Z</em>
14058 # Note that tidy doesn't handle this correctly.
14060 Nesting of <strong>
14062 <strong>X<strong>Y</strong>Z</strong>
14064 <p><strong>X<strong>Y</strong>Z</strong>
14073 <p><q>X<q>Y</q>Z</q></p>
14076 # Note that tidy doesn't handle this correctly.
14080 <ruby>X<ruby>Y</ruby>Z</ruby>
14082 <p><ruby>X<ruby>Y</ruby>Z</ruby>
14086 # Note that tidy doesn't handle this correctly.
14090 <bdo>X<bdo>Y</bdo>Z</bdo>
14092 <p><bdo>X<bdo>Y</bdo>Z</bdo>
14104 [[Media:Foobar.jpg]]
14106 <p><a href="http://example.com/images/3/3a/Foobar.jpg" class="internal" title="Foobar.jpg">Media:Foobar.jpg</a>
14111 Media link with text
14113 [[Media:Foobar.jpg|A neat file to look at]]
14115 <p><a href="http://example.com/images/3/3a/Foobar.jpg" class="internal" title="Foobar.jpg">A neat file to look at</a>
14119 # FIXME: this is still bad HTML tag nesting
14121 Media link with nasty text
14122 fixme: doBlockLevels won't wrap this in a paragraph because it contains a div
14124 [[Media:Foobar.jpg|Safe Link<div style=display:none>" onmouseover="alert(document.cookie)" onfoo="</div>]]
14126 <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>
14129 <p><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></p>
14133 Media link to nonexistent file (bug 1702)
14135 [[Media:No such.jpg]]
14137 <p><a href="/index.php?title=Special:Upload&wpDestFile=No_such.jpg" class="new" title="No such.jpg">Media:No such.jpg</a>
14142 Image link to nonexistent file (bug 1850 - good)
14144 [[File:No_such.jpg]]
14146 <p><a href="/index.php?title=Special:Upload&wpDestFile=No_such.jpg" class="new" title="File:No such.jpg">File:No such.jpg</a>
14149 <p><span class="mw-default-size" typeof="mw:Error mw:Image" data-mw='{"errors":[{"key":"missing-image","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></span></p>
14153 :Image link to nonexistent file (bug 1850 - bad)
14155 [[:Image:No such.jpg]]
14157 <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>
14160 <p><a rel="mw:WikiLink" href="./File:No_such.jpg" title="File:No such.jpg">Image:No such.jpg</a></p>
14166 Character reference normalization in link text (bug 1938)
14168 [[Main Page|this&that]]
14170 <p><a href="/wiki/Main_Page" title="Main Page">this&that</a>
14177 Test for unicode normalization
14179 The page's name is U+05d0 U+05b7, with non-canonical form U+FB2E
14183 (bug 19451) Links should refer to the normalized form.
14191 <p><a href="/wiki/%D7%90%D6%B7" title="אַ">אַ</a>
14192 <a href="/wiki/%D7%90%D6%B7" title="אַ">אַ</a>
14193 <a href="/wiki/%D7%90%D6%B7" title="אַ">אַ</a>
14194 <a href="/wiki/%D7%90%D6%B7" title="אַ">אַ</a>
14195 <a href="/wiki/%D7%90%D6%B7" title="אַ">אַ</a>
14200 Empty attribute crash test (bug 2067)
14202 <font color="">foo</font>
14204 <p><font color="">foo</font>
14209 Empty attribute crash test single-quotes (bug 2067)
14211 <font color=''>foo</font>
14213 <p><font color="">foo</font>
14218 Attribute test: equals, then nothing
14220 <font color=>foo</font>
14222 <p><font>foo</font>
14227 Attribute test: unquoted value
14229 <font color=x>foo</font>
14231 <p><font color="x">foo</font>
14236 Attribute test: unquoted but illegal value (hash)
14238 <font color=#x>foo</font>
14240 <p><font color="#x">foo</font>
14245 Attribute test: no value
14247 <font color>foo</font>
14249 <p><font color="color">foo</font>
14254 Bug 2095: link with three closing brackets
14258 <p><a href="/wiki/Main_Page" title="Main Page">Main Page</a>]
14261 <p><a rel="mw:WikiLink" href="./Main_Page" title="Main Page">Main Page</a>]</p>
14265 Bug 2095: link with pipe and three closing brackets
14267 [[Main Page|link]]]
14269 <p><a href="/wiki/Main_Page" title="Main Page">link</a>]
14272 <p><a rel="mw:WikiLink" href="./Main_Page" title="Main Page">link</a>]</p>
14276 Bug 2095: link with pipe and three closing brackets, version 2
14278 [[Main Page|[http://example.com/]]]
14280 <p><a href="/wiki/Main_Page" title="Main Page">[http://example.com/]</a>
14283 <p><a rel="mw:WikiLink" href="./Main_Page" title="Main Page">[http://example.com/]</a></p>
14292 Template:Dangerous attribute
14294 " onmouseover="alert(document.cookie)
14298 Template:Dangerous style attribute
14300 border-size: expression(alert(document.cookie))
14306 <div style="float: right; {{{1}}}">Magic div</div>
14310 Bug 2304: HTML attribute safety (safe template; regression bug 2309)
14312 <div title="{{test}}"></div>
14314 <div title="This is a test template"></div>
14318 # Parsoid has enough context to handle this case
14320 Bug 2304: HTML attribute safety (dangerous template; 2309)
14322 <div title="{{dangerous attribute}}"></div>
14324 <div title=""></div>
14327 <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=\"{&quot;pi&quot;:[[]],&quot;dsr&quot;:[12,35,null,null]}\" data-mw=\"{&quot;parts&quot;:[{&quot;template&quot;:{&quot;target&quot;:{&quot;wt&quot;:&quot;dangerous attribute&quot;,&quot;href&quot;:&quot;./Template:Dangerous_attribute&quot;},&quot;params&quot;:{},&quot;i&quot;:0}}]}\">\" onmouseover=\"alert(document.cookie)</span>"}]]}'></div>
14331 Bug 2304: HTML attribute safety (dangerous style template; 2309)
14333 <div style="{{dangerous style attribute}}"></div>
14335 <div style="/* insecure input */"></div>
14340 Bug 2304: HTML attribute safety (safe parameter; 2309)
14342 {{div style|width: 200px}}
14344 <div style="float: right; width: 200px">Magic div</div>
14349 Bug 2304: HTML attribute safety (unsafe parameter; 2309)
14351 {{div style|width: expression(alert(document.cookie))}}
14353 <div style="/* insecure input */">Magic div</div>
14358 Bug 2304: HTML attribute safety (unsafe breakout parameter; 2309)
14360 {{div style|"><script>alert(document.cookie)</script>}}
14362 <div style="float: right;"><script>alert(document.cookie)</script>">Magic div</div>
14367 Bug 2304: HTML attribute safety (unsafe breakout parameter 2; 2309)
14369 {{div style|" ><script>alert(document.cookie)</script>}}
14371 <div style="float: right;"><script>alert(document.cookie)</script>">Magic div</div>
14376 Bug 2304: HTML attribute safety (link)
14378 <div title="[[Main Page]]"></div>
14380 <div title="[[Main Page]]"></div>
14385 Bug 2304: HTML attribute safety (italics)
14387 <div title="''foobar''"></div>
14389 <div title="''foobar''"></div>
14394 Bug 2304: HTML attribute safety (bold)
14396 <div title="'''foobar'''"></div>
14398 <div title="'''foobar'''"></div>
14404 Bug 2304: HTML attribute safety (ISBN)
14406 <div title="ISBN 1234567890"></div>
14408 <div title="ISBN 1234567890"></div>
14413 Bug 2304: HTML attribute safety (RFC)
14415 <div title="RFC 1234"></div>
14417 <div title="RFC 1234"></div>
14422 Bug 2304: HTML attribute safety (PMID)
14424 <div title="PMID 1234567890"></div>
14426 <div title="PMID 1234567890"></div>
14431 Bug 2304: HTML attribute safety (web link)
14433 <div title="http://example.com/"></div>
14435 <div title="http://example.com/"></div>
14440 Bug 2304: HTML attribute safety (named web link)
14442 <div title="[http://example.com/ link]"></div>
14444 <div title="[http://example.com/ link]"></div>
14449 Bug 3244: HTML attribute safety (extension; safe)
14451 <div style="<nowiki>background:blue</nowiki>"></div>
14453 <div style="background:blue"></div>
14458 Bug 3244: HTML attribute safety (extension; unsafe)
14460 <div style="<nowiki>border-left:expression(alert(document.cookie))</nowiki>"></div>
14462 <div style="/* insecure input */"></div>
14466 # More MSIE fun discovered by Tom Gilder
14469 MSIE CSS safety test: spurious slash
14471 <div style="background-image:u\rl(javascript:alert('boo'))">evil</div>
14473 <div style="/* insecure input */">evil</div>
14478 MSIE CSS safety test: hex code
14480 <div style="background-image:u\72l(javascript:alert('boo'))">evil</div>
14482 <div style="/* insecure input */">evil</div>
14487 MSIE CSS safety test: comment in url
14489 <div style="background-image:u/**/rl(javascript:alert('boo'))">evil</div>
14491 <div style="background-image:u rl(javascript:alert('boo'))">evil</div>
14496 MSIE CSS safety test: comment in expression
14498 <div style="background-image:expres/**/sion(alert('boo4'))">evil4</div>
14500 <div style="background-image:expres sion(alert('boo4'))">evil4</div>
14505 CSS safety test (all browsers): vertical tab (bug 55332 / CVE-2013-4567)
14507 <p style="font-size: 100px; background-image:url\b(https://www.google.com/images/srpr/logo6w.png)">A</p>
14509 <p style="/* invalid control char */">A</p>
14514 MSIE 6 CSS safety test: Fullwidth (bug 55332)
14516 <p style="font-size: 100px; color: expression((title='XSSed'),'red')">A</p>
14517 <div style="top:EXPRESSION(alert())">B</div>
14519 <p style="/* insecure input */">A</p>
14520 <div style="/* insecure input */">B</div>
14525 MSIE 6 CSS safety test: IPA extensions (bug 55332)
14527 <div style="background-image:uʀʟ(javascript:alert())">A</div>
14528 <p style="font-size: 100px; color: expʀessɪoɴ((title='XSSed'),'red')">B</p>
14530 <div style="/* insecure input */">A</div>
14531 <p style="/* insecure input */">B</p>
14536 MSIE 6 CSS safety test: sup/sub script (bug 55332)
14538 <div style="background-image:url⁽javascript:alert())">A</div>
14539 <div style="background-image:url₍javascript:alert())">B</div>
14540 <p style="font-size: 100px; color: expressioⁿ((title='XSSed'),'red')">C</p>
14542 <div style="/* insecure input */">A</div>
14543 <div style="/* insecure input */">B</div>
14544 <p style="/* insecure input */">C</p>
14552 title="data:text/html,<img src=1 onerror=alert(1)>"
14553 style="-o-link:attr(title);-o-link-source:current">X</div>
14555 <div title="data:text/html,<img src=1 onerror=alert(1)>" style="/* insecure input */">X</div>
14560 MSIE 6 CSS safety test: Repetition markers (bug 55332)
14562 <p style="font-size: 100px; color: expres〱ion((title='XSSed'),'red')">A</p>
14563 <p style="font-size: 100px; color: expresゝion((title='XSSed'),'red')">B</p>
14564 <p style="font-size: 100px; color: expresーion((title='XSSed'),'red')">C</p>
14565 <p style="font-size: 100px; color: expresヽion((title='XSSed'),'red')">D</p>
14566 <p style="font-size: 100px; color: expresﹽion((title='XSSed'),'red')">E</p>
14567 <p style="font-size: 100px; color: expresﹼion((title='XSSed'),'red')">F</p>
14568 <p style="font-size: 100px; color: expresーion((title='XSSed'),'red')">G</p>
14570 <p style="/* insecure input */">A</p>
14571 <p style="/* insecure input */">B</p>
14572 <p style="/* insecure input */">C</p>
14573 <p style="/* insecure input */">D</p>
14574 <p style="/* insecure input */">E</p>
14575 <p style="/* insecure input */">F</p>
14576 <p style="/* insecure input */">G</p>
14581 Table attribute legitimate extension
14584 !+ style="<nowiki>color:blue</nowiki>"| status
14589 <th style="color:blue"> status
14595 Table attribute safety
14598 !+ style="<nowiki>border-width:expression(0+alert(document.cookie))</nowiki>"| status
14603 <th style="/* insecure input */"> status
14609 CSS line continuation 1
14611 <div style="background-image: u\ rl(test.jpg);"></div>
14613 <div style="/* insecure input */"></div>
14618 CSS line continuation 2
14620 <div style="background-image: u\ rl(test.jpg); "></div>
14622 <div style="/* insecure input */"></div>
14633 Expansion of multi-line templates in attribute values (bug 6255)
14635 <div style="background: {{identity|#00FF00}}">-</div>
14637 <div style="background: #00FF00">-</div>
14643 Expansion of multi-line templates in attribute values (bug 6255 sanity check)
14645 <div style="background:
14648 <div style="background: #00FF00">-</div>
14651 <div style="background:
14656 Expansion of multi-line templates in attribute values (bug 6255 sanity check 2)
14658 <div style="background: #00FF00">-</div>
14660 <div style="background: #00FF00">-</div>
14665 evil <math>-wiki-tags without Extension:Math enabled
14667 <math><img src="some evil external link"><script>some_evil_javascript();</script></math>
14669 <p><math><img src="some evil external link"><script>some_evil_javascript();</script></math></p>
14673 ### Parser hooks (see tests/parser/parserTestsParserHook.php for the <tag> extension)
14676 Parser hook: empty input
14689 Parser hook: empty input using terminated empty elements
14702 Parser hook: empty input using terminated empty elements (space before)
14715 Parser hook: basic input
14729 Parser hook: case insensitive
14743 Parser hook: case insensitive, redux
14756 Parser hook: nested tags
14760 <tag><tag></tag></tag>
14771 Parser hook: basic arguments
14773 <tag width=200 height = "100" depth = '50' square></tag>
14781 'square' => 'square',
14788 Parser hook: argument containing a forward slash (bug 5344)
14790 <tag filename='/tmp/bla'></tag>
14795 'filename' => '/tmp/bla',
14802 Parser hook: empty input using terminated empty elements (bug 2374)
14815 # </tag> should be output literally since there is no matching tag that begins it
14817 Parser hook: basic arguments using terminated empty elements (bug 2374)
14819 <tag width=200 height = "100" depth = '50' square/>
14829 'square' => 'square',
14838 ### (see tests/parser/parserTestsParserHook.php for the <statictag> extension)
14842 Parser hook: static parser hook not inside a comment
14844 <statictag>hello, world</statictag>
14845 <statictag action=flush/>
14853 Parser hook: static parser hook inside a comment
14855 <!-- <statictag>hello, world</statictag> -->
14856 <statictag action=flush/>
14862 # Nested template calls; this case was broken by Parser.php rev 1.506,
14866 Template:One-parameter
14868 (My parameter is: {{{1}}})
14872 Template:Map-one-parameter
14874 {{{{{1}}}|{{{2}}}}}
14878 Nested template calls
14880 {{Map-one-parameter|One-parameter|param}}
14882 <p>(My parameter is: param)
14891 # HTML+Tidy effectively strips out the empty tags completely
14892 # But since Parsoid doesn't it wraps the <s></s> tags in p-tags
14893 # which Tidy would have done for the PHP parser had there been content inside it.
14895 Sanitizer: Closing of open tags
14897 <s></s><table></table>
14899 <s></s><table></table>
14902 <p><s></s></p><table></table>
14906 Sanitizer: Closing of open but not closed tags
14915 Sanitizer: Closing of closed but not open tags
14924 Sanitizer: Closing of closed but not open table tags
14926 Table not started</td></tr></table>
14928 <p>Table not started</td></tr></table>
14933 Sanitizer: Escaping of spaces, multibyte characters, colons & other stuff in id=""
14935 <span id="æ: v">byte</span>[[#æ: v|backlink]]
14937 <p><span id=".C3.A6:_v">byte</span><a href="#.C3.A6:_v">backlink</a>
14941 # In HTML5, the restrictions are that id must contain at least one character,
14942 # and must not contain any space characters.
14944 Sanitizer: Validating the contents of the id attribute (bug 4515)
14948 <br id="" /><br id="a space" />
14953 # In HTML5, id must be unique amongst all the ids in the element's home subtree.
14955 Sanitizer: Validating id attribute uniqueness (bug 4515, bug 6301)
14959 <br id="foo" /><br id="foo" />
14961 Something need to be done. foo-2 ?
14965 Sanitizer: Validating that <meta> and <link> work, but only for Microdata
14968 <meta itemprop="hello" content="world">
14969 <meta http-equiv="refresh" content="5">
14970 <meta itemprop="hello" http-equiv="refresh" content="5">
14971 <link itemprop="hello" href="{{SERVER}}">
14972 <link rel="stylesheet" href="{{SERVER}}">
14973 <link rel="stylesheet" itemprop="hello" href="{{SERVER}}">
14976 <div itemscope="itemscope">
14977 <p> <meta itemprop="hello" content="world" />
14978 <meta http-equiv="refresh" content="5">
14979 <meta itemprop="hello" content="5" />
14981 <link itemprop="hello" href="http://example.org" />
14982 <link rel="stylesheet" href="<a rel="nofollow" class="external free" href="http://example.org">http://example.org</a>">
14983 <link itemprop="hello" href="http://example.org" />
14989 Language converter: output gets cut off unexpectedly (bug 5757)
14993 this bit is safe: }-
14995 but if we add a conversion instance: -{zh-cn:xxx;zh-tw:yyy}-
14997 then we get cut off here: }-
14999 all additional text is vanished
15001 <p>this bit is safe: }-
15002 </p><p>but if we add a conversion instance: xxx
15003 </p><p>then we get cut off here: }-
15004 </p><p>all additional text is vanished
15009 Self closed html pairs (bug 5487)
15012 <center><font id="bug" />Centered text</center>
15013 <div><font id="bug2" />In div text</div>
15015 <center><font id="bug" />Centered text</center>
15016 <div><font id="bug2" />In div text</div>
15025 Punctuation: nbsp before exclamation
15029 <p>C'est grave !
15034 Punctuation: CSS !important (bug 11874)
15036 <div style="width:50% !important">important</div>
15038 <div style="width:50% !important">important</div>
15043 Punctuation: CSS ! important (bug 11874; with space after)
15045 <div style="width:50% ! important">important</div>
15047 <div style="width:50% ! important">important</div>
15052 HTML bullet list, closed tags (bug 5497)
15065 <ul data-parsoid='{"stx":"html"}'>
15066 <li data-parsoid='{"stx":"html"}'>One</li>
15067 <li data-parsoid='{"stx":"html"}'>Two</li>
15073 HTML bullet list, unclosed tags (bug 5497)
15085 <ul data-parsoid='{"stx":"html"}'>
15086 <li data-parsoid='{"stx":"html","autoInsertedEnd":true}'>One</li>
15087 <li data-parsoid='{"stx":"html","autoInsertedEnd":true}'>Two</li>
15093 HTML ordered list, closed tags (bug 5497)
15106 <ol data-parsoid='{"stx":"html"}'>
15107 <li data-parsoid='{"stx":"html"}'>One</li>
15108 <li data-parsoid='{"stx":"html"}'>Two</li>
15114 HTML ordered list, unclosed tags (bug 5497)
15127 <ol data-parsoid='{"stx":"html"}'>
15128 <li data-parsoid='{"stx":"html","autoInsertedEnd":true}'>One</li>
15129 <li data-parsoid='{"stx":"html","autoInsertedEnd":true}'>Two</li>
15135 HTML nested bullet list, closed tags (bug 5497)
15160 HTML nested bullet list, open tags (bug 5497)
15197 HTML nested ordered list, closed tags (bug 5497)
15222 HTML nested ordered list, open tags (bug 5497)
15259 HTML ordered list item with parameters oddity
15261 <ol><li id="fragment">One</li>
15264 <ol><li id="fragment">One</li>
15269 # parsoid doesn't explicitly mark autonumbered links, see bug 53505
15271 bug 5918: autonumbering
15273 [http://first/] [http://second] [ftp://ftp]
15277 [mailto:enclosed@mail.tld With target]
15279 [mailto:enclosed@mail.tld]
15281 mailto:inline@mail.tld
15283 <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>
15284 </p><p><a rel="nofollow" class="external free" href="ftp://inlineftp">ftp://inlineftp</a>
15285 </p><p><a rel="nofollow" class="external text" href="mailto:enclosed@mail.tld">With target</a>
15286 </p><p><a rel="nofollow" class="external autonumber" href="mailto:enclosed@mail.tld">[4]</a>
15287 </p><p><a rel="nofollow" class="external free" href="mailto:inline@mail.tld">mailto:inline@mail.tld</a>
15290 <p><a rel="mw:ExtLink" href="http://first/"></a> <a rel="mw:ExtLink" href="http://second"></a> <a rel="mw:ExtLink" href="ftp://ftp"></a></p>
15291 <p><a rel="mw:ExtLink" href="ftp://inlineftp">ftp://inlineftp</a></p>
15292 <p><a rel="mw:ExtLink" href="mailto:enclosed@mail.tld">With target</a></p>
15293 <p><a rel="mw:ExtLink" href="mailto:enclosed@mail.tld"></a></p>
15294 <p><a rel="mw:ExtLink" href="mailto:inline@mail.tld">mailto:inline@mail.tld</a></p>
15299 # Security and HTML correctness
15300 # From Nick Jenkins' fuzz testing
15304 Fuzz testing: Parser13
15319 Fuzz testing: Parser14
15324 <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>
15325 http://<div id="toc" class="toc"><div id="toctitle"><h2>Contents</h2></div>
15327 <li class="toclevel-1 tocsection-1"><a href="#onmouseover.3D"><span class="tocnumber">1</span> <span class="toctext">onmouseover=</span></a></li>
15333 <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>
15335 <div id="toc" class="toc">
15336 <div id="toctitle">
15340 <li class="toclevel-1 tocsection-1"><a href="#onmouseover.3D"><span class="tocnumber">1</span> <span class="toctext">onmouseover=</span></a></li>
15346 Fuzz testing: Parser14-table
15351 <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>
15352 <table style="__TOC__">
15357 <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>
15358 <table style="__TOC__">
15365 # Known to produce bogus xml (extra </td>)
15367 Fuzz testing: Parser16
15396 Fuzz testing: Parser21
15399 ! irc://{{ftp://a" onmouseover="alert('hello world');"
15404 <th> <a rel="nofollow" class="external free" href="irc://{{ftp://a">irc://{{ftp://a</a>" onmouseover="alert('hello world');"
15414 Fuzz testing: Parser22
15416 http://===r:::https://b
15420 <p><a rel="nofollow" class="external free" href="http://===r:::https://b">http://===r:::https://b</a>
15428 # Known to produce bad XML for now
15430 Fuzz testing: Parser24
15437 | {{{{SSSll!!!!!!!VVVV)]]][[Special:*xxxxxxx--><noinclude>}}}} >
15438 <br style="onmouseover='alert(document.cookie);' " />
15440 MOVE YOUR MOUSE CURSOR OVER THIS TEXT
15445 <u class="|">}}}} >
15446 <br style="onmouseover='alert(document.cookie);'" />
15448 MOVE YOUR MOUSE CURSOR OVER THIS TEXT
15457 # Note: the current result listed for this is not what the original one was,
15458 # but the original bug was JavaScript injection, which is fixed in any case.
15459 # It's not clear that the original result listed was any more correct than the
15460 # current one. Original result:
15463 # <li class="||">
15464 # }}}blah" onmouseover="alert('hello world');" align="left"<b>MOVE MOUSE CURSOR OVER HERE</b>
15466 Fuzz testing: Parser25 (bug 6055)
15472 }}}blah" onmouseover="alert('hello world');" align="left"'''MOVE MOUSE CURSOR OVER HERE
15474 <p><LI CLASS=blah" onmouseover="alert('hello world');" align="left"<b>MOVE MOUSE CURSOR OVER HERE</b>
15479 Fuzz testing: URL adjacent extension (with space, clean)
15481 http://example.com <nowiki>junk</nowiki>
15483 <p><a rel="nofollow" class="external free" href="http://example.com">http://example.com</a> junk
15486 <p><a rel="mw:ExtLink" href="http://example.com" data-parsoid='{"stx":"url"}'>http://example.com</a> <span typeof="mw:Nowiki">junk</span></p>
15490 Fuzz testing: URL adjacent extension (no space, dirty; nowiki)
15492 http://example.com<nowiki>junk</nowiki>
15494 <p><a rel="nofollow" class="external free" href="http://example.com">http://example.com</a>junk
15497 <p><a rel="mw:ExtLink" href="http://example.com" data-parsoid='{"stx":"url"}'>http://example.com</a><span typeof="mw:Nowiki">junk</span></p>
15501 Fuzz testing: URL adjacent extension (no space, dirty; pre)
15503 http://example.com<pre>junk</pre>
15505 <a rel="nofollow" class="external free" href="http://example.com">http://example.com</a><pre>junk</pre>
15508 <p><a rel="nofollow" class="external free" href="http://example.com">http://example.com</a></p>
15513 <p><a rel="mw:ExtLink" href="http://example.com" data-parsoid='{"stx":"url"}'>http://example.com</a></p><pre data-parsoid='{"stx":"html"}'>junk</pre>
15517 Fuzz testing: image with bogus manual thumbnail
15519 [[Image:foobar.jpg|thumbnail= ]]
15521 <div class="thumb tright"><div class="thumbinner" style="width:182px;">Error creating thumbnail: <div class="thumbcaption"></div></div></div>
15524 <figure class="mw-default-size" typeof="mw:Error mw:Image/Thumb" data-parsoid='{"optList":[{"ck":"manualthumb","ak":"thumbnail= "}],"dsr":[0,32,2,2]}' data-mw='{"errors":[{"key":"missing-thumbnail","message":"This thumbnail does not exist.","params":{"name":""}}],"thumb":""}'><a href="./File:Foobar.jpg" data-parsoid='{"a":{"href":"./File:Foobar.jpg"},"sa":{},"dsr":[2,30,null,null]}'><img resource="./File:Foobar.jpg" src="./Special:FilePath/" height="220" width="220" data-parsoid='{"a":{"resource":"./File:Foobar.jpg","height":"220","width":"220"},"sa":{"resource":"Image:foobar.jpg"}}'/></a></figure>
15528 Fuzz testing: encoded newline in generated HTML replacements (bug 6577)
15530 <pre dir=" "></pre>
15532 <pre dir=" "></pre>
15537 Parsing optional HTML elements (Bug 6171)
15542 <td> Some tabular data</td>
15543 <td> More tabular data ...
15544 <td> And yet som tabular data</td>
15550 <td> Some tabular data</td>
15551 <td> More tabular data ...
15552 </td><td> And yet som tabular data</td>
15559 Correct handling of <td>, <tr> (Bug 6171)
15564 <td> Some tabular data</td>
15565 <td> More tabular data ...</td>
15566 <td> And yet som tabular data</td>
15572 <td> Some tabular data</td>
15573 <td> More tabular data ...</td>
15574 <td> And yet som tabular data</td>
15582 Parsing crashing regression (fr:JavaScript)
15586 <p></body></x>
15591 Inline wiki vs wiki block nesting
15597 <p><b>Bold paragraph</b>
15598 </p><p>New wiki paragraph
15602 # FIXME: The current php output is documented
15603 # and desired output is the parsoid target.
15605 Inline HTML vs wiki block nesting
15611 <p><b>Bold paragraph
15612 </p><p>New wiki paragraph</b>
15615 <p><b>Bold paragraph</b>
15616 </p><p>New wiki paragraph
15620 # Original result was this:
15621 # <p><b>bold</b><b>bold<i>bolditalics</i></b>
15623 # While that might be marginally more intuitive, maybe, the six-apostrophe
15624 # construct is clearly pathological and the result stated here (which is what
15625 # the parser actually does) is about as reasonable as anything.
15627 Mixing markup for italics and bold
15630 '''bold''''''bold''bolditalics'''''
15632 <p>'<i>bold'</i><b>bold<i>bolditalics</i></b>
15640 Article for special page transclusion test
15644 Special page transclusion
15647 {{Special:Prefixindex/Xyzzyx}}
15649 <table class="mw-prefixindex-list-table"><tr><td><a href="/wiki/Xyzzyx" title="Xyzzyx">Xyzzyx</a></td></tr></table>
15654 Special page transclusion twice (bug 5021)
15657 {{Special:Prefixindex/Xyzzyx}}
15658 {{Special:Prefixindex/Xyzzyx}}
15660 <table class="mw-prefixindex-list-table"><tr><td><a href="/wiki/Xyzzyx" title="Xyzzyx">Xyzzyx</a></td></tr></table>
15661 <table class="mw-prefixindex-list-table"><tr><td><a href="/wiki/Xyzzyx" title="Xyzzyx">Xyzzyx</a></td></tr></table>
15666 Transclusion of default MediaWiki message
15668 {{MediaWiki:Mainpage}}
15675 Transclusion of nonexistent MediaWiki message
15677 {{MediaWiki:Mainpagexxx}}
15679 <p><a href="/index.php?title=MediaWiki:Mainpagexxx&action=edit&redlink=1" class="new" title="MediaWiki:Mainpagexxx (page does not exist)">MediaWiki:Mainpagexxx</a>
15684 Transclusion of MediaWiki message with underscore
15686 {{MediaWiki:history_short}}
15693 Transclusion of MediaWiki message with space
15695 {{MediaWiki:history short}}
15702 Invalid header with following text
15712 Section extraction test (section 0)
15732 Section extraction test (section 1)
15754 Section extraction test (section 2)
15775 Section extraction test (section 3)
15795 Section extraction test (section 4)
15819 Section extraction test (section 5)
15839 Section extraction test (section 6)
15860 Section extraction test (section 7)
15880 Section extraction test (section 8)
15900 Section extraction test (section 9)
15921 Section extraction test (section 10)
15941 Section extraction test (nonexistent section 11)
15960 Section extraction test with bogus heading (section 1)
15965 ==bogus== not a legal section
15969 ==bogus== not a legal section
15973 Section extraction test with bogus heading (section 2)
15978 ==bogus== not a legal section
15985 Section extraction test with comment after heading (section 1)
15997 Section extraction test with comment after heading (section 2)
16009 Section extraction test with bogus <nowiki> heading (section 1)
16014 ==bogus== <nowiki>not a legal section</nowiki>
16018 ==bogus== <nowiki>not a legal section</nowiki>
16022 Section extraction test with bogus <nowiki> heading (section 2)
16027 ==bogus== <nowiki>not a legal section</nowiki>
16034 # Formerly testing for bug 2587, now resolved by the use of unmarked sections
16035 # instead of respecting commented sections
16037 Section extraction prefixed by comment (section 1)
16048 Section extraction prefixed by comment (section 2)
16059 # Formerly testing for bug 2607, now resolved by the use of unmarked sections
16060 # instead of respecting HTML-style headings
16062 Section extraction, mixed wiki and html (section 1)
16078 Section extraction, mixed wiki and html (section 2)
16094 # Formerly testing for bug 3342
16096 Section extraction, heading surrounded by <noinclude>
16100 <noinclude>==unmarked==</noinclude>
16106 # Test behavior of bug 19910
16108 Sectiion with all-equals
16113 The line above must have a trailing space
16116 But just in case it doesn't...
16120 But just in case it doesn't...
16124 Section replacement test (section 0)
16155 Section replacement test (section 1)
16184 Section replacement test (section 2)
16214 Section replacement test (section 3)
16245 Section replacement test (section 4)
16272 Section replacement test (section 5)
16303 Section replacement test (section 6)
16333 Section replacement test (section 7)
16364 Section replacement test (section 8)
16395 Section replacement test (section 9)
16424 Section replacement test (section 10)
16454 Section replacement test with initial whitespace (bug 13728)
16458 Preformatted initial line
16462 Preformatted initial line
16469 Section extraction, heading followed by pre with 20 spaces (bug 6398)
16481 Section extraction, heading followed by pre with 19 spaces (bug 6398 sanity check)
16494 Section extraction, <pre> around bogus header (bug 10309)
16511 Section replacement, <pre> around bogus header (bug 10309)
16513 noxml replace=2,"xxx"
16534 Handling of 
 in URLs
16538 <ul><li><ul><li> <a rel="nofollow" class="external free" href="irc://%0Aa">irc://%0Aa</a></li></ul></li></ul>
16541 <ul><li><ul><li> <a rel="mw:ExtLink" href="irc://
16543 a</a></li></ul></li></ul>
16547 Handling of %0A in URLs
16551 <ul><li><ul><li> <a rel="nofollow" class="external free" href="irc://%0Aa">irc://%0Aa</a></li></ul></li></ul>
16554 <ul><li><ul><li> <a rel="mw:ExtLink" href="irc://%0Aa">irc://%0Aa</a></li></ul></li></ul>
16558 # The PHP parser strips the empty tags out for giggles; parsoid doesn't.
16560 5 quotes, code coverage +1 line
16567 <p><b><i></i></b></p>
16570 # same html as previous, but wikitext adjusted to match parsoid html2wt
16571 # note that wt2html and html2html will put the <i> before the <b>
16573 5 quotes, code coverage +1 line w/ nowiki (1)
16575 parsoid=wt2wt,html2wt
16577 '''''<nowiki/>'''''
16582 <p><b><i></i></b></p>
16585 # same as previous, just swapping the <i> and <b>
16587 5 quotes, code coverage +1 line w/ nowiki (2)
16589 '''''<nowiki/>'''''
16594 <p><i><b></b></i></p>
16598 Special:Search page linking.
16602 <p><a href="/wiki/Special:Search" title="Special:Search">Special:Search</a>
16607 {{!}} is a magic word
16609 {{!}} is a magic word there and {{!}} is still a magic word here
16611 <p>| is a magic word there and | is still a magic word here
16614 <p><span about="#mwt1" typeof="mw:Transclusion" data-mw='{"parts":[{"template":{"target":{"wt":"!","href":"./Template:!"},"params":{},"i":0}}]}' data-parsoid='{"pi":[[]]}'>|</span> is a magic word there and <span about="#mwt2" typeof="mw:Transclusion" data-mw='{"parts":[{"template":{"target":{"wt":"!","href":"./Template:!"},"params":{},"i":0}}]}' data-parsoid='{"pi":[[]]}'>|</span> is still a magic word here</p>
16620 title=[[Parser test]]
16625 * {{FULLPAGENAMEE}}
16627 * {{BASEPAGENAMEE}}
16631 * {{ROOTPAGENAMEE}}
16633 * {{TALKPAGENAMEE}}
16634 * {{SUBJECTPAGENAME}}
16635 * {{SUBJECTPAGENAMEE}}
16638 * {{NAMESPACENUMBER}}
16642 * {{SUBJECTSPACEE}}
16643 * {{Dynamic|{{NUMBEROFUSERS}}|{{NUMBEROFPAGES}}|{{CURRENTVERSION}}|{{CONTENTLANGUAGE}}|{{DIRECTIONMARK}}|{{CURRENTTIMESTAMP}}|{{NUMBEROFARTICLES}}}}
16645 <ul><li> Parser test</li>
16646 <li> Parser_test</li>
16647 <li> Parser test</li>
16648 <li> Parser_test</li>
16649 <li> Parser test</li>
16650 <li> Parser_test</li>
16651 <li> Parser test</li>
16652 <li> Parser_test</li>
16653 <li> Parser test</li>
16654 <li> Parser_test</li>
16655 <li> Talk:Parser test</li>
16656 <li> Talk:Parser_test</li>
16657 <li> Parser test</li>
16658 <li> Parser_test</li>
16666 <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>
16669 ### Note: Above tests excludes the "{{NUMBEROFADMINS}}" magic word because it generates a MySQL error when included.
16679 image4 |300px| centre
16680 image5.svg| http://///////
16685 <ul class="gallery mw-gallery-traditional">
16686 <li class="gallerybox" style="width: 155px"><div style="width: 155px">
16687 <div class="thumb" style="height: 150px;">Image1.png</div>
16688 <div class="gallerytext">
16691 <li class="gallerybox" style="width: 155px"><div style="width: 155px">
16692 <div class="thumb" style="height: 150px;">Image2.gif</div>
16693 <div class="gallerytext">
16698 <li class="gallerybox" style="width: 155px"><div style="width: 155px">
16699 <div class="thumb" style="height: 150px;">Image3</div>
16700 <div class="gallerytext">
16703 <li class="gallerybox" style="width: 155px"><div style="width: 155px">
16704 <div class="thumb" style="height: 150px;">Image4</div>
16705 <div class="gallerytext">
16710 <li class="gallerybox" style="width: 155px"><div style="width: 155px">
16711 <div class="thumb" style="height: 150px;">Image5.svg</div>
16712 <div class="gallerytext">
16713 <p><a rel="nofollow" class="external free" href="http://///////">http://///////</a>
16717 <li class="gallerybox" style="width: 155px"><div style="width: 155px">
16718 <div class="thumb" style="height: 150px;">* image6</div>
16719 <div class="gallerytext">
16727 Gallery (with options)
16729 <gallery widths='70px' heights='40px' perrow='2' caption='Foo [[Main Page]]' >
16730 File:Nonexistent.jpg|caption
16731 File:Nonexistent.jpg
16732 image:foobar.jpg|some '''caption''' [[Main Page]]
16734 image:foobar.jpg|Blabla|alt=This is a foo-bar.|blabla.
16737 <ul class="gallery mw-gallery-traditional" style="max-width: 226px;_width: 226px;">
16738 <li class='gallerycaption'>Foo <a href="/wiki/Main_Page" title="Main Page">Main Page</a></li>
16739 <li class="gallerybox" style="width: 105px"><div style="width: 105px">
16740 <div class="thumb" style="height: 70px;">Nonexistent.jpg</div>
16741 <div class="gallerytext">
16746 <li class="gallerybox" style="width: 105px"><div style="width: 105px">
16747 <div class="thumb" style="height: 70px;">Nonexistent.jpg</div>
16748 <div class="gallerytext">
16751 <li class="gallerybox" style="width: 105px"><div style="width: 105px">
16752 <div class="thumb" style="width: 100px;"><div style="margin:31px auto;"><a href="/wiki/File:Foobar.jpg" class="image"><img alt="" src="http://example.com/images/thumb/3/3a/Foobar.jpg/70px-Foobar.jpg" width="70" height="8" /></a></div></div>
16753 <div class="gallerytext">
16754 <p>some <b>caption</b> <a href="/wiki/Main_Page" title="Main Page">Main Page</a>
16758 <li class="gallerybox" style="width: 105px"><div style="width: 105px">
16759 <div class="thumb" style="width: 100px;"><div style="margin:31px auto;"><a href="/wiki/File:Foobar.jpg" class="image"><img alt="Foobar.jpg" src="http://example.com/images/thumb/3/3a/Foobar.jpg/70px-Foobar.jpg" width="70" height="8" /></a></div></div>
16760 <div class="gallerytext">
16763 <li class="gallerybox" style="width: 105px"><div style="width: 105px">
16764 <div class="thumb" style="width: 100px;"><div style="margin:31px auto;"><a href="/wiki/File:Foobar.jpg" class="image"><img alt="This is a foo-bar." src="http://example.com/images/thumb/3/3a/Foobar.jpg/70px-Foobar.jpg" width="70" height="8" /></a></div></div>
16765 <div class="gallerytext">
16775 Gallery with link that has fragment
16778 image:foobar.jpg|link=Main_Page
16779 image:foobar.jpg|link=Main_Page#section
16780 image:foobar.jpg|link=Main Page#section|caption
16783 <ul class="gallery mw-gallery-traditional">
16784 <li class="gallerybox" style="width: 155px"><div style="width: 155px">
16785 <div class="thumb" style="width: 150px;"><div style="margin:68px auto;"><a href="/wiki/Main_Page"><img alt="Foobar.jpg" src="http://example.com/images/thumb/3/3a/Foobar.jpg/120px-Foobar.jpg" width="120" height="14" /></a></div></div>
16786 <div class="gallerytext">
16789 <li class="gallerybox" style="width: 155px"><div style="width: 155px">
16790 <div class="thumb" style="width: 150px;"><div style="margin:68px auto;"><a href="/wiki/Main_Page#section"><img alt="Foobar.jpg" src="http://example.com/images/thumb/3/3a/Foobar.jpg/120px-Foobar.jpg" width="120" height="14" /></a></div></div>
16791 <div class="gallerytext">
16794 <li class="gallerybox" style="width: 155px"><div style="width: 155px">
16795 <div class="thumb" style="width: 150px;"><div style="margin:68px auto;"><a href="/wiki/Main_Page#section"><img alt="" src="http://example.com/images/thumb/3/3a/Foobar.jpg/120px-Foobar.jpg" width="120" height="14" /></a></div></div>
16796 <div class="gallerytext">
16806 Gallery with wikitext inside caption
16809 File:foobar.jpg|[[File:foobar.jpg|20px|desc|alt=inneralt]]|alt=galleryalt
16810 File:foobar.jpg|{{Test|unamedParam|alt=param}}|alt=galleryalt
16813 <ul class="gallery mw-gallery-traditional">
16814 <li class="gallerybox" style="width: 155px"><div style="width: 155px">
16815 <div class="thumb" style="width: 150px;"><div style="margin:68px auto;"><a href="/wiki/File:Foobar.jpg" class="image"><img alt="galleryalt" src="http://example.com/images/thumb/3/3a/Foobar.jpg/120px-Foobar.jpg" width="120" height="14" /></a></div></div>
16816 <div class="gallerytext">
16817 <p><a href="/wiki/File:Foobar.jpg" class="image" title="desc"><img alt="inneralt" src="http://example.com/images/thumb/3/3a/Foobar.jpg/20px-Foobar.jpg" width="20" height="2" srcset="http://example.com/images/thumb/3/3a/Foobar.jpg/30px-Foobar.jpg 1.5x, http://example.com/images/thumb/3/3a/Foobar.jpg/40px-Foobar.jpg 2x" /></a>
16821 <li class="gallerybox" style="width: 155px"><div style="width: 155px">
16822 <div class="thumb" style="width: 150px;"><div style="margin:68px auto;"><a href="/wiki/File:Foobar.jpg" class="image"><img alt="galleryalt" src="http://example.com/images/thumb/3/3a/Foobar.jpg/120px-Foobar.jpg" width="120" height="14" /></a></div></div>
16823 <div class="gallerytext">
16824 <p>This is a test template
16833 gallery (with showfilename option)
16835 <gallery showfilename>
16836 File:Nonexistent.jpg|caption
16837 File:Nonexistent.jpg
16838 image:foobar.jpg|some '''caption''' [[Main Page]]
16842 <ul class="gallery mw-gallery-traditional">
16843 <li class="gallerybox" style="width: 155px"><div style="width: 155px">
16844 <div class="thumb" style="height: 150px;">Nonexistent.jpg</div>
16845 <div class="gallerytext">
16846 <p><a href="/wiki/File:Nonexistent.jpg" title="File:Nonexistent.jpg">Nonexistent.jpg</a><br />
16851 <li class="gallerybox" style="width: 155px"><div style="width: 155px">
16852 <div class="thumb" style="height: 150px;">Nonexistent.jpg</div>
16853 <div class="gallerytext">
16854 <p><a href="/wiki/File:Nonexistent.jpg" title="File:Nonexistent.jpg">Nonexistent.jpg</a><br />
16858 <li class="gallerybox" style="width: 155px"><div style="width: 155px">
16859 <div class="thumb" style="width: 150px;"><div style="margin:68px auto;"><a href="/wiki/File:Foobar.jpg" class="image"><img alt="" src="http://example.com/images/thumb/3/3a/Foobar.jpg/120px-Foobar.jpg" width="120" height="14" /></a></div></div>
16860 <div class="gallerytext">
16861 <p><a href="/wiki/File:Foobar.jpg" title="File:Foobar.jpg">Foobar.jpg</a><br />
16862 some <b>caption</b> <a href="/wiki/Main_Page" title="Main Page">Main Page</a>
16866 <li class="gallerybox" style="width: 155px"><div style="width: 155px">
16867 <div class="thumb" style="width: 150px;"><div style="margin:68px auto;"><a href="/wiki/File:Foobar.jpg" class="image"><img alt="Foobar.jpg" src="http://example.com/images/thumb/3/3a/Foobar.jpg/120px-Foobar.jpg" width="120" height="14" /></a></div></div>
16868 <div class="gallerytext">
16869 <p><a href="/wiki/File:Foobar.jpg" title="File:Foobar.jpg">Foobar.jpg</a><br />
16878 Gallery (with namespace-less filenames)
16881 File:Nonexistent.jpg
16887 <ul class="gallery mw-gallery-traditional">
16888 <li class="gallerybox" style="width: 155px"><div style="width: 155px">
16889 <div class="thumb" style="height: 150px;">Nonexistent.jpg</div>
16890 <div class="gallerytext">
16893 <li class="gallerybox" style="width: 155px"><div style="width: 155px">
16894 <div class="thumb" style="height: 150px;">Nonexistent.jpg</div>
16895 <div class="gallerytext">
16898 <li class="gallerybox" style="width: 155px"><div style="width: 155px">
16899 <div class="thumb" style="width: 150px;"><div style="margin:68px auto;"><a href="/wiki/File:Foobar.jpg" class="image"><img alt="Foobar.jpg" src="http://example.com/images/thumb/3/3a/Foobar.jpg/120px-Foobar.jpg" width="120" height="14" /></a></div></div>
16900 <div class="gallerytext">
16903 <li class="gallerybox" style="width: 155px"><div style="width: 155px">
16904 <div class="thumb" style="width: 150px;"><div style="margin:68px auto;"><a href="/wiki/File:Foobar.jpg" class="image"><img alt="Foobar.jpg" src="http://example.com/images/thumb/3/3a/Foobar.jpg/120px-Foobar.jpg" width="120" height="14" /></a></div></div>
16905 <div class="gallerytext">
16913 HTML Hex character encoding (spells the word "JavaScript")
16915 parsoid=wt2html,wt2wt,html2html
16917 JavaScript
16919 <p>JavaScript
16924 <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>
16928 HTML Hex character encoding bogus encoding (bug 26437 regression check)
16932 <p>&#xsee;&#XSEE;
16935 <p>&#xsee;&#XSEE;</p>
16939 HTML Hex character encoding mixed case
16941 parsoid=wt2html,wt2wt,html2html
16950 <p><span typeof="mw:Entity">î</span><span typeof="mw:Entity">î</span></p>
16954 __FORCETOC__ override
16966 ISBN 978-0-1234-56 789
16968 <p><a href="/wiki/Special:BookSources/9780123456" class="internal mw-magiclink-isbn">ISBN 978-0-1234-56</a> 789
16971 <p><a href="/wiki/Special:BookSources/9780123456" class="internal mw-magiclink-isbn">ISBN 978-0-1234-56</a> 789</p>
16973 <p><a href="./Special:BookSources/9780123456" rel="mw:ExtLink" data-parsoid='{"stx":"magiclink"}'>ISBN 978-0-1234-56</a><span typeof="mw:Entity" data-parsoid='{"src":"&#x20;","srcContent":" "}'> </span>789</p>
16977 ISBN followed by 5 spaces
16988 ISBN ISBN 1234567890
16990 <p>ISBN <a href="/wiki/Special:BookSources/1234567890" class="internal mw-magiclink-isbn">ISBN 1234567890</a>
16993 <p>ISBN <a href="./Special:BookSources/1234567890" rel="mw:ExtLink" data-parsoid='{"stx":"magiclink"}'>ISBN 1234567890</a></p>
17003 <p><a href="/wiki/Special:BookSources/346204561X" class="internal mw-magiclink-isbn">ISBN 3-462-04561-X</a>
17004 <a href="/wiki/Special:BookSources/080442957X" class="internal mw-magiclink-isbn">ISBN 080442957X</a>
17005 <a href="/wiki/Special:BookSources/978080442957X" class="internal mw-magiclink-isbn">ISBN 978080442957X</a>
17008 <p><a href="./Special:BookSources/346204561X" rel="mw:ExtLink" data-parsoid='{"stx":"magiclink"}'>ISBN 3-462-04561-X</a>
17009 <a href="./Special:BookSources/080442957X" rel="mw:ExtLink" data-parsoid='{"stx":"magiclink"}'>ISBN 080442957X</a>
17010 <a href="./Special:BookSources/978080442957X" rel="mw:ExtLink" data-parsoid='{"stx":"magiclink"}'>ISBN 978080442957X</a></p>
17014 ISBN with empty prefix (parsoid test)
17018 <p><a href="/wiki/Special:BookSources/1234567890" class="internal mw-magiclink-isbn">ISBN 1234567890</a>
17021 <p><a href="Special:BookSources/1234567890" rel="mw:ExtLink">ISBN 1234567890</a></p>
17025 Bug 22905: <abbr> followed by ISBN followed by </a>
17027 <abbr>(fr)</abbr> ISBN 2753300917 [http://www.example.com example.com]
17029 <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>
17032 <p><abbr data-parsoid='{"stx":"html"}'>(fr)</abbr> <a href="./Special:BookSources/2753300917" rel="mw:ExtLink" data-parsoid='{"stx":"magiclink"}'>ISBN 2753300917</a> <a rel="mw:ExtLink" href="http://www.example.com">example.com</a></p>
17040 <p>RFC <a class="external mw-magiclink-rfc" rel="nofollow" href="//tools.ietf.org/html/rfc1234">RFC 1234</a>
17045 Double RFC with a wiki link
17049 <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>
17058 <p><a class="external mw-magiclink-rfc" rel="nofollow" href="//tools.ietf.org/html/rfc983">RFC 983</a> 987
17061 <p><a class="external mw-magiclink-rfc" rel="nofollow" href="//tools.ietf.org/html/rfc983">RFC 983</a> 987</p>
17065 Centre-aligned image
17067 [[Image:foobar.jpg|centre]]
17069 <div class="center"><div class="floatnone"><a href="/wiki/File:Foobar.jpg" class="image"><img alt="Foobar.jpg" src="http://example.com/images/3/3a/Foobar.jpg" width="1941" height="220" /></a></div></div>
17076 [[Image:foobar.jpg|none]]
17078 <div class="floatnone"><a href="/wiki/File:Foobar.jpg" class="image"><img alt="Foobar.jpg" src="http://example.com/images/3/3a/Foobar.jpg" width="1941" height="220" /></a></div>
17083 Width + Height sized image (using px) (height is ignored)
17085 [[Image:foobar.jpg|640x480px]]
17087 <p><a href="/wiki/File:Foobar.jpg" class="image"><img alt="Foobar.jpg" src="http://example.com/images/thumb/3/3a/Foobar.jpg/640px-Foobar.jpg" width="640" height="73" srcset="http://example.com/images/thumb/3/3a/Foobar.jpg/960px-Foobar.jpg 1.5x, http://example.com/images/thumb/3/3a/Foobar.jpg/1280px-Foobar.jpg 2x" /></a>
17092 Width-sized image (using px, no following whitespace)
17094 [[Image:foobar.jpg|640px]]
17096 <p><a href="/wiki/File:Foobar.jpg" class="image"><img alt="Foobar.jpg" src="http://example.com/images/thumb/3/3a/Foobar.jpg/640px-Foobar.jpg" width="640" height="73" srcset="http://example.com/images/thumb/3/3a/Foobar.jpg/960px-Foobar.jpg 1.5x, http://example.com/images/thumb/3/3a/Foobar.jpg/1280px-Foobar.jpg 2x" /></a>
17101 Width-sized image (using px, with following whitespace - test regression from r39467)
17103 [[Image:foobar.jpg|640px ]]
17105 <p><a href="/wiki/File:Foobar.jpg" class="image"><img alt="Foobar.jpg" src="http://example.com/images/thumb/3/3a/Foobar.jpg/640px-Foobar.jpg" width="640" height="73" srcset="http://example.com/images/thumb/3/3a/Foobar.jpg/960px-Foobar.jpg 1.5x, http://example.com/images/thumb/3/3a/Foobar.jpg/1280px-Foobar.jpg 2x" /></a>
17110 Width-sized image (using px, with preceding whitespace - test regression from r39467)
17112 [[Image:foobar.jpg| 640px]]
17114 <p><a href="/wiki/File:Foobar.jpg" class="image"><img alt="Foobar.jpg" src="http://example.com/images/thumb/3/3a/Foobar.jpg/640px-Foobar.jpg" width="640" height="73" srcset="http://example.com/images/thumb/3/3a/Foobar.jpg/960px-Foobar.jpg 1.5x, http://example.com/images/thumb/3/3a/Foobar.jpg/1280px-Foobar.jpg 2x" /></a>
17119 Image with page parameter
17123 [[File:LoremIpsum.djvu|page=2]]
17125 <p><a href="/index.php?title=File:LoremIpsum.djvu&page=2" class="image"><img alt="LoremIpsum.djvu" src="http://example.com/images/thumb/5/5f/LoremIpsum.djvu/page2-2480px-LoremIpsum.djvu.jpg" width="2480" height="3508" srcset="http://example.com/images/thumb/5/5f/LoremIpsum.djvu/page2-3720px-LoremIpsum.djvu.jpg 1.5x, http://example.com/images/thumb/5/5f/LoremIpsum.djvu/page2-4960px-LoremIpsum.djvu.jpg 2x" /></a>
17128 <p><span class="mw-default-size" typeof="mw:Image" data-parsoid='{"optList":[{"ck":"page","ak":"page=2"}]}'><a href="./File:LoremIpsum.djvu" data-parsoid='{"a":{"href":"./File:LoremIpsum.djvu"},"sa":{}}'><img resource="./File:LoremIpsum.djvu" src="//example.com/images/5/5f/LoremIpsum.djvu" height="3508" width="2480" data-parsoid='{"a":{"resource":"./File:LoremIpsum.djvu","height":"3508","width":"2480"},"sa":{"resource":"File:LoremIpsum.djvu"}}'/></a></span></p>
17132 Another italics / bold test
17140 # FIXME: The php output seems broken. It's interleaving some open/close tags.
17146 <dl><dd><dl><dt><dl><dt><dl><dt><dl><dd><dl><dd></dt></dl></dd></dl></dd></dl></dd></dl></dd></dl></dd></dl>
17149 <dl><dd><dl><dt><dl><dt><dl><dt><dl><dd><dl><dd></dd></dl></dd></dl></dt></dl></dt></dl></dt></dl></dd></dl>
17154 # Images with the "|" character in external URLs in comment tags; Eats half the comment, leaves unmatched "</a>" tag.
17156 Images with the "|" character in the comment
17158 [[File:Foobar.jpg|thumb|An [http://test/?param1=|left|¶m2=|x external] URL]]
17160 <div class="thumb tright"><div class="thumbinner" style="width:182px;"><a href="/wiki/File:Foobar.jpg" class="image"><img alt="" src="http://example.com/images/thumb/3/3a/Foobar.jpg/180px-Foobar.jpg" width="180" height="20" class="thumbimage" srcset="http://example.com/images/thumb/3/3a/Foobar.jpg/270px-Foobar.jpg 1.5x, http://example.com/images/thumb/3/3a/Foobar.jpg/360px-Foobar.jpg 2x" /></a> <div class="thumbcaption"><div class="magnify"><a href="/wiki/File:Foobar.jpg" class="internal" title="Enlarge"></a></div>An <a rel="nofollow" class="external text" href="http://test/?param1=%7Cleft%7C&param2=%7Cx">external</a> URL</div></div></div>
17163 <figure class="mw-default-size" typeof="mw:Image/Thumb"><a href="File:Foobar.jpg"><img resource="./File:Foobar.jpg" src="//example.com/images/3/3a/Foobar.jpg" height="25" width="220"/></a><figcaption>An <a rel="mw:ExtLink" href="http://test/?param1=|left|&param2=|x">external</a> URL</figcaption></figure>
17167 [Before] HTML without raw HTML enabled ($wgRawHtml==false)
17169 <html><script>alert(1);</script></html>
17171 <p><html><script>alert(1);</script></html>
17176 HTML with raw HTML ($wgRawHtml==true)
17180 <html><script>alert(1);</script></html>
17182 <p><script>alert(1);</script>
17187 Parents of subpages, one level up
17189 subpage title=[[Subpage test/L1/L2/L3]]
17193 <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>
17199 Parents of subpages, one level up, not named
17201 subpage title=[[Subpage test/L1/L2/L3]]
17205 <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>
17212 Parents of subpages, two levels up
17214 subpage title=[[Subpage test/L1/L2/L3]]
17220 <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
17221 </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>
17226 Parents of subpages, two levels up, without trailing slash or name.
17228 subpage title=[[Subpage test/L1/L2/L3]]
17237 Parents of subpages, two levels up, with lots of extra trailing slashes.
17239 subpage title=[[Subpage test/L1/L2/L3]]
17243 <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>
17248 Subpage test/L1/L2/L3Sibling
17254 Transclusion of a sibling page (one level up)
17256 subpage title=[[Subpage test/L1/L2/L3]]
17265 Transclusion of a child page
17267 subpage title=[[Subpage test/L1/L2]]
17276 Non-transclusion because of too many up levels
17278 subpage title=[[Subpage test/L1/L2/L3]]
17280 {{../../../../More than parent}}
17282 <p>{{../../../../More than parent}}
17287 Definition list code coverage
17293 <dl><dt> title  </dt>
17295 <dt> title </dt>
17301 <dl><dt> title <span typeof="mw:Placeholder"> </span></dt><dd> def</dd>
17302 <dt> title<span typeof="mw:Placeholder"> </span></dt><dd> def</dd>
17303 <dt>title</dt><dd> def</dd></dl>
17307 Don't fall for the self-closing div
17309 <div>hello world</div/>
17311 <div>hello world</div>
17320 <p>[[:Template:Msg]]
17329 <p><a href="/index.php?title=Template:QUERTY&action=edit&redlink=1" class="new" title="Template:QUERTY (page does not exist)">Template:QUERTY</a>
17333 # This isn't needed for XHTML conformance, but would be handy as a fallback security measure
17335 Always escape literal '>' in output, not just after '<'
17349 <p>This is a test template
17350 This is a test template
17362 Inclusion of !userCanEdit() content
17366 <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>
17372 Out-of-order TOC heading levels
17381 <div id="toc" class="toc"><div id="toctitle"><h2>Contents</h2></div>
17383 <li class="toclevel-1 tocsection-1"><a href="#2"><span class="tocnumber">1</span> <span class="toctext">2</span></a>
17385 <li class="toclevel-2 tocsection-2"><a href="#6"><span class="tocnumber">1.1</span> <span class="toctext">6</span></a></li>
17386 <li class="toclevel-2 tocsection-3"><a href="#3"><span class="tocnumber">1.2</span> <span class="toctext">3</span></a></li>
17389 <li class="toclevel-1 tocsection-4"><a href="#1"><span class="tocnumber">2</span> <span class="toctext">1</span></a>
17391 <li class="toclevel-2 tocsection-5"><a href="#5"><span class="tocnumber">2.1</span> <span class="toctext">5</span></a></li>
17392 <li class="toclevel-2 tocsection-6"><a href="#2_2"><span class="tocnumber">2.2</span> <span class="toctext">2</span></a></li>
17398 <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>
17399 <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>
17400 <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>
17401 <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>
17402 <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>
17403 <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>
17409 ISBN with a dummy number
17419 ISBN with space-delimited number
17423 <p><a href="/wiki/Special:BookSources/9290170328" class="internal mw-magiclink-isbn">ISBN 92 9017 032 8</a>
17429 ISBN with multiple spaces, no number
17448 </p><p><a href="/wiki/Special:BookSources/1234567890" class="internal mw-magiclink-isbn">ISBN 1234567890</a>
17449 </p><p>ISBN 12345678901
17455 ISBN with trailing year (bug 8110)
17457 ISBN 1-234-56789-0 - 2006
17459 ISBN 1 234 56789 0 - 2006
17461 <p><a href="/wiki/Special:BookSources/1234567890" class="internal mw-magiclink-isbn">ISBN 1-234-56789-0</a> - 2006
17462 </p><p><a href="/wiki/Special:BookSources/1234567890" class="internal mw-magiclink-isbn">ISBN 1 234 56789 0</a> - 2006
17470 {{anchorencode:foo bar©#%n}}
17472 <p>foo_bar.C2.A9.23.25n
17477 anchorencode trims spaces
17479 {{anchorencode: __pretty__please__}}
17486 anchorencode deals with links
17488 {{anchorencode: [[hello|world]] [[hi]]}}
17495 anchorencode deals with templates
17497 {{anchorencode: {{Foo}} }}
17504 anchorencode encodes like the TOC generator: (bug 18431)
17506 === _ +:.3A%3A&&]] ===
17507 {{anchorencode: _ +:.3A%3A&&]] }}
17510 <h3><span class="mw-headline" id=".2B:.3A.253A.26.26.5D.5D">_ +:.3A%3A&&]]</span></h3>
17511 <p>.2B:.3A.253A.26.26.5D.5D
17516 Bug 6200: blockquotes and paragraph formatting
17537 Bug 8293: Use of center tag ruins paragraph formatting
17558 Parsing of overlapping (improperly nested) inline html tags
17560 <span><s>x</span></s>
17562 <p><span><s>x</span></s></span>
17565 <p><span><s>x</s></span>
17570 ### Language variants related tests
17573 Self-link in language variants
17575 title=[[Dunav]] language=sr
17577 Both [[Dunav]] and [[Дунав]] are names for this river.
17579 <p>Both <strong class="selflink">Dunav</strong> and <strong class="selflink">Дунав</strong> are names for this river.
17590 Link to another existing title shouldn't be parsed as self-link even if it's a variant of this title
17592 title=[[Duna]] language=sr
17594 [[Дуна]] is not a self-link while [[Duna]] and [[Dуна]] are still self-links.
17596 <p><a href="/wiki/%D0%94%D1%83%D0%BD%D0%B0" title="Дуна">Дуна</a> is not a self-link while <strong class="selflink">Duna</strong> and <strong class="selflink">Dуна</strong> are still self-links.
17601 Link to a section of a variant of this title shouldn't be parsed as self-link
17603 title=[[Duna]] language=sr
17605 [[Dуна]] is a self-link while [[Dunа#Foo]] and [[Dуна#Foo]] are not self-links.
17607 <p><strong class="selflink">Dуна</strong> 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.
17612 Link to pages in language variants
17616 Main Page can be written as [[Маин Паге]]
17618 <p>Main Page can be written as <a href="/wiki/Main_Page" title="Main Page">Маин Паге</a>
17624 Multiple links to pages in language variants
17628 [[Main Page]] can be written as [[Маин Паге]] same as [[Маин Паге]].
17630 <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>.
17636 Simple template in language variants
17642 <p>This is a test template
17648 Template with explicit namespace in language variants
17654 <p>This is a test template
17660 Basic test for template parameter in language variants
17664 {{парамтест|param=foo}}
17666 <p>This is a test template with parameter foo
17672 Simple category in language variants
17676 [[Category:МедиаWики Усер'с Гуиде]]
17678 <a href="/wiki/%D0%9A%D0%B0%D1%82%D0%B5%D0%B3%D0%BE%D1%80%D0%B8%D1%98%D0%B0:MediaWiki_User%27s_Guide" title="Категорија:MediaWiki User's Guide">MediaWiki User's Guide</a>
17695 Don't convert blue categorylinks to another variant (bug 33210)
17699 [[A]][[Category:分类]]
17701 <a href="/wiki/Category:%E5%88%86%E7%B1%BB" title="Category:分类">分类</a>
17706 Stripping -{}- tags (language variants)
17710 Latin proverb: -{Ne nuntium necare}-
17712 <p>Latin proverb: Ne nuntium necare
17718 Prevent conversion with -{}- tags (language variants)
17720 language=sr variant=sr-ec
17722 Latinski: -{Ne nuntium necare}-
17724 <p>Латински: Ne nuntium necare
17730 Prevent conversion of text with -{}- tags (language variants)
17732 language=sr variant=sr-ec
17734 Latinski: -{Ne nuntium necare}-
17736 <p>Латински: Ne nuntium necare
17742 Prevent conversion of links with -{}- tags (language variants)
17744 language=sr variant=sr-ec
17748 <p><a href="/wiki/Main_Page" title="Main Page">Main Page</a>
17754 -{}- tags within headlines (within html for parserConvert())
17756 language=sr variant=sr-ec
17760 <h2><span class="mw-headline" id="-.7BNaslov.7D-">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>
17766 Explicit definition of language variant alternatives
17768 language=zh variant=zh-tw
17770 -{zh:China;zh-tw:Taiwan}-, not China
17772 <p>Taiwan, not China
17778 Conversion around HTML tags
17780 language=sr variant=sr-ec
17782 -{H|span=>sr-ec:script;title=>sr-ec:src;}-
17783 <span title="La-{sr-el:L;sr-ec:C;}-tin">ski</span>
17786 <span title="ЛаCтин">ски</span>
17792 Explicit session-wise language variant mapping (A flag and - flag)
17794 language=zh variant=zh-tw
17796 Taiwan is not China.
17797 But -{A|zh:China;zh-tw:Taiwan}- is China,
17798 (This-{-|zh:China;zh-tw:Taiwan}- should be stripped!)
17799 and -{China}- is China.
17801 <p>Taiwan is not China.
17802 But Taiwan is Taiwan,
17803 (This should be stripped!)
17804 and China is China.
17809 Explicit session-wise language variant mapping (H flag for hide)
17811 language=zh variant=zh-tw
17813 (This-{H|zh:China;zh-tw:Taiwan}- should be stripped!)
17816 <p>(This should be stripped!)
17822 Adding explicit conversion rule for title (T flag)
17824 language=zh variant=zh-tw showtitle
17826 Should be stripped-{T|zh:China;zh-tw:Taiwan}-!
17829 <p>Should be stripped!
17834 Testing that changing the language variant here in the tests actually works
17836 language=zh variant=zh showtitle
17838 Should be stripped-{T|zh:China;zh-tw:Taiwan}-!
17841 <p>Should be stripped!
17846 Recursive conversion of alt and title attrs shouldn't clear converter state
17848 language=zh variant=zh-cn showtitle
17850 -{H|zh-cn:Exclamation;zh-tw:exclamation;}-
17851 Should be stripped-{T|zh-cn:China;zh-tw:Taiwan}-<span title="exclamation">!</span>
17855 Should be stripped<span title="Exclamation">!</span>
17860 Bug 24072: more test on conversion rule for title
17862 language=zh variant=zh-tw showtitle
17864 This should be stripped-{T|zh:China;zh-tw:Taiwan}-!
17865 This won't take interferes with the title rule-{H|zh:Beijing;zh-tw:Taipei}-.
17868 <p>This should be stripped!
17869 This won't take interferes with the title rule.
17874 Partly disable title conversion if variant == main language code
17876 language=zh variant=zh title=[[ZH]] showtitle
17878 -{T|zh-cn:CN;zh-tw:TW}-
17886 Partly disable title conversion if variant == main language code, more
17888 language=zh variant=zh title=[[ZH]] showtitle
17898 Raw output of variant escape tags (R flag)
17900 language=zh variant=zh-tw
17902 Raw: -{R|zh:China;zh-tw:Taiwan}-
17904 <p>Raw: zh:China;zh-tw:Taiwan
17909 Nested using of manual convert syntax
17911 language=zh variant=zh-hk
17913 Nested: -{zh-hans:Hi -{zh-cn:China;zh-sg:Singapore;}-;zh-hant:Hello -{zh-tw:Taiwan;zh-hk:H-{ong}- K-{}-ong;}-;}-!
17915 <p>Nested: Hello Hong Kong!
17920 Proper conversion of text in external links
17922 language=sr variant=sr-ec
17924 http://www.google.com
17925 gopher://www.google.com
17926 [http://www.google.com http://www.google.com]
17927 [gopher://www.google.com gopher://www.google.com]
17928 [https://www.google.com irc://www.google.com]
17929 [ftp://www.google.com www.google.com/ftp://dir]
17930 [//www.google.com www.google.com]
17932 <p><a rel="nofollow" class="external free" href="http://www.google.com">http://www.google.com</a>
17933 <a rel="nofollow" class="external free" href="gopher://www.google.com">gopher://www.google.com</a>
17934 <a rel="nofollow" class="external free" href="http://www.google.com">http://www.google.com</a>
17935 <a rel="nofollow" class="external free" href="gopher://www.google.com">gopher://www.google.com</a>
17936 <a rel="nofollow" class="external text" href="https://www.google.com">irc://www.google.com</a>
17937 <a rel="nofollow" class="external text" href="ftp://www.google.com">www.гоогле.цом/фтп://дир</a>
17938 <a rel="nofollow" class="external text" href="//www.google.com">www.гоогле.цом</a>
17943 Do not convert roman numbers to language variants
17945 language=sr variant=sr-ec
17949 <p>Фридрих IV је цар.
17954 Unclosed language converter markup "-{"
17965 Don't convert raw rule "-{R|=>}-" to "=>"
17976 Don't break link parsing if language converter markup is in the caption.
17978 language=sr variant=sr-ec
17980 [[Main Page|-{R|main page}-]]
17982 <p><a href="/wiki/Main_Page" title="Маин Паге">main page</a>
17986 # FIXME: This test is currently broken in the PHP parser (bug 52661)
17988 Don't break image parsing if language converter markup is in the caption.
17992 [[File:Foobar.jpg|-{R|caption}-]]
17994 <p><a href="/wiki/File:Foobar.jpg" class="image" title="caption"><img alt="caption" src="http://example.com/images/3/3a/Foobar.jpg" width="1941" height="220" /></a>
17998 # FIXME: This test is currently broken in the PHP parser (bug 52661)
18000 Don't break list handling if language converter markup is in the item.
18002 language=zh variant=zh-cn
18004 ;-{zh-cn:AAA;zh-tw:BBB}-
18006 <dl><dt><span class="error">在手动语言转换规则中检测到错误</span></dd></dl>
18013 # FIXME: This test is currently broken in the PHP parser (bug 52661)
18015 Don't break table handling if language converter markup is in the cell.
18017 language=sr variant=sr-ec
18040 Bug 529: Uncovered bullet
18049 # Plain MediaWiki does not remove empty lists, but tidy actually does.
18050 # Templates in Wikipedia rely on this behavior, as tidy has always been
18051 # enabled there. These tests are normally run *without* tidy, so specify the
18052 # full output here.
18053 # To test realistic parsing behavior, apply a tidy-like transformation to both
18054 # the expected output and your parser's output.
18056 Bug 529: Uncovered bullet leaving empty list, normally removed by tidy
18058 ******* Foo {{bullet}}
18060 <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>
18066 Bug 529: Uncovered table already at line-start
18089 Bug 529: Uncovered bullet in parser function result
18091 * Foo {{lc:{{bullet}} }}
18099 Bug 5678: Double-parsed template argument
18101 {{lc:{{{1}}}|hello}}
18108 Bug 5678: Double-parsed template invocation
18110 {{lc:{{paramtest {{!}} param = hello }} }}
18112 <p>{{paramtest | param = hello }}
18117 Case insensitivity of parser functions for non-ASCII characters (bug 8143)
18120 title=[[Main Page]]
18122 {{PRVNÍVELKÉ:ěščř}}
18123 {{prvnívelké:ěščř}}
18143 Morwen/13: Unclosed link followed by heading
18150 <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>
18155 HHP2.1: Heuristics for headings in preprocessor parenthetical structures
18162 <h1><span class="mw-headline" id="heading">heading</span></h1>
18167 HHP2.2: Heuristics for headings in preprocessor parenthetical structures
18174 <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>
18189 Paragraphs inside divs (no extra line breaks)
18201 Paragraphs inside divs (extra line break on open)
18216 Paragraphs inside divs (extra line break on close)
18231 Paragraphs inside divs (extra line break on open and close)
18248 Nesting tags, paragraphs on lines which begin with <div>
18250 <div></div><strong>A
18253 <p><strong>A</strong></p>
18254 <p><strong>B</strong></p>
18262 # Bug 6200: <blockquote> should behave like <div> with respect to line breaks
18264 Bug 6200: paragraphs inside blockquotes (no extra line breaks)
18266 <blockquote>Line one
18268 Line two</blockquote>
18270 <blockquote>Line one
18271 Line two</blockquote>
18275 <p>Line one Line two</p>
18280 Bug 6200: paragraphs inside blockquotes (extra line break on open)
18285 Line two</blockquote>
18290 Line two</blockquote>
18295 Line two</blockquote>
18299 Bug 6200: paragraphs inside blockquotes (extra line break on close)
18301 <blockquote>Line one
18306 <blockquote>Line one
18319 Bug 6200: paragraphs inside blockquotes (extra line break on open and close)
18341 Paragraphs inside blockquotes/divs (no extra line breaks)
18343 <blockquote><div>Line one
18345 Line two</div></blockquote>
18347 <blockquote><div>Line one
18348 Line two</div></blockquote>
18353 Paragraphs inside blockquotes/divs (extra line break on open)
18358 Line two</div></blockquote>
18363 Line two</div></blockquote>
18368 Paragraphs inside blockquotes/divs (extra line break on close)
18370 <blockquote><div>Line one
18373 </div></blockquote>
18375 <blockquote><div>Line one
18378 </div></blockquote>
18383 Paragraphs inside blockquotes/divs (extra line break on open and close)
18389 </div></blockquote>
18395 </div></blockquote>
18400 Interwiki links trounced by replaceExternalLinks after early LinkHolderArray expansion
18402 wgLinkHolderBatchSize=0
18408 <p><a href="http://www.usemod.com/cgi-bin/mb.pl?1" class="extiw" title="meatball:1">meatball:1</a>
18409 <a href="http://www.usemod.com/cgi-bin/mb.pl?2" class="extiw" title="meatball:2">meatball:2</a>
18410 <a href="http://www.usemod.com/cgi-bin/mb.pl?3" class="extiw" title="meatball:3">meatball:3</a>
18415 Free external link invading image caption
18417 [[Image:Foobar.jpg|thumb|http://x|hello]]
18419 <div class="thumb tright"><div class="thumbinner" style="width:182px;"><a href="/wiki/File:Foobar.jpg" class="image"><img alt="" src="http://example.com/images/thumb/3/3a/Foobar.jpg/180px-Foobar.jpg" width="180" height="20" class="thumbimage" srcset="http://example.com/images/thumb/3/3a/Foobar.jpg/270px-Foobar.jpg 1.5x, http://example.com/images/thumb/3/3a/Foobar.jpg/360px-Foobar.jpg 2x" /></a> <div class="thumbcaption"><div class="magnify"><a href="/wiki/File:Foobar.jpg" class="internal" title="Enlarge"></a></div>hello</div></div></div>
18424 Bug 15196: localised external link numbers
18428 [http://en.wikipedia.org/]
18430 <p><a rel="nofollow" class="external autonumber" href="http://en.wikipedia.org/">[۱]</a>
18433 <p><a rel="mw:ExtLink" href="http://en.wikipedia.org/"></a></p>
18437 Multibyte character in padleft
18439 {{padleft:-Hello|7|Æ}}
18446 Multibyte character in padright
18448 {{padright:Hello-|7|Æ}}
18455 formatdate parser function
18457 {{#formatdate:2009-03-24}}
18459 <p><span class="mw-formatted-date" title="2009-03-24">2009-03-24</span>
18464 formatdate parser function, with default format
18466 {{#formatdate:2009-03-24|mdy}}
18468 <p><span class="mw-formatted-date" title="2009-03-24">March 24, 2009</span>
18473 Spacing of numbers in formatted dates
18475 {{#formatdate:January 15}}
18477 <p><span class="mw-formatted-date" title="01-15">January 15</span>
18482 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
18484 language=nl title=[[MediaWiki:Common.css]]
18486 {{#formatdate:2009-03-24|dmy}}
18488 <p><span class="mw-formatted-date" title="2009-03-24">24 March 2009</span>
18501 Edit comment with link
18505 I like the [[Main Page]] a lot
18507 I like the <a href="/wiki/Main_Page" title="Main Page">Main Page</a> a lot
18511 Edit comment with link and link text
18515 I like the [[Main Page|best pages]] a lot
18517 I like the <a href="/wiki/Main_Page" title="Main Page">best pages</a> a lot
18521 Edit comment with link and link text with suffix
18525 I like the [[Main Page|best page]]s a lot
18527 I like the <a href="/wiki/Main_Page" title="Main Page">best pages</a> a lot
18531 Edit comment with section link (non-local, eg in history list)
18533 comment title=[[Main Page]]
18535 /* External links */ removed bogus entries
18537 <a href="/wiki/Main_Page#External_links" title="Main Page">→</a><span dir="auto"><span class="autocomment">External links: </span> removed bogus entries</span>
18541 Edit comment with section link and text before it (non-local, eg in history list)
18543 comment title=[[Main Page]]
18545 pre-comment text /* External links */ removed bogus entries
18547 pre-comment text <a href="/wiki/Main_Page#External_links" title="Main Page">→</a><span dir="auto"><span class="autocomment">External links: </span> removed bogus entries</span>
18551 Edit comment with section link (local, eg in diff view)
18553 comment local title=[[Main Page]]
18555 /* External links */ removed bogus entries
18557 <a href="#External_links">→</a><span dir="auto"><span class="autocomment">External links: </span> removed bogus entries</span>
18561 Edit comment with subpage link (bug 14080)
18565 title=[[Subpage test]]
18567 Poked at a [[/subpage]] here...
18569 Poked at a <a href="/wiki/Subpage_test/subpage" title="Subpage test/subpage">/subpage</a> here...
18573 Edit comment with subpage link and link text (bug 14080)
18577 title=[[Subpage test]]
18579 Poked at a [[/subpage|neat little page]] here...
18581 Poked at a <a href="/wiki/Subpage_test/subpage" title="Subpage test/subpage">neat little page</a> here...
18585 Edit comment with bogus subpage link in non-subpage NS (bug 14080)
18588 title=[[Subpage test]]
18590 Poked at a [[/subpage]] here...
18592 Poked at a <a href="/index.php?title=/subpage&action=edit&redlink=1" class="new" title="/subpage (page does not exist)">/subpage</a> here...
18596 Edit comment with bare anchor link (local, as on diff)
18600 title=[[Main Page]]
18604 <a href="#section">#section</a>
18608 Edit comment with bare anchor link (non-local, as on history)
18611 title=[[Main Page]]
18615 <a href="/wiki/Main_Page#section" title="Main Page">#section</a>
18619 Anchor starting with underscore
18623 <p><a href="#_ref">One</a>
18628 Id starting with underscore
18630 <div id="_ref"></div>
18632 <div id="_ref"></div>
18637 Space normalisation on autocomment (bug 22784)
18640 title=[[Main Page]]
18642 /* __hello__world__ */
18644 <a href="/wiki/Main_Page#hello_world" title="Main Page">→</a><span dir="auto"><span class="autocomment">__hello__world__</span></span>
18648 percent-encoding and + signs in comments (Bug 26410)
18652 [[ABC%33D% ++]] [[ABC%33D% ++|+%20]]
18654 <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>
18657 # Parsoid doesn't support this yet: see bug 73581
18658 # but it *should* omit the 'src' attribute if the image is bad.
18659 # PHP side of tests was disabled in
18660 # mediawiki/core:6bd31e7d95161a6e88fa86df60871051da997c3c
18661 # because of issues in the PHP parserTests infrastructure
18662 # (but the output below is indeed what the PHP side emits)
18664 Bad images - basic functionality
18667 !! DISABLED/html/php
18669 <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>
18673 Bad images - bug 16039: text after bad image disappears
18678 !! DISABLED/html/php
18684 <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>
18689 Verify that displaytitle works (bug #22501) no displaytitle
18693 wgAllowDisplayTitle=true
18694 wgRestrictDisplayTitle=false
18696 this is not the the title
18699 <p>this is not the the title
18704 Verify that displaytitle works (bug #22501) RestrictDisplayTitle=false
18709 wgAllowDisplayTitle=true
18710 wgRestrictDisplayTitle=false
18712 this is not the the title
18713 {{DISPLAYTITLE:whatever}}
18716 <p>this is not the the title
18721 Verify that displaytitle works (bug #22501) RestrictDisplayTitle=true mismatch
18726 wgAllowDisplayTitle=true
18727 wgRestrictDisplayTitle=true
18729 this is not the the title
18730 {{DISPLAYTITLE:whatever}}
18733 <p>this is not the the title
18738 Verify that displaytitle works (bug #22501) RestrictDisplayTitle=true matching
18743 wgAllowDisplayTitle=true
18744 wgRestrictDisplayTitle=true
18746 this is not the the title
18747 {{DISPLAYTITLE:screen}}
18750 <p>this is not the the title
18755 Verify that displaytitle works (bug #22501) AllowDisplayTitle=false
18760 wgAllowDisplayTitle=false
18762 this is not the the title
18763 {{DISPLAYTITLE:screen}}
18766 <p>this is not the the title
18767 <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>
18772 Verify that displaytitle works (bug #22501) AllowDisplayTitle=false no DISPLAYTITLE
18777 wgAllowDisplayTitle=false
18779 this is not the the title
18782 <p>this is not the the title
18787 Verify that displaytitle handles inline CSS styles (bug 26547) - rejected value
18792 wgAllowDisplayTitle=true
18793 wgRestrictDisplayTitle=true
18795 this is not the the title
18796 {{DISPLAYTITLE:<span style="display: none;">s</span>creen}}
18798 <span style="/* attempt to bypass $wgRestrictDisplayTitle */">s</span>creen
18799 <p>this is not the the title
18804 Verify that displaytitle handles inline CSS styles (bug 26547) - accepted value
18809 wgAllowDisplayTitle=true
18810 wgRestrictDisplayTitle=true
18812 this is not the the title
18813 {{DISPLAYTITLE:<span style="color: red;">s</span>creen}}
18815 <span style="color: red;">s</span>creen
18816 <p>this is not the the title
18821 preload: check <noinclude> and <includeonly>
18825 Hello <noinclude>cruel</noinclude><includeonly>kind</includeonly> world.
18831 preload: check <onlyinclude>
18835 Goodbye <onlyinclude>Hello world</onlyinclude>
18841 preload: can pass tags through if we want to
18845 <includeonly><</includeonly>includeonly>Hello world<includeonly><</includeonly>/includeonly>
18847 <includeonly>Hello world</includeonly>
18851 preload: check that it doesn't try to do tricks
18855 * <!-- Hello --> ''{{world}}'' {{<includeonly>subst:</includeonly>How are you}}{{ {{{|safesubst:}}} #if:1|2|3}}
18857 * <!-- Hello --> ''{{world}}'' {{subst:How are you}}{{ {{{|safesubst:}}} #if:1|2|3}}
18861 Play a bit with r67090 and bug 3158
18863 <div style="width:50% !important"> </div>
18864 <div style="width:50% !important"> </div>
18865 <div style="width:50% !important"> </div>
18866 <div style="border : solid;"> </div>
18868 <div style="width:50% !important"> </div>
18869 <div style="width:50% !important"> </div>
18870 <div style="width:50% !important"> </div>
18871 <div style="border : solid;"> </div>
18874 <div style="width:50% !important" data-parsoid='{"stx":"html"}'><span typeof="mw:Entity" data-parsoid='{"srcContent":" "}'> </span></div>
18875 <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>
18876 <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>
18877 <div style="border : solid;" data-parsoid='{"stx":"html"}'><span typeof="mw:Entity" data-parsoid='{"srcContent":" "}'> </span></div>
18882 HTML5 data attributes
18884 <span data-foo="bar">Baz</span>
18885 <p data-abc-def_hij="">Quuz</p>
18887 <p><span data-foo="bar">Baz</span>
18889 <p data-abc-def_hij="">Quuz</p>
18894 percent-encoding and + signs in internal links (Bug 26410)
18896 [[User:+%]] [[Page+title%]]
18897 [[%+]] [[%+|%20]] [[%+ ]] [[%+r]]
18898 [[%]] [[+]] [[File:%+abc%39|foo|[[bar]]]]
18899 [[%33%45]] [[%33%45+]]
18901 <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>
18902 <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>
18903 <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>
18904 <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>
18907 <p><a rel="mw:WikiLink" href="User:+%" title="User:+%">User:+%</a> <a rel="mw:WikiLink" href="Page+title%" title="Page+title%">Page+title%</a> <a rel="mw:WikiLink" href="%+" title="%+">%+</a> <a rel="mw:WikiLink" href="%+" title="%+">%20</a> <a rel="mw:WikiLink" href="%+" title="%+">%+ </a> <a rel="mw:WikiLink" href="%+r" title="%+r">%+r</a> <a rel="mw:WikiLink" href="%" title="%">%</a> <a rel="mw:WikiLink" href="+" title="+">+</a> <span class="mw-default-size" typeof="mw:Error mw:Image" data-mw='{"errors":[{"key":"missing-image","message":"This image does not exist."}],"caption":"[[bar]]"}'><a href="File:%+abc9"><img resource="./File:%25+abc9" src="./Special:FilePath/%+abc9" height="220" width="220"/></a></span> <a rel="mw:WikiLink" href="3E" title="3E">3E</a> <a rel="mw:WikiLink" href="3E+" title="3E+">3E+</a></p>
18911 Special characters in embedded file links (bug 27679)
18913 [[File:Contains & ampersand.jpg]]
18914 [[File:Does not exist.jpg|Title with & ampersand]]
18916 <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>
18917 <a href="/index.php?title=Special:Upload&wpDestFile=Does_not_exist.jpg" class="new" title="File:Does not exist.jpg">Title with & ampersand</a>
18920 <p><span class="mw-default-size" typeof="mw:Error mw:Image" data-mw='{"errors":[{"key":"missing-image","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></span>
18921 <span class="mw-default-size" typeof="mw:Error mw:Image" data-mw='{"errors":[{"key":"missing-image","message":"This image does not exist."}],"caption":"Title with & 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></span></p>
18925 Confirm that 'apos' named character reference doesn't make it to output (not legal in HTML 4)
18927 Text's been normalized?
18929 <p>Text's been normalized?
18934 Bug 19052 U+3000 IDEOGRAPHIC SPACE should terminate free external links
18936 http://www.example.org/ <-- U+3000 (vim: ^Vu3000)
18938 <p><a rel="nofollow" class="external free" href="http://www.example.org/">http://www.example.org/</a> <-- U+3000 (vim: ^Vu3000)
18943 Bug 19052 U+3000 IDEOGRAPHIC SPACE should terminate bracketed external links
18945 [http://www.example.org/ ideograms]
18947 <p><a rel="nofollow" class="external text" href="http://www.example.org/">ideograms</a>
18952 Bug 19052 U+3000 IDEOGRAPHIC SPACE should terminate external images links
18954 http://www.example.org/pic.png <-- U+3000 (vim: ^Vu3000)
18956 <p><img src="http://www.example.org/pic.png" alt="pic.png" /> <-- U+3000 (vim: ^Vu3000)
18980 Bug 31098 Template which includes system messages which includes the template
18984 <p><span class="error">Template loop detected: <a href="/wiki/Template:Identical" title="Template:Identical">Template:Identical</a></span>
18985 <span class="error">Template loop detected: <a href="/wiki/Template:Identical" title="Template:Identical">Template:Identical</a></span>
18990 Bug31490 Turkish: ucfirst 'blah'
19001 Bug31490 Turkish: ucfirst 'ix'
19012 Bug31490 Turkish: lcfirst 'BLAH'
19023 Bug31490 Turkish: ucfırst (with a dotless i)
19029 <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>
19034 Bug31490 ucfırst (with a dotless i) with English language
19040 <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>
19045 Bug 26375: TOC with italics
19047 title=[[Main Page]]
19050 == ''Lost'' episodes ==
19052 <div id="toc" class="toc"><div id="toctitle"><h2>Contents</h2></div>
19054 <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>
19058 <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>
19063 Bug 26375: TOC with bold
19065 title=[[Main Page]]
19068 == '''should be bold''' then normal text ==
19070 <div id="toc" class="toc"><div id="toctitle"><h2>Contents</h2></div>
19072 <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>
19076 <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>
19081 Bug 33845: Headings become cursive in TOC when they contain an image
19083 title=[[Main Page]]
19086 == Image [[Image:foobar.jpg]] ==
19088 <div id="toc" class="toc"><div id="toctitle"><h2>Contents</h2></div>
19090 <li class="toclevel-1 tocsection-1"><a href="#Image"><span class="tocnumber">1</span> <span class="toctext">Image</span></a></li>
19094 <h2><span class="mw-headline" id="Image">Image <a href="/wiki/File:Foobar.jpg" class="image"><img alt="Foobar.jpg" src="http://example.com/images/3/3a/Foobar.jpg" width="1941" height="220" /></a></span><span class="mw-editsection"><span class="mw-editsection-bracket">[</span><a href="/index.php?title=Main_Page&action=edit&section=1" title="Edit section: Image">edit</a><span class="mw-editsection-bracket">]</span></span></h2>
19099 Bug 33845 (2): Headings become bold in TOC when they contain a blockquote
19101 title=[[Main Page]]
19104 == <blockquote>Quote</blockquote> ==
19106 <div id="toc" class="toc"><div id="toctitle"><h2>Contents</h2></div>
19108 <li class="toclevel-1 tocsection-1"><a href="#Quote"><span class="tocnumber">1</span> <span class="toctext">Quote</span></a></li>
19112 <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>
19115 <div id="toc" class="toc">
19116 <div id="toctitle">
19120 <li class="toclevel-1 tocsection-1"><a href="#Quote"><span class="tocnumber">1</span> <span class="toctext">Quote</span></a></li>
19123 <h2><span class="mw-headline" id="Quote"></span></h2>
19125 <p><span class="mw-headline" id="Quote">Quote</span></p>
19127 <p><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></p>
19131 Unclosed tags in TOC
19133 title=[[Main Page]]
19137 <small>Hanc marginis exiguitas non caperet.</small>
19140 <div id="toc" class="toc"><div id="toctitle"><h2>Contents</h2></div>
19142 <li class="toclevel-1 tocsection-1"><a href="#Proof:_2_.3C_3"><span class="tocnumber">1</span> <span class="toctext">Proof: 2 < 3</span></a></li>
19146 <h2><span class="mw-headline" id="Proof:_2_.3C_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>
19147 <p><small>Hanc marginis exiguitas non caperet.</small>
19153 Multiple tags in TOC
19156 == <i>Foo</i> <b>Bar</b> ==
19158 == <i>Foo</i> <blockquote>Bar</blockquote> ==
19160 <div id="toc" class="toc"><div id="toctitle"><h2>Contents</h2></div>
19162 <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>
19163 <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>
19167 <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>
19168 <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>
19171 <div id="toc" class="toc">
19172 <div id="toctitle">
19176 <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>
19177 <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>
19180 <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>
19181 <h2><span class="mw-headline" id="Foo_Bar_2"><i>Foo</i></span></h2>
19183 <p><span class="mw-headline" id="Foo_Bar_2">Bar</span></p>
19185 <p><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></p>
19189 Tags with parameters in TOC
19192 == <sup class="in-h2">Hello</sup> ==
19194 == <sup class="a > b">Evilbye</sup> ==
19196 <div id="toc" class="toc"><div id="toctitle"><h2>Contents</h2></div>
19198 <li class="toclevel-1 tocsection-1"><a href="#Hello"><span class="tocnumber">1</span> <span class="toctext"><sup>Hello</sup></span></a></li>
19199 <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>
19203 <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>
19204 <h2><span class="mw-headline" id="b.22.3EEvilbye"><sup> 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>
19209 span tags with directionality in TOC
19212 == <span dir="ltr">C++</span> ==
19214 == <span dir="rtl">זבנג!</span> ==
19216 == <span style="font-style: italic">The attributes on these span tags must be deleted from the TOC</span> ==
19218 == <span style="font-style: italic" dir="ltr">All attributes on these span tags must be deleted from the TOC</span> ==
19220 == <span dir="ltr" style="font-style: italic">Attributes after dir on these span tags must be deleted from the TOC</span> ==
19222 <div id="toc" class="toc"><div id="toctitle"><h2>Contents</h2></div>
19224 <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>
19225 <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>
19226 <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>
19227 <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>
19228 <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>
19232 <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>
19233 <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>
19234 <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>
19235 <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>
19236 <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>
19241 Bug 72884: bdi element in ToC
19244 == <bdi>test</bdi> ==
19246 <div id="toc" class="toc"><div id="toctitle"><h2>Contents</h2></div>
19248 <li class="toclevel-1 tocsection-1"><a href="#test"><span class="tocnumber">1</span> <span class="toctext"><bdi>test</bdi></span></a></li>
19252 <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>
19259 == {{int:headline_sample}} ==
19263 Bug 32057: Title needed when expanding <h> nodes.
19265 title=[[Main Page]]
19269 <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>
19274 Strip marker in urlencode
19276 {{urlencode:x<nowiki/>y}}
19277 {{urlencode:x<nowiki/>y|wiki}}
19278 {{urlencode:x<nowiki/>y|path}}
19305 Strip marker in formatNum
19307 {{formatnum:1<nowiki/>2}}
19308 {{formatnum:1<nowiki/>2|R}}
19316 Check noCommafy in formatNum
19320 {{formatnum:123456.78}}
19321 {{formatnum:123456.78|NOSEP}}
19329 Wrong option for formatNum (bug 56199)
19331 {{formatnum:1,234.56|Random}}
19332 {{formatnum:1,234.56|EVERYTHING}}
19333 {{formatnum:1234.56|any argument that has the string 'NOSEP'}}
19342 Strip marker in grammar
19346 {{grammar:elative|foo<nowiki/>bar}}
19353 Strip marker in padleft
19355 {{padleft:|2|x<nowiki/>y}}
19362 Strip marker in padright
19364 {{padright:|2|x<nowiki/>y}}
19371 Strip marker in anchorencode
19373 {{anchorencode:x<nowiki/>y}}
19380 nowiki inside link inside heading (bug 18295)
19382 ==[[foo|x<nowiki>y</nowiki>z]]==
19384 <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>
19389 new support for bdi element (bug 31817)
19391 <p dir="rtl" lang="he">ולדימיר לנין (ברוסית: <bdi lang="ru">Владимир Ленин</bdi>, 24 באפריל 1870–22 בינואר 1924) הוא מנהיג פוליטי קומוניסטי רוסי.</p>
19393 <p dir="rtl" lang="he">ולדימיר לנין (ברוסית: <bdi lang="ru">Владимир Ленин</bdi>, 24 באפריל 1870–22 בינואר 1924) הוא מנהיג פוליטי קומוניסטי רוסי.</p>
19398 Ignore pipe between table row attributes
19402 |- id=foo | style='color: red'
19410 <tr id="foo" style="color: red">
19417 Gallery override link with WikiLink (bug 34852)
19420 File:foobar.jpg|caption|alt=galleryalt|link=InterWikiLink
19423 <ul class="gallery mw-gallery-traditional">
19424 <li class="gallerybox" style="width: 155px"><div style="width: 155px">
19425 <div class="thumb" style="width: 150px;"><div style="margin:68px auto;"><a href="/wiki/InterWikiLink"><img alt="galleryalt" src="http://example.com/images/thumb/3/3a/Foobar.jpg/120px-Foobar.jpg" width="120" height="14" /></a></div></div>
19426 <div class="gallerytext">
19436 Gallery override link with absolute external link (bug 34852)
19439 File:foobar.jpg|caption|alt=galleryalt|link=http://www.example.org
19442 <ul class="gallery mw-gallery-traditional">
19443 <li class="gallerybox" style="width: 155px"><div style="width: 155px">
19444 <div class="thumb" style="width: 150px;"><div style="margin:68px auto;"><a href="http://www.example.org"><img alt="galleryalt" src="http://example.com/images/thumb/3/3a/Foobar.jpg/120px-Foobar.jpg" width="120" height="14" /></a></div></div>
19445 <div class="gallerytext">
19455 Gallery override link with malicious javascript (bug 34852)
19458 File:foobar.jpg|caption|alt=galleryalt|link=" onclick="alert('malicious javascript code!');
19461 <ul class="gallery mw-gallery-traditional">
19462 <li class="gallerybox" style="width: 155px"><div style="width: 155px">
19463 <div class="thumb" style="width: 150px;"><div style="margin:68px auto;"><a href="/wiki/%22_onclick%3D%22alert(%27malicious_javascript_code!%27);"><img alt="galleryalt" src="http://example.com/images/thumb/3/3a/Foobar.jpg/120px-Foobar.jpg" width="120" height="14" /></a></div></div>
19464 <div class="gallerytext">
19474 Gallery with invalid title as link (bug 43964)
19477 File:foobar.jpg|link=<
19480 <ul class="gallery mw-gallery-traditional">
19481 <li class="gallerybox" style="width: 155px"><div style="width: 155px">
19482 <div class="thumb" style="width: 150px;"><div style="margin:68px auto;"><a href="/wiki/File:Foobar.jpg" class="image"><img alt="Foobar.jpg" src="http://example.com/images/thumb/3/3a/Foobar.jpg/120px-Foobar.jpg" width="120" height="14" /></a></div></div>
19483 <div class="gallerytext">
19491 Language parser function
19500 Padleft and padright as substr
19502 {{padleft:|3|abcde}}
19503 {{padright:|3|abcde}}
19511 Special parser function
19513 {{#special:RandomPage}}
19514 {{#special:BaDtItLe}}
19515 {{#special:Foobar}}
19524 Bug 34939 - Case insensitive link parsing ([HttP://])
19526 [HttP://MediaWiki.Org/]
19528 <p><a rel="nofollow" class="external autonumber" href="HttP://MediaWiki.Org/">[1]</a>
19531 <p><a rel="mw:ExtLink" href="HttP://MediaWiki.Org/"></a></p>
19535 Bug 34939 - Case insensitive link parsing ([HttP:// title])
19537 [HttP://MediaWiki.Org/ MediaWiki]
19539 <p><a rel="nofollow" class="external text" href="HttP://MediaWiki.Org/">MediaWiki</a>
19544 Bug 34939 - Case insensitive link parsing (HttP://)
19546 HttP://MediaWiki.Org/
19548 <p><a rel="nofollow" class="external free" href="HttP://MediaWiki.Org/">HttP://MediaWiki.Org/</a>
19551 <p><a rel="mw:ExtLink" href="HttP://MediaWiki.Org/">HttP://MediaWiki.Org/</a></p>
19569 <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>
19570 <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>
19571 <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>
19572 <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>
19573 <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>
19579 ### Parsoid-specific tests
19580 ### Parsoid-PHP parser incompatibilities
19583 1. SOL-sensitive wikitext tokens as template-args
19585 parsoid=wt2html,wt2wt
19591 <span about="#mwt1" typeof="mw:Transclusion">
19592 </span><ul about="#mwt1"><li>a</li>
19594 <span about="#mwt2" typeof="mw:Transclusion">
19595 </span><ol about="#mwt2"><li>a</li>
19597 <span about="#mwt3" typeof="mw:Transclusion">
19598 </span><dl about="#mwt3"><dd>a</dd>
19602 #### -----------------------------------------------------------------
19603 #### Parsoid-specific functionality tests
19604 #### -----------------------------------------------------------------
19606 # Bug 63642/66749: Formatting elt fixup around images is cleaned up.
19607 # We know wt2wt will fail, but we expect selser to pass.
19608 # Due to the nature of our testing, wt2wt and selser tests will enter the
19609 # blacklist and we'll catch selser regressions based on changes to the
19610 # blacklist entries for selser tests.
19612 1. Bad treebuilder fixup of formatting elt is cleaned up
19614 parsoid=wt2html,wt2wt
19619 [[Image:Foobar.jpg|right|Test]]
19626 <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" height="220" width="1941"></a><figcaption>Test</figcaption></figure>
19633 2. Bad treebuilder fixup of formatting elt is cleaned up
19635 parsoid=wt2html,wt2wt
19637 '''foo[[File:Foobar.jpg|thumb|caption]]bar'''
19639 <small>[[Image:Foobar.jpg|right|300px]]</small>
19642 <figure class="mw-default-size" typeof="mw:Image/Thumb"><a href="File:Foobar.jpg"><img resource="./File:Foobar.jpg" src="//example.com/images/3/3a/Foobar.jpg" height="25" width="220"/></a><figcaption><b>caption</b></figcaption></figure>
19644 <small><figure class="mw-halign-right" typeof="mw:Image"><a href="File:Foobar.jpg"><img resource="./File:Foobar.jpg" src="//example.com/images/3/3a/Foobar.jpg" height="34" width="300"/></a></figure></small>
19647 #### ----------------------------------------------------------------
19648 #### Parsoid-only testing of Parsoid's impl of <ref> and <references>
19649 #### tags. Parsoid's output for these tags differs from that of the
19651 #### ----------------------------------------------------------------
19654 Ref: 1. ref-location should be replaced with an index span
19659 B <ref name="x">foo</ref>
19662 <p>A <span about="#mwt2" class="reference" id="cite_ref-1" rel="dc:references" typeof="mw:Extension/ref" data-mw='{"name":"ref","body":{"html":"foo"},"attrs":{}}'><a href="#cite_note-1">[1]</a></span>
19663 B <span about="#mwt4" class="reference" id="cite_ref-x_2-0" rel="dc:references" typeof="mw:Extension/ref" data-mw='{"name":"ref","body":{"html":"foo"},"attrs":{"name":"x"}}'><a href="#cite_note-x-2">[2]</a></span>
19664 C <span about="#mwt6" class="reference" id="cite_ref-y_3-0" rel="dc:references" typeof="mw:Extension/ref" data-mw='{"name":"ref","attrs":{"name":"y"}}'><a href="#cite_note-y-3">[3]</a></span></p>
19668 Ref: 2. ref-tags with identical names should all get the same index
19672 A <ref name="x">foo</ref>
19675 <p>A <span about="#mwt2" class="reference" id="cite_ref-x_1-0" rel="dc:references" typeof="mw:Extension/ref" data-mw='{"name":"ref","body":{"html":"foo"},"attrs":{"name":"x"}}'><a href="#cite_note-x-1">[1]</a></span>
19676 B <span about="#mwt4" class="reference" id="cite_ref-x_1-1" rel="dc:references" typeof="mw:Extension/ref" data-mw='{"name":"ref","attrs":{"name":"x"}}'><a href="#cite_note-x-1">[1]</a></span></p>
19680 Ref: 3. spaces in ref-names should be ignored
19684 A <ref name="x">foo</ref>
19685 B <ref name=" x " />
19688 <p>A <span about="#mwt2" class="reference" id="cite_ref-x_1-0" rel="dc:references" typeof="mw:Extension/ref" data-mw='{"name":"ref","body":{"html":"foo"},"attrs":{"name":"x"}}'><a href="#cite_note-x-1">[1]</a></span>
19689 B <span about="#mwt4" class="reference" id="cite_ref-x_1-1" rel="dc:references" typeof="mw:Extension/ref" data-mw='{"name":"ref","attrs":{"name":"x"}}'><a href="#cite_note-x-1">[1]</a></span>
19690 C <span about="#mwt6" class="reference" id="cite_ref-x_1-2" rel="dc:references" typeof="mw:Extension/ref" data-mw='{"name":"ref","attrs":{"name":"x"}}'><a href="#cite_note-x-1">[1]</a></span></p>
19693 # NOTE: constructor is a predefined property in JS and constructor as a ref-name can clash with it if not handled properly)
19695 Ref: 4. 'constructor' should be accepted as a valid ref-name
19699 A <ref name="constructor">foo</ref>
19701 <p>A <span about="#mwt2" class="reference" id="cite_ref-constructor_1-0" rel="dc:references" typeof="mw:Extension/ref" data-mw='{"name":"ref","body":{"html":"foo"},"attrs":{"name":"constructor"}}'><a href="#cite_note-constructor-1">[1]</a></span></p>
19705 Ref: 5. body should accept generic wikitext
19710 This is a '''[[bolded link]]''' and this is a {{echo|transclusion}}
19715 <p>A <span about="#mwt2" class="reference" id="cite_ref-1" rel="dc:references" typeof="mw:Extension/ref" data-mw='{"name":"ref","body":{"html":"This is a <b data-parsoid='{\"dsr\":[19,40,3,3]}'><a rel=\"mw:WikiLink\" href=\"./Bolded_link\" title=\"Bolded link\" data-parsoid='{\"stx\":\"simple\",\"a\":{\"href\":\"./Bolded_link\"},\"sa\":{\"href\":\"bolded link\"},\"dsr\":[22,37,2,2]}'>bolded link</a></b> and this is a <span about=\"#mwt3\" typeof=\"mw:Transclusion\" data-parsoid='{\"pi\":[[{\"k\":\"1\",\"spc\":[\"\",\"\",\"\",\"\"]}]],\"dsr\":[55,76,null,null]}' data-mw='{\"parts\":[{\"template\":{\"target\":{\"wt\":\"echo\",\"href\":\"./Template:Echo\"},\"params\":{\"1\":{\"wt\":\"transclusion\"}},\"i\":0}}]}'>transclusion</span>\n"},"attrs":{}}'><a href="#cite_note-1">[1]</a></span></p>
19717 <ol class="references" typeof="mw:Extension/references" about="#mwt5" data-mw='{"name":"references","attrs":{}}'>
19718 <li about="#cite_note-1" id="cite_note-1"><span rel="mw:referencedBy"><a href="#cite_ref-1">↑</a></span> This is a <b><a rel="mw:WikiLink" href="./Bolded_link" title="Bolded link">bolded link</a></b> and this is a <span about="#mwt3" typeof="mw:Transclusion" data-mw='{"parts":[{"template":{"target":{"wt":"echo","href":"./Template:Echo"},"params":{"1":{"wt":"transclusion"}},"i":0}}]}'>transclusion</span>
19724 Ref: 6. indent-pres should not be output in ref-body
19736 <p>A <span about="#mwt2" class="reference" id="cite_ref-1" rel="dc:references" typeof="mw:Extension/ref" data-mw='{"name":"ref","body":{"html":"foo\n bar\n baz\n"},"attrs":{}}'><a href="#cite_note-1">[1]</a></span></p>
19738 <ol class="references" typeof="mw:Extension/references" about="#mwt4" data-mw='{"name":"references","attrs":{}}'>
19739 <li about="#cite_note-1" id="cite_note-1"><span rel="mw:referencedBy"><a href="#cite_ref-1">↑</a></span> foo
19747 Ref: 7. No p-wrapping in ref-body
19766 <p>A <span about="#mwt2" class="reference" id="cite_ref-1" rel="dc:references" typeof="mw:Extension/ref" data-mw='{"name":"ref","body":{"html":"foo\n\nbar\n\n\nbaz\n\n\n\nbooz\n"},"attrs":{}}'><a href="#cite_note-1">[1]</a></span></p>
19768 <ol class="references" typeof="mw:Extension/references" about="#mwt4" data-mw='{"name":"references","attrs":{}}'>
19769 <li about="#cite_note-1" id="cite_note-1"><span rel="mw:referencedBy"><a href="#cite_ref-1">↑</a></span> foo
19784 Ref: 8. transclusion wikitext has lower precedence
19788 A <ref> foo {{echo|</ref> B C}}
19792 <p>A <span about="#mwt2" class="reference" id="cite_ref-1" rel="dc:references" typeof="mw:Extension/ref" data-mw='{"name":"ref","body":{"html":"foo <span typeof=\"mw:Nowiki\" data-parsoid='{\"src\":\"{{\",\"dsr\":[12,14,0,0]}'>{{</span>echo|"},"attrs":{}}'><a href="#cite_note-1">[1]</a></span> B C<span typeof="mw:Nowiki">}}</span></p>
19793 <ol class="references" typeof="mw:Extension/references" about="#mwt4" data-mw='{"name":"references","attrs":{}}'>
19794 <li about="#cite_note-1" id="cite_note-1"><span rel="mw:referencedBy"><a href="#cite_ref-1">↑</a></span> foo <span typeof="mw:Nowiki">{{</span>echo|</li>
19799 Ref: 9. unclosed comments should not leak out of ref-body
19803 A <ref> foo <!--</ref> B C
19806 <p>A <span about="#mwt2" class="reference" id="cite_ref-1" rel="dc:references" typeof="mw:Extension/ref" data-mw='{"name":"ref","body":{"html":"foo <!---->"},"attrs":{}}'><a href="#cite_note-1">[1]</a></span> B C</p>
19807 <ol class="references" typeof="mw:Extension/references" about="#mwt4" data-mw='{"name":"references","attrs":{}}'>
19808 <li about="#cite_note-1" id="cite_note-1"><span rel="mw:referencedBy"><a href="#cite_ref-1">↑</a></span> foo <!----></li>
19813 Ref: 10. Unclosed HTML tags should not leak out of ref-body
19817 A <ref> <b> foo </ref> B C
19821 <p>A <span about="#mwt2" class="reference" id="cite_ref-1" rel="dc:references" typeof="mw:Extension/ref" data-mw='{"name":"ref","body":{"html":"<b data-parsoid='{\"stx\":\"html\",\"autoInsertedEnd\":true,\"dsr\":[8,16,3,0]}'> foo </b>"},"attrs":{}}'><a href="#cite_note-1">[1]</a></span> B C</p>
19824 <ol class="references" typeof="mw:Extension/references" about="#mwt4" data-mw='{"name":"references","attrs":{}}'>
19825 <li about="#cite_note-1" id="cite_note-1"><span rel="mw:referencedBy"><a href="#cite_ref-1">↑</a></span> <b data-parsoid='{"stx":"html","autoInsertedEnd":true}'> foo </b></li>
19830 Ref: 11. ref-tags acts like an inline element wrt P-wrapping
19837 <p>A <span about="#mwt2" class="reference" id="cite_ref-1" rel="dc:references" typeof="mw:Extension/ref" data-mw='{"name":"ref","body":{"html":"foo"},"attrs":{}}'><a href="#cite_note-1">[1]</a></span> B
19838 C <span about="#mwt4" class="reference" id="cite_ref-2" rel="dc:references" typeof="mw:Extension/ref" data-mw='{"name":"ref","body":{"html":"bar"},"attrs":{}}'><a href="#cite_note-2">[2]</a></span> D</p>
19842 Ref: 12. ref-tags act as trailing newline migration barrier
19846 <!--the newline at the end of this line moves out of the p-tag-->a
19848 b<!--the newline at the end of this line stays inside the p-tag--> <ref />
19853 <p><!--the newline at the end of this line moves out of the p-tag-->a</p>
19856 <p>b<!--the newline at the end of this line stays inside the p-tag--> <span about="#mwt2" class="reference" id="cite_ref-1" rel="dc:references" typeof="mw:Extension/ref" data-mw='{"name":"ref","attrs":{}}'><a href="#cite_note-1">[1]</a></span>
19857 <span about="#mwt4" class="reference" id="cite_ref-2" rel="dc:references" typeof="mw:Extension/ref" data-mw='{"name":"ref","attrs":{}}'><a href="#cite_note-2">[2]</a></span></p>
19863 Ref: 13. ref-tags are not SOL-transparent and block indent-pres
19871 <p><span about="#mwt2" class="reference" id="cite_ref-1" rel="dc:references" typeof="mw:Extension/ref" data-mw='{"name":"ref","body":{"html":"foo"},"attrs":{}}'><a href="#cite_note-1">[1]</a></span> A
19872 <span about="#mwt4" class="reference" id="cite_ref-2" rel="dc:references" typeof="mw:Extension/ref" data-mw='{"name":"ref","body":{"html":"bar\n"},"attrs":{}}'><a href="#cite_note-2">[2]</a></span> B</p>
19876 Ref: 14. A nested ref-tag should be emitted as plain text
19880 <ref>foo <ref>bar</ref> baz</ref>
19884 <p><span about="#mwt2" class="reference" id="cite_ref-1" rel="dc:references" typeof="mw:Extension/ref" data-mw='{"name":"ref","body":{"html":"foo &lt;ref>bar&lt;/ref> baz"},"attrs":{}}'><a href="#cite_note-1">[1]</a></span></p>
19886 <ol class="references" typeof="mw:Extension/references" about="#mwt5" data-mw='{"name":"references","attrs":{}}'>
19887 <li about="#cite_note-1" id="cite_note-1"><span rel="mw:referencedBy"><a href="#cite_ref-1">↑</a></span> foo <ref>bar</ref> baz</li>
19892 Ref: 15. ref-tags with identical names should get identical indexes
19896 A1 <ref name="a">foo</ref> A2 <ref name="a" />
19897 B1 <ref name="b" /> B2 <ref name="b">bar</ref>
19901 <p>A1 <span about="#mwt3" class="reference" id="cite_ref-a_1-0" rel="dc:references" typeof="mw:Extension/ref" data-mw='{"name":"ref","body":{"html":"foo"},"attrs":{"name":"a"}}'><a href="#cite_note-a-1">[1]</a></span> A2 <span about="#mwt4" class="reference" id="cite_ref-a_1-1" rel="dc:references" typeof="mw:Extension/ref" data-mw='{"name":"ref","attrs":{"name":"a"}}'><a href="#cite_note-a-1">[1]</a></span>
19902 B1 <span about="#mwt7" class="reference" id="cite_ref-b_2-0" rel="dc:references" typeof="mw:Extension/ref" data-mw='{"name":"ref","attrs":{"name":"b"}}'><a href="#cite_note-b-2">[2]</a></span> B2 <span about="#mwt8" class="reference" id="cite_ref-b_2-1" rel="dc:references" typeof="mw:Extension/ref" data-mw='{"name":"ref","body":{"html":"bar"},"attrs":{"name":"b"}}'><a href="#cite_note-b-2">[2]</a></span></p>
19904 <ol class="references" typeof="mw:Extension/references" about="#mwt10" data-mw='{"name":"references","attrs":{}}'><li about="#cite_note-a-1" id="cite_note-a-1"><span rel="mw:referencedBy">↑ <a href="#cite_ref-a_1-0">1.0</a> <a href="#cite_ref-a_1-1">1.1</a></span> foo</li><li about="#cite_note-b-2" id="cite_note-b-2"><span rel="mw:referencedBy">↑ <a href="#cite_ref-b_2-0">2.0</a> <a href="#cite_ref-b_2-1">2.1</a></span> bar</li>
19908 ## We don't bother wt2wt-ing non-standard whitespace
19910 Ref: 16. Tokenizer should accept non-standard whitespace in <ref> and </ref> tags
19918 <p>A <span about="#mwt2" class="reference" id="cite_ref-1" rel="dc:references" typeof="mw:Extension/ref" data-mw='{"name":"ref","body":{"html":"foo"},"attrs":{}}'><a href="#cite_note-1">[1]</a></span></p>
19920 <ol class="references" typeof="mw:Extension/references" about="#mwt4" data-mw='{"name":"references","attrs":{}}'>
19921 <li about="#cite_note-1" id="cite_note-1"><span rel="mw:referencedBy"><a href="#cite_ref-1">↑</a></span> foo</li></ol>
19925 Ref: 17. Generate valid HTML5 id/about attributes
19929 <ref name="a b">foo</ref>
19933 <p><span class="reference" id="cite_ref-a_b_1-0" rel="dc:references" typeof="mw:Extension/ref" data-mw='{"name":"ref","body":{"html":"foo"},"attrs":{"name":"a b"}}'><a href="#cite_note-a_b-1">[1]</a></span>
19936 <ol class="references" typeof="mw:Extension/references" data-mw='{"name":"references","attrs":{}}'>
19937 <li id="cite_note-a_b-1"><span rel="mw:referencedBy"><a href="#cite_ref-a_b_1-0">↑</a></span> foo</li>
19941 Ref: 18. T58916: Extension attributes should be parsed as plain text
19945 <ref name="{{echo|a}}">foo</ref>
19949 <p><span class="reference" id="cite_ref-.7B.7Becho.7Ca.7D.7D_1-0" rel="dc:references" typeof="mw:Extension/ref" data-mw='{"name":"ref","body":{"html":"foo"},"attrs":{"name":"{{echo|a}}"}}'><a href="#cite_note-.7B.7Becho.7Ca.7D.7D-1">[1]</a></span>
19952 <ol class="references" typeof="mw:Extension/references" data-mw='{"name":"references","attrs":{}}'>
19953 <li id="cite_note-.7B.7Becho.7Ca.7D.7D-1"><span rel="mw:referencedBy"><a href="#cite_ref-.7B.7Becho.7Ca.7D.7D_1-0">↑</a></span> foo</li>
19957 Ref: 19. ref-tags with identical name encodings should get identical indexes
19961 1 <ref name="a & b">foo</ref> 2 <ref name="a & b" />
19965 <p>1 <span about="#mwt3" class="reference" id="cite_ref-a_.26_b_1-0" rel="dc:references" typeof="mw:Extension/ref" data-mw='{"name":"ref","body":{"html":"foo"},"attrs":{"name":"a & b"}}'><a href="#cite_note-a_.26_b-1">[1]</a></span> 2 <span about="#mwt4" class="reference" id="cite_ref-a_.26_b_1-1" rel="dc:references" typeof="mw:Extension/ref" data-mw='{"name":"ref","attrs":{"name":"a &amp; b"}}'><a href="#cite_note-a_.26_b-1">[1]</a></span>
19967 <ol class="references" typeof="mw:Extension/references" about="#mwt10" data-mw='{"name":"references","attrs":{}}'><li about="#cite_note-a_.26_b-1" id="cite_note-a_.26_b-1"><span rel="mw:referencedBy">↑ <a href="#cite_ref-a_.26_b_1-0">1.0</a> <a href="#cite_ref-a_.26_b_1-1">1.1</a></span> foo</li>
19972 References: 1. references tag without any refs should be handled properly
19978 <ol about="#mwt2" class="references" typeof="mw:Extension/references" data-mw='{"name":"references","attrs":{}}'></ol>
19982 References: 2. references tag with group only outputs references from that group
19986 A <ref group="a">foo</ref>
19987 B <ref group="b">bar</ref>
19989 <references group="a" />
19991 <p>A <span about="#mwt2" class="reference" id="cite_ref-1" rel="dc:references" typeof="mw:Extension/ref" data-mw='{"name":"ref","body":{"html":"foo"},"attrs":{"group":"a"}}'><a href="#cite_note-1">[a 1]</a></span>
19992 B <span about="#mwt4" class="reference" id="cite_ref-2" rel="dc:references" typeof="mw:Extension/ref" data-mw='{"name":"ref","body":{"html":"bar"},"attrs":{"group":"b"}}'><a href="#cite_note-2">[b 1]</a></span></p>
19994 <ol class="references" typeof="mw:Extension/references" about="#mwt6" data-mw='{"name":"references","attrs":{"group":"a"}}'><li about="#cite_note-1" id="cite_note-1"><span rel="mw:referencedBy"><a href="#cite_ref-1">↑</a></span> foo</li>
19999 References: 3. ref list should be cleared after processing references
20011 <p>A <span about="#mwt2" class="reference" id="cite_ref-1" rel="dc:references" typeof="mw:Extension/ref" data-mw='{"name":"ref","body":{"html":"foo"},"attrs":{}}'><a href="#cite_note-1">[1]</a></span></p>
20013 <ol class="references" typeof="mw:Extension/references" about="#mwt4" data-mw='{"name":"references","attrs":{}}'><li about="#cite_note-1" id="cite_note-1"><span rel="mw:referencedBy"><a href="#cite_ref-1">↑</a></span> foo</li>
20016 <p>B <span about="#mwt6" class="reference" id="cite_ref-2" rel="dc:references" typeof="mw:Extension/ref" data-mw='{"name":"ref","body":{"html":"bar"},"attrs":{}}'><a href="#cite_note-2">[1]</a></span></p>
20018 <ol class="references" typeof="mw:Extension/references" about="#mwt8" data-mw='{"name":"references","attrs":{}}'><li about="#cite_note-2" id="cite_note-2"><span rel="mw:referencedBy"><a href="#cite_ref-2">↑</a></span> bar</li>
20023 References: 4. only referenced group should be cleared after processing references
20027 A <ref group="a">afoo</ref>
20030 <references group="a" />
20036 <p>A <span about="#mwt2" class="reference" id="cite_ref-1" rel="dc:references" typeof="mw:Extension/ref" data-mw='{"name":"ref","body":{"html":"afoo"},"attrs":{"group":"a"}}'><a href="#cite_note-1">[a 1]</a></span>
20037 B <span about="#mwt4" class="reference" id="cite_ref-2" rel="dc:references" typeof="mw:Extension/ref" data-mw='{"name":"ref","body":{"html":"bfoo"},"attrs":{}}'><a href="#cite_note-2">[1]</a></span></p>
20039 <ol class="references" typeof="mw:Extension/references" about="#mwt6" data-mw='{"name":"references","attrs":{"group":"a"}}'><li about="#cite_note-1" id="cite_note-1"><span rel="mw:referencedBy"><a href="#cite_ref-1">↑</a></span> afoo</li>
20042 <p>C <span about="#mwt8" class="reference" id="cite_ref-3" rel="dc:references" typeof="mw:Extension/ref" data-mw='{"name":"ref","body":{"html":"cfoo"},"attrs":{}}'><a href="#cite_note-3">[2]</a></span></p>
20044 <ol class="references" typeof="mw:Extension/references" about="#mwt10" data-mw='{"name":"references","attrs":{}}'><li about="#cite_note-2" id="cite_note-2"><span rel="mw:referencedBy"><a href="#cite_ref-2">↑</a></span> bfoo</li><li about="#cite_note-3" id="cite_note-3"><span rel="mw:referencedBy"><a href="#cite_ref-3">↑</a></span> cfoo</li>
20049 References: 5. ref tags in references should be processed while ignoring all other content
20054 B <ref name="b">bar</ref>
20057 <ref name="a">foo</ref>
20058 This should just get lost.
20061 <p>A <span about="#mwt2" class="reference" id="cite_ref-a_1-0" rel="dc:references" typeof="mw:Extension/ref" data-mw='{"name":"ref","attrs":{"name":"a"}}'><a href="#cite_note-a-1">[1]</a></span>
20062 B <span about="#mwt4" class="reference" id="cite_ref-b_2-0" rel="dc:references" typeof="mw:Extension/ref" data-mw='{"name":"ref","body":{"html":"bar"},"attrs":{"name":"b"}}'><a href="#cite_note-b-2">[2]</a></span></p>
20065 <ol class="references" typeof="mw:Extension/references" about="#mwt6" data-mw='{"name":"references","body":{"extsrc":"<ref name=\"a\">foo</ref>\nThis should just get lost.","html":"\n<span about=\"#mwt8\" class=\"reference\" rel=\"dc:references\" typeof=\"mw:Extension/ref\" data-parsoid='{\"src\":\"&lt;ref name=\\\"a\\\">foo&lt;/ref>\",\"dsr\":[59,82,14,6]}' data-mw='{\"name\":\"ref\",\"body\":{\"html\":\"foo\"},\"attrs\":{\"name\":\"a\"}}'><a href=\"#cite_note-a-1\">[1]</a></span>\n"},"attrs":{}}'><li about="#cite_note-a-1" id="cite_note-a-1"><span rel="mw:referencedBy"><a href="#cite_ref-a_1-0">↑</a></span> foo</li><li about="#cite_note-b-2" id="cite_note-b-2"><span rel="mw:referencedBy"><a href="#cite_ref-b_2-0">↑</a></span> bar</li>
20070 References: 6. <references /> from a transclusion
20074 <ref>Foo</ref> {{echo|<references />}}
20076 <p><span about="#mwt3" class="reference" id="cite_ref-1" rel="dc:references" typeof="mw:Extension/ref" data-mw='{"name":"ref","body":{"html":"Foo"},"attrs":{}}'><a href="#cite_note-1">[1]</a></span></p> <ol class="references" typeof="mw:Extension/references mw:Transclusion" about="#mwt4" data-mw='{"parts":[{"template":{"target":{"wt":"echo","href":"./Template:Echo"},"params":{"1":{"wt":"<references />"}},"i":0}}]}'><li about="#cite_note-1" id="cite_note-1"><span rel="mw:referencedBy"><a href="#cite_ref-1">↑</a></span> Foo</li></ol>
20080 References: 7. Multiple references tags (one without and one with nested refs) should be correctly handled
20084 A <ref>foo bar for a</ref>
20085 B <ref group="X" name="b" />
20089 <references group="X">
20090 <ref name="b">foo</ref>
20093 <p>A <span about="#mwt2" class="reference" id="cite_ref-1" rel="dc:references" typeof="mw:Extension/ref" data-mw='{"name":"ref","body":{"html":"foo bar for a"},"attrs":{}}'><a href="#cite_note-1">[1]</a></span>
20094 B <span about="#mwt4" class="reference" id="cite_ref-b_2-0" rel="dc:references" typeof="mw:Extension/ref" data-mw='{"name":"ref","attrs":{"group":"X","name":"b"}}'><a href="#cite_note-b-2">[X 1]</a></span></p>
20096 <ol class="references" typeof="mw:Extension/references" about="#mwt6" data-mw='{"name":"references","attrs":{}}'><li about="#cite_note-1" id="cite_note-1"><span rel="mw:referencedBy"><a href="#cite_ref-1">↑</a></span> foo bar for a</li></ol>
20098 <ol class="references" typeof="mw:Extension/references" about="#mwt8" data-mw='{"name":"references","body":{"extsrc":"<ref name=\"b\">foo</ref>","html":"\n<span about=\"#mwt10\" class=\"reference\" rel=\"dc:references\" typeof=\"mw:Extension/ref\" data-parsoid='{\"src\":\"&lt;ref name=\\\"b\\\">foo&lt;/ref>\",\"dsr\":[96,119,14,6]}' data-mw='{\"name\":\"ref\",\"body\":{\"html\":\"foo\"},\"attrs\":{\"name\":\"b\"}}'><a href=\"#cite_note-b-2\">[X 1]</a></span>\n"},"attrs":{"group":"X"}}'><li about="#cite_note-b-2" id="cite_note-b-2"><span rel="mw:referencedBy"><a href="#cite_ref-b_2-0">↑</a></span> foo</li></ol>
20102 Entities in ref name
20106 <ref name="test & me">hi</ref>
20108 <p><span about="#mwt2" class="reference" id="cite_ref-test_.26_me_1-0" rel="dc:references" typeof="mw:Extension/ref" data-mw='{"name":"ref","body":{"html":"hi"},"attrs":{"name":"test &amp; me"}}'><a href="#cite_note-test_.26_me-1">[1]</a></span></p>
20111 # This test is wt2html only because we're permitting the serializer to produce
20112 # dirty diffs, normalizing the unclosed references to the self-closed version.
20114 Generate references for unclosed references tag
20122 <p>a<span about="#mwt2" class="reference" id="cite_ref-1" rel="dc:references" typeof="mw:Extension/ref" data-mw='{"name":"ref","body":{"html":"foo"},"attrs":{}}'><a href="#cite_note-1">[1]</a></span></p>
20125 <ol class="references" typeof="mw:Extension/references" about="#mwt4" data-mw='{"name":"references","attrs":{}}'>
20126 <li about="#cite_note-1" id="cite_note-1"><span rel="mw:referencedBy"><a href="#cite_ref-1">↑</a></span> foo</li></ol>
20130 New reference serializes on its own line
20132 parsoid=wt2wt,html2wt
20137 foo<ol class="references" typeof="mw:Extension/references" about="#mwt2" data-mw='{"name":"references","attrs":{}}'></ol>
20140 #--------- Test stripping of empty nodes in template content ----------
20142 Empty LI and TR nodes should be stripped from template content
20147 <ul typeof="mw:Transclusion" data-mw='{"parts":[{"template":{"target":{"wt":"EmptyLITest","href":"./Template:EmptyLITest"},"params":{},"i":0}}]}'>
20151 <table typeof="mw:Transclusion" data-mw='{"parts":[{"template":{"target":{"wt":"EmptyTRTest","href":"./Template:EmptyTRTest"},"params":{},"i":0}}]}'>
20164 Empty LI and TR nodes should not be stripped from top-level content
20191 Empty TR nodes should not be stripped if they have any attributes set
20193 {{EmptyTRWithHTMLAttrTest}}
20195 <table typeof="mw:Transclusion" data-mw='{"parts":[{"template":{"target":{"wt":"EmptyTRWithHTMLAttrTest","href":"./Template:EmptyTRWithHTMLAttrTest"},"params":{},"i":0}}]}'>
20196 <tr align="center"></tr>
20197 <tr><td>foo</td></tr>
20198 <tr align="center"></tr>
20199 <tr><td>bar</td></tr>
20203 #### ----------------------------------------------------------------
20204 #### The following section of tests are primarily to test
20205 #### wikitext escaping capabilities of Parsoid. Given that
20206 #### escaping can be done any number of ways, the wikitext (input)
20207 #### is always adjusted to reflect how Parsoid adds nowiki
20210 #### We are marking several tests as parsoid-only since the
20211 #### HTML in the result section is different from what the
20212 #### PHP parser generates for it.
20213 #### ----------------------------------------------------------------
20216 #### --------------- Headings ---------------
20218 #### 1. Nested inside html <h1>=foo=</h1>
20219 #### 2. Outside heading nest on a single line <h1>foo</h1>*bar
20220 #### 3. Nested inside html with wikitext split by html tags
20221 #### 4. No escape needed
20222 #### 5. Empty headings <h1></h1>
20223 #### 6. Heading chars in SOL context
20224 #### ----------------------------------------
20226 Headings: 0. Unnested
20230 <nowiki>=foo=</nowiki>
20232 <nowiki> =foo= </nowiki>
20234 <nowiki>=foo=</nowiki>
20236 =foo''a''<nowiki>=</nowiki>
20238 <p><span typeof="mw:Nowiki">=foo=</span></p>
20240 <p><span typeof="mw:Nowiki"> =foo= </span>
20242 <span typeof="mw:Nowiki">=foo=</span></p>
20244 <p>=foo<i>a</i><span typeof="mw:Nowiki">=</span></p>
20247 # New headings and existing headings are handled differently
20249 Headings: 1. Nested inside html
20257 <h1 data-parsoid=''>=foo=</h1>
20258 <h2 data-parsoid=''>=foo=</h2>
20259 <h3 data-parsoid=''>=foo=</h3>
20260 <h4 data-parsoid=''>=foo=</h4>
20261 <h5 data-parsoid=''>=foo=</h5>
20262 <h6 data-parsoid=''>=foo=</h6>
20270 =<nowiki>=foo=</nowiki>=
20271 ==<nowiki>=foo=</nowiki>==
20272 ===<nowiki>=foo=</nowiki>===
20273 ====<nowiki>=foo=</nowiki>====
20274 =====<nowiki>=foo=</nowiki>=====
20275 ======<nowiki>=foo=</nowiki>======
20280 Headings: 2. Outside heading nest on a single line <h1>foo</h1>*bar
20289 <nowiki>*</nowiki>bar
20295 <nowiki>=bar=</nowiki>
20299 Headings: 3. Nested inside html with wikitext split by html tags
20301 parsoid=html2wt,wt2wt
20303 = ='''bold'''<nowiki>foo=</nowiki> =
20305 <h1>=<b>bold</b>foo=</h1>
20309 Headings: 4a. No escaping needed (testing just h1 and h2)
20334 <h1><i>=</i>foo=</h1>
20338 Headings: 4b. No escaping needed (inside p-tags)
20353 Headings: 5. Empty headings
20365 =====<nowiki/>=====
20367 ======<nowiki/>======
20378 Headings: 6a. Heading chars in SOL context (with trailing spaces)
20382 <nowiki>=a=</nowiki>
20384 <nowiki>=a=</nowiki>
20386 <nowiki>=a=</nowiki>
20388 <nowiki>=a=</nowiki>
20397 Headings: 6b. Heading chars in SOL context (with trailing newlines)
20425 Headings: 6c. Heading chars in SOL context (leading newline break)
20430 <nowiki>=b=</nowiki>
20437 Headings: 6d. Heading chars in SOL context (with interspersed comments)
20441 <!--c0--><nowiki>=a=</nowiki>
20443 <!--c1--><nowiki>=a=</nowiki> <!--c2--> <!--c3-->
20445 <p><!--c0-->=a=</p>
20446 <p><!--c1-->=a= <!--c2--> <!--c3--></p>
20450 Headings: 6d. Heading chars in SOL context (No escaping needed)
20460 Headings: 7. Insert a newline between new content and headings
20466 <h2 data-parsoid='{"dsr":[0,5,2,2]}'>A</h2>
20467 <p data-parsoid='{"dsr":[6,7,0,0]}'>a</p>
20477 #### --------------- Lists ---------------
20478 #### 0. Outside nests (*foo, etc.)
20479 #### 1. Nested inside html <ul><li>*foo</li></ul>
20480 #### 2. Inside definition lists
20481 #### 3. Only bullets at start should be escaped
20482 #### 4. No escapes needed
20483 #### 5. No unnecessary escapes
20484 #### 6. Escape bullets in SOL position
20485 #### 7. Escape bullets in a multi-line context
20486 #### ----------------------------------------
20489 Lists: 0. Outside nests
20491 <nowiki>*</nowiki>foo
20493 <nowiki>#</nowiki>foo
20495 <nowiki>;Foo:</nowiki>bar
20504 Lists: 1. Nested inside html
20506 *<nowiki>*foo</nowiki>
20508 *<nowiki>#foo</nowiki>
20510 *<nowiki>:foo</nowiki>
20512 *<nowiki>;foo</nowiki>
20514 #<nowiki>*foo</nowiki>
20516 #<nowiki>#foo</nowiki>
20518 #<nowiki>:foo</nowiki>
20520 #<nowiki>;foo</nowiki>
20522 <ul><li>*foo</li></ul>
20523 <ul><li>#foo</li></ul>
20524 <ul><li>:foo</li></ul>
20525 <ul><li>;foo</li></ul>
20526 <ol><li>*foo</li></ol>
20527 <ol><li>#foo</li></ol>
20528 <ol><li>:foo</li></ol>
20529 <ol><li>;foo</li></ol>
20534 Lists: 2. Inside definition lists
20536 ;<nowiki>;foo</nowiki>
20538 ;<nowiki>:foo</nowiki>
20540 ;<nowiki>:foo</nowiki>
20543 :<nowiki>:foo</nowiki>
20545 <dl><dt>;foo</dt></dl>
20546 <dl><dt>:foo</dt></dl>
20549 <dl><dd>:foo</dd></dl>
20554 Lists: 3. Only bullets at start of text should be escaped
20556 *<nowiki>*foo*bar</nowiki>
20558 *<nowiki>*foo</nowiki>''it''*bar
20560 <ul><li>*foo*bar</li></ul>
20561 <ul><li>*foo<i>it</i>*bar</li></ul>
20566 Lists: 4. No escapes needed
20587 <li><a rel="mw:WikiLink" href="Foo" title="Foo">Foo</a>: bar
20591 <li><a rel="mw:WikiLink" href="Foo" title="Foo">Foo</a>*bar
20597 Lists: 5. No unnecessary escapes
20599 * bar <span><nowiki>[[foo]]</nowiki></span>
20601 * =bar <span><nowiki>[[foo]]</nowiki></span>
20603 * [[bar <span><nowiki>[[foo]]</nowiki></span>
20605 * ]]bar <span><nowiki>[[foo]]</nowiki></span>
20607 * =bar <span>foo]]</span>=
20613 <ul><li> bar <span>[[foo]]</span></li></ul>
20614 <ul><li> =bar <span>[[foo]]</span></li></ul>
20615 <ul><li> [[bar <span>[[foo]]</span></li></ul>
20616 <ul><li> ]]bar <span>[[foo]]</span></li></ul>
20617 <ul><li> =bar <span>foo]]</span>=</li></ul>
20618 <ul><li> <s></s>: a</li></ul>
20619 <ul><li> <i>* foo</i></li></ul>
20624 Lists: 6. Escape bullets in SOL position
20628 <p><!--cmt-->*foo</p>
20630 <!--cmt--><nowiki>*</nowiki>foo
20634 Lists: 7. Escape bullets in a multi-line context
20637 <nowiki>*</nowiki>b
20645 Lists: 8. Escape colons only if not present in tags
20649 <dl><dt>a:b<i>c:d</i></dt></dl>
20651 ; <nowiki>a:b</nowiki>''c:d''
20654 #### --------------- HRs ---------------
20655 #### 1. Single line
20656 #### -----------------------------------
20659 HRs: 1. Single line
20661 ----<nowiki>----</nowiki>
20673 #### --------------- Tables ---------------
20674 #### 1a. Simple example
20675 #### 1b. No escaping needed (!foo)
20676 #### 1c. No escaping needed (|foo)
20677 #### 1d. No escaping needed (|}foo)
20679 #### 2a. Nested in td (<td>foo|bar</td>)
20680 #### 2b. Nested in td (<td>foo||bar</td>)
20681 #### 2c. Nested in td -- no escaping needed(<td>foo!!bar</td>)
20683 #### 3a. Nested in th (<th>foo!bar</th>)
20684 #### 3b. Nested in th (<th>foo!!bar</th>)
20685 #### 3c. Nested in th -- no escaping needed(<th>foo||bar</th>)
20689 #### 4c. No escaping needed
20690 #### --------------------------------------
20693 Tables: 1a. Simple example
20704 Tables: 1b. No escaping needed
20713 Tables: 1c. No escaping needed
20722 Tables: 1d. No escaping needed
20731 Tables: 2a. Nested in td
20736 <td>foo|bar</td></tr>
20737 <tr><td>x<div>a|b</div></td>
20741 |<nowiki>foo|bar</nowiki>
20743 |x<div><nowiki>a|b</nowiki></div>
20759 Tables: 2b. Nested in td
20765 <td>a<i>b||c</i></td>
20766 <td>a<i><div>b||c</div></i></td>
20767 </tr></tbody></table>
20770 |<nowiki>foo||bar</nowiki>
20771 |a''<nowiki>b||c</nowiki>''
20772 |a''<div><nowiki>b||c</nowiki></div>''
20781 <td>a<i><div>b||c</div></i>
20787 Tables: 2c. Nested in td -- no escaping needed
20803 Tables: 3a. Nested in th
20819 Tables: 3b. Nested in th
20824 <tr><th>foo!!bar</th>
20825 <th><i>foo|bar</i></th>
20826 <th><i>foo!!bar</i></th>
20827 <th><i><span>foo!!bar</span></i></th>
20828 </tr></tbody></table>
20831 !<nowiki>foo!!bar</nowiki>
20832 !''<nowiki>foo|bar</nowiki>''
20833 !''<nowiki>foo!!bar</nowiki>''
20834 !''<span><nowiki>foo!!bar</nowiki></span>''
20843 <th><i>foo!!bar</i>
20845 <th><i><span>foo!!bar</span></i>
20851 Tables: 3c. Nested in th
20856 <tr><th>foo||bar</th>
20857 <th><span typeof="mw:Nowiki">foo||bar</span></th>
20858 </tr></tbody></table>
20861 !<nowiki>foo||bar</nowiki>
20862 !<nowiki>foo||bar</nowiki>
20875 Tables: 4a. Escape -
20894 |<nowiki>-bar</nowiki>
20899 Tables: 4b. Escape +
20918 |<nowiki>+bar</nowiki>
20923 Tables: 4c. No escaping needed
20966 <tr><td>foo-bar</td><td>foo+bar</td></tr>
20967 <tr><td><i>foo</i>-bar</td><td><i>foo</i>+bar</td></tr>
20973 <div>a|b</div></td>
20978 Tables: 4d. No escaping needed
20988 <td><a href="/wiki/Foo" title="Foo">Foo</a>-bar
20997 <tbody><tr><td><a rel="mw:WikiLink" href="./Foo" title="Foo">Foo</a>-bar</td>
20998 <td data-parsoid='{"startTagSrc":"|","attrSepSrc":"|"}'>+1</td>
20999 <td data-parsoid='{"startTagSrc":"|","attrSepSrc":"|"}'>-2</td></tr>
21004 Tables: Digest broken attributes on table and tr tag
21020 #### --------------- Links ----------------
21021 #### 1. Quote marks in link text
21022 #### 2. Wikilinks: Escapes needed
21023 #### 3. Wikilinks: No escapes needed
21024 #### 4. Extlinks: Escapes needed
21025 #### 5. Extlinks: No escapes needed
21026 #### --------------------------------------
21028 Links 1. WikiLinks: No escapes needed
21032 [[Foo|x [Foobar] x]]
21034 <p><a href="/wiki/Foo" title="Foo">Foo<i>boo</i></a>
21035 <a href="/wiki/Foo" title="Foo">[Foobar]</a>
21036 <a href="/wiki/Foo" title="Foo">x [Foobar] x</a>
21039 <p><a rel="mw:WikiLink" href="Foo" title="Foo">Foo<i>boo</i></a>
21040 <a rel="mw:WikiLink" href="Foo" title="Foo">[Foobar]</a>
21041 <a rel="mw:WikiLink" href="Foo" title="Foo">x [Foobar] x</a></p>
21045 Links 2. WikiLinks: Escapes needed
21049 <a href="Foo" rel="mw:WikiLink">Foobar]</a>
21050 <a href="Foo" rel="mw:WikiLink">x [http://google.com g] x</a>
21051 <a href="Foo" rel="mw:WikiLink">[[Bar]]</a>
21052 <a href="Foo" rel="mw:WikiLink">x [[Bar]] x</a>
21053 <a href="Foo" rel="mw:WikiLink">|Bar</a>
21054 <a href="Foo" rel="mw:WikiLink">]]bar</a>
21055 <a href="Foo" rel="mw:WikiLink">[[bar</a>
21056 <a href="Foo" rel="mw:WikiLink">x [[ y</a>
21057 <a href="Foo" rel="mw:WikiLink">x ]] y</a>
21058 <a href="Foo" rel="mw:WikiLink">x ]] y [[ z</a>
21060 [[Foo|<nowiki>Foobar]</nowiki>]]
21061 [[Foo|x <nowiki>[http://google.com g]</nowiki> x]]
21062 [[Foo|<nowiki>[[Bar]]</nowiki>]]
21063 [[Foo|<nowiki>x [[Bar]] x</nowiki>]]
21064 [[Foo|<nowiki>|Bar</nowiki>]]
21065 [[Foo|<nowiki>]]bar</nowiki>]]
21066 [[Foo|<nowiki>[[bar</nowiki>]]
21067 [[Foo|<nowiki>x [[ y</nowiki>]]
21068 [[Foo|<nowiki>x ]] y</nowiki>]]
21069 [[Foo|<nowiki>x ]] y [[ z</nowiki>]]
21071 <p><a href="/wiki/Foo" title="Foo">Foobar]</a>
21072 <a href="/wiki/Foo" title="Foo">x [http://google.com g] x</a>
21073 <a href="/wiki/Foo" title="Foo">[[Bar]]</a>
21074 <a href="/wiki/Foo" title="Foo">x [[Bar]] x</a>
21075 <a href="/wiki/Foo" title="Foo">|Bar</a>
21076 <a href="/wiki/Foo" title="Foo">]]bar</a>
21077 <a href="/wiki/Foo" title="Foo">[[bar</a>
21078 <a href="/wiki/Foo" title="Foo">x [[ y</a>
21079 <a href="/wiki/Foo" title="Foo">x ]] y</a>
21080 <a href="/wiki/Foo" title="Foo">x ]] y [[ z</a>
21085 Links 3. WikiLinks: No escapes needed
21090 <p><a href="/wiki/Foo" title="Foo">[Foobar</a>
21091 <a href="/wiki/Foo" title="Foo">foo|bar</a>
21094 <p><a rel="mw:WikiLink" href="Foo">[Foobar</a>
21095 <a rel="mw:WikiLink" href="Foo" title="Foo">foo|bar</a></p>
21099 Links 4. ExtLinks: Escapes needed
21103 <p><a rel="mw:ExtLink" href="http://google.com">[google]</a>
21104 <a rel="mw:ExtLink" href="http://google.com">google]</a></p>
21105 <p>[http://google.com]</p>
21106 <p>[http://google.com google]</p>
21108 [http://google.com <nowiki>[google]</nowiki>]
21109 [http://google.com <nowiki>google]</nowiki>]
21111 <nowiki>[http://google.com]</nowiki>
21113 <nowiki>[http://google.com google]</nowiki>
21116 <p><a rel="nofollow" class="external text" href="http://google.com">[google]</a>
21117 <a rel="nofollow" class="external text" href="http://google.com">google]</a>
21118 </p><p>[http://google.com]
21119 </p><p>[http://google.com google]
21124 Links 5. ExtLinks: No escapes needed
21126 [http://google.com [google]
21128 <p><a rel="nofollow" class="external text" href="http://google.com">[google</a>
21131 <p><a rel="mw:ExtLink" href="http://google.com">[google</a></p>
21135 Links 6. Add <nowiki/>s between text-nodes and url-links when required (bug 64300)
21137 <p>x<a rel="mw:ExtLink" href="http://example.com" data-parsoid='{"stx":"url"}'>http://example.com</a>y
21138 <a rel="mw:ExtLink" href="http://example.com" data-parsoid='{"stx":"url"}'>http://example.com</a>?x
21139 <a rel="mw:ExtLink" href="http://example.com" data-parsoid='{"stx":"url"}'>http://example.com</a>&x
21140 <a rel="mw:ExtLink" href="http://example.com" data-parsoid='{"stx":"url"}'>http://example.com</a>'x
21141 <a rel="mw:ExtLink" href="http://example.com" data-parsoid='{"stx":"url"}'>http://example.com</a>,x
21142 <a rel="mw:ExtLink" href="http://example.com" data-parsoid='{"stx":"url"}'>http://example.com</a>.x
21143 <a rel="mw:ExtLink" href="http://example.com" data-parsoid='{"stx":"url"}'>http://example.com</a>;x
21144 <a rel="mw:ExtLink" href="http://example.com" data-parsoid='{"stx":"url"}'>http://example.com</a>:x
21145 <a rel="mw:ExtLink" href="http://example.com" data-parsoid='{"stx":"url"}'>http://example.com</a>;x
21146 <a rel="mw:ExtLink" href="http://example.com" data-parsoid='{"stx":"url"}'>http://example.com</a>!x
21147 <a rel="mw:ExtLink" href="http://example.com" data-parsoid='{"stx":"url"}'>http://example.com</a>=x
21148 <a rel="mw:ExtLink" href="http://example.com" data-parsoid='{"stx":"url"}'>http://example.com</a>(x)
21149 <a rel="mw:ExtLink" href="http://example.com(x" data-parsoid='{"stx":"url"}'>http://example.com(x</a>)
21152 x<nowiki/>http://example.com<nowiki/>y
21153 http://example.com<nowiki/>?x
21154 http://example.com<nowiki/>&x
21155 http://example.com<nowiki/>'x
21156 http://example.com<nowiki/>,x
21157 http://example.com<nowiki/>.x
21158 http://example.com<nowiki/>;x
21159 http://example.com<nowiki/>:x
21160 http://example.com<nowiki/>;x
21161 http://example.com<nowiki/>!x
21162 http://example.com<nowiki/>=x
21163 http://example.com<nowiki/>(x)
21164 http://example.com(x<nowiki/>)
21168 Links 7a. Don't add spurious <nowiki/>s between text-nodes and url-links (bug 64300)
21171 <a rel="mw:ExtLink" href="http://example.com" data-parsoid='{"stx":"url"}'>http://example.com</a>
21173 "<a rel="mw:ExtLink" href="http://example.com" data-parsoid='{"stx":"url"}'>http://example.com</a>"
21174 (<a rel="mw:ExtLink" href="http://example.com" data-parsoid='{"stx":"url"}'>http://example.com</a>)
21175 (<a rel="mw:ExtLink" href="http://example.com" data-parsoid='{"stx":"url"}'>http://example.com</a>) foo
21176 <a rel="mw:ExtLink" href="http://example.com" data-parsoid='{"stx":"url"}'>http://example.com</a>,
21177 <a rel="mw:ExtLink" href="http://example.com" data-parsoid='{"stx":"url"}'>http://example.com</a>, foo
21183 "http://example.com"
21184 (http://example.com)
21185 (http://example.com) foo
21186 http://example.com,
21187 http://example.com, foo
21190 <a rel="nofollow" class="external free" href="http://example.com">http://example.com</a>
21192 "<a rel="nofollow" class="external free" href="http://example.com">http://example.com</a>"
21193 (<a rel="nofollow" class="external free" href="http://example.com">http://example.com</a>)
21194 (<a rel="nofollow" class="external free" href="http://example.com">http://example.com</a>) foo
21195 <a rel="nofollow" class="external free" href="http://example.com">http://example.com</a>,
21196 <a rel="nofollow" class="external free" href="http://example.com">http://example.com</a>, foo
21201 Links 7b. Don't add spurious <nowiki/>s between text-nodes and url-links (bug 64300)
21203 <p><a rel="mw:ExtLink" href="http://example.com" data-parsoid='{"stx":"url"}'>http://example.com</a>.,;:!?\
21204 -<a rel="mw:ExtLink" href="http://example.com">http://example.com</a>:</p>
21206 http://example.com.,;:!?\
21207 -http://example.com:
21209 <p><a rel="nofollow" class="external free" href="http://example.com">http://example.com</a>.,;:!?\
21210 -<a rel="nofollow" class="external free" href="http://example.com">http://example.com</a>:
21215 Links 8. Add <nowiki/>s between text-nodes and RFC-links when required (bug 64300)
21217 <p><a href="//tools.ietf.org/html/rfc123" rel="mw:ExtLink" data-parsoid='{"stx":"magiclink"}'>RFC 123</a>4
21218 <a href="//tools.ietf.org/html/rfc123" rel="mw:ExtLink" data-parsoid='{"stx":"magiclink"}'>RFC 123</a>y
21219 X<a href="//tools.ietf.org/html/rfc123" rel="mw:ExtLink" data-parsoid='{"stx":"magiclink"}'>RFC 123</a>y</p>
21223 X<nowiki/>RFC 123<nowiki/>y
21227 Links 9. Don't add spurious <nowiki/>s between text-nodes and RFC-links (bug 64300)
21229 <p><a href="//tools.ietf.org/html/rfc123" rel="mw:ExtLink" data-parsoid='{"stx":"magiclink"}'>RFC 123</a>?foo
21230 <a href="//tools.ietf.org/html/rfc123" rel="mw:ExtLink" data-parsoid='{"stx":"magiclink"}'>RFC 123</a>&foo
21231 -<a href="//tools.ietf.org/html/rfc123" rel="mw:ExtLink" data-parsoid='{"stx":"magiclink"}'>RFC 123</a>-
21238 <p><a class="external mw-magiclink-rfc" rel="nofollow" href="//tools.ietf.org/html/rfc123">RFC 123</a>?foo
21239 <a class="external mw-magiclink-rfc" rel="nofollow" href="//tools.ietf.org/html/rfc123">RFC 123</a>&foo
21240 -<a class="external mw-magiclink-rfc" rel="nofollow" href="//tools.ietf.org/html/rfc123">RFC 123</a>-
21245 Links 10. Add <nowiki/>s between text-nodes and PMID-links when required (bug 64300)
21247 <p><a href="//www.ncbi.nlm.nih.gov/pubmed/123?dopt=Abstract" rel="mw:ExtLink" data-parsoid='{"stx":"magiclink"}'>PMID 123</a>4
21248 <a href="//www.ncbi.nlm.nih.gov/pubmed/123?dopt=Abstract" rel="mw:ExtLink" data-parsoid='{"stx":"magiclink"}'>PMID 123</a>y
21249 X<a href="//www.ncbi.nlm.nih.gov/pubmed/123?dopt=Abstract" rel="mw:ExtLink" data-parsoid='{"stx":"magiclink"}'>PMID 123</a>y
21253 X<nowiki/>PMID 123<nowiki/>y
21257 Links 11. Don't add spurious <nowiki/>s between text-nodes and PMID-links (bug 64300)
21259 <p><a href="//www.ncbi.nlm.nih.gov/pubmed/123?dopt=Abstract" rel="mw:ExtLink" data-parsoid='{"stx":"magiclink"}'>PMID 123</a>?foo
21260 <a href="//www.ncbi.nlm.nih.gov/pubmed/123?dopt=Abstract" rel="mw:ExtLink" data-parsoid='{"stx":"magiclink"}'>PMID 123</a>&foo
21261 -<a href="//www.ncbi.nlm.nih.gov/pubmed/123?dopt=Abstract" rel="mw:ExtLink" data-parsoid='{"stx":"magiclink"}'>PMID 123</a>-
21268 <p><a class="external mw-magiclink-pmid" rel="nofollow" href="//www.ncbi.nlm.nih.gov/pubmed/123?dopt=Abstract">PMID 123</a>?foo
21269 <a class="external mw-magiclink-pmid" rel="nofollow" href="//www.ncbi.nlm.nih.gov/pubmed/123?dopt=Abstract">PMID 123</a>&foo
21270 -<a class="external mw-magiclink-pmid" rel="nofollow" href="//www.ncbi.nlm.nih.gov/pubmed/123?dopt=Abstract">PMID 123</a>-
21275 Links 12. Add <nowiki/>s between text-nodes and ISBN-links when required (bug 64300)
21277 <p><a href="./Special:BookSources/1234567890" rel="mw:ExtLink" data-parsoid='{"stx":"magiclink"}'>ISBN 1234567890</a>1
21278 <a href="./Special:BookSources/1234567890" rel="mw:ExtLink" data-parsoid='{"stx":"magiclink"}'>ISBN 1234567890</a>x
21279 a<a href="./Special:BookSources/1234567890" rel="mw:ExtLink" data-parsoid='{"stx":"magiclink"}'>ISBN 1234567890</a>b
21282 ISBN 1234567890<nowiki/>1
21283 ISBN 1234567890<nowiki/>x
21284 a<nowiki/>ISBN 1234567890<nowiki/>b
21288 Links 13. Don't add spurious <nowiki/>s between text-nodes and ISBN-links (bug 64300)
21290 <p>-<a href="./Special:BookSources/1234567890" rel="mw:ExtLink" data-parsoid='{"stx":"magiclink"}'>ISBN 1234567890</a>'s
21294 <p>-<a href="/wiki/Special:BookSources/1234567890" class="internal mw-magiclink-isbn">ISBN 1234567890</a>'s
21299 Links 14. Protect link-like plain text. (Parsoid bug T78425)
21303 <p>this is not a link: http://example.com
21306 this is not a link: <nowiki>http://example.com</nowiki>
21310 Links 15. Link trails can't become link prefixes.
21314 [[Söfnuður]]-[[00]]
21316 <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>
21319 <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>
21322 #### --------------- Quotes ---------------
21323 #### 1. Quotes inside <b> and <i>
21324 #### 2. Link fragments separated by <i> and <b> tags
21325 #### 3. Link fragments inside <i> and <b>
21326 #### 4. No escaping needed
21327 #### --------------------------------------
21329 1a. Quotes inside <b> and <i>
21331 parsoid=html2wt,wt2wt
21334 ''<nowiki>''foo''</nowiki>''
21335 ''<nowiki>'''foo'''</nowiki>''
21337 '''<nowiki/>'foo''''
21338 '''<nowiki>''foo''</nowiki>'''
21339 '''<nowiki>'''foo'''</nowiki>'''
21340 '''foo'<nowiki/>''bar'<nowiki/>''baz'''
21341 '''foo'''<nowiki/>'s
21347 '''foo'''<nowiki/>'
21348 ''''foo'''<nowiki/>'
21349 ''fools'<span> errand</span>''
21350 ''<span>fool</span>'s errand''
21351 '<nowiki/>''foo'' bar '''baz''
21352 a|!*#-:;+-~[]{}b'''x''
21361 <b>foo'<i>bar'</i>baz</b>
21370 <i>fools'<span> errand</span></i>
21371 <i><span>fool</span>'s errand</i>
21372 '<i>foo</i> bar '<i>baz</i>
21373 a|!*#-:;+-~[]{}b'<i>x</i>
21378 1b. Quotes inside <b> and <i> with other tags on same line
21380 parsoid=html2wt,wt2wt
21382 '''a'' foo ''[[bar]]''
21383 ''a''' foo ''[[bar]]''
21384 ''a''' foo '''{{echo|[[bar]]}}'''
21385 [[foo]] x'''[[bar]]''
21386 '''foo'' <ref>test</ref>
21387 '''foo'' <div title="name">test</div>
21388 '''foo'' and <br> bar
21390 '<i>a</i> foo <i><a rel="mw:WikiLink" href="Bar" title="Bar">bar</a></i>
21391 <i>a'</i> foo <i><a rel="mw:WikiLink" href="Bar" title="Bar">bar</a></i>
21392 <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>
21393 <a rel="mw:WikiLink" href="Foo" title="Foo">foo</a> x'<i><a href="Bar" rel="mw:WikiLink" title="Bar">bar</a></i>
21394 '<i>foo</i> <span class="reference" id="cite_ref-1-0" rel="dc:references" typeof="mw:Extension/ref" data-mw='{"name":"ref","body":{"html":"test"},"attrs":{}}'><a href="#cite_note-1">[1]</a></span>
21395 '<i>foo</i> <div title="name">test</div>
21396 '<i>foo</i> and <br data-parsoid='{"stx":"html","noClose":true}'/> bar
21400 2. Link fragments separated by <i> and <b> tags
21402 [[''foo''<nowiki>hello]]</nowiki>
21404 [['''foo'''<nowiki>hello]]</nowiki>
21406 <p>[[<i>foo</i>hello]]
21407 </p><p>[[<b>foo</b>hello]]
21411 # FIXME: Escaping one or both of [[ and ]] is also acceptable --
21412 # this is one of the shortcomings of this format
21414 3. Link fragments inside <i> and <b>
21416 ''[[foo''<nowiki>]]</nowiki>
21418 '''[[foo'''<nowiki>]]</nowiki>
21421 </p><p><b>[[foo</b>]]
21426 4. No escaping needed
21428 '<span>''bar''</span>'
21429 '<span>'''bar'''</span>'
21432 <p>'<span><i>bar</i></span>'
21433 '<span><b>bar</b></span>'
21438 #### ----------- Paragraphs ---------------
21439 #### 1. No unnecessary escapes
21440 #### --------------------------------------
21443 1. No unnecessary escapes
21445 bar <span><nowiki>[[foo]]</nowiki></span>
21447 =bar <span><nowiki>[[foo]]</nowiki></span>
21449 [[bar <span><nowiki>[[foo]]</nowiki></span>
21451 ]]bar <span><nowiki>[[foo]]</nowiki></span>
21453 =bar <span>foo]]</span><nowiki>=</nowiki>
21455 <p>bar <span>[[foo]]</span>
21456 </p><p>=bar <span>[[foo]]</span>
21457 </p><p>[[bar <span>[[foo]]</span>
21458 </p><p>]]bar <span>[[foo]]</span>
21459 </p><p>=bar <span>foo]]</span>=
21463 #### ----------------------- PRE --------------------------
21464 #### 1. Leading whitespace in SOL context should be escaped
21465 #### ------------------------------------------------------
21467 1. Leading whitespace in SOL context should be escaped
21471 <nowiki> </nowiki>a
21473 <nowiki> </nowiki> a
21475 <nowiki> </nowiki>a(tab)
21477 <nowiki> </nowiki> a
21479 <nowiki> </nowiki> a
21482 <nowiki> </nowiki>b
21485 <nowiki> </nowiki>b
21488 <nowiki> </nowiki> b
21494 <p><!--cmt--> a</p>
21504 2. Leading whitespace in non-indent-pre contexts should not be escaped
21511 <p>foo <span about="#mwt2" class="reference" id="cite_ref-1" rel="dc:references" typeof="mw:Extension/ref" data-mw='{"name":"ref","body":{"html":"<i data-parsoid='{\"dsr\":[9,14,2,2]}'>a</i>\n b"},"attrs":{}}'><a href="#cite_note-1">[1]</a></span></p>
21515 3. Leading whitespace in indent-pre suppressing contexts should not be escaped
21534 4. Leading whitespace in indent-pre suppressing contexts should not be escaped
21538 [[File:Foobar.jpg|thumb|caption]]
21541 <figure class="mw-default-size" typeof="mw:Image/Thumb"><a href="File:Foobar.jpg"><img resource="./File:Foobar.jpg" src="//example.com/images/3/3a/Foobar.jpg" height="25" width="220"/></a><figcaption>caption</figcaption></figure>
21545 5. Nowiki escaping should account for indent-pres
21554 #### --------------- Behavior Switches --------------------
21556 1. Valid behavior switches should be escaped
21563 <nowiki>__TOC__</nowiki>
21564 ''<nowiki>__TOC__</nowiki>''
21568 2. Invalid behavior switches should not be escaped
21579 #### --------------- HTML tags ---------------
21582 #### 3. multi-line html tag
21583 #### 4. extension tags
21584 #### -----------------------------------------
21590 <a href="http://google.com">google</a>
21592 <a href="http://google.com">google</a>
21598 <nowiki><div>foo</div>
21599 <div style="color:red">foo</div></nowiki>
21601 <p><div>foo</div>
21602 <div style="color:red">foo</div>
21607 3. multi-line html tag
21622 <nowiki><ref>foo</ref></nowiki>
21624 <nowiki><ref>bar</nowiki>
21626 baz<nowiki></ref></nowiki>
21628 <p><ref>foo</ref>
21629 </p><p><ref>bar
21630 </p><p>baz</ref>
21634 #### --------------- Others ---------------
21638 <nowiki>foo</nowiki>
21640 <p><nowiki>foo</nowiki>
21644 ## The quote-char in the input is necessary for triggering the bug
21646 (Bug 52035) Nowiki-escaping should not get tripped by " :" in text
21648 parsoid=wt2wt,html2wt
21657 Tag-like HTML structures are passed through as text
21679 </p><p>1<d e>f
21684 # This was a bug in the PHP parser (see bug 17663 and its dups,
21685 # https://bugzilla.wikimedia.org/show_bug.cgi?id=17663)
21687 Tag names followed by punctuation should not be recognized as tags
21691 <p><s.ome> text
21696 HTML tag with necessary entities in attributes
21698 <span title="&amp;">foo</span>
21700 <p><span title="&amp;">foo</span>
21705 HTML tag with 'unnecessary' entity encoding in attributes
21707 <span title="&">foo</span>
21709 <p><span title="&">foo</span>
21714 HTML tag with broken attribute value quoting
21716 <span title="Hello world>Foo</span>
21718 <p><span>Foo</span>
21721 <p><span title="Hello world">Foo</span>
21726 Parsoid-only: HTML tag with broken attribute value quoting
21730 <span title="Hello world>Foo</span>
21732 <p><span title="Hello world">Foo</span>
21737 Table with broken attribute value quoting
21740 | title="Hello world|Foo
21751 <td title="Hello world">Foo
21757 Table with broken attribute value quoting on consecutive lines
21760 | title="Hello world|Foo
21761 | style="color:red|Bar
21774 <td title="Hello world">Foo
21775 </td><td style="color: red">Bar
21776 </td></tr></tbody></table>
21781 Parsoid-only: Don't wrap broken template tags in <nowiki> on wt2wt (Bug 42353)
21791 Parsoid-only: Don't wrap broken template tags in <nowiki> on wt2wt (Bug 42353)
21801 Accept empty td cell attribute
21804 | align="center" | foo || |
21809 <td align="center"> foo </td>
21816 Non-empty attributes in th-cells
21819 ! Foo !! style="color: red" | Bar
21825 <th style="color: red"> Bar
21831 Accept empty attributes in th-cells
21846 Empty table rows go away
21867 ### Parsoid-centric tests for testing RTing of inter-element separators
21868 ### Edge cases not tested by existing parser tests and specific to
21869 ### Parsoid-specific serialization strategies.
21873 RT-ed inter-element separators should be valid separators
21885 # Parsoid-only since PHP parser relies on Tidy for correct output
21887 Trailing newlines in a deep dom-subtree that ends a wikitext line should be migrated out
21901 <tbody><tr data-parsoid='{"autoInsertedEnd":true,"autoInsertedStart":true}'><td data-parsoid='{"autoInsertedEnd":true}'><small data-parsoid='{"stx":"html","autoInsertedEnd":true}'>foo
21902 <p>bar</p></small></td></tr>
21906 <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>
21911 Empty TD followed by TD with tpl-generated attribute
21916 |{{echo|style='color:red'}}|foo
21930 Indented table with an empty td
21948 ## We have some newline diffs RT-ing this edge case
21949 ## and it is not important enough -- we seem to be emitting
21950 ## at most 2 newlines after a </tr> and this is unrelated to
21951 ## the issue from T85627 that this is testing.
21953 Indented table with blank lines in between (T85627)
21972 Indented block & table
21986 <div data-parsoid='{"stx":"html"}'>foo</div>
21988 <tr data-parsoid='{"autoInsertedEnd":true,"autoInsertedStart":true}'><td data-parsoid='{"autoInsertedEnd":true}'>foo</td></tr>
21993 Indent and comment before table row
22008 <!--hi--><tbody><tr data-parsoid='{"startTagSrc":"|-","autoInsertedEnd":true}'>
22009 <td data-parsoid='{"autoInsertedEnd":true}'> there</td></tr>
22013 # Parsoid-specific since PHP parser doesn't handle this mixed tbl-wikitext
22015 Empty TR followed by a template-generated TR
22021 {{echo|<tr><td>foo</td></tr>}}
22027 <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}}]}'>
22032 ## PHP and parsoid output differ for this, and since this is primarily
22033 ## for testing Parsoid's serializer, marking this Parsoid only
22035 Empty TR followed by mixed-ws-comment line should RT correctly
22051 <!--c--> </tr><!--d-->
22057 Multi-line image caption generated by templates with/without trailing newlines
22059 [[File:Foobar.jpg|thumb|300x300px|foo\n{{echo|A}}\n{{echo|B}}\n{{echo|C}}]]
22060 [[File:Foobar.jpg|thumb|300x300px|foo\n{{echo|A}}\n{{echo|B}}\n{{echo|C}}\n\n]]
22062 <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" 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>
22063 <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" 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>
22067 New element inserted (without intervening newlines) after an old sol-transparent node should serialize correctly
22071 <meta typeof="mw:Includes/IncludeOnly" data-parsoid='{"src":"<includeonly>foo</includeonly>"}'/><meta typeof="mw:Includes/IncludeOnly/End" data-parsoid='{"src":""}'/><p>new para</p>
22073 <link rel="mw:PageProp/Category" href="./Category:Foo" data-parsoid=''/><h1>new heading</h1>
22075 <includeonly>foo</includeonly>
22083 ## PHP emits broken html for this, and since this is primarily
22084 ## a Parsoid serializer test, marking this Parsoid only
22086 Improperly nested inline or quotes tags with whitespace in between
22090 <span> <s>x</span> </s>
22093 <p><span> <s>x</s></span><s> </s>
22094 <b> <i>x</i></b><i> </i>
22099 Encapsulate protected attributes from wt
22103 <div typeof="mw:placeholder stuff" data-parsoid="weird" data-parsoid-other="no" about="time" rel="mw:true">foo</div>
22105 <body><div data-x-typeof="mw:placeholder stuff" data-x-data-parsoid="weird" data-x-data-parsoid-other="no" data-x-about="time" data-x-rel="mw:true">foo</div>
22109 ## Currently the p-wrapper is fragile in how it adds / removes transformations.
22110 ## Having nested or stray pre tags results in the attempt to add duplicates,
22111 ## causing an assertion fail. This test tries to prevent that situation.
22113 Ensure ParagraphWrapper can deal with stray closing pre tags
22123 1. Ensure fostered text content is wrapped in element nodes
22127 <table>hi</table><table>ho</table>
22136 2. Ensure fostered text content is wrapped in element nodes (traps regressions around fostered marker on the element getting lost)
22138 parsoid=wt2html,wt2wt
22147 <tbody><tr><td> a</td></tr>
22152 Encapsulation properly handles null DSR information from foster box
22154 parsoid=wt2html,wt2wt
22156 {{echo|<table>foo<tr><td>bar</td></tr></table>}}
22158 <span 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</span><table><tbody><tr><td>bar</td></tr></tbody></table>
22162 1. Encapsulate foster-parented transclusion content
22164 parsoid=wt2wt,wt2html
22166 <table>{{echo|foo<tr><td>bar</td></tr>}}</table>
22168 <p typeof="mw:Transclusion" 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>
22178 2. Encapsulate foster-parented transclusion content
22180 parsoid=wt2wt,wt2html
22182 <table><div>{{echo|foo}}</div><tr><td>bar</td></tr></table>
22184 <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>
22195 3. Encapsulate foster-parented transclusion content
22197 parsoid=wt2wt,wt2html
22199 <table><div><p>{{echo|foo</p></div><tr><td>}}bar</td></tr></table>
22201 <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>"]}">
22214 4. Encapsulate foster-parented transclusion content
22216 parsoid=wt2wt,wt2html
22218 <table><div><p>{{echo|foo</p></div><tr><td>}}bar</td></tr></table>
22220 <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>"]}">
22233 5. Encapsulate foster-parented transclusion content
22235 parsoid=wt2wt,wt2html
22237 <table><tr><td><div><p>{{echo|foo</p></div></td>foo}}</tr></table>
22239 <p typeof="mw:Transclusion" 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>
22254 6. Encapsulate foster-parented transclusion content
22256 parsoid=wt2wt,wt2html
22258 <table><tr><td><div><p>{{echo|foo</p></div></td>foo</tr></table>}}<p>ok</p>
22260 <p typeof="mw:Transclusion" 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>
22276 7. Encapsulate foster-parented transclusion content
22278 parsoid=wt2wt,wt2html
22280 <table>{{echo|<p>foo</p>}}<td>bar</td></table>
22282 <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>
22293 8. Encapsulate foster-parented transclusion content
22295 parsoid=wt2wt,wt2html
22298 }}{|{{echo|style='color:red'}}
22303 <p typeof="mw:Transclusion" data-mw="{"parts":[{"template":{"target":{"wt":"echo","href":"./Template:Echo"},"params":{"1":{"wt":"a\n"}},"i":0}}]}">a</p><p typeof="mw:Transclusion" data-mw="{"parts":["{|",{"template":{"target":{"wt":"echo","href":"./Template:Echo"},"params":{"style":{"wt":"'color:red'"}},"i":0}},"\n|-\n|b\n|}"]}">{{{1}}}</p><table>
22313 9. Encapsulate foster-parented transclusion content
22315 parsoid=wt2wt,wt2html
22317 <table>{{echo|hi</table>hello}}
22319 <p about="#mwt2" typeof="mw:Transclusion" data-mw='{"parts":["<table>",{"template":{"target":{"wt":"echo","href":"./Template:Echo"},"params":{"1":{"wt":"hi</table>hello"}},"i":0}}]}' data-parsoid='{"fostered":true,"autoInsertedEnd":true,"autoInsertedStart":true,"pi":[[{"k":"1","spc":["","","",""]}]]}'>hi</p><table about="#mwt2" data-parsoid='{"stx":"html"}'></table><p about="#mwt2">hello</p>
22323 Table in fosterable position
22325 parsoid=wt2html,wt2wt
22334 <div about="#mwt1" typeof="mw:Transclusion" data-mw='{"parts":[{"template":{"target":{"wt":"OpenTable","href":"./Template:OpenTable"},"params":{},"i":0}},"\n<div>"]}' data-parsoid='{"stx":"html","autoInsertedEnd":true,"pi":[[]]}'></div><span about="#mwt1">
22336 <table about="#mwt1" data-parsoid='{"autoInsertedEnd":true}'></table>
22342 # Parsoid only for bug 64747
22344 Properly encapsulate empty-content transclusions in fosterable positions
22352 <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","spc":["","","",""]}]]}'>
22358 Support <object> element with .data attribute
22362 <object data="test.swf"></object>
22364 <object data="test.swf"></object>
22368 Don't block XML namespace declaration
22370 <span xmlns:dct="http://purl.org/dc/terms/" property="dct:title">MediaWiki</span>
22372 <p><span>MediaWiki</span>
22375 <p><span xmlns:dct="http://purl.org/dc/terms/" data-x-property="dct:title" data-parsoid='{"stx":"html"}'>MediaWiki</span></p>
22378 # -----------------------------------------------------------------
22379 # The following section of tests are primarily to spec requirements
22380 # around serialization of new/edited content.
22382 # All these tests are marked Parsoid html2wt and html2html only
22383 # ----------------------------------------------------------------
22385 # 'mi' is a localinterwiki prefix as well as a language
22387 Serialize interwiki links pointing to the current wiki as plain wiki links (bug 65869)
22391 <p><a rel="mw:ExtLink" href="http://mi.wikipedia.org/wiki/Foo">Foo</a></p>
22397 New wiki links (href variations)
22401 <a rel="mw:WikiLink" href="./Foo_bar">Foo_bar</a>
22402 <a rel="mw:WikiLink" href="Foo_bar">Foo_bar</a>
22403 <a rel="mw:WikiLink" href="Foo bar">Foo_bar</a>
22404 <a rel="mw:WikiLink" href="./Toxine_bact%C3%A9rienne">Toxine bactérienne</a>
22409 [[Toxine bactérienne]]
22413 New wiki links (content string variations)
22417 <a rel="mw:WikiLink" href="./Foo_bar">Foo_bar</a>
22418 <a rel="mw:WikiLink" href="./Foo_bar">Foo bar</a>
22419 <a rel="mw:WikiLink" href="./Foo_bar">./Foo_bar</a>
22423 [[Foo_bar|./Foo_bar]]
22427 New category links (href variations)
22431 <link rel="mw:PageProp/Category" href="./Category:Toxine_bactérienne" />
22432 <link rel="mw:PageProp/Category" href="./Category:Toxine_bact%C3%A9rienne" />
22433 <link rel="mw:PageProp/Category" href="Category:Toxine_bact%C3%A9rienne" />
22435 [[Category:Toxine bactérienne]]
22436 [[Category:Toxine bactérienne]]
22437 [[Category:Toxine bactérienne]]
22441 New interlanguage links (href variations)
22445 <link rel="mw:PageProp/Language" href="http://es.wikipedia.org/wiki/Toxine bactérienne" />
22446 <link rel="mw:PageProp/Language" href="http://es.wikipedia.org/wiki/Toxine_bactérienne" />
22447 <link rel="mw:PageProp/Language" href="http://es.wikipedia.org/wiki/Toxine_bact%C3%A9rienne" />
22449 [[es:Toxine bactérienne]]
22450 [[es:Toxine_bactérienne]]
22451 [[es:Toxine_bactérienne]]
22455 Image: Modifying size of an image (1)
22458 "modes": ["wt2wt"],
22460 ["img[height]", "attr", "height", "22"],
22461 ["img[width]", "attr", "width", "200"]
22465 [[Image:Foobar.jpg|230x230px]]
22467 [[Image:Foobar.jpg|200x200px]]
22471 Image: Modifying size of an image (2)
22474 "modes": ["wt2wt"],
22476 ["img[height]", "attr", "height", "100"],
22477 ["img[width]", "attr", "width", "500"]
22481 [[Image:Foobar.jpg|230x230px]]
22483 [[Image:Foobar.jpg|500x500px]]
22486 # Change in size is ignored so long as class='mw-default-size'
22488 Image: Modifying size of an image (3)
22491 "modes": ["wt2wt"],
22493 ["figure[class]", "removeClass", "mw-default-size"],
22494 ["figure img", "attr", "height", "19"],
22495 ["figure img", "attr", "width", "170"]
22499 [[Image:Foobar.jpg|thumb]]
22501 [[Image:Foobar.jpg|thumb|170x170px]]
22505 Image: Modifying alignment of an image (bug 48665)
22508 "modes": ["wt2wt"],
22510 ["figure[class]", "removeClass", "mw-halign-right"],
22511 ["figure[class]", "addClass", "mw-halign-left"]
22515 [[Image:Foobar.jpg|thumb|caption|right]]
22517 [[Image:Foobar.jpg|thumb|caption|left]]
22521 Image: Modifying mw-default-size of an frameless image (bug 62805)
22524 "modes": ["wt2wt"],
22526 ["figure.mw-default-size", "removeClass", "mw-default-size"]
22530 [[Image:Foobar.jpg|frameless|right]]
22532 [[Image:Foobar.jpg|frameless|right|220x220px]]
22536 Image: Modifying valign of an image (bug 49221)
22539 "modes": ["wt2wt"],
22541 ["*[typeof=\"mw:Image\"]", "removeClass", "mw-valign-middle"],
22542 ["*[typeof=\"mw:Image\"]", "addClass", "mw-valign-text-top"]
22546 [[File:Foobar.jpg|20px|middle]]
22548 [[File:Foobar.jpg|20px|text-top]]
22552 Image: Modifying alt attribute of an image (bug 56400)
22555 "modes": ["wt2wt"],
22557 ["img[alt]", "attr", "alt", "some alternate edited text"]
22561 [[File:Foobar.jpg|thumb|some caption|alt=some alternate text]]
22563 [[File:Foobar.jpg|thumb|some caption|alt=some alternate edited text]]
22567 Image: Modifying caption of an image
22570 "modes": ["wt2wt"],
22572 ["figcaption", "text", "new caption"]
22576 [[Image:Foobar.jpg|thumb|original caption]]
22578 [[Image:Foobar.jpg|thumb|new caption]]
22582 Image: empty alt attribute (bug 48924)
22586 [[File:Foobar.jpg|thumb|alt=|bar]]
22588 <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" 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>
22592 #Image: new attributes should be serialized in wiki's language for RTL languages (bug 51852)
22597 #<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" height="20" width="180"/></a></figure>
22599 #[[Imagen:Foobar.jpg|derecha|miniaturadeimagen]]
22603 Image: Block level image should have \n before and after
22606 [[File:Foobar.jpg|right|thumb|150x150px]]
22610 <figure class="mw-halign-right" typeof="mw:Image/Thumb"><a href="File:Foobar.jpg"><img resource="./File:Foobar.jpg" src="//example.com/images/3/3a/Foobar.jpg" height="17" width="150"/></a></figure>
22615 Image: New block level image should have \n before and after (existing content)
22618 [[File:Foobar.jpg|right|thumb|150x150px]]
22622 <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" height="17" width="150" data-parsoid='{"a":{"resource":"./File:Foobar.jpg","height":"17","width":"150"},"sa":{"resource":"File:Foobar.jpg"}}'/></a></figure>
22627 Image: upright option (parsoid)
22631 [[File:Foobar.jpg|thumb|upright|caption]]
22632 [[File:Foobar.jpg|thumb|upright=0.5|caption]]
22633 [[File:Foobar.jpg|thumb|500x500px|upright=0.5|caption]]
22635 <figure class="mw-default-size" typeof="mw:Image/Thumb"><a href="File:Foobar.jpg"><img resource="./File:Foobar.jpg" src="//example.com/images/3/3a/Foobar.jpg" height="19" width="170"/></a><figcaption>caption</figcaption></figure>
22636 <figure class="mw-default-size" typeof="mw:Image/Thumb"><a href="File:Foobar.jpg"><img resource="./File:Foobar.jpg" src="//example.com/images/3/3a/Foobar.jpg" height="12" width="110"/></a><figcaption>caption</figcaption></figure>
22637 <figure typeof="mw:Image/Thumb"><a href="File:Foobar.jpg"><img resource="./File:Foobar.jpg" src="//example.com/images/3/3a/Foobar.jpg" height="57" width="500"/></a><figcaption>caption</figcaption></figure>
22641 Image: upright option is ignored on inline and frame images (parsoid)
22645 [[File:Foobar.jpg|500x500px|upright=0.5|caption]]
22647 <p><span 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" height="57" width="500"/></a></span></p>
22651 Image: from basic HTML (1)
22655 <span typeof="mw:Image">
22656 <img src="File:Foobar.jpg" width=100 height=100 alt="Alt">
22659 [[File:Foobar.jpg|link=|alt=Alt|100x100px]]
22663 Image: from basic HTML (2)
22667 <img src="File:Foobar.jpg" width=100 height=100 alt="Alt">
22669 [[File:Foobar.jpg|link=|alt=Alt|100x100px]]
22673 Image: from basic HTML (3)
22677 <a href="Main"><img src="File:Foobar.jpg" width=100 height=100 alt="Alt"></a>
22679 [[File:Foobar.jpg|link=Main|alt=Alt|100x100px]]
22683 Image: from basic HTML (4)
22687 <img src="File:Foobar.jpg">
22689 [[File:Foobar.jpg|link=]]
22693 Lists: Serialize correctly even when list content is wrapped in p-tags (like VE does)
22698 <li><p>foo</p></li>
22705 Lists: Serialize correctly even when list tags has unneeded whitespace between tags
22709 <ul> <li>foo</li></ul>
22715 Don't strip leading whitespace when handling indent-pre suppressing tags
22720 <tr><td> indented row</td></tr>
22723 <b>This is very bold of you!</b>
22726 indented cell (no pre-wrapping!)
22736 '''This is very bold of you!'''
22740 indented cell (no pre-wrapping!)
22748 Nowiki-wrap leading whitespace when handling indent-pre inducing tags
22753 <nowiki> </nowiki><span>bar</span>
22756 <nowiki> </nowiki></span>bar2
22759 <nowiki> </nowiki><span>bar</span>
22762 <nowiki> </nowiki><span>foo</span>
22780 Lists: Add space after bullets
22787 <li><span> baz</span></li>
22792 * <span> baz</span>
22796 Lists: Dont insert newlines in a serialized list item.
22800 <ul><li>a<br>b</li><li>c</li></ul>
22807 Headings: Add space before/after == (Bug 51744)
22814 <h2><span> baz</span></h2>
22822 == <span> baz</span> ==
22826 Headings: Force metas to serialize before/after
22830 <h2>hello there<link href="Category:A1" rel="mw:PageProp/Category" /></h2>
22831 <h2><link href="Category:A2" rel="mw:PageProp/Category" />hi pal</h2>
22841 Parsoid: Serialize positional parameters with = in them as named parameter
22845 <p about="#mwt1" typeof="mw:Transclusion"
22846 data-mw='{"parts":[{"template":{"target":{"wt":"echo","href":"./Template:Echo"},"params":{"1":{"wt":"f=oo"}},"i":0}}]}'>foo</p>
22848 <p about="#mwt1" typeof="mw:Transclusion"
22849 data-mw='{"parts":[{"template":{"target":{"wt":"echo","href":"./Template:Echo"},"params":{"1":{"wt":"f=oo"}, "2":{"wt":"bar"}},"i":0}}]}'>foo</p>
22851 <!--Orig params with data-parsoid has heuristics for handling = chars-->
22852 <!--FIXME: But maybe the heuristic needs fixing to apply to new params as well-->
22853 <p data-parsoid='{"pi":[[{"k":"1","spc":["","","",""]},{"k":"2","spc":["","","",""]}]]}' 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>
22857 {{echo|1 = f=oo|2 = bar}}
22859 <!--Orig params with data-parsoid has heuristics for handling = chars-->
22860 <!--FIXME: But maybe the heuristic needs fixing to apply to new params as well-->
22861 {{echo|<nowiki>f=oo</nowiki>|bar}}
22865 Parsoid: Serialize positional parameters with = in extlink as named parameter
22869 <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>
22871 {{echo|1 = http://stuff?is=ok}}
22875 Parsoid: Correctly serialize block-node children when they are a combination of text and p-nodes
22879 <div>a<p>b</p></div>
22900 Substrings resembling wikitext in hrefs should not get nowiki escapes
22904 <a rel="mw:WikiLink" href="./Foo''bar''baz">Foo''bar''baz</a>
22909 #-----------------------------
22910 # I/B quote minimization tests
22911 #-----------------------------
22914 1. I/B quote minimization: wikitext-only tags should be combined
22918 <p><i>A</i><i>B</i></p>
22919 <p><b>A</b><b>B</b></p>
22920 <p><i>A</i><b><i>B</i></b></p>
22921 <p><b>A</b><i><b>B</b></i></p>
22922 <p><b>A</b><i><b>B</b><b>C</b></i><b>D</b></p>
22923 <p><i><b>A</b></i><i><b>B</b></i></p>
22924 <p><i><b>A</b></i><b><i>B</i></b></p>
22925 <p><b><i>A</i></b><i><b>B</b></i></p>
22945 2. I/B quote minimization: wikitext and html tags should not be combined
22949 <p><i>A</i><i data-parsoid='{"stx":"html"}'>B</i></p>
22950 <p><i>A</i><b><i data-parsoid='{"stx":"html"}'>B</i></b></p>
22954 ''A''<nowiki/>'''<i>B</i>'''
22958 3. I/B quote minimization: templated content stops minimization
22962 <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>
22963 <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>
22965 ''A''{{echo|''B''}}
22967 ''A''{{echo|'''''B'''''}}
22971 4. I/B quote minimization: new content should be mimimized with adjacent old content
22975 <p><i>A</i><i>B</i></p>
22976 <p><b>A</b><b>B</b></p>
22977 <p><i>A</i><b><i>B</i></b></p>
22987 5a. Merge adjacent quote nodes if they've been edited
22990 "modes": ["wt2wt"],
22992 ["p", "contents", "remove", ":contains('b')"]
23002 5b. Merge adjacent quote nodes if they've been edited
23005 "modes": ["wt2wt"],
23011 ''a''<span id="x">b</span>''c''
23016 #------------------------------------
23017 # End of I/B quote minimization tests
23018 #------------------------------------
23021 Bug 54262: New entities
23027 <span typeof="mw:Entity"> </span>
23030 ## Note that there is no wikitext output for 'unknownproperty' ##
23031 ## Unknown magic words are silently dropped ##
23038 <meta property='mw:PageProp/toc' />
23039 <meta property='mw:PageProp/notoc' />
23040 <meta property='mw:PageProp/forcetoc' />
23041 <meta property='mw:PageProp/index' />
23042 <meta property='mw:PageProp/noindex' />
23043 <meta property='mw:PageProp/nogallery' />
23044 <meta property='mw:PageProp/noeditsection' />
23045 <meta property='mw:PageProp/notitleconvert' />
23046 <meta property='mw:PageProp/nocontentconvert' />
23047 <meta property='mw:PageProp/unknownproperty' />
23057 __NOCONTENTCONVERT__
23061 Consecutive <pre>s should not get merged
23063 parsoid=html2wt,html2html
23065 <pre>a</pre><pre>b</pre>
23093 Edited ISBN links not serializable as ISBN links should serialize as wikilinks
23097 <a rel="mw:ExtLink" href="./Special:BookSources/1234567890">ISBN 1234567895</a>
23099 [[Special:BookSources/1234567890|ISBN 1234567895]]
23103 Edited RFC links not serializable as RFC links should serialize as extlinks
23107 <a href="//tools.ietf.org/html/rfc123" rel="mw:ExtLink">New RFC</a>
23109 [//tools.ietf.org/html/rfc123 New RFC]
23113 Edited PMID links not serializable as PMID links should serialize as extlinks
23117 <a href="//www.ncbi.nlm.nih.gov/pubmed/123?dopt=Abstract" rel="mw:ExtLink">New PMID</a>
23119 [//www.ncbi.nlm.nih.gov/pubmed/123?dopt=Abstract New PMID]
23123 WTS of autolinks with trailing/surrounding context
23127 <p><a href="http://cscott.net">http://cscott.net</a><b>foo</b></p>
23128 <p><a href="http://cscott.net">http://cscott.net</a><b data-parsoid='{"stx":"html"}'>foo</b></p>
23129 <p><b><a href="http://cscott.net">http://cscott.net</a></b></p>
23130 <p><b><a href="http://cscott.net">http://cscott.net</a> </b></p>
23131 <p><b><a href="http://cscott.net">http://cscott.net</a>x</b></p>
23132 <p><a href="http://cscott.net">http://cscott.net</a>x</p>
23134 http://cscott.net<nowiki/>'''foo'''
23136 http://cscott.net<b>foo</b>
23138 '''http://cscott.net<nowiki/>'''
23140 '''http://cscott.net '''
23142 '''http://cscott.net<nowiki/>x'''
23144 http://cscott.net<nowiki/>x
23148 WTS of autolinks with nowikis (round-trip)
23150 x<nowiki/>http://cscott.net<nowiki/>x
23152 <p>x<a rel="mw:ExtLink" href="http://cscott.net">http://cscott.net</a>x</p>
23155 # this is the "easy" test because it leaves in place all the
23156 # data-parsoid information indicating this is an autolink
23158 WTS of autolinks with escapes (editing)
23161 "modes": ["wt2wt"],
23163 [ "meta", "remove" ]
23167 x<nowiki/>http://cscott.net<nowiki/>x
23169 x<nowiki/>http://cscott.net<nowiki/>x
23173 Edited Redirect link should emit a non-piped wikitext link
23177 <link rel="mw:PageProp/redirect" href="Bar" data-parsoid='{"a":{"href":"./Foo"},"sa":{"href":"Foo"}}'>
23183 T75121: Infer extension name from typeOf if data-mw is not present
23187 <div typeOf="mw:Extension/foo"></div>
23192 # -----------------------------------------------------------------
23193 # End of section for Parsoid-only html2wt tests for serialization
23195 # -----------------------------------------------------------------
23202 Try for 100% code coverage