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://dev.w3.org/html5/spec/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>
13239 # perl -e 'print "="x$_," Level $_ heading","="x$_,"\n" for 1..10'
13241 Handling of sections up to level 6 and beyond
13244 == Level 2 Heading==
13245 === Level 3 Heading===
13246 ==== Level 4 Heading====
13247 ===== Level 5 Heading=====
13248 ====== Level 6 Heading======
13249 ======= Level 7 Heading=======
13250 ======== Level 8 Heading========
13251 ========= Level 9 Heading=========
13252 ========== Level 10 Heading==========
13254 <div id="toc" class="toc"><div id="toctitle"><h2>Contents</h2></div>
13256 <li class="toclevel-1 tocsection-1"><a href="#Level_1_Heading"><span class="tocnumber">1</span> <span class="toctext">Level 1 Heading</span></a>
13258 <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>
13260 <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>
13262 <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>
13264 <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>
13266 <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>
13267 <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>
13268 <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>
13269 <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>
13270 <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>
13284 <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>
13285 <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>
13286 <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>
13287 <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>
13288 <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>
13289 <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>
13290 <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>
13291 <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>
13292 <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>
13293 <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>
13298 TOC regression (bug 9764)
13302 ==== title 1.1.1 ====
13307 <div id="toc" class="toc"><div id="toctitle"><h2>Contents</h2></div>
13309 <li class="toclevel-1 tocsection-1"><a href="#title_1"><span class="tocnumber">1</span> <span class="toctext">title 1</span></a>
13311 <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>
13313 <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>
13316 <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>
13319 <li class="toclevel-1 tocsection-5"><a href="#title_2"><span class="tocnumber">2</span> <span class="toctext">title 2</span></a>
13321 <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>
13327 <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>
13328 <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>
13329 <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>
13330 <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>
13331 <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>
13332 <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>
13337 TOC with wgMaxTocLevel=3 (bug 6204)
13343 ==== title 1.1.1 ====
13348 <div id="toc" class="toc"><div id="toctitle"><h2>Contents</h2></div>
13350 <li class="toclevel-1 tocsection-1"><a href="#title_1"><span class="tocnumber">1</span> <span class="toctext">title 1</span></a>
13352 <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>
13353 <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>
13356 <li class="toclevel-1 tocsection-5"><a href="#title_2"><span class="tocnumber">2</span> <span class="toctext">title 2</span></a>
13358 <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>
13364 <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>
13365 <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>
13366 <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>
13367 <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>
13368 <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>
13369 <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>
13374 TOC with wgMaxTocLevel=3 and two level four headings (bug 6204)
13380 ====Section 1.1.1====
13381 ====Section 1.1.1.1====
13384 <div id="toc" class="toc"><div id="toctitle"><h2>Contents</h2></div>
13386 <li class="toclevel-1 tocsection-1"><a href="#Section_1"><span class="tocnumber">1</span> <span class="toctext">Section 1</span></a>
13388 <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>
13391 <li class="toclevel-1 tocsection-5"><a href="#Section_2"><span class="tocnumber">2</span> <span class="toctext">Section 2</span></a></li>
13395 <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>
13396 <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>
13397 <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>
13398 <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>
13399 <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>
13405 Resolving duplicate section names
13410 <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>
13411 <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>
13416 Resolving duplicate section names with differing case (bug 10721)
13421 <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>
13422 <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>
13434 Template with sections, __NOTOC__
13441 <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>
13442 <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>
13443 <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>
13444 <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>
13449 __NOEDITSECTION__ keyword
13455 <h2><span class="mw-headline" id="Section_1">Section 1</span></h2>
13456 <h2><span class="mw-headline" id="Section_2">Section 2</span></h2>
13461 Link inside a section heading
13463 ==Section with a [[Main Page|link]] in it==
13465 <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>
13470 TOC regression (bug 12077)
13477 <div id="toc" class="toc"><div id="toctitle"><h2>Contents</h2></div>
13479 <li class="toclevel-1 tocsection-1"><a href="#title_1"><span class="tocnumber">1</span> <span class="toctext">title 1</span></a>
13481 <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>
13484 <li class="toclevel-1 tocsection-3"><a href="#title_2"><span class="tocnumber">2</span> <span class="toctext">title 2</span></a></li>
13488 <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>
13489 <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>
13490 <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>
13495 BUG 1219 URL next to image (good)
13497 http://example.com [[File:Foobar.jpg]]
13499 <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>
13502 <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>
13506 Short headings with trailing space should match behavior of Parser::doHeadings (bug 19910)
13509 The line above must have a trailing space!
13512 But just in case it doesn't...
13514 <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>
13515 <p>The line above must have a trailing space!
13517 <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>
13518 <p>But just in case it doesn't...
13523 Header with special characters (bug 25462)
13525 The tooltips shall not show entities to the user (ie. be double escaped)
13542 <p>The tooltips shall not show entities to the user (ie. be double escaped)
13544 <div id="toc" class="toc"><div id="toctitle"><h2>Contents</h2></div>
13546 <li class="toclevel-1 tocsection-1"><a href="#text_.3E_text"><span class="tocnumber">1</span> <span class="toctext">text > text</span></a></li>
13547 <li class="toclevel-1 tocsection-2"><a href="#text_.3C_text"><span class="tocnumber">2</span> <span class="toctext">text < text</span></a></li>
13548 <li class="toclevel-1 tocsection-3"><a href="#text_.26_text"><span class="tocnumber">3</span> <span class="toctext">text & text</span></a></li>
13549 <li class="toclevel-1 tocsection-4"><a href="#text_.27_text"><span class="tocnumber">4</span> <span class="toctext">text ' text</span></a></li>
13550 <li class="toclevel-1 tocsection-5"><a href="#text_.22_text"><span class="tocnumber">5</span> <span class="toctext">text " text</span></a></li>
13554 <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>
13557 <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>
13560 <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>
13563 <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>
13566 <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>
13572 Header with space, plus and underscore as entity
13574 Id should not contain + for spaces
13576 == Space between Text ==
13579 == Space-Entity between Text ==
13582 == Plus+between+Text ==
13585 == Plus-Entity+between+Text ==
13588 == Underscore_between_Text ==
13591 == Underscore-Entity_between_Text ==
13594 [[#Space between Text]]
13595 [[#Space-Entity between Text]]
13596 [[#Plus+between+Text]]
13597 [[#Plus-Entity+between+Text]]
13598 [[#Underscore_between_Text]]
13599 [[#Underscore-Entity_between_Text]]
13601 <p>Id should not contain + for spaces
13603 <div id="toc" class="toc"><div id="toctitle"><h2>Contents</h2></div>
13605 <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>
13606 <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>
13607 <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>
13608 <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>
13609 <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>
13610 <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>
13614 <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>
13617 <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>
13620 <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>
13623 <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>
13626 <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>
13629 <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>
13631 </p><p><a href="#Space_between_Text">#Space between Text</a>
13632 <a href="#Space-Entity_between_Text">#Space-Entity between Text</a>
13633 <a href="#Plus.2Bbetween.2BText">#Plus+between+Text</a>
13634 <a href="#Plus-Entity.2Bbetween.2BText">#Plus-Entity+between+Text</a>
13635 <a href="#Underscore_between_Text">#Underscore_between_Text</a>
13636 <a href="#Underscore-Entity_between_Text">#Underscore-Entity_between_Text</a>
13641 Headers with excess '=' characters
13642 (Are similar tests necessary beyond the 1st level?)
13646 =''italic'' heading==
13647 ==''italic'' heading=
13649 <div id="toc" class="toc"><div id="toctitle"><h2>Contents</h2></div>
13651 <li class="toclevel-1 tocsection-1"><a href="#foo.3D"><span class="tocnumber">1</span> <span class="toctext">foo=</span></a></li>
13652 <li class="toclevel-1 tocsection-2"><a href="#.3Dfoo"><span class="tocnumber">2</span> <span class="toctext">=foo</span></a></li>
13653 <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>
13654 <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>
13658 <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>
13659 <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>
13660 <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>
13661 <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>
13666 HTML headers vs TOC (bug 23393)
13667 (__NOEDITSECTION__ for clearer output, doesn't matter here)
13679 <div id="toc" class="toc"><div id="toctitle"><h2>Contents</h2></div>
13681 <li class="toclevel-1"><a href="#Header_1"><span class="tocnumber">1</span> <span class="toctext">Header 1</span></a>
13683 <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>
13684 <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>
13687 <li class="toclevel-1"><a href="#Header_2"><span class="tocnumber">2</span> <span class="toctext">Header 2</span></a>
13689 <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>
13690 <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>
13696 <h1><span class="mw-headline" id="Header_1">Header 1</span></h1>
13697 <h2><span class="mw-headline" id="Header_1.1">Header 1.1</span></h2>
13698 <h2><span class="mw-headline" id="Header_1.2">Header 1.2</span></h2>
13699 <h1><span class="mw-headline" id="Header_2">Header 2</span></h1>
13700 <h2><span class="mw-headline" id="Header_2.1">Header 2.1</span></h2>
13701 <h2><span class="mw-headline" id="Header_2.2">Header 2.2</span></h2>
13706 Single-line or multiline-comments can follow headings
13708 parsoid=wt2html,wt2wt
13716 <h2><span class="mw-headline" id="foo">foo</span></h2>
13717 <h2><span class="mw-headline" id="bar">bar</span></h2>
13718 <h2><span class="mw-headline" id="baz">baz</span></h2>
13723 BUG 1219 URL next to image (broken)
13725 http://example.com[[File:Foobar.jpg]]
13727 <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>
13730 <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>
13734 Bug 1186 news: in the middle of text
13736 http://en.wikinews.org/wiki/Wikinews:Workplace
13738 <p><a rel="nofollow" class="external free" href="http://en.wikinews.org/wiki/Wikinews:Workplace">http://en.wikinews.org/wiki/Wikinews:Workplace</a>
13744 Namespaced link must have a title
13753 Namespaced link must have a title (bad fragment version)
13755 [[Project:#fragment]]
13757 <p>[[Project:#fragment]]
13763 ### HTML tags and HTML attributes
13767 div with no attributes
13769 <div>HTML rocks</div>
13771 <div>HTML rocks</div>
13776 div with double-quoted attribute
13778 <div id="rock">HTML rocks</div>
13780 <div id="rock">HTML rocks</div>
13785 div with single-quoted attribute
13787 <div id='rock'>HTML rocks</div>
13789 <div id="rock">HTML rocks</div>
13794 div with unquoted attribute
13796 <div id=rock>HTML rocks</div>
13798 <div id="rock">HTML rocks</div>
13803 div with illegal double attributes
13805 <div id="a" id="b">HTML rocks</div>
13807 <div id="b">HTML rocks</div>
13811 # FIXME: produce empty string instead of "class" in the PHP parser, following
13814 div with empty attribute value, space before equals
13818 <div class =>HTML rocks</div>
13820 <div class="">HTML rocks</div>
13825 div with multiple empty attribute values
13829 <div id= title=>HTML rocks</div>
13831 <div id="" title="">HTML rocks</div>
13836 table with multiple empty attribute values
13844 <table title="" id="">
13845 <tbody><tr><td> hi</td></tr>
13850 div with braces in attribute value
13852 <div title="{}">Foo</div>
13854 <div title="{}">Foo</div>
13857 <div title="{}">Foo</div>
13860 # This it very inconsistent in the PHP parser: it returns
13861 # class="class" if there is a space between the name and the equal sign (see
13862 # 'div with empty attribute value, space before equals'), but strips the
13863 # attribute completely if the space is missing. We hope that not much content
13864 # depends on this, so are implementing the behavior below in Parsoid for
13865 # consistencies' sake.
13866 # FIXME: fix this behavior in the PHP parser?
13868 div with empty attribute value, no space before equals
13870 parsoid=wt2html,html2html
13872 <div class=>HTML rocks</div>
13874 <div>HTML rocks</div>
13877 <div class="">HTML rocks</div>
13881 HTML multiple attributes correction
13883 <p class="error" class="awesome">Awesome!</p>
13885 <p class="awesome">Awesome!</p>
13890 Table multiple attributes correction
13893 !+ class="error" class="awesome"| status
13898 <th class="awesome"> status
13906 <DIV ID="x">HTML ROCKS</DIV>
13908 <div id="x">HTML ROCKS</div>
13913 Non-ASCII pseudo-tags are rendered as text
13922 Pseudo-tag with URL 'name' renders as url link
13924 <http://example.com/>
13926 <p><<a rel="nofollow" class="external free" href="http://example.com/">http://example.com/</a>>
13931 text with amp in the middle of nowhere
13935 <p>Remember AT&T?
13940 text with character entity: eacute
13942 I always thought é was a cute letter.
13944 <p>I always thought é was a cute letter.
13947 <p>I always thought é was a cute letter.</p>
13951 text with entity-escaped character entity-like string: eacute
13953 I always thought &eacute; was a cute letter.
13955 <p>I always thought &eacute; was a cute letter.
13960 text with undefined character entity: xacute
13962 I always thought &xacute; was a cute letter.
13964 <p>I always thought &xacute; was a cute letter.
13968 # TODO: generalize to PHP parser?
13974 <data value="5">five</data>
13975 <time datetime="2000-01-01T00:00Z">The new millenium started</time>
13976 <mark>This highlighted text</mark>
13978 <p><data value="5">five</data>
13979 <time datetime="2000-01-01T00:00Z">The new millenium started</time>
13980 <mark>This highlighted text</mark></p>
13984 HTML tag with leading space is parsed as text
13988 <p>< div>foo< /div>
13993 ### Nesting tests (see bug 41545, 50604, 51081)
13996 # This test case is fixed in Parsoid by domino 1.0.12. (bug 50604)
13997 # Note that html2wt is considerably more difficult if we use <b> in
13998 # the test case, instead of <big>
14000 Ensure that HTML adoption agency algorithm is properly implemented.
14002 <big>X<big>Y</big>Z</big>
14004 <p><big>X<big>Y</big>Z</big>
14008 # This was bug 41545 in the PHP parser.
14009 # Note that tidy doesn't handle this correctly.
14013 <kbd>X<kbd>Y</kbd>Z</kbd>
14015 <p><kbd>X<kbd>Y</kbd>Z</kbd>
14019 # The following cases were bug 51081 in the PHP parser.
14020 # Note that there are some other nestable tags (b, i, etc) which are
14021 # not covered; see bug 51081 for discussion.
14023 # Note that tidy doesn't handle this correctly.
14027 <em>X<em>Y</em>Z</em>
14029 <p><em>X<em>Y</em>Z</em>
14033 # Note that tidy doesn't handle this correctly.
14035 Nesting of <strong>
14037 <strong>X<strong>Y</strong>Z</strong>
14039 <p><strong>X<strong>Y</strong>Z</strong>
14048 <p><q>X<q>Y</q>Z</q></p>
14051 # Note that tidy doesn't handle this correctly.
14055 <ruby>X<ruby>Y</ruby>Z</ruby>
14057 <p><ruby>X<ruby>Y</ruby>Z</ruby>
14061 # Note that tidy doesn't handle this correctly.
14065 <bdo>X<bdo>Y</bdo>Z</bdo>
14067 <p><bdo>X<bdo>Y</bdo>Z</bdo>
14079 [[Media:Foobar.jpg]]
14081 <p><a href="http://example.com/images/3/3a/Foobar.jpg" class="internal" title="Foobar.jpg">Media:Foobar.jpg</a>
14086 Media link with text
14088 [[Media:Foobar.jpg|A neat file to look at]]
14090 <p><a href="http://example.com/images/3/3a/Foobar.jpg" class="internal" title="Foobar.jpg">A neat file to look at</a>
14094 # FIXME: this is still bad HTML tag nesting
14096 Media link with nasty text
14097 fixme: doBlockLevels won't wrap this in a paragraph because it contains a div
14099 [[Media:Foobar.jpg|Safe Link<div style=display:none>" onmouseover="alert(document.cookie)" onfoo="</div>]]
14101 <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>
14104 <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>
14108 Media link to nonexistent file (bug 1702)
14110 [[Media:No such.jpg]]
14112 <p><a href="/index.php?title=Special:Upload&wpDestFile=No_such.jpg" class="new" title="No such.jpg">Media:No such.jpg</a>
14117 Image link to nonexistent file (bug 1850 - good)
14119 [[File:No_such.jpg]]
14121 <p><a href="/index.php?title=Special:Upload&wpDestFile=No_such.jpg" class="new" title="File:No such.jpg">File:No such.jpg</a>
14124 <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>
14128 :Image link to nonexistent file (bug 1850 - bad)
14130 [[:Image:No such.jpg]]
14132 <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>
14135 <p><a rel="mw:WikiLink" href="./File:No_such.jpg" title="File:No such.jpg">Image:No such.jpg</a></p>
14141 Character reference normalization in link text (bug 1938)
14143 [[Main Page|this&that]]
14145 <p><a href="/wiki/Main_Page" title="Main Page">this&that</a>
14152 Test for unicode normalization
14154 The page's name is U+05d0 U+05b7, with non-canonical form U+FB2E
14158 (bug 19451) Links should refer to the normalized form.
14166 <p><a href="/wiki/%D7%90%D6%B7" title="אַ">אַ</a>
14167 <a href="/wiki/%D7%90%D6%B7" title="אַ">אַ</a>
14168 <a href="/wiki/%D7%90%D6%B7" title="אַ">אַ</a>
14169 <a href="/wiki/%D7%90%D6%B7" title="אַ">אַ</a>
14170 <a href="/wiki/%D7%90%D6%B7" title="אַ">אַ</a>
14175 Empty attribute crash test (bug 2067)
14177 <font color="">foo</font>
14179 <p><font color="">foo</font>
14184 Empty attribute crash test single-quotes (bug 2067)
14186 <font color=''>foo</font>
14188 <p><font color="">foo</font>
14193 Attribute test: equals, then nothing
14195 <font color=>foo</font>
14197 <p><font>foo</font>
14202 Attribute test: unquoted value
14204 <font color=x>foo</font>
14206 <p><font color="x">foo</font>
14211 Attribute test: unquoted but illegal value (hash)
14213 <font color=#x>foo</font>
14215 <p><font color="#x">foo</font>
14220 Attribute test: no value
14222 <font color>foo</font>
14224 <p><font color="color">foo</font>
14229 Bug 2095: link with three closing brackets
14233 <p><a href="/wiki/Main_Page" title="Main Page">Main Page</a>]
14236 <p><a rel="mw:WikiLink" href="./Main_Page" title="Main Page">Main Page</a>]</p>
14240 Bug 2095: link with pipe and three closing brackets
14242 [[Main Page|link]]]
14244 <p><a href="/wiki/Main_Page" title="Main Page">link</a>]
14247 <p><a rel="mw:WikiLink" href="./Main_Page" title="Main Page">link</a>]</p>
14251 Bug 2095: link with pipe and three closing brackets, version 2
14253 [[Main Page|[http://example.com/]]]
14255 <p><a href="/wiki/Main_Page" title="Main Page">[http://example.com/]</a>
14258 <p><a rel="mw:WikiLink" href="./Main_Page" title="Main Page">[http://example.com/]</a></p>
14267 Template:Dangerous attribute
14269 " onmouseover="alert(document.cookie)
14273 Template:Dangerous style attribute
14275 border-size: expression(alert(document.cookie))
14281 <div style="float: right; {{{1}}}">Magic div</div>
14285 Bug 2304: HTML attribute safety (safe template; regression bug 2309)
14287 <div title="{{test}}"></div>
14289 <div title="This is a test template"></div>
14293 # Parsoid has enough context to handle this case
14295 Bug 2304: HTML attribute safety (dangerous template; 2309)
14297 <div title="{{dangerous attribute}}"></div>
14299 <div title=""></div>
14302 <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>
14306 Bug 2304: HTML attribute safety (dangerous style template; 2309)
14308 <div style="{{dangerous style attribute}}"></div>
14310 <div style="/* insecure input */"></div>
14315 Bug 2304: HTML attribute safety (safe parameter; 2309)
14317 {{div style|width: 200px}}
14319 <div style="float: right; width: 200px">Magic div</div>
14324 Bug 2304: HTML attribute safety (unsafe parameter; 2309)
14326 {{div style|width: expression(alert(document.cookie))}}
14328 <div style="/* insecure input */">Magic div</div>
14333 Bug 2304: HTML attribute safety (unsafe breakout parameter; 2309)
14335 {{div style|"><script>alert(document.cookie)</script>}}
14337 <div style="float: right;"><script>alert(document.cookie)</script>">Magic div</div>
14342 Bug 2304: HTML attribute safety (unsafe breakout parameter 2; 2309)
14344 {{div style|" ><script>alert(document.cookie)</script>}}
14346 <div style="float: right;"><script>alert(document.cookie)</script>">Magic div</div>
14351 Bug 2304: HTML attribute safety (link)
14353 <div title="[[Main Page]]"></div>
14355 <div title="[[Main Page]]"></div>
14360 Bug 2304: HTML attribute safety (italics)
14362 <div title="''foobar''"></div>
14364 <div title="''foobar''"></div>
14369 Bug 2304: HTML attribute safety (bold)
14371 <div title="'''foobar'''"></div>
14373 <div title="'''foobar'''"></div>
14379 Bug 2304: HTML attribute safety (ISBN)
14381 <div title="ISBN 1234567890"></div>
14383 <div title="ISBN 1234567890"></div>
14388 Bug 2304: HTML attribute safety (RFC)
14390 <div title="RFC 1234"></div>
14392 <div title="RFC 1234"></div>
14397 Bug 2304: HTML attribute safety (PMID)
14399 <div title="PMID 1234567890"></div>
14401 <div title="PMID 1234567890"></div>
14406 Bug 2304: HTML attribute safety (web link)
14408 <div title="http://example.com/"></div>
14410 <div title="http://example.com/"></div>
14415 Bug 2304: HTML attribute safety (named web link)
14417 <div title="[http://example.com/ link]"></div>
14419 <div title="[http://example.com/ link]"></div>
14424 Bug 3244: HTML attribute safety (extension; safe)
14426 <div style="<nowiki>background:blue</nowiki>"></div>
14428 <div style="background:blue"></div>
14433 Bug 3244: HTML attribute safety (extension; unsafe)
14435 <div style="<nowiki>border-left:expression(alert(document.cookie))</nowiki>"></div>
14437 <div style="/* insecure input */"></div>
14441 # More MSIE fun discovered by Tom Gilder
14444 MSIE CSS safety test: spurious slash
14446 <div style="background-image:u\rl(javascript:alert('boo'))">evil</div>
14448 <div style="/* insecure input */">evil</div>
14453 MSIE CSS safety test: hex code
14455 <div style="background-image:u\72l(javascript:alert('boo'))">evil</div>
14457 <div style="/* insecure input */">evil</div>
14462 MSIE CSS safety test: comment in url
14464 <div style="background-image:u/**/rl(javascript:alert('boo'))">evil</div>
14466 <div style="background-image:u rl(javascript:alert('boo'))">evil</div>
14471 MSIE CSS safety test: comment in expression
14473 <div style="background-image:expres/**/sion(alert('boo4'))">evil4</div>
14475 <div style="background-image:expres sion(alert('boo4'))">evil4</div>
14480 CSS safety test (all browsers): vertical tab (bug 55332 / CVE-2013-4567)
14482 <p style="font-size: 100px; background-image:url\b(https://www.google.com/images/srpr/logo6w.png)">A</p>
14484 <p style="/* invalid control char */">A</p>
14489 MSIE 6 CSS safety test: Fullwidth (bug 55332)
14491 <p style="font-size: 100px; color: expression((title='XSSed'),'red')">A</p>
14492 <div style="top:EXPRESSION(alert())">B</div>
14494 <p style="/* insecure input */">A</p>
14495 <div style="/* insecure input */">B</div>
14500 MSIE 6 CSS safety test: IPA extensions (bug 55332)
14502 <div style="background-image:uʀʟ(javascript:alert())">A</div>
14503 <p style="font-size: 100px; color: expʀessɪoɴ((title='XSSed'),'red')">B</p>
14505 <div style="/* insecure input */">A</div>
14506 <p style="/* insecure input */">B</p>
14511 MSIE 6 CSS safety test: sup/sub script (bug 55332)
14513 <div style="background-image:url⁽javascript:alert())">A</div>
14514 <div style="background-image:url₍javascript:alert())">B</div>
14515 <p style="font-size: 100px; color: expressioⁿ((title='XSSed'),'red')">C</p>
14517 <div style="/* insecure input */">A</div>
14518 <div style="/* insecure input */">B</div>
14519 <p style="/* insecure input */">C</p>
14527 title="data:text/html,<img src=1 onerror=alert(1)>"
14528 style="-o-link:attr(title);-o-link-source:current">X</div>
14530 <div title="data:text/html,<img src=1 onerror=alert(1)>" style="/* insecure input */">X</div>
14535 MSIE 6 CSS safety test: Repetition markers (bug 55332)
14537 <p style="font-size: 100px; color: expres〱ion((title='XSSed'),'red')">A</p>
14538 <p style="font-size: 100px; color: expresゝion((title='XSSed'),'red')">B</p>
14539 <p style="font-size: 100px; color: expresーion((title='XSSed'),'red')">C</p>
14540 <p style="font-size: 100px; color: expresヽion((title='XSSed'),'red')">D</p>
14541 <p style="font-size: 100px; color: expresﹽion((title='XSSed'),'red')">E</p>
14542 <p style="font-size: 100px; color: expresﹼion((title='XSSed'),'red')">F</p>
14543 <p style="font-size: 100px; color: expresーion((title='XSSed'),'red')">G</p>
14545 <p style="/* insecure input */">A</p>
14546 <p style="/* insecure input */">B</p>
14547 <p style="/* insecure input */">C</p>
14548 <p style="/* insecure input */">D</p>
14549 <p style="/* insecure input */">E</p>
14550 <p style="/* insecure input */">F</p>
14551 <p style="/* insecure input */">G</p>
14556 Table attribute legitimate extension
14559 !+ style="<nowiki>color:blue</nowiki>"| status
14564 <th style="color:blue"> status
14570 Table attribute safety
14573 !+ style="<nowiki>border-width:expression(0+alert(document.cookie))</nowiki>"| status
14578 <th style="/* insecure input */"> status
14584 CSS line continuation 1
14586 <div style="background-image: u\ rl(test.jpg);"></div>
14588 <div style="/* insecure input */"></div>
14593 CSS line continuation 2
14595 <div style="background-image: u\ rl(test.jpg); "></div>
14597 <div style="/* insecure input */"></div>
14608 Expansion of multi-line templates in attribute values (bug 6255)
14610 <div style="background: {{identity|#00FF00}}">-</div>
14612 <div style="background: #00FF00">-</div>
14618 Expansion of multi-line templates in attribute values (bug 6255 sanity check)
14620 <div style="background:
14623 <div style="background: #00FF00">-</div>
14626 <div style="background:
14631 Expansion of multi-line templates in attribute values (bug 6255 sanity check 2)
14633 <div style="background: #00FF00">-</div>
14635 <div style="background: #00FF00">-</div>
14640 evil <math>-wiki-tags without Extension:Math enabled
14642 <math><img src="some evil external link"><script>some_evil_javascript();</script></math>
14644 <p><math><img src="some evil external link"><script>some_evil_javascript();</script></math></p>
14648 ### Parser hooks (see tests/parser/parserTestsParserHook.php for the <tag> extension)
14651 Parser hook: empty input
14664 Parser hook: empty input using terminated empty elements
14677 Parser hook: empty input using terminated empty elements (space before)
14690 Parser hook: basic input
14704 Parser hook: case insensitive
14718 Parser hook: case insensitive, redux
14731 Parser hook: nested tags
14735 <tag><tag></tag></tag>
14746 Parser hook: basic arguments
14748 <tag width=200 height = "100" depth = '50' square></tag>
14756 'square' => 'square',
14763 Parser hook: argument containing a forward slash (bug 5344)
14765 <tag filename='/tmp/bla'></tag>
14770 'filename' => '/tmp/bla',
14777 Parser hook: empty input using terminated empty elements (bug 2374)
14790 # </tag> should be output literally since there is no matching tag that begins it
14792 Parser hook: basic arguments using terminated empty elements (bug 2374)
14794 <tag width=200 height = "100" depth = '50' square/>
14804 'square' => 'square',
14813 ### (see tests/parser/parserTestsParserHook.php for the <statictag> extension)
14817 Parser hook: static parser hook not inside a comment
14819 <statictag>hello, world</statictag>
14820 <statictag action=flush/>
14828 Parser hook: static parser hook inside a comment
14830 <!-- <statictag>hello, world</statictag> -->
14831 <statictag action=flush/>
14837 # Nested template calls; this case was broken by Parser.php rev 1.506,
14841 Template:One-parameter
14843 (My parameter is: {{{1}}})
14847 Template:Map-one-parameter
14849 {{{{{1}}}|{{{2}}}}}
14853 Nested template calls
14855 {{Map-one-parameter|One-parameter|param}}
14857 <p>(My parameter is: param)
14866 # HTML+Tidy effectively strips out the empty tags completely
14867 # But since Parsoid doesn't it wraps the <s></s> tags in p-tags
14868 # which Tidy would have done for the PHP parser had there been content inside it.
14870 Sanitizer: Closing of open tags
14872 <s></s><table></table>
14874 <s></s><table></table>
14877 <p><s></s></p><table></table>
14881 Sanitizer: Closing of open but not closed tags
14890 Sanitizer: Closing of closed but not open tags
14899 Sanitizer: Closing of closed but not open table tags
14901 Table not started</td></tr></table>
14903 <p>Table not started</td></tr></table>
14908 Sanitizer: Escaping of spaces, multibyte characters, colons & other stuff in id=""
14910 <span id="æ: v">byte</span>[[#æ: v|backlink]]
14912 <p><span id=".C3.A6:_v">byte</span><a href="#.C3.A6:_v">backlink</a>
14916 # In HTML5, the restrictions are that id must contain at least one character,
14917 # and must not contain any space characters.
14919 Sanitizer: Validating the contents of the id attribute (bug 4515)
14923 <br id="" /><br id="a space" />
14928 # In HTML5, id must be unique amongst all the ids in the element's home subtree.
14930 Sanitizer: Validating id attribute uniqueness (bug 4515, bug 6301)
14934 <br id="foo" /><br id="foo" />
14936 Something need to be done. foo-2 ?
14940 Sanitizer: Validating that <meta> and <link> work, but only for Microdata
14943 <meta itemprop="hello" content="world">
14944 <meta http-equiv="refresh" content="5">
14945 <meta itemprop="hello" http-equiv="refresh" content="5">
14946 <link itemprop="hello" href="{{SERVER}}">
14947 <link rel="stylesheet" href="{{SERVER}}">
14948 <link rel="stylesheet" itemprop="hello" href="{{SERVER}}">
14951 <div itemscope="itemscope">
14952 <p> <meta itemprop="hello" content="world" />
14953 <meta http-equiv="refresh" content="5">
14954 <meta itemprop="hello" content="5" />
14956 <link itemprop="hello" href="http://example.org" />
14957 <link rel="stylesheet" href="<a rel="nofollow" class="external free" href="http://example.org">http://example.org</a>">
14958 <link itemprop="hello" href="http://example.org" />
14964 Language converter: output gets cut off unexpectedly (bug 5757)
14968 this bit is safe: }-
14970 but if we add a conversion instance: -{zh-cn:xxx;zh-tw:yyy}-
14972 then we get cut off here: }-
14974 all additional text is vanished
14976 <p>this bit is safe: }-
14977 </p><p>but if we add a conversion instance: xxx
14978 </p><p>then we get cut off here: }-
14979 </p><p>all additional text is vanished
14984 Self closed html pairs (bug 5487)
14987 <center><font id="bug" />Centered text</center>
14988 <div><font id="bug2" />In div text</div>
14990 <center><font id="bug" />Centered text</center>
14991 <div><font id="bug2" />In div text</div>
15000 Punctuation: nbsp before exclamation
15004 <p>C'est grave !
15009 Punctuation: CSS !important (bug 11874)
15011 <div style="width:50% !important">important</div>
15013 <div style="width:50% !important">important</div>
15018 Punctuation: CSS ! important (bug 11874; with space after)
15020 <div style="width:50% ! important">important</div>
15022 <div style="width:50% ! important">important</div>
15027 HTML bullet list, closed tags (bug 5497)
15040 <ul data-parsoid='{"stx":"html"}'>
15041 <li data-parsoid='{"stx":"html"}'>One</li>
15042 <li data-parsoid='{"stx":"html"}'>Two</li>
15048 HTML bullet list, unclosed tags (bug 5497)
15060 <ul data-parsoid='{"stx":"html"}'>
15061 <li data-parsoid='{"stx":"html","autoInsertedEnd":true}'>One</li>
15062 <li data-parsoid='{"stx":"html","autoInsertedEnd":true}'>Two</li>
15068 HTML ordered list, closed tags (bug 5497)
15081 <ol data-parsoid='{"stx":"html"}'>
15082 <li data-parsoid='{"stx":"html"}'>One</li>
15083 <li data-parsoid='{"stx":"html"}'>Two</li>
15089 HTML ordered list, unclosed tags (bug 5497)
15102 <ol data-parsoid='{"stx":"html"}'>
15103 <li data-parsoid='{"stx":"html","autoInsertedEnd":true}'>One</li>
15104 <li data-parsoid='{"stx":"html","autoInsertedEnd":true}'>Two</li>
15110 HTML nested bullet list, closed tags (bug 5497)
15135 HTML nested bullet list, open tags (bug 5497)
15172 HTML nested ordered list, closed tags (bug 5497)
15197 HTML nested ordered list, open tags (bug 5497)
15234 HTML ordered list item with parameters oddity
15236 <ol><li id="fragment">One</li>
15239 <ol><li id="fragment">One</li>
15244 # parsoid doesn't explicitly mark autonumbered links, see bug 53505
15246 bug 5918: autonumbering
15248 [http://first/] [http://second] [ftp://ftp]
15252 [mailto:enclosed@mail.tld With target]
15254 [mailto:enclosed@mail.tld]
15256 mailto:inline@mail.tld
15258 <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>
15259 </p><p><a rel="nofollow" class="external free" href="ftp://inlineftp">ftp://inlineftp</a>
15260 </p><p><a rel="nofollow" class="external text" href="mailto:enclosed@mail.tld">With target</a>
15261 </p><p><a rel="nofollow" class="external autonumber" href="mailto:enclosed@mail.tld">[4]</a>
15262 </p><p><a rel="nofollow" class="external free" href="mailto:inline@mail.tld">mailto:inline@mail.tld</a>
15265 <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>
15266 <p><a rel="mw:ExtLink" href="ftp://inlineftp">ftp://inlineftp</a></p>
15267 <p><a rel="mw:ExtLink" href="mailto:enclosed@mail.tld">With target</a></p>
15268 <p><a rel="mw:ExtLink" href="mailto:enclosed@mail.tld"></a></p>
15269 <p><a rel="mw:ExtLink" href="mailto:inline@mail.tld">mailto:inline@mail.tld</a></p>
15274 # Security and HTML correctness
15275 # From Nick Jenkins' fuzz testing
15279 Fuzz testing: Parser13
15294 Fuzz testing: Parser14
15299 <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>
15300 http://<div id="toc" class="toc"><div id="toctitle"><h2>Contents</h2></div>
15302 <li class="toclevel-1 tocsection-1"><a href="#onmouseover.3D"><span class="tocnumber">1</span> <span class="toctext">onmouseover=</span></a></li>
15308 <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>
15310 <div id="toc" class="toc">
15311 <div id="toctitle">
15315 <li class="toclevel-1 tocsection-1"><a href="#onmouseover.3D"><span class="tocnumber">1</span> <span class="toctext">onmouseover=</span></a></li>
15321 Fuzz testing: Parser14-table
15326 <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>
15327 <table style="__TOC__">
15332 <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>
15333 <table style="__TOC__">
15340 # Known to produce bogus xml (extra </td>)
15342 Fuzz testing: Parser16
15371 Fuzz testing: Parser21
15374 ! irc://{{ftp://a" onmouseover="alert('hello world');"
15379 <th> <a rel="nofollow" class="external free" href="irc://{{ftp://a">irc://{{ftp://a</a>" onmouseover="alert('hello world');"
15389 Fuzz testing: Parser22
15391 http://===r:::https://b
15395 <p><a rel="nofollow" class="external free" href="http://===r:::https://b">http://===r:::https://b</a>
15403 # Known to produce bad XML for now
15405 Fuzz testing: Parser24
15412 | {{{{SSSll!!!!!!!VVVV)]]][[Special:*xxxxxxx--><noinclude>}}}} >
15413 <br style="onmouseover='alert(document.cookie);' " />
15415 MOVE YOUR MOUSE CURSOR OVER THIS TEXT
15420 <u class="|">}}}} >
15421 <br style="onmouseover='alert(document.cookie);'" />
15423 MOVE YOUR MOUSE CURSOR OVER THIS TEXT
15432 # Note: the current result listed for this is not what the original one was,
15433 # but the original bug was JavaScript injection, which is fixed in any case.
15434 # It's not clear that the original result listed was any more correct than the
15435 # current one. Original result:
15438 # <li class="||">
15439 # }}}blah" onmouseover="alert('hello world');" align="left"<b>MOVE MOUSE CURSOR OVER HERE</b>
15441 Fuzz testing: Parser25 (bug 6055)
15447 }}}blah" onmouseover="alert('hello world');" align="left"'''MOVE MOUSE CURSOR OVER HERE
15449 <p><LI CLASS=blah" onmouseover="alert('hello world');" align="left"<b>MOVE MOUSE CURSOR OVER HERE</b>
15454 Fuzz testing: URL adjacent extension (with space, clean)
15456 http://example.com <nowiki>junk</nowiki>
15458 <p><a rel="nofollow" class="external free" href="http://example.com">http://example.com</a> junk
15461 <p><a rel="mw:ExtLink" href="http://example.com" data-parsoid='{"stx":"url"}'>http://example.com</a> <span typeof="mw:Nowiki">junk</span></p>
15465 Fuzz testing: URL adjacent extension (no space, dirty; nowiki)
15467 http://example.com<nowiki>junk</nowiki>
15469 <p><a rel="nofollow" class="external free" href="http://example.com">http://example.com</a>junk
15472 <p><a rel="mw:ExtLink" href="http://example.com" data-parsoid='{"stx":"url"}'>http://example.com</a><span typeof="mw:Nowiki">junk</span></p>
15476 Fuzz testing: URL adjacent extension (no space, dirty; pre)
15478 http://example.com<pre>junk</pre>
15480 <a rel="nofollow" class="external free" href="http://example.com">http://example.com</a><pre>junk</pre>
15483 <p><a rel="nofollow" class="external free" href="http://example.com">http://example.com</a></p>
15488 <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>
15492 Fuzz testing: image with bogus manual thumbnail
15494 [[Image:foobar.jpg|thumbnail= ]]
15496 <div class="thumb tright"><div class="thumbinner" style="width:182px;">Error creating thumbnail: <div class="thumbcaption"></div></div></div>
15499 <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>
15503 Fuzz testing: encoded newline in generated HTML replacements (bug 6577)
15505 <pre dir=" "></pre>
15507 <pre dir=" "></pre>
15512 Parsing optional HTML elements (Bug 6171)
15517 <td> Some tabular data</td>
15518 <td> More tabular data ...
15519 <td> And yet som tabular data</td>
15525 <td> Some tabular data</td>
15526 <td> More tabular data ...
15527 </td><td> And yet som tabular data</td>
15534 Correct handling of <td>, <tr> (Bug 6171)
15539 <td> Some tabular data</td>
15540 <td> More tabular data ...</td>
15541 <td> And yet som tabular data</td>
15547 <td> Some tabular data</td>
15548 <td> More tabular data ...</td>
15549 <td> And yet som tabular data</td>
15557 Parsing crashing regression (fr:JavaScript)
15561 <p></body></x>
15566 Inline wiki vs wiki block nesting
15572 <p><b>Bold paragraph</b>
15573 </p><p>New wiki paragraph
15577 # FIXME: The current php output is documented
15578 # and desired output is the parsoid target.
15580 Inline HTML vs wiki block nesting
15586 <p><b>Bold paragraph
15587 </p><p>New wiki paragraph</b>
15590 <p><b>Bold paragraph</b>
15591 </p><p>New wiki paragraph
15595 # Original result was this:
15596 # <p><b>bold</b><b>bold<i>bolditalics</i></b>
15598 # While that might be marginally more intuitive, maybe, the six-apostrophe
15599 # construct is clearly pathological and the result stated here (which is what
15600 # the parser actually does) is about as reasonable as anything.
15602 Mixing markup for italics and bold
15605 '''bold''''''bold''bolditalics'''''
15607 <p>'<i>bold'</i><b>bold<i>bolditalics</i></b>
15615 Article for special page transclusion test
15619 Special page transclusion
15622 {{Special:Prefixindex/Xyzzyx}}
15624 <table class="mw-prefixindex-list-table"><tr><td><a href="/wiki/Xyzzyx" title="Xyzzyx">Xyzzyx</a></td></tr></table>
15629 Special page transclusion twice (bug 5021)
15632 {{Special:Prefixindex/Xyzzyx}}
15633 {{Special:Prefixindex/Xyzzyx}}
15635 <table class="mw-prefixindex-list-table"><tr><td><a href="/wiki/Xyzzyx" title="Xyzzyx">Xyzzyx</a></td></tr></table>
15636 <table class="mw-prefixindex-list-table"><tr><td><a href="/wiki/Xyzzyx" title="Xyzzyx">Xyzzyx</a></td></tr></table>
15641 Transclusion of default MediaWiki message
15643 {{MediaWiki:Mainpage}}
15650 Transclusion of nonexistent MediaWiki message
15652 {{MediaWiki:Mainpagexxx}}
15654 <p><a href="/index.php?title=MediaWiki:Mainpagexxx&action=edit&redlink=1" class="new" title="MediaWiki:Mainpagexxx (page does not exist)">MediaWiki:Mainpagexxx</a>
15659 Transclusion of MediaWiki message with underscore
15661 {{MediaWiki:history_short}}
15668 Transclusion of MediaWiki message with space
15670 {{MediaWiki:history short}}
15677 Invalid header with following text
15687 Section extraction test (section 0)
15707 Section extraction test (section 1)
15729 Section extraction test (section 2)
15750 Section extraction test (section 3)
15770 Section extraction test (section 4)
15794 Section extraction test (section 5)
15814 Section extraction test (section 6)
15835 Section extraction test (section 7)
15855 Section extraction test (section 8)
15875 Section extraction test (section 9)
15896 Section extraction test (section 10)
15916 Section extraction test (nonexistent section 11)
15935 Section extraction test with bogus heading (section 1)
15940 ==bogus== not a legal section
15944 ==bogus== not a legal section
15948 Section extraction test with bogus heading (section 2)
15953 ==bogus== not a legal section
15960 Section extraction test with comment after heading (section 1)
15972 Section extraction test with comment after heading (section 2)
15984 Section extraction test with bogus <nowiki> heading (section 1)
15989 ==bogus== <nowiki>not a legal section</nowiki>
15993 ==bogus== <nowiki>not a legal section</nowiki>
15997 Section extraction test with bogus <nowiki> heading (section 2)
16002 ==bogus== <nowiki>not a legal section</nowiki>
16009 # Formerly testing for bug 2587, now resolved by the use of unmarked sections
16010 # instead of respecting commented sections
16012 Section extraction prefixed by comment (section 1)
16023 Section extraction prefixed by comment (section 2)
16034 # Formerly testing for bug 2607, now resolved by the use of unmarked sections
16035 # instead of respecting HTML-style headings
16037 Section extraction, mixed wiki and html (section 1)
16053 Section extraction, mixed wiki and html (section 2)
16069 # Formerly testing for bug 3342
16071 Section extraction, heading surrounded by <noinclude>
16075 <noinclude>==unmarked==</noinclude>
16081 # Test behavior of bug 19910
16083 Sectiion with all-equals
16088 The line above must have a trailing space
16091 But just in case it doesn't...
16095 But just in case it doesn't...
16099 Section replacement test (section 0)
16130 Section replacement test (section 1)
16159 Section replacement test (section 2)
16189 Section replacement test (section 3)
16220 Section replacement test (section 4)
16247 Section replacement test (section 5)
16278 Section replacement test (section 6)
16308 Section replacement test (section 7)
16339 Section replacement test (section 8)
16370 Section replacement test (section 9)
16399 Section replacement test (section 10)
16429 Section replacement test with initial whitespace (bug 13728)
16433 Preformatted initial line
16437 Preformatted initial line
16444 Section extraction, heading followed by pre with 20 spaces (bug 6398)
16456 Section extraction, heading followed by pre with 19 spaces (bug 6398 sanity check)
16469 Section extraction, <pre> around bogus header (bug 10309)
16486 Section replacement, <pre> around bogus header (bug 10309)
16488 noxml replace=2,"xxx"
16509 Handling of 
 in URLs
16513 <ul><li><ul><li> <a rel="nofollow" class="external free" href="irc://%0Aa">irc://%0Aa</a></li></ul></li></ul>
16516 <ul><li><ul><li> <a rel="mw:ExtLink" href="irc://
16518 a</a></li></ul></li></ul>
16522 Handling of %0A in URLs
16526 <ul><li><ul><li> <a rel="nofollow" class="external free" href="irc://%0Aa">irc://%0Aa</a></li></ul></li></ul>
16529 <ul><li><ul><li> <a rel="mw:ExtLink" href="irc://%0Aa">irc://%0Aa</a></li></ul></li></ul>
16533 # The PHP parser strips the empty tags out for giggles; parsoid doesn't.
16535 5 quotes, code coverage +1 line
16542 <p><b><i></i></b></p>
16545 # same html as previous, but wikitext adjusted to match parsoid html2wt
16546 # note that wt2html and html2html will put the <i> before the <b>
16548 5 quotes, code coverage +1 line w/ nowiki (1)
16550 parsoid=wt2wt,html2wt
16552 '''''<nowiki/>'''''
16557 <p><b><i></i></b></p>
16560 # same as previous, just swapping the <i> and <b>
16562 5 quotes, code coverage +1 line w/ nowiki (2)
16564 '''''<nowiki/>'''''
16569 <p><i><b></b></i></p>
16573 Special:Search page linking.
16577 <p><a href="/wiki/Special:Search" title="Special:Search">Special:Search</a>
16582 {{!}} is a magic word
16584 {{!}} is a magic word there and {{!}} is still a magic word here
16586 <p>| is a magic word there and | is still a magic word here
16589 <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>
16595 title=[[Parser test]]
16600 * {{FULLPAGENAMEE}}
16602 * {{BASEPAGENAMEE}}
16606 * {{ROOTPAGENAMEE}}
16608 * {{TALKPAGENAMEE}}
16609 * {{SUBJECTPAGENAME}}
16610 * {{SUBJECTPAGENAMEE}}
16613 * {{NAMESPACENUMBER}}
16617 * {{SUBJECTSPACEE}}
16618 * {{Dynamic|{{NUMBEROFUSERS}}|{{NUMBEROFPAGES}}|{{CURRENTVERSION}}|{{CONTENTLANGUAGE}}|{{DIRECTIONMARK}}|{{CURRENTTIMESTAMP}}|{{NUMBEROFARTICLES}}}}
16620 <ul><li> Parser test</li>
16621 <li> Parser_test</li>
16622 <li> Parser test</li>
16623 <li> Parser_test</li>
16624 <li> Parser test</li>
16625 <li> Parser_test</li>
16626 <li> Parser test</li>
16627 <li> Parser_test</li>
16628 <li> Parser test</li>
16629 <li> Parser_test</li>
16630 <li> Talk:Parser test</li>
16631 <li> Talk:Parser_test</li>
16632 <li> Parser test</li>
16633 <li> Parser_test</li>
16641 <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>
16644 ### Note: Above tests excludes the "{{NUMBEROFADMINS}}" magic word because it generates a MySQL error when included.
16654 image4 |300px| centre
16655 image5.svg| http://///////
16660 <ul class="gallery mw-gallery-traditional">
16661 <li class="gallerybox" style="width: 155px"><div style="width: 155px">
16662 <div class="thumb" style="height: 150px;">Image1.png</div>
16663 <div class="gallerytext">
16666 <li class="gallerybox" style="width: 155px"><div style="width: 155px">
16667 <div class="thumb" style="height: 150px;">Image2.gif</div>
16668 <div class="gallerytext">
16673 <li class="gallerybox" style="width: 155px"><div style="width: 155px">
16674 <div class="thumb" style="height: 150px;">Image3</div>
16675 <div class="gallerytext">
16678 <li class="gallerybox" style="width: 155px"><div style="width: 155px">
16679 <div class="thumb" style="height: 150px;">Image4</div>
16680 <div class="gallerytext">
16685 <li class="gallerybox" style="width: 155px"><div style="width: 155px">
16686 <div class="thumb" style="height: 150px;">Image5.svg</div>
16687 <div class="gallerytext">
16688 <p><a rel="nofollow" class="external free" href="http://///////">http://///////</a>
16692 <li class="gallerybox" style="width: 155px"><div style="width: 155px">
16693 <div class="thumb" style="height: 150px;">* image6</div>
16694 <div class="gallerytext">
16702 Gallery (with options)
16704 <gallery widths='70px' heights='40px' perrow='2' caption='Foo [[Main Page]]' >
16705 File:Nonexistent.jpg|caption
16706 File:Nonexistent.jpg
16707 image:foobar.jpg|some '''caption''' [[Main Page]]
16709 image:foobar.jpg|Blabla|alt=This is a foo-bar.|blabla.
16712 <ul class="gallery mw-gallery-traditional" style="max-width: 226px;_width: 226px;">
16713 <li class='gallerycaption'>Foo <a href="/wiki/Main_Page" title="Main Page">Main Page</a></li>
16714 <li class="gallerybox" style="width: 105px"><div style="width: 105px">
16715 <div class="thumb" style="height: 70px;">Nonexistent.jpg</div>
16716 <div class="gallerytext">
16721 <li class="gallerybox" style="width: 105px"><div style="width: 105px">
16722 <div class="thumb" style="height: 70px;">Nonexistent.jpg</div>
16723 <div class="gallerytext">
16726 <li class="gallerybox" style="width: 105px"><div style="width: 105px">
16727 <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>
16728 <div class="gallerytext">
16729 <p>some <b>caption</b> <a href="/wiki/Main_Page" title="Main Page">Main Page</a>
16733 <li class="gallerybox" style="width: 105px"><div style="width: 105px">
16734 <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>
16735 <div class="gallerytext">
16738 <li class="gallerybox" style="width: 105px"><div style="width: 105px">
16739 <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>
16740 <div class="gallerytext">
16750 Gallery with link that has fragment
16753 image:foobar.jpg|link=Main_Page
16754 image:foobar.jpg|link=Main_Page#section
16755 image:foobar.jpg|link=Main Page#section|caption
16758 <ul class="gallery mw-gallery-traditional">
16759 <li class="gallerybox" style="width: 155px"><div style="width: 155px">
16760 <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>
16761 <div class="gallerytext">
16764 <li class="gallerybox" style="width: 155px"><div style="width: 155px">
16765 <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>
16766 <div class="gallerytext">
16769 <li class="gallerybox" style="width: 155px"><div style="width: 155px">
16770 <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>
16771 <div class="gallerytext">
16781 Gallery with wikitext inside caption
16784 File:foobar.jpg|[[File:foobar.jpg|20px|desc|alt=inneralt]]|alt=galleryalt
16785 File:foobar.jpg|{{Test|unamedParam|alt=param}}|alt=galleryalt
16788 <ul class="gallery mw-gallery-traditional">
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/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>
16791 <div class="gallerytext">
16792 <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>
16796 <li class="gallerybox" style="width: 155px"><div style="width: 155px">
16797 <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>
16798 <div class="gallerytext">
16799 <p>This is a test template
16808 gallery (with showfilename option)
16810 <gallery showfilename>
16811 File:Nonexistent.jpg|caption
16812 File:Nonexistent.jpg
16813 image:foobar.jpg|some '''caption''' [[Main Page]]
16817 <ul class="gallery mw-gallery-traditional">
16818 <li class="gallerybox" style="width: 155px"><div style="width: 155px">
16819 <div class="thumb" style="height: 150px;">Nonexistent.jpg</div>
16820 <div class="gallerytext">
16821 <p><a href="/wiki/File:Nonexistent.jpg" title="File:Nonexistent.jpg">Nonexistent.jpg</a><br />
16826 <li class="gallerybox" style="width: 155px"><div style="width: 155px">
16827 <div class="thumb" style="height: 150px;">Nonexistent.jpg</div>
16828 <div class="gallerytext">
16829 <p><a href="/wiki/File:Nonexistent.jpg" title="File:Nonexistent.jpg">Nonexistent.jpg</a><br />
16833 <li class="gallerybox" style="width: 155px"><div style="width: 155px">
16834 <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>
16835 <div class="gallerytext">
16836 <p><a href="/wiki/File:Foobar.jpg" title="File:Foobar.jpg">Foobar.jpg</a><br />
16837 some <b>caption</b> <a href="/wiki/Main_Page" title="Main Page">Main Page</a>
16841 <li class="gallerybox" style="width: 155px"><div style="width: 155px">
16842 <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>
16843 <div class="gallerytext">
16844 <p><a href="/wiki/File:Foobar.jpg" title="File:Foobar.jpg">Foobar.jpg</a><br />
16853 Gallery (with namespace-less filenames)
16856 File:Nonexistent.jpg
16862 <ul class="gallery mw-gallery-traditional">
16863 <li class="gallerybox" style="width: 155px"><div style="width: 155px">
16864 <div class="thumb" style="height: 150px;">Nonexistent.jpg</div>
16865 <div class="gallerytext">
16868 <li class="gallerybox" style="width: 155px"><div style="width: 155px">
16869 <div class="thumb" style="height: 150px;">Nonexistent.jpg</div>
16870 <div class="gallerytext">
16873 <li class="gallerybox" style="width: 155px"><div style="width: 155px">
16874 <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>
16875 <div class="gallerytext">
16878 <li class="gallerybox" style="width: 155px"><div style="width: 155px">
16879 <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>
16880 <div class="gallerytext">
16888 HTML Hex character encoding (spells the word "JavaScript")
16890 parsoid=wt2html,wt2wt,html2html
16892 JavaScript
16894 <p>JavaScript
16899 <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>
16903 HTML Hex character encoding bogus encoding (bug 26437 regression check)
16907 <p>&#xsee;&#XSEE;
16910 <p>&#xsee;&#XSEE;</p>
16914 HTML Hex character encoding mixed case
16916 parsoid=wt2html,wt2wt,html2html
16925 <p><span typeof="mw:Entity">î</span><span typeof="mw:Entity">î</span></p>
16929 __FORCETOC__ override
16941 ISBN 978-0-1234-56 789
16943 <p><a href="/wiki/Special:BookSources/9780123456" class="internal mw-magiclink-isbn">ISBN 978-0-1234-56</a> 789
16946 <p><a href="/wiki/Special:BookSources/9780123456" class="internal mw-magiclink-isbn">ISBN 978-0-1234-56</a> 789</p>
16948 <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>
16952 ISBN followed by 5 spaces
16963 ISBN ISBN 1234567890
16965 <p>ISBN <a href="/wiki/Special:BookSources/1234567890" class="internal mw-magiclink-isbn">ISBN 1234567890</a>
16968 <p>ISBN <a href="./Special:BookSources/1234567890" rel="mw:ExtLink" data-parsoid='{"stx":"magiclink"}'>ISBN 1234567890</a></p>
16978 <p><a href="/wiki/Special:BookSources/346204561X" class="internal mw-magiclink-isbn">ISBN 3-462-04561-X</a>
16979 <a href="/wiki/Special:BookSources/080442957X" class="internal mw-magiclink-isbn">ISBN 080442957X</a>
16980 <a href="/wiki/Special:BookSources/978080442957X" class="internal mw-magiclink-isbn">ISBN 978080442957X</a>
16983 <p><a href="./Special:BookSources/346204561X" rel="mw:ExtLink" data-parsoid='{"stx":"magiclink"}'>ISBN 3-462-04561-X</a>
16984 <a href="./Special:BookSources/080442957X" rel="mw:ExtLink" data-parsoid='{"stx":"magiclink"}'>ISBN 080442957X</a>
16985 <a href="./Special:BookSources/978080442957X" rel="mw:ExtLink" data-parsoid='{"stx":"magiclink"}'>ISBN 978080442957X</a></p>
16989 ISBN with empty prefix (parsoid test)
16993 <p><a href="/wiki/Special:BookSources/1234567890" class="internal mw-magiclink-isbn">ISBN 1234567890</a>
16996 <p><a href="Special:BookSources/1234567890" rel="mw:ExtLink">ISBN 1234567890</a></p>
17000 Bug 22905: <abbr> followed by ISBN followed by </a>
17002 <abbr>(fr)</abbr> ISBN 2753300917 [http://www.example.com example.com]
17004 <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>
17007 <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>
17015 <p>RFC <a class="external mw-magiclink-rfc" rel="nofollow" href="//tools.ietf.org/html/rfc1234">RFC 1234</a>
17020 Double RFC with a wiki link
17024 <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>
17033 <p><a class="external mw-magiclink-rfc" rel="nofollow" href="//tools.ietf.org/html/rfc983">RFC 983</a> 987
17036 <p><a class="external mw-magiclink-rfc" rel="nofollow" href="//tools.ietf.org/html/rfc983">RFC 983</a> 987</p>
17040 Centre-aligned image
17042 [[Image:foobar.jpg|centre]]
17044 <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>
17051 [[Image:foobar.jpg|none]]
17053 <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>
17058 Width + Height sized image (using px) (height is ignored)
17060 [[Image:foobar.jpg|640x480px]]
17062 <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>
17067 Width-sized image (using px, no following whitespace)
17069 [[Image:foobar.jpg|640px]]
17071 <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>
17076 Width-sized image (using px, with following whitespace - test regression from r39467)
17078 [[Image:foobar.jpg|640px ]]
17080 <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>
17085 Width-sized image (using px, with preceding whitespace - test regression from r39467)
17087 [[Image:foobar.jpg| 640px]]
17089 <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>
17094 Image with page parameter
17098 [[File:LoremIpsum.djvu|page=2]]
17100 <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>
17103 <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>
17107 Another italics / bold test
17115 # FIXME: The php output seems broken. It's interleaving some open/close tags.
17121 <dl><dd><dl><dt><dl><dt><dl><dt><dl><dd><dl><dd></dt></dl></dd></dl></dd></dl></dd></dl></dd></dl></dd></dl>
17124 <dl><dd><dl><dt><dl><dt><dl><dt><dl><dd><dl><dd></dd></dl></dd></dl></dt></dl></dt></dl></dt></dl></dd></dl>
17129 # Images with the "|" character in external URLs in comment tags; Eats half the comment, leaves unmatched "</a>" tag.
17131 Images with the "|" character in the comment
17133 [[File:Foobar.jpg|thumb|An [http://test/?param1=|left|¶m2=|x external] URL]]
17135 <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>
17138 <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>
17142 [Before] HTML without raw HTML enabled ($wgRawHtml==false)
17144 <html><script>alert(1);</script></html>
17146 <p><html><script>alert(1);</script></html>
17151 HTML with raw HTML ($wgRawHtml==true)
17155 <html><script>alert(1);</script></html>
17157 <p><script>alert(1);</script>
17162 Parents of subpages, one level up
17164 subpage title=[[Subpage test/L1/L2/L3]]
17168 <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>
17174 Parents of subpages, one level up, not named
17176 subpage title=[[Subpage test/L1/L2/L3]]
17180 <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>
17187 Parents of subpages, two levels up
17189 subpage title=[[Subpage test/L1/L2/L3]]
17195 <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
17196 </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>
17201 Parents of subpages, two levels up, without trailing slash or name.
17203 subpage title=[[Subpage test/L1/L2/L3]]
17212 Parents of subpages, two levels up, with lots of extra trailing slashes.
17214 subpage title=[[Subpage test/L1/L2/L3]]
17218 <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>
17223 Subpage test/L1/L2/L3Sibling
17229 Transclusion of a sibling page (one level up)
17231 subpage title=[[Subpage test/L1/L2/L3]]
17240 Transclusion of a child page
17242 subpage title=[[Subpage test/L1/L2]]
17251 Non-transclusion because of too many up levels
17253 subpage title=[[Subpage test/L1/L2/L3]]
17255 {{../../../../More than parent}}
17257 <p>{{../../../../More than parent}}
17262 Definition list code coverage
17268 <dl><dt> title  </dt>
17270 <dt> title </dt>
17276 <dl><dt> title <span typeof="mw:Placeholder"> </span></dt><dd> def</dd>
17277 <dt> title<span typeof="mw:Placeholder"> </span></dt><dd> def</dd>
17278 <dt>title</dt><dd> def</dd></dl>
17282 Don't fall for the self-closing div
17284 <div>hello world</div/>
17286 <div>hello world</div>
17295 <p>[[:Template:Msg]]
17304 <p><a href="/index.php?title=Template:QUERTY&action=edit&redlink=1" class="new" title="Template:QUERTY (page does not exist)">Template:QUERTY</a>
17308 # This isn't needed for XHTML conformance, but would be handy as a fallback security measure
17310 Always escape literal '>' in output, not just after '<'
17324 <p>This is a test template
17325 This is a test template
17337 Inclusion of !userCanEdit() content
17341 <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>
17347 Out-of-order TOC heading levels
17356 <div id="toc" class="toc"><div id="toctitle"><h2>Contents</h2></div>
17358 <li class="toclevel-1 tocsection-1"><a href="#2"><span class="tocnumber">1</span> <span class="toctext">2</span></a>
17360 <li class="toclevel-2 tocsection-2"><a href="#6"><span class="tocnumber">1.1</span> <span class="toctext">6</span></a></li>
17361 <li class="toclevel-2 tocsection-3"><a href="#3"><span class="tocnumber">1.2</span> <span class="toctext">3</span></a></li>
17364 <li class="toclevel-1 tocsection-4"><a href="#1"><span class="tocnumber">2</span> <span class="toctext">1</span></a>
17366 <li class="toclevel-2 tocsection-5"><a href="#5"><span class="tocnumber">2.1</span> <span class="toctext">5</span></a></li>
17367 <li class="toclevel-2 tocsection-6"><a href="#2_2"><span class="tocnumber">2.2</span> <span class="toctext">2</span></a></li>
17373 <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>
17374 <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>
17375 <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>
17376 <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>
17377 <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>
17378 <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>
17384 ISBN with a dummy number
17394 ISBN with space-delimited number
17398 <p><a href="/wiki/Special:BookSources/9290170328" class="internal mw-magiclink-isbn">ISBN 92 9017 032 8</a>
17404 ISBN with multiple spaces, no number
17423 </p><p><a href="/wiki/Special:BookSources/1234567890" class="internal mw-magiclink-isbn">ISBN 1234567890</a>
17424 </p><p>ISBN 12345678901
17430 ISBN with trailing year (bug 8110)
17432 ISBN 1-234-56789-0 - 2006
17434 ISBN 1 234 56789 0 - 2006
17436 <p><a href="/wiki/Special:BookSources/1234567890" class="internal mw-magiclink-isbn">ISBN 1-234-56789-0</a> - 2006
17437 </p><p><a href="/wiki/Special:BookSources/1234567890" class="internal mw-magiclink-isbn">ISBN 1 234 56789 0</a> - 2006
17445 {{anchorencode:foo bar©#%n}}
17447 <p>foo_bar.C2.A9.23.25n
17452 anchorencode trims spaces
17454 {{anchorencode: __pretty__please__}}
17461 anchorencode deals with links
17463 {{anchorencode: [[hello|world]] [[hi]]}}
17470 anchorencode deals with templates
17472 {{anchorencode: {{Foo}} }}
17479 anchorencode encodes like the TOC generator: (bug 18431)
17481 === _ +:.3A%3A&&]] ===
17482 {{anchorencode: _ +:.3A%3A&&]] }}
17485 <h3><span class="mw-headline" id=".2B:.3A.253A.26.26.5D.5D">_ +:.3A%3A&&]]</span></h3>
17486 <p>.2B:.3A.253A.26.26.5D.5D
17491 Bug 6200: blockquotes and paragraph formatting
17512 Bug 8293: Use of center tag ruins paragraph formatting
17533 Parsing of overlapping (improperly nested) inline html tags
17535 <span><s>x</span></s>
17537 <p><span><s>x</span></s></span>
17540 <p><span><s>x</s></span>
17545 ### Language variants related tests
17548 Self-link in language variants
17550 title=[[Dunav]] language=sr
17552 Both [[Dunav]] and [[Дунав]] are names for this river.
17554 <p>Both <strong class="selflink">Dunav</strong> and <strong class="selflink">Дунав</strong> are names for this river.
17565 Link to another existing title shouldn't be parsed as self-link even if it's a variant of this title
17567 title=[[Duna]] language=sr
17569 [[Дуна]] is not a self-link while [[Duna]] and [[Dуна]] are still self-links.
17571 <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.
17576 Link to a section of a variant of this title shouldn't be parsed as self-link
17578 title=[[Duna]] language=sr
17580 [[Dуна]] is a self-link while [[Dunа#Foo]] and [[Dуна#Foo]] are not self-links.
17582 <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.
17587 Link to pages in language variants
17591 Main Page can be written as [[Маин Паге]]
17593 <p>Main Page can be written as <a href="/wiki/Main_Page" title="Main Page">Маин Паге</a>
17599 Multiple links to pages in language variants
17603 [[Main Page]] can be written as [[Маин Паге]] same as [[Маин Паге]].
17605 <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>.
17611 Simple template in language variants
17617 <p>This is a test template
17623 Template with explicit namespace in language variants
17629 <p>This is a test template
17635 Basic test for template parameter in language variants
17639 {{парамтест|param=foo}}
17641 <p>This is a test template with parameter foo
17647 Simple category in language variants
17651 [[Category:МедиаWики Усер'с Гуиде]]
17653 <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>
17670 Don't convert blue categorylinks to another variant (bug 33210)
17674 [[A]][[Category:分类]]
17676 <a href="/wiki/Category:%E5%88%86%E7%B1%BB" title="Category:分类">分类</a>
17681 Stripping -{}- tags (language variants)
17685 Latin proverb: -{Ne nuntium necare}-
17687 <p>Latin proverb: Ne nuntium necare
17693 Prevent conversion with -{}- tags (language variants)
17695 language=sr variant=sr-ec
17697 Latinski: -{Ne nuntium necare}-
17699 <p>Латински: Ne nuntium necare
17705 Prevent conversion of text with -{}- tags (language variants)
17707 language=sr variant=sr-ec
17709 Latinski: -{Ne nuntium necare}-
17711 <p>Латински: Ne nuntium necare
17717 Prevent conversion of links with -{}- tags (language variants)
17719 language=sr variant=sr-ec
17723 <p><a href="/wiki/Main_Page" title="Main Page">Main Page</a>
17729 -{}- tags within headlines (within html for parserConvert())
17731 language=sr variant=sr-ec
17735 <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>
17741 Explicit definition of language variant alternatives
17743 language=zh variant=zh-tw
17745 -{zh:China;zh-tw:Taiwan}-, not China
17747 <p>Taiwan, not China
17753 Conversion around HTML tags
17755 language=sr variant=sr-ec
17757 -{H|span=>sr-ec:script;title=>sr-ec:src;}-
17758 <span title="La-{sr-el:L;sr-ec:C;}-tin">ski</span>
17761 <span title="ЛаCтин">ски</span>
17767 Explicit session-wise language variant mapping (A flag and - flag)
17769 language=zh variant=zh-tw
17771 Taiwan is not China.
17772 But -{A|zh:China;zh-tw:Taiwan}- is China,
17773 (This-{-|zh:China;zh-tw:Taiwan}- should be stripped!)
17774 and -{China}- is China.
17776 <p>Taiwan is not China.
17777 But Taiwan is Taiwan,
17778 (This should be stripped!)
17779 and China is China.
17784 Explicit session-wise language variant mapping (H flag for hide)
17786 language=zh variant=zh-tw
17788 (This-{H|zh:China;zh-tw:Taiwan}- should be stripped!)
17791 <p>(This should be stripped!)
17797 Adding explicit conversion rule for title (T flag)
17799 language=zh variant=zh-tw showtitle
17801 Should be stripped-{T|zh:China;zh-tw:Taiwan}-!
17804 <p>Should be stripped!
17809 Testing that changing the language variant here in the tests actually works
17811 language=zh variant=zh showtitle
17813 Should be stripped-{T|zh:China;zh-tw:Taiwan}-!
17816 <p>Should be stripped!
17821 Recursive conversion of alt and title attrs shouldn't clear converter state
17823 language=zh variant=zh-cn showtitle
17825 -{H|zh-cn:Exclamation;zh-tw:exclamation;}-
17826 Should be stripped-{T|zh-cn:China;zh-tw:Taiwan}-<span title="exclamation">!</span>
17830 Should be stripped<span title="Exclamation">!</span>
17835 Bug 24072: more test on conversion rule for title
17837 language=zh variant=zh-tw showtitle
17839 This should be stripped-{T|zh:China;zh-tw:Taiwan}-!
17840 This won't take interferes with the title rule-{H|zh:Beijing;zh-tw:Taipei}-.
17843 <p>This should be stripped!
17844 This won't take interferes with the title rule.
17849 Partly disable title conversion if variant == main language code
17851 language=zh variant=zh title=[[ZH]] showtitle
17853 -{T|zh-cn:CN;zh-tw:TW}-
17861 Partly disable title conversion if variant == main language code, more
17863 language=zh variant=zh title=[[ZH]] showtitle
17873 Raw output of variant escape tags (R flag)
17875 language=zh variant=zh-tw
17877 Raw: -{R|zh:China;zh-tw:Taiwan}-
17879 <p>Raw: zh:China;zh-tw:Taiwan
17884 Nested using of manual convert syntax
17886 language=zh variant=zh-hk
17888 Nested: -{zh-hans:Hi -{zh-cn:China;zh-sg:Singapore;}-;zh-hant:Hello -{zh-tw:Taiwan;zh-hk:H-{ong}- K-{}-ong;}-;}-!
17890 <p>Nested: Hello Hong Kong!
17895 Proper conversion of text in external links
17897 language=sr variant=sr-ec
17899 http://www.google.com
17900 gopher://www.google.com
17901 [http://www.google.com http://www.google.com]
17902 [gopher://www.google.com gopher://www.google.com]
17903 [https://www.google.com irc://www.google.com]
17904 [ftp://www.google.com www.google.com/ftp://dir]
17905 [//www.google.com www.google.com]
17907 <p><a rel="nofollow" class="external free" href="http://www.google.com">http://www.google.com</a>
17908 <a rel="nofollow" class="external free" href="gopher://www.google.com">gopher://www.google.com</a>
17909 <a rel="nofollow" class="external free" href="http://www.google.com">http://www.google.com</a>
17910 <a rel="nofollow" class="external free" href="gopher://www.google.com">gopher://www.google.com</a>
17911 <a rel="nofollow" class="external text" href="https://www.google.com">irc://www.google.com</a>
17912 <a rel="nofollow" class="external text" href="ftp://www.google.com">www.гоогле.цом/фтп://дир</a>
17913 <a rel="nofollow" class="external text" href="//www.google.com">www.гоогле.цом</a>
17918 Do not convert roman numbers to language variants
17920 language=sr variant=sr-ec
17924 <p>Фридрих IV је цар.
17929 Unclosed language converter markup "-{"
17940 Don't convert raw rule "-{R|=>}-" to "=>"
17951 Don't break link parsing if language converter markup is in the caption.
17953 language=sr variant=sr-ec
17955 [[Main Page|-{R|main page}-]]
17957 <p><a href="/wiki/Main_Page" title="Маин Паге">main page</a>
17961 # FIXME: This test is currently broken in the PHP parser (bug 52661)
17963 Don't break image parsing if language converter markup is in the caption.
17967 [[File:Foobar.jpg|-{R|caption}-]]
17969 <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>
17973 # FIXME: This test is currently broken in the PHP parser (bug 52661)
17975 Don't break list handling if language converter markup is in the item.
17977 language=zh variant=zh-cn
17979 ;-{zh-cn:AAA;zh-tw:BBB}-
17981 <dl><dt><span class="error">在手动语言转换规则中检测到错误</span></dd></dl>
17988 # FIXME: This test is currently broken in the PHP parser (bug 52661)
17990 Don't break table handling if language converter markup is in the cell.
17992 language=sr variant=sr-ec
18015 Bug 529: Uncovered bullet
18024 # Plain MediaWiki does not remove empty lists, but tidy actually does.
18025 # Templates in Wikipedia rely on this behavior, as tidy has always been
18026 # enabled there. These tests are normally run *without* tidy, so specify the
18027 # full output here.
18028 # To test realistic parsing behavior, apply a tidy-like transformation to both
18029 # the expected output and your parser's output.
18031 Bug 529: Uncovered bullet leaving empty list, normally removed by tidy
18033 ******* Foo {{bullet}}
18035 <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>
18041 Bug 529: Uncovered table already at line-start
18064 Bug 529: Uncovered bullet in parser function result
18066 * Foo {{lc:{{bullet}} }}
18074 Bug 5678: Double-parsed template argument
18076 {{lc:{{{1}}}|hello}}
18083 Bug 5678: Double-parsed template invocation
18085 {{lc:{{paramtest {{!}} param = hello }} }}
18087 <p>{{paramtest | param = hello }}
18092 Case insensitivity of parser functions for non-ASCII characters (bug 8143)
18095 title=[[Main Page]]
18097 {{PRVNÍVELKÉ:ěščř}}
18098 {{prvnívelké:ěščř}}
18118 Morwen/13: Unclosed link followed by heading
18125 <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>
18130 HHP2.1: Heuristics for headings in preprocessor parenthetical structures
18137 <h1><span class="mw-headline" id="heading">heading</span></h1>
18142 HHP2.2: Heuristics for headings in preprocessor parenthetical structures
18149 <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>
18164 Paragraphs inside divs (no extra line breaks)
18176 Paragraphs inside divs (extra line break on open)
18191 Paragraphs inside divs (extra line break on close)
18206 Paragraphs inside divs (extra line break on open and close)
18223 Nesting tags, paragraphs on lines which begin with <div>
18225 <div></div><strong>A
18228 <p><strong>A</strong></p>
18229 <p><strong>B</strong></p>
18237 # Bug 6200: <blockquote> should behave like <div> with respect to line breaks
18239 Bug 6200: paragraphs inside blockquotes (no extra line breaks)
18241 <blockquote>Line one
18243 Line two</blockquote>
18245 <blockquote>Line one
18246 Line two</blockquote>
18250 <p>Line one Line two</p>
18255 Bug 6200: paragraphs inside blockquotes (extra line break on open)
18260 Line two</blockquote>
18265 Line two</blockquote>
18270 Line two</blockquote>
18274 Bug 6200: paragraphs inside blockquotes (extra line break on close)
18276 <blockquote>Line one
18281 <blockquote>Line one
18294 Bug 6200: paragraphs inside blockquotes (extra line break on open and close)
18316 Paragraphs inside blockquotes/divs (no extra line breaks)
18318 <blockquote><div>Line one
18320 Line two</div></blockquote>
18322 <blockquote><div>Line one
18323 Line two</div></blockquote>
18328 Paragraphs inside blockquotes/divs (extra line break on open)
18333 Line two</div></blockquote>
18338 Line two</div></blockquote>
18343 Paragraphs inside blockquotes/divs (extra line break on close)
18345 <blockquote><div>Line one
18348 </div></blockquote>
18350 <blockquote><div>Line one
18353 </div></blockquote>
18358 Paragraphs inside blockquotes/divs (extra line break on open and close)
18364 </div></blockquote>
18370 </div></blockquote>
18375 Interwiki links trounced by replaceExternalLinks after early LinkHolderArray expansion
18377 wgLinkHolderBatchSize=0
18383 <p><a href="http://www.usemod.com/cgi-bin/mb.pl?1" class="extiw" title="meatball:1">meatball:1</a>
18384 <a href="http://www.usemod.com/cgi-bin/mb.pl?2" class="extiw" title="meatball:2">meatball:2</a>
18385 <a href="http://www.usemod.com/cgi-bin/mb.pl?3" class="extiw" title="meatball:3">meatball:3</a>
18390 Free external link invading image caption
18392 [[Image:Foobar.jpg|thumb|http://x|hello]]
18394 <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>
18399 Bug 15196: localised external link numbers
18403 [http://en.wikipedia.org/]
18405 <p><a rel="nofollow" class="external autonumber" href="http://en.wikipedia.org/">[۱]</a>
18408 <p><a rel="mw:ExtLink" href="http://en.wikipedia.org/"></a></p>
18412 Multibyte character in padleft
18414 {{padleft:-Hello|7|Æ}}
18421 Multibyte character in padright
18423 {{padright:Hello-|7|Æ}}
18430 formatdate parser function
18432 {{#formatdate:2009-03-24}}
18434 <p><span class="mw-formatted-date" title="2009-03-24">2009-03-24</span>
18439 formatdate parser function, with default format
18441 {{#formatdate:2009-03-24|mdy}}
18443 <p><span class="mw-formatted-date" title="2009-03-24">March 24, 2009</span>
18448 Spacing of numbers in formatted dates
18450 {{#formatdate:January 15}}
18452 <p><span class="mw-formatted-date" title="01-15">January 15</span>
18457 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
18459 language=nl title=[[MediaWiki:Common.css]]
18461 {{#formatdate:2009-03-24|dmy}}
18463 <p><span class="mw-formatted-date" title="2009-03-24">24 March 2009</span>
18476 Edit comment with link
18480 I like the [[Main Page]] a lot
18482 I like the <a href="/wiki/Main_Page" title="Main Page">Main Page</a> a lot
18486 Edit comment with link and link text
18490 I like the [[Main Page|best pages]] a lot
18492 I like the <a href="/wiki/Main_Page" title="Main Page">best pages</a> a lot
18496 Edit comment with link and link text with suffix
18500 I like the [[Main Page|best page]]s a lot
18502 I like the <a href="/wiki/Main_Page" title="Main Page">best pages</a> a lot
18506 Edit comment with section link (non-local, eg in history list)
18508 comment title=[[Main Page]]
18510 /* External links */ removed bogus entries
18512 <a href="/wiki/Main_Page#External_links" title="Main Page">→</a><span dir="auto"><span class="autocomment">External links: </span> removed bogus entries</span>
18516 Edit comment with section link and text before it (non-local, eg in history list)
18518 comment title=[[Main Page]]
18520 pre-comment text /* External links */ removed bogus entries
18522 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>
18526 Edit comment with section link (local, eg in diff view)
18528 comment local title=[[Main Page]]
18530 /* External links */ removed bogus entries
18532 <a href="#External_links">→</a><span dir="auto"><span class="autocomment">External links: </span> removed bogus entries</span>
18536 Edit comment with subpage link (bug 14080)
18540 title=[[Subpage test]]
18542 Poked at a [[/subpage]] here...
18544 Poked at a <a href="/wiki/Subpage_test/subpage" title="Subpage test/subpage">/subpage</a> here...
18548 Edit comment with subpage link and link text (bug 14080)
18552 title=[[Subpage test]]
18554 Poked at a [[/subpage|neat little page]] here...
18556 Poked at a <a href="/wiki/Subpage_test/subpage" title="Subpage test/subpage">neat little page</a> here...
18560 Edit comment with bogus subpage link in non-subpage NS (bug 14080)
18563 title=[[Subpage test]]
18565 Poked at a [[/subpage]] here...
18567 Poked at a <a href="/index.php?title=/subpage&action=edit&redlink=1" class="new" title="/subpage (page does not exist)">/subpage</a> here...
18571 Edit comment with bare anchor link (local, as on diff)
18575 title=[[Main Page]]
18579 <a href="#section">#section</a>
18583 Edit comment with bare anchor link (non-local, as on history)
18586 title=[[Main Page]]
18590 <a href="/wiki/Main_Page#section" title="Main Page">#section</a>
18594 Anchor starting with underscore
18598 <p><a href="#_ref">One</a>
18603 Id starting with underscore
18605 <div id="_ref"></div>
18607 <div id="_ref"></div>
18612 Space normalisation on autocomment (bug 22784)
18615 title=[[Main Page]]
18617 /* __hello__world__ */
18619 <a href="/wiki/Main_Page#hello_world" title="Main Page">→</a><span dir="auto"><span class="autocomment">__hello__world__</span></span>
18623 percent-encoding and + signs in comments (Bug 26410)
18627 [[ABC%33D% ++]] [[ABC%33D% ++|+%20]]
18629 <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>
18632 # Parsoid doesn't support this yet: see bug 73581
18633 # but it *should* omit the 'src' attribute if the image is bad.
18634 # PHP side of tests was disabled in
18635 # mediawiki/core:6bd31e7d95161a6e88fa86df60871051da997c3c
18636 # because of issues in the PHP parserTests infrastructure
18637 # (but the output below is indeed what the PHP side emits)
18639 Bad images - basic functionality
18642 !! DISABLED/html/php
18644 <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>
18648 Bad images - bug 16039: text after bad image disappears
18653 !! DISABLED/html/php
18659 <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>
18664 Verify that displaytitle works (bug #22501) no displaytitle
18668 wgAllowDisplayTitle=true
18669 wgRestrictDisplayTitle=false
18671 this is not the the title
18674 <p>this is not the the title
18679 Verify that displaytitle works (bug #22501) RestrictDisplayTitle=false
18684 wgAllowDisplayTitle=true
18685 wgRestrictDisplayTitle=false
18687 this is not the the title
18688 {{DISPLAYTITLE:whatever}}
18691 <p>this is not the the title
18696 Verify that displaytitle works (bug #22501) RestrictDisplayTitle=true mismatch
18701 wgAllowDisplayTitle=true
18702 wgRestrictDisplayTitle=true
18704 this is not the the title
18705 {{DISPLAYTITLE:whatever}}
18708 <p>this is not the the title
18713 Verify that displaytitle works (bug #22501) RestrictDisplayTitle=true matching
18718 wgAllowDisplayTitle=true
18719 wgRestrictDisplayTitle=true
18721 this is not the the title
18722 {{DISPLAYTITLE:screen}}
18725 <p>this is not the the title
18730 Verify that displaytitle works (bug #22501) AllowDisplayTitle=false
18735 wgAllowDisplayTitle=false
18737 this is not the the title
18738 {{DISPLAYTITLE:screen}}
18741 <p>this is not the the title
18742 <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>
18747 Verify that displaytitle works (bug #22501) AllowDisplayTitle=false no DISPLAYTITLE
18752 wgAllowDisplayTitle=false
18754 this is not the the title
18757 <p>this is not the the title
18762 Verify that displaytitle handles inline CSS styles (bug 26547) - rejected value
18767 wgAllowDisplayTitle=true
18768 wgRestrictDisplayTitle=true
18770 this is not the the title
18771 {{DISPLAYTITLE:<span style="display: none;">s</span>creen}}
18773 <span style="/* attempt to bypass $wgRestrictDisplayTitle */">s</span>creen
18774 <p>this is not the the title
18779 Verify that displaytitle handles inline CSS styles (bug 26547) - accepted value
18784 wgAllowDisplayTitle=true
18785 wgRestrictDisplayTitle=true
18787 this is not the the title
18788 {{DISPLAYTITLE:<span style="color: red;">s</span>creen}}
18790 <span style="color: red;">s</span>creen
18791 <p>this is not the the title
18796 preload: check <noinclude> and <includeonly>
18800 Hello <noinclude>cruel</noinclude><includeonly>kind</includeonly> world.
18806 preload: check <onlyinclude>
18810 Goodbye <onlyinclude>Hello world</onlyinclude>
18816 preload: can pass tags through if we want to
18820 <includeonly><</includeonly>includeonly>Hello world<includeonly><</includeonly>/includeonly>
18822 <includeonly>Hello world</includeonly>
18826 preload: check that it doesn't try to do tricks
18830 * <!-- Hello --> ''{{world}}'' {{<includeonly>subst:</includeonly>How are you}}{{ {{{|safesubst:}}} #if:1|2|3}}
18832 * <!-- Hello --> ''{{world}}'' {{subst:How are you}}{{ {{{|safesubst:}}} #if:1|2|3}}
18836 Play a bit with r67090 and bug 3158
18838 <div style="width:50% !important"> </div>
18839 <div style="width:50% !important"> </div>
18840 <div style="width:50% !important"> </div>
18841 <div style="border : solid;"> </div>
18843 <div style="width:50% !important"> </div>
18844 <div style="width:50% !important"> </div>
18845 <div style="width:50% !important"> </div>
18846 <div style="border : solid;"> </div>
18849 <div style="width:50% !important" data-parsoid='{"stx":"html"}'><span typeof="mw:Entity" data-parsoid='{"srcContent":" "}'> </span></div>
18850 <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>
18851 <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>
18852 <div style="border : solid;" data-parsoid='{"stx":"html"}'><span typeof="mw:Entity" data-parsoid='{"srcContent":" "}'> </span></div>
18857 HTML5 data attributes
18859 <span data-foo="bar">Baz</span>
18860 <p data-abc-def_hij="">Quuz</p>
18862 <p><span data-foo="bar">Baz</span>
18864 <p data-abc-def_hij="">Quuz</p>
18869 percent-encoding and + signs in internal links (Bug 26410)
18871 [[User:+%]] [[Page+title%]]
18872 [[%+]] [[%+|%20]] [[%+ ]] [[%+r]]
18873 [[%]] [[+]] [[File:%+abc%39|foo|[[bar]]]]
18874 [[%33%45]] [[%33%45+]]
18876 <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>
18877 <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>
18878 <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>
18879 <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>
18882 <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>
18886 Special characters in embedded file links (bug 27679)
18888 [[File:Contains & ampersand.jpg]]
18889 [[File:Does not exist.jpg|Title with & ampersand]]
18891 <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>
18892 <a href="/index.php?title=Special:Upload&wpDestFile=Does_not_exist.jpg" class="new" title="File:Does not exist.jpg">Title with & ampersand</a>
18895 <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>
18896 <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>
18900 Confirm that 'apos' named character reference doesn't make it to output (not legal in HTML 4)
18902 Text's been normalized?
18904 <p>Text's been normalized?
18909 Bug 19052 U+3000 IDEOGRAPHIC SPACE should terminate free external links
18911 http://www.example.org/ <-- U+3000 (vim: ^Vu3000)
18913 <p><a rel="nofollow" class="external free" href="http://www.example.org/">http://www.example.org/</a> <-- U+3000 (vim: ^Vu3000)
18918 Bug 19052 U+3000 IDEOGRAPHIC SPACE should terminate bracketed external links
18920 [http://www.example.org/ ideograms]
18922 <p><a rel="nofollow" class="external text" href="http://www.example.org/">ideograms</a>
18927 Bug 19052 U+3000 IDEOGRAPHIC SPACE should terminate external images links
18929 http://www.example.org/pic.png <-- U+3000 (vim: ^Vu3000)
18931 <p><img src="http://www.example.org/pic.png" alt="pic.png" /> <-- U+3000 (vim: ^Vu3000)
18955 Bug 31098 Template which includes system messages which includes the template
18959 <p><span class="error">Template loop detected: <a href="/wiki/Template:Identical" title="Template:Identical">Template:Identical</a></span>
18960 <span class="error">Template loop detected: <a href="/wiki/Template:Identical" title="Template:Identical">Template:Identical</a></span>
18965 Bug31490 Turkish: ucfirst 'blah'
18976 Bug31490 Turkish: ucfirst 'ix'
18987 Bug31490 Turkish: lcfirst 'BLAH'
18998 Bug31490 Turkish: ucfırst (with a dotless i)
19004 <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>
19009 Bug31490 ucfırst (with a dotless i) with English language
19015 <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>
19020 Bug 26375: TOC with italics
19022 title=[[Main Page]]
19025 == ''Lost'' episodes ==
19027 <div id="toc" class="toc"><div id="toctitle"><h2>Contents</h2></div>
19029 <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>
19033 <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>
19038 Bug 26375: TOC with bold
19040 title=[[Main Page]]
19043 == '''should be bold''' then normal text ==
19045 <div id="toc" class="toc"><div id="toctitle"><h2>Contents</h2></div>
19047 <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>
19051 <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>
19056 Bug 33845: Headings become cursive in TOC when they contain an image
19058 title=[[Main Page]]
19061 == Image [[Image:foobar.jpg]] ==
19063 <div id="toc" class="toc"><div id="toctitle"><h2>Contents</h2></div>
19065 <li class="toclevel-1 tocsection-1"><a href="#Image"><span class="tocnumber">1</span> <span class="toctext">Image</span></a></li>
19069 <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>
19074 Bug 33845 (2): Headings become bold in TOC when they contain a blockquote
19076 title=[[Main Page]]
19079 == <blockquote>Quote</blockquote> ==
19081 <div id="toc" class="toc"><div id="toctitle"><h2>Contents</h2></div>
19083 <li class="toclevel-1 tocsection-1"><a href="#Quote"><span class="tocnumber">1</span> <span class="toctext">Quote</span></a></li>
19087 <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>
19090 <div id="toc" class="toc">
19091 <div id="toctitle">
19095 <li class="toclevel-1 tocsection-1"><a href="#Quote"><span class="tocnumber">1</span> <span class="toctext">Quote</span></a></li>
19098 <h2><span class="mw-headline" id="Quote"></span></h2>
19100 <p><span class="mw-headline" id="Quote">Quote</span></p>
19102 <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>
19106 Unclosed tags in TOC
19108 title=[[Main Page]]
19112 <small>Hanc marginis exiguitas non caperet.</small>
19115 <div id="toc" class="toc"><div id="toctitle"><h2>Contents</h2></div>
19117 <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>
19121 <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>
19122 <p><small>Hanc marginis exiguitas non caperet.</small>
19128 Multiple tags in TOC
19131 == <i>Foo</i> <b>Bar</b> ==
19133 == <i>Foo</i> <blockquote>Bar</blockquote> ==
19135 <div id="toc" class="toc"><div id="toctitle"><h2>Contents</h2></div>
19137 <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>
19138 <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>
19142 <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>
19143 <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>
19146 <div id="toc" class="toc">
19147 <div id="toctitle">
19151 <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>
19152 <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>
19155 <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>
19156 <h2><span class="mw-headline" id="Foo_Bar_2"><i>Foo</i></span></h2>
19158 <p><span class="mw-headline" id="Foo_Bar_2">Bar</span></p>
19160 <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>
19164 Tags with parameters in TOC
19167 == <sup class="in-h2">Hello</sup> ==
19169 == <sup class="a > b">Evilbye</sup> ==
19171 <div id="toc" class="toc"><div id="toctitle"><h2>Contents</h2></div>
19173 <li class="toclevel-1 tocsection-1"><a href="#Hello"><span class="tocnumber">1</span> <span class="toctext"><sup>Hello</sup></span></a></li>
19174 <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>
19178 <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>
19179 <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>
19184 span tags with directionality in TOC
19187 == <span dir="ltr">C++</span> ==
19189 == <span dir="rtl">זבנג!</span> ==
19191 == <span style="font-style: italic">The attributes on these span tags must be deleted from the TOC</span> ==
19193 == <span style="font-style: italic" dir="ltr">All attributes on these span tags must be deleted from the TOC</span> ==
19195 == <span dir="ltr" style="font-style: italic">Attributes after dir on these span tags must be deleted from the TOC</span> ==
19197 <div id="toc" class="toc"><div id="toctitle"><h2>Contents</h2></div>
19199 <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>
19200 <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>
19201 <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>
19202 <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>
19203 <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>
19207 <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>
19208 <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>
19209 <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>
19210 <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>
19211 <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>
19216 Bug 72884: bdi element in ToC
19219 == <bdi>test</bdi> ==
19221 <div id="toc" class="toc"><div id="toctitle"><h2>Contents</h2></div>
19223 <li class="toclevel-1 tocsection-1"><a href="#test"><span class="tocnumber">1</span> <span class="toctext"><bdi>test</bdi></span></a></li>
19227 <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>
19234 == {{int:headline_sample}} ==
19238 Bug 32057: Title needed when expanding <h> nodes.
19240 title=[[Main Page]]
19244 <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>
19249 Strip marker in urlencode
19251 {{urlencode:x<nowiki/>y}}
19252 {{urlencode:x<nowiki/>y|wiki}}
19253 {{urlencode:x<nowiki/>y|path}}
19280 Strip marker in formatNum
19282 {{formatnum:1<nowiki/>2}}
19283 {{formatnum:1<nowiki/>2|R}}
19291 Check noCommafy in formatNum
19295 {{formatnum:123456.78}}
19296 {{formatnum:123456.78|NOSEP}}
19304 Wrong option for formatNum (bug 56199)
19306 {{formatnum:1,234.56|Random}}
19307 {{formatnum:1,234.56|EVERYTHING}}
19308 {{formatnum:1234.56|any argument that has the string 'NOSEP'}}
19317 Strip marker in grammar
19321 {{grammar:elative|foo<nowiki/>bar}}
19328 Strip marker in padleft
19330 {{padleft:|2|x<nowiki/>y}}
19337 Strip marker in padright
19339 {{padright:|2|x<nowiki/>y}}
19346 Strip marker in anchorencode
19348 {{anchorencode:x<nowiki/>y}}
19355 nowiki inside link inside heading (bug 18295)
19357 ==[[foo|x<nowiki>y</nowiki>z]]==
19359 <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>
19364 new support for bdi element (bug 31817)
19366 <p dir="rtl" lang="he">ולדימיר לנין (ברוסית: <bdi lang="ru">Владимир Ленин</bdi>, 24 באפריל 1870–22 בינואר 1924) הוא מנהיג פוליטי קומוניסטי רוסי.</p>
19368 <p dir="rtl" lang="he">ולדימיר לנין (ברוסית: <bdi lang="ru">Владимир Ленин</bdi>, 24 באפריל 1870–22 בינואר 1924) הוא מנהיג פוליטי קומוניסטי רוסי.</p>
19373 Ignore pipe between table row attributes
19377 |- id=foo | style='color: red'
19385 <tr id="foo" style="color: red">
19392 Gallery override link with WikiLink (bug 34852)
19395 File:foobar.jpg|caption|alt=galleryalt|link=InterWikiLink
19398 <ul class="gallery mw-gallery-traditional">
19399 <li class="gallerybox" style="width: 155px"><div style="width: 155px">
19400 <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>
19401 <div class="gallerytext">
19411 Gallery override link with absolute external link (bug 34852)
19414 File:foobar.jpg|caption|alt=galleryalt|link=http://www.example.org
19417 <ul class="gallery mw-gallery-traditional">
19418 <li class="gallerybox" style="width: 155px"><div style="width: 155px">
19419 <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>
19420 <div class="gallerytext">
19430 Gallery override link with malicious javascript (bug 34852)
19433 File:foobar.jpg|caption|alt=galleryalt|link=" onclick="alert('malicious javascript code!');
19436 <ul class="gallery mw-gallery-traditional">
19437 <li class="gallerybox" style="width: 155px"><div style="width: 155px">
19438 <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>
19439 <div class="gallerytext">
19449 Gallery with invalid title as link (bug 43964)
19452 File:foobar.jpg|link=<
19455 <ul class="gallery mw-gallery-traditional">
19456 <li class="gallerybox" style="width: 155px"><div style="width: 155px">
19457 <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>
19458 <div class="gallerytext">
19466 Language parser function
19475 Padleft and padright as substr
19477 {{padleft:|3|abcde}}
19478 {{padright:|3|abcde}}
19486 Special parser function
19488 {{#special:RandomPage}}
19489 {{#special:BaDtItLe}}
19490 {{#special:Foobar}}
19499 Bug 34939 - Case insensitive link parsing ([HttP://])
19501 [HttP://MediaWiki.Org/]
19503 <p><a rel="nofollow" class="external autonumber" href="HttP://MediaWiki.Org/">[1]</a>
19506 <p><a rel="mw:ExtLink" href="HttP://MediaWiki.Org/"></a></p>
19510 Bug 34939 - Case insensitive link parsing ([HttP:// title])
19512 [HttP://MediaWiki.Org/ MediaWiki]
19514 <p><a rel="nofollow" class="external text" href="HttP://MediaWiki.Org/">MediaWiki</a>
19519 Bug 34939 - Case insensitive link parsing (HttP://)
19521 HttP://MediaWiki.Org/
19523 <p><a rel="nofollow" class="external free" href="HttP://MediaWiki.Org/">HttP://MediaWiki.Org/</a>
19526 <p><a rel="mw:ExtLink" href="HttP://MediaWiki.Org/">HttP://MediaWiki.Org/</a></p>
19544 <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>
19545 <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>
19546 <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>
19547 <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>
19548 <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>
19554 ### Parsoid-specific tests
19555 ### Parsoid-PHP parser incompatibilities
19558 1. SOL-sensitive wikitext tokens as template-args
19560 parsoid=wt2html,wt2wt
19566 <span about="#mwt1" typeof="mw:Transclusion">
19567 </span><ul about="#mwt1"><li>a</li>
19569 <span about="#mwt2" typeof="mw:Transclusion">
19570 </span><ol about="#mwt2"><li>a</li>
19572 <span about="#mwt3" typeof="mw:Transclusion">
19573 </span><dl about="#mwt3"><dd>a</dd>
19577 #### -----------------------------------------------------------------
19578 #### Parsoid-specific functionality tests
19579 #### -----------------------------------------------------------------
19581 # Bug 63642/66749: Formatting elt fixup around images is cleaned up.
19582 # We know wt2wt will fail, but we expect selser to pass.
19583 # Due to the nature of our testing, wt2wt and selser tests will enter the
19584 # blacklist and we'll catch selser regressions based on changes to the
19585 # blacklist entries for selser tests.
19587 1. Bad treebuilder fixup of formatting elt is cleaned up
19589 parsoid=wt2html,wt2wt
19594 [[Image:Foobar.jpg|right|Test]]
19601 <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>
19608 2. Bad treebuilder fixup of formatting elt is cleaned up
19610 parsoid=wt2html,wt2wt
19612 '''foo[[File:Foobar.jpg|thumb|caption]]bar'''
19614 <small>[[Image:Foobar.jpg|right|300px]]</small>
19617 <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>
19619 <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>
19622 #### ----------------------------------------------------------------
19623 #### Parsoid-only testing of Parsoid's impl of <ref> and <references>
19624 #### tags. Parsoid's output for these tags differs from that of the
19626 #### ----------------------------------------------------------------
19629 Ref: 1. ref-location should be replaced with an index span
19634 B <ref name="x">foo</ref>
19637 <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>
19638 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>
19639 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>
19643 Ref: 2. ref-tags with identical names should all get the same index
19647 A <ref name="x">foo</ref>
19650 <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>
19651 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>
19655 Ref: 3. spaces in ref-names should be ignored
19659 A <ref name="x">foo</ref>
19660 B <ref name=" x " />
19663 <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>
19664 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>
19665 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>
19668 # NOTE: constructor is a predefined property in JS and constructor as a ref-name can clash with it if not handled properly)
19670 Ref: 4. 'constructor' should be accepted as a valid ref-name
19674 A <ref name="constructor">foo</ref>
19676 <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>
19680 Ref: 5. body should accept generic wikitext
19685 This is a '''[[bolded link]]''' and this is a {{echo|transclusion}}
19690 <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>
19692 <ol class="references" typeof="mw:Extension/references" about="#mwt5" data-mw='{"name":"references","attrs":{}}'>
19693 <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>
19699 Ref: 6. indent-pres should not be output in ref-body
19711 <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>
19713 <ol class="references" typeof="mw:Extension/references" about="#mwt4" data-mw='{"name":"references","attrs":{}}'>
19714 <li about="#cite_note-1" id="cite_note-1"><span rel="mw:referencedBy"><a href="#cite_ref-1">↑</a></span> foo
19722 Ref: 7. No p-wrapping in ref-body
19741 <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>
19743 <ol class="references" typeof="mw:Extension/references" about="#mwt4" data-mw='{"name":"references","attrs":{}}'>
19744 <li about="#cite_note-1" id="cite_note-1"><span rel="mw:referencedBy"><a href="#cite_ref-1">↑</a></span> foo
19759 Ref: 8. transclusion wikitext has lower precedence
19763 A <ref> foo {{echo|</ref> B C}}
19767 <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>
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 <span typeof="mw:Nowiki">{{</span>echo|</li>
19774 Ref: 9. unclosed comments should not leak out of ref-body
19778 A <ref> foo <!--</ref> B C
19781 <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>
19782 <ol class="references" typeof="mw:Extension/references" about="#mwt4" data-mw='{"name":"references","attrs":{}}'>
19783 <li about="#cite_note-1" id="cite_note-1"><span rel="mw:referencedBy"><a href="#cite_ref-1">↑</a></span> foo <!----></li>
19788 Ref: 10. Unclosed HTML tags should not leak out of ref-body
19792 A <ref> <b> foo </ref> B C
19796 <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>
19799 <ol class="references" typeof="mw:Extension/references" about="#mwt4" data-mw='{"name":"references","attrs":{}}'>
19800 <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>
19805 Ref: 11. ref-tags acts like an inline element wrt P-wrapping
19812 <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
19813 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>
19817 Ref: 12. ref-tags act as trailing newline migration barrier
19821 <!--the newline at the end of this line moves out of the p-tag-->a
19823 b<!--the newline at the end of this line stays inside the p-tag--> <ref />
19828 <p><!--the newline at the end of this line moves out of the p-tag-->a</p>
19831 <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>
19832 <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>
19838 Ref: 13. ref-tags are not SOL-transparent and block indent-pres
19846 <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
19847 <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>
19851 Ref: 14. A nested ref-tag should be emitted as plain text
19855 <ref>foo <ref>bar</ref> baz</ref>
19859 <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>
19861 <ol class="references" typeof="mw:Extension/references" about="#mwt5" data-mw='{"name":"references","attrs":{}}'>
19862 <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>
19867 Ref: 15. ref-tags with identical names should get identical indexes
19871 A1 <ref name="a">foo</ref> A2 <ref name="a" />
19872 B1 <ref name="b" /> B2 <ref name="b">bar</ref>
19876 <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>
19877 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>
19879 <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>
19883 ## We don't bother wt2wt-ing non-standard whitespace
19885 Ref: 16. Tokenizer should accept non-standard whitespace in <ref> and </ref> tags
19893 <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>
19895 <ol class="references" typeof="mw:Extension/references" about="#mwt4" data-mw='{"name":"references","attrs":{}}'>
19896 <li about="#cite_note-1" id="cite_note-1"><span rel="mw:referencedBy"><a href="#cite_ref-1">↑</a></span> foo</li></ol>
19900 Ref: 17. Generate valid HTML5 id/about attributes
19904 <ref name="a b">foo</ref>
19908 <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>
19911 <ol class="references" typeof="mw:Extension/references" data-mw='{"name":"references","attrs":{}}'>
19912 <li id="cite_note-a_b-1"><span rel="mw:referencedBy"><a href="#cite_ref-a_b_1-0">↑</a></span> foo</li>
19916 Ref: 18. T58916: Extension attributes should be parsed as plain text
19920 <ref name="{{echo|a}}">foo</ref>
19924 <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>
19927 <ol class="references" typeof="mw:Extension/references" data-mw='{"name":"references","attrs":{}}'>
19928 <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>
19932 Ref: 19. ref-tags with identical name encodings should get identical indexes
19936 1 <ref name="a & b">foo</ref> 2 <ref name="a & b" />
19940 <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>
19942 <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>
19947 References: 1. references tag without any refs should be handled properly
19953 <ol about="#mwt2" class="references" typeof="mw:Extension/references" data-mw='{"name":"references","attrs":{}}'></ol>
19957 References: 2. references tag with group only outputs references from that group
19961 A <ref group="a">foo</ref>
19962 B <ref group="b">bar</ref>
19964 <references group="a" />
19966 <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>
19967 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>
19969 <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>
19974 References: 3. ref list should be cleared after processing references
19986 <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>
19988 <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>
19991 <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>
19993 <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>
19998 References: 4. only referenced group should be cleared after processing references
20002 A <ref group="a">afoo</ref>
20005 <references group="a" />
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":"afoo"},"attrs":{"group":"a"}}'><a href="#cite_note-1">[a 1]</a></span>
20012 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>
20014 <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>
20017 <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>
20019 <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>
20024 References: 5. ref tags in references should be processed while ignoring all other content
20029 B <ref name="b">bar</ref>
20032 <ref name="a">foo</ref>
20033 This should just get lost.
20036 <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>
20037 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>
20040 <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>
20045 References: 6. <references /> from a transclusion
20049 <ref>Foo</ref> {{echo|<references />}}
20051 <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>
20055 References: 7. Multiple references tags (one without and one with nested refs) should be correctly handled
20059 A <ref>foo bar for a</ref>
20060 B <ref group="X" name="b" />
20064 <references group="X">
20065 <ref name="b">foo</ref>
20068 <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>
20069 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>
20071 <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>
20073 <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>
20077 Entities in ref name
20081 <ref name="test & me">hi</ref>
20083 <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>
20086 # This test is wt2html only because we're permitting the serializer to produce
20087 # dirty diffs, normalizing the unclosed references to the self-closed version.
20089 Generate references for unclosed references tag
20097 <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>
20100 <ol class="references" typeof="mw:Extension/references" about="#mwt4" data-mw='{"name":"references","attrs":{}}'>
20101 <li about="#cite_note-1" id="cite_note-1"><span rel="mw:referencedBy"><a href="#cite_ref-1">↑</a></span> foo</li></ol>
20105 New reference serializes on its own line
20107 parsoid=wt2wt,html2wt
20112 foo<ol class="references" typeof="mw:Extension/references" about="#mwt2" data-mw='{"name":"references","attrs":{}}'></ol>
20115 #--------- Test stripping of empty nodes in template content ----------
20117 Empty LI and TR nodes should be stripped from template content
20122 <ul typeof="mw:Transclusion" data-mw='{"parts":[{"template":{"target":{"wt":"EmptyLITest","href":"./Template:EmptyLITest"},"params":{},"i":0}}]}'>
20126 <table typeof="mw:Transclusion" data-mw='{"parts":[{"template":{"target":{"wt":"EmptyTRTest","href":"./Template:EmptyTRTest"},"params":{},"i":0}}]}'>
20139 Empty LI and TR nodes should not be stripped from top-level content
20166 Empty TR nodes should not be stripped if they have any attributes set
20168 {{EmptyTRWithHTMLAttrTest}}
20170 <table typeof="mw:Transclusion" data-mw='{"parts":[{"template":{"target":{"wt":"EmptyTRWithHTMLAttrTest","href":"./Template:EmptyTRWithHTMLAttrTest"},"params":{},"i":0}}]}'>
20171 <tr align="center"></tr>
20172 <tr><td>foo</td></tr>
20173 <tr align="center"></tr>
20174 <tr><td>bar</td></tr>
20178 #### ----------------------------------------------------------------
20179 #### The following section of tests are primarily to test
20180 #### wikitext escaping capabilities of Parsoid. Given that
20181 #### escaping can be done any number of ways, the wikitext (input)
20182 #### is always adjusted to reflect how Parsoid adds nowiki
20185 #### We are marking several tests as parsoid-only since the
20186 #### HTML in the result section is different from what the
20187 #### PHP parser generates for it.
20188 #### ----------------------------------------------------------------
20191 #### --------------- Headings ---------------
20193 #### 1. Nested inside html <h1>=foo=</h1>
20194 #### 2. Outside heading nest on a single line <h1>foo</h1>*bar
20195 #### 3. Nested inside html with wikitext split by html tags
20196 #### 4. No escape needed
20197 #### 5. Empty headings <h1></h1>
20198 #### 6. Heading chars in SOL context
20199 #### ----------------------------------------
20201 Headings: 0. Unnested
20205 <nowiki>=foo=</nowiki>
20207 <nowiki> =foo= </nowiki>
20209 <nowiki>=foo=</nowiki>
20211 =foo''a''<nowiki>=</nowiki>
20213 <p><span typeof="mw:Nowiki">=foo=</span></p>
20215 <p><span typeof="mw:Nowiki"> =foo= </span>
20217 <span typeof="mw:Nowiki">=foo=</span></p>
20219 <p>=foo<i>a</i><span typeof="mw:Nowiki">=</span></p>
20222 # New headings and existing headings are handled differently
20224 Headings: 1. Nested inside html
20232 <h1 data-parsoid=''>=foo=</h1>
20233 <h2 data-parsoid=''>=foo=</h2>
20234 <h3 data-parsoid=''>=foo=</h3>
20235 <h4 data-parsoid=''>=foo=</h4>
20236 <h5 data-parsoid=''>=foo=</h5>
20237 <h6 data-parsoid=''>=foo=</h6>
20245 =<nowiki>=foo=</nowiki>=
20246 ==<nowiki>=foo=</nowiki>==
20247 ===<nowiki>=foo=</nowiki>===
20248 ====<nowiki>=foo=</nowiki>====
20249 =====<nowiki>=foo=</nowiki>=====
20250 ======<nowiki>=foo=</nowiki>======
20255 Headings: 2. Outside heading nest on a single line <h1>foo</h1>*bar
20264 <nowiki>*</nowiki>bar
20270 <nowiki>=bar=</nowiki>
20274 Headings: 3. Nested inside html with wikitext split by html tags
20276 parsoid=html2wt,wt2wt
20278 = ='''bold'''<nowiki>foo=</nowiki> =
20280 <h1>=<b>bold</b>foo=</h1>
20284 Headings: 4a. No escaping needed (testing just h1 and h2)
20309 <h1><i>=</i>foo=</h1>
20313 Headings: 4b. No escaping needed (inside p-tags)
20328 Headings: 5. Empty headings
20340 =====<nowiki/>=====
20342 ======<nowiki/>======
20353 Headings: 6a. Heading chars in SOL context (with trailing spaces)
20357 <nowiki>=a=</nowiki>
20359 <nowiki>=a=</nowiki>
20361 <nowiki>=a=</nowiki>
20363 <nowiki>=a=</nowiki>
20372 Headings: 6b. Heading chars in SOL context (with trailing newlines)
20400 Headings: 6c. Heading chars in SOL context (leading newline break)
20405 <nowiki>=b=</nowiki>
20412 Headings: 6d. Heading chars in SOL context (with interspersed comments)
20416 <!--c0--><nowiki>=a=</nowiki>
20418 <!--c1--><nowiki>=a=</nowiki> <!--c2--> <!--c3-->
20420 <p><!--c0-->=a=</p>
20421 <p><!--c1-->=a= <!--c2--> <!--c3--></p>
20425 Headings: 6d. Heading chars in SOL context (No escaping needed)
20435 Headings: 7. Insert a newline between new content and headings
20441 <h2 data-parsoid='{"dsr":[0,5,2,2]}'>A</h2>
20442 <p data-parsoid='{"dsr":[6,7,0,0]}'>a</p>
20452 #### --------------- Lists ---------------
20453 #### 0. Outside nests (*foo, etc.)
20454 #### 1. Nested inside html <ul><li>*foo</li></ul>
20455 #### 2. Inside definition lists
20456 #### 3. Only bullets at start should be escaped
20457 #### 4. No escapes needed
20458 #### 5. No unnecessary escapes
20459 #### 6. Escape bullets in SOL position
20460 #### 7. Escape bullets in a multi-line context
20461 #### ----------------------------------------
20464 Lists: 0. Outside nests
20466 <nowiki>*</nowiki>foo
20468 <nowiki>#</nowiki>foo
20470 <nowiki>;Foo:</nowiki>bar
20479 Lists: 1. Nested inside html
20481 *<nowiki>*foo</nowiki>
20483 *<nowiki>#foo</nowiki>
20485 *<nowiki>:foo</nowiki>
20487 *<nowiki>;foo</nowiki>
20489 #<nowiki>*foo</nowiki>
20491 #<nowiki>#foo</nowiki>
20493 #<nowiki>:foo</nowiki>
20495 #<nowiki>;foo</nowiki>
20497 <ul><li>*foo</li></ul>
20498 <ul><li>#foo</li></ul>
20499 <ul><li>:foo</li></ul>
20500 <ul><li>;foo</li></ul>
20501 <ol><li>*foo</li></ol>
20502 <ol><li>#foo</li></ol>
20503 <ol><li>:foo</li></ol>
20504 <ol><li>;foo</li></ol>
20509 Lists: 2. Inside definition lists
20511 ;<nowiki>;foo</nowiki>
20513 ;<nowiki>:foo</nowiki>
20515 ;<nowiki>:foo</nowiki>
20518 :<nowiki>:foo</nowiki>
20520 <dl><dt>;foo</dt></dl>
20521 <dl><dt>:foo</dt></dl>
20524 <dl><dd>:foo</dd></dl>
20529 Lists: 3. Only bullets at start of text should be escaped
20531 *<nowiki>*foo*bar</nowiki>
20533 *<nowiki>*foo</nowiki>''it''*bar
20535 <ul><li>*foo*bar</li></ul>
20536 <ul><li>*foo<i>it</i>*bar</li></ul>
20541 Lists: 4. No escapes needed
20562 <li><a rel="mw:WikiLink" href="Foo" title="Foo">Foo</a>: bar
20566 <li><a rel="mw:WikiLink" href="Foo" title="Foo">Foo</a>*bar
20572 Lists: 5. No unnecessary escapes
20574 * bar <span><nowiki>[[foo]]</nowiki></span>
20576 * =bar <span><nowiki>[[foo]]</nowiki></span>
20578 * [[bar <span><nowiki>[[foo]]</nowiki></span>
20580 * ]]bar <span><nowiki>[[foo]]</nowiki></span>
20582 * =bar <span>foo]]</span>=
20588 <ul><li> bar <span>[[foo]]</span></li></ul>
20589 <ul><li> =bar <span>[[foo]]</span></li></ul>
20590 <ul><li> [[bar <span>[[foo]]</span></li></ul>
20591 <ul><li> ]]bar <span>[[foo]]</span></li></ul>
20592 <ul><li> =bar <span>foo]]</span>=</li></ul>
20593 <ul><li> <s></s>: a</li></ul>
20594 <ul><li> <i>* foo</i></li></ul>
20599 Lists: 6. Escape bullets in SOL position
20603 <p><!--cmt-->*foo</p>
20605 <!--cmt--><nowiki>*</nowiki>foo
20609 Lists: 7. Escape bullets in a multi-line context
20612 <nowiki>*</nowiki>b
20620 Lists: 8. Escape colons only if not present in tags
20624 <dl><dt>a:b<i>c:d</i></dt></dl>
20626 ; <nowiki>a:b</nowiki>''c:d''
20629 #### --------------- HRs ---------------
20630 #### 1. Single line
20631 #### -----------------------------------
20634 HRs: 1. Single line
20636 ----<nowiki>----</nowiki>
20648 #### --------------- Tables ---------------
20649 #### 1a. Simple example
20650 #### 1b. No escaping needed (!foo)
20651 #### 1c. No escaping needed (|foo)
20652 #### 1d. No escaping needed (|}foo)
20654 #### 2a. Nested in td (<td>foo|bar</td>)
20655 #### 2b. Nested in td (<td>foo||bar</td>)
20656 #### 2c. Nested in td -- no escaping needed(<td>foo!!bar</td>)
20658 #### 3a. Nested in th (<th>foo!bar</th>)
20659 #### 3b. Nested in th (<th>foo!!bar</th>)
20660 #### 3c. Nested in th -- no escaping needed(<th>foo||bar</th>)
20664 #### 4c. No escaping needed
20665 #### --------------------------------------
20668 Tables: 1a. Simple example
20679 Tables: 1b. No escaping needed
20688 Tables: 1c. No escaping needed
20697 Tables: 1d. No escaping needed
20706 Tables: 2a. Nested in td
20711 <td>foo|bar</td></tr>
20712 <tr><td>x<div>a|b</div></td>
20716 |<nowiki>foo|bar</nowiki>
20718 |x<div><nowiki>a|b</nowiki></div>
20734 Tables: 2b. Nested in td
20740 <td>a<i>b||c</i></td>
20741 <td>a<i><div>b||c</div></i></td>
20742 </tr></tbody></table>
20745 |<nowiki>foo||bar</nowiki>
20746 |a''<nowiki>b||c</nowiki>''
20747 |a''<div><nowiki>b||c</nowiki></div>''
20756 <td>a<i><div>b||c</div></i>
20762 Tables: 2c. Nested in td -- no escaping needed
20778 Tables: 3a. Nested in th
20794 Tables: 3b. Nested in th
20799 <tr><th>foo!!bar</th>
20800 <th><i>foo|bar</i></th>
20801 <th><i>foo!!bar</i></th>
20802 <th><i><span>foo!!bar</span></i></th>
20803 </tr></tbody></table>
20806 !<nowiki>foo!!bar</nowiki>
20807 !''<nowiki>foo|bar</nowiki>''
20808 !''<nowiki>foo!!bar</nowiki>''
20809 !''<span><nowiki>foo!!bar</nowiki></span>''
20818 <th><i>foo!!bar</i>
20820 <th><i><span>foo!!bar</span></i>
20826 Tables: 3c. Nested in th
20831 <tr><th>foo||bar</th>
20832 <th><span typeof="mw:Nowiki">foo||bar</span></th>
20833 </tr></tbody></table>
20836 !<nowiki>foo||bar</nowiki>
20837 !<nowiki>foo||bar</nowiki>
20850 Tables: 4a. Escape -
20869 |<nowiki>-bar</nowiki>
20874 Tables: 4b. Escape +
20893 |<nowiki>+bar</nowiki>
20898 Tables: 4c. No escaping needed
20941 <tr><td>foo-bar</td><td>foo+bar</td></tr>
20942 <tr><td><i>foo</i>-bar</td><td><i>foo</i>+bar</td></tr>
20948 <div>a|b</div></td>
20953 Tables: 4d. No escaping needed
20963 <td><a href="/wiki/Foo" title="Foo">Foo</a>-bar
20972 <tbody><tr><td><a rel="mw:WikiLink" href="./Foo" title="Foo">Foo</a>-bar</td>
20973 <td data-parsoid='{"startTagSrc":"|","attrSepSrc":"|"}'>+1</td>
20974 <td data-parsoid='{"startTagSrc":"|","attrSepSrc":"|"}'>-2</td></tr>
20979 Tables: Digest broken attributes on table and tr tag
20995 #### --------------- Links ----------------
20996 #### 1. Quote marks in link text
20997 #### 2. Wikilinks: Escapes needed
20998 #### 3. Wikilinks: No escapes needed
20999 #### 4. Extlinks: Escapes needed
21000 #### 5. Extlinks: No escapes needed
21001 #### --------------------------------------
21003 Links 1. WikiLinks: No escapes needed
21007 [[Foo|x [Foobar] x]]
21009 <p><a href="/wiki/Foo" title="Foo">Foo<i>boo</i></a>
21010 <a href="/wiki/Foo" title="Foo">[Foobar]</a>
21011 <a href="/wiki/Foo" title="Foo">x [Foobar] x</a>
21014 <p><a rel="mw:WikiLink" href="Foo" title="Foo">Foo<i>boo</i></a>
21015 <a rel="mw:WikiLink" href="Foo" title="Foo">[Foobar]</a>
21016 <a rel="mw:WikiLink" href="Foo" title="Foo">x [Foobar] x</a></p>
21020 Links 2. WikiLinks: Escapes needed
21024 <a href="Foo" rel="mw:WikiLink">Foobar]</a>
21025 <a href="Foo" rel="mw:WikiLink">x [http://google.com g] x</a>
21026 <a href="Foo" rel="mw:WikiLink">[[Bar]]</a>
21027 <a href="Foo" rel="mw:WikiLink">x [[Bar]] x</a>
21028 <a href="Foo" rel="mw:WikiLink">|Bar</a>
21029 <a href="Foo" rel="mw:WikiLink">]]bar</a>
21030 <a href="Foo" rel="mw:WikiLink">[[bar</a>
21031 <a href="Foo" rel="mw:WikiLink">x [[ y</a>
21032 <a href="Foo" rel="mw:WikiLink">x ]] y</a>
21033 <a href="Foo" rel="mw:WikiLink">x ]] y [[ z</a>
21035 [[Foo|<nowiki>Foobar]</nowiki>]]
21036 [[Foo|x <nowiki>[http://google.com g]</nowiki> x]]
21037 [[Foo|<nowiki>[[Bar]]</nowiki>]]
21038 [[Foo|<nowiki>x [[Bar]] x</nowiki>]]
21039 [[Foo|<nowiki>|Bar</nowiki>]]
21040 [[Foo|<nowiki>]]bar</nowiki>]]
21041 [[Foo|<nowiki>[[bar</nowiki>]]
21042 [[Foo|<nowiki>x [[ y</nowiki>]]
21043 [[Foo|<nowiki>x ]] y</nowiki>]]
21044 [[Foo|<nowiki>x ]] y [[ z</nowiki>]]
21046 <p><a href="/wiki/Foo" title="Foo">Foobar]</a>
21047 <a href="/wiki/Foo" title="Foo">x [http://google.com g] x</a>
21048 <a href="/wiki/Foo" title="Foo">[[Bar]]</a>
21049 <a href="/wiki/Foo" title="Foo">x [[Bar]] x</a>
21050 <a href="/wiki/Foo" title="Foo">|Bar</a>
21051 <a href="/wiki/Foo" title="Foo">]]bar</a>
21052 <a href="/wiki/Foo" title="Foo">[[bar</a>
21053 <a href="/wiki/Foo" title="Foo">x [[ y</a>
21054 <a href="/wiki/Foo" title="Foo">x ]] y</a>
21055 <a href="/wiki/Foo" title="Foo">x ]] y [[ z</a>
21060 Links 3. WikiLinks: No escapes needed
21065 <p><a href="/wiki/Foo" title="Foo">[Foobar</a>
21066 <a href="/wiki/Foo" title="Foo">foo|bar</a>
21069 <p><a rel="mw:WikiLink" href="Foo">[Foobar</a>
21070 <a rel="mw:WikiLink" href="Foo" title="Foo">foo|bar</a></p>
21074 Links 4. ExtLinks: Escapes needed
21078 <p><a rel="mw:ExtLink" href="http://google.com">[google]</a>
21079 <a rel="mw:ExtLink" href="http://google.com">google]</a></p>
21080 <p>[http://google.com]</p>
21081 <p>[http://google.com google]</p>
21083 [http://google.com <nowiki>[google]</nowiki>]
21084 [http://google.com <nowiki>google]</nowiki>]
21086 <nowiki>[http://google.com]</nowiki>
21088 <nowiki>[http://google.com google]</nowiki>
21091 <p><a rel="nofollow" class="external text" href="http://google.com">[google]</a>
21092 <a rel="nofollow" class="external text" href="http://google.com">google]</a>
21093 </p><p>[http://google.com]
21094 </p><p>[http://google.com google]
21099 Links 5. ExtLinks: No escapes needed
21101 [http://google.com [google]
21103 <p><a rel="nofollow" class="external text" href="http://google.com">[google</a>
21106 <p><a rel="mw:ExtLink" href="http://google.com">[google</a></p>
21110 Links 6. Add <nowiki/>s between text-nodes and url-links when required (bug 64300)
21112 <p>x<a rel="mw:ExtLink" href="http://example.com" data-parsoid='{"stx":"url"}'>http://example.com</a>y
21113 <a rel="mw:ExtLink" href="http://example.com" data-parsoid='{"stx":"url"}'>http://example.com</a>?x
21114 <a rel="mw:ExtLink" href="http://example.com" data-parsoid='{"stx":"url"}'>http://example.com</a>&x
21115 <a rel="mw:ExtLink" href="http://example.com" data-parsoid='{"stx":"url"}'>http://example.com</a>'x
21116 <a rel="mw:ExtLink" href="http://example.com" data-parsoid='{"stx":"url"}'>http://example.com</a>,x
21117 <a rel="mw:ExtLink" href="http://example.com" data-parsoid='{"stx":"url"}'>http://example.com</a>.x
21118 <a rel="mw:ExtLink" href="http://example.com" data-parsoid='{"stx":"url"}'>http://example.com</a>;x
21119 <a rel="mw:ExtLink" href="http://example.com" data-parsoid='{"stx":"url"}'>http://example.com</a>:x
21120 <a rel="mw:ExtLink" href="http://example.com" data-parsoid='{"stx":"url"}'>http://example.com</a>;x
21121 <a rel="mw:ExtLink" href="http://example.com" data-parsoid='{"stx":"url"}'>http://example.com</a>!x
21122 <a rel="mw:ExtLink" href="http://example.com" data-parsoid='{"stx":"url"}'>http://example.com</a>=x
21123 <a rel="mw:ExtLink" href="http://example.com" data-parsoid='{"stx":"url"}'>http://example.com</a>(x)
21124 <a rel="mw:ExtLink" href="http://example.com(x" data-parsoid='{"stx":"url"}'>http://example.com(x</a>)
21127 x<nowiki/>http://example.com<nowiki/>y
21128 http://example.com<nowiki/>?x
21129 http://example.com<nowiki/>&x
21130 http://example.com<nowiki/>'x
21131 http://example.com<nowiki/>,x
21132 http://example.com<nowiki/>.x
21133 http://example.com<nowiki/>;x
21134 http://example.com<nowiki/>:x
21135 http://example.com<nowiki/>;x
21136 http://example.com<nowiki/>!x
21137 http://example.com<nowiki/>=x
21138 http://example.com<nowiki/>(x)
21139 http://example.com(x<nowiki/>)
21143 Links 7a. Don't add spurious <nowiki/>s between text-nodes and url-links (bug 64300)
21146 <a rel="mw:ExtLink" href="http://example.com" data-parsoid='{"stx":"url"}'>http://example.com</a>
21148 "<a rel="mw:ExtLink" href="http://example.com" data-parsoid='{"stx":"url"}'>http://example.com</a>"
21149 (<a rel="mw:ExtLink" href="http://example.com" data-parsoid='{"stx":"url"}'>http://example.com</a>)
21150 (<a rel="mw:ExtLink" href="http://example.com" data-parsoid='{"stx":"url"}'>http://example.com</a>) foo
21151 <a rel="mw:ExtLink" href="http://example.com" data-parsoid='{"stx":"url"}'>http://example.com</a>,
21152 <a rel="mw:ExtLink" href="http://example.com" data-parsoid='{"stx":"url"}'>http://example.com</a>, foo
21158 "http://example.com"
21159 (http://example.com)
21160 (http://example.com) foo
21161 http://example.com,
21162 http://example.com, foo
21165 <a rel="nofollow" class="external free" href="http://example.com">http://example.com</a>
21167 "<a rel="nofollow" class="external free" href="http://example.com">http://example.com</a>"
21168 (<a rel="nofollow" class="external free" href="http://example.com">http://example.com</a>)
21169 (<a rel="nofollow" class="external free" href="http://example.com">http://example.com</a>) foo
21170 <a rel="nofollow" class="external free" href="http://example.com">http://example.com</a>,
21171 <a rel="nofollow" class="external free" href="http://example.com">http://example.com</a>, foo
21176 Links 7b. Don't add spurious <nowiki/>s between text-nodes and url-links (bug 64300)
21178 <p><a rel="mw:ExtLink" href="http://example.com" data-parsoid='{"stx":"url"}'>http://example.com</a>.,;:!?\
21179 -<a rel="mw:ExtLink" href="http://example.com">http://example.com</a>:</p>
21181 http://example.com.,;:!?\
21182 -http://example.com:
21184 <p><a rel="nofollow" class="external free" href="http://example.com">http://example.com</a>.,;:!?\
21185 -<a rel="nofollow" class="external free" href="http://example.com">http://example.com</a>:
21190 Links 8. Add <nowiki/>s between text-nodes and RFC-links when required (bug 64300)
21192 <p><a href="//tools.ietf.org/html/rfc123" rel="mw:ExtLink" data-parsoid='{"stx":"magiclink"}'>RFC 123</a>4
21193 <a href="//tools.ietf.org/html/rfc123" rel="mw:ExtLink" data-parsoid='{"stx":"magiclink"}'>RFC 123</a>y
21194 X<a href="//tools.ietf.org/html/rfc123" rel="mw:ExtLink" data-parsoid='{"stx":"magiclink"}'>RFC 123</a>y</p>
21198 X<nowiki/>RFC 123<nowiki/>y
21202 Links 9. Don't add spurious <nowiki/>s between text-nodes and RFC-links (bug 64300)
21204 <p><a href="//tools.ietf.org/html/rfc123" rel="mw:ExtLink" data-parsoid='{"stx":"magiclink"}'>RFC 123</a>?foo
21205 <a href="//tools.ietf.org/html/rfc123" rel="mw:ExtLink" data-parsoid='{"stx":"magiclink"}'>RFC 123</a>&foo
21206 -<a href="//tools.ietf.org/html/rfc123" rel="mw:ExtLink" data-parsoid='{"stx":"magiclink"}'>RFC 123</a>-
21213 <p><a class="external mw-magiclink-rfc" rel="nofollow" href="//tools.ietf.org/html/rfc123">RFC 123</a>?foo
21214 <a class="external mw-magiclink-rfc" rel="nofollow" href="//tools.ietf.org/html/rfc123">RFC 123</a>&foo
21215 -<a class="external mw-magiclink-rfc" rel="nofollow" href="//tools.ietf.org/html/rfc123">RFC 123</a>-
21220 Links 10. Add <nowiki/>s between text-nodes and PMID-links when required (bug 64300)
21222 <p><a href="//www.ncbi.nlm.nih.gov/pubmed/123?dopt=Abstract" rel="mw:ExtLink" data-parsoid='{"stx":"magiclink"}'>PMID 123</a>4
21223 <a href="//www.ncbi.nlm.nih.gov/pubmed/123?dopt=Abstract" rel="mw:ExtLink" data-parsoid='{"stx":"magiclink"}'>PMID 123</a>y
21224 X<a href="//www.ncbi.nlm.nih.gov/pubmed/123?dopt=Abstract" rel="mw:ExtLink" data-parsoid='{"stx":"magiclink"}'>PMID 123</a>y
21228 X<nowiki/>PMID 123<nowiki/>y
21232 Links 11. Don't add spurious <nowiki/>s between text-nodes and PMID-links (bug 64300)
21234 <p><a href="//www.ncbi.nlm.nih.gov/pubmed/123?dopt=Abstract" rel="mw:ExtLink" data-parsoid='{"stx":"magiclink"}'>PMID 123</a>?foo
21235 <a href="//www.ncbi.nlm.nih.gov/pubmed/123?dopt=Abstract" rel="mw:ExtLink" data-parsoid='{"stx":"magiclink"}'>PMID 123</a>&foo
21236 -<a href="//www.ncbi.nlm.nih.gov/pubmed/123?dopt=Abstract" rel="mw:ExtLink" data-parsoid='{"stx":"magiclink"}'>PMID 123</a>-
21243 <p><a class="external mw-magiclink-pmid" rel="nofollow" href="//www.ncbi.nlm.nih.gov/pubmed/123?dopt=Abstract">PMID 123</a>?foo
21244 <a class="external mw-magiclink-pmid" rel="nofollow" href="//www.ncbi.nlm.nih.gov/pubmed/123?dopt=Abstract">PMID 123</a>&foo
21245 -<a class="external mw-magiclink-pmid" rel="nofollow" href="//www.ncbi.nlm.nih.gov/pubmed/123?dopt=Abstract">PMID 123</a>-
21250 Links 12. Add <nowiki/>s between text-nodes and ISBN-links when required (bug 64300)
21252 <p><a href="./Special:BookSources/1234567890" rel="mw:ExtLink" data-parsoid='{"stx":"magiclink"}'>ISBN 1234567890</a>1
21253 <a href="./Special:BookSources/1234567890" rel="mw:ExtLink" data-parsoid='{"stx":"magiclink"}'>ISBN 1234567890</a>x
21254 a<a href="./Special:BookSources/1234567890" rel="mw:ExtLink" data-parsoid='{"stx":"magiclink"}'>ISBN 1234567890</a>b
21257 ISBN 1234567890<nowiki/>1
21258 ISBN 1234567890<nowiki/>x
21259 a<nowiki/>ISBN 1234567890<nowiki/>b
21263 Links 13. Don't add spurious <nowiki/>s between text-nodes and ISBN-links (bug 64300)
21265 <p>-<a href="./Special:BookSources/1234567890" rel="mw:ExtLink" data-parsoid='{"stx":"magiclink"}'>ISBN 1234567890</a>'s
21269 <p>-<a href="/wiki/Special:BookSources/1234567890" class="internal mw-magiclink-isbn">ISBN 1234567890</a>'s
21274 Links 14. Protect link-like plain text. (Parsoid bug T78425)
21278 <p>this is not a link: http://example.com
21281 this is not a link: <nowiki>http://example.com</nowiki>
21285 Links 15. Link trails can't become link prefixes.
21289 [[Söfnuður]]-[[00]]
21291 <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>
21294 <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>
21297 #### --------------- Quotes ---------------
21298 #### 1. Quotes inside <b> and <i>
21299 #### 2. Link fragments separated by <i> and <b> tags
21300 #### 3. Link fragments inside <i> and <b>
21301 #### 4. No escaping needed
21302 #### --------------------------------------
21304 1a. Quotes inside <b> and <i>
21306 parsoid=html2wt,wt2wt
21309 ''<nowiki>''foo''</nowiki>''
21310 ''<nowiki>'''foo'''</nowiki>''
21312 '''<nowiki/>'foo''''
21313 '''<nowiki>''foo''</nowiki>'''
21314 '''<nowiki>'''foo'''</nowiki>'''
21315 '''foo'<nowiki/>''bar'<nowiki/>''baz'''
21316 '''foo'''<nowiki/>'s
21322 '''foo'''<nowiki/>'
21323 ''''foo'''<nowiki/>'
21324 ''fools'<span> errand</span>''
21325 ''<span>fool</span>'s errand''
21326 '<nowiki/>''foo'' bar '''baz''
21327 a|!*#-:;+-~[]{}b'''x''
21336 <b>foo'<i>bar'</i>baz</b>
21345 <i>fools'<span> errand</span></i>
21346 <i><span>fool</span>'s errand</i>
21347 '<i>foo</i> bar '<i>baz</i>
21348 a|!*#-:;+-~[]{}b'<i>x</i>
21353 1b. Quotes inside <b> and <i> with other tags on same line
21355 parsoid=html2wt,wt2wt
21357 '''a'' foo ''[[bar]]''
21358 ''a''' foo ''[[bar]]''
21359 ''a''' foo '''{{echo|[[bar]]}}'''
21360 [[foo]] x'''[[bar]]''
21361 '''foo'' <ref>test</ref>
21362 '''foo'' <div title="name">test</div>
21363 '''foo'' and <br> bar
21365 '<i>a</i> foo <i><a rel="mw:WikiLink" href="Bar" title="Bar">bar</a></i>
21366 <i>a'</i> foo <i><a rel="mw:WikiLink" href="Bar" title="Bar">bar</a></i>
21367 <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>
21368 <a rel="mw:WikiLink" href="Foo" title="Foo">foo</a> x'<i><a href="Bar" rel="mw:WikiLink" title="Bar">bar</a></i>
21369 '<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>
21370 '<i>foo</i> <div title="name">test</div>
21371 '<i>foo</i> and <br data-parsoid='{"stx":"html","noClose":true}'/> bar
21375 2. Link fragments separated by <i> and <b> tags
21377 [[''foo''<nowiki>hello]]</nowiki>
21379 [['''foo'''<nowiki>hello]]</nowiki>
21381 <p>[[<i>foo</i>hello]]
21382 </p><p>[[<b>foo</b>hello]]
21386 # FIXME: Escaping one or both of [[ and ]] is also acceptable --
21387 # this is one of the shortcomings of this format
21389 3. Link fragments inside <i> and <b>
21391 ''[[foo''<nowiki>]]</nowiki>
21393 '''[[foo'''<nowiki>]]</nowiki>
21396 </p><p><b>[[foo</b>]]
21401 4. No escaping needed
21403 '<span>''bar''</span>'
21404 '<span>'''bar'''</span>'
21407 <p>'<span><i>bar</i></span>'
21408 '<span><b>bar</b></span>'
21413 #### ----------- Paragraphs ---------------
21414 #### 1. No unnecessary escapes
21415 #### --------------------------------------
21418 1. No unnecessary escapes
21420 bar <span><nowiki>[[foo]]</nowiki></span>
21422 =bar <span><nowiki>[[foo]]</nowiki></span>
21424 [[bar <span><nowiki>[[foo]]</nowiki></span>
21426 ]]bar <span><nowiki>[[foo]]</nowiki></span>
21428 =bar <span>foo]]</span><nowiki>=</nowiki>
21430 <p>bar <span>[[foo]]</span>
21431 </p><p>=bar <span>[[foo]]</span>
21432 </p><p>[[bar <span>[[foo]]</span>
21433 </p><p>]]bar <span>[[foo]]</span>
21434 </p><p>=bar <span>foo]]</span>=
21438 #### ----------------------- PRE --------------------------
21439 #### 1. Leading whitespace in SOL context should be escaped
21440 #### ------------------------------------------------------
21442 1. Leading whitespace in SOL context should be escaped
21446 <nowiki> </nowiki>a
21448 <nowiki> </nowiki> a
21450 <nowiki> </nowiki>a(tab)
21452 <nowiki> </nowiki> a
21454 <nowiki> </nowiki> a
21457 <nowiki> </nowiki>b
21460 <nowiki> </nowiki>b
21463 <nowiki> </nowiki> b
21469 <p><!--cmt--> a</p>
21479 2. Leading whitespace in non-indent-pre contexts should not be escaped
21486 <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>
21490 3. Leading whitespace in indent-pre suppressing contexts should not be escaped
21509 4. Leading whitespace in indent-pre suppressing contexts should not be escaped
21513 [[File:Foobar.jpg|thumb|caption]]
21516 <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>
21520 5. Nowiki escaping should account for indent-pres
21529 #### --------------- Behavior Switches --------------------
21531 1. Valid behavior switches should be escaped
21538 <nowiki>__TOC__</nowiki>
21539 ''<nowiki>__TOC__</nowiki>''
21543 2. Invalid behavior switches should not be escaped
21554 #### --------------- HTML tags ---------------
21557 #### 3. multi-line html tag
21558 #### 4. extension tags
21559 #### -----------------------------------------
21565 <a href="http://google.com">google</a>
21567 <a href="http://google.com">google</a>
21573 <nowiki><div>foo</div>
21574 <div style="color:red">foo</div></nowiki>
21576 <p><div>foo</div>
21577 <div style="color:red">foo</div>
21582 3. multi-line html tag
21597 <nowiki><ref>foo</ref></nowiki>
21599 <nowiki><ref>bar</nowiki>
21601 baz<nowiki></ref></nowiki>
21603 <p><ref>foo</ref>
21604 </p><p><ref>bar
21605 </p><p>baz</ref>
21609 #### --------------- Others ---------------
21613 <nowiki>foo</nowiki>
21615 <p><nowiki>foo</nowiki>
21619 ## The quote-char in the input is necessary for triggering the bug
21621 (Bug 52035) Nowiki-escaping should not get tripped by " :" in text
21623 parsoid=wt2wt,html2wt
21632 Tag-like HTML structures are passed through as text
21654 </p><p>1<d e>f
21659 # This was a bug in the PHP parser (see bug 17663 and its dups,
21660 # https://bugzilla.wikimedia.org/show_bug.cgi?id=17663)
21662 Tag names followed by punctuation should not be recognized as tags
21666 <p><s.ome> text
21671 HTML tag with necessary entities in attributes
21673 <span title="&amp;">foo</span>
21675 <p><span title="&amp;">foo</span>
21680 HTML tag with 'unnecessary' entity encoding in attributes
21682 <span title="&">foo</span>
21684 <p><span title="&">foo</span>
21689 HTML tag with broken attribute value quoting
21691 <span title="Hello world>Foo</span>
21693 <p><span>Foo</span>
21696 <p><span title="Hello world">Foo</span>
21701 Parsoid-only: HTML tag with broken attribute value quoting
21705 <span title="Hello world>Foo</span>
21707 <p><span title="Hello world">Foo</span>
21712 Table with broken attribute value quoting
21715 | title="Hello world|Foo
21726 <td title="Hello world">Foo
21732 Table with broken attribute value quoting on consecutive lines
21735 | title="Hello world|Foo
21736 | style="color:red|Bar
21749 <td title="Hello world">Foo
21750 </td><td style="color: red">Bar
21751 </td></tr></tbody></table>
21756 Parsoid-only: Don't wrap broken template tags in <nowiki> on wt2wt (Bug 42353)
21766 Parsoid-only: Don't wrap broken template tags in <nowiki> on wt2wt (Bug 42353)
21776 Accept empty td cell attribute
21779 | align="center" | foo || |
21784 <td align="center"> foo </td>
21791 Non-empty attributes in th-cells
21794 ! Foo !! style="color: red" | Bar
21800 <th style="color: red"> Bar
21806 Accept empty attributes in th-cells
21821 Empty table rows go away
21842 ### Parsoid-centric tests for testing RTing of inter-element separators
21843 ### Edge cases not tested by existing parser tests and specific to
21844 ### Parsoid-specific serialization strategies.
21848 RT-ed inter-element separators should be valid separators
21860 # Parsoid-only since PHP parser relies on Tidy for correct output
21862 Trailing newlines in a deep dom-subtree that ends a wikitext line should be migrated out
21876 <tbody><tr data-parsoid='{"autoInsertedEnd":true,"autoInsertedStart":true}'><td data-parsoid='{"autoInsertedEnd":true}'><small data-parsoid='{"stx":"html","autoInsertedEnd":true}'>foo
21877 <p>bar</p></small></td></tr>
21881 <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>
21886 Empty TD followed by TD with tpl-generated attribute
21891 |{{echo|style='color:red'}}|foo
21905 Indented table with an empty td
21923 ## We have some newline diffs RT-ing this edge case
21924 ## and it is not important enough -- we seem to be emitting
21925 ## at most 2 newlines after a </tr> and this is unrelated to
21926 ## the issue from T85627 that this is testing.
21928 Indented table with blank lines in between (T85627)
21947 Indented block & table
21961 <div data-parsoid='{"stx":"html"}'>foo</div>
21963 <tr data-parsoid='{"autoInsertedEnd":true,"autoInsertedStart":true}'><td data-parsoid='{"autoInsertedEnd":true}'>foo</td></tr>
21968 Indent and comment before table row
21983 <!--hi--><tbody><tr data-parsoid='{"startTagSrc":"|-","autoInsertedEnd":true}'>
21984 <td data-parsoid='{"autoInsertedEnd":true}'> there</td></tr>
21988 # Parsoid-specific since PHP parser doesn't handle this mixed tbl-wikitext
21990 Empty TR followed by a template-generated TR
21996 {{echo|<tr><td>foo</td></tr>}}
22002 <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}}]}'>
22007 ## PHP and parsoid output differ for this, and since this is primarily
22008 ## for testing Parsoid's serializer, marking this Parsoid only
22010 Empty TR followed by mixed-ws-comment line should RT correctly
22026 <!--c--> </tr><!--d-->
22032 Multi-line image caption generated by templates with/without trailing newlines
22034 [[File:Foobar.jpg|thumb|300x300px|foo\n{{echo|A}}\n{{echo|B}}\n{{echo|C}}]]
22035 [[File:Foobar.jpg|thumb|300x300px|foo\n{{echo|A}}\n{{echo|B}}\n{{echo|C}}\n\n]]
22037 <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>
22038 <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>
22042 New element inserted (without intervening newlines) after an old sol-transparent node should serialize correctly
22046 <meta typeof="mw:Includes/IncludeOnly" data-parsoid='{"src":"<includeonly>foo</includeonly>"}'/><meta typeof="mw:Includes/IncludeOnly/End" data-parsoid='{"src":""}'/><p>new para</p>
22048 <link rel="mw:PageProp/Category" href="./Category:Foo" data-parsoid=''/><h1>new heading</h1>
22050 <includeonly>foo</includeonly>
22058 ## PHP emits broken html for this, and since this is primarily
22059 ## a Parsoid serializer test, marking this Parsoid only
22061 Improperly nested inline or quotes tags with whitespace in between
22065 <span> <s>x</span> </s>
22068 <p><span> <s>x</s></span><s> </s>
22069 <b> <i>x</i></b><i> </i>
22074 Encapsulate protected attributes from wt
22078 <div typeof="mw:placeholder stuff" data-parsoid="weird" data-parsoid-other="no" about="time" rel="mw:true">foo</div>
22080 <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>
22084 ## Currently the p-wrapper is fragile in how it adds / removes transformations.
22085 ## Having nested or stray pre tags results in the attempt to add duplicates,
22086 ## causing an assertion fail. This test tries to prevent that situation.
22088 Ensure ParagraphWrapper can deal with stray closing pre tags
22098 1. Ensure fostered text content is wrapped in element nodes
22102 <table>hi</table><table>ho</table>
22111 2. Ensure fostered text content is wrapped in element nodes (traps regressions around fostered marker on the element getting lost)
22113 parsoid=wt2html,wt2wt
22122 <tbody><tr><td> a</td></tr>
22127 Encapsulation properly handles null DSR information from foster box
22129 parsoid=wt2html,wt2wt
22131 {{echo|<table>foo<tr><td>bar</td></tr></table>}}
22133 <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>
22137 1. Encapsulate foster-parented transclusion content
22139 parsoid=wt2wt,wt2html
22141 <table>{{echo|foo<tr><td>bar</td></tr>}}</table>
22143 <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>
22153 2. Encapsulate foster-parented transclusion content
22155 parsoid=wt2wt,wt2html
22157 <table><div>{{echo|foo}}</div><tr><td>bar</td></tr></table>
22159 <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>
22170 3. Encapsulate foster-parented transclusion content
22172 parsoid=wt2wt,wt2html
22174 <table><div><p>{{echo|foo</p></div><tr><td>}}bar</td></tr></table>
22176 <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>"]}">
22189 4. Encapsulate foster-parented transclusion content
22191 parsoid=wt2wt,wt2html
22193 <table><div><p>{{echo|foo</p></div><tr><td>}}bar</td></tr></table>
22195 <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>"]}">
22208 5. Encapsulate foster-parented transclusion content
22210 parsoid=wt2wt,wt2html
22212 <table><tr><td><div><p>{{echo|foo</p></div></td>foo}}</tr></table>
22214 <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>
22229 6. Encapsulate foster-parented transclusion content
22231 parsoid=wt2wt,wt2html
22233 <table><tr><td><div><p>{{echo|foo</p></div></td>foo</tr></table>}}<p>ok</p>
22235 <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>
22251 7. Encapsulate foster-parented transclusion content
22253 parsoid=wt2wt,wt2html
22255 <table>{{echo|<p>foo</p>}}<td>bar</td></table>
22257 <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>
22268 8. Encapsulate foster-parented transclusion content
22270 parsoid=wt2wt,wt2html
22273 }}{|{{echo|style='color:red'}}
22278 <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>
22288 9. Encapsulate foster-parented transclusion content
22290 parsoid=wt2wt,wt2html
22292 <table>{{echo|hi</table>hello}}
22294 <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>
22298 Table in fosterable position
22300 parsoid=wt2html,wt2wt
22309 <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">
22311 <table about="#mwt1" data-parsoid='{"autoInsertedEnd":true}'></table>
22317 # Parsoid only for bug 64747
22319 Properly encapsulate empty-content transclusions in fosterable positions
22327 <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":["","","",""]}]]}'>
22333 Support <object> element with .data attribute
22337 <object data="test.swf"></object>
22339 <object data="test.swf"></object>
22343 Don't block XML namespace declaration
22345 <span xmlns:dct="http://purl.org/dc/terms/" property="dct:title">MediaWiki</span>
22347 <p><span>MediaWiki</span>
22350 <p><span xmlns:dct="http://purl.org/dc/terms/" data-x-property="dct:title" data-parsoid='{"stx":"html"}'>MediaWiki</span></p>
22353 # -----------------------------------------------------------------
22354 # The following section of tests are primarily to spec requirements
22355 # around serialization of new/edited content.
22357 # All these tests are marked Parsoid html2wt and html2html only
22358 # ----------------------------------------------------------------
22360 # 'mi' is a localinterwiki prefix as well as a language
22362 Serialize interwiki links pointing to the current wiki as plain wiki links (bug 65869)
22366 <p><a rel="mw:ExtLink" href="http://mi.wikipedia.org/wiki/Foo">Foo</a></p>
22372 New wiki links (href variations)
22376 <a rel="mw:WikiLink" href="./Foo_bar">Foo_bar</a>
22377 <a rel="mw:WikiLink" href="Foo_bar">Foo_bar</a>
22378 <a rel="mw:WikiLink" href="Foo bar">Foo_bar</a>
22379 <a rel="mw:WikiLink" href="./Toxine_bact%C3%A9rienne">Toxine bactérienne</a>
22384 [[Toxine bactérienne]]
22388 New wiki links (content string variations)
22392 <a rel="mw:WikiLink" href="./Foo_bar">Foo_bar</a>
22393 <a rel="mw:WikiLink" href="./Foo_bar">Foo bar</a>
22394 <a rel="mw:WikiLink" href="./Foo_bar">./Foo_bar</a>
22398 [[Foo_bar|./Foo_bar]]
22402 New category links (href variations)
22406 <link rel="mw:PageProp/Category" href="./Category:Toxine_bactérienne" />
22407 <link rel="mw:PageProp/Category" href="./Category:Toxine_bact%C3%A9rienne" />
22408 <link rel="mw:PageProp/Category" href="Category:Toxine_bact%C3%A9rienne" />
22410 [[Category:Toxine bactérienne]]
22411 [[Category:Toxine bactérienne]]
22412 [[Category:Toxine bactérienne]]
22416 New interlanguage links (href variations)
22420 <link rel="mw:PageProp/Language" href="http://es.wikipedia.org/wiki/Toxine bactérienne" />
22421 <link rel="mw:PageProp/Language" href="http://es.wikipedia.org/wiki/Toxine_bactérienne" />
22422 <link rel="mw:PageProp/Language" href="http://es.wikipedia.org/wiki/Toxine_bact%C3%A9rienne" />
22424 [[es:Toxine bactérienne]]
22425 [[es:Toxine_bactérienne]]
22426 [[es:Toxine_bactérienne]]
22430 Image: Modifying size of an image (1)
22433 "modes": ["wt2wt"],
22435 ["img[height]", "attr", "height", "22"],
22436 ["img[width]", "attr", "width", "200"]
22440 [[Image:Foobar.jpg|230x230px]]
22442 [[Image:Foobar.jpg|200x200px]]
22446 Image: Modifying size of an image (2)
22449 "modes": ["wt2wt"],
22451 ["img[height]", "attr", "height", "100"],
22452 ["img[width]", "attr", "width", "500"]
22456 [[Image:Foobar.jpg|230x230px]]
22458 [[Image:Foobar.jpg|500x500px]]
22461 # Change in size is ignored so long as class='mw-default-size'
22463 Image: Modifying size of an image (3)
22466 "modes": ["wt2wt"],
22468 ["figure[class]", "removeClass", "mw-default-size"],
22469 ["figure img", "attr", "height", "19"],
22470 ["figure img", "attr", "width", "170"]
22474 [[Image:Foobar.jpg|thumb]]
22476 [[Image:Foobar.jpg|thumb|170x170px]]
22480 Image: Modifying alignment of an image (bug 48665)
22483 "modes": ["wt2wt"],
22485 ["figure[class]", "removeClass", "mw-halign-right"],
22486 ["figure[class]", "addClass", "mw-halign-left"]
22490 [[Image:Foobar.jpg|thumb|caption|right]]
22492 [[Image:Foobar.jpg|thumb|caption|left]]
22496 Image: Modifying mw-default-size of an frameless image (bug 62805)
22499 "modes": ["wt2wt"],
22501 ["figure.mw-default-size", "removeClass", "mw-default-size"]
22505 [[Image:Foobar.jpg|frameless|right]]
22507 [[Image:Foobar.jpg|frameless|right|220x220px]]
22511 Image: Modifying valign of an image (bug 49221)
22514 "modes": ["wt2wt"],
22516 ["*[typeof=\"mw:Image\"]", "removeClass", "mw-valign-middle"],
22517 ["*[typeof=\"mw:Image\"]", "addClass", "mw-valign-text-top"]
22521 [[File:Foobar.jpg|20px|middle]]
22523 [[File:Foobar.jpg|20px|text-top]]
22527 Image: Modifying alt attribute of an image (bug 56400)
22530 "modes": ["wt2wt"],
22532 ["img[alt]", "attr", "alt", "some alternate edited text"]
22536 [[File:Foobar.jpg|thumb|some caption|alt=some alternate text]]
22538 [[File:Foobar.jpg|thumb|some caption|alt=some alternate edited text]]
22542 Image: Modifying caption of an image
22545 "modes": ["wt2wt"],
22547 ["figcaption", "text", "new caption"]
22551 [[Image:Foobar.jpg|thumb|original caption]]
22553 [[Image:Foobar.jpg|thumb|new caption]]
22557 Image: empty alt attribute (bug 48924)
22561 [[File:Foobar.jpg|thumb|alt=|bar]]
22563 <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>
22567 #Image: new attributes should be serialized in wiki's language for RTL languages (bug 51852)
22572 #<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>
22574 #[[Imagen:Foobar.jpg|derecha|miniaturadeimagen]]
22578 Image: Block level image should have \n before and after
22581 [[File:Foobar.jpg|right|thumb|150x150px]]
22585 <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>
22590 Image: New block level image should have \n before and after (existing content)
22593 [[File:Foobar.jpg|right|thumb|150x150px]]
22597 <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>
22602 Image: upright option (parsoid)
22606 [[File:Foobar.jpg|thumb|upright|caption]]
22607 [[File:Foobar.jpg|thumb|upright=0.5|caption]]
22608 [[File:Foobar.jpg|thumb|500x500px|upright=0.5|caption]]
22610 <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>
22611 <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>
22612 <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>
22616 Image: upright option is ignored on inline and frame images (parsoid)
22620 [[File:Foobar.jpg|500x500px|upright=0.5|caption]]
22622 <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>
22626 Image: from basic HTML (1)
22630 <span typeof="mw:Image">
22631 <img src="File:Foobar.jpg" width=100 height=100 alt="Alt">
22634 [[File:Foobar.jpg|link=|alt=Alt|100x100px]]
22638 Image: from basic HTML (2)
22642 <img src="File:Foobar.jpg" width=100 height=100 alt="Alt">
22644 [[File:Foobar.jpg|link=|alt=Alt|100x100px]]
22648 Image: from basic HTML (3)
22652 <a href="Main"><img src="File:Foobar.jpg" width=100 height=100 alt="Alt"></a>
22654 [[File:Foobar.jpg|link=Main|alt=Alt|100x100px]]
22658 Image: from basic HTML (4)
22662 <img src="File:Foobar.jpg">
22664 [[File:Foobar.jpg|link=]]
22668 Lists: Serialize correctly even when list content is wrapped in p-tags (like VE does)
22673 <li><p>foo</p></li>
22680 Lists: Serialize correctly even when list tags has unneeded whitespace between tags
22684 <ul> <li>foo</li></ul>
22690 Don't strip leading whitespace when handling indent-pre suppressing tags
22695 <tr><td> indented row</td></tr>
22698 <b>This is very bold of you!</b>
22701 indented cell (no pre-wrapping!)
22711 '''This is very bold of you!'''
22715 indented cell (no pre-wrapping!)
22723 Nowiki-wrap leading whitespace when handling indent-pre inducing tags
22728 <nowiki> </nowiki><span>bar</span>
22731 <nowiki> </nowiki></span>bar2
22734 <nowiki> </nowiki><span>bar</span>
22737 <nowiki> </nowiki><span>foo</span>
22755 Lists: Add space after bullets
22762 <li><span> baz</span></li>
22767 * <span> baz</span>
22771 Lists: Dont insert newlines in a serialized list item.
22775 <ul><li>a<br>b</li><li>c</li></ul>
22782 Headings: Add space before/after == (Bug 51744)
22789 <h2><span> baz</span></h2>
22797 == <span> baz</span> ==
22801 Headings: Force metas to serialize before/after
22805 <h2>hello there<link href="Category:A1" rel="mw:PageProp/Category" /></h2>
22806 <h2><link href="Category:A2" rel="mw:PageProp/Category" />hi pal</h2>
22816 Parsoid: Serialize positional parameters with = in them as named parameter
22820 <p about="#mwt1" typeof="mw:Transclusion"
22821 data-mw='{"parts":[{"template":{"target":{"wt":"echo","href":"./Template:Echo"},"params":{"1":{"wt":"f=oo"}},"i":0}}]}'>foo</p>
22823 <p about="#mwt1" typeof="mw:Transclusion"
22824 data-mw='{"parts":[{"template":{"target":{"wt":"echo","href":"./Template:Echo"},"params":{"1":{"wt":"f=oo"}, "2":{"wt":"bar"}},"i":0}}]}'>foo</p>
22826 <!--Orig params with data-parsoid has heuristics for handling = chars-->
22827 <!--FIXME: But maybe the heuristic needs fixing to apply to new params as well-->
22828 <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>
22832 {{echo|1 = f=oo|2 = bar}}
22834 <!--Orig params with data-parsoid has heuristics for handling = chars-->
22835 <!--FIXME: But maybe the heuristic needs fixing to apply to new params as well-->
22836 {{echo|<nowiki>f=oo</nowiki>|bar}}
22840 Parsoid: Serialize positional parameters with = in extlink as named parameter
22844 <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>
22846 {{echo|1 = http://stuff?is=ok}}
22850 Parsoid: Correctly serialize block-node children when they are a combination of text and p-nodes
22854 <div>a<p>b</p></div>
22875 Substrings resembling wikitext in hrefs should not get nowiki escapes
22879 <a rel="mw:WikiLink" href="./Foo''bar''baz">Foo''bar''baz</a>
22884 #-----------------------------
22885 # I/B quote minimization tests
22886 #-----------------------------
22889 1. I/B quote minimization: wikitext-only tags should be combined
22893 <p><i>A</i><i>B</i></p>
22894 <p><b>A</b><b>B</b></p>
22895 <p><i>A</i><b><i>B</i></b></p>
22896 <p><b>A</b><i><b>B</b></i></p>
22897 <p><b>A</b><i><b>B</b><b>C</b></i><b>D</b></p>
22898 <p><i><b>A</b></i><i><b>B</b></i></p>
22899 <p><i><b>A</b></i><b><i>B</i></b></p>
22900 <p><b><i>A</i></b><i><b>B</b></i></p>
22920 2. I/B quote minimization: wikitext and html tags should not be combined
22924 <p><i>A</i><i data-parsoid='{"stx":"html"}'>B</i></p>
22925 <p><i>A</i><b><i data-parsoid='{"stx":"html"}'>B</i></b></p>
22929 ''A''<nowiki/>'''<i>B</i>'''
22933 3. I/B quote minimization: templated content stops minimization
22937 <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>
22938 <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>
22940 ''A''{{echo|''B''}}
22942 ''A''{{echo|'''''B'''''}}
22946 4. I/B quote minimization: new content should be mimimized with adjacent old content
22950 <p><i>A</i><i>B</i></p>
22951 <p><b>A</b><b>B</b></p>
22952 <p><i>A</i><b><i>B</i></b></p>
22962 5a. Merge adjacent quote nodes if they've been edited
22965 "modes": ["wt2wt"],
22967 ["p", "contents", "remove", ":contains('b')"]
22977 5b. Merge adjacent quote nodes if they've been edited
22980 "modes": ["wt2wt"],
22986 ''a''<span id="x">b</span>''c''
22991 #------------------------------------
22992 # End of I/B quote minimization tests
22993 #------------------------------------
22996 Bug 54262: New entities
23002 <span typeof="mw:Entity"> </span>
23005 ## Note that there is no wikitext output for 'unknownproperty' ##
23006 ## Unknown magic words are silently dropped ##
23013 <meta property='mw:PageProp/toc' />
23014 <meta property='mw:PageProp/notoc' />
23015 <meta property='mw:PageProp/forcetoc' />
23016 <meta property='mw:PageProp/index' />
23017 <meta property='mw:PageProp/noindex' />
23018 <meta property='mw:PageProp/nogallery' />
23019 <meta property='mw:PageProp/noeditsection' />
23020 <meta property='mw:PageProp/notitleconvert' />
23021 <meta property='mw:PageProp/nocontentconvert' />
23022 <meta property='mw:PageProp/unknownproperty' />
23032 __NOCONTENTCONVERT__
23036 Consecutive <pre>s should not get merged
23038 parsoid=html2wt,html2html
23040 <pre>a</pre><pre>b</pre>
23068 Edited ISBN links not serializable as ISBN links should serialize as wikilinks
23072 <a rel="mw:ExtLink" href="./Special:BookSources/1234567890">ISBN 1234567895</a>
23074 [[Special:BookSources/1234567890|ISBN 1234567895]]
23078 Edited RFC links not serializable as RFC links should serialize as extlinks
23082 <a href="//tools.ietf.org/html/rfc123" rel="mw:ExtLink">New RFC</a>
23084 [//tools.ietf.org/html/rfc123 New RFC]
23088 Edited PMID links not serializable as PMID links should serialize as extlinks
23092 <a href="//www.ncbi.nlm.nih.gov/pubmed/123?dopt=Abstract" rel="mw:ExtLink">New PMID</a>
23094 [//www.ncbi.nlm.nih.gov/pubmed/123?dopt=Abstract New PMID]
23098 WTS of autolinks with trailing/surrounding context
23102 <p><a href="http://cscott.net">http://cscott.net</a><b>foo</b></p>
23103 <p><a href="http://cscott.net">http://cscott.net</a><b data-parsoid='{"stx":"html"}'>foo</b></p>
23104 <p><b><a href="http://cscott.net">http://cscott.net</a></b></p>
23105 <p><b><a href="http://cscott.net">http://cscott.net</a> </b></p>
23106 <p><b><a href="http://cscott.net">http://cscott.net</a>x</b></p>
23107 <p><a href="http://cscott.net">http://cscott.net</a>x</p>
23109 http://cscott.net<nowiki/>'''foo'''
23111 http://cscott.net<b>foo</b>
23113 '''http://cscott.net<nowiki/>'''
23115 '''http://cscott.net '''
23117 '''http://cscott.net<nowiki/>x'''
23119 http://cscott.net<nowiki/>x
23123 WTS of autolinks with nowikis (round-trip)
23125 x<nowiki/>http://cscott.net<nowiki/>x
23127 <p>x<a rel="mw:ExtLink" href="http://cscott.net">http://cscott.net</a>x</p>
23130 # this is the "easy" test because it leaves in place all the
23131 # data-parsoid information indicating this is an autolink
23133 WTS of autolinks with escapes (editing)
23136 "modes": ["wt2wt"],
23138 [ "meta", "remove" ]
23142 x<nowiki/>http://cscott.net<nowiki/>x
23144 x<nowiki/>http://cscott.net<nowiki/>x
23148 Edited Redirect link should emit a non-piped wikitext link
23152 <link rel="mw:PageProp/redirect" href="Bar" data-parsoid='{"a":{"href":"./Foo"},"sa":{"href":"Foo"}}'>
23158 T75121: Infer extension name from typeOf if data-mw is not present
23162 <div typeOf="mw:Extension/foo"></div>
23167 # -----------------------------------------------------------------
23168 # End of section for Parsoid-only html2wt tests for serialization
23170 # -----------------------------------------------------------------
23177 Try for 100% code coverage